@things-factory/warehouse-base 4.3.669 → 4.3.671

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.
Files changed (191) hide show
  1. package/package.json +10 -10
  2. package/dist-server/constants/adjustment-code.js +0 -13
  3. package/dist-server/constants/adjustment-code.js.map +0 -1
  4. package/dist-server/constants/index.js +0 -23
  5. package/dist-server/constants/index.js.map +0 -1
  6. package/dist-server/constants/inventory.js +0 -74
  7. package/dist-server/constants/inventory.js.map +0 -1
  8. package/dist-server/constants/location.js +0 -19
  9. package/dist-server/constants/location.js.map +0 -1
  10. package/dist-server/constants/pallet.js +0 -13
  11. package/dist-server/constants/pallet.js.map +0 -1
  12. package/dist-server/constants/rule-type.js +0 -8
  13. package/dist-server/constants/rule-type.js.map +0 -1
  14. package/dist-server/constants/tote.js +0 -9
  15. package/dist-server/constants/tote.js.map +0 -1
  16. package/dist-server/controllers/ecommerce/ecommerce-controller.js +0 -125
  17. package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +0 -1
  18. package/dist-server/controllers/ecommerce/index.js +0 -22
  19. package/dist-server/controllers/ecommerce/index.js.map +0 -1
  20. package/dist-server/controllers/ecommerce/pos-controller.js +0 -65
  21. package/dist-server/controllers/ecommerce/pos-controller.js.map +0 -1
  22. package/dist-server/controllers/ecommerce/powrup-controller.js +0 -87
  23. package/dist-server/controllers/ecommerce/powrup-controller.js.map +0 -1
  24. package/dist-server/controllers/ecommerce/sellercraft-controller.js +0 -85
  25. package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +0 -1
  26. package/dist-server/controllers/ecommerce/webspert-controller.js +0 -131
  27. package/dist-server/controllers/ecommerce/webspert-controller.js.map +0 -1
  28. package/dist-server/controllers/index.js +0 -19
  29. package/dist-server/controllers/index.js.map +0 -1
  30. package/dist-server/controllers/warehouse-controller.js +0 -143
  31. package/dist-server/controllers/warehouse-controller.js.map +0 -1
  32. package/dist-server/index.js +0 -35
  33. package/dist-server/index.js.map +0 -1
  34. package/dist-server/middlewares/index.js +0 -1
  35. package/dist-server/middlewares/index.js.map +0 -1
  36. package/dist-server/migrations/index.js +0 -12
  37. package/dist-server/migrations/index.js.map +0 -1
  38. package/dist-server/service/index.js +0 -96
  39. package/dist-server/service/index.js.map +0 -1
  40. package/dist-server/service/inventory/index.js +0 -9
  41. package/dist-server/service/inventory/index.js.map +0 -1
  42. package/dist-server/service/inventory/inventory-mutation.js +0 -414
  43. package/dist-server/service/inventory/inventory-mutation.js.map +0 -1
  44. package/dist-server/service/inventory/inventory-query.js +0 -1211
  45. package/dist-server/service/inventory/inventory-query.js.map +0 -1
  46. package/dist-server/service/inventory/inventory-types.js +0 -478
  47. package/dist-server/service/inventory/inventory-types.js.map +0 -1
  48. package/dist-server/service/inventory/inventory.js +0 -569
  49. package/dist-server/service/inventory/inventory.js.map +0 -1
  50. package/dist-server/service/inventory-change/index.js +0 -9
  51. package/dist-server/service/inventory-change/index.js.map +0 -1
  52. package/dist-server/service/inventory-change/inventory-change-mutation.js +0 -1188
  53. package/dist-server/service/inventory-change/inventory-change-mutation.js.map +0 -1
  54. package/dist-server/service/inventory-change/inventory-change-query.js +0 -150
  55. package/dist-server/service/inventory-change/inventory-change-query.js.map +0 -1
  56. package/dist-server/service/inventory-change/inventory-change-types.js +0 -73
  57. package/dist-server/service/inventory-change/inventory-change-types.js.map +0 -1
  58. package/dist-server/service/inventory-change/inventory-change.js +0 -225
  59. package/dist-server/service/inventory-change/inventory-change.js.map +0 -1
  60. package/dist-server/service/inventory-history/index.js +0 -9
  61. package/dist-server/service/inventory-history/index.js.map +0 -1
  62. package/dist-server/service/inventory-history/inventory-history-mutation.js +0 -121
  63. package/dist-server/service/inventory-history/inventory-history-mutation.js.map +0 -1
  64. package/dist-server/service/inventory-history/inventory-history-query.js +0 -1694
  65. package/dist-server/service/inventory-history/inventory-history-query.js.map +0 -1
  66. package/dist-server/service/inventory-history/inventory-history-types.js +0 -626
  67. package/dist-server/service/inventory-history/inventory-history-types.js.map +0 -1
  68. package/dist-server/service/inventory-history/inventory-history.js +0 -238
  69. package/dist-server/service/inventory-history/inventory-history.js.map +0 -1
  70. package/dist-server/service/inventory-item/index.js +0 -9
  71. package/dist-server/service/inventory-item/index.js.map +0 -1
  72. package/dist-server/service/inventory-item/inventory-item-mutation.js +0 -274
  73. package/dist-server/service/inventory-item/inventory-item-mutation.js.map +0 -1
  74. package/dist-server/service/inventory-item/inventory-item-query.js +0 -265
  75. package/dist-server/service/inventory-item/inventory-item-query.js.map +0 -1
  76. package/dist-server/service/inventory-item/inventory-item-type.js +0 -127
  77. package/dist-server/service/inventory-item/inventory-item-type.js.map +0 -1
  78. package/dist-server/service/inventory-item/inventory-item.js +0 -146
  79. package/dist-server/service/inventory-item/inventory-item.js.map +0 -1
  80. package/dist-server/service/inventory-item-change/index.js +0 -9
  81. package/dist-server/service/inventory-item-change/index.js.map +0 -1
  82. package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +0 -121
  83. package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +0 -1
  84. package/dist-server/service/inventory-item-change/inventory-item-change-query.js +0 -87
  85. package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +0 -1
  86. package/dist-server/service/inventory-item-change/inventory-item-change-type.js +0 -107
  87. package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +0 -1
  88. package/dist-server/service/inventory-item-change/inventory-item-change.js +0 -110
  89. package/dist-server/service/inventory-item-change/inventory-item-change.js.map +0 -1
  90. package/dist-server/service/inventory-product/index.js +0 -9
  91. package/dist-server/service/inventory-product/index.js.map +0 -1
  92. package/dist-server/service/inventory-product/inventory-product-mutation.js +0 -120
  93. package/dist-server/service/inventory-product/inventory-product-mutation.js.map +0 -1
  94. package/dist-server/service/inventory-product/inventory-product-query.js +0 -87
  95. package/dist-server/service/inventory-product/inventory-product-query.js.map +0 -1
  96. package/dist-server/service/inventory-product/inventory-product-type.js +0 -95
  97. package/dist-server/service/inventory-product/inventory-product-type.js.map +0 -1
  98. package/dist-server/service/inventory-product/inventory-product.js +0 -112
  99. package/dist-server/service/inventory-product/inventory-product.js.map +0 -1
  100. package/dist-server/service/location/index.js +0 -9
  101. package/dist-server/service/location/index.js.map +0 -1
  102. package/dist-server/service/location/location-mutation.js +0 -279
  103. package/dist-server/service/location/location-mutation.js.map +0 -1
  104. package/dist-server/service/location/location-query.js +0 -321
  105. package/dist-server/service/location/location-query.js.map +0 -1
  106. package/dist-server/service/location/location-types.js +0 -296
  107. package/dist-server/service/location/location-types.js.map +0 -1
  108. package/dist-server/service/location/location.js +0 -146
  109. package/dist-server/service/location/location.js.map +0 -1
  110. package/dist-server/service/movement/index.js +0 -9
  111. package/dist-server/service/movement/index.js.map +0 -1
  112. package/dist-server/service/movement/movement-mutation.js +0 -80
  113. package/dist-server/service/movement/movement-mutation.js.map +0 -1
  114. package/dist-server/service/movement/movement-query.js +0 -286
  115. package/dist-server/service/movement/movement-query.js.map +0 -1
  116. package/dist-server/service/movement/movement-types.js +0 -117
  117. package/dist-server/service/movement/movement-types.js.map +0 -1
  118. package/dist-server/service/movement/movement.js +0 -101
  119. package/dist-server/service/movement/movement.js.map +0 -1
  120. package/dist-server/service/pallet/index.js +0 -9
  121. package/dist-server/service/pallet/index.js.map +0 -1
  122. package/dist-server/service/pallet/pallet-mutation.js +0 -194
  123. package/dist-server/service/pallet/pallet-mutation.js.map +0 -1
  124. package/dist-server/service/pallet/pallet-query.js +0 -164
  125. package/dist-server/service/pallet/pallet-query.js.map +0 -1
  126. package/dist-server/service/pallet/pallet-types.js +0 -109
  127. package/dist-server/service/pallet/pallet-types.js.map +0 -1
  128. package/dist-server/service/pallet/pallet.js +0 -112
  129. package/dist-server/service/pallet/pallet.js.map +0 -1
  130. package/dist-server/service/pallet-count/index.js +0 -9
  131. package/dist-server/service/pallet-count/index.js.map +0 -1
  132. package/dist-server/service/pallet-count/pallet-count-mutation.js +0 -153
  133. package/dist-server/service/pallet-count/pallet-count-mutation.js.map +0 -1
  134. package/dist-server/service/pallet-count/pallet-count-query.js +0 -86
  135. package/dist-server/service/pallet-count/pallet-count-query.js.map +0 -1
  136. package/dist-server/service/pallet-count/pallet-count-types.js +0 -65
  137. package/dist-server/service/pallet-count/pallet-count-types.js.map +0 -1
  138. package/dist-server/service/pallet-count/pallet-count.js +0 -89
  139. package/dist-server/service/pallet-count/pallet-count.js.map +0 -1
  140. package/dist-server/service/pallet-history/index.js +0 -9
  141. package/dist-server/service/pallet-history/index.js.map +0 -1
  142. package/dist-server/service/pallet-history/pallet-history-mutation.js +0 -120
  143. package/dist-server/service/pallet-history/pallet-history-mutation.js.map +0 -1
  144. package/dist-server/service/pallet-history/pallet-history-query.js +0 -87
  145. package/dist-server/service/pallet-history/pallet-history-query.js.map +0 -1
  146. package/dist-server/service/pallet-history/pallet-history-types.js +0 -65
  147. package/dist-server/service/pallet-history/pallet-history-types.js.map +0 -1
  148. package/dist-server/service/pallet-history/pallet-history.js +0 -107
  149. package/dist-server/service/pallet-history/pallet-history.js.map +0 -1
  150. package/dist-server/service/product-detail-stock/index.js +0 -9
  151. package/dist-server/service/product-detail-stock/index.js.map +0 -1
  152. package/dist-server/service/product-detail-stock/product-detail-stock-mutation.js +0 -120
  153. package/dist-server/service/product-detail-stock/product-detail-stock-mutation.js.map +0 -1
  154. package/dist-server/service/product-detail-stock/product-detail-stock-query.js +0 -66
  155. package/dist-server/service/product-detail-stock/product-detail-stock-query.js.map +0 -1
  156. package/dist-server/service/product-detail-stock/product-detail-stock-types.js +0 -57
  157. package/dist-server/service/product-detail-stock/product-detail-stock-types.js.map +0 -1
  158. package/dist-server/service/product-detail-stock/product-detail-stock.js +0 -90
  159. package/dist-server/service/product-detail-stock/product-detail-stock.js.map +0 -1
  160. package/dist-server/service/reduced-inventory-history/index.js +0 -6
  161. package/dist-server/service/reduced-inventory-history/index.js.map +0 -1
  162. package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +0 -133
  163. package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +0 -1
  164. package/dist-server/service/tote/index.js +0 -9
  165. package/dist-server/service/tote/index.js.map +0 -1
  166. package/dist-server/service/tote/tote-mutation.js +0 -192
  167. package/dist-server/service/tote/tote-mutation.js.map +0 -1
  168. package/dist-server/service/tote/tote-query.js +0 -162
  169. package/dist-server/service/tote/tote-query.js.map +0 -1
  170. package/dist-server/service/tote/tote-types.js +0 -75
  171. package/dist-server/service/tote/tote-types.js.map +0 -1
  172. package/dist-server/service/tote/tote.js +0 -98
  173. package/dist-server/service/tote/tote.js.map +0 -1
  174. package/dist-server/service/warehouse/index.js +0 -9
  175. package/dist-server/service/warehouse/index.js.map +0 -1
  176. package/dist-server/service/warehouse/warehouse-mutation.js +0 -148
  177. package/dist-server/service/warehouse/warehouse-mutation.js.map +0 -1
  178. package/dist-server/service/warehouse/warehouse-query.js +0 -91
  179. package/dist-server/service/warehouse/warehouse-query.js.map +0 -1
  180. package/dist-server/service/warehouse/warehouse-types.js +0 -82
  181. package/dist-server/service/warehouse/warehouse-types.js.map +0 -1
  182. package/dist-server/service/warehouse/warehouse.js +0 -114
  183. package/dist-server/service/warehouse/warehouse.js.map +0 -1
  184. package/dist-server/utils/datetime-util.js +0 -61
  185. package/dist-server/utils/datetime-util.js.map +0 -1
  186. package/dist-server/utils/index.js +0 -20
  187. package/dist-server/utils/index.js.map +0 -1
  188. package/dist-server/utils/inventory-no-generator.js +0 -17
  189. package/dist-server/utils/inventory-no-generator.js.map +0 -1
  190. package/dist-server/utils/inventory-util.js +0 -413
  191. package/dist-server/utils/inventory-util.js.map +0 -1
@@ -1,238 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var _a, _b, _c, _d, _e, _f;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.InventoryHistory = void 0;
14
- const type_graphql_1 = require("type-graphql");
15
- const typeorm_1 = require("typeorm");
16
- const auth_base_1 = require("@things-factory/auth-base");
17
- const biz_base_1 = require("@things-factory/biz-base");
18
- const product_base_1 = require("@things-factory/product-base");
19
- const shell_1 = require("@things-factory/shell");
20
- const inventory_1 = require("../inventory/inventory");
21
- const location_1 = require("../location/location");
22
- const pallet_1 = require("../pallet/pallet");
23
- const warehouse_1 = require("../warehouse/warehouse");
24
- let InventoryHistory = class InventoryHistory {
25
- };
26
- __decorate([
27
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
28
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
29
- __metadata("design:type", String)
30
- ], InventoryHistory.prototype, "id", void 0);
31
- __decorate([
32
- (0, typeorm_1.Column)({ default: 0 }),
33
- (0, type_graphql_1.Field)(),
34
- __metadata("design:type", Number)
35
- ], InventoryHistory.prototype, "seq", void 0);
36
- __decorate([
37
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
38
- (0, type_graphql_1.Field)(),
39
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
40
- ], InventoryHistory.prototype, "domain", void 0);
41
- __decorate([
42
- (0, typeorm_1.RelationId)((inventoryHistory) => inventoryHistory.domain),
43
- __metadata("design:type", String)
44
- ], InventoryHistory.prototype, "domainId", void 0);
45
- __decorate([
46
- (0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
47
- (0, type_graphql_1.Field)(),
48
- __metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
49
- ], InventoryHistory.prototype, "bizplace", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ nullable: true }),
52
- (0, type_graphql_1.Field)({ nullable: true }),
53
- __metadata("design:type", String)
54
- ], InventoryHistory.prototype, "refOrderId", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({ nullable: true }),
57
- (0, type_graphql_1.Field)({ nullable: true }),
58
- __metadata("design:type", String)
59
- ], InventoryHistory.prototype, "orderNo", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)(),
62
- (0, type_graphql_1.Field)(),
63
- __metadata("design:type", String)
64
- ], InventoryHistory.prototype, "name", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)(),
67
- (0, type_graphql_1.Field)(),
68
- __metadata("design:type", String)
69
- ], InventoryHistory.prototype, "palletId", void 0);
70
- __decorate([
71
- (0, typeorm_1.Column)({ nullable: true }),
72
- (0, type_graphql_1.Field)({ nullable: true }),
73
- __metadata("design:type", String)
74
- ], InventoryHistory.prototype, "cartonId", void 0);
75
- __decorate([
76
- (0, typeorm_1.Column)({ nullable: true }),
77
- (0, type_graphql_1.Field)({ nullable: true }),
78
- __metadata("design:type", String)
79
- ], InventoryHistory.prototype, "batchId", void 0);
80
- __decorate([
81
- (0, typeorm_1.Column)({ nullable: true }),
82
- (0, type_graphql_1.Field)({ nullable: true }),
83
- __metadata("design:type", String)
84
- ], InventoryHistory.prototype, "batchIdRef", void 0);
85
- __decorate([
86
- (0, typeorm_1.ManyToOne)(type => pallet_1.Pallet, { nullable: true }),
87
- (0, type_graphql_1.Field)({ nullable: true }),
88
- __metadata("design:type", pallet_1.Pallet)
89
- ], InventoryHistory.prototype, "reusablePallet", void 0);
90
- __decorate([
91
- (0, typeorm_1.ManyToOne)(type => product_base_1.Product, { nullable: true }),
92
- (0, type_graphql_1.Field)(type => product_base_1.Product, { nullable: true }),
93
- __metadata("design:type", typeof (_c = typeof product_base_1.Product !== "undefined" && product_base_1.Product) === "function" ? _c : Object)
94
- ], InventoryHistory.prototype, "product", void 0);
95
- __decorate([
96
- (0, typeorm_1.ManyToOne)(type => product_base_1.ProductDetail, { nullable: true }),
97
- (0, type_graphql_1.Field)(type => product_base_1.ProductDetail, { nullable: true }),
98
- __metadata("design:type", typeof (_d = typeof product_base_1.ProductDetail !== "undefined" && product_base_1.ProductDetail) === "function" ? _d : Object)
99
- ], InventoryHistory.prototype, "productDetail", void 0);
100
- __decorate([
101
- (0, typeorm_1.ManyToOne)(type => warehouse_1.Warehouse, { nullable: true }),
102
- (0, type_graphql_1.Field)({ nullable: true }),
103
- __metadata("design:type", warehouse_1.Warehouse)
104
- ], InventoryHistory.prototype, "warehouse", void 0);
105
- __decorate([
106
- (0, typeorm_1.ManyToOne)(type => location_1.Location, { nullable: true }),
107
- (0, type_graphql_1.Field)({ nullable: true }),
108
- __metadata("design:type", location_1.Location)
109
- ], InventoryHistory.prototype, "location", void 0);
110
- __decorate([
111
- (0, typeorm_1.Column)({ nullable: true }),
112
- (0, type_graphql_1.Field)({ nullable: true }),
113
- __metadata("design:type", String)
114
- ], InventoryHistory.prototype, "zone", void 0);
115
- __decorate([
116
- (0, typeorm_1.Column)({ nullable: true }),
117
- (0, type_graphql_1.Field)({ nullable: true }),
118
- __metadata("design:type", String)
119
- ], InventoryHistory.prototype, "orderRefNo", void 0);
120
- __decorate([
121
- (0, typeorm_1.Column)(),
122
- (0, type_graphql_1.Field)(),
123
- __metadata("design:type", String)
124
- ], InventoryHistory.prototype, "packingType", void 0);
125
- __decorate([
126
- (0, typeorm_1.Column)('float', { nullable: true, default: 1 }),
127
- (0, type_graphql_1.Field)({ nullable: true }),
128
- __metadata("design:type", Number)
129
- ], InventoryHistory.prototype, "packingSize", void 0);
130
- __decorate([
131
- (0, typeorm_1.Column)('float'),
132
- (0, type_graphql_1.Field)({ nullable: true }),
133
- __metadata("design:type", Number)
134
- ], InventoryHistory.prototype, "qty", void 0);
135
- __decorate([
136
- (0, typeorm_1.Column)('float', { default: 0, nullable: true }),
137
- (0, type_graphql_1.Field)({ nullable: true }),
138
- __metadata("design:type", Number)
139
- ], InventoryHistory.prototype, "openingQty", void 0);
140
- __decorate([
141
- (0, typeorm_1.Column)({ nullable: true }),
142
- (0, type_graphql_1.Field)({ nullable: true }),
143
- __metadata("design:type", String)
144
- ], InventoryHistory.prototype, "uom", void 0);
145
- __decorate([
146
- (0, typeorm_1.Column)('float', { nullable: true }),
147
- (0, type_graphql_1.Field)({ nullable: true }),
148
- __metadata("design:type", Number)
149
- ], InventoryHistory.prototype, "uomValue", void 0);
150
- __decorate([
151
- (0, typeorm_1.Column)('float', { default: 0, nullable: true }),
152
- (0, type_graphql_1.Field)({ nullable: true }),
153
- __metadata("design:type", Number)
154
- ], InventoryHistory.prototype, "openingUomValue", void 0);
155
- __decorate([
156
- (0, typeorm_1.Column)('float', { nullable: true }),
157
- (0, type_graphql_1.Field)({ nullable: true }),
158
- __metadata("design:type", Number)
159
- ], InventoryHistory.prototype, "unitCost", void 0);
160
- __decorate([
161
- (0, typeorm_1.Column)({ nullable: true }),
162
- (0, type_graphql_1.Field)({ nullable: true }),
163
- __metadata("design:type", String)
164
- ], InventoryHistory.prototype, "description", void 0);
165
- __decorate([
166
- (0, typeorm_1.Column)(),
167
- (0, type_graphql_1.Field)(),
168
- __metadata("design:type", String)
169
- ], InventoryHistory.prototype, "status", void 0);
170
- __decorate([
171
- (0, typeorm_1.Column)(),
172
- (0, type_graphql_1.Field)(),
173
- __metadata("design:type", String)
174
- ], InventoryHistory.prototype, "transactionType", void 0);
175
- __decorate([
176
- (0, typeorm_1.ManyToOne)(type => inventory_1.Inventory, { nullable: true }),
177
- (0, type_graphql_1.Field)(type => inventory_1.Inventory, { nullable: true }),
178
- __metadata("design:type", inventory_1.Inventory)
179
- ], InventoryHistory.prototype, "inventory", void 0);
180
- __decorate([
181
- (0, typeorm_1.Column)('date', { nullable: true }),
182
- (0, type_graphql_1.Field)(type => shell_1.ScalarDate, { nullable: true }),
183
- __metadata("design:type", Date)
184
- ], InventoryHistory.prototype, "expirationDate", void 0);
185
- __decorate([
186
- (0, typeorm_1.Column)('int', { nullable: true }),
187
- (0, type_graphql_1.Field)({ nullable: true }),
188
- __metadata("design:type", Number)
189
- ], InventoryHistory.prototype, "manufactureYear", void 0);
190
- __decorate([
191
- (0, typeorm_1.Column)('date', { nullable: true }),
192
- (0, type_graphql_1.Field)(type => shell_1.ScalarDate, { nullable: true }),
193
- __metadata("design:type", Date)
194
- ], InventoryHistory.prototype, "manufactureDate", void 0);
195
- __decorate([
196
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
197
- (0, type_graphql_1.Field)({ nullable: true }),
198
- __metadata("design:type", typeof (_e = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _e : Object)
199
- ], InventoryHistory.prototype, "creator", void 0);
200
- __decorate([
201
- (0, typeorm_1.RelationId)((inventoryHistory) => inventoryHistory.creator),
202
- __metadata("design:type", String)
203
- ], InventoryHistory.prototype, "creatorId", void 0);
204
- __decorate([
205
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
206
- (0, type_graphql_1.Field)({ nullable: true }),
207
- __metadata("design:type", typeof (_f = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _f : Object)
208
- ], InventoryHistory.prototype, "updater", void 0);
209
- __decorate([
210
- (0, typeorm_1.RelationId)((inventoryHistory) => inventoryHistory.updater),
211
- __metadata("design:type", String)
212
- ], InventoryHistory.prototype, "updaterId", void 0);
213
- __decorate([
214
- (0, typeorm_1.CreateDateColumn)(),
215
- (0, type_graphql_1.Field)({ nullable: true }),
216
- __metadata("design:type", Date)
217
- ], InventoryHistory.prototype, "createdAt", void 0);
218
- __decorate([
219
- (0, typeorm_1.UpdateDateColumn)(),
220
- (0, type_graphql_1.Field)({ nullable: true }),
221
- __metadata("design:type", Date)
222
- ], InventoryHistory.prototype, "updatedAt", void 0);
223
- InventoryHistory = __decorate([
224
- (0, typeorm_1.Entity)(),
225
- (0, typeorm_1.Index)('ix_inventory-history_0', (inventoryHistory) => [inventoryHistory.domain, inventoryHistory.name], { unique: true }),
226
- (0, typeorm_1.Index)('ix_inventory-history_1', (inventoryHistory) => [
227
- inventoryHistory.domain,
228
- inventoryHistory.palletId
229
- ]),
230
- (0, typeorm_1.Index)('ix_inventory-history_2', (inventoryHistory) => [
231
- inventoryHistory.inventory,
232
- inventoryHistory.transactionType,
233
- inventoryHistory.refOrderId
234
- ]),
235
- (0, type_graphql_1.ObjectType)()
236
- ], InventoryHistory);
237
- exports.InventoryHistory = InventoryHistory;
238
- //# sourceMappingURL=inventory-history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inventory-history.js","sourceRoot":"","sources":["../../../server/service/inventory-history/inventory-history.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAIqB;AACrB,qCASgB;AAEhB,yDAAgD;AAChD,uDAAmD;AACnD,+DAGqC;AACrC,iDAG8B;AAE9B,sDAAkD;AAClD,mDAA+C;AAC/C,6CAAyC;AACzC,sDAAkD;AAkB3C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAgK5B,CAAA;AA/JC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;4CACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtB,IAAA,oBAAK,GAAE;;6CACG;AAEX;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,GAAE;kDACA,cAAM,oBAAN,cAAM;gDAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC;;kDAC5D;AAEhB;IAAC,IAAA,mBAAS,EAAC,IAAI,CA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EAAE,CAAC;kDACjB,gBAAI,oBAAJ,gBAAI;iDAAA;AAEb;IAAC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC;;mDAC5D;AAEjB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;mDAAA;AAEf;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;mDAAA;AA/JJ,gBAAgB;IAhB5B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,wBAAwB,EACxB,CAAC,gBAAkC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,EACxF,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,gBAAkC,EAAE,EAAE,CAAC;QACvE,gBAAgB,CAAC,MAAM;QACvB,gBAAgB,CAAC,QAAQ;KAC1B,CAAC;IACD,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,gBAAkC,EAAE,EAAE,CAAC;QACvE,gBAAgB,CAAC,SAAS;QAC1B,gBAAgB,CAAC,eAAe;QAChC,gBAAgB,CAAC,UAAU;KAC5B,CAAC;IACD,IAAA,yBAAU,GAAE;GACA,gBAAgB,CAgK5B;AAhKY,4CAAgB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const inventory_item_1 = require("./inventory-item");
5
- const inventory_item_mutation_1 = require("./inventory-item-mutation");
6
- const inventory_item_query_1 = require("./inventory-item-query");
7
- exports.entities = [inventory_item_1.InventoryItem];
8
- exports.resolvers = [inventory_item_query_1.InventoryItemQuery, inventory_item_mutation_1.InventoryItemMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/inventory-item/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,uEAAiE;AACjE,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA"}
@@ -1,274 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.InventoryItemMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const constants_1 = require("../../constants");
19
- const utils_1 = require("../../utils");
20
- const inventory_item_1 = require("./inventory-item");
21
- const inventory_item_type_1 = require("./inventory-item-type");
22
- let InventoryItemMutation = class InventoryItemMutation {
23
- async createInventoryItem(inventoryItem, context) {
24
- const { domain, user, tx } = context.state;
25
- return await tx.getRepository(inventory_item_1.InventoryItem).save(Object.assign(Object.assign({}, inventoryItem), { domain, creator: user, updater: user }));
26
- }
27
- async updateInventoryItem(id, patch, context) {
28
- const { domain, user, tx } = context.state;
29
- const repository = tx.getRepository(inventory_item_1.InventoryItem);
30
- const inventoryItem = await repository.findOne({
31
- where: { domain, id }
32
- });
33
- return await repository.save(Object.assign(Object.assign(Object.assign({}, inventoryItem), patch), { updater: user }));
34
- }
35
- async updateInventoryItemSerialNumber(id, serialNumber, context) {
36
- try {
37
- const { domain, user, tx } = context.state;
38
- const repository = tx.getRepository(inventory_item_1.InventoryItem);
39
- const inventoryItem = await repository.findOne({
40
- where: { domain, id },
41
- relations: ['product']
42
- });
43
- const product = inventoryItem.product;
44
- const duplicatedSerialNumberCnt = await repository.count({
45
- domain,
46
- product,
47
- serialNumber
48
- });
49
- if (duplicatedSerialNumberCnt)
50
- throw new Error(`Serial Number ${serialNumber} is duplicated`);
51
- await repository.update({ id }, { serialNumber, updater: user });
52
- return true;
53
- }
54
- catch (error) {
55
- throw error;
56
- }
57
- }
58
- async updateMultipleInventoryItem(patches, context) {
59
- const { domain, user, tx } = context.state;
60
- let results = [];
61
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
62
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
63
- const inventoryItemRepo = tx.getRepository(inventory_item_1.InventoryItem);
64
- if (_createRecords.length > 0) {
65
- for (let i = 0; i < _createRecords.length; i++) {
66
- const newRecord = _createRecords[i];
67
- const result = await inventoryItemRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
68
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
69
- }
70
- }
71
- if (_updateRecords.length > 0) {
72
- for (let i = 0; i < _updateRecords.length; i++) {
73
- const newRecord = _updateRecords[i];
74
- const inventoryItem = await inventoryItemRepo.findOne(newRecord.id);
75
- const result = await inventoryItemRepo.save(Object.assign(Object.assign(Object.assign({}, inventoryItem), newRecord), { updater: user }));
76
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
77
- }
78
- }
79
- return results;
80
- }
81
- async deleteInventoryItem(id, context) {
82
- const { domain, tx } = context.state;
83
- await tx.getRepository(inventory_item_1.InventoryItem).delete({ domain, id });
84
- return true;
85
- }
86
- async deleteInventoryItems(ids, context) {
87
- const { domain, tx } = context.state;
88
- await tx.getRepository(inventory_item_1.InventoryItem).delete({
89
- domain,
90
- id: (0, typeorm_1.In)(ids)
91
- });
92
- return true;
93
- }
94
- async replacePickedInventoryItem(selectedSerialNumber, newSerialNumber, context) {
95
- var _a, _b;
96
- const { domain, user, tx } = context.state;
97
- const repository = tx.getRepository(inventory_item_1.InventoryItem);
98
- const foundSerialNumber = await repository.findOne({
99
- where: { domain, serialNumber: newSerialNumber }
100
- });
101
- if ((selectedSerialNumber.source = constants_1.INVENTORY_ITEM_SOURCE.OUTBOUND)) {
102
- await tx.getRepository(inventory_item_1.InventoryItem).delete(selectedSerialNumber.id);
103
- }
104
- else {
105
- await repository.update({
106
- domain,
107
- id: selectedSerialNumber.id
108
- }, {
109
- status: constants_1.INVENTORY_STATUS.STORED,
110
- outboundOrderId: null,
111
- updater: user
112
- });
113
- }
114
- if (foundSerialNumber) {
115
- if (foundSerialNumber.productId !== ((_a = selectedSerialNumber.product) === null || _a === void 0 ? void 0 : _a.id)) {
116
- throw new Error('Invalid Serial Number');
117
- }
118
- if (foundSerialNumber.inventoryId !== ((_b = selectedSerialNumber.inventory) === null || _b === void 0 ? void 0 : _b.id)) {
119
- throw new Error('Serial Number Registered Under Different Inventory');
120
- }
121
- if (foundSerialNumber.status !== constants_1.INVENTORY_STATUS.STORED) {
122
- throw new Error('Inventory Item is not available');
123
- }
124
- foundSerialNumber.status = constants_1.INVENTORY_STATUS.PICKED;
125
- foundSerialNumber.updater = user;
126
- foundSerialNumber.outboundOrderId = selectedSerialNumber.outboundOrderId;
127
- return await repository.save(foundSerialNumber);
128
- }
129
- else {
130
- let inventoryItem = new inventory_item_1.InventoryItem();
131
- inventoryItem.name = utils_1.InventoryNoGenerator.inventoryItemName();
132
- inventoryItem.serialNumber = newSerialNumber;
133
- inventoryItem.status = constants_1.INVENTORY_STATUS.PICKED;
134
- inventoryItem.outboundOrderId = selectedSerialNumber.outboundOrderId;
135
- inventoryItem.product = selectedSerialNumber.product;
136
- inventoryItem.inventory = selectedSerialNumber.inventory;
137
- inventoryItem.domain = domain;
138
- return await repository.save(inventoryItem);
139
- }
140
- }
141
- async replacePackedInventoryItem(selectedSerialNumber, newSerialNumber, context) {
142
- var _a, _b;
143
- const { domain, user, tx } = context.state;
144
- const repository = tx.getRepository(inventory_item_1.InventoryItem);
145
- const foundSerialNumber = await repository.findOne({
146
- where: { domain, serialNumber: newSerialNumber }
147
- });
148
- if ((selectedSerialNumber.source = constants_1.INVENTORY_ITEM_SOURCE.OUTBOUND)) {
149
- await tx.getRepository(inventory_item_1.InventoryItem).delete(selectedSerialNumber.id);
150
- }
151
- else {
152
- await repository.update({
153
- domain,
154
- id: selectedSerialNumber.id
155
- }, {
156
- status: constants_1.INVENTORY_STATUS.STORED,
157
- outboundOrderId: null,
158
- updater: user
159
- });
160
- }
161
- if (foundSerialNumber) {
162
- if (foundSerialNumber.productId !== ((_a = selectedSerialNumber.product) === null || _a === void 0 ? void 0 : _a.id)) {
163
- throw new Error('Invalid Serial Number');
164
- }
165
- if (foundSerialNumber.inventoryId !== ((_b = selectedSerialNumber.inventory) === null || _b === void 0 ? void 0 : _b.id)) {
166
- throw new Error('Serial Number Registered Under Different Inventory');
167
- }
168
- if (foundSerialNumber.status !== constants_1.INVENTORY_STATUS.STORED) {
169
- throw new Error('Inventory Item is not available');
170
- }
171
- foundSerialNumber.status = constants_1.INVENTORY_STATUS.PACKED;
172
- foundSerialNumber.updater = user;
173
- foundSerialNumber.outboundOrderId = selectedSerialNumber.outboundOrderId;
174
- return await repository.save(foundSerialNumber);
175
- }
176
- else {
177
- let inventoryItem = new inventory_item_1.InventoryItem();
178
- inventoryItem.name = utils_1.InventoryNoGenerator.inventoryItemName();
179
- inventoryItem.serialNumber = newSerialNumber;
180
- inventoryItem.status = constants_1.INVENTORY_STATUS.PACKED;
181
- inventoryItem.source = constants_1.INVENTORY_ITEM_SOURCE.OUTBOUND;
182
- inventoryItem.outboundOrderId = selectedSerialNumber.outboundOrderId;
183
- inventoryItem.product = selectedSerialNumber.product;
184
- inventoryItem.inventory = selectedSerialNumber.inventory;
185
- inventoryItem.productDetail = selectedSerialNumber.productDetail;
186
- inventoryItem.orderPackageId = selectedSerialNumber.orderPackageId;
187
- inventoryItem.domain = domain;
188
- inventoryItem.creator = user;
189
- inventoryItem.updater = user;
190
- return await repository.save(inventoryItem);
191
- }
192
- }
193
- };
194
- __decorate([
195
- (0, type_graphql_1.Directive)('@transaction'),
196
- (0, type_graphql_1.Mutation)(returns => inventory_item_1.InventoryItem, { description: 'To create new InventoryItem' }),
197
- __param(0, (0, type_graphql_1.Arg)('inventoryItem')),
198
- __param(1, (0, type_graphql_1.Ctx)()),
199
- __metadata("design:type", Function),
200
- __metadata("design:paramtypes", [inventory_item_type_1.NewInventoryItem, Object]),
201
- __metadata("design:returntype", Promise)
202
- ], InventoryItemMutation.prototype, "createInventoryItem", null);
203
- __decorate([
204
- (0, type_graphql_1.Directive)('@transaction'),
205
- (0, type_graphql_1.Mutation)(returns => inventory_item_1.InventoryItem, { description: 'To modify InventoryItem information' }),
206
- __param(0, (0, type_graphql_1.Arg)('id')),
207
- __param(1, (0, type_graphql_1.Arg)('patch')),
208
- __param(2, (0, type_graphql_1.Ctx)()),
209
- __metadata("design:type", Function),
210
- __metadata("design:paramtypes", [String, inventory_item_type_1.InventoryItemPatch, Object]),
211
- __metadata("design:returntype", Promise)
212
- ], InventoryItemMutation.prototype, "updateInventoryItem", null);
213
- __decorate([
214
- (0, type_graphql_1.Directive)('@transaction'),
215
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To modify InventoryItem serial number' }),
216
- __param(0, (0, type_graphql_1.Arg)('id')),
217
- __param(1, (0, type_graphql_1.Arg)('serialNumber')),
218
- __param(2, (0, type_graphql_1.Ctx)()),
219
- __metadata("design:type", Function),
220
- __metadata("design:paramtypes", [String, String, Object]),
221
- __metadata("design:returntype", Promise)
222
- ], InventoryItemMutation.prototype, "updateInventoryItemSerialNumber", null);
223
- __decorate([
224
- (0, type_graphql_1.Directive)('@transaction'),
225
- (0, type_graphql_1.Mutation)(returns => [inventory_item_1.InventoryItem], { description: "To modify multiple InventoryItems' information" }),
226
- __param(0, (0, type_graphql_1.Arg)('patches', type => [inventory_item_type_1.InventoryItemPatch])),
227
- __param(1, (0, type_graphql_1.Ctx)()),
228
- __metadata("design:type", Function),
229
- __metadata("design:paramtypes", [Array, Object]),
230
- __metadata("design:returntype", Promise)
231
- ], InventoryItemMutation.prototype, "updateMultipleInventoryItem", null);
232
- __decorate([
233
- (0, type_graphql_1.Directive)('@transaction'),
234
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete InventoryItem' }),
235
- __param(0, (0, type_graphql_1.Arg)('id')),
236
- __param(1, (0, type_graphql_1.Ctx)()),
237
- __metadata("design:type", Function),
238
- __metadata("design:paramtypes", [String, Object]),
239
- __metadata("design:returntype", Promise)
240
- ], InventoryItemMutation.prototype, "deleteInventoryItem", null);
241
- __decorate([
242
- (0, type_graphql_1.Directive)('@transaction'),
243
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple inventoryItems' }),
244
- __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
245
- __param(1, (0, type_graphql_1.Ctx)()),
246
- __metadata("design:type", Function),
247
- __metadata("design:paramtypes", [Array, Object]),
248
- __metadata("design:returntype", Promise)
249
- ], InventoryItemMutation.prototype, "deleteInventoryItems", null);
250
- __decorate([
251
- (0, type_graphql_1.Directive)('@transaction'),
252
- (0, type_graphql_1.Mutation)(returns => inventory_item_1.InventoryItem, { description: 'To update picked InventoryItem with new IventoryItem' }),
253
- __param(0, (0, type_graphql_1.Arg)('selectedSerialNumber')),
254
- __param(1, (0, type_graphql_1.Arg)('newSerialNumber')),
255
- __param(2, (0, type_graphql_1.Ctx)()),
256
- __metadata("design:type", Function),
257
- __metadata("design:paramtypes", [inventory_item_type_1.InventoryItemPatch, String, Object]),
258
- __metadata("design:returntype", Promise)
259
- ], InventoryItemMutation.prototype, "replacePickedInventoryItem", null);
260
- __decorate([
261
- (0, type_graphql_1.Directive)('@transaction'),
262
- (0, type_graphql_1.Mutation)(returns => inventory_item_1.InventoryItem, { description: 'To update picked InventoryItem with new InventoryItem' }),
263
- __param(0, (0, type_graphql_1.Arg)('selectedSerialNumber')),
264
- __param(1, (0, type_graphql_1.Arg)('newSerialNumber')),
265
- __param(2, (0, type_graphql_1.Ctx)()),
266
- __metadata("design:type", Function),
267
- __metadata("design:paramtypes", [inventory_item_type_1.InventoryItemPatch, String, Object]),
268
- __metadata("design:returntype", Promise)
269
- ], InventoryItemMutation.prototype, "replacePackedInventoryItem", null);
270
- InventoryItemMutation = __decorate([
271
- (0, type_graphql_1.Resolver)(inventory_item_1.InventoryItem)
272
- ], InventoryItemMutation);
273
- exports.InventoryItemMutation = InventoryItemMutation;
274
- //# sourceMappingURL=inventory-item-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inventory-item-mutation.js","sourceRoot":"","sources":["../../../server/service/inventory-item/inventory-item-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAI5B,+CAAyE;AACzE,uCAAkD;AAClD,qDAAgD;AAChD,+DAA4E;AAGrE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAG1B,AAAN,KAAK,CAAC,mBAAmB,CACD,aAA+B,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,8BAAa,CAAC,CAAC,IAAI,iCAC5C,aAAa,KAChB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,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