@things-factory/warehouse-base 5.0.1 → 5.0.11

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 (156) hide show
  1. package/dist-server/constants/index.js +6 -19
  2. package/dist-server/constants/index.js.map +1 -1
  3. package/dist-server/constants/inventory.js.map +1 -1
  4. package/dist-server/constants/location.js.map +1 -1
  5. package/dist-server/constants/pallet.js.map +1 -1
  6. package/dist-server/constants/rule-type.js.map +1 -1
  7. package/dist-server/constants/tote.js.map +1 -1
  8. package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -1
  9. package/dist-server/controllers/ecommerce/index.js +3 -16
  10. package/dist-server/controllers/ecommerce/index.js.map +1 -1
  11. package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
  12. package/dist-server/controllers/index.js +3 -16
  13. package/dist-server/controllers/index.js.map +1 -1
  14. package/dist-server/controllers/warehouse-controller.js.map +1 -1
  15. package/dist-server/index.js +6 -19
  16. package/dist-server/index.js.map +1 -1
  17. package/dist-server/middlewares/index.js.map +1 -1
  18. package/dist-server/migrations/index.js.map +1 -1
  19. package/dist-server/service/index.js +28 -41
  20. package/dist-server/service/index.js.map +1 -1
  21. package/dist-server/service/inventory/index.js.map +1 -1
  22. package/dist-server/service/inventory/inventory-mutation.js +50 -61
  23. package/dist-server/service/inventory/inventory-mutation.js.map +1 -1
  24. package/dist-server/service/inventory/inventory-query.js +124 -135
  25. package/dist-server/service/inventory/inventory-query.js.map +1 -1
  26. package/dist-server/service/inventory/inventory-types.js +198 -206
  27. package/dist-server/service/inventory/inventory-types.js.map +1 -1
  28. package/dist-server/service/inventory/inventory.js +133 -141
  29. package/dist-server/service/inventory/inventory.js.map +1 -1
  30. package/dist-server/service/inventory-change/index.js.map +1 -1
  31. package/dist-server/service/inventory-change/inventory-change-mutation.js +51 -62
  32. package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -1
  33. package/dist-server/service/inventory-change/inventory-change-query.js +29 -40
  34. package/dist-server/service/inventory-change/inventory-change-query.js.map +1 -1
  35. package/dist-server/service/inventory-change/inventory-change-types.js +20 -28
  36. package/dist-server/service/inventory-change/inventory-change-types.js.map +1 -1
  37. package/dist-server/service/inventory-change/inventory-change.js +68 -76
  38. package/dist-server/service/inventory-change/inventory-change.js.map +1 -1
  39. package/dist-server/service/inventory-history/index.js.map +1 -1
  40. package/dist-server/service/inventory-history/inventory-history-mutation.js +33 -44
  41. package/dist-server/service/inventory-history/inventory-history-mutation.js.map +1 -1
  42. package/dist-server/service/inventory-history/inventory-history-query.js +105 -116
  43. package/dist-server/service/inventory-history/inventory-history-query.js.map +1 -1
  44. package/dist-server/service/inventory-history/inventory-history-types.js +282 -290
  45. package/dist-server/service/inventory-history/inventory-history-types.js.map +1 -1
  46. package/dist-server/service/inventory-history/inventory-history.js +82 -90
  47. package/dist-server/service/inventory-history/inventory-history.js.map +1 -1
  48. package/dist-server/service/inventory-item/index.js.map +1 -1
  49. package/dist-server/service/inventory-item/inventory-item-mutation.js +47 -58
  50. package/dist-server/service/inventory-item/inventory-item-mutation.js.map +1 -1
  51. package/dist-server/service/inventory-item/inventory-item-query.js +41 -52
  52. package/dist-server/service/inventory-item/inventory-item-query.js.map +1 -1
  53. package/dist-server/service/inventory-item/inventory-item-type.js +44 -52
  54. package/dist-server/service/inventory-item/inventory-item-type.js.map +1 -1
  55. package/dist-server/service/inventory-item/inventory-item.js +44 -52
  56. package/dist-server/service/inventory-item/inventory-item.js.map +1 -1
  57. package/dist-server/service/inventory-item-change/index.js.map +1 -1
  58. package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +33 -44
  59. package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +1 -1
  60. package/dist-server/service/inventory-item-change/inventory-item-change-query.js +29 -40
  61. package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +1 -1
  62. package/dist-server/service/inventory-item-change/inventory-item-change-type.js +40 -48
  63. package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +1 -1
  64. package/dist-server/service/inventory-item-change/inventory-item-change.js +34 -42
  65. package/dist-server/service/inventory-item-change/inventory-item-change.js.map +1 -1
  66. package/dist-server/service/inventory-product/index.js.map +1 -1
  67. package/dist-server/service/inventory-product/inventory-product-mutation.js +33 -44
  68. package/dist-server/service/inventory-product/inventory-product-mutation.js.map +1 -1
  69. package/dist-server/service/inventory-product/inventory-product-query.js +29 -40
  70. package/dist-server/service/inventory-product/inventory-product-query.js.map +1 -1
  71. package/dist-server/service/inventory-product/inventory-product-type.js +34 -42
  72. package/dist-server/service/inventory-product/inventory-product-type.js.map +1 -1
  73. package/dist-server/service/inventory-product/inventory-product.js +34 -42
  74. package/dist-server/service/inventory-product/inventory-product.js.map +1 -1
  75. package/dist-server/service/location/index.js.map +1 -1
  76. package/dist-server/service/location/location-mutation.js +39 -50
  77. package/dist-server/service/location/location-mutation.js.map +1 -1
  78. package/dist-server/service/location/location-query.js +65 -76
  79. package/dist-server/service/location/location-query.js.map +1 -1
  80. package/dist-server/service/location/location-types.js +105 -113
  81. package/dist-server/service/location/location-types.js.map +1 -1
  82. package/dist-server/service/location/location.js +41 -49
  83. package/dist-server/service/location/location.js.map +1 -1
  84. package/dist-server/service/movement/index.js.map +1 -1
  85. package/dist-server/service/movement/movement-mutation.js +21 -32
  86. package/dist-server/service/movement/movement-mutation.js.map +1 -1
  87. package/dist-server/service/movement/movement-query.js +51 -65
  88. package/dist-server/service/movement/movement-query.js.map +1 -1
  89. package/dist-server/service/movement/movement-types.js +43 -51
  90. package/dist-server/service/movement/movement-types.js.map +1 -1
  91. package/dist-server/service/movement/movement.js +30 -38
  92. package/dist-server/service/movement/movement.js.map +1 -1
  93. package/dist-server/service/pallet/index.js.map +1 -1
  94. package/dist-server/service/pallet/pallet-mutation.js +39 -50
  95. package/dist-server/service/pallet/pallet-mutation.js.map +1 -1
  96. package/dist-server/service/pallet/pallet-query.js +48 -59
  97. package/dist-server/service/pallet/pallet-query.js.map +1 -1
  98. package/dist-server/service/pallet/pallet-types.js +39 -47
  99. package/dist-server/service/pallet/pallet-types.js.map +1 -1
  100. package/dist-server/service/pallet/pallet.js +34 -42
  101. package/dist-server/service/pallet/pallet.js.map +1 -1
  102. package/dist-server/service/pallet-count/index.js.map +1 -1
  103. package/dist-server/service/pallet-count/pallet-count-mutation.js +39 -50
  104. package/dist-server/service/pallet-count/pallet-count-mutation.js.map +1 -1
  105. package/dist-server/service/pallet-count/pallet-count-query.js +28 -39
  106. package/dist-server/service/pallet-count/pallet-count-query.js.map +1 -1
  107. package/dist-server/service/pallet-count/pallet-count-types.js +20 -28
  108. package/dist-server/service/pallet-count/pallet-count-types.js.map +1 -1
  109. package/dist-server/service/pallet-count/pallet-count.js +26 -34
  110. package/dist-server/service/pallet-count/pallet-count.js.map +1 -1
  111. package/dist-server/service/pallet-history/index.js.map +1 -1
  112. package/dist-server/service/pallet-history/pallet-history-mutation.js +33 -44
  113. package/dist-server/service/pallet-history/pallet-history-mutation.js.map +1 -1
  114. package/dist-server/service/pallet-history/pallet-history-query.js +29 -40
  115. package/dist-server/service/pallet-history/pallet-history-query.js.map +1 -1
  116. package/dist-server/service/pallet-history/pallet-history-types.js +20 -28
  117. package/dist-server/service/pallet-history/pallet-history-types.js.map +1 -1
  118. package/dist-server/service/pallet-history/pallet-history.js +34 -42
  119. package/dist-server/service/pallet-history/pallet-history.js.map +1 -1
  120. package/dist-server/service/reduced-inventory-history/index.js.map +1 -1
  121. package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +52 -60
  122. package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +1 -1
  123. package/dist-server/service/tote/index.js.map +1 -1
  124. package/dist-server/service/tote/tote-mutation.js +46 -57
  125. package/dist-server/service/tote/tote-mutation.js.map +1 -1
  126. package/dist-server/service/tote/tote-query.js +44 -55
  127. package/dist-server/service/tote/tote-query.js.map +1 -1
  128. package/dist-server/service/tote/tote-types.js +24 -32
  129. package/dist-server/service/tote/tote-types.js.map +1 -1
  130. package/dist-server/service/tote/tote.js +30 -38
  131. package/dist-server/service/tote/tote.js.map +1 -1
  132. package/dist-server/service/warehouse/index.js.map +1 -1
  133. package/dist-server/service/warehouse/warehouse-mutation.js +33 -44
  134. package/dist-server/service/warehouse/warehouse-mutation.js.map +1 -1
  135. package/dist-server/service/warehouse/warehouse-query.js +29 -40
  136. package/dist-server/service/warehouse/warehouse-query.js.map +1 -1
  137. package/dist-server/service/warehouse/warehouse-types.js +28 -36
  138. package/dist-server/service/warehouse/warehouse-types.js.map +1 -1
  139. package/dist-server/service/warehouse/warehouse.js +31 -39
  140. package/dist-server/service/warehouse/warehouse.js.map +1 -1
  141. package/dist-server/tsconfig.tsbuildinfo +1 -0
  142. package/dist-server/utils/datetime-util.js.map +1 -1
  143. package/dist-server/utils/index.js +4 -17
  144. package/dist-server/utils/index.js.map +1 -1
  145. package/dist-server/utils/inventory-no-generator.js.map +1 -1
  146. package/dist-server/utils/inventory-util.js.map +1 -1
  147. package/package.json +8 -8
  148. package/server/service/inventory/inventory-mutation.ts +2 -2
  149. package/server/service/inventory/inventory-query.ts +2 -2
  150. package/server/service/inventory/inventory.ts +6 -5
  151. package/server/service/inventory-change/inventory-change-mutation.ts +1 -1
  152. package/server/service/inventory-change/inventory-change-query.ts +2 -2
  153. package/server/service/inventory-history/inventory-history-query.ts +29 -28
  154. package/server/service/inventory-history/inventory-history.ts +39 -39
  155. package/server/service/inventory-item/inventory-item-mutation.ts +3 -3
  156. package/server/service/movement/movement-query.ts +3 -6
@@ -1,64 +1,56 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.PalletCountPatch = exports.PalletCountList = exports.NewPalletCount = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const pallet_count_1 = require("./pallet-count");
15
7
  let NewPalletCount = class NewPalletCount {
16
8
  };
17
- __decorate([
9
+ tslib_1.__decorate([
18
10
  (0, type_graphql_1.Field)(),
19
- __metadata("design:type", String)
11
+ tslib_1.__metadata("design:type", String)
20
12
  ], NewPalletCount.prototype, "name", void 0);
21
- __decorate([
13
+ tslib_1.__decorate([
22
14
  (0, type_graphql_1.Field)({ nullable: true }),
23
- __metadata("design:type", String)
15
+ tslib_1.__metadata("design:type", String)
24
16
  ], NewPalletCount.prototype, "description", void 0);
25
- NewPalletCount = __decorate([
17
+ NewPalletCount = tslib_1.__decorate([
26
18
  (0, type_graphql_1.InputType)()
27
19
  ], NewPalletCount);
28
20
  exports.NewPalletCount = NewPalletCount;
29
21
  let PalletCountList = class PalletCountList {
30
22
  };
31
- __decorate([
23
+ tslib_1.__decorate([
32
24
  (0, type_graphql_1.Field)(type => [pallet_count_1.PalletCount], { nullable: true }),
33
- __metadata("design:type", Array)
25
+ tslib_1.__metadata("design:type", Array)
34
26
  ], PalletCountList.prototype, "items", void 0);
35
- __decorate([
27
+ tslib_1.__decorate([
36
28
  (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
37
- __metadata("design:type", Number)
29
+ tslib_1.__metadata("design:type", Number)
38
30
  ], PalletCountList.prototype, "total", void 0);
39
- PalletCountList = __decorate([
31
+ PalletCountList = tslib_1.__decorate([
40
32
  (0, type_graphql_1.ObjectType)()
41
33
  ], PalletCountList);
42
34
  exports.PalletCountList = PalletCountList;
43
35
  let PalletCountPatch = class PalletCountPatch {
44
36
  };
45
- __decorate([
37
+ tslib_1.__decorate([
46
38
  (0, type_graphql_1.Field)({ nullable: true }),
47
- __metadata("design:type", String)
39
+ tslib_1.__metadata("design:type", String)
48
40
  ], PalletCountPatch.prototype, "id", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, type_graphql_1.Field)({ nullable: true }),
51
- __metadata("design:type", String)
43
+ tslib_1.__metadata("design:type", String)
52
44
  ], PalletCountPatch.prototype, "name", void 0);
53
- __decorate([
45
+ tslib_1.__decorate([
54
46
  (0, type_graphql_1.Field)({ nullable: true }),
55
- __metadata("design:type", String)
47
+ tslib_1.__metadata("design:type", String)
56
48
  ], PalletCountPatch.prototype, "description", void 0);
57
- __decorate([
49
+ tslib_1.__decorate([
58
50
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", String)
51
+ tslib_1.__metadata("design:type", String)
60
52
  ], PalletCountPatch.prototype, "cuFlag", void 0);
61
- PalletCountPatch = __decorate([
53
+ PalletCountPatch = tslib_1.__decorate([
62
54
  (0, type_graphql_1.InputType)()
63
55
  ], PalletCountPatch);
64
56
  exports.PalletCountPatch = PalletCountPatch;
@@ -1 +1 @@
1
- {"version":3,"file":"pallet-count-types.js","sourceRoot":"","sources":["../../../server/service/pallet-count/pallet-count-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgE;AAEhE,iDAA4C;AAG5C,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;4CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AALT,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAM1B;AANY,wCAAc;AAS3B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAM3B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,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B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACzB;AALH,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe;AAS5B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CAY5B,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACX;AAXJ,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAY5B;AAZY,4CAAgB","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { PalletCount } from './pallet-count'\n\n@InputType()\nexport class NewPalletCount {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class PalletCountList {\n @Field(type => [PalletCount], { nullable: true })\n items?: PalletCount[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class PalletCountPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n"]}
@@ -1,86 +1,78 @@
1
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
2
  var _a, _b, _c;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.PalletCount = void 0;
5
+ const tslib_1 = require("tslib");
14
6
  const type_graphql_1 = require("type-graphql");
15
7
  const typeorm_1 = require("typeorm");
16
8
  const auth_base_1 = require("@things-factory/auth-base");
17
9
  const shell_1 = require("@things-factory/shell");
18
10
  let PalletCount = class PalletCount {
19
11
  };
20
- __decorate([
12
+ tslib_1.__decorate([
21
13
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
14
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
- __metadata("design:type", String)
15
+ tslib_1.__metadata("design:type", String)
24
16
  ], PalletCount.prototype, "id", void 0);
25
- __decorate([
17
+ tslib_1.__decorate([
26
18
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
27
19
  (0, type_graphql_1.Field)(),
28
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
20
+ tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
29
21
  ], PalletCount.prototype, "domain", void 0);
30
- __decorate([
22
+ tslib_1.__decorate([
31
23
  (0, typeorm_1.RelationId)((palletCount) => palletCount.domain),
32
- __metadata("design:type", String)
24
+ tslib_1.__metadata("design:type", String)
33
25
  ], PalletCount.prototype, "domainId", void 0);
34
- __decorate([
26
+ tslib_1.__decorate([
35
27
  (0, typeorm_1.Column)(),
36
28
  (0, type_graphql_1.Field)(),
37
- __metadata("design:type", String)
29
+ tslib_1.__metadata("design:type", String)
38
30
  ], PalletCount.prototype, "name", void 0);
39
- __decorate([
31
+ tslib_1.__decorate([
40
32
  (0, typeorm_1.Column)({ default: 0 }),
41
33
  (0, type_graphql_1.Field)(),
42
- __metadata("design:type", Number)
34
+ tslib_1.__metadata("design:type", Number)
43
35
  ], PalletCount.prototype, "seq", void 0);
44
- __decorate([
36
+ tslib_1.__decorate([
45
37
  (0, typeorm_1.Column)({
46
38
  nullable: true
47
39
  }),
48
40
  (0, type_graphql_1.Field)({ nullable: true }),
49
- __metadata("design:type", String)
41
+ tslib_1.__metadata("design:type", String)
50
42
  ], PalletCount.prototype, "description", void 0);
51
- __decorate([
43
+ tslib_1.__decorate([
52
44
  (0, typeorm_1.CreateDateColumn)(),
53
45
  (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", Date)
46
+ tslib_1.__metadata("design:type", Date)
55
47
  ], PalletCount.prototype, "createdAt", void 0);
56
- __decorate([
48
+ tslib_1.__decorate([
57
49
  (0, typeorm_1.UpdateDateColumn)(),
58
50
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", Date)
51
+ tslib_1.__metadata("design:type", Date)
60
52
  ], PalletCount.prototype, "updatedAt", void 0);
61
- __decorate([
53
+ tslib_1.__decorate([
62
54
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
63
55
  nullable: true
64
56
  }),
65
57
  (0, type_graphql_1.Field)({ nullable: true }),
66
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
58
+ tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
67
59
  ], PalletCount.prototype, "creator", void 0);
68
- __decorate([
60
+ tslib_1.__decorate([
69
61
  (0, typeorm_1.RelationId)((palletCount) => palletCount.creator),
70
- __metadata("design:type", String)
62
+ tslib_1.__metadata("design:type", String)
71
63
  ], PalletCount.prototype, "creatorId", void 0);
72
- __decorate([
64
+ tslib_1.__decorate([
73
65
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
74
66
  nullable: true
75
67
  }),
76
68
  (0, type_graphql_1.Field)({ nullable: true }),
77
- __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
69
+ tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
78
70
  ], PalletCount.prototype, "updater", void 0);
79
- __decorate([
71
+ tslib_1.__decorate([
80
72
  (0, typeorm_1.RelationId)((palletCount) => palletCount.updater),
81
- __metadata("design:type", String)
73
+ tslib_1.__metadata("design:type", String)
82
74
  ], PalletCount.prototype, "updaterId", void 0);
83
- PalletCount = __decorate([
75
+ PalletCount = tslib_1.__decorate([
84
76
  (0, typeorm_1.Entity)(),
85
77
  (0, typeorm_1.Index)('ix_pallet-count_0', (palletCount) => [palletCount.domain, palletCount.name], { unique: true }),
86
78
  (0, type_graphql_1.ObjectType)()
@@ -1 +1 @@
1
- {"version":3,"file":"pallet-count.js","sourceRoot":"","sources":["../../../server/service/pallet-count/pallet-count.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAK9C,IAAa,WAAW,GAAxB,MAAa,WAAW;CAmDvB,CAAA;AAhDC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;uCACR;AAIV;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,GAAE;kDACA,cAAM,oBAAN,cAAM;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC;;6CAC7C;AAIhB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;yCACI;AAIZ;IAFC,IAAA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AI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACjB,gBAAI,oBAAJ,gBAAI;4CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC7C;AAMjB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACjB,gBAAI,oBAAJ,gBAAI;4CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC7C;AAlDN,WAAW;IAHvB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,mBAAmB,EAAE,CAAC,WAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClH,IAAA,yBAAU,GAAE;GACA,WAAW,CAmDvB;AAnDY,kCAAW","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\n@Entity()\n@Index('ix_pallet-count_0', (palletCount: PalletCount) => [palletCount.domain, palletCount.name], { unique: true })\n@ObjectType()\nexport class PalletCount {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n id: string\n\n @ManyToOne(type => Domain)\n @Field()\n domain: Domain\n\n @RelationId((palletCount: PalletCount) => palletCount.domain)\n domainId: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ default: 0 })\n @Field()\n seq: number\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((palletCount: PalletCount) => palletCount.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((palletCount: PalletCount) => palletCount.updater)\n updaterId: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/pallet-history/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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/pallet-history/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","sourcesContent":["import { PalletHistory } from './pallet-history'\nimport { PalletHistoryMutation } from './pallet-history-mutation'\nimport { PalletHistoryQuery } from './pallet-history-query'\n\nexport const entities = [PalletHistory]\nexport const resolvers = [PalletHistoryQuery, PalletHistoryMutation]\n"]}
@@ -1,18 +1,7 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
3
  exports.PalletHistoryMutation = void 0;
4
+ const tslib_1 = require("tslib");
16
5
  const type_graphql_1 = require("type-graphql");
17
6
  const typeorm_1 = require("typeorm");
18
7
  const pallet_history_1 = require("./pallet-history");
@@ -67,53 +56,53 @@ let PalletHistoryMutation = class PalletHistoryMutation {
67
56
  return true;
68
57
  }
69
58
  };
70
- __decorate([
59
+ tslib_1.__decorate([
71
60
  (0, type_graphql_1.Directive)('@transaction'),
72
61
  (0, type_graphql_1.Mutation)(returns => pallet_history_1.PalletHistory),
73
- __param(0, (0, type_graphql_1.Arg)('palletHistory')),
74
- __param(1, (0, type_graphql_1.Ctx)()),
75
- __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [pallet_history_types_1.NewPalletHistory, Object]),
77
- __metadata("design:returntype", Promise)
62
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('palletHistory')),
63
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
64
+ tslib_1.__metadata("design:type", Function),
65
+ tslib_1.__metadata("design:paramtypes", [pallet_history_types_1.NewPalletHistory, Object]),
66
+ tslib_1.__metadata("design:returntype", Promise)
78
67
  ], PalletHistoryMutation.prototype, "createPalletHistory", null);
79
- __decorate([
68
+ tslib_1.__decorate([
80
69
  (0, type_graphql_1.Directive)('@transaction'),
81
70
  (0, type_graphql_1.Mutation)(returns => pallet_history_1.PalletHistory),
82
- __param(0, (0, type_graphql_1.Arg)('name')),
83
- __param(1, (0, type_graphql_1.Arg)('patch')),
84
- __param(2, (0, type_graphql_1.Ctx)()),
85
- __metadata("design:type", Function),
86
- __metadata("design:paramtypes", [String, pallet_history_types_1.PalletHistoryPatch, Object]),
87
- __metadata("design:returntype", Promise)
71
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
72
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
73
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
74
+ tslib_1.__metadata("design:type", Function),
75
+ tslib_1.__metadata("design:paramtypes", [String, pallet_history_types_1.PalletHistoryPatch, Object]),
76
+ tslib_1.__metadata("design:returntype", Promise)
88
77
  ], PalletHistoryMutation.prototype, "updatePalletHistory", null);
89
- __decorate([
78
+ tslib_1.__decorate([
90
79
  (0, type_graphql_1.Directive)('@transaction'),
91
80
  (0, type_graphql_1.Mutation)(returns => [pallet_history_1.PalletHistory]),
92
- __param(0, (0, type_graphql_1.Arg)('patches', type => [pallet_history_types_1.PalletHistoryPatch])),
93
- __param(1, (0, type_graphql_1.Ctx)()),
94
- __metadata("design:type", Function),
95
- __metadata("design:paramtypes", [Array, Object]),
96
- __metadata("design:returntype", Promise)
81
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [pallet_history_types_1.PalletHistoryPatch])),
82
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
83
+ tslib_1.__metadata("design:type", Function),
84
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
85
+ tslib_1.__metadata("design:returntype", Promise)
97
86
  ], PalletHistoryMutation.prototype, "updateMultiplePalletHistory", null);
98
- __decorate([
87
+ tslib_1.__decorate([
99
88
  (0, type_graphql_1.Directive)('@transaction'),
100
89
  (0, type_graphql_1.Mutation)(returns => Boolean),
101
- __param(0, (0, type_graphql_1.Arg)('name')),
102
- __param(1, (0, type_graphql_1.Ctx)()),
103
- __metadata("design:type", Function),
104
- __metadata("design:paramtypes", [String, Object]),
105
- __metadata("design:returntype", Promise)
90
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
91
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
92
+ tslib_1.__metadata("design:type", Function),
93
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
94
+ tslib_1.__metadata("design:returntype", Promise)
106
95
  ], PalletHistoryMutation.prototype, "deletePalletHistory", null);
107
- __decorate([
96
+ tslib_1.__decorate([
108
97
  (0, type_graphql_1.Directive)('@transaction'),
109
98
  (0, type_graphql_1.Mutation)(returns => Boolean),
110
- __param(0, (0, type_graphql_1.Arg)('names', type => [String])),
111
- __param(1, (0, type_graphql_1.Ctx)()),
112
- __metadata("design:type", Function),
113
- __metadata("design:paramtypes", [Array, Object]),
114
- __metadata("design:returntype", Promise)
99
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('names', type => [String])),
100
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
101
+ tslib_1.__metadata("design:type", Function),
102
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
103
+ tslib_1.__metadata("design:returntype", Promise)
115
104
  ], PalletHistoryMutation.prototype, "deletePalletHistories", null);
116
- PalletHistoryMutation = __decorate([
105
+ PalletHistoryMutation = tslib_1.__decorate([
117
106
  (0, type_graphql_1.Resolver)(pallet_history_1.PalletHistory)
118
107
  ], PalletHistoryMutation);
119
108
  exports.PalletHistoryMutation = PalletHistoryMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"pallet-history-mutation.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAK3C,qDAAgD;AAChD,iEAA6E;AAG7E,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAGhC,KAAK,CAAC,mBAAmB,CACD,aAA+B,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,OAAO,MAAM,EAAE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AS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACA,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;kEAQlF;AAtGU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,qBAAqB,CAuGjC;AAvGY,sDAAqB"}
1
+ {"version":3,"file":"pallet-history-mutation.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA2C;AAK3C,qDAAgD;AAChD,iEAA6E;AAG7E,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAGhC,KAAK,CAAC,mBAAmB,CACD,aAA+B,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,8BAAa,CAAC,CAAC,IAAI,iCAC5C,aAAa,KAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,mBAAmB,CACV,IAAY,EACX,KAAyB,EAChC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,8BAAa,CAAC,CAAA;QAClD,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;SAChC,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,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,OAAO,CAAC,EAAE,CAAC,8BAAa,CAAC;IAEhC,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,yCAAkB;;gEAexC;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,CAAC;IAElC,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,yCAAkB,CAAC,CAAC,CAAA;IAC5C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wEAuCP;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACF,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gEAK1D;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACA,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;kEAQlF;AAtGU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,qBAAqB,CAuGjC;AAvGY,sDAAqB","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { EntityManager, In } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { PalletHistory } from './pallet-history'\nimport { NewPalletHistory, PalletHistoryPatch } from './pallet-history-types'\n\n@Resolver(PalletHistory)\nexport class PalletHistoryMutation {\n @Directive('@transaction')\n @Mutation(returns => PalletHistory)\n async createPalletHistory(\n @Arg('palletHistory') palletHistory: NewPalletHistory,\n @Ctx() context: any\n ): Promise<PalletHistory> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n return await tx.getRepository(PalletHistory).save({\n ...palletHistory,\n domain: domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => PalletHistory)\n async updatePalletHistory(\n @Arg('name') name: string,\n @Arg('patch') patch: PalletHistoryPatch,\n @Ctx() context: any\n ): Promise<PalletHistory> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const repository = tx.getRepository(PalletHistory)\n const palletHistory = await repository.findOne({\n where: { domain: domain, name }\n })\n\n return await repository.save({\n ...palletHistory,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [PalletHistory])\n async updateMultiplePalletHistory(\n @Arg('patches', type => [PalletHistoryPatch]) patches: PalletHistoryPatch[],\n @Ctx() context: any\n ): Promise<PalletHistory[]> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const palletHistoryRepo = tx.getRepository(PalletHistory)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await palletHistoryRepo.save({\n ...newRecord,\n domain: domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const palletHistory = await palletHistoryRepo.findOne(newRecord.id)\n\n const result = await palletHistoryRepo.save({\n ...palletHistory,\n ...newRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deletePalletHistory(@Arg('name') name: string, @Ctx() context: any): Promise<Boolean> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n await tx.getRepository(PalletHistory).delete({ domain: domain, name })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deletePalletHistories(@Arg('names', type => [String]) names: string[], @Ctx() context: any): Promise<Boolean> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n await tx.getRepository(PalletHistory).delete({\n domain: domain,\n name: In(names)\n })\n return true\n }\n}\n"]}
@@ -1,19 +1,8 @@
1
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
2
  var _a;
15
3
  Object.defineProperty(exports, "__esModule", { value: true });
16
4
  exports.PalletHistoryQuery = void 0;
5
+ const tslib_1 = require("tslib");
17
6
  const type_graphql_1 = require("type-graphql");
18
7
  const typeorm_1 = require("typeorm");
19
8
  const auth_base_1 = require("@things-factory/auth-base");
@@ -43,44 +32,44 @@ let PalletHistoryQuery = class PalletHistoryQuery {
43
32
  return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(palletHistory.creatorId);
44
33
  }
45
34
  };
46
- __decorate([
35
+ tslib_1.__decorate([
47
36
  (0, type_graphql_1.Query)(returns => pallet_history_types_1.PalletHistoryList),
48
- __param(0, (0, type_graphql_1.Args)()),
49
- __param(1, (0, type_graphql_1.Ctx)()),
50
- __metadata("design:type", Function),
51
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
52
- __metadata("design:returntype", Promise)
37
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
38
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
39
+ tslib_1.__metadata("design:type", Function),
40
+ tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
41
+ tslib_1.__metadata("design:returntype", Promise)
53
42
  ], PalletHistoryQuery.prototype, "palletHistories", null);
54
- __decorate([
43
+ tslib_1.__decorate([
55
44
  (0, type_graphql_1.Query)(returns => pallet_history_1.PalletHistory),
56
- __param(0, (0, type_graphql_1.Arg)('name')),
57
- __param(1, (0, type_graphql_1.Ctx)()),
58
- __metadata("design:type", Function),
59
- __metadata("design:paramtypes", [String, Object]),
60
- __metadata("design:returntype", Promise)
45
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
46
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
47
+ tslib_1.__metadata("design:type", Function),
48
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
49
+ tslib_1.__metadata("design:returntype", Promise)
61
50
  ], PalletHistoryQuery.prototype, "palletHistory", null);
62
- __decorate([
51
+ tslib_1.__decorate([
63
52
  (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
64
- __param(0, (0, type_graphql_1.Root)()),
65
- __metadata("design:type", Function),
66
- __metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
67
- __metadata("design:returntype", Promise)
53
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
54
+ tslib_1.__metadata("design:type", Function),
55
+ tslib_1.__metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
56
+ tslib_1.__metadata("design:returntype", Promise)
68
57
  ], PalletHistoryQuery.prototype, "domain", null);
69
- __decorate([
58
+ tslib_1.__decorate([
70
59
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
71
- __param(0, (0, type_graphql_1.Root)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
74
- __metadata("design:returntype", Promise)
60
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
61
+ tslib_1.__metadata("design:type", Function),
62
+ tslib_1.__metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
63
+ tslib_1.__metadata("design:returntype", Promise)
75
64
  ], PalletHistoryQuery.prototype, "updater", null);
76
- __decorate([
65
+ tslib_1.__decorate([
77
66
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
78
- __param(0, (0, type_graphql_1.Root)()),
79
- __metadata("design:type", Function),
80
- __metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
81
- __metadata("design:returntype", Promise)
67
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
68
+ tslib_1.__metadata("design:type", Function),
69
+ tslib_1.__metadata("design:paramtypes", [pallet_history_1.PalletHistory]),
70
+ tslib_1.__metadata("design:returntype", Promise)
82
71
  ], PalletHistoryQuery.prototype, "creator", null);
83
- PalletHistoryQuery = __decorate([
72
+ PalletHistoryQuery = tslib_1.__decorate([
84
73
  (0, type_graphql_1.Resolver)(pallet_history_1.PalletHistory)
85
74
  ], PalletHistoryQuery);
86
75
  exports.PalletHistoryQuery = PalletHistoryQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"pallet-history-query.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,qDAAgD;A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AC,OAAO,CAAC,EAAE,CAAC,wCAAiB,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;yDAO9C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,8BAAa,CAAC;IACX,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDAOpD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAgB,8BAAa;;gDAEhD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAgB,8BAAa;;iDAEjD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAgB,8BAAa;;iDAEjD;AAlCU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,kBAAkB,CAmC9B;AAnCY,gDAAkB"}
1
+ {"version":3,"file":"pallet-history-query.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,qDAAgD;AAChD,iEAA0D;AAG1D,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAE7B,KAAK,CAAC,eAAe,CAAS,MAAiB,EAAS,OAAY;QAClE,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,8BAAa,CAA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AAC,MAAM,CAAC,CAAA;IAAgB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDAOpD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;gDAEhD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;iDAEjD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;iDAEjD;AAlCU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,kBAAkB,CAmC9B;AAnCY,gDAAkB","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, Domain, ListParam } from '@things-factory/shell'\n\nimport { PalletHistory } from './pallet-history'\nimport { PalletHistoryList } from './pallet-history-types'\n\n@Resolver(PalletHistory)\nexport class PalletHistoryQuery {\n @Query(returns => PalletHistoryList)\n async palletHistories(@Args() params: ListParam, @Ctx() context: any): Promise<PalletHistoryList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(PalletHistory).findAndCount({\n ...convertedParams,\n relations: ['domain', 'creator', 'updater']\n })\n return { items, total }\n }\n\n @Query(returns => PalletHistory)\n async palletHistory(@Arg('name') name: string, @Ctx() context: any): Promise<PalletHistory> {\n const { domain }: { domain: Domain } = context.state\n\n return await getRepository(PalletHistory).findOne({\n where: { domain: domain, name },\n relations: ['domain', 'creator', 'updater']\n })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() palletHistory: PalletHistory) {\n return await getRepository(Domain).findOne(palletHistory.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() palletHistory: PalletHistory) {\n return await getRepository(User).findOne(palletHistory.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() palletHistory: PalletHistory) {\n return await getRepository(User).findOne(palletHistory.creatorId)\n }\n}\n"]}
@@ -1,64 +1,56 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.PalletHistoryPatch = exports.PalletHistoryList = exports.NewPalletHistory = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const pallet_history_1 = require("./pallet-history");
15
7
  let NewPalletHistory = class NewPalletHistory {
16
8
  };
17
- __decorate([
9
+ tslib_1.__decorate([
18
10
  (0, type_graphql_1.Field)(),
19
- __metadata("design:type", String)
11
+ tslib_1.__metadata("design:type", String)
20
12
  ], NewPalletHistory.prototype, "name", void 0);
21
- __decorate([
13
+ tslib_1.__decorate([
22
14
  (0, type_graphql_1.Field)({ nullable: true }),
23
- __metadata("design:type", String)
15
+ tslib_1.__metadata("design:type", String)
24
16
  ], NewPalletHistory.prototype, "description", void 0);
25
- NewPalletHistory = __decorate([
17
+ NewPalletHistory = tslib_1.__decorate([
26
18
  (0, type_graphql_1.InputType)()
27
19
  ], NewPalletHistory);
28
20
  exports.NewPalletHistory = NewPalletHistory;
29
21
  let PalletHistoryList = class PalletHistoryList {
30
22
  };
31
- __decorate([
23
+ tslib_1.__decorate([
32
24
  (0, type_graphql_1.Field)(type => [pallet_history_1.PalletHistory], { nullable: true }),
33
- __metadata("design:type", Array)
25
+ tslib_1.__metadata("design:type", Array)
34
26
  ], PalletHistoryList.prototype, "items", void 0);
35
- __decorate([
27
+ tslib_1.__decorate([
36
28
  (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
37
- __metadata("design:type", Number)
29
+ tslib_1.__metadata("design:type", Number)
38
30
  ], PalletHistoryList.prototype, "total", void 0);
39
- PalletHistoryList = __decorate([
31
+ PalletHistoryList = tslib_1.__decorate([
40
32
  (0, type_graphql_1.ObjectType)()
41
33
  ], PalletHistoryList);
42
34
  exports.PalletHistoryList = PalletHistoryList;
43
35
  let PalletHistoryPatch = class PalletHistoryPatch {
44
36
  };
45
- __decorate([
37
+ tslib_1.__decorate([
46
38
  (0, type_graphql_1.Field)({ nullable: true }),
47
- __metadata("design:type", String)
39
+ tslib_1.__metadata("design:type", String)
48
40
  ], PalletHistoryPatch.prototype, "id", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, type_graphql_1.Field)({ nullable: true }),
51
- __metadata("design:type", String)
43
+ tslib_1.__metadata("design:type", String)
52
44
  ], PalletHistoryPatch.prototype, "name", void 0);
53
- __decorate([
45
+ tslib_1.__decorate([
54
46
  (0, type_graphql_1.Field)({ nullable: true }),
55
- __metadata("design:type", String)
47
+ tslib_1.__metadata("design:type", String)
56
48
  ], PalletHistoryPatch.prototype, "description", void 0);
57
- __decorate([
49
+ tslib_1.__decorate([
58
50
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", String)
51
+ tslib_1.__metadata("design:type", String)
60
52
  ], PalletHistoryPatch.prototype, "cuFlag", void 0);
61
- PalletHistoryPatch = __decorate([
53
+ PalletHistoryPatch = tslib_1.__decorate([
62
54
  (0, type_graphql_1.InputType)()
63
55
  ], PalletHistoryPatch);
64
56
  exports.PalletHistoryPatch = PalletHistoryPatch;
@@ -1 +1 @@
1
- {"version":3,"file":"pallet-history-types.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgE;AAEhE,qDAAgD;AAGhD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CAM5B,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;8CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AALT,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAM5B;AANY,4CAAgB;AAS7B,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;CAM7B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC5B;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACzB;AALH,iBAAiB;IAD7B,IAAA,yBAAU,GAAE;GACA,iBAAiB,CAM7B;AANY,8CAAiB;AAS9B,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;CAY9B,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACX;AAXJ,kBAAkB;IAD9B,IAAA,wBAAS,GAAE;GACC,kBAAkB,CAY9B;AAZY,gDAAkB"}
1
+ {"version":3,"file":"pallet-history-types.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAEhE,qDAAgD;AAGhD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CAM5B,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;8CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AALT,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAM5B;AANY,4CAAgB;AAS7B,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;CAM7B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC5B;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACzB;AALH,iBAAiB;IAD7B,IAAA,yBAAU,GAAE;GACA,iBAAiB,CAM7B;AANY,8CAAiB;AAS9B,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;CAY9B,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACX;AAXJ,kBAAkB;IAD9B,IAAA,wBAAS,GAAE;GACC,kBAAkB,CAY9B;AAZY,gDAAkB","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { PalletHistory } from './pallet-history'\n\n@InputType()\nexport class NewPalletHistory {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class PalletHistoryList {\n @Field(type => [PalletHistory], { nullable: true })\n items?: PalletHistory[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class PalletHistoryPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n"]}