@things-factory/product-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.
- package/dist-server/constants/index.js +2 -15
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/product.js.map +1 -1
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +3 -16
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/service/index.js +17 -30
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/product/index.js.map +1 -1
- package/dist-server/service/product/product-mutation.js +61 -73
- package/dist-server/service/product/product-mutation.js.map +1 -1
- package/dist-server/service/product/product-query.js +78 -89
- package/dist-server/service/product/product-query.js.map +1 -1
- package/dist-server/service/product/product-types.js +261 -272
- package/dist-server/service/product/product-types.js.map +1 -1
- package/dist-server/service/product/product.js +179 -187
- package/dist-server/service/product/product.js.map +1 -1
- package/dist-server/service/product/validate-product.js +2 -4
- package/dist-server/service/product/validate-product.js.map +1 -1
- package/dist-server/service/product-bundle/index.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-mutation.js +33 -44
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-query.js +35 -46
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-types.js +30 -38
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle.js +40 -48
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -1
- package/dist-server/service/product-bundle-setting/index.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +27 -38
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +14 -25
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +23 -31
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js +16 -24
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -1
- package/dist-server/service/product-combination/index.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-mutation.js +34 -45
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-query.js +29 -40
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-type.js +28 -36
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -1
- package/dist-server/service/product-combination/product-combination.js +42 -50
- package/dist-server/service/product-combination/product-combination.js.map +1 -1
- package/dist-server/service/product-combination-setting/index.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +40 -51
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +35 -46
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +24 -32
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting.js +36 -44
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -1
- package/dist-server/service/product-detail/index.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-mutation.js +30 -51
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-query.js +33 -44
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-types.js +180 -188
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -1
- package/dist-server/service/product-detail/product-detail.js +127 -135
- package/dist-server/service/product-detail/product-detail.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +28 -39
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +29 -40
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +36 -44
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +32 -40
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -1
- package/dist-server/service/product-set/index.js.map +1 -1
- package/dist-server/service/product-set/product-set-mutation.js +33 -44
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -1
- package/dist-server/service/product-set/product-set-query.js +35 -46
- package/dist-server/service/product-set/product-set-query.js.map +1 -1
- package/dist-server/service/product-set/product-set-types.js +26 -34
- package/dist-server/service/product-set/product-set-types.js.map +1 -1
- package/dist-server/service/product-set/product-set.js +34 -42
- package/dist-server/service/product-set/product-set.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/index.js +2 -15
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/product-util.js.map +1 -1
- package/package.json +4 -4
- package/server/service/product/product-mutation.ts +2 -0
- package/server/service/product/product-query.ts +1 -1
- package/server/service/product/product.ts +2 -2
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./product"), exports);
|
|
18
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/constants/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/constants/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB","sourcesContent":["export * from './product'"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../server/constants/product.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,qBAAqB,GAAG;IACnC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,0BAA0B,GAAG;IACxC,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA"}
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../server/constants/product.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,qBAAqB,GAAG;IACnC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAEY,QAAA,0BAA0B,GAAG;IACxC,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAA","sourcesContent":["export const PRODUCT_STATUS = {\n ACTIVE: 'ACTIVE',\n DELETED: 'DELETED',\n INACTIVE: 'INACTIVE'\n}\n\nexport const PRODUCT_SET_STATUS = {\n ACTIVE: 'ACTIVE',\n DELETED: 'DELETED',\n INACTIVE: 'INACTIVE'\n}\n\nexport const PRODUCT_BUNDLE_STATUS = {\n ACTIVE: 'ACTIVE',\n DELETED: 'DELETED',\n INACTIVE: 'INACTIVE'\n}\n\nexport const PRODUCT_COMBINATION_STATUS = {\n ACTIVE: 'ACTIVE',\n ACTIVATED: 'ACTIVATED',\n DELETED: 'DELETED',\n INACTIVE: 'INACTIVE'\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/dist-server/index.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./service"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./migrations"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,uDAA4B","sourcesContent":["export * from './service'\nexport * from './migrations'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.schema = exports.entities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
18
5
|
const product_1 = require("./product");
|
|
19
6
|
const product_bundle_1 = require("./product-bundle");
|
|
20
7
|
const product_bundle_setting_1 = require("./product-bundle-setting");
|
|
@@ -24,23 +11,23 @@ const product_set_1 = require("./product-set");
|
|
|
24
11
|
const product_combination_1 = require("./product-combination");
|
|
25
12
|
const product_combination_setting_1 = require("./product-combination-setting");
|
|
26
13
|
/* EXPORT ENTITY TYPES */
|
|
27
|
-
__exportStar(require("./product-combination-setting/product-combination-setting"), exports);
|
|
28
|
-
__exportStar(require("./product-combination/product-combination"), exports);
|
|
29
|
-
__exportStar(require("./product/product"), exports);
|
|
30
|
-
__exportStar(require("./product-detail/product-detail"), exports);
|
|
31
|
-
__exportStar(require("./product-bundle/product-bundle"), exports);
|
|
32
|
-
__exportStar(require("./product-bundle-setting/product-bundle-setting"), exports);
|
|
33
|
-
__exportStar(require("./product-detail-bizplace-setting/product-detail-bizplace-setting"), exports);
|
|
34
|
-
__exportStar(require("./product-set/product-set"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./product-combination-setting/product-combination-setting"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./product-combination/product-combination"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./product/product"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./product-detail/product-detail"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./product-bundle/product-bundle"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./product-bundle-setting/product-bundle-setting"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./product-detail-bizplace-setting/product-detail-bizplace-setting"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./product-set/product-set"), exports);
|
|
35
22
|
/* EXPORT TYPES */
|
|
36
|
-
__exportStar(require("./product-combination/product-combination-type"), exports);
|
|
37
|
-
__exportStar(require("./product-combination-setting/product-combination-setting-type"), exports);
|
|
38
|
-
__exportStar(require("./product/product-types"), exports);
|
|
39
|
-
__exportStar(require("./product-detail/product-detail-types"), exports);
|
|
40
|
-
__exportStar(require("./product-bundle/product-bundle-types"), exports);
|
|
41
|
-
__exportStar(require("./product-bundle-setting/product-bundle-setting-types"), exports);
|
|
42
|
-
__exportStar(require("./product-detail-bizplace-setting/product-detail-bizplace-setting-types"), exports);
|
|
43
|
-
__exportStar(require("./product-set/product-set-types"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./product-combination/product-combination-type"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./product-combination-setting/product-combination-setting-type"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./product/product-types"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./product-detail/product-detail-types"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./product-bundle/product-bundle-types"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./product-bundle-setting/product-bundle-setting-types"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./product-detail-bizplace-setting/product-detail-bizplace-setting-types"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./product-set/product-set-types"), exports);
|
|
44
31
|
exports.entities = [
|
|
45
32
|
...product_1.entities,
|
|
46
33
|
...product_detail_1.entities,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,uCAAsF;AACtF,qDAAyG;AACzG,qEAGiC;AACjC,qDAAyG;AACzG,uFAG0C;AAC1C,+CAAgG;AAChG,+DAAwH;AACxH,+EAGsC;AAEtC,yBAAyB;AACzB,oGAAyE;AACzE,oFAAyD;AACzD,4DAAiC;AACjC,0EAA+C;AAC/C,0EAA+C;AAC/C,0FAA+D;AAC/D,4GAAiF;AACjF,oEAAyC;AAEzC,kBAAkB;AAClB,yFAA8D;AAC9D,yGAA8E;AAC9E,kEAAuC;AACvC,gFAAqD;AACrD,gFAAqD;AACrD,gGAAqE;AACrE,kHAAuF;AACvF,0EAA+C;AAElC,QAAA,QAAQ,GAAG;IACtB,GAAG,kBAAe;IAClB,GAAG,yBAAqB;IACxB,GAAG,yBAAqB;IACxB,GAAG,iCAA4B;IAC/B,GAAG,0CAAoC;IACvC,GAAG,sBAAkB;IACrB,GAAG,8BAA0B;IAC7B,GAAG,sCAAiC;CACrC,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,mBAAgB;QACnB,GAAG,0BAAsB;QACzB,GAAG,0BAAsB;QACzB,GAAG,kCAA6B;QAChC,GAAG,2CAAoC;QACvC,GAAG,uBAAmB;QACtB,GAAG,+BAA2B;QAC9B,GAAG,uCAAkC;KACtC;CACF,CAAA","sourcesContent":["import { entities as ProductEntities, resolvers as ProductResolvers } from './product'\nimport { entities as ProductBundleEntities, resolvers as ProductBundleResolvers } from './product-bundle'\nimport {\n entities as ProductBundleSettingEntities,\n resolvers as ProductBundleSettingResolvers\n} from './product-bundle-setting'\nimport { entities as ProductDetailEntities, resolvers as ProductDetailResolvers } from './product-detail'\nimport {\n entities as ProductDetailBizplaceSettingEntities,\n resolvers as ProductDetailBizplaceSettingResolver\n} from './product-detail-bizplace-setting'\nimport { entities as ProductSetEntities, resolvers as ProductSetResolvers } from './product-set'\nimport { entities as ProductCombinationEntities, resolvers as ProductCombinationResolvers } from './product-combination'\nimport {\n entities as ProductCombinationSettingEntities,\n resolvers as ProductCombinationSettingResolvers\n} from './product-combination-setting'\n\n/* EXPORT ENTITY TYPES */\nexport * from './product-combination-setting/product-combination-setting'\nexport * from './product-combination/product-combination'\nexport * from './product/product'\nexport * from './product-detail/product-detail'\nexport * from './product-bundle/product-bundle'\nexport * from './product-bundle-setting/product-bundle-setting'\nexport * from './product-detail-bizplace-setting/product-detail-bizplace-setting'\nexport * from './product-set/product-set'\n\n/* EXPORT TYPES */\nexport * from './product-combination/product-combination-type'\nexport * from './product-combination-setting/product-combination-setting-type'\nexport * from './product/product-types'\nexport * from './product-detail/product-detail-types'\nexport * from './product-bundle/product-bundle-types'\nexport * from './product-bundle-setting/product-bundle-setting-types'\nexport * from './product-detail-bizplace-setting/product-detail-bizplace-setting-types'\nexport * from './product-set/product-set-types'\n\nexport const entities = [\n ...ProductEntities,\n ...ProductDetailEntities,\n ...ProductBundleEntities,\n ...ProductBundleSettingEntities,\n ...ProductDetailBizplaceSettingEntities,\n ...ProductSetEntities,\n ...ProductCombinationEntities,\n ...ProductCombinationSettingEntities\n]\n\nexport const schema = {\n resolverClasses: [\n ...ProductResolvers,\n ...ProductDetailResolvers,\n ...ProductBundleResolvers,\n ...ProductBundleSettingResolvers,\n ...ProductDetailBizplaceSettingResolver,\n ...ProductSetResolvers,\n ...ProductCombinationResolvers,\n ...ProductCombinationSettingResolvers\n ]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,yDAAoD;AACpD,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,iBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,yDAAoD;AACpD,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,iBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA","sourcesContent":["import { Product } from './product'\nimport { ProductMutation } from './product-mutation'\nimport { ProductQuery } from './product-query'\n\nexport const entities = [Product]\nexport const resolvers = [ProductQuery, ProductMutation]\n"]}
|
|
@@ -1,22 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
-
};
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.updateProduct = exports.createProducts = exports.createProduct = exports.ProductMutation = void 0;
|
|
19
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const promises_all_1 = tslib_1.__importDefault(require("promises-all"));
|
|
20
6
|
const type_graphql_1 = require("type-graphql");
|
|
21
7
|
const typeorm_1 = require("typeorm");
|
|
22
8
|
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
@@ -157,94 +143,94 @@ let ProductMutation = class ProductMutation {
|
|
|
157
143
|
return true;
|
|
158
144
|
}
|
|
159
145
|
};
|
|
160
|
-
__decorate([
|
|
146
|
+
tslib_1.__decorate([
|
|
161
147
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
162
148
|
(0, type_graphql_1.Mutation)(returns => product_1.Product),
|
|
163
|
-
__param(0, (0, type_graphql_1.Arg)('product')),
|
|
164
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
165
|
-
__metadata("design:type", Function),
|
|
166
|
-
__metadata("design:paramtypes", [product_types_1.NewProduct, Object]),
|
|
167
|
-
__metadata("design:returntype", Promise)
|
|
149
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('product')),
|
|
150
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
151
|
+
tslib_1.__metadata("design:type", Function),
|
|
152
|
+
tslib_1.__metadata("design:paramtypes", [product_types_1.NewProduct, Object]),
|
|
153
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
168
154
|
], ProductMutation.prototype, "createProduct", null);
|
|
169
|
-
__decorate([
|
|
155
|
+
tslib_1.__decorate([
|
|
170
156
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
171
157
|
(0, type_graphql_1.Mutation)(returns => [product_1.Product]),
|
|
172
|
-
__param(0, (0, type_graphql_1.Arg)('products', type => [product_types_1.NewProduct])),
|
|
173
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
174
|
-
__metadata("design:type", Function),
|
|
175
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
176
|
-
__metadata("design:returntype", Promise)
|
|
158
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('products', type => [product_types_1.NewProduct])),
|
|
159
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
160
|
+
tslib_1.__metadata("design:type", Function),
|
|
161
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
162
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
177
163
|
], ProductMutation.prototype, "createProducts", null);
|
|
178
|
-
__decorate([
|
|
164
|
+
tslib_1.__decorate([
|
|
179
165
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
180
166
|
(0, type_graphql_1.Mutation)(returns => product_1.Product),
|
|
181
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
182
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
183
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
184
|
-
__metadata("design:type", Function),
|
|
185
|
-
__metadata("design:paramtypes", [String, product_types_1.ProductPatch, Object]),
|
|
186
|
-
__metadata("design:returntype", Promise)
|
|
167
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
168
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
169
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
170
|
+
tslib_1.__metadata("design:type", Function),
|
|
171
|
+
tslib_1.__metadata("design:paramtypes", [String, product_types_1.ProductPatch, Object]),
|
|
172
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
187
173
|
], ProductMutation.prototype, "updateProduct", null);
|
|
188
|
-
__decorate([
|
|
174
|
+
tslib_1.__decorate([
|
|
189
175
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
190
176
|
(0, type_graphql_1.Mutation)(returns => [product_1.Product]),
|
|
191
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
192
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
193
|
-
__metadata("design:type", Function),
|
|
194
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
195
|
-
__metadata("design:returntype", Promise)
|
|
177
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
178
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
179
|
+
tslib_1.__metadata("design:type", Function),
|
|
180
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
181
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
196
182
|
], ProductMutation.prototype, "importMultipleProduct", null);
|
|
197
|
-
__decorate([
|
|
183
|
+
tslib_1.__decorate([
|
|
198
184
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
199
185
|
(0, type_graphql_1.Mutation)(returns => [product_1.Product]),
|
|
200
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
201
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
202
|
-
__metadata("design:type", Function),
|
|
203
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
204
|
-
__metadata("design:returntype", Promise)
|
|
186
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
187
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
188
|
+
tslib_1.__metadata("design:type", Function),
|
|
189
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
190
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
205
191
|
], ProductMutation.prototype, "updateMultipleProduct", null);
|
|
206
|
-
__decorate([
|
|
192
|
+
tslib_1.__decorate([
|
|
207
193
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "mutation") '),
|
|
208
194
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
209
195
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
210
|
-
__param(0, (0, type_graphql_1.Arg)('productSetId')),
|
|
211
|
-
__param(1, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
212
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
213
|
-
__metadata("design:type", Function),
|
|
214
|
-
__metadata("design:paramtypes", [String, Array, Object]),
|
|
215
|
-
__metadata("design:returntype", Promise)
|
|
196
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('productSetId')),
|
|
197
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patches', type => [product_types_1.ProductPatch])),
|
|
198
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
199
|
+
tslib_1.__metadata("design:type", Function),
|
|
200
|
+
tslib_1.__metadata("design:paramtypes", [String, Array, Object]),
|
|
201
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
216
202
|
], ProductMutation.prototype, "linkProduct", null);
|
|
217
|
-
__decorate([
|
|
203
|
+
tslib_1.__decorate([
|
|
218
204
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "mutation") '),
|
|
219
205
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
220
206
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
221
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
222
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
223
|
-
__metadata("design:type", Function),
|
|
224
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
225
|
-
__metadata("design:returntype", Promise)
|
|
207
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
208
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
209
|
+
tslib_1.__metadata("design:type", Function),
|
|
210
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
211
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
226
212
|
], ProductMutation.prototype, "deleteProduct", null);
|
|
227
|
-
__decorate([
|
|
213
|
+
tslib_1.__decorate([
|
|
228
214
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "mutation") '),
|
|
229
215
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
230
216
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
231
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
232
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
233
|
-
__metadata("design:type", Function),
|
|
234
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
235
|
-
__metadata("design:returntype", Promise)
|
|
217
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
218
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
219
|
+
tslib_1.__metadata("design:type", Function),
|
|
220
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
221
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
236
222
|
], ProductMutation.prototype, "deleteProducts", null);
|
|
237
|
-
__decorate([
|
|
223
|
+
tslib_1.__decorate([
|
|
238
224
|
(0, type_graphql_1.Directive)('@privilege(category: "order", privilege: "mutation") '),
|
|
239
225
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
240
226
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
241
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
242
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
243
|
-
__metadata("design:type", Function),
|
|
244
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
245
|
-
__metadata("design:returntype", Promise)
|
|
227
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
228
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
229
|
+
tslib_1.__metadata("design:type", Function),
|
|
230
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
231
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
246
232
|
], ProductMutation.prototype, "undeleteProducts", null);
|
|
247
|
-
ProductMutation = __decorate([
|
|
233
|
+
ProductMutation = tslib_1.__decorate([
|
|
248
234
|
(0, type_graphql_1.Resolver)(product_1.Product)
|
|
249
235
|
], ProductMutation);
|
|
250
236
|
exports.ProductMutation = ProductMutation;
|
|
@@ -291,6 +277,7 @@ async function createProduct(product, context) {
|
|
|
291
277
|
await (0, attachment_base_1.createAttachment)(null, {
|
|
292
278
|
attachment: {
|
|
293
279
|
file: product.thumbnail,
|
|
280
|
+
refType: product_1.Product.name,
|
|
294
281
|
refBy: result.id
|
|
295
282
|
}
|
|
296
283
|
}, context);
|
|
@@ -357,6 +344,7 @@ async function updateProduct(id, patch, context) {
|
|
|
357
344
|
await (0, attachment_base_1.createAttachment)(null, {
|
|
358
345
|
attachment: {
|
|
359
346
|
file: patch.thumbnail,
|
|
347
|
+
refType: product_1.Product.name,
|
|
360
348
|
refBy: product.id
|
|
361
349
|
}
|
|
362
350
|
}, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-mutation.js","sourceRoot":"","sources":["../../../server/service/product/product-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gEAAsC;AACtC,+CAAsE;AACtE,qCAAsE;AAEtE,qEAA0F;AAE1F,uDAAmD;AACnD,6CAA4C;AAG5C,+CAAgD;AAChD,qEAAgE;AAChE,uFAIkD;AAClD,4DAAuD;AACvD,uCAAmC;AACnC,mDAA0D;AAC1D,yDAAoD;AAGpD,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E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ACf;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,KAAK,CAAA;KACZ;AACH,CAAC;AAtFD,sCAsFC"}
|
|
1
|
+
{"version":3,"file":"product-mutation.js","sourceRoot":"","sources":["../../../server/service/product/product-mutation.ts"],"names":[],"mappings":";;;;AAAA,wEAAsC;AACtC,+CAAsE;AACtE,qCAAsE;AAEtE,qEAA0F;AAE1F,uDAAmD;AACnD,6CAA4C;AAG5C,+CAAgD;AAChD,qEAAgE;AAChE,uFAIkD;AAClD,4DAAuD;AACvD,uCAAmC;AACnC,mDAA0D;AAC1D,yDAAoD;AAGpD,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,OAAO,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IAID,KAAK,CAAC,cAAc,CACqB,QAAsB,EACtD,OAAY;QAEnB,OAAO,MAAM,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAID,KAAK,CAAC,aAAa,CAAY,EAAU,EAAgB,KAAmB,EAAS,OAAY;QAC/F,OAAO,MAAM,aAAa,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAID,KAAK,CAAC,qBAAqB,CACe,OAAuB,EACxD,OAAY;QAEnB,IAAI;YACF,IAAI,OAAO,GAAG,EAAE,CAAA;YAEhB,4EAA4E;YAC5E,IAAI,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,UAAU;gBAC1D,IAAI,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,cAAc,EAAE;oBAClB,cAAc,CAAC,cAAc,GAAG;wBAC9B,GAAG,cAAc,CAAC,cAAc;wBAChC,IAAI,8BAAa,iCAA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AAa,GAAG,MAAM,IAAA,6CAAmB,EACvC,IAAI,8BAAa,+CAAM,OAAO,GAAK,KAAK,KAAE,OAAO,EAAE,SAAS,EAAE,IAAI,IAAG,EACrE,OAAO,CACR,CAAA;SACF;QAED,MAAM,SAAS,GAAG,EAAE,CAAA;QACpB,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,MAAM,IAAA,wCAAsB,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YACpE,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,KAAK,CAAC,SAAS;oBACrB,OAAO,EAAE,iBAAO,CAAC,IAAI;oBACrB,KAAK,EAAE,OAAO,CAAC,EAAE;iBAClB;aACF,EACD,OAAO,CACR,CAAA;SACF;QAED,OAAO,OAAO,CAAA;KACf;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,KAAK,CAAA;KACZ;AACH,CAAC;AAvFD,sCAuFC","sourcesContent":["import promisesAll from 'promises-all'\nimport { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { EntityManager, getRepository, In, Repository } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { logger } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\n\nimport { PRODUCT_STATUS } from '../../constants'\nimport { ProductDetail } from '../product-detail/product-detail'\nimport {\n createProductDetail,\n updateMultipleProductDetail,\n updateProductDetail\n} from '../product-detail/product-detail-mutation'\nimport { ProductSet } from '../product-set/product-set'\nimport { Product } from './product'\nimport { NewProduct, ProductPatch } from './product-types'\nimport { validateProduct } from './validate-product'\n\n@Resolver(Product)\nexport class ProductMutation {\n @Directive('@transaction')\n @Mutation(returns => Product)\n async createProduct(@Arg('product') product: NewProduct, @Ctx() context: any): Promise<Product> {\n return await createProduct(product, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Product])\n async createProducts(\n @Arg('products', type => [NewProduct]) products: NewProduct[],\n @Ctx() context: any\n ): Promise<Product[]> {\n return await createProducts(products, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Product)\n async updateProduct(@Arg('id') id: string, @Arg('patch') patch: ProductPatch, @Ctx() context: any): Promise<Product> {\n return await updateProduct(id, patch, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Product])\n async importMultipleProduct(\n @Arg('patches', type => [ProductPatch]) patches: ProductPatch[],\n @Ctx() context: any\n ): Promise<Product[]> {\n try {\n let results = []\n\n //// 1. Group and massage data based on sku for Product and Product Details.\n let massagedPatch = patches.reduce(function (acc, currentObj) {\n let existingParent = acc.find(itm => itm.sku == currentObj.sku)\n if (existingParent) {\n existingParent.productDetails = [\n ...existingParent.productDetails,\n new ProductDetail({ ...currentObj, childProductDetail: currentObj.childGtin })\n ]\n return acc\n } else {\n let newProduct = {\n ...currentObj,\n productDetails: [\n new ProductDetail({ ...currentObj, childProductDetail: currentObj.childGtin, isDefault: true })\n ]\n }\n return [...acc, newProduct]\n }\n }, [])\n\n //// 2. Update all Grouped Product data and Product Details Data\n for (let i = 0; i < massagedPatch.length; i++) {\n const patch: Product = massagedPatch[i]\n const result = await createProduct(patch, context)\n results.push({ ...result, cuFlag: '+' })\n }\n\n return results\n } catch (error) {\n throw error\n }\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Product])\n async updateMultipleProduct(\n @Arg('patches', type => [ProductPatch]) patches: ProductPatch[],\n @Ctx() context: any\n ): Promise<Product[]> {\n try {\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\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const patch: NewProduct = _createRecords[i]\n const result = await createProduct(patch, context)\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const patch: ProductPatch = _updateRecords[i]\n const result = await updateProduct(patch.id, patch, context)\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n } catch (error) {\n throw error\n }\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"mutation\") ')\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async linkProduct(\n @Arg('productSetId') productSetId: string,\n @Arg('patches', type => [ProductPatch]) patches: ProductPatch[],\n @Ctx() context: any\n ): Promise<Boolean> {\n const { tx }: { tx: EntityManager } = context.state\n\n let productSet = await tx.getRepository(ProductSet).findOne({\n where: { id: productSetId },\n relations: ['domain', 'creator', 'updater', 'product']\n })\n\n let existingProductLink: any = productSet.product\n\n let newProductLink: Product[] = patches.reduce((acc, curr) => {\n if (!existingProductLink.find(itm => itm.id == curr.id)) {\n acc.push({ id: curr.id })\n }\n return acc\n }, [])\n\n let removeProductLink: Product[] = existingProductLink.reduce((acc, curr) => {\n if (!patches.find(itm => itm.id == curr.id)) {\n acc.push({ id: curr.id })\n }\n return acc\n }, [])\n\n if (newProductLink.length > 0) {\n for (let i = 0; i < newProductLink.length; i++) {\n const patch: Product = { ...newProductLink[i], productSet }\n await updateProduct(newProductLink[i].id, patch, context)\n }\n }\n\n if (removeProductLink.length > 0) {\n for (let i = 0; i < removeProductLink.length; i++) {\n const patch: Product = { ...removeProductLink[i], productSet: null }\n await updateProduct(removeProductLink[i].id, patch, context)\n }\n }\n\n return true\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"mutation\") ')\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deleteProduct(@Arg('id') id: string, @Ctx() context: any): Promise<Boolean> {\n const { tx, user, domain }: { tx: EntityManager; user: User; domain: Domain } = context.state\n const productSetRepo: Repository<Product> = tx.getRepository(Product)\n const productSet = await productSetRepo.findOne({ domain, id })\n\n await productSetRepo.save({\n ...productSet,\n status: PRODUCT_STATUS.DELETED,\n updater: user\n })\n\n return true\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"mutation\") ')\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deleteProducts(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<Boolean> {\n const { tx, user }: { tx: EntityManager; user: User } = context.state\n const productRepo = tx.getRepository(Product)\n\n await productRepo.update(\n {\n id: In(ids)\n },\n {\n deletedAt: new Date()\n }\n )\n\n return true\n }\n\n @Directive('@privilege(category: \"order\", privilege: \"mutation\") ')\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async undeleteProducts(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<Boolean> {\n const { tx, user }: { tx: EntityManager; user: User } = context.state\n const productRepo = tx.getRepository(Product)\n\n await productRepo.update(\n {\n id: In(ids)\n },\n {\n deletedAt: null\n }\n )\n\n return true\n }\n}\n\nexport async function createProduct(product: any, context: any) {\n try {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const productRepo: Repository<Product> = tx.getRepository(Product) || getRepository(Product)\n const bizplaceRepo: Repository<Bizplace> = tx.getRepository(Bizplace) || getRepository(Bizplace)\n\n let bizplace: Bizplace\n if (product.bizplace?.id) {\n bizplace = await bizplaceRepo.findOne(product.bizplace.id)\n } else if (context.state?.bizplace) {\n bizplace = context.state.bizplace\n } else {\n bizplace = await bizplaceRepo.findOne({ where: { domain } })\n }\n\n if (product?.productRef?.id) {\n product.productRef = await productRepo.findOne(product.productRef.id)\n }\n\n if (!product?.id) delete product.id\n\n await validateProduct(\n {\n ...product,\n bizplace,\n domain\n },\n context\n )\n\n if (product.uom) {\n product.primaryUnit = product.uom\n }\n\n if (product.uomValue) {\n product.primaryValue = product.uomValue\n }\n\n const result = await productRepo.save({\n ...product,\n bizplace,\n domain,\n creator: user,\n updater: user\n })\n\n let productDetails = product.productDetails\n if (!productDetails) {\n productDetails = [new ProductDetail({ ...product, product: result, isDefault: true })]\n if (productDetails[0].gtin == null || productDetails[0] == undefined) {\n productDetails[0].gtin = product.sku\n }\n }\n\n await updateMultipleProductDetail(result.id, productDetails, context)\n\n if (product.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: product.thumbnail,\n refType: Product.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n } catch (error) {\n throw error\n }\n}\n\nexport async function createProducts(products, context: any) {\n const { resolve, reject } = await promisesAll.all(products.map(product => createProduct(product, context)))\n\n if (reject.length) {\n reject.forEach(({ name, message }) => logger.error(`${name}: ${message}`))\n\n return reject\n }\n\n return resolve\n}\n\nexport async function updateProduct(id: string, patch, context) {\n try {\n const { user, tx, domain }: { user: User; tx: EntityManager; domain: Domain } = context.state\n\n const bizplaceRepo: Repository<Bizplace> = tx.getRepository(Bizplace)\n const productRepo: Repository<Product> = tx.getRepository(Product)\n const productDetailRepo: Repository<ProductDetail> = tx.getRepository(ProductDetail)\n\n let product = await productRepo.findOne({ where: { id }, relations: ['domain'] })\n\n let productDetail = await productDetailRepo.findOne({\n where: { product: { id }, isDefault: true },\n relations: ['domain']\n })\n\n if (patch.productRef && patch.productRef.id) {\n patch.productRef = await productRepo.findOne(patch.productRef.id)\n }\n\n let bizplace: Bizplace\n if (product.bizplace?.id) {\n bizplace = await bizplaceRepo.findOne(product.bizplace.id)\n } else {\n bizplace = await bizplaceRepo.findOne({ where: { name: domain.name } })\n }\n\n await validateProduct(\n {\n ...product,\n ...patch,\n bizplace,\n domain\n },\n context\n )\n\n if (patch.uom) {\n product.primaryUnit = patch.uom\n }\n\n if (patch.uomValue) {\n product.primaryValue = patch.uomValue\n }\n\n product = await productRepo.save({\n ...product,\n ...patch,\n domain,\n updater: user\n })\n\n if (productDetail) {\n if (product.gtin) {\n delete product.gtin\n }\n productDetail = await updateProductDetail(\n productDetail.id,\n new ProductDetail({ ...product, ...patch, product }),\n context\n )\n } else {\n productDetail = await createProductDetail(\n new ProductDetail({ ...product, ...patch, product, isDefault: true }),\n context\n )\n }\n\n const productId = id\n if (patch.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [productId] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Product.name,\n refBy: product.id\n }\n },\n context\n )\n }\n\n return product\n } catch (error) {\n throw error\n }\n}\n"]}
|