@things-factory/product-base 4.3.671 → 4.3.672

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 (111) hide show
  1. package/dist-server/constants/index.js +18 -0
  2. package/dist-server/constants/index.js.map +1 -0
  3. package/dist-server/constants/product.js +25 -0
  4. package/dist-server/constants/product.js.map +1 -0
  5. package/dist-server/controllers/index.js +1 -0
  6. package/dist-server/controllers/index.js.map +1 -0
  7. package/dist-server/index.js +19 -0
  8. package/dist-server/index.js.map +1 -0
  9. package/dist-server/middlewares/index.js +1 -0
  10. package/dist-server/middlewares/index.js.map +1 -0
  11. package/dist-server/migrations/index.js +12 -0
  12. package/dist-server/migrations/index.js.map +1 -0
  13. package/dist-server/service/index.js +74 -0
  14. package/dist-server/service/index.js.map +1 -0
  15. package/dist-server/service/product/index.js +10 -0
  16. package/dist-server/service/product/index.js.map +1 -0
  17. package/dist-server/service/product/product-mutation.js +408 -0
  18. package/dist-server/service/product/product-mutation.js.map +1 -0
  19. package/dist-server/service/product/product-query.js +373 -0
  20. package/dist-server/service/product/product-query.js.map +1 -0
  21. package/dist-server/service/product/product-types.js +618 -0
  22. package/dist-server/service/product/product-types.js.map +1 -0
  23. package/dist-server/service/product/product.js +615 -0
  24. package/dist-server/service/product/product.js.map +1 -0
  25. package/dist-server/service/product/validate-product.js +26 -0
  26. package/dist-server/service/product/validate-product.js.map +1 -0
  27. package/dist-server/service/product-barcode/index.js +9 -0
  28. package/dist-server/service/product-barcode/index.js.map +1 -0
  29. package/dist-server/service/product-barcode/product-barcode-mutation.js +120 -0
  30. package/dist-server/service/product-barcode/product-barcode-mutation.js.map +1 -0
  31. package/dist-server/service/product-barcode/product-barcode-query.js +87 -0
  32. package/dist-server/service/product-barcode/product-barcode-query.js.map +1 -0
  33. package/dist-server/service/product-barcode/product-barcode-type.js +63 -0
  34. package/dist-server/service/product-barcode/product-barcode-type.js.map +1 -0
  35. package/dist-server/service/product-barcode/product-barcode.js +104 -0
  36. package/dist-server/service/product-barcode/product-barcode.js.map +1 -0
  37. package/dist-server/service/product-bundle/index.js +9 -0
  38. package/dist-server/service/product-bundle/index.js.map +1 -0
  39. package/dist-server/service/product-bundle/product-bundle-mutation.js +130 -0
  40. package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -0
  41. package/dist-server/service/product-bundle/product-bundle-query.js +128 -0
  42. package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -0
  43. package/dist-server/service/product-bundle/product-bundle-types.js +85 -0
  44. package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -0
  45. package/dist-server/service/product-bundle/product-bundle.js +128 -0
  46. package/dist-server/service/product-bundle/product-bundle.js.map +1 -0
  47. package/dist-server/service/product-bundle-setting/index.js +9 -0
  48. package/dist-server/service/product-bundle-setting/index.js.map +1 -0
  49. package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +165 -0
  50. package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -0
  51. package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +113 -0
  52. package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -0
  53. package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +69 -0
  54. package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -0
  55. package/dist-server/service/product-bundle-setting/product-bundle-setting.js +63 -0
  56. package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -0
  57. package/dist-server/service/product-combination/index.js +9 -0
  58. package/dist-server/service/product-combination/index.js.map +1 -0
  59. package/dist-server/service/product-combination/product-combination-mutation.js +137 -0
  60. package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -0
  61. package/dist-server/service/product-combination/product-combination-query.js +86 -0
  62. package/dist-server/service/product-combination/product-combination-query.js.map +1 -0
  63. package/dist-server/service/product-combination/product-combination-type.js +83 -0
  64. package/dist-server/service/product-combination/product-combination-type.js.map +1 -0
  65. package/dist-server/service/product-combination/product-combination.js +133 -0
  66. package/dist-server/service/product-combination/product-combination.js.map +1 -0
  67. package/dist-server/service/product-combination-setting/index.js +9 -0
  68. package/dist-server/service/product-combination-setting/index.js.map +1 -0
  69. package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +221 -0
  70. package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -0
  71. package/dist-server/service/product-combination-setting/product-combination-setting-query.js +177 -0
  72. package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -0
  73. package/dist-server/service/product-combination-setting/product-combination-setting-type.js +75 -0
  74. package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -0
  75. package/dist-server/service/product-combination-setting/product-combination-setting.js +105 -0
  76. package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -0
  77. package/dist-server/service/product-detail/index.js +9 -0
  78. package/dist-server/service/product-detail/index.js.map +1 -0
  79. package/dist-server/service/product-detail/product-detail-mutation.js +374 -0
  80. package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -0
  81. package/dist-server/service/product-detail/product-detail-query.js +223 -0
  82. package/dist-server/service/product-detail/product-detail-query.js.map +1 -0
  83. package/dist-server/service/product-detail/product-detail-types.js +392 -0
  84. package/dist-server/service/product-detail/product-detail-types.js.map +1 -0
  85. package/dist-server/service/product-detail/product-detail.js +444 -0
  86. package/dist-server/service/product-detail/product-detail.js.map +1 -0
  87. package/dist-server/service/product-detail-bizplace-setting/index.js +9 -0
  88. package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -0
  89. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +118 -0
  90. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -0
  91. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +107 -0
  92. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -0
  93. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +99 -0
  94. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -0
  95. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +120 -0
  96. package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -0
  97. package/dist-server/service/product-set/index.js +9 -0
  98. package/dist-server/service/product-set/index.js.map +1 -0
  99. package/dist-server/service/product-set/product-set-mutation.js +146 -0
  100. package/dist-server/service/product-set/product-set-mutation.js.map +1 -0
  101. package/dist-server/service/product-set/product-set-query.js +136 -0
  102. package/dist-server/service/product-set/product-set-query.js.map +1 -0
  103. package/dist-server/service/product-set/product-set-types.js +77 -0
  104. package/dist-server/service/product-set/product-set-types.js.map +1 -0
  105. package/dist-server/service/product-set/product-set.js +118 -0
  106. package/dist-server/service/product-set/product-set.js.map +1 -0
  107. package/dist-server/utils/index.js +18 -0
  108. package/dist-server/utils/index.js.map +1 -0
  109. package/dist-server/utils/product-util.js +16 -0
  110. package/dist-server/utils/product-util.js.map +1 -0
  111. package/package.json +4 -4
@@ -0,0 +1,113 @@
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
+ var _a, _b;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProductBundleSettingQuery = void 0;
17
+ const type_graphql_1 = require("type-graphql");
18
+ const typeorm_1 = require("typeorm");
19
+ const biz_base_1 = require("@things-factory/biz-base");
20
+ const shell_1 = require("@things-factory/shell");
21
+ const product_1 = require("../product/product");
22
+ const product_bundle_setting_1 = require("./product-bundle-setting");
23
+ const product_bundle_setting_types_1 = require("./product-bundle-setting-types");
24
+ let ProductBundleSettingQuery = class ProductBundleSettingQuery {
25
+ async productBundleSettings(params, context) {
26
+ const convertedParams = (0, shell_1.convertListParams)(params);
27
+ const [items, total] = await (0, typeorm_1.getRepository)(product_bundle_setting_1.ProductBundleSetting).findAndCount(Object.assign({}, convertedParams));
28
+ return { items, total };
29
+ }
30
+ async productBundleSets(params, context) {
31
+ const { domain } = context.state;
32
+ const page = params.pagination.page;
33
+ const limit = params.pagination.limit;
34
+ const filters = params.filters.filter(x => x.name !== 'product_info' && x.name !== 'productBundleId');
35
+ const productBundleId = params.filters.find(x => x.name === 'productBundleId');
36
+ const productInfoFilter = params.filters.find(x => x.name === 'product_info');
37
+ const productInfoColumns = ['sku', 'name', 'description'];
38
+ params.filters = [...filters];
39
+ params.sortings = [
40
+ { name: 'prd.sku' },
41
+ { name: 'prdDet.gtin' },
42
+ ...params.sortings.map(sorting => {
43
+ const name = sorting.name.replace('product', '').toLowerCase();
44
+ return Object.assign(Object.assign({}, sorting), { name });
45
+ })
46
+ ];
47
+ if (!params.filters.find(filter => filter.name === 'bizplace_id')) {
48
+ let bizplace = await (0, typeorm_1.getRepository)(biz_base_1.Bizplace).findOne({ where: { domain } });
49
+ params.filters = [...filters, { name: 'bizplace_id', operator: 'in', value: [bizplace.id] }];
50
+ }
51
+ const qb = (0, typeorm_1.getRepository)(product_1.Product).createQueryBuilder('prd');
52
+ (0, shell_1.buildQuery)(qb, params, context);
53
+ qb.innerJoinAndSelect('product_details', 'prdDet', 'prdDet.product_id = prd.id');
54
+ qb.leftJoinAndSelect('product_bundle_settings', 'pbs', 'pbs.product_id = prd.id and pbs.product_detail_id = prdDet.id');
55
+ qb.leftJoinAndSelect('pbs.productBundle', 'pb');
56
+ if (productInfoFilter) {
57
+ qb.andWhere(new typeorm_1.Brackets(qb2 => {
58
+ productInfoColumns.forEach(filter => {
59
+ const condition = (0, shell_1.buildCondition)(qb.alias, filter, productInfoFilter.operator, productInfoFilter.value, productInfoFilter.relation, Object.keys(qb.getParameters()).length);
60
+ qb2.orWhere(condition.clause, condition.parameters);
61
+ });
62
+ }));
63
+ }
64
+ if (productBundleId && productBundleId.operator === 'eq') {
65
+ qb.andWhere('pb.id = :bundleId::uuid', {
66
+ bundleId: productBundleId.value
67
+ });
68
+ }
69
+ let productBundleSets = await qb
70
+ .getRawMany();
71
+ const total = productBundleSets.length;
72
+ productBundleSets = await qb
73
+ .offset((page - 1) * limit)
74
+ .limit(limit)
75
+ .getRawMany();
76
+ const items = productBundleSets.map(item => {
77
+ return Object.assign(Object.assign({}, item), { id: item.pbs_id, product: {
78
+ id: item.prd_id,
79
+ sku: item.prd_sku,
80
+ name: item.prd_name,
81
+ description: item.prd_description,
82
+ type: item.prd_type
83
+ }, productDetail: {
84
+ id: item.prdDet_id,
85
+ gtin: item.prdDet_gtin,
86
+ packingType: item.prdDet_packing_type,
87
+ packingSize: item.prdDet_packing_size
88
+ }, bundleQty: item.pbs_bundle_qty });
89
+ });
90
+ return { items, total };
91
+ }
92
+ };
93
+ __decorate([
94
+ (0, type_graphql_1.Query)(returns => product_bundle_setting_types_1.ProductBundleSettingList),
95
+ __param(0, (0, type_graphql_1.Args)()),
96
+ __param(1, (0, type_graphql_1.Ctx)()),
97
+ __metadata("design:type", Function),
98
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
99
+ __metadata("design:returntype", Promise)
100
+ ], ProductBundleSettingQuery.prototype, "productBundleSettings", null);
101
+ __decorate([
102
+ (0, type_graphql_1.Query)(returns => product_bundle_setting_types_1.ProductBundleSettingList),
103
+ __param(0, (0, type_graphql_1.Args)()),
104
+ __param(1, (0, type_graphql_1.Ctx)()),
105
+ __metadata("design:type", Function),
106
+ __metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
107
+ __metadata("design:returntype", Promise)
108
+ ], ProductBundleSettingQuery.prototype, "productBundleSets", null);
109
+ ProductBundleSettingQuery = __decorate([
110
+ (0, type_graphql_1.Resolver)(product_bundle_setting_1.ProductBundleSetting)
111
+ ], ProductBundleSettingQuery);
112
+ exports.ProductBundleSettingQuery = ProductBundleSettingQuery;
113
+ //# sourceMappingURL=product-bundle-setting-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-bundle-setting-query.js","sourceRoot":"","sources":["../../../server/service/product-bundle-setting/product-bundle-setting-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAyD;AACzD,qCAAqE;AAErE,uDAAmD;AACnD,iDAAwG;AAExG,gDAA4C;AAC5C,qEAA+D;AAC/D,iFAAyE;AAGlE,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAE9B,AAAN,KAAK,CAAC,qBAAqB,CAAS,MAAiB,EAAS,OAAY;QACxE,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,6CAAoB,CAAC,CAAC,YAAY,mBACxE,eAAe,EAClB,CAAA;QAEF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAS,MAAiB,EAAS,OAAY;QACpE,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAA;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,UAA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AAjB,iBAAS,oBAAT,iBAAS;;kEA8GhD;AA1HU,yBAAyB;IADrC,IAAA,uBAAQ,EAAC,6CAAoB,CAAC;GAClB,yBAAyB,CA2HrC;AA3HY,8DAAyB"}
@@ -0,0 +1,69 @@
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;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ProductBundleSettingPatch = exports.ProductBundleSettingList = void 0;
14
+ const type_graphql_1 = require("type-graphql");
15
+ const shell_1 = require("@things-factory/shell");
16
+ const product_bundle_setting_1 = require("./product-bundle-setting");
17
+ let ProductBundleSettingList = class ProductBundleSettingList {
18
+ };
19
+ __decorate([
20
+ (0, type_graphql_1.Field)(type => [product_bundle_setting_1.ProductBundleSetting], { nullable: true }),
21
+ __metadata("design:type", Array)
22
+ ], ProductBundleSettingList.prototype, "items", void 0);
23
+ __decorate([
24
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
25
+ __metadata("design:type", Number)
26
+ ], ProductBundleSettingList.prototype, "total", void 0);
27
+ ProductBundleSettingList = __decorate([
28
+ (0, type_graphql_1.ObjectType)()
29
+ ], ProductBundleSettingList);
30
+ exports.ProductBundleSettingList = ProductBundleSettingList;
31
+ let ProductBundleSettingPatch = class ProductBundleSettingPatch {
32
+ };
33
+ __decorate([
34
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], ProductBundleSettingPatch.prototype, "id", void 0);
37
+ __decorate([
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
40
+ ], ProductBundleSettingPatch.prototype, "product", void 0);
41
+ __decorate([
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ __metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
44
+ ], ProductBundleSettingPatch.prototype, "productDetail", void 0);
45
+ __decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ __metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
48
+ ], ProductBundleSettingPatch.prototype, "productBundle", void 0);
49
+ __decorate([
50
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
51
+ __metadata("design:type", Number)
52
+ ], ProductBundleSettingPatch.prototype, "bundleQty", void 0);
53
+ __decorate([
54
+ (0, type_graphql_1.Field)({ nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], ProductBundleSettingPatch.prototype, "packingType", void 0);
57
+ __decorate([
58
+ (0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], ProductBundleSettingPatch.prototype, "packingSize", void 0);
61
+ __decorate([
62
+ (0, type_graphql_1.Field)({ nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], ProductBundleSettingPatch.prototype, "cuFlag", void 0);
65
+ ProductBundleSettingPatch = __decorate([
66
+ (0, type_graphql_1.InputType)()
67
+ ], ProductBundleSettingPatch);
68
+ exports.ProductBundleSettingPatch = ProductBundleSettingPatch;
69
+ //# sourceMappingURL=product-bundle-setting-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-bundle-setting-types.js","sourceRoot":"","sources":["../../../server/service/product-bundle-setting/product-bundle-setting-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAA2E;AAE3E,iDAAiD;AAEjD,qEAA+D;AAGxD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAMpC,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,6CAAoB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC5B;AAE9B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACzB;AALH,wBAAwB;IADpC,IAAA,yBAAU,GAAE;GACA,wBAAwB,CAMpC;AANY,4DAAwB;AAS9B,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAwBrC,CAAA;AAvBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,iBAAS,oBAAT,iBAAS;0DAAA;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACV,iBAAS,oBAAT,iBAAS;gEAAA;AAEzB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACV,iBAAS,oBAAT,iBAAS;gEAAA;AAEzB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACrB;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACrB;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACX;AAvBJ,yBAAyB;IADrC,IAAA,wBAAS,GAAE;GACC,yBAAyB,CAwBrC;AAxBY,8DAAyB"}
@@ -0,0 +1,63 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ProductBundleSetting = void 0;
13
+ const type_graphql_1 = require("type-graphql");
14
+ const typeorm_1 = require("typeorm");
15
+ const product_bundle_1 = require("../product-bundle/product-bundle");
16
+ const product_detail_1 = require("../product-detail/product-detail");
17
+ const product_1 = require("../product/product");
18
+ let ProductBundleSetting = class ProductBundleSetting {
19
+ };
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], ProductBundleSetting.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(type => product_1.Product, { nullable: true }),
27
+ (0, type_graphql_1.Field)(type => product_1.Product, { nullable: true }),
28
+ __metadata("design:type", product_1.Product)
29
+ ], ProductBundleSetting.prototype, "product", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.ManyToOne)(type => product_detail_1.ProductDetail, { nullable: true }),
32
+ (0, type_graphql_1.Field)(type => product_detail_1.ProductDetail, { nullable: true }),
33
+ __metadata("design:type", product_detail_1.ProductDetail)
34
+ ], ProductBundleSetting.prototype, "productDetail", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(type => product_bundle_1.ProductBundle, { nullable: true }),
37
+ (0, type_graphql_1.Field)(type => product_bundle_1.ProductBundle, { nullable: true }),
38
+ __metadata("design:type", product_bundle_1.ProductBundle)
39
+ ], ProductBundleSetting.prototype, "productBundle", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ nullable: true }),
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], ProductBundleSetting.prototype, "bundleQty", void 0);
45
+ __decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], ProductBundleSetting.prototype, "productId", void 0);
49
+ __decorate([
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], ProductBundleSetting.prototype, "bundleId", void 0);
53
+ ProductBundleSetting = __decorate([
54
+ (0, typeorm_1.Entity)(),
55
+ (0, typeorm_1.Index)('ix_product_bundle_setting_0', (productBundleSetting) => [
56
+ productBundleSetting.product,
57
+ productBundleSetting.productDetail,
58
+ productBundleSetting.productBundle
59
+ ], { unique: true }),
60
+ (0, type_graphql_1.ObjectType)()
61
+ ], ProductBundleSetting);
62
+ exports.ProductBundleSetting = ProductBundleSetting;
63
+ //# sourceMappingURL=product-bundle-setting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-bundle-setting.js","sourceRoot":"","sources":["../../../server/service/product-bundle-setting/product-bundle-setting.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCAAkF;AAElF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zBN,oBAAoB;IAXhC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,6BAA6B,EAC7B,CAAC,oBAA0C,EAAE,EAAE,CAAC;QAC9C,oBAAoB,CAAC,OAAO;QAC5B,oBAAoB,CAAC,aAAa;QAClC,oBAAoB,CAAC,aAAa;KACnC,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,GAAE;GACA,oBAAoB,CA0BhC;AA1BY,oDAAoB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const product_combination_1 = require("./product-combination");
5
+ const product_combination_query_1 = require("./product-combination-query");
6
+ const product_combination_mutation_1 = require("./product-combination-mutation");
7
+ exports.entities = [product_combination_1.ProductCombination];
8
+ exports.resolvers = [product_combination_query_1.ProductCombinationQuery, product_combination_mutation_1.ProductCombinationMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product-combination/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,2EAAqE;AACrE,iFAA2E;AAE9D,QAAA,QAAQ,GAAG,CAAC,wCAAkB,CAAC,CAAA;AAC/B,QAAA,SAAS,GAAG,CAAC,mDAAuB,EAAE,yDAA0B,CAAC,CAAA"}
@@ -0,0 +1,137 @@
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.ProductCombinationMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const typeorm_1 = require("typeorm");
18
+ const product_detail_1 = require("../product-detail/product-detail");
19
+ const product_combination_1 = require("./product-combination");
20
+ const product_combination_type_1 = require("./product-combination-type");
21
+ let ProductCombinationMutation = class ProductCombinationMutation {
22
+ async createProductCombination(productCombination, context) {
23
+ const { domain, user, tx } = context.state;
24
+ return await tx.getRepository(product_combination_1.ProductCombination).save(Object.assign(Object.assign({}, productCombination), { domain, creator: user, updater: user }));
25
+ }
26
+ async updateProductCombination(id, patch, context) {
27
+ const { domain, user, tx } = context.state;
28
+ const repository = tx.getRepository(product_combination_1.ProductCombination);
29
+ const productCombination = await repository.findOne({
30
+ where: { domain, id }
31
+ });
32
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, productCombination), patch), { updater: user }));
33
+ }
34
+ async updateMultipleProductCombination(productDetailId, patches, context) {
35
+ const { domain, user, tx } = context.state;
36
+ let results = [];
37
+ const _createRecords = patches.filter((patch) => !patch.id);
38
+ const _updateRecords = patches.filter((patch) => patch.id);
39
+ const productDetailRepo = tx.getRepository(product_detail_1.ProductDetail);
40
+ const productCombinationRepo = tx.getRepository(product_combination_1.ProductCombination);
41
+ if (_createRecords.length > 0) {
42
+ for (let i = 0; i < _createRecords.length; i++) {
43
+ let newRecord = _createRecords[i];
44
+ const productDetail = await productDetailRepo.findOne({
45
+ where: { id: productDetailId },
46
+ relations: ['product']
47
+ });
48
+ delete newRecord.id;
49
+ if (!(newRecord === null || newRecord === void 0 ? void 0 : newRecord.status)) {
50
+ newRecord.status = product_combination_1.ProductCombinationStatus.INACTIVE;
51
+ }
52
+ const result = await productCombinationRepo.save(Object.assign(Object.assign({}, newRecord), { domain,
53
+ productDetail, product: productDetail.product, status: newRecord.status.toUpperCase(), creator: user, updater: user }));
54
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
55
+ }
56
+ }
57
+ if (_updateRecords.length > 0) {
58
+ for (let i = 0; i < _updateRecords.length; i++) {
59
+ const newRecord = _updateRecords[i];
60
+ const productCombination = await productCombinationRepo.findOne({ domain, id: newRecord.id });
61
+ if (newRecord.status) {
62
+ newRecord.status = newRecord.status.toUpperCase();
63
+ }
64
+ const result = await productCombinationRepo.save(Object.assign(Object.assign(Object.assign({}, productCombination), newRecord), { updater: user }));
65
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
66
+ }
67
+ }
68
+ return results;
69
+ }
70
+ async deleteProductCombination(id, context) {
71
+ const { user, tx } = context.state;
72
+ await tx.getRepository(product_combination_1.ProductCombination).update({ id }, { deletedAt: new Date(), deletedBy: user });
73
+ return true;
74
+ }
75
+ async deleteProductCombinations(ids, context) {
76
+ const { user, tx } = context.state;
77
+ const productCombinationRepo = tx.getRepository(product_combination_1.ProductCombination);
78
+ let productCombinations = await productCombinationRepo.find({ where: { id: (0, typeorm_1.In)(ids) } });
79
+ for (let i = 0; i < productCombinations.length; i++) {
80
+ const product = productCombinations[i];
81
+ await productCombinationRepo.save(Object.assign(Object.assign({}, product), { status: product_combination_1.ProductCombinationStatus.DELETED, updater: user }));
82
+ }
83
+ return true;
84
+ }
85
+ };
86
+ __decorate([
87
+ (0, type_graphql_1.Directive)('@transaction'),
88
+ (0, type_graphql_1.Mutation)(returns => product_combination_1.ProductCombination, { description: 'To create new ProductCombination' }),
89
+ __param(0, (0, type_graphql_1.Arg)('productCombination')),
90
+ __param(1, (0, type_graphql_1.Ctx)()),
91
+ __metadata("design:type", Function),
92
+ __metadata("design:paramtypes", [product_combination_type_1.NewProductCombination, Object]),
93
+ __metadata("design:returntype", Promise)
94
+ ], ProductCombinationMutation.prototype, "createProductCombination", null);
95
+ __decorate([
96
+ (0, type_graphql_1.Directive)('@transaction'),
97
+ (0, type_graphql_1.Mutation)(returns => product_combination_1.ProductCombination, { description: 'To modify ProductCombination information' }),
98
+ __param(0, (0, type_graphql_1.Arg)('id')),
99
+ __param(1, (0, type_graphql_1.Arg)('patch')),
100
+ __param(2, (0, type_graphql_1.Ctx)()),
101
+ __metadata("design:type", Function),
102
+ __metadata("design:paramtypes", [String, product_combination_type_1.ProductCombinationPatch, Object]),
103
+ __metadata("design:returntype", Promise)
104
+ ], ProductCombinationMutation.prototype, "updateProductCombination", null);
105
+ __decorate([
106
+ (0, type_graphql_1.Directive)('@transaction'),
107
+ (0, type_graphql_1.Mutation)(returns => [product_combination_1.ProductCombination], { description: "To modify multiple ProductCombinations' information" }),
108
+ __param(0, (0, type_graphql_1.Arg)('productDetailId', type => String)),
109
+ __param(1, (0, type_graphql_1.Arg)('patches', type => [product_combination_type_1.ProductCombinationPatch])),
110
+ __param(2, (0, type_graphql_1.Ctx)()),
111
+ __metadata("design:type", Function),
112
+ __metadata("design:paramtypes", [String, Array, Object]),
113
+ __metadata("design:returntype", Promise)
114
+ ], ProductCombinationMutation.prototype, "updateMultipleProductCombination", null);
115
+ __decorate([
116
+ (0, type_graphql_1.Directive)('@transaction'),
117
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ProductCombination' }),
118
+ __param(0, (0, type_graphql_1.Arg)('id')),
119
+ __param(1, (0, type_graphql_1.Ctx)()),
120
+ __metadata("design:type", Function),
121
+ __metadata("design:paramtypes", [String, Object]),
122
+ __metadata("design:returntype", Promise)
123
+ ], ProductCombinationMutation.prototype, "deleteProductCombination", null);
124
+ __decorate([
125
+ (0, type_graphql_1.Directive)('@transaction'),
126
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple productCombinations' }),
127
+ __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
128
+ __param(1, (0, type_graphql_1.Ctx)()),
129
+ __metadata("design:type", Function),
130
+ __metadata("design:paramtypes", [Array, Object]),
131
+ __metadata("design:returntype", Promise)
132
+ ], ProductCombinationMutation.prototype, "deleteProductCombinations", null);
133
+ ProductCombinationMutation = __decorate([
134
+ (0, type_graphql_1.Resolver)(product_combination_1.ProductCombination)
135
+ ], ProductCombinationMutation);
136
+ exports.ProductCombinationMutation = ProductCombinationMutation;
137
+ //# sourceMappingURL=product-combination-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-combination-mutation.js","sourceRoot":"","sources":["../../../server/service/product-combination/product-combination-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAAwC;AAExC,qEAAgE;AAChE,+DAAoF;AACpF,yEAA2F;AAGpF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAG/B,AAAN,KAAK,CAAC,wBAAwB,CACD,kBAAyC,EAC7D,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,wCAAkB,CAAC,CAAC,IAAI,iCACjD,kBAAkB,KACrB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,wBAAwB,CACjB,EAAU,EACP,KAA8B,EACrC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,wCAAkB,CAAC,CAAA;QACvD,MAAM,kBAAkB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,kBAAkB,GAClB,KAA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AA,IAAA,kBAAG,GAAE,CAAA;;6CADe,kDAAuB;;0EAe7C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,wCAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;IAE/G,WAAA,IAAA,kBAAG,EAAC,iBAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IACtC,WAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAuB,CAAC,CAAC,CAAA;IACjD,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;kFA0DP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;0EAK3D;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IACvD,WAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;2EAkBlF;AApIU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,0BAA0B,CAqItC;AArIY,gEAA0B"}
@@ -0,0 +1,86 @@
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
+ var _a;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProductCombinationQuery = void 0;
17
+ const type_graphql_1 = require("type-graphql");
18
+ const typeorm_1 = require("typeorm");
19
+ const auth_base_1 = require("@things-factory/auth-base");
20
+ const shell_1 = require("@things-factory/shell");
21
+ const product_combination_1 = require("./product-combination");
22
+ const product_combination_type_1 = require("./product-combination-type");
23
+ let ProductCombinationQuery = class ProductCombinationQuery {
24
+ async productCombination(name, context) {
25
+ const { domain, tx } = context.state;
26
+ return await tx.getRepository(product_combination_1.ProductCombination).findOne({
27
+ where: { domain, name }
28
+ });
29
+ }
30
+ async productCombinations(params, context) {
31
+ const convertedParams = (0, shell_1.convertListParams)(params);
32
+ const [items, total] = await (0, typeorm_1.getRepository)(product_combination_1.ProductCombination).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['product', 'productDetail'] }));
33
+ return { items, total };
34
+ }
35
+ async domain(productCombination) {
36
+ return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(productCombination.domainId);
37
+ }
38
+ async updater(productCombination) {
39
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productCombination.updaterId);
40
+ }
41
+ async creator(productCombination) {
42
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productCombination.creatorId);
43
+ }
44
+ };
45
+ __decorate([
46
+ (0, type_graphql_1.Query)(returns => product_combination_1.ProductCombination, { description: 'To fetch a ProductCombination' }),
47
+ __param(0, (0, type_graphql_1.Arg)('id')),
48
+ __param(1, (0, type_graphql_1.Ctx)()),
49
+ __metadata("design:type", Function),
50
+ __metadata("design:paramtypes", [String, Object]),
51
+ __metadata("design:returntype", Promise)
52
+ ], ProductCombinationQuery.prototype, "productCombination", null);
53
+ __decorate([
54
+ (0, type_graphql_1.Query)(returns => product_combination_type_1.ProductCombinationList, { description: 'To fetch multiple ProductCombinations' }),
55
+ __param(0, (0, type_graphql_1.Args)()),
56
+ __param(1, (0, type_graphql_1.Ctx)()),
57
+ __metadata("design:type", Function),
58
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
59
+ __metadata("design:returntype", Promise)
60
+ ], ProductCombinationQuery.prototype, "productCombinations", null);
61
+ __decorate([
62
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
63
+ __param(0, (0, type_graphql_1.Root)()),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", [product_combination_1.ProductCombination]),
66
+ __metadata("design:returntype", Promise)
67
+ ], ProductCombinationQuery.prototype, "domain", null);
68
+ __decorate([
69
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
70
+ __param(0, (0, type_graphql_1.Root)()),
71
+ __metadata("design:type", Function),
72
+ __metadata("design:paramtypes", [product_combination_1.ProductCombination]),
73
+ __metadata("design:returntype", Promise)
74
+ ], ProductCombinationQuery.prototype, "updater", null);
75
+ __decorate([
76
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
77
+ __param(0, (0, type_graphql_1.Root)()),
78
+ __metadata("design:type", Function),
79
+ __metadata("design:paramtypes", [product_combination_1.ProductCombination]),
80
+ __metadata("design:returntype", Promise)
81
+ ], ProductCombinationQuery.prototype, "creator", null);
82
+ ProductCombinationQuery = __decorate([
83
+ (0, type_graphql_1.Resolver)(product_combination_1.ProductCombination)
84
+ ], ProductCombinationQuery);
85
+ exports.ProductCombinationQuery = ProductCombinationQuery;
86
+ //# sourceMappingURL=product-combination-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-combination-query.js","sourceRoot":"","sources":["../../../server/service/product-combination/product-combination-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,+DAA0D;AAC1D,yEAAmE;AAG5D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,IAAY,EAAS,OAAY;QACnE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEpC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,wCAAkB,CAAC,CAAC,OAAO,CAAC;YACxD,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACxB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,mBAAmB,CAAS,MAAiB,EAAS,OAAY;QACtE,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,wCAAkB,CAAC,CAAC,YAAY,iCACtE,eAAe,KAClB,SAAS,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC,IACvC,CAAA;QAEF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,kBAAsC;QACzD,OAAO,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACzE,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,kBAAsC;QAC1D,OAAO,MAAM,IAAA,uBAAa,EAAC,gBAAI,CAA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
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;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ProductCombinationList = exports.ProductCombinationPatch = exports.NewProductCombination = void 0;
14
+ const type_graphql_1 = require("type-graphql");
15
+ const shell_1 = require("@things-factory/shell");
16
+ const product_combination_1 = require("./product-combination");
17
+ let NewProductCombination = class NewProductCombination {
18
+ };
19
+ __decorate([
20
+ (0, type_graphql_1.Field)(),
21
+ __metadata("design:type", String)
22
+ ], NewProductCombination.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, type_graphql_1.Field)({ nullable: true }),
25
+ __metadata("design:type", String)
26
+ ], NewProductCombination.prototype, "description", void 0);
27
+ __decorate([
28
+ (0, type_graphql_1.Field)(type => product_combination_1.ProductCombinationStatus, { nullable: true }),
29
+ __metadata("design:type", String)
30
+ ], NewProductCombination.prototype, "status", void 0);
31
+ NewProductCombination = __decorate([
32
+ (0, type_graphql_1.InputType)()
33
+ ], NewProductCombination);
34
+ exports.NewProductCombination = NewProductCombination;
35
+ let ProductCombinationPatch = class ProductCombinationPatch {
36
+ };
37
+ __decorate([
38
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], ProductCombinationPatch.prototype, "id", void 0);
41
+ __decorate([
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], ProductCombinationPatch.prototype, "name", void 0);
45
+ __decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], ProductCombinationPatch.prototype, "description", void 0);
49
+ __decorate([
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], ProductCombinationPatch.prototype, "status", void 0);
53
+ __decorate([
54
+ (0, type_graphql_1.Field)({ nullable: true }),
55
+ __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
56
+ ], ProductCombinationPatch.prototype, "product", void 0);
57
+ __decorate([
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ __metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
60
+ ], ProductCombinationPatch.prototype, "productDetail", void 0);
61
+ __decorate([
62
+ (0, type_graphql_1.Field)({ nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], ProductCombinationPatch.prototype, "cuFlag", void 0);
65
+ ProductCombinationPatch = __decorate([
66
+ (0, type_graphql_1.InputType)()
67
+ ], ProductCombinationPatch);
68
+ exports.ProductCombinationPatch = ProductCombinationPatch;
69
+ let ProductCombinationList = class ProductCombinationList {
70
+ };
71
+ __decorate([
72
+ (0, type_graphql_1.Field)(type => [product_combination_1.ProductCombination]),
73
+ __metadata("design:type", Array)
74
+ ], ProductCombinationList.prototype, "items", void 0);
75
+ __decorate([
76
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
77
+ __metadata("design:type", Number)
78
+ ], ProductCombinationList.prototype, "total", void 0);
79
+ ProductCombinationList = __decorate([
80
+ (0, type_graphql_1.ObjectType)()
81
+ ], ProductCombinationList);
82
+ exports.ProductCombinationList = ProductCombinationList;
83
+ //# sourceMappingURL=product-combination-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-combination-type.js","sourceRoot":"","sources":["../../../server/service/product-combination/product-combination-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