@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
package/index.cjs.js
CHANGED
|
@@ -9,6 +9,7 @@ var lruCache = require('lru-cache');
|
|
|
9
9
|
var typeorm = require('typeorm');
|
|
10
10
|
var DataLoader = require('dataloader');
|
|
11
11
|
var graphql = require('@nestjs/graphql');
|
|
12
|
+
var core = require('@nestjs/core');
|
|
12
13
|
var wmsBaseNestjsModule = require('@rytass/wms-base-nestjs-module');
|
|
13
14
|
var warehouseMap_entity = require('@rytass/wms-base-nestjs-module/models/warehouse-map.entity');
|
|
14
15
|
|
|
@@ -204,12 +205,105 @@ common.createParamDecorator((data, context) => {
|
|
|
204
205
|
|
|
205
206
|
function createWmsLoaders(loaderService) {
|
|
206
207
|
return {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
loaders: {
|
|
209
|
+
batchSingle: loaderService.batchEntity(),
|
|
210
|
+
batchMany: loaderService.batchEntities(),
|
|
211
|
+
batchManyWithPagination: loaderService.batchEntitiesWithPagination(),
|
|
212
|
+
},
|
|
210
213
|
};
|
|
211
214
|
}
|
|
212
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Metadata key stamped on every `@WmsOperation` handler so that a host
|
|
218
|
+
* application's *globally registered* auth guard (`APP_GUARD`) treats WMS
|
|
219
|
+
* resolvers as "skip / public" and defers the real authorization decision to
|
|
220
|
+
* {@link WmsAuthGuard}.
|
|
221
|
+
*
|
|
222
|
+
* Why this exists
|
|
223
|
+
* ---------------
|
|
224
|
+
* A deny-by-default global guard — e.g. the `CasbinGuard` from
|
|
225
|
+
* `@rytass/member-base-nestjs-module` — blankets every resolver in the compiled
|
|
226
|
+
* schema, including the ones this library owns. WMS resolvers carry no
|
|
227
|
+
* host-specific permission metadata, so such a guard rejects them all. By
|
|
228
|
+
* stamping this key WMS tells the host guard "let me through", and then runs
|
|
229
|
+
* its own {@link WmsAuthGuard} (wired to the consumer's `authChecker`) to do the
|
|
230
|
+
* actual enforcement.
|
|
231
|
+
*
|
|
232
|
+
* The single coupling point
|
|
233
|
+
* -------------------------
|
|
234
|
+
* The default value matches `@rytass/member-base-nestjs-module`'s
|
|
235
|
+
* `IS_ROUTE_PUBLIC` metadata key. This is the *one and only* place WMS assumes
|
|
236
|
+
* anything about a specific host guard. If your host guard uses a different
|
|
237
|
+
* "public / skip" metadata key, fork this constant — nothing else changes.
|
|
238
|
+
*
|
|
239
|
+
* If you do not register a global guard at all (or set
|
|
240
|
+
* `enableGlobalGuard: false`), this marker is simply inert.
|
|
241
|
+
*/
|
|
242
|
+
const HOST_SKIP_METADATA_KEY = 'IS_ROUTE_PUBLIC';
|
|
243
|
+
|
|
244
|
+
/** DI token holding the resolved {@link WmsAuthModuleOptions}. */
|
|
245
|
+
const WMS_AUTH_OPTIONS = Symbol('WMS_AUTH_OPTIONS');
|
|
246
|
+
/** Reflector metadata key carrying the {@link WmsOperationRequirement}. */
|
|
247
|
+
const WMS_OPERATION_METADATA = 'wms:operation';
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Route-level guard applied automatically by `@WmsOperation`. It reads the
|
|
251
|
+
* requirement declared on the handler and delegates the allow/deny decision to
|
|
252
|
+
* the consumer-supplied {@link WmsAuthModuleOptions.authChecker}.
|
|
253
|
+
*
|
|
254
|
+
* It is deliberately permissive in two cases:
|
|
255
|
+
* - the handler carries no requirement (field resolvers reached only through an
|
|
256
|
+
* already-authorized root operation), and
|
|
257
|
+
* - no `authChecker` was configured (local dev / auth handled elsewhere).
|
|
258
|
+
*/
|
|
259
|
+
exports.WmsAuthGuard = class WmsAuthGuard {
|
|
260
|
+
reflector;
|
|
261
|
+
options;
|
|
262
|
+
constructor(reflector, options) {
|
|
263
|
+
this.reflector = reflector;
|
|
264
|
+
this.options = options;
|
|
265
|
+
}
|
|
266
|
+
canActivate(context) {
|
|
267
|
+
const requirement = this.reflector.get(WMS_OPERATION_METADATA, context.getHandler());
|
|
268
|
+
if (!requirement) {
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
const { authChecker } = this.options;
|
|
272
|
+
if (!authChecker) {
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
return authChecker(context, requirement);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
exports.WmsAuthGuard = tslib.__decorate([
|
|
279
|
+
common.Injectable(),
|
|
280
|
+
tslib.__param(1, common.Inject(WMS_AUTH_OPTIONS)),
|
|
281
|
+
tslib.__metadata("design:paramtypes", [core.Reflector, Object])
|
|
282
|
+
], exports.WmsAuthGuard);
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Declares the permission requirement for a WMS root operation and wires up its
|
|
286
|
+
* enforcement. Apply it to every `@Query` / `@Mutation` the library exposes.
|
|
287
|
+
*
|
|
288
|
+
* It bundles three concerns so a single annotation keeps a resolver
|
|
289
|
+
* self-protecting and host-friendly:
|
|
290
|
+
*
|
|
291
|
+
* 1. {@link WMS_OPERATION_METADATA} — the host-neutral `{ resource, action }`
|
|
292
|
+
* that {@link WmsAuthGuard} hands to the consumer's `authChecker`.
|
|
293
|
+
* 2. {@link HOST_SKIP_METADATA_KEY} — tells a host's global guard to defer (see
|
|
294
|
+
* that constant for the single coupling point with member-base).
|
|
295
|
+
* 3. `@UseGuards(WmsAuthGuard)` — the route-level guard that performs the real
|
|
296
|
+
* authorization through the configured `authChecker`.
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```ts
|
|
300
|
+
* @Query(() => MaterialDto)
|
|
301
|
+
* @WmsOperation({ resource: 'material', action: 'read' })
|
|
302
|
+
* material(@Args('id') id: string): Promise<MaterialDto> { ... }
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
const WmsOperation = (requirement) => common.applyDecorators(common.SetMetadata(WMS_OPERATION_METADATA, requirement), common.SetMetadata(HOST_SKIP_METADATA_KEY, true), common.UseGuards(exports.WmsAuthGuard));
|
|
306
|
+
|
|
213
307
|
const IdGenFunction = (input) => {
|
|
214
308
|
const hash = crypto.createHash('sha256');
|
|
215
309
|
hash.update(input);
|
|
@@ -1538,6 +1632,7 @@ let LoaderMutation = class LoaderMutation {
|
|
|
1538
1632
|
};
|
|
1539
1633
|
tslib.__decorate([
|
|
1540
1634
|
graphql.Mutation(() => [LoaderDto]),
|
|
1635
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1541
1636
|
tslib.__param(0, graphql.Args()),
|
|
1542
1637
|
tslib.__metadata("design:type", Function),
|
|
1543
1638
|
tslib.__metadata("design:paramtypes", [CreateLoaderArgs]),
|
|
@@ -1545,6 +1640,7 @@ tslib.__decorate([
|
|
|
1545
1640
|
], LoaderMutation.prototype, "createLoader", null);
|
|
1546
1641
|
tslib.__decorate([
|
|
1547
1642
|
graphql.Mutation(() => [LoaderDto]),
|
|
1643
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1548
1644
|
tslib.__param(0, graphql.Args('items', { type: () => [CreateLoadersArgs] })),
|
|
1549
1645
|
tslib.__metadata("design:type", Function),
|
|
1550
1646
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -1552,6 +1648,7 @@ tslib.__decorate([
|
|
|
1552
1648
|
], LoaderMutation.prototype, "createBatchLoader", null);
|
|
1553
1649
|
tslib.__decorate([
|
|
1554
1650
|
graphql.Mutation(() => LoaderDto),
|
|
1651
|
+
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
1555
1652
|
tslib.__param(0, graphql.Args()),
|
|
1556
1653
|
tslib.__metadata("design:type", Function),
|
|
1557
1654
|
tslib.__metadata("design:paramtypes", [UpdateLoaderArgs]),
|
|
@@ -1559,6 +1656,7 @@ tslib.__decorate([
|
|
|
1559
1656
|
], LoaderMutation.prototype, "updateLoader", null);
|
|
1560
1657
|
tslib.__decorate([
|
|
1561
1658
|
graphql.Mutation(() => LoaderTypeDto),
|
|
1659
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1562
1660
|
tslib.__param(0, graphql.Args()),
|
|
1563
1661
|
tslib.__metadata("design:type", Function),
|
|
1564
1662
|
tslib.__metadata("design:paramtypes", [CreateLoaderTypeArgs]),
|
|
@@ -1566,6 +1664,7 @@ tslib.__decorate([
|
|
|
1566
1664
|
], LoaderMutation.prototype, "createLoaderType", null);
|
|
1567
1665
|
tslib.__decorate([
|
|
1568
1666
|
graphql.Mutation(() => LoaderTypeDto),
|
|
1667
|
+
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
1569
1668
|
tslib.__param(0, graphql.Args()),
|
|
1570
1669
|
tslib.__metadata("design:type", Function),
|
|
1571
1670
|
tslib.__metadata("design:paramtypes", [UpdateLoaderTypeArgs]),
|
|
@@ -1794,6 +1893,7 @@ let LoaderQuery = class LoaderQuery {
|
|
|
1794
1893
|
};
|
|
1795
1894
|
tslib.__decorate([
|
|
1796
1895
|
graphql.Query(() => LoaderDto),
|
|
1896
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1797
1897
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
1798
1898
|
tslib.__metadata("design:type", Function),
|
|
1799
1899
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1801,6 +1901,7 @@ tslib.__decorate([
|
|
|
1801
1901
|
], LoaderQuery.prototype, "loader", null);
|
|
1802
1902
|
tslib.__decorate([
|
|
1803
1903
|
graphql.Query(() => Loaders),
|
|
1904
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1804
1905
|
tslib.__param(0, graphql.Args()),
|
|
1805
1906
|
tslib.__metadata("design:type", Function),
|
|
1806
1907
|
tslib.__metadata("design:paramtypes", [FindLoaderArgs]),
|
|
@@ -1808,6 +1909,7 @@ tslib.__decorate([
|
|
|
1808
1909
|
], LoaderQuery.prototype, "loaders", null);
|
|
1809
1910
|
tslib.__decorate([
|
|
1810
1911
|
graphql.Query(() => LoaderTypeDto),
|
|
1912
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1811
1913
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
1812
1914
|
tslib.__metadata("design:type", Function),
|
|
1813
1915
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1815,6 +1917,7 @@ tslib.__decorate([
|
|
|
1815
1917
|
], LoaderQuery.prototype, "loaderType", null);
|
|
1816
1918
|
tslib.__decorate([
|
|
1817
1919
|
graphql.Query(() => LoaderTypes),
|
|
1920
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1818
1921
|
tslib.__param(0, graphql.Args()),
|
|
1819
1922
|
tslib.__metadata("design:type", Function),
|
|
1820
1923
|
tslib.__metadata("design:paramtypes", [FindLoaderTypeArgs]),
|
|
@@ -1822,6 +1925,7 @@ tslib.__decorate([
|
|
|
1822
1925
|
], LoaderQuery.prototype, "loaderTypes", null);
|
|
1823
1926
|
tslib.__decorate([
|
|
1824
1927
|
graphql.Query(() => [LoaderUnitDto]),
|
|
1928
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1825
1929
|
tslib.__param(0, graphql.Args('type', { type: () => LoaderUnit })),
|
|
1826
1930
|
tslib.__metadata("design:type", Function),
|
|
1827
1931
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1829,6 +1933,7 @@ tslib.__decorate([
|
|
|
1829
1933
|
], LoaderQuery.prototype, "loaderUnits", null);
|
|
1830
1934
|
tslib.__decorate([
|
|
1831
1935
|
graphql.Query(() => [LoaderDto]),
|
|
1936
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1832
1937
|
tslib.__param(0, graphql.Args('locationId', { type: () => graphql.ID, nullable: true })),
|
|
1833
1938
|
tslib.__metadata("design:type", Function),
|
|
1834
1939
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1922,6 +2027,7 @@ let MaterialMutation = class MaterialMutation {
|
|
|
1922
2027
|
};
|
|
1923
2028
|
tslib.__decorate([
|
|
1924
2029
|
graphql.Mutation(() => MaterialDto),
|
|
2030
|
+
WmsOperation({ resource: 'material', action: 'create' }),
|
|
1925
2031
|
tslib.__param(0, graphql.Args()),
|
|
1926
2032
|
tslib.__metadata("design:type", Function),
|
|
1927
2033
|
tslib.__metadata("design:paramtypes", [CreateMaterialArgs]),
|
|
@@ -1929,6 +2035,7 @@ tslib.__decorate([
|
|
|
1929
2035
|
], MaterialMutation.prototype, "createMaterial", null);
|
|
1930
2036
|
tslib.__decorate([
|
|
1931
2037
|
graphql.Mutation(() => MaterialDto),
|
|
2038
|
+
WmsOperation({ resource: 'material', action: 'update' }),
|
|
1932
2039
|
tslib.__param(0, graphql.Args()),
|
|
1933
2040
|
tslib.__metadata("design:type", Function),
|
|
1934
2041
|
tslib.__metadata("design:paramtypes", [UpdateMaterialArgs]),
|
|
@@ -1977,6 +2084,7 @@ let MaterialQuery = class MaterialQuery {
|
|
|
1977
2084
|
};
|
|
1978
2085
|
tslib.__decorate([
|
|
1979
2086
|
graphql.Query(() => MaterialDto),
|
|
2087
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
1980
2088
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID, nullable: true })),
|
|
1981
2089
|
tslib.__param(1, graphql.Args('key', { type: () => String, nullable: true })),
|
|
1982
2090
|
tslib.__metadata("design:type", Function),
|
|
@@ -1985,6 +2093,7 @@ tslib.__decorate([
|
|
|
1985
2093
|
], MaterialQuery.prototype, "material", null);
|
|
1986
2094
|
tslib.__decorate([
|
|
1987
2095
|
graphql.Query(() => Materials),
|
|
2096
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
1988
2097
|
tslib.__param(0, graphql.Args()),
|
|
1989
2098
|
tslib.__metadata("design:type", Function),
|
|
1990
2099
|
tslib.__metadata("design:paramtypes", [FindMaterialArgs]),
|
|
@@ -2096,6 +2205,7 @@ let StockQuery = class StockQuery {
|
|
|
2096
2205
|
};
|
|
2097
2206
|
tslib.__decorate([
|
|
2098
2207
|
graphql.Query(() => StockDto),
|
|
2208
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2099
2209
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2100
2210
|
tslib.__metadata("design:type", Function),
|
|
2101
2211
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2103,6 +2213,7 @@ tslib.__decorate([
|
|
|
2103
2213
|
], StockQuery.prototype, "stock", null);
|
|
2104
2214
|
tslib.__decorate([
|
|
2105
2215
|
graphql.Query(() => Stocks),
|
|
2216
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2106
2217
|
tslib.__param(0, graphql.Args()),
|
|
2107
2218
|
tslib.__metadata("design:type", Function),
|
|
2108
2219
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2110,6 +2221,7 @@ tslib.__decorate([
|
|
|
2110
2221
|
], StockQuery.prototype, "stocks", null);
|
|
2111
2222
|
tslib.__decorate([
|
|
2112
2223
|
graphql.Query(() => Materials),
|
|
2224
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2113
2225
|
tslib.__param(0, graphql.Args()),
|
|
2114
2226
|
tslib.__metadata("design:type", Function),
|
|
2115
2227
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2117,6 +2229,7 @@ tslib.__decorate([
|
|
|
2117
2229
|
], StockQuery.prototype, "stocksGroupedByMaterial", null);
|
|
2118
2230
|
tslib.__decorate([
|
|
2119
2231
|
graphql.Query(() => AggregatedStocks),
|
|
2232
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2120
2233
|
tslib.__param(0, graphql.Args()),
|
|
2121
2234
|
tslib.__metadata("design:type", Function),
|
|
2122
2235
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2124,6 +2237,7 @@ tslib.__decorate([
|
|
|
2124
2237
|
], StockQuery.prototype, "aggregatedStocks", null);
|
|
2125
2238
|
tslib.__decorate([
|
|
2126
2239
|
graphql.Query(() => ChangeLogs),
|
|
2240
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2127
2241
|
tslib.__param(0, graphql.Args()),
|
|
2128
2242
|
tslib.__metadata("design:type", Function),
|
|
2129
2243
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2316,6 +2430,7 @@ let ReceiveInventoryOrderMutation = class ReceiveInventoryOrderMutation {
|
|
|
2316
2430
|
};
|
|
2317
2431
|
tslib.__decorate([
|
|
2318
2432
|
graphql.Mutation(() => ReceiveInventoryOrderDto),
|
|
2433
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'create' }),
|
|
2319
2434
|
tslib.__param(0, graphql.Args()),
|
|
2320
2435
|
tslib.__metadata("design:type", Function),
|
|
2321
2436
|
tslib.__metadata("design:paramtypes", [CreateReceiveInventoryOrderArgs]),
|
|
@@ -2323,6 +2438,7 @@ tslib.__decorate([
|
|
|
2323
2438
|
], ReceiveInventoryOrderMutation.prototype, "createReceiveInventoryOrder", null);
|
|
2324
2439
|
tslib.__decorate([
|
|
2325
2440
|
graphql.Mutation(() => ReceiveInventoryOrderDto),
|
|
2441
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'update' }),
|
|
2326
2442
|
tslib.__param(0, graphql.Args()),
|
|
2327
2443
|
tslib.__metadata("design:type", Function),
|
|
2328
2444
|
tslib.__metadata("design:paramtypes", [UpdateReceiveInventoryOrderArgs]),
|
|
@@ -2330,6 +2446,7 @@ tslib.__decorate([
|
|
|
2330
2446
|
], ReceiveInventoryOrderMutation.prototype, "updateReceiveInventoryOrder", null);
|
|
2331
2447
|
tslib.__decorate([
|
|
2332
2448
|
graphql.Mutation(() => Boolean),
|
|
2449
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'receive' }),
|
|
2333
2450
|
tslib.__param(0, graphql.Args('items', { type: () => [ReceiveOrderArgs] })),
|
|
2334
2451
|
tslib.__metadata("design:type", Function),
|
|
2335
2452
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2426,6 +2543,7 @@ let ReceiveInventoryOrderQuery = class ReceiveInventoryOrderQuery {
|
|
|
2426
2543
|
};
|
|
2427
2544
|
tslib.__decorate([
|
|
2428
2545
|
graphql.Query(() => ReceiveInventoryOrderDto),
|
|
2546
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
2429
2547
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2430
2548
|
tslib.__metadata("design:type", Function),
|
|
2431
2549
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2433,6 +2551,7 @@ tslib.__decorate([
|
|
|
2433
2551
|
], ReceiveInventoryOrderQuery.prototype, "receiveInventoryOrder", null);
|
|
2434
2552
|
tslib.__decorate([
|
|
2435
2553
|
graphql.Query(() => ReceiveInventoryOrders),
|
|
2554
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
2436
2555
|
tslib.__param(0, graphql.Args()),
|
|
2437
2556
|
tslib.__metadata("design:type", Function),
|
|
2438
2557
|
tslib.__metadata("design:paramtypes", [FindReceiveInventoryOrderArgs]),
|
|
@@ -2670,6 +2789,7 @@ let ShipInventoryOrderMutation = class ShipInventoryOrderMutation {
|
|
|
2670
2789
|
};
|
|
2671
2790
|
tslib.__decorate([
|
|
2672
2791
|
graphql.Mutation(() => ShipInventoryOrderDto),
|
|
2792
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'create' }),
|
|
2673
2793
|
tslib.__param(0, graphql.Args()),
|
|
2674
2794
|
tslib.__metadata("design:type", Function),
|
|
2675
2795
|
tslib.__metadata("design:paramtypes", [CreateShipInventoryOrderArgs]),
|
|
@@ -2677,6 +2797,7 @@ tslib.__decorate([
|
|
|
2677
2797
|
], ShipInventoryOrderMutation.prototype, "createShipInventoryOrder", null);
|
|
2678
2798
|
tslib.__decorate([
|
|
2679
2799
|
graphql.Mutation(() => ShipInventoryOrderDto),
|
|
2800
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'update' }),
|
|
2680
2801
|
tslib.__param(0, graphql.Args()),
|
|
2681
2802
|
tslib.__metadata("design:type", Function),
|
|
2682
2803
|
tslib.__metadata("design:paramtypes", [UpdateShipInventoryOrderArgs]),
|
|
@@ -2684,6 +2805,7 @@ tslib.__decorate([
|
|
|
2684
2805
|
], ShipInventoryOrderMutation.prototype, "updateShipInventoryOrder", null);
|
|
2685
2806
|
tslib.__decorate([
|
|
2686
2807
|
graphql.Mutation(() => Boolean),
|
|
2808
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'ship' }),
|
|
2687
2809
|
tslib.__param(0, graphql.Args('items', { type: () => [ShipOrderArgs] })),
|
|
2688
2810
|
tslib.__metadata("design:type", Function),
|
|
2689
2811
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2691,6 +2813,7 @@ tslib.__decorate([
|
|
|
2691
2813
|
], ShipInventoryOrderMutation.prototype, "ship", null);
|
|
2692
2814
|
tslib.__decorate([
|
|
2693
2815
|
graphql.Mutation(() => Boolean),
|
|
2816
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'cancel' }),
|
|
2694
2817
|
tslib.__param(0, graphql.Args('items', { type: () => [CancelShipOrderArgs] })),
|
|
2695
2818
|
tslib.__metadata("design:type", Function),
|
|
2696
2819
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2787,6 +2910,7 @@ let ShipInventoryOrderQuery = class ShipInventoryOrderQuery {
|
|
|
2787
2910
|
};
|
|
2788
2911
|
tslib.__decorate([
|
|
2789
2912
|
graphql.Query(() => ShipInventoryOrderDto),
|
|
2913
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
2790
2914
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2791
2915
|
tslib.__metadata("design:type", Function),
|
|
2792
2916
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2794,6 +2918,7 @@ tslib.__decorate([
|
|
|
2794
2918
|
], ShipInventoryOrderQuery.prototype, "shipInventoryOrder", null);
|
|
2795
2919
|
tslib.__decorate([
|
|
2796
2920
|
graphql.Query(() => ShipInventoryOrders),
|
|
2921
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
2797
2922
|
tslib.__param(0, graphql.Args()),
|
|
2798
2923
|
tslib.__metadata("design:type", Function),
|
|
2799
2924
|
tslib.__metadata("design:paramtypes", [FindShipInventoryOrderArgs]),
|
|
@@ -3343,6 +3468,7 @@ let WarehouseMapMutation = class WarehouseMapMutation {
|
|
|
3343
3468
|
};
|
|
3344
3469
|
tslib.__decorate([
|
|
3345
3470
|
graphql.Mutation(() => MapDataDto),
|
|
3471
|
+
WmsOperation({ resource: 'warehouse-map', action: 'update' }),
|
|
3346
3472
|
tslib.__param(0, graphql.Args()),
|
|
3347
3473
|
tslib.__metadata("design:type", Function),
|
|
3348
3474
|
tslib.__metadata("design:paramtypes", [UpdateWarehouseMapArgs]),
|
|
@@ -3444,6 +3570,7 @@ let LocationQuery = class LocationQuery {
|
|
|
3444
3570
|
};
|
|
3445
3571
|
tslib.__decorate([
|
|
3446
3572
|
graphql.Query(() => LocationDto),
|
|
3573
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
3447
3574
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
3448
3575
|
tslib.__metadata("design:type", Function),
|
|
3449
3576
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -3451,6 +3578,7 @@ tslib.__decorate([
|
|
|
3451
3578
|
], LocationQuery.prototype, "location", null);
|
|
3452
3579
|
tslib.__decorate([
|
|
3453
3580
|
graphql.Query(() => Locations),
|
|
3581
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
3454
3582
|
tslib.__param(0, graphql.Args()),
|
|
3455
3583
|
tslib.__metadata("design:type", Function),
|
|
3456
3584
|
tslib.__metadata("design:paramtypes", [FindLocationArgs]),
|
|
@@ -3521,6 +3649,7 @@ let LocationMutation = class LocationMutation {
|
|
|
3521
3649
|
};
|
|
3522
3650
|
tslib.__decorate([
|
|
3523
3651
|
graphql.Mutation(() => LocationDto),
|
|
3652
|
+
WmsOperation({ resource: 'location', action: 'create' }),
|
|
3524
3653
|
tslib.__param(0, graphql.Args()),
|
|
3525
3654
|
tslib.__metadata("design:type", Function),
|
|
3526
3655
|
tslib.__metadata("design:paramtypes", [CreateLocationArgs]),
|
|
@@ -3528,6 +3657,7 @@ tslib.__decorate([
|
|
|
3528
3657
|
], LocationMutation.prototype, "createLocation", null);
|
|
3529
3658
|
tslib.__decorate([
|
|
3530
3659
|
graphql.Mutation(() => LocationDto),
|
|
3660
|
+
WmsOperation({ resource: 'location', action: 'update' }),
|
|
3531
3661
|
tslib.__param(0, graphql.Args()),
|
|
3532
3662
|
tslib.__metadata("design:type", Function),
|
|
3533
3663
|
tslib.__metadata("design:paramtypes", [UpdateLocationArgs]),
|
|
@@ -3570,6 +3700,7 @@ let UnitQuery = class UnitQuery {
|
|
|
3570
3700
|
};
|
|
3571
3701
|
tslib.__decorate([
|
|
3572
3702
|
graphql.Query(() => [UnitDto]),
|
|
3703
|
+
WmsOperation({ resource: 'unit', action: 'read' }),
|
|
3573
3704
|
tslib.__metadata("design:type", Function),
|
|
3574
3705
|
tslib.__metadata("design:paramtypes", []),
|
|
3575
3706
|
tslib.__metadata("design:returntype", Promise)
|
|
@@ -3829,6 +3960,7 @@ let TransferOrderMutation = class TransferOrderMutation {
|
|
|
3829
3960
|
};
|
|
3830
3961
|
tslib.__decorate([
|
|
3831
3962
|
graphql.Mutation(() => TransferOrderDto),
|
|
3963
|
+
WmsOperation({ resource: 'transfer-order', action: 'create' }),
|
|
3832
3964
|
tslib.__param(0, graphql.Args()),
|
|
3833
3965
|
tslib.__metadata("design:type", Function),
|
|
3834
3966
|
tslib.__metadata("design:paramtypes", [CreateTransferOrderArgs]),
|
|
@@ -3836,6 +3968,7 @@ tslib.__decorate([
|
|
|
3836
3968
|
], TransferOrderMutation.prototype, "createTransferOrder", null);
|
|
3837
3969
|
tslib.__decorate([
|
|
3838
3970
|
graphql.Mutation(() => TransferOrderDto),
|
|
3971
|
+
WmsOperation({ resource: 'transfer-order', action: 'update' }),
|
|
3839
3972
|
tslib.__param(0, graphql.Args()),
|
|
3840
3973
|
tslib.__metadata("design:type", Function),
|
|
3841
3974
|
tslib.__metadata("design:paramtypes", [UpdateTransferOrderArgs]),
|
|
@@ -3843,6 +3976,7 @@ tslib.__decorate([
|
|
|
3843
3976
|
], TransferOrderMutation.prototype, "updateTransferOrder", null);
|
|
3844
3977
|
tslib.__decorate([
|
|
3845
3978
|
graphql.Mutation(() => Boolean),
|
|
3979
|
+
WmsOperation({ resource: 'transfer-order', action: 'transfer' }),
|
|
3846
3980
|
tslib.__param(0, graphql.Args('items', { type: () => [TransferOrderArgs] })),
|
|
3847
3981
|
tslib.__metadata("design:type", Function),
|
|
3848
3982
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -3850,6 +3984,7 @@ tslib.__decorate([
|
|
|
3850
3984
|
], TransferOrderMutation.prototype, "transfer", null);
|
|
3851
3985
|
tslib.__decorate([
|
|
3852
3986
|
graphql.Mutation(() => Boolean),
|
|
3987
|
+
WmsOperation({ resource: 'transfer-order', action: 'cancel' }),
|
|
3853
3988
|
tslib.__param(0, graphql.Args('items', { type: () => [CancelTransferOrderArgs] })),
|
|
3854
3989
|
tslib.__metadata("design:type", Function),
|
|
3855
3990
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -3954,6 +4089,7 @@ let TransferOrderQuery = class TransferOrderQuery {
|
|
|
3954
4089
|
};
|
|
3955
4090
|
tslib.__decorate([
|
|
3956
4091
|
graphql.Query(() => TransferOrders),
|
|
4092
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
3957
4093
|
tslib.__param(0, graphql.Args()),
|
|
3958
4094
|
tslib.__metadata("design:type", Function),
|
|
3959
4095
|
tslib.__metadata("design:paramtypes", [FindTransferOrderArgs]),
|
|
@@ -3961,6 +4097,7 @@ tslib.__decorate([
|
|
|
3961
4097
|
], TransferOrderQuery.prototype, "transferOrders", null);
|
|
3962
4098
|
tslib.__decorate([
|
|
3963
4099
|
graphql.Query(() => TransferOrderDto),
|
|
4100
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
3964
4101
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
3965
4102
|
tslib.__metadata("design:type", Function),
|
|
3966
4103
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -4298,6 +4435,7 @@ let HoldInventoryOrderMutation = class HoldInventoryOrderMutation {
|
|
|
4298
4435
|
};
|
|
4299
4436
|
tslib.__decorate([
|
|
4300
4437
|
graphql.Mutation(() => HoldInventoryOrderDto),
|
|
4438
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'create' }),
|
|
4301
4439
|
tslib.__param(0, graphql.Args()),
|
|
4302
4440
|
tslib.__metadata("design:type", Function),
|
|
4303
4441
|
tslib.__metadata("design:paramtypes", [CreateHoldInventoryOrderArgs]),
|
|
@@ -4305,6 +4443,7 @@ tslib.__decorate([
|
|
|
4305
4443
|
], HoldInventoryOrderMutation.prototype, "createHoldInventoryOrder", null);
|
|
4306
4444
|
tslib.__decorate([
|
|
4307
4445
|
graphql.Mutation(() => HoldInventoryOrderDto),
|
|
4446
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'update' }),
|
|
4308
4447
|
tslib.__param(0, graphql.Args()),
|
|
4309
4448
|
tslib.__metadata("design:type", Function),
|
|
4310
4449
|
tslib.__metadata("design:paramtypes", [UpdateHoldInventoryOrderArgs]),
|
|
@@ -4312,6 +4451,7 @@ tslib.__decorate([
|
|
|
4312
4451
|
], HoldInventoryOrderMutation.prototype, "updateHoldInventoryOrder", null);
|
|
4313
4452
|
tslib.__decorate([
|
|
4314
4453
|
graphql.Mutation(() => Boolean),
|
|
4454
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'release' }),
|
|
4315
4455
|
tslib.__param(0, graphql.Args('items', { type: () => [ReleaseOrderArgs] })),
|
|
4316
4456
|
tslib.__metadata("design:type", Function),
|
|
4317
4457
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -4371,6 +4511,7 @@ let HoldInventoryOrderQuery = class HoldInventoryOrderQuery {
|
|
|
4371
4511
|
};
|
|
4372
4512
|
tslib.__decorate([
|
|
4373
4513
|
graphql.Query(() => HoldInventoryOrders),
|
|
4514
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'read' }),
|
|
4374
4515
|
tslib.__param(0, graphql.Args()),
|
|
4375
4516
|
tslib.__metadata("design:type", Function),
|
|
4376
4517
|
tslib.__metadata("design:paramtypes", [FindHoldInventoryOrderArgs]),
|
|
@@ -4432,6 +4573,7 @@ let BatchQuery = class BatchQuery {
|
|
|
4432
4573
|
};
|
|
4433
4574
|
tslib.__decorate([
|
|
4434
4575
|
graphql.Query(() => Batches),
|
|
4576
|
+
WmsOperation({ resource: 'batch', action: 'read' }),
|
|
4435
4577
|
tslib.__param(0, graphql.Args()),
|
|
4436
4578
|
tslib.__metadata("design:type", Function),
|
|
4437
4579
|
tslib.__metadata("design:paramtypes", [FindBatchArgs]),
|
|
@@ -4651,6 +4793,7 @@ let AllocateInventoryOrderQuery = class AllocateInventoryOrderQuery {
|
|
|
4651
4793
|
};
|
|
4652
4794
|
tslib.__decorate([
|
|
4653
4795
|
graphql.Query(() => AllocateInventoryOrders),
|
|
4796
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'read' }),
|
|
4654
4797
|
tslib.__param(0, graphql.Args()),
|
|
4655
4798
|
tslib.__metadata("design:type", Function),
|
|
4656
4799
|
tslib.__metadata("design:paramtypes", [FindAllocateInventoryOrderArgs]),
|
|
@@ -4826,6 +4969,7 @@ let AllocateInventoryOrderMutation = class AllocateInventoryOrderMutation {
|
|
|
4826
4969
|
};
|
|
4827
4970
|
tslib.__decorate([
|
|
4828
4971
|
graphql.Mutation(() => AllocateInventoryOrderDto),
|
|
4972
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'create' }),
|
|
4829
4973
|
tslib.__param(0, graphql.Args()),
|
|
4830
4974
|
tslib.__metadata("design:type", Function),
|
|
4831
4975
|
tslib.__metadata("design:paramtypes", [CreateAllocateInventoryOrderArgs]),
|
|
@@ -4833,6 +4977,7 @@ tslib.__decorate([
|
|
|
4833
4977
|
], AllocateInventoryOrderMutation.prototype, "createAllocateInventoryOrder", null);
|
|
4834
4978
|
tslib.__decorate([
|
|
4835
4979
|
graphql.Mutation(() => AllocateInventoryOrderDto),
|
|
4980
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'update' }),
|
|
4836
4981
|
tslib.__param(0, graphql.Args()),
|
|
4837
4982
|
tslib.__metadata("design:type", Function),
|
|
4838
4983
|
tslib.__metadata("design:paramtypes", [UpdateAllocateInventoryOrderArgs]),
|
|
@@ -4840,6 +4985,7 @@ tslib.__decorate([
|
|
|
4840
4985
|
], AllocateInventoryOrderMutation.prototype, "updateAllocateInventoryOrder", null);
|
|
4841
4986
|
tslib.__decorate([
|
|
4842
4987
|
graphql.Mutation(() => Boolean),
|
|
4988
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'deallocate' }),
|
|
4843
4989
|
tslib.__param(0, graphql.Args('items', { type: () => [DeallocateOrderArgs] })),
|
|
4844
4990
|
tslib.__metadata("design:type", Function),
|
|
4845
4991
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -5176,6 +5322,7 @@ let SaleOrderQuery = class SaleOrderQuery {
|
|
|
5176
5322
|
};
|
|
5177
5323
|
tslib.__decorate([
|
|
5178
5324
|
graphql.Query(() => [String]),
|
|
5325
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
5179
5326
|
tslib.__param(0, graphql.Args()),
|
|
5180
5327
|
tslib.__metadata("design:type", Function),
|
|
5181
5328
|
tslib.__metadata("design:paramtypes", [FindSaleOrderArgs]),
|
|
@@ -5183,6 +5330,7 @@ tslib.__decorate([
|
|
|
5183
5330
|
], SaleOrderQuery.prototype, "saleOrderDistinctIds", null);
|
|
5184
5331
|
tslib.__decorate([
|
|
5185
5332
|
graphql.Query(() => [String]),
|
|
5333
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
5186
5334
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
5187
5335
|
tslib.__metadata("design:type", Function),
|
|
5188
5336
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -5293,6 +5441,7 @@ let SplitBatchMutation = class SplitBatchMutation {
|
|
|
5293
5441
|
};
|
|
5294
5442
|
tslib.__decorate([
|
|
5295
5443
|
graphql.Mutation(() => SplitBatchOrderDto),
|
|
5444
|
+
WmsOperation({ resource: 'batch', action: 'split' }),
|
|
5296
5445
|
tslib.__param(0, graphql.Args()),
|
|
5297
5446
|
tslib.__metadata("design:type", Function),
|
|
5298
5447
|
tslib.__metadata("design:paramtypes", [SplitBatchArgs]),
|
|
@@ -5411,6 +5560,7 @@ let MergeBatchMutation = class MergeBatchMutation {
|
|
|
5411
5560
|
};
|
|
5412
5561
|
tslib.__decorate([
|
|
5413
5562
|
graphql.Mutation(() => MergeBatchOrderDto),
|
|
5563
|
+
WmsOperation({ resource: 'batch', action: 'merge' }),
|
|
5414
5564
|
tslib.__param(0, graphql.Args()),
|
|
5415
5565
|
tslib.__metadata("design:type", Function),
|
|
5416
5566
|
tslib.__metadata("design:paramtypes", [MergeBatchArgs]),
|
|
@@ -5535,6 +5685,7 @@ let ReclassifyInventoryOrderMutation = class ReclassifyInventoryOrderMutation {
|
|
|
5535
5685
|
};
|
|
5536
5686
|
tslib.__decorate([
|
|
5537
5687
|
graphql.Mutation(() => ReclassifyInventoryOrderDto),
|
|
5688
|
+
WmsOperation({ resource: 'reclassify-inventory-order', action: 'reclassify' }),
|
|
5538
5689
|
tslib.__param(0, graphql.Args()),
|
|
5539
5690
|
tslib.__metadata("design:type", Function),
|
|
5540
5691
|
tslib.__metadata("design:paramtypes", [ReclassifyInventoryOrderArgs]),
|
|
@@ -5707,6 +5858,7 @@ let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
|
5707
5858
|
};
|
|
5708
5859
|
tslib.__decorate([
|
|
5709
5860
|
graphql.Mutation(() => TransferCustomerOrderDto),
|
|
5861
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'create' }),
|
|
5710
5862
|
tslib.__param(0, graphql.Args()),
|
|
5711
5863
|
tslib.__metadata("design:type", Function),
|
|
5712
5864
|
tslib.__metadata("design:paramtypes", [CreateTransferCustomerOrderArgs]),
|
|
@@ -5714,6 +5866,7 @@ tslib.__decorate([
|
|
|
5714
5866
|
], TransferCustomerOrderMutation.prototype, "createTransferCustomerOrder", null);
|
|
5715
5867
|
tslib.__decorate([
|
|
5716
5868
|
graphql.Mutation(() => TransferCustomerOrderDto),
|
|
5869
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'update' }),
|
|
5717
5870
|
tslib.__param(0, graphql.Args()),
|
|
5718
5871
|
tslib.__metadata("design:type", Function),
|
|
5719
5872
|
tslib.__metadata("design:paramtypes", [UpdateTransferCustomerOrderArgs]),
|
|
@@ -5721,6 +5874,7 @@ tslib.__decorate([
|
|
|
5721
5874
|
], TransferCustomerOrderMutation.prototype, "updateTransferCustomerOrder", null);
|
|
5722
5875
|
tslib.__decorate([
|
|
5723
5876
|
graphql.Mutation(() => Boolean),
|
|
5877
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'return' }),
|
|
5724
5878
|
tslib.__param(0, graphql.Args('items', { type: () => [ReturnTransferCustomerOrderArgs] })),
|
|
5725
5879
|
tslib.__metadata("design:type", Function),
|
|
5726
5880
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -5912,6 +6066,7 @@ let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
|
5912
6066
|
};
|
|
5913
6067
|
tslib.__decorate([
|
|
5914
6068
|
graphql.Mutation(() => TransferVendorOrderDto),
|
|
6069
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'create' }),
|
|
5915
6070
|
tslib.__param(0, graphql.Args()),
|
|
5916
6071
|
tslib.__metadata("design:type", Function),
|
|
5917
6072
|
tslib.__metadata("design:paramtypes", [CreateTransferVendorOrderArgs]),
|
|
@@ -5919,6 +6074,7 @@ tslib.__decorate([
|
|
|
5919
6074
|
], TransferVendorOrderMutation.prototype, "createTransferVendorOrder", null);
|
|
5920
6075
|
tslib.__decorate([
|
|
5921
6076
|
graphql.Mutation(() => TransferVendorOrderDto),
|
|
6077
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'update' }),
|
|
5922
6078
|
tslib.__param(0, graphql.Args()),
|
|
5923
6079
|
tslib.__metadata("design:type", Function),
|
|
5924
6080
|
tslib.__metadata("design:paramtypes", [UpdateTransferVendorOrderArgs]),
|
|
@@ -5926,6 +6082,7 @@ tslib.__decorate([
|
|
|
5926
6082
|
], TransferVendorOrderMutation.prototype, "updateTransferVendorOrder", null);
|
|
5927
6083
|
tslib.__decorate([
|
|
5928
6084
|
graphql.Mutation(() => Boolean),
|
|
6085
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'return' }),
|
|
5929
6086
|
tslib.__param(0, graphql.Args('items', { type: () => [ReturnTransferVendorOrderArgs] })),
|
|
5930
6087
|
tslib.__metadata("design:type", Function),
|
|
5931
6088
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -6047,6 +6204,7 @@ let ScrapeMutation = class ScrapeMutation {
|
|
|
6047
6204
|
};
|
|
6048
6205
|
tslib.__decorate([
|
|
6049
6206
|
graphql.Mutation(() => ScrapeOrderDto),
|
|
6207
|
+
WmsOperation({ resource: 'scrape-order', action: 'scrape' }),
|
|
6050
6208
|
tslib.__param(0, graphql.Args()),
|
|
6051
6209
|
tslib.__metadata("design:type", Function),
|
|
6052
6210
|
tslib.__metadata("design:paramtypes", [ScrapeOrderArgs]),
|
|
@@ -6129,6 +6287,7 @@ let QualityInspectionOrderMutation = class QualityInspectionOrderMutation {
|
|
|
6129
6287
|
};
|
|
6130
6288
|
tslib.__decorate([
|
|
6131
6289
|
graphql.Mutation(() => QualityInspectionOrderDto),
|
|
6290
|
+
WmsOperation({ resource: 'quality-inspection-order', action: 'inspect' }),
|
|
6132
6291
|
tslib.__param(0, graphql.Args()),
|
|
6133
6292
|
tslib.__metadata("design:type", Function),
|
|
6134
6293
|
tslib.__metadata("design:paramtypes", [CreateQualityInspectionOrderArgs]),
|
|
@@ -6152,6 +6311,7 @@ let WarehouseMapDataQuery = class WarehouseMapDataQuery {
|
|
|
6152
6311
|
};
|
|
6153
6312
|
tslib.__decorate([
|
|
6154
6313
|
graphql.Query(() => MapDataDto),
|
|
6314
|
+
WmsOperation({ resource: 'warehouse-map', action: 'read' }),
|
|
6155
6315
|
tslib.__param(0, graphql.Args('key')),
|
|
6156
6316
|
tslib.__metadata("design:type", Function),
|
|
6157
6317
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -6241,12 +6401,19 @@ const exportDependencies = [
|
|
|
6241
6401
|
];
|
|
6242
6402
|
exports.WmsModuleGraphqlModule = WmsModuleGraphqlModule_1 = class WmsModuleGraphqlModule {
|
|
6243
6403
|
static forRootAsync(options) {
|
|
6244
|
-
const
|
|
6404
|
+
const { authChecker, ...coreOptions } = options;
|
|
6405
|
+
const coreModule = wmsModuleCore.WmsModuleCoreModule.forRootAsync(coreOptions);
|
|
6406
|
+
const authOptions = { authChecker };
|
|
6407
|
+
const providers = [
|
|
6408
|
+
...exportDependencies,
|
|
6409
|
+
exports.WmsAuthGuard,
|
|
6410
|
+
{ provide: WMS_AUTH_OPTIONS, useValue: authOptions },
|
|
6411
|
+
];
|
|
6245
6412
|
return {
|
|
6246
6413
|
module: WmsModuleGraphqlModule_1,
|
|
6247
6414
|
imports: [coreModule, HelperModule],
|
|
6248
|
-
providers
|
|
6249
|
-
exports: [...exportDependencies, HelperModule, coreModule],
|
|
6415
|
+
providers,
|
|
6416
|
+
exports: [...exportDependencies, exports.WmsAuthGuard, HelperModule, coreModule],
|
|
6250
6417
|
};
|
|
6251
6418
|
}
|
|
6252
6419
|
};
|
|
@@ -6256,4 +6423,8 @@ exports.WmsModuleGraphqlModule = WmsModuleGraphqlModule_1 = tslib.__decorate([
|
|
|
6256
6423
|
})
|
|
6257
6424
|
], exports.WmsModuleGraphqlModule);
|
|
6258
6425
|
|
|
6426
|
+
exports.HOST_SKIP_METADATA_KEY = HOST_SKIP_METADATA_KEY;
|
|
6427
|
+
exports.WMS_AUTH_OPTIONS = WMS_AUTH_OPTIONS;
|
|
6428
|
+
exports.WMS_OPERATION_METADATA = WMS_OPERATION_METADATA;
|
|
6429
|
+
exports.WmsOperation = WmsOperation;
|
|
6259
6430
|
exports.createWmsLoaders = createWmsLoaders;
|
package/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { LoaderService } from './lib/helpers/loader.service';
|
|
|
3
3
|
export type { LoaderOptions, LoaderOptionsWithPagination, } from './lib/helpers/loader.service';
|
|
4
4
|
export type { LoaderType } from './lib/helpers/dataloader.type';
|
|
5
5
|
export { createWmsLoaders, type WmsLoaders, } from './lib/helpers/create-wms-loaders';
|
|
6
|
+
export { HOST_SKIP_METADATA_KEY, WmsAuthGuard, WmsOperation, WMS_AUTH_OPTIONS, WMS_OPERATION_METADATA, type WmsAuthChecker, type WmsAuthModuleOptions, type WmsOperationRequirement, } from './lib/auth';
|
|
7
|
+
export type { WmsModuleGraphqlModuleAsyncOptions } from './lib/graphql.module';
|
package/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { WmsModuleGraphqlModule } from './lib/graphql.module.js';
|
|
2
2
|
export { LoaderService } from './lib/helpers/loader.service.js';
|
|
3
3
|
export { createWmsLoaders } from './lib/helpers/create-wms-loaders.js';
|
|
4
|
+
export { HOST_SKIP_METADATA_KEY } from './lib/auth/host-skip.constant.js';
|
|
5
|
+
export { WmsAuthGuard } from './lib/auth/wms-auth.guard.js';
|
|
6
|
+
export { WmsOperation } from './lib/auth/wms-operation.decorator.js';
|
|
7
|
+
export { WMS_AUTH_OPTIONS, WMS_OPERATION_METADATA } from './lib/auth/wms-auth.types.js';
|