@rytass/wms-module-graphql 0.8.0 → 0.10.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 +92 -2
- package/adapters/event-emitter.cjs.js +43 -0
- package/adapters/member-base.cjs.js +66 -0
- package/docs/api-reference.md +80 -1
- package/docs/events.md +23 -4
- package/docs/integration-guide.md +31 -17
- package/index.cjs.js +935 -1
- package/index.d.ts +3 -1
- package/index.js +2 -0
- package/lib/dto/index.d.ts +1 -0
- package/lib/dto/inventory-count-order.dto.d.ts +61 -0
- package/lib/dto/inventory-count-order.dto.js +197 -0
- package/lib/events/operation-result-map.d.ts +8 -0
- package/lib/graphql.module.d.ts +6 -2
- package/lib/graphql.module.js +18 -1
- package/lib/inputs/find-stock.args.d.ts +9 -0
- package/lib/inputs/find-stock.args.js +25 -0
- package/lib/inputs/inventory-count-order.args.d.ts +69 -0
- package/lib/inputs/inventory-count-order.args.js +257 -0
- package/lib/mutations/inventory-count-order.mutation.d.ts +19 -0
- package/lib/mutations/inventory-count-order.mutation.js +138 -0
- package/lib/mutations/loader.mutation.js +1 -0
- package/lib/mutations/material.mutation.js +1 -0
- package/lib/mutations/receive-inventory-order.mutation.js +1 -0
- package/lib/mutations/ship-inventory-order.mutation.js +1 -0
- package/lib/queries/inventory-count-order.query.d.ts +17 -0
- package/lib/queries/inventory-count-order.query.js +63 -0
- package/lib/queries/loader.query.js +1 -0
- package/lib/queries/material.query.js +1 -0
- package/lib/queries/recieve-inventory-order.query.js +1 -0
- package/lib/queries/ship-inventory-order.query.js +1 -0
- package/lib/queries/stock.query.js +1 -0
- package/lib/registry/index.d.ts +1 -0
- package/lib/registry/operation-registry.d.ts +59 -0
- package/lib/registry/operation-registry.js +136 -0
- package/lib/resolvers/aggregated-stock.resolver.js +1 -0
- package/lib/resolvers/change-log.resolver.js +1 -0
- package/lib/resolvers/inventory-count-order.resolver.d.ts +34 -0
- package/lib/resolvers/inventory-count-order.resolver.js +148 -0
- package/lib/resolvers/loader-type.resolver.js +1 -0
- package/lib/resolvers/loader.resolver.js +1 -0
- package/lib/resolvers/material.resolver.js +1 -0
- package/lib/resolvers/receive-inventory-order.resolver.js +1 -0
- package/lib/resolvers/ship-inventory-order.resolver.js +1 -0
- package/lib/resolvers/stock.resolver.js +1 -0
- package/lib/resolvers/transfer-order.resolver.js +1 -0
- package/package.json +12 -6
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { RESOLVER_TYPE_METADATA, TypeMetadataStorage, RESOLVER_NAME_METADATA } from '@nestjs/graphql';
|
|
2
|
+
import { WMS_OPERATION_METADATA } from '../auth/wms-auth.types.js';
|
|
3
|
+
|
|
4
|
+
function resolveDisabled(options) {
|
|
5
|
+
const { enabledOperations, disabledOperations, disabledFields } = options;
|
|
6
|
+
if (enabledOperations && disabledOperations) {
|
|
7
|
+
throw new Error('[wms-module-graphql] `enabledOperations` and `disabledOperations` are mutually exclusive — pass one or the other, not both.');
|
|
8
|
+
}
|
|
9
|
+
const enabled = enabledOperations ? new Set(enabledOperations) : null;
|
|
10
|
+
const disabled = disabledOperations
|
|
11
|
+
? new Set(disabledOperations)
|
|
12
|
+
: null;
|
|
13
|
+
const fields = new Set(disabledFields ?? []);
|
|
14
|
+
return {
|
|
15
|
+
hasSwitches: enabled !== null || disabled !== null || fields.size > 0,
|
|
16
|
+
isOperationDisabled: (name) => {
|
|
17
|
+
if (enabled) {
|
|
18
|
+
return !enabled.has(name);
|
|
19
|
+
}
|
|
20
|
+
if (disabled) {
|
|
21
|
+
return disabled.has(name);
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
},
|
|
25
|
+
disabledFields: fields,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Methods already pruned, so the metadata filter can drop their entries. */
|
|
29
|
+
const prunedMethods = new WeakMap();
|
|
30
|
+
let metadataFilterInstalled = false;
|
|
31
|
+
/**
|
|
32
|
+
* Stop the pruned operations from ever entering `TypeMetadataStorage`.
|
|
33
|
+
*
|
|
34
|
+
* The resolver metadata is **lazy**: `@Query()` / `@Mutation()` only register a
|
|
35
|
+
* thunk with `LazyMetadataStorage`, and the thunk calls `add*Metadata` when
|
|
36
|
+
* `GraphQLSchemaBuilder.build()` loads it. At `forRootAsync` time the storage
|
|
37
|
+
* arrays are therefore still empty, and filtering them then would remove
|
|
38
|
+
* nothing — so the filter has to sit on the writes instead.
|
|
39
|
+
*/
|
|
40
|
+
function installMetadataFilter() {
|
|
41
|
+
if (metadataFilterInstalled) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const storage = TypeMetadataStorage;
|
|
45
|
+
const addQuery = storage.addQueryMetadata.bind(storage);
|
|
46
|
+
const addMutation = storage.addMutationMetadata.bind(storage);
|
|
47
|
+
const isPruned = (metadata) => prunedMethods.get(metadata.target)?.has(metadata.methodName) === true;
|
|
48
|
+
storage.addQueryMetadata = (metadata) => {
|
|
49
|
+
if (isPruned(metadata)) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
addQuery(metadata);
|
|
53
|
+
};
|
|
54
|
+
storage.addMutationMetadata = (metadata) => {
|
|
55
|
+
if (isPruned(metadata)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
addMutation(metadata);
|
|
59
|
+
};
|
|
60
|
+
metadataFilterInstalled = true;
|
|
61
|
+
}
|
|
62
|
+
/** The GraphQL field name a root handler ends up under. */
|
|
63
|
+
function schemaNameOf(handler, methodName) {
|
|
64
|
+
const explicit = Reflect.getMetadata(RESOLVER_NAME_METADATA, handler);
|
|
65
|
+
return explicit || methodName;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Remove the switched-off root operations before the schema is built.
|
|
69
|
+
*
|
|
70
|
+
* Two edits are needed, at two different moments, and they must happen together:
|
|
71
|
+
*
|
|
72
|
+
* 1. **now** — `delete Resolver.prototype[method]`, because
|
|
73
|
+
* `ResolversExplorerService.explore()` walks the prototype with
|
|
74
|
+
* `MetadataScanner` and runs *before* the schema builder loads the lazy
|
|
75
|
+
* metadata. Leaving the method in place would put `Query.foo` in the resolver
|
|
76
|
+
* map with no matching field in the typeDefs, and `makeExecutableSchema`
|
|
77
|
+
* rejects the whole schema (`requireResolversToMatchSchema`).
|
|
78
|
+
* 2. **at load time** — drop the metadata entry ({@link installMetadataFilter}),
|
|
79
|
+
* or the SDL would still declare a field that resolves to `null`: present,
|
|
80
|
+
* but dead.
|
|
81
|
+
*
|
|
82
|
+
* Deleting the prototype method does not disturb step 2's type reflection:
|
|
83
|
+
* `design:returntype` is stored against the prototype and property key, not
|
|
84
|
+
* against the function object, so it survives the delete.
|
|
85
|
+
*
|
|
86
|
+
* This runs synchronously from `forRootAsync`, i.e. while `AppModule` is still
|
|
87
|
+
* being defined. Both the classes and the storage are process-global, so a
|
|
88
|
+
* process may register `WmsModuleGraphqlModule` only once.
|
|
89
|
+
*/
|
|
90
|
+
function pruneDisabledOperations(resolverClasses, options) {
|
|
91
|
+
const { hasSwitches, isOperationDisabled, disabledFields } = resolveDisabled(options);
|
|
92
|
+
if (!hasSwitches) {
|
|
93
|
+
return { queries: [], mutations: [] };
|
|
94
|
+
}
|
|
95
|
+
installMetadataFilter();
|
|
96
|
+
const queries = [];
|
|
97
|
+
const mutations = [];
|
|
98
|
+
for (const resolverClass of resolverClasses) {
|
|
99
|
+
const prototype = resolverClass.prototype;
|
|
100
|
+
if (!prototype) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
for (const methodName of Object.getOwnPropertyNames(prototype)) {
|
|
104
|
+
if (methodName === 'constructor') {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const handler = prototype[methodName];
|
|
108
|
+
if (typeof handler !== 'function') {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const resolverType = Reflect.getMetadata(RESOLVER_TYPE_METADATA, handler);
|
|
112
|
+
// Only root operations are switchable. `@ResolveField` handlers are
|
|
113
|
+
// reached exclusively through an already-registered root field, so
|
|
114
|
+
// removing one would break the type rather than the deployment surface.
|
|
115
|
+
if (resolverType !== 'Query' && resolverType !== 'Mutation') {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
const schemaName = schemaNameOf(handler, methodName);
|
|
119
|
+
const requirement = Reflect.getMetadata(WMS_OPERATION_METADATA, handler);
|
|
120
|
+
const disabled = disabledFields.has(schemaName) ||
|
|
121
|
+
(requirement !== undefined &&
|
|
122
|
+
isOperationDisabled(`${requirement.resource}:${requirement.action}`));
|
|
123
|
+
if (!disabled) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const alreadyPruned = prunedMethods.get(resolverClass) ?? new Set();
|
|
127
|
+
alreadyPruned.add(methodName);
|
|
128
|
+
prunedMethods.set(resolverClass, alreadyPruned);
|
|
129
|
+
delete prototype[methodName];
|
|
130
|
+
(resolverType === 'Query' ? queries : mutations).push(schemaName);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return { queries, mutations };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { pruneDisabledOperations, resolveDisabled };
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { StockService, WmsEntities, BatchGroupEntityClass, LoadersEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
29
30
|
import { LocationDto } from '../dto/location.dto.js';
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { StockEntityClass, WmsEntities, BatchGroupEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { LocationDto } from '../dto/location.dto.js';
|
|
29
30
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BatchEntityClass, InventoryCountOrderItemEntityClass, InventoryCountOrderLocationEntityClass, LoadersEntityClass, LocationEntityClass, MaterialEntityClass, WmsEntities } from '@rytass/wms-module-core';
|
|
2
|
+
import { InventoryCountOrderDto, InventoryCountOrderItemDto } from '../dto/inventory-count-order.dto';
|
|
3
|
+
import { BatchDto } from '../dto/batch.dto';
|
|
4
|
+
import { LoaderDto } from '../dto/loader.dto';
|
|
5
|
+
import { LocationDto } from '../dto/location.dto';
|
|
6
|
+
import { MaterialDto } from '../dto/material.dto';
|
|
7
|
+
import { type LoaderType } from '../helpers';
|
|
8
|
+
export declare class InventoryCountOrderResolver {
|
|
9
|
+
private readonly entities;
|
|
10
|
+
constructor(entities: WmsEntities);
|
|
11
|
+
items({ id }: InventoryCountOrderDto, { loaders }: LoaderType<InventoryCountOrderItemEntityClass>): Promise<InventoryCountOrderItemDto[]>;
|
|
12
|
+
/**
|
|
13
|
+
* The locations the user picked.
|
|
14
|
+
*
|
|
15
|
+
* Only the roots: the scope table also holds every descendant the backend
|
|
16
|
+
* expanded into, and listing a whole aisle's shelves as chips would bury the
|
|
17
|
+
* one thing the operator actually chose. The expansion still exists in the
|
|
18
|
+
* database — it is what the lock reads — it just is not this field.
|
|
19
|
+
*/
|
|
20
|
+
locations({ id }: InventoryCountOrderDto, { loaders }: LoaderType<InventoryCountOrderLocationEntityClass>): Promise<LocationDto[]>;
|
|
21
|
+
}
|
|
22
|
+
export declare class InventoryCountOrderItemResolver {
|
|
23
|
+
private readonly entities;
|
|
24
|
+
/**
|
|
25
|
+
* The configured entities, not the built-in classes: `__entity` decides which
|
|
26
|
+
* repository the DataLoader opens, so it has to follow whatever the consumer
|
|
27
|
+
* passed to `WMSBaseModuleOptions`.
|
|
28
|
+
*/
|
|
29
|
+
constructor(entities: WmsEntities);
|
|
30
|
+
material({ materialId }: InventoryCountOrderItemDto, { loaders }: LoaderType<MaterialEntityClass>): Promise<MaterialDto>;
|
|
31
|
+
batch({ batchId }: InventoryCountOrderItemDto, { loaders }: LoaderType<BatchEntityClass>): Promise<BatchDto>;
|
|
32
|
+
location({ locationId }: InventoryCountOrderItemDto, { loaders }: LoaderType<LocationEntityClass>): Promise<LocationDto> | null;
|
|
33
|
+
loader({ loaderId }: InventoryCountOrderItemDto, { loaders }: LoaderType<LoadersEntityClass>): Promise<LoaderDto> | null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { WmsEntities, InventoryCountOrderItemEntityClass, InventoryCountOrderLocationEntityClass, BatchGroupEntityClass, LoadersEntityClass } from '@rytass/wms-module-core';
|
|
4
|
+
import { InventoryCountOrderItemDto, InventoryCountOrderDto } from '../dto/inventory-count-order.dto.js';
|
|
5
|
+
import { BatchDto } from '../dto/batch.dto.js';
|
|
6
|
+
import { LoaderDto } from '../dto/loader.dto.js';
|
|
7
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
8
|
+
import { MaterialDto } from '../dto/material.dto.js';
|
|
9
|
+
|
|
10
|
+
let InventoryCountOrderResolver = class InventoryCountOrderResolver {
|
|
11
|
+
entities;
|
|
12
|
+
constructor(entities) {
|
|
13
|
+
this.entities = entities;
|
|
14
|
+
}
|
|
15
|
+
items({ id }, { loaders }) {
|
|
16
|
+
return loaders.batchMany.load({
|
|
17
|
+
__entity: InventoryCountOrderItemEntityClass,
|
|
18
|
+
__from: { orderId: id },
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The locations the user picked.
|
|
23
|
+
*
|
|
24
|
+
* Only the roots: the scope table also holds every descendant the backend
|
|
25
|
+
* expanded into, and listing a whole aisle's shelves as chips would bury the
|
|
26
|
+
* one thing the operator actually chose. The expansion still exists in the
|
|
27
|
+
* database — it is what the lock reads — it just is not this field.
|
|
28
|
+
*/
|
|
29
|
+
async locations({ id }, { loaders }) {
|
|
30
|
+
const scope = (await loaders.batchMany.load({
|
|
31
|
+
__entity: InventoryCountOrderLocationEntityClass,
|
|
32
|
+
__from: { orderId: id },
|
|
33
|
+
}));
|
|
34
|
+
// The join rows carry `locationId`, not a loaded `location` relation, so
|
|
35
|
+
// each one has to go back through the location DataLoader. Returning
|
|
36
|
+
// `row.location` directly yields `undefined`, and the non-nullable list then
|
|
37
|
+
// fails the whole query with "Cannot return null for non-nullable field".
|
|
38
|
+
return Promise.all(scope
|
|
39
|
+
.filter(({ isRoot }) => isRoot)
|
|
40
|
+
.map(({ locationId }) => loaders.batchSingle.load({
|
|
41
|
+
__entity: this.entities.location,
|
|
42
|
+
__from: { id: locationId },
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorate([
|
|
47
|
+
ResolveField(() => [InventoryCountOrderItemDto]),
|
|
48
|
+
__param(0, Parent()),
|
|
49
|
+
__param(1, Context()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [InventoryCountOrderDto, Object]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], InventoryCountOrderResolver.prototype, "items", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
ResolveField(() => [LocationDto]),
|
|
56
|
+
__param(0, Parent()),
|
|
57
|
+
__param(1, Context()),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [InventoryCountOrderDto, Object]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], InventoryCountOrderResolver.prototype, "locations", null);
|
|
62
|
+
InventoryCountOrderResolver = __decorate([
|
|
63
|
+
Resolver(() => InventoryCountOrderDto),
|
|
64
|
+
__metadata("design:paramtypes", [WmsEntities])
|
|
65
|
+
], InventoryCountOrderResolver);
|
|
66
|
+
let InventoryCountOrderItemResolver = class InventoryCountOrderItemResolver {
|
|
67
|
+
entities;
|
|
68
|
+
/**
|
|
69
|
+
* The configured entities, not the built-in classes: `__entity` decides which
|
|
70
|
+
* repository the DataLoader opens, so it has to follow whatever the consumer
|
|
71
|
+
* passed to `WMSBaseModuleOptions`.
|
|
72
|
+
*/
|
|
73
|
+
constructor(entities) {
|
|
74
|
+
this.entities = entities;
|
|
75
|
+
}
|
|
76
|
+
material({ materialId }, { loaders }) {
|
|
77
|
+
return loaders.batchSingle.load({
|
|
78
|
+
__entity: this.entities.material,
|
|
79
|
+
__from: { id: materialId },
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async batch({ batchId }, { loaders }) {
|
|
83
|
+
const { groupId } = await loaders.batchSingle.load({
|
|
84
|
+
__entity: this.entities.batch,
|
|
85
|
+
__from: { id: batchId },
|
|
86
|
+
});
|
|
87
|
+
return loaders.batchSingle.load({
|
|
88
|
+
__entity: BatchGroupEntityClass,
|
|
89
|
+
__from: { id: groupId },
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
location({ locationId }, { loaders }) {
|
|
93
|
+
if (!locationId) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
return loaders.batchSingle.load({
|
|
97
|
+
__entity: this.entities.location,
|
|
98
|
+
__from: { id: locationId },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
loader({ loaderId }, { loaders }) {
|
|
102
|
+
if (!loaderId) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return loaders.batchSingle.load({
|
|
106
|
+
__entity: LoadersEntityClass,
|
|
107
|
+
__from: { id: loaderId },
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
__decorate([
|
|
112
|
+
ResolveField(() => MaterialDto),
|
|
113
|
+
__param(0, Parent()),
|
|
114
|
+
__param(1, Context()),
|
|
115
|
+
__metadata("design:type", Function),
|
|
116
|
+
__metadata("design:paramtypes", [InventoryCountOrderItemDto, Object]),
|
|
117
|
+
__metadata("design:returntype", Promise)
|
|
118
|
+
], InventoryCountOrderItemResolver.prototype, "material", null);
|
|
119
|
+
__decorate([
|
|
120
|
+
ResolveField(() => BatchDto),
|
|
121
|
+
__param(0, Parent()),
|
|
122
|
+
__param(1, Context()),
|
|
123
|
+
__metadata("design:type", Function),
|
|
124
|
+
__metadata("design:paramtypes", [InventoryCountOrderItemDto, Object]),
|
|
125
|
+
__metadata("design:returntype", Promise)
|
|
126
|
+
], InventoryCountOrderItemResolver.prototype, "batch", null);
|
|
127
|
+
__decorate([
|
|
128
|
+
ResolveField(() => LocationDto, { nullable: true }),
|
|
129
|
+
__param(0, Parent()),
|
|
130
|
+
__param(1, Context()),
|
|
131
|
+
__metadata("design:type", Function),
|
|
132
|
+
__metadata("design:paramtypes", [InventoryCountOrderItemDto, Object]),
|
|
133
|
+
__metadata("design:returntype", Object)
|
|
134
|
+
], InventoryCountOrderItemResolver.prototype, "location", null);
|
|
135
|
+
__decorate([
|
|
136
|
+
ResolveField(() => LoaderDto, { nullable: true }),
|
|
137
|
+
__param(0, Parent()),
|
|
138
|
+
__param(1, Context()),
|
|
139
|
+
__metadata("design:type", Function),
|
|
140
|
+
__metadata("design:paramtypes", [InventoryCountOrderItemDto, Object]),
|
|
141
|
+
__metadata("design:returntype", Object)
|
|
142
|
+
], InventoryCountOrderItemResolver.prototype, "loader", null);
|
|
143
|
+
InventoryCountOrderItemResolver = __decorate([
|
|
144
|
+
Resolver(() => InventoryCountOrderItemDto),
|
|
145
|
+
__metadata("design:paramtypes", [WmsEntities])
|
|
146
|
+
], InventoryCountOrderItemResolver);
|
|
147
|
+
|
|
148
|
+
export { InventoryCountOrderItemResolver, InventoryCountOrderResolver };
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { LoaderTypeEntityClass, LoadersEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
|
|
29
30
|
let LoaderTypeResolver = class LoaderTypeResolver {
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { LoadersEntityClass, WmsEntities, StockService, LoaderTypeEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { LocationDto } from '../dto/location.dto.js';
|
|
29
30
|
import _ from 'lodash';
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { MaterialEntityClass, StockService, MaterialUnitEntityClass, UnitEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { UnitDto } from '../dto/unit.dto.js';
|
|
29
30
|
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { ReceiveInventoryOrderItemEntityClass, WmsEntities, BatchGroupEntityClass, LoadersEntityClass, ReceiveInventoryOrderChangeEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
29
30
|
import { LocationDto } from '../dto/location.dto.js';
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { ShipInventoryOrderEntityClass, ShipInventoryOrderItemEntityClass, WmsEntities, ShipInventoryOrderReferenceEntityClass, BatchGroupEntityClass, LoadersEntityClass, ShipInventoryOrderChangeEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
29
30
|
import { LocationDto } from '../dto/location.dto.js';
|
|
@@ -24,6 +24,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
24
24
|
import '../dto/scrape-order-item.dto.js';
|
|
25
25
|
import '../dto/quality-inspection-order.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import '../dto/inventory-count-order.dto.js';
|
|
27
28
|
import { StockEntityClass, WmsEntities, BatchGroupEntityClass } from '@rytass/wms-module-core';
|
|
28
29
|
import { LocationDto } from '../dto/location.dto.js';
|
|
29
30
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
@@ -25,6 +25,7 @@ import '../dto/scrape-order.dto.js';
|
|
|
25
25
|
import '../dto/scrape-order-item.dto.js';
|
|
26
26
|
import '../dto/quality-inspection-order.dto.js';
|
|
27
27
|
import '../dto/quality-inspection-order-item.dto.js';
|
|
28
|
+
import '../dto/inventory-count-order.dto.js';
|
|
28
29
|
import { BatchDto } from '../dto/batch.dto.js';
|
|
29
30
|
import { LocationDto } from '../dto/location.dto.js';
|
|
30
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/wms-module-graphql",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Rytass WMS Module — GraphQL schema, resolvers and DTOs for warehouse management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rytass",
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
},
|
|
31
31
|
"./adapters/member-base": {
|
|
32
32
|
"types": "./adapters/member-base.d.ts",
|
|
33
|
+
"require": "./adapters/member-base.cjs.js",
|
|
33
34
|
"import": "./adapters/member-base.js"
|
|
34
35
|
},
|
|
35
36
|
"./adapters/event-emitter": {
|
|
36
37
|
"types": "./adapters/event-emitter.d.ts",
|
|
38
|
+
"require": "./adapters/event-emitter.cjs.js",
|
|
37
39
|
"import": "./adapters/event-emitter.js"
|
|
38
40
|
},
|
|
39
41
|
"./package.json": "./package.json"
|
|
@@ -50,17 +52,21 @@
|
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
54
|
"dataloader": "^2.2.3",
|
|
53
|
-
"
|
|
55
|
+
"lodash": "^4.17.0",
|
|
56
|
+
"lru-cache": "^10.0.0 || ^11.0.0"
|
|
54
57
|
},
|
|
55
58
|
"peerDependencies": {
|
|
56
59
|
"@as-integrations/express5": "^1.0.0",
|
|
57
|
-
"@nestjs/apollo": "
|
|
58
|
-
"@nestjs/common": "^11.0.0",
|
|
60
|
+
"@nestjs/apollo": "^13.0.0",
|
|
61
|
+
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
62
|
+
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
|
59
63
|
"@nestjs/graphql": "^13.0.0",
|
|
60
|
-
"@rytass/wms-module
|
|
64
|
+
"@rytass/wms-base-nestjs-module": "^0.4.0",
|
|
65
|
+
"@rytass/wms-module-core": "^0.7.0",
|
|
61
66
|
"graphql": "^16.0.0",
|
|
62
67
|
"reflect-metadata": "^0.1.13 || ^0.2.0",
|
|
63
|
-
"rxjs": "^7.
|
|
68
|
+
"rxjs": "^7.0.0",
|
|
69
|
+
"typeorm": "^0.3.0",
|
|
64
70
|
"@nestjs/event-emitter": "^2.0.0 || ^3.0.0"
|
|
65
71
|
},
|
|
66
72
|
"peerDependenciesMeta": {
|