@rytass/wms-module-graphql 0.2.0 → 0.4.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 +75 -29
- package/adapters/member-base.d.ts +35 -0
- package/adapters/member-base.js +47 -0
- package/docs/README.md +6 -3
- package/docs/api-reference.md +143 -11
- package/docs/authorization.md +349 -0
- package/docs/integration-guide.md +155 -84
- package/index.cjs.js +177 -6
- package/index.d.ts +2 -0
- package/index.js +4 -0
- package/lib/auth/host-skip.constant.d.ts +27 -0
- package/lib/auth/host-skip.constant.js +29 -0
- package/lib/auth/index.d.ts +4 -0
- package/lib/auth/wms-auth.guard.d.ts +19 -0
- package/lib/auth/wms-auth.guard.js +41 -0
- package/lib/auth/wms-auth.types.d.ts +36 -0
- package/lib/auth/wms-auth.types.js +6 -0
- package/lib/auth/wms-operation.decorator.d.ts +23 -0
- package/lib/auth/wms-operation.decorator.js +29 -0
- package/lib/graphql.module.d.ts +8 -1
- package/lib/graphql.module.js +12 -3
- package/lib/helpers/create-wms-loaders.d.ts +3 -1
- package/lib/helpers/create-wms-loaders.js +5 -3
- 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/lib/queries/allocate-inventory-order.query.js +3 -0
- package/lib/queries/batch.query.js +3 -0
- package/lib/queries/hold-inventory-order.query.js +3 -0
- package/lib/queries/loader.query.js +8 -0
- package/lib/queries/location.query.js +4 -0
- package/lib/queries/material.query.js +4 -0
- package/lib/queries/recieve-inventory-order.query.js +4 -0
- package/lib/queries/sale-order.query.js +4 -0
- package/lib/queries/ship-inventory-order.query.js +4 -0
- package/lib/queries/stock.query.js +7 -0
- package/lib/queries/transfer-order.query.js +4 -0
- package/lib/queries/unit.query.js +3 -0
- package/lib/queries/warehouse-map.query.js +3 -0
- package/package.json +5 -1
|
@@ -5,6 +5,8 @@ import { TransferCustomerOrderService, StockService } from '@rytass/wms-module-c
|
|
|
5
5
|
import { TransferCustomerOrderDto } from '../dto/transfer-customer-order.dto.js';
|
|
6
6
|
import { CreateTransferCustomerOrderArgs, UpdateTransferCustomerOrderArgs } from '../inputs/create-transfer-customer-order.args.js';
|
|
7
7
|
import { ReturnTransferCustomerOrderArgs } from '../inputs/return-transfer-customer-order.args.js';
|
|
8
|
+
import '../auth/wms-auth.guard.js';
|
|
9
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
8
10
|
|
|
9
11
|
let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
10
12
|
transferCustomerOrderService;
|
|
@@ -53,6 +55,7 @@ let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
|
53
55
|
};
|
|
54
56
|
__decorate([
|
|
55
57
|
Mutation(() => TransferCustomerOrderDto),
|
|
58
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'create' }),
|
|
56
59
|
__param(0, Args()),
|
|
57
60
|
__metadata("design:type", Function),
|
|
58
61
|
__metadata("design:paramtypes", [CreateTransferCustomerOrderArgs]),
|
|
@@ -60,6 +63,7 @@ __decorate([
|
|
|
60
63
|
], TransferCustomerOrderMutation.prototype, "createTransferCustomerOrder", null);
|
|
61
64
|
__decorate([
|
|
62
65
|
Mutation(() => TransferCustomerOrderDto),
|
|
66
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'update' }),
|
|
63
67
|
__param(0, Args()),
|
|
64
68
|
__metadata("design:type", Function),
|
|
65
69
|
__metadata("design:paramtypes", [UpdateTransferCustomerOrderArgs]),
|
|
@@ -67,6 +71,7 @@ __decorate([
|
|
|
67
71
|
], TransferCustomerOrderMutation.prototype, "updateTransferCustomerOrder", null);
|
|
68
72
|
__decorate([
|
|
69
73
|
Mutation(() => Boolean),
|
|
74
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'return' }),
|
|
70
75
|
__param(0, Args('items', { type: () => [ReturnTransferCustomerOrderArgs] })),
|
|
71
76
|
__metadata("design:type", Function),
|
|
72
77
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -6,6 +6,8 @@ import { TransferOrderDto } from '../dto/transfer-order.dto.js';
|
|
|
6
6
|
import { CreateTransferOrderArgs, UpdateTransferOrderArgs } from '../inputs/create-transfer-order.args.js';
|
|
7
7
|
import { TransferOrderArgs } from '../inputs/transfer-order.args.js';
|
|
8
8
|
import { CancelTransferOrderArgs } from '../inputs/cancel-transfer-order.args.js';
|
|
9
|
+
import '../auth/wms-auth.guard.js';
|
|
10
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
11
|
|
|
10
12
|
let TransferOrderMutation = class TransferOrderMutation {
|
|
11
13
|
transferOrderService;
|
|
@@ -49,6 +51,7 @@ let TransferOrderMutation = class TransferOrderMutation {
|
|
|
49
51
|
};
|
|
50
52
|
__decorate([
|
|
51
53
|
Mutation(() => TransferOrderDto),
|
|
54
|
+
WmsOperation({ resource: 'transfer-order', action: 'create' }),
|
|
52
55
|
__param(0, Args()),
|
|
53
56
|
__metadata("design:type", Function),
|
|
54
57
|
__metadata("design:paramtypes", [CreateTransferOrderArgs]),
|
|
@@ -56,6 +59,7 @@ __decorate([
|
|
|
56
59
|
], TransferOrderMutation.prototype, "createTransferOrder", null);
|
|
57
60
|
__decorate([
|
|
58
61
|
Mutation(() => TransferOrderDto),
|
|
62
|
+
WmsOperation({ resource: 'transfer-order', action: 'update' }),
|
|
59
63
|
__param(0, Args()),
|
|
60
64
|
__metadata("design:type", Function),
|
|
61
65
|
__metadata("design:paramtypes", [UpdateTransferOrderArgs]),
|
|
@@ -63,6 +67,7 @@ __decorate([
|
|
|
63
67
|
], TransferOrderMutation.prototype, "updateTransferOrder", null);
|
|
64
68
|
__decorate([
|
|
65
69
|
Mutation(() => Boolean),
|
|
70
|
+
WmsOperation({ resource: 'transfer-order', action: 'transfer' }),
|
|
66
71
|
__param(0, Args('items', { type: () => [TransferOrderArgs] })),
|
|
67
72
|
__metadata("design:type", Function),
|
|
68
73
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -70,6 +75,7 @@ __decorate([
|
|
|
70
75
|
], TransferOrderMutation.prototype, "transfer", null);
|
|
71
76
|
__decorate([
|
|
72
77
|
Mutation(() => Boolean),
|
|
78
|
+
WmsOperation({ resource: 'transfer-order', action: 'cancel' }),
|
|
73
79
|
__param(0, Args('items', { type: () => [CancelTransferOrderArgs] })),
|
|
74
80
|
__metadata("design:type", Function),
|
|
75
81
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -5,6 +5,8 @@ import { TransferVendorOrderService, StockService } from '@rytass/wms-module-cor
|
|
|
5
5
|
import { TransferVendorOrderDto } from '../dto/transfer-vendor-order.dto.js';
|
|
6
6
|
import { CreateTransferVendorOrderArgs, UpdateTransferVendorOrderArgs } from '../inputs/create-transfer-vendor-order.args.js';
|
|
7
7
|
import { ReturnTransferVendorOrderArgs } from '../inputs/return-transfer-vendor-order.args.js';
|
|
8
|
+
import '../auth/wms-auth.guard.js';
|
|
9
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
8
10
|
|
|
9
11
|
let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
10
12
|
transferVendorOrderService;
|
|
@@ -53,6 +55,7 @@ let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
|
53
55
|
};
|
|
54
56
|
__decorate([
|
|
55
57
|
Mutation(() => TransferVendorOrderDto),
|
|
58
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'create' }),
|
|
56
59
|
__param(0, Args()),
|
|
57
60
|
__metadata("design:type", Function),
|
|
58
61
|
__metadata("design:paramtypes", [CreateTransferVendorOrderArgs]),
|
|
@@ -60,6 +63,7 @@ __decorate([
|
|
|
60
63
|
], TransferVendorOrderMutation.prototype, "createTransferVendorOrder", null);
|
|
61
64
|
__decorate([
|
|
62
65
|
Mutation(() => TransferVendorOrderDto),
|
|
66
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'update' }),
|
|
63
67
|
__param(0, Args()),
|
|
64
68
|
__metadata("design:type", Function),
|
|
65
69
|
__metadata("design:paramtypes", [UpdateTransferVendorOrderArgs]),
|
|
@@ -67,6 +71,7 @@ __decorate([
|
|
|
67
71
|
], TransferVendorOrderMutation.prototype, "updateTransferVendorOrder", null);
|
|
68
72
|
__decorate([
|
|
69
73
|
Mutation(() => Boolean),
|
|
74
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'return' }),
|
|
70
75
|
__param(0, Args('items', { type: () => [ReturnTransferVendorOrderArgs] })),
|
|
71
76
|
__metadata("design:type", Function),
|
|
72
77
|
__metadata("design:paramtypes", [Array]),
|
|
@@ -6,6 +6,8 @@ import { Mutation, Args } from '@nestjs/graphql';
|
|
|
6
6
|
import { UpdateWarehouseMapArgs } from '../inputs/update-warehouse-map.args.js';
|
|
7
7
|
import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
8
8
|
import { In } from 'typeorm';
|
|
9
|
+
import '../auth/wms-auth.guard.js';
|
|
10
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
9
11
|
|
|
10
12
|
let WarehouseMapMutation = class WarehouseMapMutation {
|
|
11
13
|
warehouseMapBaseService;
|
|
@@ -40,6 +42,7 @@ let WarehouseMapMutation = class WarehouseMapMutation {
|
|
|
40
42
|
};
|
|
41
43
|
__decorate([
|
|
42
44
|
Mutation(() => MapDataDto),
|
|
45
|
+
WmsOperation({ resource: 'warehouse-map', action: 'update' }),
|
|
43
46
|
__param(0, Args()),
|
|
44
47
|
__metadata("design:type", Function),
|
|
45
48
|
__metadata("design:paramtypes", [UpdateWarehouseMapArgs]),
|
|
@@ -4,6 +4,8 @@ import { Query, Args } from '@nestjs/graphql';
|
|
|
4
4
|
import { AllocateInventoryOrders } from '../dto/allocate-inventory-order.dto.js';
|
|
5
5
|
import { AllocateInventoryOrderService } from '@rytass/wms-module-core';
|
|
6
6
|
import { FindAllocateInventoryOrderArgs } from '../inputs/find-allocate-inventory-order.args.js';
|
|
7
|
+
import '../auth/wms-auth.guard.js';
|
|
8
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
7
9
|
|
|
8
10
|
let AllocateInventoryOrderQuery = class AllocateInventoryOrderQuery {
|
|
9
11
|
allocateInventoryOrderService;
|
|
@@ -17,6 +19,7 @@ let AllocateInventoryOrderQuery = class AllocateInventoryOrderQuery {
|
|
|
17
19
|
};
|
|
18
20
|
__decorate([
|
|
19
21
|
Query(() => AllocateInventoryOrders),
|
|
22
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'read' }),
|
|
20
23
|
__param(0, Args()),
|
|
21
24
|
__metadata("design:type", Function),
|
|
22
25
|
__metadata("design:paramtypes", [FindAllocateInventoryOrderArgs]),
|
|
@@ -4,6 +4,8 @@ import { Query, Args } from '@nestjs/graphql';
|
|
|
4
4
|
import { Batches } from '../dto/batch.dto.js';
|
|
5
5
|
import { BatchService } from '@rytass/wms-module-core';
|
|
6
6
|
import { FindBatchArgs } from '../inputs/find-batch.args.js';
|
|
7
|
+
import '../auth/wms-auth.guard.js';
|
|
8
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
7
9
|
|
|
8
10
|
let BatchQuery = class BatchQuery {
|
|
9
11
|
batchService;
|
|
@@ -20,6 +22,7 @@ let BatchQuery = class BatchQuery {
|
|
|
20
22
|
};
|
|
21
23
|
__decorate([
|
|
22
24
|
Query(() => Batches),
|
|
25
|
+
WmsOperation({ resource: 'batch', action: 'read' }),
|
|
23
26
|
__param(0, Args()),
|
|
24
27
|
__metadata("design:type", Function),
|
|
25
28
|
__metadata("design:paramtypes", [FindBatchArgs]),
|
|
@@ -4,6 +4,8 @@ import { Query, Args } from '@nestjs/graphql';
|
|
|
4
4
|
import { HoldInventoryOrderService } from '@rytass/wms-module-core';
|
|
5
5
|
import { HoldInventoryOrders } from '../dto/hold-inventory-order.dto.js';
|
|
6
6
|
import { FindHoldInventoryOrderArgs } from '../inputs/find-hold-inventory-order.args.js';
|
|
7
|
+
import '../auth/wms-auth.guard.js';
|
|
8
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
7
9
|
|
|
8
10
|
let HoldInventoryOrderQuery = class HoldInventoryOrderQuery {
|
|
9
11
|
holdInventoryOrderService;
|
|
@@ -17,6 +19,7 @@ let HoldInventoryOrderQuery = class HoldInventoryOrderQuery {
|
|
|
17
19
|
};
|
|
18
20
|
__decorate([
|
|
19
21
|
Query(() => HoldInventoryOrders),
|
|
22
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'read' }),
|
|
20
23
|
__param(0, Args()),
|
|
21
24
|
__metadata("design:type", Function),
|
|
22
25
|
__metadata("design:paramtypes", [FindHoldInventoryOrderArgs]),
|
|
@@ -29,6 +29,8 @@ import '../dto/quality-inspection-order-item.dto.js';
|
|
|
29
29
|
import { FindLoaderArgs } from '../inputs/find-loader.args.js';
|
|
30
30
|
import { FindLoaderTypeArgs } from '../inputs/find-loader-type.args.js';
|
|
31
31
|
import { LoaderUnitDto, LoaderUnit } from '../dto/loader-unit.dto.js';
|
|
32
|
+
import '../auth/wms-auth.guard.js';
|
|
33
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
32
34
|
|
|
33
35
|
let LoaderQuery = class LoaderQuery {
|
|
34
36
|
loaderService;
|
|
@@ -107,6 +109,7 @@ let LoaderQuery = class LoaderQuery {
|
|
|
107
109
|
};
|
|
108
110
|
__decorate([
|
|
109
111
|
Query(() => LoaderDto),
|
|
112
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
110
113
|
__param(0, Args('id', { type: () => ID })),
|
|
111
114
|
__metadata("design:type", Function),
|
|
112
115
|
__metadata("design:paramtypes", [String]),
|
|
@@ -114,6 +117,7 @@ __decorate([
|
|
|
114
117
|
], LoaderQuery.prototype, "loader", null);
|
|
115
118
|
__decorate([
|
|
116
119
|
Query(() => Loaders),
|
|
120
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
117
121
|
__param(0, Args()),
|
|
118
122
|
__metadata("design:type", Function),
|
|
119
123
|
__metadata("design:paramtypes", [FindLoaderArgs]),
|
|
@@ -121,6 +125,7 @@ __decorate([
|
|
|
121
125
|
], LoaderQuery.prototype, "loaders", null);
|
|
122
126
|
__decorate([
|
|
123
127
|
Query(() => LoaderTypeDto),
|
|
128
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
124
129
|
__param(0, Args('id', { type: () => ID })),
|
|
125
130
|
__metadata("design:type", Function),
|
|
126
131
|
__metadata("design:paramtypes", [String]),
|
|
@@ -128,6 +133,7 @@ __decorate([
|
|
|
128
133
|
], LoaderQuery.prototype, "loaderType", null);
|
|
129
134
|
__decorate([
|
|
130
135
|
Query(() => LoaderTypes),
|
|
136
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
131
137
|
__param(0, Args()),
|
|
132
138
|
__metadata("design:type", Function),
|
|
133
139
|
__metadata("design:paramtypes", [FindLoaderTypeArgs]),
|
|
@@ -135,6 +141,7 @@ __decorate([
|
|
|
135
141
|
], LoaderQuery.prototype, "loaderTypes", null);
|
|
136
142
|
__decorate([
|
|
137
143
|
Query(() => [LoaderUnitDto]),
|
|
144
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
138
145
|
__param(0, Args('type', { type: () => LoaderUnit })),
|
|
139
146
|
__metadata("design:type", Function),
|
|
140
147
|
__metadata("design:paramtypes", [String]),
|
|
@@ -142,6 +149,7 @@ __decorate([
|
|
|
142
149
|
], LoaderQuery.prototype, "loaderUnits", null);
|
|
143
150
|
__decorate([
|
|
144
151
|
Query(() => [LoaderDto]),
|
|
152
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
145
153
|
__param(0, Args('locationId', { type: () => ID, nullable: true })),
|
|
146
154
|
__metadata("design:type", Function),
|
|
147
155
|
__metadata("design:paramtypes", [String]),
|
|
@@ -4,6 +4,8 @@ import { Query, Args, ID } from '@nestjs/graphql';
|
|
|
4
4
|
import { LocationService } from '@rytass/wms-module-core';
|
|
5
5
|
import { LocationDto, Locations } from '../dto/location.dto.js';
|
|
6
6
|
import { FindLocationArgs } from '../inputs/find-location.args.js';
|
|
7
|
+
import '../auth/wms-auth.guard.js';
|
|
8
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
7
9
|
|
|
8
10
|
let LocationQuery = class LocationQuery {
|
|
9
11
|
locationService;
|
|
@@ -27,6 +29,7 @@ let LocationQuery = class LocationQuery {
|
|
|
27
29
|
};
|
|
28
30
|
__decorate([
|
|
29
31
|
Query(() => LocationDto),
|
|
32
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
30
33
|
__param(0, Args('id', { type: () => ID })),
|
|
31
34
|
__metadata("design:type", Function),
|
|
32
35
|
__metadata("design:paramtypes", [String]),
|
|
@@ -34,6 +37,7 @@ __decorate([
|
|
|
34
37
|
], LocationQuery.prototype, "location", null);
|
|
35
38
|
__decorate([
|
|
36
39
|
Query(() => Locations),
|
|
40
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
37
41
|
__param(0, Args()),
|
|
38
42
|
__metadata("design:type", Function),
|
|
39
43
|
__metadata("design:paramtypes", [FindLocationArgs]),
|
|
@@ -27,6 +27,8 @@ import '../dto/quality-inspection-order.dto.js';
|
|
|
27
27
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
28
28
|
import { MaterialService } from '@rytass/wms-module-core';
|
|
29
29
|
import { FindMaterialArgs } from '../inputs/find-material.args.js';
|
|
30
|
+
import '../auth/wms-auth.guard.js';
|
|
31
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
30
32
|
|
|
31
33
|
let MaterialQuery = class MaterialQuery {
|
|
32
34
|
materialService;
|
|
@@ -50,6 +52,7 @@ let MaterialQuery = class MaterialQuery {
|
|
|
50
52
|
};
|
|
51
53
|
__decorate([
|
|
52
54
|
Query(() => MaterialDto),
|
|
55
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
53
56
|
__param(0, Args('id', { type: () => ID, nullable: true })),
|
|
54
57
|
__param(1, Args('key', { type: () => String, nullable: true })),
|
|
55
58
|
__metadata("design:type", Function),
|
|
@@ -58,6 +61,7 @@ __decorate([
|
|
|
58
61
|
], MaterialQuery.prototype, "material", null);
|
|
59
62
|
__decorate([
|
|
60
63
|
Query(() => Materials),
|
|
64
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
61
65
|
__param(0, Args()),
|
|
62
66
|
__metadata("design:type", Function),
|
|
63
67
|
__metadata("design:paramtypes", [FindMaterialArgs]),
|
|
@@ -27,6 +27,8 @@ import '../dto/scrape-order-item.dto.js';
|
|
|
27
27
|
import '../dto/quality-inspection-order.dto.js';
|
|
28
28
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
29
29
|
import { FindReceiveInventoryOrderArgs } from '../inputs/find-receive-inventory-order.args.js';
|
|
30
|
+
import '../auth/wms-auth.guard.js';
|
|
31
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
30
32
|
|
|
31
33
|
let ReceiveInventoryOrderQuery = class ReceiveInventoryOrderQuery {
|
|
32
34
|
receiveInventoryOrderService;
|
|
@@ -49,6 +51,7 @@ let ReceiveInventoryOrderQuery = class ReceiveInventoryOrderQuery {
|
|
|
49
51
|
};
|
|
50
52
|
__decorate([
|
|
51
53
|
Query(() => ReceiveInventoryOrderDto),
|
|
54
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
52
55
|
__param(0, Args('id', { type: () => ID })),
|
|
53
56
|
__metadata("design:type", Function),
|
|
54
57
|
__metadata("design:paramtypes", [String]),
|
|
@@ -56,6 +59,7 @@ __decorate([
|
|
|
56
59
|
], ReceiveInventoryOrderQuery.prototype, "receiveInventoryOrder", null);
|
|
57
60
|
__decorate([
|
|
58
61
|
Query(() => ReceiveInventoryOrders),
|
|
62
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
59
63
|
__param(0, Args()),
|
|
60
64
|
__metadata("design:type", Function),
|
|
61
65
|
__metadata("design:paramtypes", [FindReceiveInventoryOrderArgs]),
|
|
@@ -3,6 +3,8 @@ import { Injectable } from '@nestjs/common';
|
|
|
3
3
|
import { Query, Args, ID } from '@nestjs/graphql';
|
|
4
4
|
import { SaleOrderService } from '@rytass/wms-module-core';
|
|
5
5
|
import { FindSaleOrderArgs } from '../inputs/find-sale-order.args.js';
|
|
6
|
+
import '../auth/wms-auth.guard.js';
|
|
7
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
6
8
|
|
|
7
9
|
let SaleOrderQuery = class SaleOrderQuery {
|
|
8
10
|
saleOrderService;
|
|
@@ -33,6 +35,7 @@ let SaleOrderQuery = class SaleOrderQuery {
|
|
|
33
35
|
};
|
|
34
36
|
__decorate([
|
|
35
37
|
Query(() => [String]),
|
|
38
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
36
39
|
__param(0, Args()),
|
|
37
40
|
__metadata("design:type", Function),
|
|
38
41
|
__metadata("design:paramtypes", [FindSaleOrderArgs]),
|
|
@@ -40,6 +43,7 @@ __decorate([
|
|
|
40
43
|
], SaleOrderQuery.prototype, "saleOrderDistinctIds", null);
|
|
41
44
|
__decorate([
|
|
42
45
|
Query(() => [String]),
|
|
46
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
43
47
|
__param(0, Args('id', { type: () => ID })),
|
|
44
48
|
__metadata("design:type", Function),
|
|
45
49
|
__metadata("design:paramtypes", [String]),
|
|
@@ -27,6 +27,8 @@ import '../dto/scrape-order-item.dto.js';
|
|
|
27
27
|
import '../dto/quality-inspection-order.dto.js';
|
|
28
28
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
29
29
|
import { FindShipInventoryOrderArgs } from '../inputs/find-ship-inventory-order.args.js';
|
|
30
|
+
import '../auth/wms-auth.guard.js';
|
|
31
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
30
32
|
|
|
31
33
|
let ShipInventoryOrderQuery = class ShipInventoryOrderQuery {
|
|
32
34
|
shipInventoryOrderService;
|
|
@@ -49,6 +51,7 @@ let ShipInventoryOrderQuery = class ShipInventoryOrderQuery {
|
|
|
49
51
|
};
|
|
50
52
|
__decorate([
|
|
51
53
|
Query(() => ShipInventoryOrderDto),
|
|
54
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
52
55
|
__param(0, Args('id', { type: () => ID })),
|
|
53
56
|
__metadata("design:type", Function),
|
|
54
57
|
__metadata("design:paramtypes", [String]),
|
|
@@ -56,6 +59,7 @@ __decorate([
|
|
|
56
59
|
], ShipInventoryOrderQuery.prototype, "shipInventoryOrder", null);
|
|
57
60
|
__decorate([
|
|
58
61
|
Query(() => ShipInventoryOrders),
|
|
62
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
59
63
|
__param(0, Args()),
|
|
60
64
|
__metadata("design:type", Function),
|
|
61
65
|
__metadata("design:paramtypes", [FindShipInventoryOrderArgs]),
|
|
@@ -27,6 +27,8 @@ import '../dto/scrape-order-item.dto.js';
|
|
|
27
27
|
import '../dto/quality-inspection-order.dto.js';
|
|
28
28
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
29
29
|
import { FindStockArgs } from '../inputs/find-stock.args.js';
|
|
30
|
+
import '../auth/wms-auth.guard.js';
|
|
31
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
30
32
|
|
|
31
33
|
let StockQuery = class StockQuery {
|
|
32
34
|
stockService;
|
|
@@ -68,6 +70,7 @@ let StockQuery = class StockQuery {
|
|
|
68
70
|
};
|
|
69
71
|
__decorate([
|
|
70
72
|
Query(() => StockDto),
|
|
73
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
71
74
|
__param(0, Args('id', { type: () => ID })),
|
|
72
75
|
__metadata("design:type", Function),
|
|
73
76
|
__metadata("design:paramtypes", [String]),
|
|
@@ -75,6 +78,7 @@ __decorate([
|
|
|
75
78
|
], StockQuery.prototype, "stock", null);
|
|
76
79
|
__decorate([
|
|
77
80
|
Query(() => Stocks),
|
|
81
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
78
82
|
__param(0, Args()),
|
|
79
83
|
__metadata("design:type", Function),
|
|
80
84
|
__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -82,6 +86,7 @@ __decorate([
|
|
|
82
86
|
], StockQuery.prototype, "stocks", null);
|
|
83
87
|
__decorate([
|
|
84
88
|
Query(() => Materials),
|
|
89
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
85
90
|
__param(0, Args()),
|
|
86
91
|
__metadata("design:type", Function),
|
|
87
92
|
__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -89,6 +94,7 @@ __decorate([
|
|
|
89
94
|
], StockQuery.prototype, "stocksGroupedByMaterial", null);
|
|
90
95
|
__decorate([
|
|
91
96
|
Query(() => AggregatedStocks),
|
|
97
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
92
98
|
__param(0, Args()),
|
|
93
99
|
__metadata("design:type", Function),
|
|
94
100
|
__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -96,6 +102,7 @@ __decorate([
|
|
|
96
102
|
], StockQuery.prototype, "aggregatedStocks", null);
|
|
97
103
|
__decorate([
|
|
98
104
|
Query(() => ChangeLogs),
|
|
105
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
99
106
|
__param(0, Args()),
|
|
100
107
|
__metadata("design:type", Function),
|
|
101
108
|
__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -4,6 +4,8 @@ import { Query, Args, ID } from '@nestjs/graphql';
|
|
|
4
4
|
import { TransferOrderService } from '@rytass/wms-module-core';
|
|
5
5
|
import { TransferOrders, TransferOrderDto } from '../dto/transfer-order.dto.js';
|
|
6
6
|
import { FindTransferOrderArgs } from '../inputs/find-transfer-order.args.js';
|
|
7
|
+
import '../auth/wms-auth.guard.js';
|
|
8
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
7
9
|
|
|
8
10
|
let TransferOrderQuery = class TransferOrderQuery {
|
|
9
11
|
transferOrderService;
|
|
@@ -22,6 +24,7 @@ let TransferOrderQuery = class TransferOrderQuery {
|
|
|
22
24
|
};
|
|
23
25
|
__decorate([
|
|
24
26
|
Query(() => TransferOrders),
|
|
27
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
25
28
|
__param(0, Args()),
|
|
26
29
|
__metadata("design:type", Function),
|
|
27
30
|
__metadata("design:paramtypes", [FindTransferOrderArgs]),
|
|
@@ -29,6 +32,7 @@ __decorate([
|
|
|
29
32
|
], TransferOrderQuery.prototype, "transferOrders", null);
|
|
30
33
|
__decorate([
|
|
31
34
|
Query(() => TransferOrderDto),
|
|
35
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
32
36
|
__param(0, Args('id', { type: () => ID })),
|
|
33
37
|
__metadata("design:type", Function),
|
|
34
38
|
__metadata("design:paramtypes", [String]),
|
|
@@ -3,6 +3,8 @@ import { Injectable } from '@nestjs/common';
|
|
|
3
3
|
import { UnitDto } from '../dto/unit.dto.js';
|
|
4
4
|
import { Query } from '@nestjs/graphql';
|
|
5
5
|
import { UnitService } from '@rytass/wms-module-core';
|
|
6
|
+
import '../auth/wms-auth.guard.js';
|
|
7
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
6
8
|
|
|
7
9
|
let UnitQuery = class UnitQuery {
|
|
8
10
|
unitService;
|
|
@@ -15,6 +17,7 @@ let UnitQuery = class UnitQuery {
|
|
|
15
17
|
};
|
|
16
18
|
__decorate([
|
|
17
19
|
Query(() => [UnitDto]),
|
|
20
|
+
WmsOperation({ resource: 'unit', action: 'read' }),
|
|
18
21
|
__metadata("design:type", Function),
|
|
19
22
|
__metadata("design:paramtypes", []),
|
|
20
23
|
__metadata("design:returntype", Promise)
|
|
@@ -3,6 +3,8 @@ import { Injectable } from '@nestjs/common';
|
|
|
3
3
|
import { Query, Args } from '@nestjs/graphql';
|
|
4
4
|
import { MapDataDto } from '../dto/warehouse-map.dto.js';
|
|
5
5
|
import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
6
|
+
import '../auth/wms-auth.guard.js';
|
|
7
|
+
import { WmsOperation } from '../auth/wms-operation.decorator.js';
|
|
6
8
|
|
|
7
9
|
let WarehouseMapDataQuery = class WarehouseMapDataQuery {
|
|
8
10
|
warehouseMapDataService;
|
|
@@ -16,6 +18,7 @@ let WarehouseMapDataQuery = class WarehouseMapDataQuery {
|
|
|
16
18
|
};
|
|
17
19
|
__decorate([
|
|
18
20
|
Query(() => MapDataDto),
|
|
21
|
+
WmsOperation({ resource: 'warehouse-map', action: 'read' }),
|
|
19
22
|
__param(0, Args('key')),
|
|
20
23
|
__metadata("design:type", Function),
|
|
21
24
|
__metadata("design:paramtypes", [String]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/wms-module-graphql",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Rytass WMS Module — GraphQL schema, resolvers and DTOs for warehouse management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rytass",
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
"require": "./index.cjs.js",
|
|
29
29
|
"import": "./index.js"
|
|
30
30
|
},
|
|
31
|
+
"./adapters/member-base": {
|
|
32
|
+
"types": "./adapters/member-base.d.ts",
|
|
33
|
+
"import": "./adapters/member-base.js"
|
|
34
|
+
},
|
|
31
35
|
"./package.json": "./package.json"
|
|
32
36
|
},
|
|
33
37
|
"files": [
|