@things-factory/marketplace-base 4.0.22 → 4.0.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/marketplace-base",
3
- "version": "4.0.22",
3
+ "version": "4.0.23",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,9 +24,9 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/integration-fulfillment": "^4.0.22",
28
- "@things-factory/integration-marketplace": "^4.0.22",
29
- "@things-factory/shell": "^4.0.22"
27
+ "@things-factory/integration-fulfillment": "^4.0.23",
28
+ "@things-factory/integration-marketplace": "^4.0.23",
29
+ "@things-factory/shell": "^4.0.23"
30
30
  },
31
- "gitHead": "8267638c3bd77dfc8fa9629b490d681c6854e423"
31
+ "gitHead": "49ba662dea1d349e9608a9a58c8fcfbc1310a5d6"
32
32
  }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOrderAirwayBillResolver = void 0;
4
- const integration_marketplace_1 = require("@things-factory/integration-marketplace");
5
- const typeorm_1 = require("typeorm");
6
- const entities_1 = require("../../../entities");
7
- exports.getOrderAirwayBillResolver = {
8
- async getOrderAirwayBill(_, { orderNo }, context) {
9
- const { tx } = context.state;
10
- const foundMarketplaceOrders = await tx.getRepository(entities_1.MarketplaceOrder).find({
11
- where: { orderNo: typeorm_1.In(orderNo) },
12
- relations: ['marketplaceStore', 'marketplaceOrderItems']
13
- });
14
- if ((foundMarketplaceOrders === null || foundMarketplaceOrders === void 0 ? void 0 : foundMarketplaceOrders.length) === 0)
15
- throw new Error('No order is found');
16
- const marketplaceOrderItems = foundMarketplaceOrders.map((order) => order.marketplaceOrderItems);
17
- let docRefNo = [];
18
- marketplaceOrderItems.map((item) => {
19
- let orderDocNo = [];
20
- orderDocNo = item.map(oi => oi.docRefNo);
21
- if (orderDocNo[0].indexOf(',') > -1) {
22
- orderDocNo = orderDocNo[0].split(',');
23
- }
24
- Array.prototype.push.apply(docRefNo, orderDocNo);
25
- });
26
- // remove repeated docRefNo
27
- docRefNo = docRefNo.filter((value, index) => docRefNo.indexOf(value) === index);
28
- const storeId = foundMarketplaceOrders.map((order) => order.marketplaceStore.id);
29
- const marketplaceStore = await integration_marketplace_1.StoreAPI.getMarketplaceStore(storeId[0]);
30
- const airwayBill = await integration_marketplace_1.StoreAPI.getStoreOrderDocument(marketplaceStore, { docRefNo });
31
- return airwayBill;
32
- }
33
- };
34
- //# sourceMappingURL=get-order-airway-bill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-order-airway-bill.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/marketplace-order/get-order-airway-bill.ts"],"names":[],"mappings":";;;AAAA,qFAAoF;AACpF,qCAA2C;AAC3C,gDAA0E;AAE7D,QAAA,0BAA0B,GAAG;IACxC,KAAK,CAAC,kBAAkB,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAY;QACxD,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;QACnD,MAAM,sBAAsB,GAAuB,MAAM,EAAE,CAAC,aAAa,CAAC,2BAAgB,CAAC,CAAC,IAAI,CAAC;YAC/F,KAAK,EAAE,EAAE,OAAO,EAAE,YAAE,CAAC,OAAO,CAAC,EAAE;YAC/B,SAAS,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;SACzD,CAAC,CAAA;QACF,IAAI,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,MAAM,MAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAE9E,MAAM,qBAAqB,GAA2B,sBAAsB,CAAC,GAAG,CAC9E,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAC5C,CAAA;QAED,IAAI,QAAQ,GAAU,EAAE,CAAA;QACxB,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;YACtC,IAAI,UAAU,GAAU,EAAE,CAAA;YAC1B,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;YACxC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;gBACnC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACtC;YACD,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;QAEF,2BAA2B;QAC3B,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAA;QAE/E,MAAM,OAAO,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC,KAAuB,EAAE,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAA;QAClG,MAAM,gBAAgB,GAAqB,MAAM,kCAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;QAEzF,MAAM,UAAU,GAAU,MAAM,kCAAQ,CAAC,qBAAqB,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;QAE9F,OAAO,UAAU,CAAA;IACnB,CAAC;CACF,CAAA"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AirwayBill = void 0;
7
- const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
- exports.AirwayBill = graphql_tag_1.default `
9
- type AirwayBill {
10
- orderNo: String
11
- mimeType: String
12
- file: String
13
- airwayBill: String
14
- documentType: String
15
- itemCount: Int
16
- }
17
- `;
18
- //# sourceMappingURL=airwaybill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"airwaybill.js","sourceRoot":"","sources":["../../../../server/graphql/types/marketplace-order/airwaybill.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,UAAU,GAAG,qBAAG,CAAA;;;;;;;;;CAS5B,CAAA"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NoGenerator = void 0;
7
- const v4_1 = __importDefault(require("uuid/v4"));
8
- class NoGenerator {
9
- static id() {
10
- return `${v4_1.default()}`;
11
- }
12
- static sku() {
13
- return `SKU-${v4_1.default()}`;
14
- }
15
- }
16
- exports.NoGenerator = NoGenerator;
17
- //# sourceMappingURL=no-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-generator.js","sourceRoot":"","sources":["../../server/util/no-generator.ts"],"names":[],"mappings":";;;;;;AAAA,iDAA0B;AAE1B,MAAa,WAAW;IACtB,MAAM,CAAC,EAAE;QACP,OAAO,GAAG,YAAI,EAAE,EAAE,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,GAAG;QACR,OAAO,OAAO,YAAI,EAAE,EAAE,CAAA;IACxB,CAAC;CACF;AARD,kCAQC"}