@rytass/wms-module-graphql 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/adapters/event-emitter.d.ts +29 -0
- package/adapters/event-emitter.js +41 -0
- package/docs/README.md +3 -0
- package/docs/api-reference.md +40 -0
- package/docs/events.md +304 -0
- package/docs/integration-guide.md +83 -2
- package/index.cjs.js +128 -1
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/lib/events/index.d.ts +3 -0
- package/lib/events/wms-mutation-event.constants.d.ts +12 -0
- package/lib/events/wms-mutation-event.constants.js +4 -0
- package/lib/events/wms-mutation-event.decorator.d.ts +15 -0
- package/lib/events/wms-mutation-event.decorator.js +20 -0
- package/lib/events/wms-mutation.interceptor.d.ts +19 -0
- package/lib/events/wms-mutation.interceptor.js +72 -0
- package/lib/graphql.module.d.ts +15 -5
- package/lib/graphql.module.js +8 -2
- package/lib/mutations/allocate-inventory-order.mutation.js +5 -0
- package/lib/mutations/hold-inventory-order.mutation.js +5 -0
- package/lib/mutations/loader.mutation.js +7 -0
- package/lib/mutations/location.mutation.js +4 -0
- package/lib/mutations/material.mutation.js +4 -0
- package/lib/mutations/merge-batch.mutation.js +3 -0
- package/lib/mutations/quality-inspection-order.mutation.js +3 -0
- package/lib/mutations/receive-inventory-order.mutation.js +5 -0
- package/lib/mutations/reclassify-inventory-order.mutation.js +3 -0
- package/lib/mutations/scrape-order.mutation.js +3 -0
- package/lib/mutations/ship-inventory-order.mutation.js +6 -0
- package/lib/mutations/split-batch.mutation.js +3 -0
- package/lib/mutations/transfer-customer-order.mutation.js +5 -0
- package/lib/mutations/transfer-order.mutation.js +6 -0
- package/lib/mutations/transfer-vendor-order.mutation.js +5 -0
- package/lib/mutations/warehouse-map.mutation.js +3 -0
- package/package.json +13 -3
|
@@ -7,6 +7,8 @@ import { CreateAllocateInventoryOrderArgs, UpdateAllocateInventoryOrderArgs } fr
|
|
|
7
7
|
import { DeallocateOrderArgs } from '../inputs/deallocate-order.args.js';
|
|
8
8
|
import '../auth/wms-auth.guard.js';
|
|
9
9
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
10
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
11
|
+
import '../events/wms-mutation.interceptor.js';
|
|
10
12
|
|
|
11
13
|
let AllocateInventoryOrderMutation = class AllocateInventoryOrderMutation {
|
|
12
14
|
allocateInventoryOrderService;
|
|
@@ -56,6 +58,7 @@ let AllocateInventoryOrderMutation = class AllocateInventoryOrderMutation {
|
|
|
56
58
|
__decorate([
|
|
57
59
|
Mutation(() => AllocateInventoryOrderDto),
|
|
58
60
|
WmsOperation({ resource: 'allocate-inventory-order', action: 'create' }),
|
|
61
|
+
WmsMutationEvent({ event: 'allocate-inventory-order.created' }),
|
|
59
62
|
__param(0, Args()),
|
|
60
63
|
__metadata("design:type", Function),
|
|
61
64
|
__metadata("design:paramtypes", [CreateAllocateInventoryOrderArgs]),
|
|
@@ -64,6 +67,7 @@ __decorate([
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Mutation(() => AllocateInventoryOrderDto),
|
|
66
69
|
WmsOperation({ resource: 'allocate-inventory-order', action: 'update' }),
|
|
70
|
+
WmsMutationEvent({ event: 'allocate-inventory-order.updated' }),
|
|
67
71
|
__param(0, Args()),
|
|
68
72
|
__metadata("design:type", Function),
|
|
69
73
|
__metadata("design:paramtypes", [UpdateAllocateInventoryOrderArgs]),
|
|
@@ -72,6 +76,7 @@ __decorate([
|
|
|
72
76
|
__decorate([
|
|
73
77
|
Mutation(() => Boolean),
|
|
74
78
|
WmsOperation({ resource: 'allocate-inventory-order', action: 'deallocate' }),
|
|
79
|
+
WmsMutationEvent({ event: 'allocate-inventory-order.deallocated' }),
|
|
75
80
|
__param(0, Args('items', { type: () => [DeallocateOrderArgs] })),
|
|
76
81
|
__metadata("design:type", Function),
|
|
77
82
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -7,6 +7,8 @@ import { CreateHoldInventoryOrderArgs, UpdateHoldInventoryOrderArgs } from '../i
|
|
|
7
7
|
import { ReleaseOrderArgs } from '../inputs/release-order.args.js';
|
|
8
8
|
import '../auth/wms-auth.guard.js';
|
|
9
9
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
10
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
11
|
+
import '../events/wms-mutation.interceptor.js';
|
|
10
12
|
|
|
11
13
|
let HoldInventoryOrderMutation = class HoldInventoryOrderMutation {
|
|
12
14
|
holdInventoryOrderService;
|
|
@@ -56,6 +58,7 @@ let HoldInventoryOrderMutation = class HoldInventoryOrderMutation {
|
|
|
56
58
|
__decorate([
|
|
57
59
|
Mutation(() => HoldInventoryOrderDto),
|
|
58
60
|
WmsOperation({ resource: 'hold-inventory-order', action: 'create' }),
|
|
61
|
+
WmsMutationEvent({ event: 'hold-inventory-order.created' }),
|
|
59
62
|
__param(0, Args()),
|
|
60
63
|
__metadata("design:type", Function),
|
|
61
64
|
__metadata("design:paramtypes", [CreateHoldInventoryOrderArgs]),
|
|
@@ -64,6 +67,7 @@ __decorate([
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Mutation(() => HoldInventoryOrderDto),
|
|
66
69
|
WmsOperation({ resource: 'hold-inventory-order', action: 'update' }),
|
|
70
|
+
WmsMutationEvent({ event: 'hold-inventory-order.updated' }),
|
|
67
71
|
__param(0, Args()),
|
|
68
72
|
__metadata("design:type", Function),
|
|
69
73
|
__metadata("design:paramtypes", [UpdateHoldInventoryOrderArgs]),
|
|
@@ -72,6 +76,7 @@ __decorate([
|
|
|
72
76
|
__decorate([
|
|
73
77
|
Mutation(() => Boolean),
|
|
74
78
|
WmsOperation({ resource: 'hold-inventory-order', action: 'release' }),
|
|
79
|
+
WmsMutationEvent({ event: 'hold-inventory-order.released' }),
|
|
75
80
|
__param(0, Args('items', { type: () => [ReleaseOrderArgs] })),
|
|
76
81
|
__metadata("design:type", Function),
|
|
77
82
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -31,6 +31,8 @@ import { CreateLoaderArgs, CreateLoadersArgs, UpdateLoaderArgs } from '../inputs
|
|
|
31
31
|
import { In } from 'typeorm';
|
|
32
32
|
import '../auth/wms-auth.guard.js';
|
|
33
33
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
34
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
35
|
+
import '../events/wms-mutation.interceptor.js';
|
|
34
36
|
|
|
35
37
|
let LoaderMutation = class LoaderMutation {
|
|
36
38
|
loaderService;
|
|
@@ -67,6 +69,7 @@ let LoaderMutation = class LoaderMutation {
|
|
|
67
69
|
__decorate([
|
|
68
70
|
Mutation(() => [LoaderDto]),
|
|
69
71
|
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
72
|
+
WmsMutationEvent({ event: 'loader.created' }),
|
|
70
73
|
__param(0, Args()),
|
|
71
74
|
__metadata("design:type", Function),
|
|
72
75
|
__metadata("design:paramtypes", [CreateLoaderArgs]),
|
|
@@ -75,6 +78,7 @@ __decorate([
|
|
|
75
78
|
__decorate([
|
|
76
79
|
Mutation(() => [LoaderDto]),
|
|
77
80
|
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
81
|
+
WmsMutationEvent({ event: 'loader.batch-created' }),
|
|
78
82
|
__param(0, Args('items', { type: () => [CreateLoadersArgs] })),
|
|
79
83
|
__metadata("design:type", Function),
|
|
80
84
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -83,6 +87,7 @@ __decorate([
|
|
|
83
87
|
__decorate([
|
|
84
88
|
Mutation(() => LoaderDto),
|
|
85
89
|
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
90
|
+
WmsMutationEvent({ event: 'loader.updated' }),
|
|
86
91
|
__param(0, Args()),
|
|
87
92
|
__metadata("design:type", Function),
|
|
88
93
|
__metadata("design:paramtypes", [UpdateLoaderArgs]),
|
|
@@ -91,6 +96,7 @@ __decorate([
|
|
|
91
96
|
__decorate([
|
|
92
97
|
Mutation(() => LoaderTypeDto),
|
|
93
98
|
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
99
|
+
WmsMutationEvent({ event: 'loader.type-created' }),
|
|
94
100
|
__param(0, Args()),
|
|
95
101
|
__metadata("design:type", Function),
|
|
96
102
|
__metadata("design:paramtypes", [CreateLoaderTypeArgs]),
|
|
@@ -99,6 +105,7 @@ __decorate([
|
|
|
99
105
|
__decorate([
|
|
100
106
|
Mutation(() => LoaderTypeDto),
|
|
101
107
|
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
108
|
+
WmsMutationEvent({ event: 'loader.type-updated' }),
|
|
102
109
|
__param(0, Args()),
|
|
103
110
|
__metadata("design:type", Function),
|
|
104
111
|
__metadata("design:paramtypes", [UpdateLoaderTypeArgs]),
|
|
@@ -6,6 +6,8 @@ import { LocationDto } from '../dto/location.dto.js';
|
|
|
6
6
|
import { CreateLocationArgs, UpdateLocationArgs } from '../inputs/create-location.args.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let LocationMutation = class LocationMutation {
|
|
11
13
|
locationService;
|
|
@@ -22,6 +24,7 @@ let LocationMutation = class LocationMutation {
|
|
|
22
24
|
__decorate([
|
|
23
25
|
Mutation(() => LocationDto),
|
|
24
26
|
WmsOperation({ resource: 'location', action: 'create' }),
|
|
27
|
+
WmsMutationEvent({ event: 'location.created' }),
|
|
25
28
|
__param(0, Args()),
|
|
26
29
|
__metadata("design:type", Function),
|
|
27
30
|
__metadata("design:paramtypes", [CreateLocationArgs]),
|
|
@@ -30,6 +33,7 @@ __decorate([
|
|
|
30
33
|
__decorate([
|
|
31
34
|
Mutation(() => LocationDto),
|
|
32
35
|
WmsOperation({ resource: 'location', action: 'update' }),
|
|
36
|
+
WmsMutationEvent({ event: 'location.updated' }),
|
|
33
37
|
__param(0, Args()),
|
|
34
38
|
__metadata("design:type", Function),
|
|
35
39
|
__metadata("design:paramtypes", [UpdateLocationArgs]),
|
|
@@ -29,6 +29,8 @@ import { CreateMaterialArgs, UpdateMaterialArgs } from '../inputs/create-materia
|
|
|
29
29
|
import { MaterialService } from '@rytass/wms-module-core';
|
|
30
30
|
import '../auth/wms-auth.guard.js';
|
|
31
31
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
32
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
33
|
+
import '../events/wms-mutation.interceptor.js';
|
|
32
34
|
|
|
33
35
|
let MaterialMutation = class MaterialMutation {
|
|
34
36
|
materialService;
|
|
@@ -45,6 +47,7 @@ let MaterialMutation = class MaterialMutation {
|
|
|
45
47
|
__decorate([
|
|
46
48
|
Mutation(() => MaterialDto),
|
|
47
49
|
WmsOperation({ resource: 'material', action: 'create' }),
|
|
50
|
+
WmsMutationEvent({ event: 'material.created' }),
|
|
48
51
|
__param(0, Args()),
|
|
49
52
|
__metadata("design:type", Function),
|
|
50
53
|
__metadata("design:paramtypes", [CreateMaterialArgs]),
|
|
@@ -53,6 +56,7 @@ __decorate([
|
|
|
53
56
|
__decorate([
|
|
54
57
|
Mutation(() => MaterialDto),
|
|
55
58
|
WmsOperation({ resource: 'material', action: 'update' }),
|
|
59
|
+
WmsMutationEvent({ event: 'material.updated' }),
|
|
56
60
|
__param(0, Args()),
|
|
57
61
|
__metadata("design:type", Function),
|
|
58
62
|
__metadata("design:paramtypes", [UpdateMaterialArgs]),
|
|
@@ -6,6 +6,8 @@ import { MergeBatchArgs } from '../inputs/merge-batch.args.js';
|
|
|
6
6
|
import { MergeBatchOrderDto } from '../dto/merge-batch-order.dto.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let MergeBatchMutation = class MergeBatchMutation {
|
|
11
13
|
stockService;
|
|
@@ -32,6 +34,7 @@ let MergeBatchMutation = class MergeBatchMutation {
|
|
|
32
34
|
__decorate([
|
|
33
35
|
Mutation(() => MergeBatchOrderDto),
|
|
34
36
|
WmsOperation({ resource: 'batch', action: 'merge' }),
|
|
37
|
+
WmsMutationEvent({ event: 'batch.merged' }),
|
|
35
38
|
__param(0, Args()),
|
|
36
39
|
__metadata("design:type", Function),
|
|
37
40
|
__metadata("design:paramtypes", [MergeBatchArgs]),
|
|
@@ -6,6 +6,8 @@ import { QualityInspectionOrderDto } from '../dto/quality-inspection-order.dto.j
|
|
|
6
6
|
import { CreateQualityInspectionOrderArgs } from '../inputs/create-quality-inspection-order.args.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let QualityInspectionOrderMutation = class QualityInspectionOrderMutation {
|
|
11
13
|
qualityInspectionOrderService;
|
|
@@ -33,6 +35,7 @@ let QualityInspectionOrderMutation = class QualityInspectionOrderMutation {
|
|
|
33
35
|
__decorate([
|
|
34
36
|
Mutation(() => QualityInspectionOrderDto),
|
|
35
37
|
WmsOperation({ resource: 'quality-inspection-order', action: 'inspect' }),
|
|
38
|
+
WmsMutationEvent({ event: 'quality-inspection-order.inspected' }),
|
|
36
39
|
__param(0, Args()),
|
|
37
40
|
__metadata("design:type", Function),
|
|
38
41
|
__metadata("design:paramtypes", [CreateQualityInspectionOrderArgs]),
|
|
@@ -31,6 +31,8 @@ import { DataSource } from 'typeorm';
|
|
|
31
31
|
import { ReceiveOrderArgs } from '../inputs/receive-order.args.js';
|
|
32
32
|
import '../auth/wms-auth.guard.js';
|
|
33
33
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
34
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
35
|
+
import '../events/wms-mutation.interceptor.js';
|
|
34
36
|
|
|
35
37
|
let ReceiveInventoryOrderMutation = class ReceiveInventoryOrderMutation {
|
|
36
38
|
dataSource;
|
|
@@ -67,6 +69,7 @@ let ReceiveInventoryOrderMutation = class ReceiveInventoryOrderMutation {
|
|
|
67
69
|
__decorate([
|
|
68
70
|
Mutation(() => ReceiveInventoryOrderDto),
|
|
69
71
|
WmsOperation({ resource: 'receive-inventory-order', action: 'create' }),
|
|
72
|
+
WmsMutationEvent({ event: 'receive-inventory-order.created' }),
|
|
70
73
|
__param(0, Args()),
|
|
71
74
|
__metadata("design:type", Function),
|
|
72
75
|
__metadata("design:paramtypes", [CreateReceiveInventoryOrderArgs]),
|
|
@@ -75,6 +78,7 @@ __decorate([
|
|
|
75
78
|
__decorate([
|
|
76
79
|
Mutation(() => ReceiveInventoryOrderDto),
|
|
77
80
|
WmsOperation({ resource: 'receive-inventory-order', action: 'update' }),
|
|
81
|
+
WmsMutationEvent({ event: 'receive-inventory-order.updated' }),
|
|
78
82
|
__param(0, Args()),
|
|
79
83
|
__metadata("design:type", Function),
|
|
80
84
|
__metadata("design:paramtypes", [UpdateReceiveInventoryOrderArgs]),
|
|
@@ -83,6 +87,7 @@ __decorate([
|
|
|
83
87
|
__decorate([
|
|
84
88
|
Mutation(() => Boolean),
|
|
85
89
|
WmsOperation({ resource: 'receive-inventory-order', action: 'receive' }),
|
|
90
|
+
WmsMutationEvent({ event: 'receive-inventory-order.received' }),
|
|
86
91
|
__param(0, Args('items', { type: () => [ReceiveOrderArgs] })),
|
|
87
92
|
__metadata("design:type", Function),
|
|
88
93
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -6,6 +6,8 @@ import { ReclassifyInventoryOrderArgs } from '../inputs/reclassify-inventory-ord
|
|
|
6
6
|
import { ReclassifyInventoryOrderDto } from '../dto/reclassify-inventory-order.dto.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let ReclassifyInventoryOrderMutation = class ReclassifyInventoryOrderMutation {
|
|
11
13
|
stockService;
|
|
@@ -33,6 +35,7 @@ let ReclassifyInventoryOrderMutation = class ReclassifyInventoryOrderMutation {
|
|
|
33
35
|
__decorate([
|
|
34
36
|
Mutation(() => ReclassifyInventoryOrderDto),
|
|
35
37
|
WmsOperation({ resource: 'reclassify-inventory-order', action: 'reclassify' }),
|
|
38
|
+
WmsMutationEvent({ event: 'reclassify-inventory-order.reclassified' }),
|
|
36
39
|
__param(0, Args()),
|
|
37
40
|
__metadata("design:type", Function),
|
|
38
41
|
__metadata("design:paramtypes", [ReclassifyInventoryOrderArgs]),
|
|
@@ -6,6 +6,8 @@ import { ScrapeOrderDto } from '../dto/scrape-order.dto.js';
|
|
|
6
6
|
import { ScrapeOrderArgs } from '../inputs/scrape-order.args.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let ScrapeMutation = class ScrapeMutation {
|
|
11
13
|
scrapeService;
|
|
@@ -27,6 +29,7 @@ let ScrapeMutation = class ScrapeMutation {
|
|
|
27
29
|
__decorate([
|
|
28
30
|
Mutation(() => ScrapeOrderDto),
|
|
29
31
|
WmsOperation({ resource: 'scrape-order', action: 'scrape' }),
|
|
32
|
+
WmsMutationEvent({ event: 'scrape-order.scraped' }),
|
|
30
33
|
__param(0, Args()),
|
|
31
34
|
__metadata("design:type", Function),
|
|
32
35
|
__metadata("design:paramtypes", [ScrapeOrderArgs]),
|
|
@@ -31,6 +31,8 @@ import { ShipOrderArgs } from '../inputs/ship-order.args.js';
|
|
|
31
31
|
import { CancelShipOrderArgs } from '../inputs/cancel-ship-order.args.js';
|
|
32
32
|
import '../auth/wms-auth.guard.js';
|
|
33
33
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
34
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
35
|
+
import '../events/wms-mutation.interceptor.js';
|
|
34
36
|
|
|
35
37
|
let ShipInventoryOrderMutation = class ShipInventoryOrderMutation {
|
|
36
38
|
shipInventoryOrderService;
|
|
@@ -75,6 +77,7 @@ let ShipInventoryOrderMutation = class ShipInventoryOrderMutation {
|
|
|
75
77
|
__decorate([
|
|
76
78
|
Mutation(() => ShipInventoryOrderDto),
|
|
77
79
|
WmsOperation({ resource: 'ship-inventory-order', action: 'create' }),
|
|
80
|
+
WmsMutationEvent({ event: 'ship-inventory-order.created' }),
|
|
78
81
|
__param(0, Args()),
|
|
79
82
|
__metadata("design:type", Function),
|
|
80
83
|
__metadata("design:paramtypes", [CreateShipInventoryOrderArgs]),
|
|
@@ -83,6 +86,7 @@ __decorate([
|
|
|
83
86
|
__decorate([
|
|
84
87
|
Mutation(() => ShipInventoryOrderDto),
|
|
85
88
|
WmsOperation({ resource: 'ship-inventory-order', action: 'update' }),
|
|
89
|
+
WmsMutationEvent({ event: 'ship-inventory-order.updated' }),
|
|
86
90
|
__param(0, Args()),
|
|
87
91
|
__metadata("design:type", Function),
|
|
88
92
|
__metadata("design:paramtypes", [UpdateShipInventoryOrderArgs]),
|
|
@@ -91,6 +95,7 @@ __decorate([
|
|
|
91
95
|
__decorate([
|
|
92
96
|
Mutation(() => Boolean),
|
|
93
97
|
WmsOperation({ resource: 'ship-inventory-order', action: 'ship' }),
|
|
98
|
+
WmsMutationEvent({ event: 'ship-inventory-order.shipped' }),
|
|
94
99
|
__param(0, Args('items', { type: () => [ShipOrderArgs] })),
|
|
95
100
|
__metadata("design:type", Function),
|
|
96
101
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -99,6 +104,7 @@ __decorate([
|
|
|
99
104
|
__decorate([
|
|
100
105
|
Mutation(() => Boolean),
|
|
101
106
|
WmsOperation({ resource: 'ship-inventory-order', action: 'cancel' }),
|
|
107
|
+
WmsMutationEvent({ event: 'ship-inventory-order.ship-cancelled' }),
|
|
102
108
|
__param(0, Args('items', { type: () => [CancelShipOrderArgs] })),
|
|
103
109
|
__metadata("design:type", Function),
|
|
104
110
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -6,6 +6,8 @@ import { SplitBatchArgs } from '../inputs/split-batch.args.js';
|
|
|
6
6
|
import { SplitBatchOrderDto } from '../dto/split-batch-order.dto.js';
|
|
7
7
|
import '../auth/wms-auth.guard.js';
|
|
8
8
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
10
|
+
import '../events/wms-mutation.interceptor.js';
|
|
9
11
|
|
|
10
12
|
let SplitBatchMutation = class SplitBatchMutation {
|
|
11
13
|
stockService;
|
|
@@ -26,6 +28,7 @@ let SplitBatchMutation = class SplitBatchMutation {
|
|
|
26
28
|
__decorate([
|
|
27
29
|
Mutation(() => SplitBatchOrderDto),
|
|
28
30
|
WmsOperation({ resource: 'batch', action: 'split' }),
|
|
31
|
+
WmsMutationEvent({ event: 'batch.splitted' }),
|
|
29
32
|
__param(0, Args()),
|
|
30
33
|
__metadata("design:type", Function),
|
|
31
34
|
__metadata("design:paramtypes", [SplitBatchArgs]),
|
|
@@ -7,6 +7,8 @@ import { CreateTransferCustomerOrderArgs, UpdateTransferCustomerOrderArgs } from
|
|
|
7
7
|
import { ReturnTransferCustomerOrderArgs } from '../inputs/return-transfer-customer-order.args.js';
|
|
8
8
|
import '../auth/wms-auth.guard.js';
|
|
9
9
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
10
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
11
|
+
import '../events/wms-mutation.interceptor.js';
|
|
10
12
|
|
|
11
13
|
let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
12
14
|
transferCustomerOrderService;
|
|
@@ -56,6 +58,7 @@ let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
|
56
58
|
__decorate([
|
|
57
59
|
Mutation(() => TransferCustomerOrderDto),
|
|
58
60
|
WmsOperation({ resource: 'transfer-customer-order', action: 'create' }),
|
|
61
|
+
WmsMutationEvent({ event: 'transfer-customer-order.created' }),
|
|
59
62
|
__param(0, Args()),
|
|
60
63
|
__metadata("design:type", Function),
|
|
61
64
|
__metadata("design:paramtypes", [CreateTransferCustomerOrderArgs]),
|
|
@@ -64,6 +67,7 @@ __decorate([
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Mutation(() => TransferCustomerOrderDto),
|
|
66
69
|
WmsOperation({ resource: 'transfer-customer-order', action: 'update' }),
|
|
70
|
+
WmsMutationEvent({ event: 'transfer-customer-order.updated' }),
|
|
67
71
|
__param(0, Args()),
|
|
68
72
|
__metadata("design:type", Function),
|
|
69
73
|
__metadata("design:paramtypes", [UpdateTransferCustomerOrderArgs]),
|
|
@@ -72,6 +76,7 @@ __decorate([
|
|
|
72
76
|
__decorate([
|
|
73
77
|
Mutation(() => Boolean),
|
|
74
78
|
WmsOperation({ resource: 'transfer-customer-order', action: 'return' }),
|
|
79
|
+
WmsMutationEvent({ event: 'transfer-customer-order.returned' }),
|
|
75
80
|
__param(0, Args('items', { type: () => [ReturnTransferCustomerOrderArgs] })),
|
|
76
81
|
__metadata("design:type", Function),
|
|
77
82
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -8,6 +8,8 @@ import { TransferOrderArgs } from '../inputs/transfer-order.args.js';
|
|
|
8
8
|
import { CancelTransferOrderArgs } from '../inputs/cancel-transfer-order.args.js';
|
|
9
9
|
import '../auth/wms-auth.guard.js';
|
|
10
10
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
11
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
12
|
+
import '../events/wms-mutation.interceptor.js';
|
|
11
13
|
|
|
12
14
|
let TransferOrderMutation = class TransferOrderMutation {
|
|
13
15
|
transferOrderService;
|
|
@@ -52,6 +54,7 @@ let TransferOrderMutation = class TransferOrderMutation {
|
|
|
52
54
|
__decorate([
|
|
53
55
|
Mutation(() => TransferOrderDto),
|
|
54
56
|
WmsOperation({ resource: 'transfer-order', action: 'create' }),
|
|
57
|
+
WmsMutationEvent({ event: 'transfer-order.created' }),
|
|
55
58
|
__param(0, Args()),
|
|
56
59
|
__metadata("design:type", Function),
|
|
57
60
|
__metadata("design:paramtypes", [CreateTransferOrderArgs]),
|
|
@@ -60,6 +63,7 @@ __decorate([
|
|
|
60
63
|
__decorate([
|
|
61
64
|
Mutation(() => TransferOrderDto),
|
|
62
65
|
WmsOperation({ resource: 'transfer-order', action: 'update' }),
|
|
66
|
+
WmsMutationEvent({ event: 'transfer-order.updated' }),
|
|
63
67
|
__param(0, Args()),
|
|
64
68
|
__metadata("design:type", Function),
|
|
65
69
|
__metadata("design:paramtypes", [UpdateTransferOrderArgs]),
|
|
@@ -68,6 +72,7 @@ __decorate([
|
|
|
68
72
|
__decorate([
|
|
69
73
|
Mutation(() => Boolean),
|
|
70
74
|
WmsOperation({ resource: 'transfer-order', action: 'transfer' }),
|
|
75
|
+
WmsMutationEvent({ event: 'transfer-order.transferred' }),
|
|
71
76
|
__param(0, Args('items', { type: () => [TransferOrderArgs] })),
|
|
72
77
|
__metadata("design:type", Function),
|
|
73
78
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -76,6 +81,7 @@ __decorate([
|
|
|
76
81
|
__decorate([
|
|
77
82
|
Mutation(() => Boolean),
|
|
78
83
|
WmsOperation({ resource: 'transfer-order', action: 'cancel' }),
|
|
84
|
+
WmsMutationEvent({ event: 'transfer-order.transfer-cancelled' }),
|
|
79
85
|
__param(0, Args('items', { type: () => [CancelTransferOrderArgs] })),
|
|
80
86
|
__metadata("design:type", Function),
|
|
81
87
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -7,6 +7,8 @@ import { CreateTransferVendorOrderArgs, UpdateTransferVendorOrderArgs } from '..
|
|
|
7
7
|
import { ReturnTransferVendorOrderArgs } from '../inputs/return-transfer-vendor-order.args.js';
|
|
8
8
|
import '../auth/wms-auth.guard.js';
|
|
9
9
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
10
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
11
|
+
import '../events/wms-mutation.interceptor.js';
|
|
10
12
|
|
|
11
13
|
let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
12
14
|
transferVendorOrderService;
|
|
@@ -56,6 +58,7 @@ let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
|
56
58
|
__decorate([
|
|
57
59
|
Mutation(() => TransferVendorOrderDto),
|
|
58
60
|
WmsOperation({ resource: 'transfer-vendor-order', action: 'create' }),
|
|
61
|
+
WmsMutationEvent({ event: 'transfer-vendor-order.created' }),
|
|
59
62
|
__param(0, Args()),
|
|
60
63
|
__metadata("design:type", Function),
|
|
61
64
|
__metadata("design:paramtypes", [CreateTransferVendorOrderArgs]),
|
|
@@ -64,6 +67,7 @@ __decorate([
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Mutation(() => TransferVendorOrderDto),
|
|
66
69
|
WmsOperation({ resource: 'transfer-vendor-order', action: 'update' }),
|
|
70
|
+
WmsMutationEvent({ event: 'transfer-vendor-order.updated' }),
|
|
67
71
|
__param(0, Args()),
|
|
68
72
|
__metadata("design:type", Function),
|
|
69
73
|
__metadata("design:paramtypes", [UpdateTransferVendorOrderArgs]),
|
|
@@ -72,6 +76,7 @@ __decorate([
|
|
|
72
76
|
__decorate([
|
|
73
77
|
Mutation(() => Boolean),
|
|
74
78
|
WmsOperation({ resource: 'transfer-vendor-order', action: 'return' }),
|
|
79
|
+
WmsMutationEvent({ event: 'transfer-vendor-order.returned' }),
|
|
75
80
|
__param(0, Args('items', { type: () => [ReturnTransferVendorOrderArgs] })),
|
|
76
81
|
__metadata("design:type", Function),
|
|
77
82
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -8,6 +8,8 @@ import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
|
8
8
|
import { In } from 'typeorm';
|
|
9
9
|
import '../auth/wms-auth.guard.js';
|
|
10
10
|
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
11
|
+
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.js';
|
|
12
|
+
import '../events/wms-mutation.interceptor.js';
|
|
11
13
|
|
|
12
14
|
let WarehouseMapMutation = class WarehouseMapMutation {
|
|
13
15
|
warehouseMapBaseService;
|
|
@@ -43,6 +45,7 @@ let WarehouseMapMutation = class WarehouseMapMutation {
|
|
|
43
45
|
__decorate([
|
|
44
46
|
Mutation(() => MapDataDto),
|
|
45
47
|
WmsOperation({ resource: 'warehouse-map', action: 'update' }),
|
|
48
|
+
WmsMutationEvent({ event: 'warehouse-map.updated' }),
|
|
46
49
|
__param(0, Args()),
|
|
47
50
|
__metadata("design:type", Function),
|
|
48
51
|
__metadata("design:paramtypes", [UpdateWarehouseMapArgs]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/wms-module-graphql",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Rytass WMS Module — GraphQL schema, resolvers and DTOs for warehouse management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rytass",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./adapters/member-base.d.ts",
|
|
33
33
|
"import": "./adapters/member-base.js"
|
|
34
34
|
},
|
|
35
|
+
"./adapters/event-emitter": {
|
|
36
|
+
"types": "./adapters/event-emitter.d.ts",
|
|
37
|
+
"import": "./adapters/event-emitter.js"
|
|
38
|
+
},
|
|
35
39
|
"./package.json": "./package.json"
|
|
36
40
|
},
|
|
37
41
|
"files": [
|
|
@@ -53,9 +57,15 @@
|
|
|
53
57
|
"@nestjs/apollo": ">=13.0.0 <13.2.0",
|
|
54
58
|
"@nestjs/common": "^11.0.0",
|
|
55
59
|
"@nestjs/graphql": "^13.0.0",
|
|
56
|
-
"@rytass/wms-module-core": "^0.
|
|
60
|
+
"@rytass/wms-module-core": "^0.2.0",
|
|
57
61
|
"graphql": "^16.0.0",
|
|
58
62
|
"reflect-metadata": "^0.1.13 || ^0.2.0",
|
|
59
|
-
"rxjs": "^7.8.0"
|
|
63
|
+
"rxjs": "^7.8.0",
|
|
64
|
+
"@nestjs/event-emitter": "^2.0.0 || ^3.0.0"
|
|
65
|
+
},
|
|
66
|
+
"peerDependenciesMeta": {
|
|
67
|
+
"@nestjs/event-emitter": {
|
|
68
|
+
"optional": true
|
|
69
|
+
}
|
|
60
70
|
}
|
|
61
71
|
}
|