@medusajs/medusa 1.6.0-alpha.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +6 -10
  3. package/dist/api/routes/admin/analytics-configs/create-analytics-config.d.ts +0 -0
  4. package/dist/api/routes/admin/analytics-configs/create-analytics-config.js +0 -0
  5. package/dist/api/routes/admin/analytics-configs/create-analytics-config.js.map +0 -0
  6. package/dist/api/routes/admin/analytics-configs/delete-analytics-config.d.ts +0 -0
  7. package/dist/api/routes/admin/analytics-configs/delete-analytics-config.js +0 -0
  8. package/dist/api/routes/admin/analytics-configs/delete-analytics-config.js.map +0 -0
  9. package/dist/api/routes/admin/analytics-configs/get-analytics-config.d.ts +0 -0
  10. package/dist/api/routes/admin/analytics-configs/get-analytics-config.js +0 -0
  11. package/dist/api/routes/admin/analytics-configs/get-analytics-config.js.map +0 -0
  12. package/dist/api/routes/admin/analytics-configs/index.d.ts +0 -0
  13. package/dist/api/routes/admin/analytics-configs/index.js +0 -0
  14. package/dist/api/routes/admin/analytics-configs/index.js.map +0 -0
  15. package/dist/api/routes/admin/analytics-configs/update-analytics-config.d.ts +0 -0
  16. package/dist/api/routes/admin/analytics-configs/update-analytics-config.js +0 -0
  17. package/dist/api/routes/admin/analytics-configs/update-analytics-config.js.map +0 -0
  18. package/dist/loaders/feature-flags/analytics.d.ts +0 -0
  19. package/dist/loaders/feature-flags/analytics.js +0 -0
  20. package/dist/loaders/feature-flags/analytics.js.map +0 -0
  21. package/dist/migrations/1666173221888-add_analytics_config.d.ts +0 -0
  22. package/dist/migrations/1666173221888-add_analytics_config.js +0 -0
  23. package/dist/migrations/1666173221888-add_analytics_config.js.map +0 -0
  24. package/dist/models/analytics-config.d.ts +0 -0
  25. package/dist/models/analytics-config.js +0 -0
  26. package/dist/models/analytics-config.js.map +0 -0
  27. package/dist/repositories/analytics-config.d.ts +0 -0
  28. package/dist/repositories/analytics-config.js +0 -0
  29. package/dist/repositories/analytics-config.js.map +0 -0
  30. package/dist/scripts/sales-channels-migration.js +3 -4
  31. package/dist/scripts/sales-channels-migration.js.map +1 -1
  32. package/dist/services/analytics-config.d.ts +0 -0
  33. package/dist/services/analytics-config.js +0 -0
  34. package/dist/services/analytics-config.js.map +0 -0
  35. package/dist/types/analytics-config.d.ts +0 -0
  36. package/dist/types/analytics-config.js +0 -0
  37. package/dist/types/analytics-config.js.map +0 -0
  38. package/package.json +1 -1
  39. package/dist/api/routes/store/carts/decorate-line-items-with-totals.d.ts +0 -7
  40. package/dist/api/routes/store/carts/decorate-line-items-with-totals.js +0 -101
  41. package/dist/api/routes/store/carts/decorate-line-items-with-totals.js.map +0 -1
  42. package/dist/loaders/custom-api.d.ts +0 -20
  43. package/dist/loaders/custom-api.js +0 -84
  44. package/dist/loaders/custom-api.js.map +0 -1
  45. package/dist/loaders/custom-routes.d.ts +0 -21
  46. package/dist/loaders/custom-routes.js +0 -73
  47. package/dist/loaders/custom-routes.js.map +0 -1
  48. package/dist/strategies/batch-jobs/product/index.d.ts +0 -46
  49. package/dist/strategies/batch-jobs/product/index.js +0 -272
  50. package/dist/strategies/batch-jobs/product/index.js.map +0 -1
  51. package/dist/strategies/batch-jobs/product/types.d.ts +0 -55
  52. package/dist/strategies/batch-jobs/product/types.js +0 -14
  53. package/dist/strategies/batch-jobs/product/types.js.map +0 -1
@@ -1 +1 @@
1
- @medusajs/medusa:build: cache hit, replaying output d951ba0fb0678b05
1
+ @medusajs/medusa:build: cache hit, replaying output a3eb55ccadc674d7
package/CHANGELOG.md CHANGED
@@ -1,14 +1,6 @@
1
1
  # Change Log
2
2
 
3
- ## 1.6.0-alpha.1
4
-
5
- ### Patch Changes
6
-
7
- - [#2482](https://github.com/medusajs/medusa/pull/2482) [`58c7ffdc6`](https://github.com/medusajs/medusa/commit/58c7ffdc6ec1d06f76aaa9427505dc452398770f) Thanks [@srindom](https://github.com/srindom)! - fix(medusa): allow filtering collections by handle
8
-
9
- * [`144ce0e42`](https://github.com/medusajs/medusa/commit/144ce0e42cd894a2cd5b40b68c095fd1eda851a9) Thanks [@olivermrbl](https://github.com/olivermrbl)! - Capture DraftOrder payment immediately in register-payment.ts
10
-
11
- ## 1.6.0-alpha.0
3
+ ## 1.6.0
12
4
 
13
5
  ### Minor Changes
14
6
 
@@ -36,7 +28,11 @@
36
28
 
37
29
  - [#2340](https://github.com/medusajs/medusa/pull/2340) [`a9c703d56`](https://github.com/medusajs/medusa/commit/a9c703d56c2678fb509af7f9e1fe2cb65f95ba9d) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(medusa): Allow to query product tags by condition id
38
30
 
39
- * [#2444](https://github.com/medusajs/medusa/pull/2444) [`48411157b`](https://github.com/medusajs/medusa/commit/48411157b1cdec0a67f91e06de8ac547af89d7af) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(medusa): Support batch remove resources on discount condition
31
+ * [#2482](https://github.com/medusajs/medusa/pull/2482) [`58c7ffdc6`](https://github.com/medusajs/medusa/commit/58c7ffdc6ec1d06f76aaa9427505dc452398770f) Thanks [@srindom](https://github.com/srindom)! - fix(medusa): allow filtering collections by handle
32
+
33
+ - [#2444](https://github.com/medusajs/medusa/pull/2444) [`48411157b`](https://github.com/medusajs/medusa/commit/48411157b1cdec0a67f91e06de8ac547af89d7af) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(medusa): Support batch remove resources on discount condition
34
+
35
+ * [#2402](https://github.com/medusajs/medusa/pull/2402) [`144ce0e42`](https://github.com/medusajs/medusa/commit/144ce0e42cd894a2cd5b40b68c095fd1eda851a9) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - Capture DraftOrder payment immediately in register-payment.ts
40
36
 
41
37
  - [#2464](https://github.com/medusajs/medusa/pull/2464) [`8be67c734`](https://github.com/medusajs/medusa/commit/8be67c734c970ef03bf0afaf74cc3818e305466d) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(medusa): Filter product list by discount condition id
42
38
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -74,13 +74,12 @@ var migrate = function (_a) {
74
74
  .createQueryBuilder()
75
75
  .from(store_1.Store, "store")
76
76
  .select("store.default_sales_channel_id")
77
- .getOne()];
77
+ .getRawOne()];
78
78
  case 1:
79
79
  store = _a.sent();
80
- if (!store.default_sales_channel_id) {
80
+ if (!(store === null || store === void 0 ? void 0 : store.default_sales_channel_id)) {
81
81
  logger_1.default.error("The default sales channel does not exists yet. Run your project and then re run the migration.");
82
82
  process.exit(1);
83
- return [2 /*return*/];
84
83
  }
85
84
  shouldContinue = true;
86
85
  _a.label = 2;
@@ -103,8 +102,8 @@ var migrate = function (_a) {
103
102
  .insert()
104
103
  .into("product_sales_channel")
105
104
  .values(products.map(function (product) { return ({
105
+ product_id: product.id,
106
106
  sales_channel_id: store.default_sales_channel_id,
107
- product_id: product.id
108
107
  }); }))
109
108
  .orIgnore()
110
109
  .execute()];
@@ -1 +1 @@
1
- {"version":3,"file":"sales-channels-migration.js","sourceRoot":"","sources":["../../src/scripts/sales-channels-migration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;AAC3B,mCAA0C;AAC1C,6DAAsC;AACtC,6CAA4C;AAC5C,yCAAwC;AAExC,gBAAM,CAAC,MAAM,EAAE,CAAA;AAEf,IAAM,aAAa,GAAG;IACpB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB;IACpC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;IAC5B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACtC,UAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,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C,GAAG,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAAA;AAEnC,kBAAe,OAAO,CAAA"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/medusa",
3
- "version": "1.6.0-alpha.1",
3
+ "version": "1.6.0",
4
4
  "description": "E-commerce for JAMstack",
5
5
  "main": "dist/index.js",
6
6
  "bin": "./cli.js",
@@ -1,7 +0,0 @@
1
- import { Request } from "express";
2
- import { Cart } from "../../../../models";
3
- import { EntityManager } from "typeorm";
4
- export declare const decorateLineItemsWithTotals: (cart: Cart, req: Request, options?: {
5
- force_taxes: boolean;
6
- transactionManager?: EntityManager;
7
- }) => Promise<Cart>;
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.decorateLineItemsWithTotals = void 0;
40
- var decorateLineItemsWithTotals = function (cart, req, options) {
41
- if (options === void 0) { options = {
42
- force_taxes: false,
43
- }; }
44
- return __awaiter(void 0, void 0, void 0, function () {
45
- var totalsService, getItems_1, items, manager;
46
- var _a;
47
- return __generator(this, function (_b) {
48
- switch (_b.label) {
49
- case 0:
50
- totalsService = req.scope.resolve("totalsService");
51
- if (!(cart.items && cart.region)) return [3 /*break*/, 5];
52
- getItems_1 = function (manager) { return __awaiter(void 0, void 0, void 0, function () {
53
- var totalsServiceTx;
54
- return __generator(this, function (_a) {
55
- switch (_a.label) {
56
- case 0:
57
- totalsServiceTx = totalsService.withTransaction(manager);
58
- return [4 /*yield*/, Promise.all(cart.items.map(function (item) { return __awaiter(void 0, void 0, void 0, function () {
59
- var itemTotals;
60
- return __generator(this, function (_a) {
61
- switch (_a.label) {
62
- case 0: return [4 /*yield*/, totalsServiceTx.getLineItemTotals(item, cart, {
63
- include_tax: options.force_taxes || cart.region.automatic_taxes,
64
- })];
65
- case 1:
66
- itemTotals = _a.sent();
67
- return [2 /*return*/, Object.assign(item, itemTotals)];
68
- }
69
- });
70
- }); }))];
71
- case 1: return [2 /*return*/, _a.sent()];
72
- }
73
- });
74
- }); };
75
- items = void 0;
76
- if (!options.transactionManager) return [3 /*break*/, 2];
77
- return [4 /*yield*/, getItems_1(options.transactionManager)];
78
- case 1:
79
- items = _b.sent();
80
- return [3 /*break*/, 4];
81
- case 2:
82
- manager = (_a = options.transactionManager) !== null && _a !== void 0 ? _a : req.scope.resolve("manager");
83
- return [4 /*yield*/, manager.transaction(function (transactionManager) { return __awaiter(void 0, void 0, void 0, function () {
84
- return __generator(this, function (_a) {
85
- switch (_a.label) {
86
- case 0: return [4 /*yield*/, getItems_1(transactionManager)];
87
- case 1: return [2 /*return*/, _a.sent()];
88
- }
89
- });
90
- }); })];
91
- case 3:
92
- items = _b.sent();
93
- _b.label = 4;
94
- case 4: return [2 /*return*/, Object.assign(cart, { items: items })];
95
- case 5: return [2 /*return*/, cart];
96
- }
97
- });
98
- });
99
- };
100
- exports.decorateLineItemsWithTotals = decorateLineItemsWithTotals;
101
- //# sourceMappingURL=decorate-line-items-with-totals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorate-line-items-with-totals.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/carts/decorate-line-items-with-totals.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,2BAA2B,GAAG,UACzC,IAAU,EACV,GAAY,EACZ,OAEC;IAFD,wBAAA,EAAA;QACE,WAAW,EAAE,KAAK;KACnB;;;;;;;oBAEK,aAAa,GAAkB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;yBAEnE,CAAA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAA,EAAzB,wBAAyB;oBACrB,aAAW,UAAO,OAAO;;;;;oCACvB,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;oCACvD,qBAAM,OAAO,CAAC,GAAG,CACtB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAO,IAAc;;;;4DACf,qBAAM,eAAe,CAAC,iBAAiB,CACxD,IAAI,EACJ,IAAI,EACJ;4DACE,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe;yDAChE,CACF,EAAA;;wDANK,UAAU,GAAG,SAMlB;wDAED,sBAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,EAAA;;;6CACvC,CAAC,CACH,EAAA;wCAZD,sBAAO,SAYN,EAAA;;;yBACF,CAAA;oBAEG,KAAK,SAAA,CAAA;yBACL,OAAO,CAAC,kBAAkB,EAA1B,wBAA0B;oBACpB,qBAAM,UAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAA;;oBAAlD,KAAK,GAAG,SAA0C,CAAA;;;oBAE5C,OAAO,GACX,MAAA,OAAO,CAAC,kBAAkB,mCAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;oBACpD,qBAAM,OAAO,CAAC,WAAW,CAAC,UAAO,kBAAkB;;;4CAClD,qBAAM,UAAQ,CAAC,kBAAkB,CAAC,EAAA;4CAAzC,sBAAO,SAAkC,EAAA;;;6BAC1C,CAAC,EAAA;;oBAFF,KAAK,GAAG,SAEN,CAAA;;wBAGJ,sBAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,EAAA;wBAGvC,sBAAO,IAAI,EAAA;;;;CACZ,CAAA;AA1CY,QAAA,2BAA2B,+BA0CvC"}
@@ -1,20 +0,0 @@
1
- import { Express, NextFunction, Request, Response } from "express";
2
- import { ConfigModule } from "../types/global";
3
- declare enum AllowedMethods {
4
- GET = "GET",
5
- POST = "POST",
6
- DELETE = "DELETE"
7
- }
8
- declare type Handler = (req: Request, res: Response, next: NextFunction) => Promise<void>;
9
- export declare type MedusaRoute = {
10
- method: AllowedMethods;
11
- path: string;
12
- handler: Handler | Handler[];
13
- routes: MedusaRoute[];
14
- options: {};
15
- };
16
- declare const _default: ({ app, configModule, }: {
17
- app: Express;
18
- configModule: ConfigModule;
19
- }) => Express;
20
- export default _default;
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var express_1 = require("express");
40
- var AllowedMethods;
41
- (function (AllowedMethods) {
42
- AllowedMethods["GET"] = "GET";
43
- AllowedMethods["POST"] = "POST";
44
- AllowedMethods["DELETE"] = "DELETE";
45
- })(AllowedMethods || (AllowedMethods = {}));
46
- var validateRouteConfig = function (customRoute) { return __awaiter(void 0, void 0, void 0, function () {
47
- var handler, path, method;
48
- return __generator(this, function (_a) {
49
- handler = customRoute.handler, path = customRoute.path, method = customRoute.method;
50
- if (!method || !path || !handler) {
51
- console.warn("Invalid route config");
52
- }
53
- return [2 /*return*/];
54
- });
55
- }); };
56
- exports.default = (function (_a) {
57
- var app = _a.app, configModule = _a.configModule;
58
- configModule.routes.map(function (customRoute) { return __awaiter(void 0, void 0, void 0, function () {
59
- var handler, path, method, routes, subRouter_1;
60
- return __generator(this, function (_a) {
61
- switch (_a.label) {
62
- case 0: return [4 /*yield*/, validateRouteConfig(customRoute)];
63
- case 1:
64
- _a.sent();
65
- handler = customRoute.handler, path = customRoute.path, method = customRoute.method, routes = customRoute.routes;
66
- if (routes) {
67
- subRouter_1 = (0, express_1.Router)({ mergeParams: true });
68
- app.use(path, subRouter_1);
69
- routes.map(function (route) {
70
- var handler = route.handler, path = route.path, method = route.method;
71
- subRouter_1[method.toLowerCase()](path, handler);
72
- });
73
- }
74
- else {
75
- handler = Array.isArray(handler) ? handler : [handler];
76
- app[method.toLowerCase()](path, handler);
77
- }
78
- return [2 /*return*/];
79
- }
80
- });
81
- }); });
82
- return app;
83
- });
84
- //# sourceMappingURL=custom-api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-api.js","sourceRoot":"","sources":["../../src/loaders/custom-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA0E;AAG1E,IAAK,cAIJ;AAJD,WAAK,cAAc;IACjB,6BAAW,CAAA;IACX,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJI,cAAc,KAAd,cAAc,QAIlB;AAgBD,IAAM,mBAAmB,GAAG,UAAO,WAAW;;;QACpC,OAAO,GAAmB,WAAW,QAA9B,EAAE,IAAI,GAAa,WAAW,KAAxB,EAAE,MAAM,GAAK,WAAW,OAAhB,CAAgB;QAC7C,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;SACrC;;;KACF,CAAA;AAED,mBAAe,UAAC,EAMf;QALC,GAAG,SAAA,EACH,YAAY,kBAAA;IAKZ,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,UAAO,WAAW;;;;wBACxC,qBAAM,mBAAmB,CAAC,WAAW,CAAC,EAAA;;oBAAtC,SAAsC,CAAA;oBAEhC,OAAO,GAA2B,WAAW,QAAtC,EAAE,IAAI,GAAqB,WAAW,KAAhC,EAAE,MAAM,GAAa,WAAW,OAAxB,EAAE,MAAM,GAAK,WAAW,OAAhB,CAAgB;oBAEnD,IAAI,MAAM,EAAE;wBACJ,cAAY,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;wBAE/C,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,WAAS,CAAC,CAAA;wBAExB,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK;4BACP,IAAA,OAAO,GAAmB,KAAK,QAAxB,EAAE,IAAI,GAAa,KAAK,KAAlB,EAAE,MAAM,GAAK,KAAK,OAAV,CAAU;4BACvC,WAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;wBAChD,CAAC,CAAC,CAAA;qBACH;yBAAM;wBACL,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;wBAEtD,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;qBACzC;;;;SACF,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA"}
@@ -1,21 +0,0 @@
1
- import { Express, NextFunction, Request, Response } from "express";
2
- import { ConfigModule } from "../types/global";
3
- declare enum AllowedMethods {
4
- GET = "GET",
5
- POST = "POST",
6
- DELETE = "DELETE"
7
- }
8
- declare type Handler = (req: Request, res: Response, next: NextFunction) => Promise<void>;
9
- export declare type CustomEndpoint = {
10
- method: AllowedMethods;
11
- path: string;
12
- handler: Handler | Handler[];
13
- options: {
14
- requires_auth?: boolean;
15
- };
16
- };
17
- declare const _default: ({ app, configModule, }: {
18
- app: Express;
19
- configModule: ConfigModule;
20
- }) => Express;
21
- export default _default;
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var AllowedMethods;
40
- (function (AllowedMethods) {
41
- AllowedMethods["GET"] = "GET";
42
- AllowedMethods["POST"] = "POST";
43
- AllowedMethods["DELETE"] = "DELETE";
44
- })(AllowedMethods || (AllowedMethods = {}));
45
- var validateRouteConfig = function (customRoute) { return __awaiter(void 0, void 0, void 0, function () {
46
- var handler, path, method;
47
- return __generator(this, function (_a) {
48
- handler = customRoute.handler, path = customRoute.path, method = customRoute.method;
49
- if (!method || !path || !handler) {
50
- console.warn("Invalid route config");
51
- }
52
- return [2 /*return*/];
53
- });
54
- }); };
55
- exports.default = (function (_a) {
56
- var app = _a.app, configModule = _a.configModule;
57
- configModule.customRoutes.map(function (customRoute) { return __awaiter(void 0, void 0, void 0, function () {
58
- var handler, path, method, options;
59
- return __generator(this, function (_a) {
60
- switch (_a.label) {
61
- case 0: return [4 /*yield*/, validateRouteConfig(customRoute)];
62
- case 1:
63
- _a.sent();
64
- handler = customRoute.handler, path = customRoute.path, method = customRoute.method, options = customRoute.options;
65
- handler = Array.isArray(handler) ? handler : [handler];
66
- app[method.toLowerCase()](path, handler);
67
- return [2 /*return*/];
68
- }
69
- });
70
- }); });
71
- return app;
72
- });
73
- //# sourceMappingURL=custom-routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-routes.js","sourceRoot":"","sources":["../../src/loaders/custom-routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAK,cAIJ;AAJD,WAAK,cAAc;IACjB,6BAAW,CAAA;IACX,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJI,cAAc,KAAd,cAAc,QAIlB;AAiBD,IAAM,mBAAmB,GAAG,UAAO,WAAW;;;QACpC,OAAO,GAAmB,WAAW,QAA9B,EAAE,IAAI,GAAa,WAAW,KAAxB,EAAE,MAAM,GAAK,WAAW,OAAhB,CAAgB;QAC7C,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;SACrC;;;KACF,CAAA;AAED,mBAAe,UAAC,EAMf;QALC,GAAG,SAAA,EACH,YAAY,kBAAA;IAKZ,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,UAAO,WAAW;;;;wBAC9C,qBAAM,mBAAmB,CAAC,WAAW,CAAC,EAAA;;oBAAtC,SAAsC,CAAA;oBAEhC,OAAO,GAA4B,WAAW,QAAvC,EAAE,IAAI,GAAsB,WAAW,KAAjC,EAAE,MAAM,GAAc,WAAW,OAAzB,EAAE,OAAO,GAAK,WAAW,QAAhB,CAAgB;oBAEpD,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;oBAEtD,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;;;;SACzC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA"}
@@ -1,46 +0,0 @@
1
- import { BatchJob, Product, ProductVariant } from "../../../models";
2
- import { Selector } from "../../../types/common";
3
- export declare type ProductExportBatchJobContext = {
4
- retry_count?: number;
5
- max_retry?: number;
6
- offset?: number;
7
- limit?: number;
8
- batch_size?: number;
9
- order?: string;
10
- fields?: string;
11
- expand?: string;
12
- shape: {
13
- prices: ProductExportPriceData[];
14
- dynamicOptionColumnCount: number;
15
- dynamicImageColumnCount: number;
16
- dynamicSalesChannelsColumnCount: number;
17
- };
18
- list_config?: {
19
- select?: string[];
20
- relations?: string[];
21
- skip?: number;
22
- take?: number;
23
- order?: Record<string, "ASC" | "DESC">;
24
- };
25
- filterable_fields?: Selector<unknown>;
26
- };
27
- export declare type ProductExportPriceData = {
28
- currency_code?: string;
29
- region?: {
30
- name: string;
31
- currency_code: string;
32
- id: string;
33
- };
34
- };
35
- export declare type ProductExportBatchJob = BatchJob & {
36
- context: ProductExportBatchJobContext;
37
- };
38
- export declare type ProductExportColumnSchemaEntity = "product" | "variant";
39
- export declare type ProductExportColumnSchemaDescriptor = {
40
- accessor: (product: Product) => string;
41
- entityName: Extract<ProductExportColumnSchemaEntity, "product">;
42
- } | {
43
- accessor: (variant: ProductVariant) => string;
44
- entityName: Extract<ProductExportColumnSchemaEntity, "variant">;
45
- };
46
- export declare const productExportSchemaDescriptors: Map<string, ProductExportColumnSchemaDescriptor>;
@@ -1,272 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.productExportSchemaDescriptors = void 0;
4
- exports.productExportSchemaDescriptors = new Map([
5
- [
6
- "Product id",
7
- {
8
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.id) !== null && _a !== void 0 ? _a : ""; },
9
- entityName: "product",
10
- },
11
- ],
12
- [
13
- "Product Handle",
14
- {
15
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.handle) !== null && _a !== void 0 ? _a : ""; },
16
- entityName: "product",
17
- },
18
- ],
19
- [
20
- "Product Title",
21
- {
22
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.title) !== null && _a !== void 0 ? _a : ""; },
23
- entityName: "product",
24
- },
25
- ],
26
- [
27
- "Product Subtitle",
28
- {
29
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.subtitle) !== null && _a !== void 0 ? _a : ""; },
30
- entityName: "product",
31
- },
32
- ],
33
- [
34
- "Product Description",
35
- {
36
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.description) !== null && _a !== void 0 ? _a : ""; },
37
- entityName: "product",
38
- },
39
- ],
40
- [
41
- "Product Status",
42
- {
43
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.status) !== null && _a !== void 0 ? _a : ""; },
44
- entityName: "product",
45
- },
46
- ],
47
- [
48
- "Product Thumbnail",
49
- {
50
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.thumbnail) !== null && _a !== void 0 ? _a : ""; },
51
- entityName: "product",
52
- },
53
- ],
54
- [
55
- "Product Weight",
56
- {
57
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.weight) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
58
- entityName: "product",
59
- },
60
- ],
61
- [
62
- "Product Length",
63
- {
64
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.length) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
65
- entityName: "product",
66
- },
67
- ],
68
- [
69
- "Product Width",
70
- {
71
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.width) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
72
- entityName: "product",
73
- },
74
- ],
75
- [
76
- "Product Height",
77
- {
78
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.height) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
79
- entityName: "product",
80
- },
81
- ],
82
- [
83
- "Product HS Code",
84
- {
85
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.hs_code) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
86
- entityName: "product",
87
- },
88
- ],
89
- [
90
- "Product Origin Country",
91
- {
92
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.origin_country) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
93
- entityName: "product",
94
- },
95
- ],
96
- [
97
- "Product MID Code",
98
- {
99
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.mid_code) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
100
- entityName: "product",
101
- },
102
- ],
103
- [
104
- "Product Material",
105
- {
106
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.material) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
107
- entityName: "product",
108
- },
109
- ],
110
- [
111
- "Product Collection Title",
112
- {
113
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.collection) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ""; },
114
- entityName: "product",
115
- },
116
- ],
117
- [
118
- "Product Collection Handle",
119
- {
120
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.collection) === null || _a === void 0 ? void 0 : _a.handle) !== null && _b !== void 0 ? _b : ""; },
121
- entityName: "product",
122
- },
123
- ],
124
- [
125
- "Product Type",
126
- {
127
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.type) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ""; },
128
- entityName: "product",
129
- },
130
- ],
131
- [
132
- "Product Tags",
133
- {
134
- accessor: function (product) { var _a; return ((_a = product.tags.map(function (t) { return t.value; })) !== null && _a !== void 0 ? _a : []).join(","); },
135
- entityName: "product",
136
- },
137
- ],
138
- [
139
- "Product Discountable",
140
- {
141
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.discountable) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
142
- entityName: "product",
143
- },
144
- ],
145
- [
146
- "Product External ID",
147
- {
148
- accessor: function (product) { var _a; return (_a = product === null || product === void 0 ? void 0 : product.external_id) !== null && _a !== void 0 ? _a : ""; },
149
- entityName: "product",
150
- },
151
- ],
152
- [
153
- "Product Profile Name",
154
- {
155
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.profile) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : ""; },
156
- entityName: "product",
157
- },
158
- ],
159
- [
160
- "Product Profile Type",
161
- {
162
- accessor: function (product) { var _a, _b; return (_b = (_a = product === null || product === void 0 ? void 0 : product.profile) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : ""; },
163
- entityName: "product",
164
- },
165
- ],
166
- [
167
- "Variant id",
168
- {
169
- accessor: function (variant) { var _a; return (_a = variant === null || variant === void 0 ? void 0 : variant.id) !== null && _a !== void 0 ? _a : ""; },
170
- entityName: "variant",
171
- },
172
- ],
173
- [
174
- "Variant Title",
175
- {
176
- accessor: function (variant) { var _a; return (_a = variant === null || variant === void 0 ? void 0 : variant.title) !== null && _a !== void 0 ? _a : ""; },
177
- entityName: "variant",
178
- },
179
- ],
180
- [
181
- "Variant SKU",
182
- {
183
- accessor: function (variant) { var _a; return (_a = variant === null || variant === void 0 ? void 0 : variant.sku) !== null && _a !== void 0 ? _a : ""; },
184
- entityName: "variant",
185
- },
186
- ],
187
- [
188
- "Variant Barcode",
189
- {
190
- accessor: function (variant) { var _a; return (_a = variant === null || variant === void 0 ? void 0 : variant.barcode) !== null && _a !== void 0 ? _a : ""; },
191
- entityName: "variant",
192
- },
193
- ],
194
- [
195
- "Variant Inventory Quantity",
196
- {
197
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.inventory_quantity) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
198
- entityName: "variant",
199
- },
200
- ],
201
- [
202
- "Variant Allow backorder",
203
- {
204
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.allow_backorder) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
205
- entityName: "variant",
206
- },
207
- ],
208
- [
209
- "Variant Manage inventory",
210
- {
211
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.manage_inventory) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
212
- entityName: "variant",
213
- },
214
- ],
215
- [
216
- "Variant Weight",
217
- {
218
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.weight) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
219
- entityName: "variant",
220
- },
221
- ],
222
- [
223
- "Variant Length",
224
- {
225
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.length) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
226
- entityName: "variant",
227
- },
228
- ],
229
- [
230
- "Variant Width",
231
- {
232
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.width) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
233
- entityName: "variant",
234
- },
235
- ],
236
- [
237
- "Variant Height",
238
- {
239
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.height) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
240
- entityName: "variant",
241
- },
242
- ],
243
- [
244
- "Variant HS Code",
245
- {
246
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.hs_code) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
247
- entityName: "variant",
248
- },
249
- ],
250
- [
251
- "Variant Origin Country",
252
- {
253
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.origin_country) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
254
- entityName: "variant",
255
- },
256
- ],
257
- [
258
- "Variant MID Code",
259
- {
260
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.mid_code) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
261
- entityName: "variant",
262
- },
263
- ],
264
- [
265
- "Variant Material",
266
- {
267
- accessor: function (variant) { var _a, _b; return (_b = (_a = variant === null || variant === void 0 ? void 0 : variant.material) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""; },
268
- entityName: "variant",
269
- },
270
- ],
271
- ]);
272
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/strategies/batch-jobs/product/index.ts"],"names":[],"mappings":";;;AAiDa,QAAA,8BAA8B,GAAG,IAAI,GAAG,CAGnD;IACA;QACE,YAAY;QACZ;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,EAAE,mCAAI,EAAE,CAAA,EAAA;YACzD,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,gBAAgB;QAChB;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,EAAE,CAAA,EAAA;YAC7D,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,eAAe;QACf;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAA,EAAA;YAC5D,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,kBAAkB;QAClB;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,CAAA,EAAA;YAC/D,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,qBAAqB;QACrB;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,EAAE,CAAA,EAAA;YAClE,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,gBAAgB;QAChB;YACE,QAAQ,EAAE,UAAC,OAAgB,YAAa,OAAA,MAAA,OAAO,aAAP,OAA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AAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,QAAQ,EAAE,mCAAI,EAAE,CAAA,EAAA;YACrC,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,kBAAkB;QAClB;YACE,QAAQ,EAAE,UAAC,OAAuB,gBAChC,OAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,QAAQ,EAAE,mCAAI,EAAE,CAAA,EAAA;YACrC,UAAU,EAAE,SAAS;SACtB;KACF;CACF,CAAC,CAAA"}
@@ -1,55 +0,0 @@
1
- import { EntityManager } from "typeorm";
2
- import { FileService } from "medusa-interfaces";
3
- import { BatchJobService, ProductService, ProductVariantService, RegionService, SalesChannelService, ShippingProfileService } from "../../../services";
4
- import { CsvSchema } from "../../../interfaces/csv-parser";
5
- import { FlagRouter } from "../../../utils/flag-router";
6
- import { BatchJob } from "../../../models";
7
- export declare type ProductImportBatchJob = BatchJob & {
8
- result: Pick<BatchJob, "result"> & {
9
- operations: {
10
- [K in keyof typeof OperationType]: number;
11
- };
12
- };
13
- };
14
- /**
15
- * DI props for the Product import strategy
16
- */
17
- export declare type InjectedProps = {
18
- batchJobService: BatchJobService;
19
- productService: ProductService;
20
- productVariantService: ProductVariantService;
21
- shippingProfileService: ShippingProfileService;
22
- salesChannelService: SalesChannelService;
23
- regionService: RegionService;
24
- fileService: typeof FileService;
25
- featureFlagRouter: FlagRouter;
26
- manager: EntityManager;
27
- };
28
- /**
29
- * Data shape returned by the CSVParser.
30
- */
31
- export declare type TParsedProductImportRowData = Record<string, string | number | object | undefined | (string | number | object)[]>;
32
- /**
33
- * CSV parser's row reducer result data shape.
34
- */
35
- export declare type TBuiltProductImportLine = Record<string, any>;
36
- /**
37
- * Schema definition of for an import CSV file.
38
- */
39
- export declare type ProductImportCsvSchema = CsvSchema<TParsedProductImportRowData, TBuiltProductImportLine>;
40
- /**
41
- * Import Batch job context column type.
42
- */
43
- export declare type ImportJobContext = {
44
- total: number;
45
- fileKey: string;
46
- };
47
- /**
48
- * Supported batch job import ops.
49
- */
50
- export declare enum OperationType {
51
- ProductCreate = "PRODUCT_CREATE",
52
- ProductUpdate = "PRODUCT_UPDATE",
53
- VariantCreate = "VARIANT_CREATE",
54
- VariantUpdate = "VARIANT_UPDATE"
55
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OperationType = void 0;
4
- /**
5
- * Supported batch job import ops.
6
- */
7
- var OperationType;
8
- (function (OperationType) {
9
- OperationType["ProductCreate"] = "PRODUCT_CREATE";
10
- OperationType["ProductUpdate"] = "PRODUCT_UPDATE";
11
- OperationType["VariantCreate"] = "VARIANT_CREATE";
12
- OperationType["VariantUpdate"] = "VARIANT_UPDATE";
13
- })(OperationType = exports.OperationType || (exports.OperationType = {}));
14
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/strategies/batch-jobs/product/types.ts"],"names":[],"mappings":";;;AAoEA;;GAEG;AACH,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iDAAgC,CAAA;IAChC,iDAAgC,CAAA;IAChC,iDAAgC,CAAA;IAChC,iDAAgC,CAAA;AAClC,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB"}