Răsfoiți Sursa

chore(core): Tidy up unused imports, docs

Michael Bromley 3 ani în urmă
părinte
comite
b2ad669579

+ 1 - 0
packages/core/src/config/fulfillment/fulfillment-process.ts

@@ -21,6 +21,7 @@ import {
  * For detailed description of the interface members, see the {@link StateMachineConfig} docs.
  *
  * @docsCategory fulfillment
+ * @since 2.0.0
  */
 export interface FulfillmentProcess<State extends keyof CustomFulfillmentStates | string>
     extends InjectableStrategy {

+ 1 - 2
packages/core/src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts

@@ -10,7 +10,6 @@ import { awaitPromiseOrObservable } from '../../../common/utils';
 import { ConfigService } from '../../../config/config.service';
 import { Fulfillment } from '../../../entity/fulfillment/fulfillment.entity';
 import { Order } from '../../../entity/order/order.entity';
-import { HistoryService } from '../../services/history.service';
 
 import { FulfillmentState, FulfillmentTransitionData } from './fulfillment-state';
 
@@ -19,7 +18,7 @@ export class FulfillmentStateMachine {
     readonly config: StateMachineConfig<FulfillmentState, FulfillmentTransitionData>;
     private readonly initialState: FulfillmentState = 'Created';
 
-    constructor(private configService: ConfigService, private historyService: HistoryService) {
+    constructor(private configService: ConfigService) {
         this.config = this.initConfig();
     }
 

+ 1 - 15
packages/core/src/service/helpers/order-state-machine/order-state-machine.ts

@@ -9,13 +9,7 @@ import { validateTransitionDefinition } from '../../../common/finite-state-machi
 import { awaitPromiseOrObservable } from '../../../common/utils';
 import { ConfigService } from '../../../config/config.service';
 import { OrderProcess } from '../../../config/index';
-import { TransactionalConnection } from '../../../connection/transactional-connection';
 import { Order } from '../../../entity/order/order.entity';
-import { EventBus } from '../../../event-bus/index';
-import { HistoryService } from '../../services/history.service';
-import { ProductVariantService } from '../../services/product-variant.service';
-import { PromotionService } from '../../services/promotion.service';
-import { StockMovementService } from '../../services/stock-movement.service';
 
 import { OrderState, OrderTransitionData } from './order-state';
 
@@ -24,15 +18,7 @@ export class OrderStateMachine {
     readonly config: StateMachineConfig<OrderState, OrderTransitionData>;
     private readonly initialState: OrderState = 'Created';
 
-    constructor(
-        private connection: TransactionalConnection,
-        private configService: ConfigService,
-        private stockMovementService: StockMovementService,
-        private historyService: HistoryService,
-        private promotionService: PromotionService,
-        private eventBus: EventBus,
-        private productVariantService: ProductVariantService,
-    ) {
+    constructor(private configService: ConfigService) {
         this.config = this.initConfig();
     }