@rytass/wms-module-graphql 0.3.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 +28 -0
- package/adapters/member-base.d.ts +35 -0
- package/adapters/member-base.js +47 -0
- package/docs/README.md +3 -0
- package/docs/api-reference.md +60 -1
- package/docs/authorization.md +349 -0
- package/docs/integration-guide.md +38 -2
- package/index.cjs.js +172 -3
- 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/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
|
|
|
@@ -212,6 +213,97 @@ function createWmsLoaders(loaderService) {
|
|
|
212
213
|
};
|
|
213
214
|
}
|
|
214
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
|
+
|
|
215
307
|
const IdGenFunction = (input) => {
|
|
216
308
|
const hash = crypto.createHash('sha256');
|
|
217
309
|
hash.update(input);
|
|
@@ -1540,6 +1632,7 @@ let LoaderMutation = class LoaderMutation {
|
|
|
1540
1632
|
};
|
|
1541
1633
|
tslib.__decorate([
|
|
1542
1634
|
graphql.Mutation(() => [LoaderDto]),
|
|
1635
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1543
1636
|
tslib.__param(0, graphql.Args()),
|
|
1544
1637
|
tslib.__metadata("design:type", Function),
|
|
1545
1638
|
tslib.__metadata("design:paramtypes", [CreateLoaderArgs]),
|
|
@@ -1547,6 +1640,7 @@ tslib.__decorate([
|
|
|
1547
1640
|
], LoaderMutation.prototype, "createLoader", null);
|
|
1548
1641
|
tslib.__decorate([
|
|
1549
1642
|
graphql.Mutation(() => [LoaderDto]),
|
|
1643
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1550
1644
|
tslib.__param(0, graphql.Args('items', { type: () => [CreateLoadersArgs] })),
|
|
1551
1645
|
tslib.__metadata("design:type", Function),
|
|
1552
1646
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -1554,6 +1648,7 @@ tslib.__decorate([
|
|
|
1554
1648
|
], LoaderMutation.prototype, "createBatchLoader", null);
|
|
1555
1649
|
tslib.__decorate([
|
|
1556
1650
|
graphql.Mutation(() => LoaderDto),
|
|
1651
|
+
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
1557
1652
|
tslib.__param(0, graphql.Args()),
|
|
1558
1653
|
tslib.__metadata("design:type", Function),
|
|
1559
1654
|
tslib.__metadata("design:paramtypes", [UpdateLoaderArgs]),
|
|
@@ -1561,6 +1656,7 @@ tslib.__decorate([
|
|
|
1561
1656
|
], LoaderMutation.prototype, "updateLoader", null);
|
|
1562
1657
|
tslib.__decorate([
|
|
1563
1658
|
graphql.Mutation(() => LoaderTypeDto),
|
|
1659
|
+
WmsOperation({ resource: 'loader', action: 'create' }),
|
|
1564
1660
|
tslib.__param(0, graphql.Args()),
|
|
1565
1661
|
tslib.__metadata("design:type", Function),
|
|
1566
1662
|
tslib.__metadata("design:paramtypes", [CreateLoaderTypeArgs]),
|
|
@@ -1568,6 +1664,7 @@ tslib.__decorate([
|
|
|
1568
1664
|
], LoaderMutation.prototype, "createLoaderType", null);
|
|
1569
1665
|
tslib.__decorate([
|
|
1570
1666
|
graphql.Mutation(() => LoaderTypeDto),
|
|
1667
|
+
WmsOperation({ resource: 'loader', action: 'update' }),
|
|
1571
1668
|
tslib.__param(0, graphql.Args()),
|
|
1572
1669
|
tslib.__metadata("design:type", Function),
|
|
1573
1670
|
tslib.__metadata("design:paramtypes", [UpdateLoaderTypeArgs]),
|
|
@@ -1796,6 +1893,7 @@ let LoaderQuery = class LoaderQuery {
|
|
|
1796
1893
|
};
|
|
1797
1894
|
tslib.__decorate([
|
|
1798
1895
|
graphql.Query(() => LoaderDto),
|
|
1896
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1799
1897
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
1800
1898
|
tslib.__metadata("design:type", Function),
|
|
1801
1899
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1803,6 +1901,7 @@ tslib.__decorate([
|
|
|
1803
1901
|
], LoaderQuery.prototype, "loader", null);
|
|
1804
1902
|
tslib.__decorate([
|
|
1805
1903
|
graphql.Query(() => Loaders),
|
|
1904
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1806
1905
|
tslib.__param(0, graphql.Args()),
|
|
1807
1906
|
tslib.__metadata("design:type", Function),
|
|
1808
1907
|
tslib.__metadata("design:paramtypes", [FindLoaderArgs]),
|
|
@@ -1810,6 +1909,7 @@ tslib.__decorate([
|
|
|
1810
1909
|
], LoaderQuery.prototype, "loaders", null);
|
|
1811
1910
|
tslib.__decorate([
|
|
1812
1911
|
graphql.Query(() => LoaderTypeDto),
|
|
1912
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1813
1913
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
1814
1914
|
tslib.__metadata("design:type", Function),
|
|
1815
1915
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1817,6 +1917,7 @@ tslib.__decorate([
|
|
|
1817
1917
|
], LoaderQuery.prototype, "loaderType", null);
|
|
1818
1918
|
tslib.__decorate([
|
|
1819
1919
|
graphql.Query(() => LoaderTypes),
|
|
1920
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1820
1921
|
tslib.__param(0, graphql.Args()),
|
|
1821
1922
|
tslib.__metadata("design:type", Function),
|
|
1822
1923
|
tslib.__metadata("design:paramtypes", [FindLoaderTypeArgs]),
|
|
@@ -1824,6 +1925,7 @@ tslib.__decorate([
|
|
|
1824
1925
|
], LoaderQuery.prototype, "loaderTypes", null);
|
|
1825
1926
|
tslib.__decorate([
|
|
1826
1927
|
graphql.Query(() => [LoaderUnitDto]),
|
|
1928
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1827
1929
|
tslib.__param(0, graphql.Args('type', { type: () => LoaderUnit })),
|
|
1828
1930
|
tslib.__metadata("design:type", Function),
|
|
1829
1931
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1831,6 +1933,7 @@ tslib.__decorate([
|
|
|
1831
1933
|
], LoaderQuery.prototype, "loaderUnits", null);
|
|
1832
1934
|
tslib.__decorate([
|
|
1833
1935
|
graphql.Query(() => [LoaderDto]),
|
|
1936
|
+
WmsOperation({ resource: 'loader', action: 'read' }),
|
|
1834
1937
|
tslib.__param(0, graphql.Args('locationId', { type: () => graphql.ID, nullable: true })),
|
|
1835
1938
|
tslib.__metadata("design:type", Function),
|
|
1836
1939
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -1924,6 +2027,7 @@ let MaterialMutation = class MaterialMutation {
|
|
|
1924
2027
|
};
|
|
1925
2028
|
tslib.__decorate([
|
|
1926
2029
|
graphql.Mutation(() => MaterialDto),
|
|
2030
|
+
WmsOperation({ resource: 'material', action: 'create' }),
|
|
1927
2031
|
tslib.__param(0, graphql.Args()),
|
|
1928
2032
|
tslib.__metadata("design:type", Function),
|
|
1929
2033
|
tslib.__metadata("design:paramtypes", [CreateMaterialArgs]),
|
|
@@ -1931,6 +2035,7 @@ tslib.__decorate([
|
|
|
1931
2035
|
], MaterialMutation.prototype, "createMaterial", null);
|
|
1932
2036
|
tslib.__decorate([
|
|
1933
2037
|
graphql.Mutation(() => MaterialDto),
|
|
2038
|
+
WmsOperation({ resource: 'material', action: 'update' }),
|
|
1934
2039
|
tslib.__param(0, graphql.Args()),
|
|
1935
2040
|
tslib.__metadata("design:type", Function),
|
|
1936
2041
|
tslib.__metadata("design:paramtypes", [UpdateMaterialArgs]),
|
|
@@ -1979,6 +2084,7 @@ let MaterialQuery = class MaterialQuery {
|
|
|
1979
2084
|
};
|
|
1980
2085
|
tslib.__decorate([
|
|
1981
2086
|
graphql.Query(() => MaterialDto),
|
|
2087
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
1982
2088
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID, nullable: true })),
|
|
1983
2089
|
tslib.__param(1, graphql.Args('key', { type: () => String, nullable: true })),
|
|
1984
2090
|
tslib.__metadata("design:type", Function),
|
|
@@ -1987,6 +2093,7 @@ tslib.__decorate([
|
|
|
1987
2093
|
], MaterialQuery.prototype, "material", null);
|
|
1988
2094
|
tslib.__decorate([
|
|
1989
2095
|
graphql.Query(() => Materials),
|
|
2096
|
+
WmsOperation({ resource: 'material', action: 'read' }),
|
|
1990
2097
|
tslib.__param(0, graphql.Args()),
|
|
1991
2098
|
tslib.__metadata("design:type", Function),
|
|
1992
2099
|
tslib.__metadata("design:paramtypes", [FindMaterialArgs]),
|
|
@@ -2098,6 +2205,7 @@ let StockQuery = class StockQuery {
|
|
|
2098
2205
|
};
|
|
2099
2206
|
tslib.__decorate([
|
|
2100
2207
|
graphql.Query(() => StockDto),
|
|
2208
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2101
2209
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2102
2210
|
tslib.__metadata("design:type", Function),
|
|
2103
2211
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2105,6 +2213,7 @@ tslib.__decorate([
|
|
|
2105
2213
|
], StockQuery.prototype, "stock", null);
|
|
2106
2214
|
tslib.__decorate([
|
|
2107
2215
|
graphql.Query(() => Stocks),
|
|
2216
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2108
2217
|
tslib.__param(0, graphql.Args()),
|
|
2109
2218
|
tslib.__metadata("design:type", Function),
|
|
2110
2219
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2112,6 +2221,7 @@ tslib.__decorate([
|
|
|
2112
2221
|
], StockQuery.prototype, "stocks", null);
|
|
2113
2222
|
tslib.__decorate([
|
|
2114
2223
|
graphql.Query(() => Materials),
|
|
2224
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2115
2225
|
tslib.__param(0, graphql.Args()),
|
|
2116
2226
|
tslib.__metadata("design:type", Function),
|
|
2117
2227
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2119,6 +2229,7 @@ tslib.__decorate([
|
|
|
2119
2229
|
], StockQuery.prototype, "stocksGroupedByMaterial", null);
|
|
2120
2230
|
tslib.__decorate([
|
|
2121
2231
|
graphql.Query(() => AggregatedStocks),
|
|
2232
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2122
2233
|
tslib.__param(0, graphql.Args()),
|
|
2123
2234
|
tslib.__metadata("design:type", Function),
|
|
2124
2235
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2126,6 +2237,7 @@ tslib.__decorate([
|
|
|
2126
2237
|
], StockQuery.prototype, "aggregatedStocks", null);
|
|
2127
2238
|
tslib.__decorate([
|
|
2128
2239
|
graphql.Query(() => ChangeLogs),
|
|
2240
|
+
WmsOperation({ resource: 'stock', action: 'read' }),
|
|
2129
2241
|
tslib.__param(0, graphql.Args()),
|
|
2130
2242
|
tslib.__metadata("design:type", Function),
|
|
2131
2243
|
tslib.__metadata("design:paramtypes", [FindStockArgs]),
|
|
@@ -2318,6 +2430,7 @@ let ReceiveInventoryOrderMutation = class ReceiveInventoryOrderMutation {
|
|
|
2318
2430
|
};
|
|
2319
2431
|
tslib.__decorate([
|
|
2320
2432
|
graphql.Mutation(() => ReceiveInventoryOrderDto),
|
|
2433
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'create' }),
|
|
2321
2434
|
tslib.__param(0, graphql.Args()),
|
|
2322
2435
|
tslib.__metadata("design:type", Function),
|
|
2323
2436
|
tslib.__metadata("design:paramtypes", [CreateReceiveInventoryOrderArgs]),
|
|
@@ -2325,6 +2438,7 @@ tslib.__decorate([
|
|
|
2325
2438
|
], ReceiveInventoryOrderMutation.prototype, "createReceiveInventoryOrder", null);
|
|
2326
2439
|
tslib.__decorate([
|
|
2327
2440
|
graphql.Mutation(() => ReceiveInventoryOrderDto),
|
|
2441
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'update' }),
|
|
2328
2442
|
tslib.__param(0, graphql.Args()),
|
|
2329
2443
|
tslib.__metadata("design:type", Function),
|
|
2330
2444
|
tslib.__metadata("design:paramtypes", [UpdateReceiveInventoryOrderArgs]),
|
|
@@ -2332,6 +2446,7 @@ tslib.__decorate([
|
|
|
2332
2446
|
], ReceiveInventoryOrderMutation.prototype, "updateReceiveInventoryOrder", null);
|
|
2333
2447
|
tslib.__decorate([
|
|
2334
2448
|
graphql.Mutation(() => Boolean),
|
|
2449
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'receive' }),
|
|
2335
2450
|
tslib.__param(0, graphql.Args('items', { type: () => [ReceiveOrderArgs] })),
|
|
2336
2451
|
tslib.__metadata("design:type", Function),
|
|
2337
2452
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2428,6 +2543,7 @@ let ReceiveInventoryOrderQuery = class ReceiveInventoryOrderQuery {
|
|
|
2428
2543
|
};
|
|
2429
2544
|
tslib.__decorate([
|
|
2430
2545
|
graphql.Query(() => ReceiveInventoryOrderDto),
|
|
2546
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
2431
2547
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2432
2548
|
tslib.__metadata("design:type", Function),
|
|
2433
2549
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2435,6 +2551,7 @@ tslib.__decorate([
|
|
|
2435
2551
|
], ReceiveInventoryOrderQuery.prototype, "receiveInventoryOrder", null);
|
|
2436
2552
|
tslib.__decorate([
|
|
2437
2553
|
graphql.Query(() => ReceiveInventoryOrders),
|
|
2554
|
+
WmsOperation({ resource: 'receive-inventory-order', action: 'read' }),
|
|
2438
2555
|
tslib.__param(0, graphql.Args()),
|
|
2439
2556
|
tslib.__metadata("design:type", Function),
|
|
2440
2557
|
tslib.__metadata("design:paramtypes", [FindReceiveInventoryOrderArgs]),
|
|
@@ -2672,6 +2789,7 @@ let ShipInventoryOrderMutation = class ShipInventoryOrderMutation {
|
|
|
2672
2789
|
};
|
|
2673
2790
|
tslib.__decorate([
|
|
2674
2791
|
graphql.Mutation(() => ShipInventoryOrderDto),
|
|
2792
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'create' }),
|
|
2675
2793
|
tslib.__param(0, graphql.Args()),
|
|
2676
2794
|
tslib.__metadata("design:type", Function),
|
|
2677
2795
|
tslib.__metadata("design:paramtypes", [CreateShipInventoryOrderArgs]),
|
|
@@ -2679,6 +2797,7 @@ tslib.__decorate([
|
|
|
2679
2797
|
], ShipInventoryOrderMutation.prototype, "createShipInventoryOrder", null);
|
|
2680
2798
|
tslib.__decorate([
|
|
2681
2799
|
graphql.Mutation(() => ShipInventoryOrderDto),
|
|
2800
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'update' }),
|
|
2682
2801
|
tslib.__param(0, graphql.Args()),
|
|
2683
2802
|
tslib.__metadata("design:type", Function),
|
|
2684
2803
|
tslib.__metadata("design:paramtypes", [UpdateShipInventoryOrderArgs]),
|
|
@@ -2686,6 +2805,7 @@ tslib.__decorate([
|
|
|
2686
2805
|
], ShipInventoryOrderMutation.prototype, "updateShipInventoryOrder", null);
|
|
2687
2806
|
tslib.__decorate([
|
|
2688
2807
|
graphql.Mutation(() => Boolean),
|
|
2808
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'ship' }),
|
|
2689
2809
|
tslib.__param(0, graphql.Args('items', { type: () => [ShipOrderArgs] })),
|
|
2690
2810
|
tslib.__metadata("design:type", Function),
|
|
2691
2811
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2693,6 +2813,7 @@ tslib.__decorate([
|
|
|
2693
2813
|
], ShipInventoryOrderMutation.prototype, "ship", null);
|
|
2694
2814
|
tslib.__decorate([
|
|
2695
2815
|
graphql.Mutation(() => Boolean),
|
|
2816
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'cancel' }),
|
|
2696
2817
|
tslib.__param(0, graphql.Args('items', { type: () => [CancelShipOrderArgs] })),
|
|
2697
2818
|
tslib.__metadata("design:type", Function),
|
|
2698
2819
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -2789,6 +2910,7 @@ let ShipInventoryOrderQuery = class ShipInventoryOrderQuery {
|
|
|
2789
2910
|
};
|
|
2790
2911
|
tslib.__decorate([
|
|
2791
2912
|
graphql.Query(() => ShipInventoryOrderDto),
|
|
2913
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
2792
2914
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
2793
2915
|
tslib.__metadata("design:type", Function),
|
|
2794
2916
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -2796,6 +2918,7 @@ tslib.__decorate([
|
|
|
2796
2918
|
], ShipInventoryOrderQuery.prototype, "shipInventoryOrder", null);
|
|
2797
2919
|
tslib.__decorate([
|
|
2798
2920
|
graphql.Query(() => ShipInventoryOrders),
|
|
2921
|
+
WmsOperation({ resource: 'ship-inventory-order', action: 'read' }),
|
|
2799
2922
|
tslib.__param(0, graphql.Args()),
|
|
2800
2923
|
tslib.__metadata("design:type", Function),
|
|
2801
2924
|
tslib.__metadata("design:paramtypes", [FindShipInventoryOrderArgs]),
|
|
@@ -3345,6 +3468,7 @@ let WarehouseMapMutation = class WarehouseMapMutation {
|
|
|
3345
3468
|
};
|
|
3346
3469
|
tslib.__decorate([
|
|
3347
3470
|
graphql.Mutation(() => MapDataDto),
|
|
3471
|
+
WmsOperation({ resource: 'warehouse-map', action: 'update' }),
|
|
3348
3472
|
tslib.__param(0, graphql.Args()),
|
|
3349
3473
|
tslib.__metadata("design:type", Function),
|
|
3350
3474
|
tslib.__metadata("design:paramtypes", [UpdateWarehouseMapArgs]),
|
|
@@ -3446,6 +3570,7 @@ let LocationQuery = class LocationQuery {
|
|
|
3446
3570
|
};
|
|
3447
3571
|
tslib.__decorate([
|
|
3448
3572
|
graphql.Query(() => LocationDto),
|
|
3573
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
3449
3574
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
3450
3575
|
tslib.__metadata("design:type", Function),
|
|
3451
3576
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -3453,6 +3578,7 @@ tslib.__decorate([
|
|
|
3453
3578
|
], LocationQuery.prototype, "location", null);
|
|
3454
3579
|
tslib.__decorate([
|
|
3455
3580
|
graphql.Query(() => Locations),
|
|
3581
|
+
WmsOperation({ resource: 'location', action: 'read' }),
|
|
3456
3582
|
tslib.__param(0, graphql.Args()),
|
|
3457
3583
|
tslib.__metadata("design:type", Function),
|
|
3458
3584
|
tslib.__metadata("design:paramtypes", [FindLocationArgs]),
|
|
@@ -3523,6 +3649,7 @@ let LocationMutation = class LocationMutation {
|
|
|
3523
3649
|
};
|
|
3524
3650
|
tslib.__decorate([
|
|
3525
3651
|
graphql.Mutation(() => LocationDto),
|
|
3652
|
+
WmsOperation({ resource: 'location', action: 'create' }),
|
|
3526
3653
|
tslib.__param(0, graphql.Args()),
|
|
3527
3654
|
tslib.__metadata("design:type", Function),
|
|
3528
3655
|
tslib.__metadata("design:paramtypes", [CreateLocationArgs]),
|
|
@@ -3530,6 +3657,7 @@ tslib.__decorate([
|
|
|
3530
3657
|
], LocationMutation.prototype, "createLocation", null);
|
|
3531
3658
|
tslib.__decorate([
|
|
3532
3659
|
graphql.Mutation(() => LocationDto),
|
|
3660
|
+
WmsOperation({ resource: 'location', action: 'update' }),
|
|
3533
3661
|
tslib.__param(0, graphql.Args()),
|
|
3534
3662
|
tslib.__metadata("design:type", Function),
|
|
3535
3663
|
tslib.__metadata("design:paramtypes", [UpdateLocationArgs]),
|
|
@@ -3572,6 +3700,7 @@ let UnitQuery = class UnitQuery {
|
|
|
3572
3700
|
};
|
|
3573
3701
|
tslib.__decorate([
|
|
3574
3702
|
graphql.Query(() => [UnitDto]),
|
|
3703
|
+
WmsOperation({ resource: 'unit', action: 'read' }),
|
|
3575
3704
|
tslib.__metadata("design:type", Function),
|
|
3576
3705
|
tslib.__metadata("design:paramtypes", []),
|
|
3577
3706
|
tslib.__metadata("design:returntype", Promise)
|
|
@@ -3831,6 +3960,7 @@ let TransferOrderMutation = class TransferOrderMutation {
|
|
|
3831
3960
|
};
|
|
3832
3961
|
tslib.__decorate([
|
|
3833
3962
|
graphql.Mutation(() => TransferOrderDto),
|
|
3963
|
+
WmsOperation({ resource: 'transfer-order', action: 'create' }),
|
|
3834
3964
|
tslib.__param(0, graphql.Args()),
|
|
3835
3965
|
tslib.__metadata("design:type", Function),
|
|
3836
3966
|
tslib.__metadata("design:paramtypes", [CreateTransferOrderArgs]),
|
|
@@ -3838,6 +3968,7 @@ tslib.__decorate([
|
|
|
3838
3968
|
], TransferOrderMutation.prototype, "createTransferOrder", null);
|
|
3839
3969
|
tslib.__decorate([
|
|
3840
3970
|
graphql.Mutation(() => TransferOrderDto),
|
|
3971
|
+
WmsOperation({ resource: 'transfer-order', action: 'update' }),
|
|
3841
3972
|
tslib.__param(0, graphql.Args()),
|
|
3842
3973
|
tslib.__metadata("design:type", Function),
|
|
3843
3974
|
tslib.__metadata("design:paramtypes", [UpdateTransferOrderArgs]),
|
|
@@ -3845,6 +3976,7 @@ tslib.__decorate([
|
|
|
3845
3976
|
], TransferOrderMutation.prototype, "updateTransferOrder", null);
|
|
3846
3977
|
tslib.__decorate([
|
|
3847
3978
|
graphql.Mutation(() => Boolean),
|
|
3979
|
+
WmsOperation({ resource: 'transfer-order', action: 'transfer' }),
|
|
3848
3980
|
tslib.__param(0, graphql.Args('items', { type: () => [TransferOrderArgs] })),
|
|
3849
3981
|
tslib.__metadata("design:type", Function),
|
|
3850
3982
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -3852,6 +3984,7 @@ tslib.__decorate([
|
|
|
3852
3984
|
], TransferOrderMutation.prototype, "transfer", null);
|
|
3853
3985
|
tslib.__decorate([
|
|
3854
3986
|
graphql.Mutation(() => Boolean),
|
|
3987
|
+
WmsOperation({ resource: 'transfer-order', action: 'cancel' }),
|
|
3855
3988
|
tslib.__param(0, graphql.Args('items', { type: () => [CancelTransferOrderArgs] })),
|
|
3856
3989
|
tslib.__metadata("design:type", Function),
|
|
3857
3990
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -3956,6 +4089,7 @@ let TransferOrderQuery = class TransferOrderQuery {
|
|
|
3956
4089
|
};
|
|
3957
4090
|
tslib.__decorate([
|
|
3958
4091
|
graphql.Query(() => TransferOrders),
|
|
4092
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
3959
4093
|
tslib.__param(0, graphql.Args()),
|
|
3960
4094
|
tslib.__metadata("design:type", Function),
|
|
3961
4095
|
tslib.__metadata("design:paramtypes", [FindTransferOrderArgs]),
|
|
@@ -3963,6 +4097,7 @@ tslib.__decorate([
|
|
|
3963
4097
|
], TransferOrderQuery.prototype, "transferOrders", null);
|
|
3964
4098
|
tslib.__decorate([
|
|
3965
4099
|
graphql.Query(() => TransferOrderDto),
|
|
4100
|
+
WmsOperation({ resource: 'transfer-order', action: 'read' }),
|
|
3966
4101
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
3967
4102
|
tslib.__metadata("design:type", Function),
|
|
3968
4103
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -4300,6 +4435,7 @@ let HoldInventoryOrderMutation = class HoldInventoryOrderMutation {
|
|
|
4300
4435
|
};
|
|
4301
4436
|
tslib.__decorate([
|
|
4302
4437
|
graphql.Mutation(() => HoldInventoryOrderDto),
|
|
4438
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'create' }),
|
|
4303
4439
|
tslib.__param(0, graphql.Args()),
|
|
4304
4440
|
tslib.__metadata("design:type", Function),
|
|
4305
4441
|
tslib.__metadata("design:paramtypes", [CreateHoldInventoryOrderArgs]),
|
|
@@ -4307,6 +4443,7 @@ tslib.__decorate([
|
|
|
4307
4443
|
], HoldInventoryOrderMutation.prototype, "createHoldInventoryOrder", null);
|
|
4308
4444
|
tslib.__decorate([
|
|
4309
4445
|
graphql.Mutation(() => HoldInventoryOrderDto),
|
|
4446
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'update' }),
|
|
4310
4447
|
tslib.__param(0, graphql.Args()),
|
|
4311
4448
|
tslib.__metadata("design:type", Function),
|
|
4312
4449
|
tslib.__metadata("design:paramtypes", [UpdateHoldInventoryOrderArgs]),
|
|
@@ -4314,6 +4451,7 @@ tslib.__decorate([
|
|
|
4314
4451
|
], HoldInventoryOrderMutation.prototype, "updateHoldInventoryOrder", null);
|
|
4315
4452
|
tslib.__decorate([
|
|
4316
4453
|
graphql.Mutation(() => Boolean),
|
|
4454
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'release' }),
|
|
4317
4455
|
tslib.__param(0, graphql.Args('items', { type: () => [ReleaseOrderArgs] })),
|
|
4318
4456
|
tslib.__metadata("design:type", Function),
|
|
4319
4457
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -4373,6 +4511,7 @@ let HoldInventoryOrderQuery = class HoldInventoryOrderQuery {
|
|
|
4373
4511
|
};
|
|
4374
4512
|
tslib.__decorate([
|
|
4375
4513
|
graphql.Query(() => HoldInventoryOrders),
|
|
4514
|
+
WmsOperation({ resource: 'hold-inventory-order', action: 'read' }),
|
|
4376
4515
|
tslib.__param(0, graphql.Args()),
|
|
4377
4516
|
tslib.__metadata("design:type", Function),
|
|
4378
4517
|
tslib.__metadata("design:paramtypes", [FindHoldInventoryOrderArgs]),
|
|
@@ -4434,6 +4573,7 @@ let BatchQuery = class BatchQuery {
|
|
|
4434
4573
|
};
|
|
4435
4574
|
tslib.__decorate([
|
|
4436
4575
|
graphql.Query(() => Batches),
|
|
4576
|
+
WmsOperation({ resource: 'batch', action: 'read' }),
|
|
4437
4577
|
tslib.__param(0, graphql.Args()),
|
|
4438
4578
|
tslib.__metadata("design:type", Function),
|
|
4439
4579
|
tslib.__metadata("design:paramtypes", [FindBatchArgs]),
|
|
@@ -4653,6 +4793,7 @@ let AllocateInventoryOrderQuery = class AllocateInventoryOrderQuery {
|
|
|
4653
4793
|
};
|
|
4654
4794
|
tslib.__decorate([
|
|
4655
4795
|
graphql.Query(() => AllocateInventoryOrders),
|
|
4796
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'read' }),
|
|
4656
4797
|
tslib.__param(0, graphql.Args()),
|
|
4657
4798
|
tslib.__metadata("design:type", Function),
|
|
4658
4799
|
tslib.__metadata("design:paramtypes", [FindAllocateInventoryOrderArgs]),
|
|
@@ -4828,6 +4969,7 @@ let AllocateInventoryOrderMutation = class AllocateInventoryOrderMutation {
|
|
|
4828
4969
|
};
|
|
4829
4970
|
tslib.__decorate([
|
|
4830
4971
|
graphql.Mutation(() => AllocateInventoryOrderDto),
|
|
4972
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'create' }),
|
|
4831
4973
|
tslib.__param(0, graphql.Args()),
|
|
4832
4974
|
tslib.__metadata("design:type", Function),
|
|
4833
4975
|
tslib.__metadata("design:paramtypes", [CreateAllocateInventoryOrderArgs]),
|
|
@@ -4835,6 +4977,7 @@ tslib.__decorate([
|
|
|
4835
4977
|
], AllocateInventoryOrderMutation.prototype, "createAllocateInventoryOrder", null);
|
|
4836
4978
|
tslib.__decorate([
|
|
4837
4979
|
graphql.Mutation(() => AllocateInventoryOrderDto),
|
|
4980
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'update' }),
|
|
4838
4981
|
tslib.__param(0, graphql.Args()),
|
|
4839
4982
|
tslib.__metadata("design:type", Function),
|
|
4840
4983
|
tslib.__metadata("design:paramtypes", [UpdateAllocateInventoryOrderArgs]),
|
|
@@ -4842,6 +4985,7 @@ tslib.__decorate([
|
|
|
4842
4985
|
], AllocateInventoryOrderMutation.prototype, "updateAllocateInventoryOrder", null);
|
|
4843
4986
|
tslib.__decorate([
|
|
4844
4987
|
graphql.Mutation(() => Boolean),
|
|
4988
|
+
WmsOperation({ resource: 'allocate-inventory-order', action: 'deallocate' }),
|
|
4845
4989
|
tslib.__param(0, graphql.Args('items', { type: () => [DeallocateOrderArgs] })),
|
|
4846
4990
|
tslib.__metadata("design:type", Function),
|
|
4847
4991
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -5178,6 +5322,7 @@ let SaleOrderQuery = class SaleOrderQuery {
|
|
|
5178
5322
|
};
|
|
5179
5323
|
tslib.__decorate([
|
|
5180
5324
|
graphql.Query(() => [String]),
|
|
5325
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
5181
5326
|
tslib.__param(0, graphql.Args()),
|
|
5182
5327
|
tslib.__metadata("design:type", Function),
|
|
5183
5328
|
tslib.__metadata("design:paramtypes", [FindSaleOrderArgs]),
|
|
@@ -5185,6 +5330,7 @@ tslib.__decorate([
|
|
|
5185
5330
|
], SaleOrderQuery.prototype, "saleOrderDistinctIds", null);
|
|
5186
5331
|
tslib.__decorate([
|
|
5187
5332
|
graphql.Query(() => [String]),
|
|
5333
|
+
WmsOperation({ resource: 'sale-order', action: 'read' }),
|
|
5188
5334
|
tslib.__param(0, graphql.Args('id', { type: () => graphql.ID })),
|
|
5189
5335
|
tslib.__metadata("design:type", Function),
|
|
5190
5336
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -5295,6 +5441,7 @@ let SplitBatchMutation = class SplitBatchMutation {
|
|
|
5295
5441
|
};
|
|
5296
5442
|
tslib.__decorate([
|
|
5297
5443
|
graphql.Mutation(() => SplitBatchOrderDto),
|
|
5444
|
+
WmsOperation({ resource: 'batch', action: 'split' }),
|
|
5298
5445
|
tslib.__param(0, graphql.Args()),
|
|
5299
5446
|
tslib.__metadata("design:type", Function),
|
|
5300
5447
|
tslib.__metadata("design:paramtypes", [SplitBatchArgs]),
|
|
@@ -5413,6 +5560,7 @@ let MergeBatchMutation = class MergeBatchMutation {
|
|
|
5413
5560
|
};
|
|
5414
5561
|
tslib.__decorate([
|
|
5415
5562
|
graphql.Mutation(() => MergeBatchOrderDto),
|
|
5563
|
+
WmsOperation({ resource: 'batch', action: 'merge' }),
|
|
5416
5564
|
tslib.__param(0, graphql.Args()),
|
|
5417
5565
|
tslib.__metadata("design:type", Function),
|
|
5418
5566
|
tslib.__metadata("design:paramtypes", [MergeBatchArgs]),
|
|
@@ -5537,6 +5685,7 @@ let ReclassifyInventoryOrderMutation = class ReclassifyInventoryOrderMutation {
|
|
|
5537
5685
|
};
|
|
5538
5686
|
tslib.__decorate([
|
|
5539
5687
|
graphql.Mutation(() => ReclassifyInventoryOrderDto),
|
|
5688
|
+
WmsOperation({ resource: 'reclassify-inventory-order', action: 'reclassify' }),
|
|
5540
5689
|
tslib.__param(0, graphql.Args()),
|
|
5541
5690
|
tslib.__metadata("design:type", Function),
|
|
5542
5691
|
tslib.__metadata("design:paramtypes", [ReclassifyInventoryOrderArgs]),
|
|
@@ -5709,6 +5858,7 @@ let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
|
5709
5858
|
};
|
|
5710
5859
|
tslib.__decorate([
|
|
5711
5860
|
graphql.Mutation(() => TransferCustomerOrderDto),
|
|
5861
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'create' }),
|
|
5712
5862
|
tslib.__param(0, graphql.Args()),
|
|
5713
5863
|
tslib.__metadata("design:type", Function),
|
|
5714
5864
|
tslib.__metadata("design:paramtypes", [CreateTransferCustomerOrderArgs]),
|
|
@@ -5716,6 +5866,7 @@ tslib.__decorate([
|
|
|
5716
5866
|
], TransferCustomerOrderMutation.prototype, "createTransferCustomerOrder", null);
|
|
5717
5867
|
tslib.__decorate([
|
|
5718
5868
|
graphql.Mutation(() => TransferCustomerOrderDto),
|
|
5869
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'update' }),
|
|
5719
5870
|
tslib.__param(0, graphql.Args()),
|
|
5720
5871
|
tslib.__metadata("design:type", Function),
|
|
5721
5872
|
tslib.__metadata("design:paramtypes", [UpdateTransferCustomerOrderArgs]),
|
|
@@ -5723,6 +5874,7 @@ tslib.__decorate([
|
|
|
5723
5874
|
], TransferCustomerOrderMutation.prototype, "updateTransferCustomerOrder", null);
|
|
5724
5875
|
tslib.__decorate([
|
|
5725
5876
|
graphql.Mutation(() => Boolean),
|
|
5877
|
+
WmsOperation({ resource: 'transfer-customer-order', action: 'return' }),
|
|
5726
5878
|
tslib.__param(0, graphql.Args('items', { type: () => [ReturnTransferCustomerOrderArgs] })),
|
|
5727
5879
|
tslib.__metadata("design:type", Function),
|
|
5728
5880
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -5914,6 +6066,7 @@ let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
|
5914
6066
|
};
|
|
5915
6067
|
tslib.__decorate([
|
|
5916
6068
|
graphql.Mutation(() => TransferVendorOrderDto),
|
|
6069
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'create' }),
|
|
5917
6070
|
tslib.__param(0, graphql.Args()),
|
|
5918
6071
|
tslib.__metadata("design:type", Function),
|
|
5919
6072
|
tslib.__metadata("design:paramtypes", [CreateTransferVendorOrderArgs]),
|
|
@@ -5921,6 +6074,7 @@ tslib.__decorate([
|
|
|
5921
6074
|
], TransferVendorOrderMutation.prototype, "createTransferVendorOrder", null);
|
|
5922
6075
|
tslib.__decorate([
|
|
5923
6076
|
graphql.Mutation(() => TransferVendorOrderDto),
|
|
6077
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'update' }),
|
|
5924
6078
|
tslib.__param(0, graphql.Args()),
|
|
5925
6079
|
tslib.__metadata("design:type", Function),
|
|
5926
6080
|
tslib.__metadata("design:paramtypes", [UpdateTransferVendorOrderArgs]),
|
|
@@ -5928,6 +6082,7 @@ tslib.__decorate([
|
|
|
5928
6082
|
], TransferVendorOrderMutation.prototype, "updateTransferVendorOrder", null);
|
|
5929
6083
|
tslib.__decorate([
|
|
5930
6084
|
graphql.Mutation(() => Boolean),
|
|
6085
|
+
WmsOperation({ resource: 'transfer-vendor-order', action: 'return' }),
|
|
5931
6086
|
tslib.__param(0, graphql.Args('items', { type: () => [ReturnTransferVendorOrderArgs] })),
|
|
5932
6087
|
tslib.__metadata("design:type", Function),
|
|
5933
6088
|
tslib.__metadata("design:paramtypes", [Array]),
|
|
@@ -6049,6 +6204,7 @@ let ScrapeMutation = class ScrapeMutation {
|
|
|
6049
6204
|
};
|
|
6050
6205
|
tslib.__decorate([
|
|
6051
6206
|
graphql.Mutation(() => ScrapeOrderDto),
|
|
6207
|
+
WmsOperation({ resource: 'scrape-order', action: 'scrape' }),
|
|
6052
6208
|
tslib.__param(0, graphql.Args()),
|
|
6053
6209
|
tslib.__metadata("design:type", Function),
|
|
6054
6210
|
tslib.__metadata("design:paramtypes", [ScrapeOrderArgs]),
|
|
@@ -6131,6 +6287,7 @@ let QualityInspectionOrderMutation = class QualityInspectionOrderMutation {
|
|
|
6131
6287
|
};
|
|
6132
6288
|
tslib.__decorate([
|
|
6133
6289
|
graphql.Mutation(() => QualityInspectionOrderDto),
|
|
6290
|
+
WmsOperation({ resource: 'quality-inspection-order', action: 'inspect' }),
|
|
6134
6291
|
tslib.__param(0, graphql.Args()),
|
|
6135
6292
|
tslib.__metadata("design:type", Function),
|
|
6136
6293
|
tslib.__metadata("design:paramtypes", [CreateQualityInspectionOrderArgs]),
|
|
@@ -6154,6 +6311,7 @@ let WarehouseMapDataQuery = class WarehouseMapDataQuery {
|
|
|
6154
6311
|
};
|
|
6155
6312
|
tslib.__decorate([
|
|
6156
6313
|
graphql.Query(() => MapDataDto),
|
|
6314
|
+
WmsOperation({ resource: 'warehouse-map', action: 'read' }),
|
|
6157
6315
|
tslib.__param(0, graphql.Args('key')),
|
|
6158
6316
|
tslib.__metadata("design:type", Function),
|
|
6159
6317
|
tslib.__metadata("design:paramtypes", [String]),
|
|
@@ -6243,12 +6401,19 @@ const exportDependencies = [
|
|
|
6243
6401
|
];
|
|
6244
6402
|
exports.WmsModuleGraphqlModule = WmsModuleGraphqlModule_1 = class WmsModuleGraphqlModule {
|
|
6245
6403
|
static forRootAsync(options) {
|
|
6246
|
-
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
|
+
];
|
|
6247
6412
|
return {
|
|
6248
6413
|
module: WmsModuleGraphqlModule_1,
|
|
6249
6414
|
imports: [coreModule, HelperModule],
|
|
6250
|
-
providers
|
|
6251
|
-
exports: [...exportDependencies, HelperModule, coreModule],
|
|
6415
|
+
providers,
|
|
6416
|
+
exports: [...exportDependencies, exports.WmsAuthGuard, HelperModule, coreModule],
|
|
6252
6417
|
};
|
|
6253
6418
|
}
|
|
6254
6419
|
};
|
|
@@ -6258,4 +6423,8 @@ exports.WmsModuleGraphqlModule = WmsModuleGraphqlModule_1 = tslib.__decorate([
|
|
|
6258
6423
|
})
|
|
6259
6424
|
], exports.WmsModuleGraphqlModule);
|
|
6260
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;
|
|
6261
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';
|