@things-factory/integration-sellercraft 4.2.5 → 4.2.9

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 (28) hide show
  1. package/dist-server/constants/order-status-mapping.js +16 -2
  2. package/dist-server/constants/order-status-mapping.js.map +1 -1
  3. package/dist-server/constants/platform.js +2 -1
  4. package/dist-server/constants/platform.js.map +1 -1
  5. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js +5 -2
  6. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js.map +1 -1
  7. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js +2 -2
  8. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js.map +1 -1
  9. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js +5 -4
  10. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map +1 -1
  11. package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js +8 -4
  12. package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js.map +1 -1
  13. package/dist-server/routers/sellercraft-router.js +135 -88
  14. package/dist-server/routers/sellercraft-router.js.map +1 -1
  15. package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js +291 -245
  16. package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js.map +1 -1
  17. package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js +30 -16
  18. package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js.map +1 -1
  19. package/package.json +3 -3
  20. package/server/constants/order-status-mapping.ts +16 -1
  21. package/server/constants/platform.ts +2 -1
  22. package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.ts +6 -2
  23. package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts +2 -2
  24. package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts +13 -11
  25. package/server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.ts +8 -4
  26. package/server/routers/sellercraft-router.ts +130 -91
  27. package/server/service/marketplace-channel/marketplace-channel-order-mutation.ts +343 -283
  28. package/server/service/marketplace-channel/marketplace-channel-product-mutation.ts +30 -28
@@ -15,265 +15,311 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.MarketplaceChannelOrderMutation = void 0;
16
16
  const type_graphql_1 = require("type-graphql");
17
17
  const typeorm_1 = require("typeorm");
18
- const marketplace_channel_1 = require("./marketplace-channel");
19
18
  const env_1 = require("@things-factory/env");
20
19
  const integration_marketplace_1 = require("@things-factory/integration-marketplace");
20
+ const constants_1 = require("../../constants");
21
21
  const sellercraft_channel_integration_api_1 = require("../../controllers/sellercraft-channel-integration-api");
22
+ const marketplace_channel_1 = require("./marketplace-channel");
22
23
  let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
23
24
  async syncAllMarketplaceChannelOrders(fromDate, toDate, context) {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
24
26
  const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
25
27
  const { tokenCraftApiKey: apiKey, getShopsTokenCraftUrl } = sellercraftChannelIntegrationConfig;
26
28
  const channels = await (0, typeorm_1.getRepository)(marketplace_channel_1.MarketplaceChannel).find();
27
29
  for (var i = 0; i < channels.length; i++) {
28
- var channelsFullPath = getShopsTokenCraftUrl + '?channel_id=' + channels[i].channelId;
29
- const channelResponse = await fetch(channelsFullPath, {
30
- method: 'get',
31
- headers: {
32
- 'Content-Type': 'application/json',
33
- 'x-api-key': apiKey
34
- }
35
- });
36
- if (!channelResponse.ok) {
37
- throw new Error(channelResponse);
38
- }
39
- var shopsResponse = await channelResponse.json();
40
- var shops = shopsResponse.shops;
41
- for (var j = 0; j < shops.length; j++) {
42
- var store = {
43
- accessKey: shops[j].credential.consumer_key,
44
- accessSecret: shops[j].credential.consumer_secret,
45
- storeURL: shops[j].credential.store_url,
46
- platform: channels[i].name,
47
- accessToken: shops[j].credential.access_token // Magento+
48
- };
49
- // let countryCode = shops[j].country_code
50
- // let channelCode = shops[j].org_prefix
51
- let organisationId = shops[j].account_id;
52
- let channelShopId = shops[j].channel_shop_id;
53
- let orderResult = [];
54
- let page = 1;
55
- let hasMorePage = true;
56
- let lastOrderId;
57
- var limit = 100;
58
- while (hasMorePage) {
59
- const { results: marketplaceOrders, more } = await integration_marketplace_1.StoreAPI.getStoreOrders(store, {
60
- fromDate,
61
- toDate,
62
- pagination: { page, limit },
63
- lastOrderId
64
- });
65
- orderResult.push(...marketplaceOrders);
66
- if (more)
67
- page++;
68
- hasMorePage = more;
30
+ try {
31
+ const channel = channels[i];
32
+ var channelsFullPath = getShopsTokenCraftUrl + '?channel_id=' + channel.channelId;
33
+ const channelResponse = await fetch(channelsFullPath, {
34
+ method: 'get',
35
+ headers: {
36
+ 'Content-Type': 'application/json',
37
+ 'x-api-key': apiKey
38
+ }
39
+ });
40
+ if (!channelResponse.ok) {
41
+ throw new Error(channelResponse);
69
42
  }
70
- var sellercraftStore = Object.assign(Object.assign({}, store), { platform: 'sellercraftChannelIntegration' });
71
- let mappedOrderResult = orderResult.map(order => {
72
- let { firstName: custFirstName, lastName: custLastName, orderCreatedAt: createdAt, orderUpdatedAt: updatedAt, orderNo: id, status } = order;
73
- let { first_name: billFirstName, last_name: billLastName, address_1: billAddress1, address_2: billAddress2, address_3: billAddress3, address_4: billAddress4, address_5: billAddress5, city: billCity, postcode: billPostalCode, country: billCountry, phone: billPhone1, phone_2: billPhone2 } = order === null || order === void 0 ? void 0 : order.billing;
74
- let { first_name: shipFirstName, last_name: shipLastName, address_1: shipAddress1, address_2: shipAddress2, address_3: shipAddress3, address_4: shipAddress4, address_5: shipAddress5, city: shipCity, postcode: shipPostalCode, country: shipCountry, phone: shipPhone1, phone_2: shipPhone2 } = order.shipping;
75
- let orderItems = order.orderItems.map(item => {
76
- let { name: id, variationId: variationId, slaExpiresAt, total, totalTax, subtotal, subtotalTax, qty } = item;
77
- return {
78
- id,
79
- variationId,
80
- currency: order.orderShipping.collectionCurrency,
81
- createdAt: order.orderCreatedAt,
82
- updatedAt: order.orderUpdatedAt,
83
- charges: [
84
- {
85
- name: 'CHARGES_MARKETING',
86
- grossAmount: 0,
87
- nettAmount: 0
88
- },
89
- {
90
- name: 'CLAIMS_DAMAGE',
91
- grossAmount: 0,
92
- nettAmount: 0
93
- },
94
- {
95
- name: 'CLAIMS_LOST',
96
- grossAmount: 0,
97
- nettAmount: 0
98
- },
99
- {
100
- name: 'COMMISSION_PLATFORM',
101
- grossAmount: 0,
102
- nettAmount: 0
103
- },
104
- {
105
- name: 'DEPOSIT_PRESALE',
106
- grossAmount: 0,
107
- nettAmount: 0
108
- },
109
- {
110
- name: 'FEE_MISCELLANEOUS',
111
- grossAmount: 0,
112
- nettAmount: 0
113
- },
114
- {
115
- name: 'FEE_TRANSACTION',
116
- grossAmount: 0,
117
- nettAmount: 0
118
- },
119
- {
120
- name: 'PRICE_NORMAL_SELLING',
121
- grossAmount: total,
122
- nettAmount: subtotal
123
- },
124
- {
125
- name: 'PRICE_RECOMMENDED_RETAIL',
126
- grossAmount: 0,
127
- nettAmount: 0
128
- },
129
- {
130
- name: 'PROMOTIONS_CUSTOMER_RECEIVED',
131
- grossAmount: 0,
132
- nettAmount: 0
133
- },
134
- {
135
- name: 'PROMOTIONS_REBATE_PLATFORM',
136
- grossAmount: 0,
137
- nettAmount: 0
138
- },
139
- {
140
- name: 'PROMOTIONS_REBATE_SELLER',
141
- grossAmount: 0,
142
- nettAmount: 0
143
- },
144
- {
145
- name: 'REVERSAL_CHARGES_MARKETING',
146
- grossAmount: 0,
147
- nettAmount: 0
148
- },
149
- {
150
- name: 'REVERSAL_COMMISSION',
151
- grossAmount: 0,
152
- nettAmount: 0
153
- },
154
- {
155
- name: 'REVERSAL_FEE_MISCELLANEOUS',
156
- grossAmount: 0,
157
- nettAmount: 0
158
- },
159
- {
160
- name: 'REVERSAL_PROMOTIONS_CUSTOMER_RECEIVED',
161
- grossAmount: 0,
162
- nettAmount: 0
163
- },
164
- {
165
- name: 'REVERSAL_SELLER_RETURN_REFUND_AMOUNT',
166
- grossAmount: 0,
167
- nettAmount: 0
168
- },
169
- {
170
- name: 'REVERSAL_SHIPPING_CUSTOMER_PAID',
171
- grossAmount: 0,
172
- nettAmount: 0
173
- },
174
- {
175
- name: 'REVERSAL_SHIPPING_REBATE_PLATFORM',
176
- grossAmount: 0,
177
- nettAmount: 0
178
- },
179
- {
180
- name: 'REVERSAL_SHIPPING_SELLER_PAID',
181
- grossAmount: 0,
182
- nettAmount: 0
183
- },
184
- {
185
- name: 'SHIPPING_COST_TOTAL',
186
- grossAmount: 0,
187
- nettAmount: 0
188
- },
189
- {
190
- name: 'SHIPPING_CUSTOMER_PAID',
191
- grossAmount: 0,
192
- nettAmount: 0
193
- },
194
- {
195
- name: 'SHIPPING_REBATE_PLATFORM',
196
- grossAmount: 0,
197
- nettAmount: 0
198
- },
199
- {
200
- name: 'SHIPPING_SELLER_PAID',
201
- grossAmount: 0,
202
- nettAmount: 0
203
- },
204
- {
205
- name: 'TAXES',
206
- grossAmount: totalTax,
207
- nettAmount: subtotalTax
208
- },
209
- {
210
- name: 'VOUCHERS_CUSTOMER_RECEIVED',
211
- grossAmount: 0,
212
- nettAmount: 0
213
- },
214
- {
215
- name: 'VOUCHERS_REBATE_PLATFORM',
216
- grossAmount: 0,
217
- nettAmount: 0
218
- },
219
- {
220
- name: 'VOUCHERS_REBATE_SELLER',
221
- grossAmount: 0,
222
- nettAmount: 0
223
- }
224
- ],
225
- slaExpiresAt,
226
- qty
43
+ var shopsResponse = await channelResponse.json();
44
+ var shops = shopsResponse.shops;
45
+ for (var j = 0; j < shops.length; j++) {
46
+ try {
47
+ var store = {
48
+ accessKey: ((_b = (_a = shops[j]) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
49
+ accessSecret: ((_d = (_c = shops[j]) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
50
+ storeURL: ((_f = (_e = shops[j]) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url) || '',
51
+ platform: channel.name,
52
+ accessToken: (_h = (_g = shops[j]) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
53
+ channelShopId: (_j = shops[j]) === null || _j === void 0 ? void 0 : _j.channel_shop_id
227
54
  };
228
- });
229
- let mappedOrderItems = [];
230
- orderItems.map(oi => {
231
- for (let i = 0; i < oi.qty; i++) {
232
- mappedOrderItems.push(Object.assign(Object.assign({}, oi), { id: `${oi.id}-${i + 1}` }));
55
+ // let countryCode = shops[j].country_code
56
+ // let channelCode = shops[j].org_prefix
57
+ let organisationId = shops[j].account_id;
58
+ let channelShopId = shops[j].channel_shop_id;
59
+ let orderResult = [];
60
+ let page = 1;
61
+ let hasMorePage = true;
62
+ let lastOrderId;
63
+ let cursor;
64
+ var limit = 50;
65
+ while (hasMorePage) {
66
+ const { results: marketplaceOrders, more, nextCursor } = await integration_marketplace_1.StoreAPI.getStoreOrders(store, {
67
+ fromDate,
68
+ toDate,
69
+ pagination: { page, limit },
70
+ lastOrderId,
71
+ nextCursor: cursor
72
+ });
73
+ orderResult.push(...marketplaceOrders);
74
+ if (more)
75
+ page++;
76
+ hasMorePage = more;
77
+ cursor = nextCursor;
233
78
  }
234
- });
235
- return {
236
- custFirstName,
237
- custLastName,
238
- createdAt,
239
- updatedAt,
240
- id,
241
- billFirstName,
242
- billLastName,
243
- billAddress1: billAddress1.toString() || shipAddress1.toString(),
244
- billAddress2: billAddress2 || shipAddress2,
245
- billAddress3: billAddress3 || shipAddress3,
246
- billAddress4: billAddress4 || shipAddress4,
247
- billAddress5: billAddress5 || shipAddress5,
248
- billCity: billCity || shipCity,
249
- billPostalCode: billPostalCode || shipPostalCode,
250
- billCountry: billCountry || shipCountry,
251
- billPhone1: billPhone1 || shipPhone1,
252
- billPhone2: billPhone2 || shipPhone2,
253
- shipFirstName,
254
- shipLastName,
255
- shipAddress1: shipAddress1.toString(),
256
- shipAddress2,
257
- shipAddress3,
258
- shipAddress4,
259
- shipAddress5,
260
- shipCity,
261
- shipPostalCode,
262
- shipCountry,
263
- shipPhone1,
264
- shipPhone2,
265
- mappedOrderItems,
266
- channelShopId,
267
- organisationId,
268
- status,
269
- charges: getOrderCharges(mappedOrderItems)
270
- };
271
- });
272
- if (mappedOrderResult.length > 0) {
273
- await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult });
79
+ var sellercraftStore = Object.assign(Object.assign({}, store), { platform: 'sellercraftChannelIntegration' });
80
+ let mappedOrderResult = orderResult.map(order => {
81
+ let id = store.platform == 'magento' ? order.name : order.orderNo;
82
+ let { firstName: custFirstName, lastName: custLastName, orderCreatedAt: createdAt, orderUpdatedAt: updatedAt, status, isSOF } = order;
83
+ let { first_name: billFirstName, last_name: billLastName, address_1: billAddress1, address_2: billAddress2, address_3: billAddress3, address_4: billAddress4, address_5: billAddress5, city: billCity, postcode: billPostalCode, country: billCountry, phone: billPhone1, phone_2: billPhone2 } = order === null || order === void 0 ? void 0 : order.billing;
84
+ let { first_name: shipFirstName, last_name: shipLastName, address_1: shipAddress1, address_2: shipAddress2, address_3: shipAddress3, address_4: shipAddress4, address_5: shipAddress5, city: shipCity, postcode: shipPostalCode, country: shipCountry, phone: shipPhone1, phone_2: shipPhone2 } = order.shipping;
85
+ let orderPackage = (order === null || order === void 0 ? void 0 : order.orderPackage) || {};
86
+ let orderItems = order.orderItems.map(item => {
87
+ let { name: id, variationId: variationId, slaExpiresAt, total, totalTax, subtotal, subtotalTax, qty } = item;
88
+ return {
89
+ id,
90
+ variationId,
91
+ currency: order.orderShipping.collectionCurrency,
92
+ createdAt: order.orderCreatedAt,
93
+ updatedAt: order.orderUpdatedAt,
94
+ charges: [
95
+ {
96
+ name: 'CHARGES_MARKETING',
97
+ grossAmount: 0,
98
+ nettAmount: 0
99
+ },
100
+ {
101
+ name: 'CLAIMS_DAMAGE',
102
+ grossAmount: 0,
103
+ nettAmount: 0
104
+ },
105
+ {
106
+ name: 'CLAIMS_LOST',
107
+ grossAmount: 0,
108
+ nettAmount: 0
109
+ },
110
+ {
111
+ name: 'COMMISSION_PLATFORM',
112
+ grossAmount: 0,
113
+ nettAmount: 0
114
+ },
115
+ {
116
+ name: 'DEPOSIT_PRESALE',
117
+ grossAmount: 0,
118
+ nettAmount: 0
119
+ },
120
+ {
121
+ name: 'FEE_MISCELLANEOUS',
122
+ grossAmount: 0,
123
+ nettAmount: 0
124
+ },
125
+ {
126
+ name: 'FEE_TRANSACTION',
127
+ grossAmount: 0,
128
+ nettAmount: 0
129
+ },
130
+ {
131
+ name: 'PRICE_NORMAL_SELLING',
132
+ grossAmount: total,
133
+ nettAmount: subtotal
134
+ },
135
+ {
136
+ name: 'PRICE_RECOMMENDED_RETAIL',
137
+ grossAmount: 0,
138
+ nettAmount: 0
139
+ },
140
+ {
141
+ name: 'PROMOTIONS_CUSTOMER_RECEIVED',
142
+ grossAmount: 0,
143
+ nettAmount: 0
144
+ },
145
+ {
146
+ name: 'PROMOTIONS_REBATE_PLATFORM',
147
+ grossAmount: 0,
148
+ nettAmount: 0
149
+ },
150
+ {
151
+ name: 'PROMOTIONS_REBATE_SELLER',
152
+ grossAmount: 0,
153
+ nettAmount: 0
154
+ },
155
+ {
156
+ name: 'REVERSAL_CHARGES_MARKETING',
157
+ grossAmount: 0,
158
+ nettAmount: 0
159
+ },
160
+ {
161
+ name: 'REVERSAL_COMMISSION',
162
+ grossAmount: 0,
163
+ nettAmount: 0
164
+ },
165
+ {
166
+ name: 'REVERSAL_FEE_MISCELLANEOUS',
167
+ grossAmount: 0,
168
+ nettAmount: 0
169
+ },
170
+ {
171
+ name: 'REVERSAL_PROMOTIONS_CUSTOMER_RECEIVED',
172
+ grossAmount: 0,
173
+ nettAmount: 0
174
+ },
175
+ {
176
+ name: 'REVERSAL_SELLER_RETURN_REFUND_AMOUNT',
177
+ grossAmount: 0,
178
+ nettAmount: 0
179
+ },
180
+ {
181
+ name: 'REVERSAL_SHIPPING_CUSTOMER_PAID',
182
+ grossAmount: 0,
183
+ nettAmount: 0
184
+ },
185
+ {
186
+ name: 'REVERSAL_SHIPPING_REBATE_PLATFORM',
187
+ grossAmount: 0,
188
+ nettAmount: 0
189
+ },
190
+ {
191
+ name: 'REVERSAL_SHIPPING_SELLER_PAID',
192
+ grossAmount: 0,
193
+ nettAmount: 0
194
+ },
195
+ {
196
+ name: 'SHIPPING_COST_TOTAL',
197
+ grossAmount: 0,
198
+ nettAmount: 0
199
+ },
200
+ {
201
+ name: 'SHIPPING_CUSTOMER_PAID',
202
+ grossAmount: 0,
203
+ nettAmount: 0
204
+ },
205
+ {
206
+ name: 'SHIPPING_REBATE_PLATFORM',
207
+ grossAmount: 0,
208
+ nettAmount: 0
209
+ },
210
+ {
211
+ name: 'SHIPPING_SELLER_PAID',
212
+ grossAmount: 0,
213
+ nettAmount: 0
214
+ },
215
+ {
216
+ name: 'TAXES',
217
+ grossAmount: totalTax,
218
+ nettAmount: subtotalTax
219
+ },
220
+ {
221
+ name: 'VOUCHERS_CUSTOMER_RECEIVED',
222
+ grossAmount: 0,
223
+ nettAmount: 0
224
+ },
225
+ {
226
+ name: 'VOUCHERS_REBATE_PLATFORM',
227
+ grossAmount: 0,
228
+ nettAmount: 0
229
+ },
230
+ {
231
+ name: 'VOUCHERS_REBATE_SELLER',
232
+ grossAmount: 0,
233
+ nettAmount: 0
234
+ }
235
+ ],
236
+ slaExpiresAt,
237
+ qty
238
+ };
239
+ });
240
+ let mappedOrderItems = [];
241
+ orderItems.map(oi => {
242
+ for (let i = 0; i < oi.qty; i++) {
243
+ mappedOrderItems.push(Object.assign(Object.assign({}, oi), { id: `${oi.id}-${i + 1}` }));
244
+ }
245
+ });
246
+ return {
247
+ custFirstName,
248
+ custLastName,
249
+ createdAt,
250
+ updatedAt,
251
+ id,
252
+ billFirstName,
253
+ billLastName,
254
+ billAddress1: billAddress1.toString() || shipAddress1.toString(),
255
+ billAddress2: billAddress2 || shipAddress2,
256
+ billAddress3: billAddress3 || shipAddress3,
257
+ billAddress4: billAddress4 || shipAddress4,
258
+ billAddress5: billAddress5 || shipAddress5,
259
+ billCity: billCity || shipCity,
260
+ billPostalCode: billPostalCode || shipPostalCode,
261
+ billCountry: billCountry || shipCountry,
262
+ billPhone1: billPhone1 || shipPhone1,
263
+ billPhone2: billPhone2 || shipPhone2,
264
+ shipFirstName,
265
+ shipLastName,
266
+ shipAddress1: shipAddress1.toString(),
267
+ shipAddress2,
268
+ shipAddress3,
269
+ shipAddress4,
270
+ shipAddress5,
271
+ shipCity,
272
+ shipPostalCode,
273
+ shipCountry,
274
+ shipPhone1,
275
+ shipPhone2,
276
+ mappedOrderItems,
277
+ channelShopId,
278
+ organisationId,
279
+ status,
280
+ isSOF: isSOF ? isSOF : false,
281
+ orderPackage,
282
+ charges: getOrderCharges(mappedOrderItems)
283
+ };
284
+ });
285
+ if (mappedOrderResult.length > 0) {
286
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult });
287
+ await Promise.all(mappedOrderResult.map(async (result) => {
288
+ var _a;
289
+ if (!(result === null || result === void 0 ? void 0 : result.isSOF) && ((_a = result === null || result === void 0 ? void 0 : result.orderPackage) === null || _a === void 0 ? void 0 : _a.packageId)) {
290
+ let orderPackage = result.orderPackage;
291
+ let newOrderPackage = {
292
+ channelShopId,
293
+ nativeOrderId: result.id,
294
+ nativePackageId: orderPackage.packageId,
295
+ shippingTrackingCode: orderPackage.trackingNumber,
296
+ shippingTypeValue: (orderPackage === null || orderPackage === void 0 ? void 0 : orderPackage.shippingType)
297
+ ? orderPackage.shippingType
298
+ : constants_1.SHIPPING_TYPE.DROP_SHIPPING,
299
+ warehouseCode: constants_1.SHIPPING_TYPE.DROP_SHIPPING,
300
+ shipper: {
301
+ name: orderPackage.shippingProvider,
302
+ isCodSupported: (orderPackage === null || orderPackage === void 0 ? void 0 : orderPackage.isCodSupport) ? orderPackage.isCodSupport : false
303
+ },
304
+ documents: (orderPackage === null || orderPackage === void 0 ? void 0 : orderPackage.orderDocument) || [],
305
+ shipperLastMile: {
306
+ name: orderPackage.shippingProvider,
307
+ isCodSupported: (orderPackage === null || orderPackage === void 0 ? void 0 : orderPackage.isCodSupport) ? orderPackage.isCodSupport : false
308
+ },
309
+ orderItemIds: (orderPackage === null || orderPackage === void 0 ? void 0 : orderPackage.orderListIdList)
310
+ ? orderPackage.orderListIdList
311
+ : result.mappedOrderItems.map(orderItem => orderItem.id)
312
+ };
313
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrderPackage(sellercraftStore, newOrderPackage);
314
+ }
315
+ }));
316
+ }
317
+ }
318
+ catch (e) { }
274
319
  }
320
+ return true;
275
321
  }
276
- return true;
322
+ catch (e) { }
277
323
  }
278
324
  }
279
325
  };
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-channel-order-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel-order-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAuC;AAEvC,+DAA0D;AAE1D,6CAA4C;AAC5C,qFAAkE;AAClE,+GAAwG;AAGxG,IAAa,+BAA+B,GAA5C,MAAa,+BAA+B;IAE1C,KAAK,CAAC,+BAA+B,CAClB,QAAgB,EAClB,MAAc,EACtB,OAAY;QAEnB,MAAM,mCAAmC,GAAG,YAAM,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAA;QACjG,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,mCAAmC,CAAA;QAE/F,MAAM,QAAQ,GAAyB,MAAM,IAAA,uBAAa,EAAC,wCAAkB,CAAC,CAAC,IAAI,E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