@pmcretail/mapper-library 0.0.39 → 0.0.41

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 (68) hide show
  1. package/esm2022/lib/RJ-mapper.class.mjs +875 -0
  2. package/esm2022/lib/TransactionDocumentBuilder.mjs +1240 -0
  3. package/esm2022/lib/WebReturn-mapper.class.mjs +324 -0
  4. package/esm2022/lib/WebReturnSalesforceMapper.class.mjs +410 -0
  5. package/esm2022/lib/basket.service.mjs +516 -0
  6. package/esm2022/lib/mapper-library.component.mjs +22 -0
  7. package/esm2022/lib/mapper-library.model.mjs +39 -0
  8. package/esm2022/lib/mapper-library.module.mjs +21 -0
  9. package/esm2022/lib/number-util.service.mjs +40 -0
  10. package/esm2022/pmcretail-mapper-library.mjs +5 -0
  11. package/esm2022/public-api.mjs +9 -0
  12. package/fesm2022/pmcretail-mapper-library.mjs +3482 -0
  13. package/fesm2022/pmcretail-mapper-library.mjs.map +1 -0
  14. package/index.d.ts +6 -0
  15. package/lib/RJ-mapper.class.d.ts +80 -79
  16. package/lib/RJ-mapper.class.d.ts.map +1 -0
  17. package/lib/TransactionDocumentBuilder.d.ts +271 -270
  18. package/lib/TransactionDocumentBuilder.d.ts.map +1 -0
  19. package/lib/WebReturn-mapper.class.d.ts +27 -26
  20. package/lib/WebReturn-mapper.class.d.ts.map +1 -0
  21. package/lib/WebReturnSalesforceMapper.class.d.ts +35 -34
  22. package/lib/WebReturnSalesforceMapper.class.d.ts.map +1 -0
  23. package/lib/basket.service.d.ts +105 -103
  24. package/lib/basket.service.d.ts.map +1 -0
  25. package/lib/mapper-library.component.d.ts +9 -5
  26. package/lib/mapper-library.component.d.ts.map +1 -0
  27. package/lib/mapper-library.model.d.ts +694 -693
  28. package/lib/mapper-library.model.d.ts.map +1 -0
  29. package/lib/mapper-library.module.d.ts +8 -2
  30. package/lib/mapper-library.module.d.ts.map +1 -0
  31. package/lib/number-util.service.d.ts +13 -9
  32. package/lib/number-util.service.d.ts.map +1 -0
  33. package/package.json +20 -16
  34. package/pmcretail-mapper-library.d.ts.map +1 -0
  35. package/public-api.d.ts +6 -5
  36. package/public-api.d.ts.map +1 -0
  37. package/bundles/pmcretail-mapper-library.umd.js +0 -8542
  38. package/bundles/pmcretail-mapper-library.umd.js.map +0 -1
  39. package/bundles/pmcretail-mapper-library.umd.min.js +0 -16
  40. package/bundles/pmcretail-mapper-library.umd.min.js.map +0 -1
  41. package/esm2015/lib/RJ-mapper.class.js +0 -1464
  42. package/esm2015/lib/TransactionDocumentBuilder.js +0 -1535
  43. package/esm2015/lib/WebReturn-mapper.class.js +0 -501
  44. package/esm2015/lib/WebReturnSalesforceMapper.class.js +0 -683
  45. package/esm2015/lib/basket.service.js +0 -851
  46. package/esm2015/lib/mapper-library.component.js +0 -27
  47. package/esm2015/lib/mapper-library.model.js +0 -1442
  48. package/esm2015/lib/mapper-library.module.js +0 -21
  49. package/esm2015/lib/number-util.service.js +0 -78
  50. package/esm2015/pmcretail-mapper-library.js +0 -10
  51. package/esm2015/public-api.js +0 -14
  52. package/esm5/lib/RJ-mapper.class.js +0 -1762
  53. package/esm5/lib/TransactionDocumentBuilder.js +0 -2469
  54. package/esm5/lib/WebReturn-mapper.class.js +0 -592
  55. package/esm5/lib/WebReturnSalesforceMapper.class.js +0 -857
  56. package/esm5/lib/basket.service.js +0 -1076
  57. package/esm5/lib/mapper-library.component.js +0 -29
  58. package/esm5/lib/mapper-library.model.js +0 -1442
  59. package/esm5/lib/mapper-library.module.js +0 -25
  60. package/esm5/lib/number-util.service.js +0 -95
  61. package/esm5/pmcretail-mapper-library.js +0 -10
  62. package/esm5/public-api.js +0 -14
  63. package/fesm2015/pmcretail-mapper-library.js +0 -6594
  64. package/fesm2015/pmcretail-mapper-library.js.map +0 -1
  65. package/fesm5/pmcretail-mapper-library.js +0 -8326
  66. package/fesm5/pmcretail-mapper-library.js.map +0 -1
  67. package/pmcretail-mapper-library.d.ts +0 -5
  68. package/pmcretail-mapper-library.metadata.json +0 -1
@@ -1,693 +1,694 @@
1
- export declare enum TRANSACTION_TYPE {
2
- SALE = "SALE",
3
- REFUND = "REFUND",
4
- SALE_REFUND = "SALE_REFUND",
5
- SALE_EXCHANGE = "SALE_EXCHANGE",
6
- VOID = "VOID",
7
- WEB_RETURNS = "WEB_RETURNS"
8
- }
9
- export interface ItemDiscount {
10
- trnDiscountsPortion: number;
11
- trnPromotionsPortion: number;
12
- refundPortion: number;
13
- currentRefundPortion?: number;
14
- }
15
- export declare enum DELIVERY_METHODS {
16
- DELIVERY = 1,
17
- DROP_SHIP = 2,
18
- COLLECT_FROM_STORE = 3,
19
- SHIP_TO_STORE = 4
20
- }
21
- export interface ProductChange {
22
- itemLineId?: number;
23
- SKU: string;
24
- quantity: number;
25
- selectedPrice?: number;
26
- lineDiscount?: LineDiscount;
27
- linePromotions?: LinePromotions;
28
- exchange?: Exchange;
29
- refundedQuantity?: number;
30
- refundPromotionalQuantity?: number;
31
- refunded?: boolean;
32
- refundedTotal?: number;
33
- refundedReason?: string;
34
- refundedReasonDescription?: string;
35
- isChecked?: boolean;
36
- sealed?: boolean;
37
- isLastExchanged?: boolean;
38
- }
39
- /**
40
- * Product
41
- */
42
- export interface Product extends ProductChange {
43
- itemLineId?: number;
44
- status: number;
45
- subGroup: number;
46
- brand: string;
47
- currency: string;
48
- category: string;
49
- countryofOrigin: string;
50
- productId: string;
51
- productType: number;
52
- name?: string;
53
- imageUrls: [string];
54
- isImageFailToLoad?: boolean;
55
- size: string;
56
- type: string;
57
- season: number;
58
- productGroup: number;
59
- styleCode: string;
60
- nodeStructure: NodeStructure[];
61
- barcode: string;
62
- price: Price[];
63
- colour: string;
64
- description: string;
65
- totalLinePrice: number;
66
- total: number;
67
- addedInBasket?: boolean;
68
- selectedVAT?: number;
69
- selectedVATCode?: string;
70
- selectedRRPPrice?: number;
71
- lineDiscount?: LineDiscount;
72
- exchange?: Exchange;
73
- refundPromotionalQuantity?: number;
74
- exchangeReason?: string;
75
- exchangeQuantity?: number;
76
- itemDiscounts: ItemDiscount;
77
- giftCardNumberIssued?: string;
78
- giftCardAmount?: number;
79
- giftCardRecipientEmail?: string;
80
- giftCardExpiryDate?: string;
81
- giftCardRecipientName?: string;
82
- giftCard?: boolean;
83
- discountable: boolean;
84
- excludePromotion: boolean;
85
- categories: Categories[];
86
- descriptions: Descriptions[];
87
- barcodes: string[];
88
- externalId: string;
89
- createdDate: string;
90
- updatedDate: string;
91
- createdBy: string;
92
- updatedBy: string;
93
- attributes: CoreAttribute[];
94
- id: string;
95
- long_description: string;
96
- isWebOrder?: boolean;
97
- fullfilmentId: string;
98
- fullfilmentLocationName?: string;
99
- deliveryMethod?: string;
100
- deliveryGroup?: string;
101
- selectedInventory?: InventoryInfo;
102
- leadTime?: leadTime;
103
- }
104
- export interface leadTime {
105
- type: string;
106
- value: string;
107
- }
108
- export interface Exchange {
109
- exchangeId: number;
110
- lineItemId: number;
111
- reason: string;
112
- quantity: number;
113
- newItems: Product[];
114
- }
115
- export interface Categories {
116
- id: string;
117
- parentId: string;
118
- name: string;
119
- categoryId: string;
120
- status: boolean;
121
- }
122
- export interface Descriptions {
123
- name: string;
124
- countryCode: string;
125
- value: string;
126
- }
127
- export interface CoreAttribute {
128
- name: string;
129
- value: string;
130
- searchable: boolean;
131
- countryCode: string;
132
- }
133
- /**
134
- * Basket
135
- */
136
- export interface Basket {
137
- subsidiaryId?: string;
138
- products: Product[];
139
- transactionDiscount: any[];
140
- quantity: number;
141
- total: number;
142
- saleTotal: number;
143
- discountTotal?: number;
144
- transactionId?: string;
145
- offlineTransactionId?: string;
146
- baseCurrency: string;
147
- basketTotal?: number;
148
- refundTotal?: number;
149
- transactionPromotion?: TransactionPromotion[];
150
- customer?: any;
151
- exchange?: Exchange[];
152
- inStoreFlag?: boolean;
153
- }
154
- /**
155
- * Price
156
- */
157
- export interface Price {
158
- VAT: number;
159
- VATCode: string;
160
- salesPrice: number;
161
- currencyCode: string;
162
- RRPPrice: number;
163
- }
164
- /**
165
- * Node structure
166
- */
167
- interface NodeStructure {
168
- status: boolean;
169
- name: string;
170
- nodeType: string;
171
- isOverride: boolean;
172
- nodeId: string;
173
- parentId: string;
174
- }
175
- /**
176
- * Line Discount
177
- */
178
- export interface LineDiscount {
179
- itemLineId: string;
180
- discountAmount: number;
181
- discountType: string;
182
- name?: string;
183
- unitPrice: number;
184
- discountedLinePrice?: number;
185
- priceManagerOverride?: UserOverride;
186
- priceOverrideReasonCode?: string;
187
- priceOverrideReasonName?: string;
188
- priceOverrideAmount?: number;
189
- percentageDiscountManagerOverride?: UserOverride;
190
- percentageDiscountReasonCode?: string;
191
- percentageDiscountReasonName?: string;
192
- percentageDiscountValue?: number;
193
- }
194
- /**
195
- * User Override
196
- */
197
- export interface UserOverride {
198
- userId: string;
199
- automaticApprove: string;
200
- originalUserId: string;
201
- }
202
- /**
203
- * line Promotions
204
- */
205
- export interface LinePromotions {
206
- trigger: Trigger[];
207
- itemLineId: number;
208
- promotionId: string;
209
- displayText: string;
210
- promotionType: string;
211
- promotionAmount: number;
212
- name: string;
213
- promotionInfo: string;
214
- promotionLinePrice: number;
215
- refunded?: boolean;
216
- }
217
- /**
218
- * trigger
219
- */
220
- export interface Trigger {
221
- itemLineId: string;
222
- quantity?: number;
223
- totalQuantity?: number;
224
- linePromotionAmount?: number;
225
- promotionAmount?: number;
226
- refundedReason?: string;
227
- refundedReasonDescription?: string;
228
- promotionId?: string;
229
- }
230
- /**
231
- * Transaction Promotion
232
- */
233
- export interface TransactionPromotion {
234
- displayText: string;
235
- name: string;
236
- promotionAmount: number;
237
- promotionId: string;
238
- promotionInfo: string;
239
- promotionType: string;
240
- itemLineIds: number[];
241
- type?: string;
242
- subLevelType?: PROMOTION_LEVEL;
243
- trigger?: Trigger[];
244
- couponCode?: string;
245
- }
246
- export interface RefundProductChange {
247
- itemLineId?: number;
248
- refundedQuantity?: number;
249
- refundedPromotionalQuantity?: number;
250
- refundTotal?: number;
251
- refundedReason?: string;
252
- refundedReasonDescription?: string;
253
- refundWithPromotion: boolean;
254
- isLastExchanged?: boolean;
255
- }
256
- export interface InventoryInfo {
257
- storeName: string;
258
- storeId: string;
259
- quantityAvailable: number;
260
- quantityRequired: number;
261
- }
262
- export interface InventoryRequestInfo extends InventoryInfo {
263
- requestedQuantity: number;
264
- requestedAction: DELIVERY_METHODS;
265
- }
266
- export interface DeliveryInfo {
267
- groups: DeliveryGroupInfo[];
268
- }
269
- export interface DeliveryGroupInfo {
270
- groupNumber: number;
271
- items: Product[];
272
- estimate?: Estimate;
273
- }
274
- export interface Estimate {
275
- type: string;
276
- value: string;
277
- }
278
- export interface TransactionDocument {
279
- transactionId?: string;
280
- subsidiaryId?: string;
281
- offlineTransactionId?: string;
282
- transactionRef?: string;
283
- dateTime?: string;
284
- orgCode: string;
285
- storeId: string;
286
- storeNodeId: string;
287
- storeNodeStructure: string;
288
- deviceId: string;
289
- terminalId: string;
290
- initiatingModule: string;
291
- export: boolean;
292
- userId?: string;
293
- userName?: string;
294
- customer?: Customer;
295
- basket: any;
296
- basketSummary: BasketSummary;
297
- baseCurrency: string;
298
- splitPayment?: boolean;
299
- isPaymentCompleted?: boolean;
300
- paymentDetails?: any;
301
- type?: string;
302
- operationStatus?: string;
303
- createdAt?: string;
304
- updatedAt?: string;
305
- transCompletedAt?: string;
306
- id?: string;
307
- saleTotal?: number;
308
- reasonCode?: string;
309
- reasonDescription?: string;
310
- override?: UserOverride;
311
- originalTransId?: string;
312
- originalExternalId?: string;
313
- apiResponse?: APIResponse;
314
- unreferencedRefund?: boolean;
315
- giftedReceipt?: boolean;
316
- currentTransactionDetails?: any;
317
- isChecked?: boolean;
318
- externalTransactionDetails?: externalTransactionDetails[];
319
- refundRequest?: any[];
320
- isInStoreOrder?: boolean;
321
- }
322
- export interface APIResponse {
323
- internalId?: number;
324
- tranid?: string;
325
- }
326
- export interface CurrentTransactionDetails {
327
- products: Product[];
328
- lineDiscount?: LineDiscount[];
329
- linePromotion?: LinePromotions[];
330
- transactionPromotion?: TransactionPromotion[];
331
- transactionDiscount?: TransactionDiscount[];
332
- basketSummary?: BasketSummary;
333
- taxBreakdown?: TaxBreakdown;
334
- totalTaxSummary?: TotalTaxSummary[];
335
- }
336
- export interface BasketSummary {
337
- totalItems?: number;
338
- saleTotal?: number;
339
- VATTotal?: number;
340
- discountTotal?: number;
341
- basketTotal?: number;
342
- refundTotal?: number;
343
- shippingTotal?: number;
344
- basketTotalWithShippingTotal?: number;
345
- inStore?: BasketSummaryDetails;
346
- webOrder?: BasketSummaryDetails;
347
- cnc?: BasketSummaryDetails;
348
- }
349
- export interface BasketSummaryDetails {
350
- totalItems?: number;
351
- saleTotal?: number;
352
- VATTotal?: number;
353
- discountTotal?: number;
354
- basketTotal?: number;
355
- refundTotal?: number;
356
- shippingTotal?: number;
357
- basketTotalWithShippingTotal?: number;
358
- }
359
- export interface TransactionDiscount {
360
- discountAmount: number;
361
- discountType: String;
362
- reasonCode: string;
363
- override?: UserOverride;
364
- itemLineIds?: number[];
365
- }
366
- export interface TBasket {
367
- products: TProduct[];
368
- lineDiscount: LineDiscount[];
369
- exchange: Exchange[];
370
- linePromotion: LinePromotions[];
371
- transactionPromotion?: TransactionPromotion[];
372
- transactionDiscount?: TransactionDiscount[];
373
- taxBreakdown?: TaxBreakdown;
374
- totalTaxSummary?: TotalTaxSummary[];
375
- }
376
- export interface TExchange {
377
- exchangeId?: number;
378
- lineItemId?: number;
379
- reason?: string;
380
- quantity?: number;
381
- newItems?: TNewItems[];
382
- }
383
- export interface TNewItems {
384
- lineItemId: number;
385
- Quantity: number;
386
- }
387
- export interface TProduct {
388
- itemLineId: string;
389
- SKU: string;
390
- description: string;
391
- imageUrls: [string];
392
- price: number;
393
- taxCode?: string;
394
- taxPercent?: string;
395
- quantity: number;
396
- refundedQuantity?: number;
397
- refundedPromotionalQuantity?: number;
398
- refunded?: boolean;
399
- refundedTotal?: number;
400
- refundedReason?: string;
401
- refundedReasonDescription?: string;
402
- selectedRRPPrice?: number;
403
- totalLinePrice: number;
404
- barCode?: string;
405
- barcodes?: string[];
406
- flagged?: boolean;
407
- exchange?: Exchange;
408
- excludePromotion: boolean;
409
- discountable?: boolean;
410
- itemDiscounts?: ItemDiscounts;
411
- isLastExchanged?: boolean;
412
- fullfilmentId: string;
413
- fullfilmentLocationName: string;
414
- deliveryMethod?: string;
415
- deliveryGroup?: string;
416
- giftCardNumberIssued?: string;
417
- giftCardAmount?: number;
418
- giftCardRecipientEmail?: string;
419
- giftCardExpiryDate?: string;
420
- giftCardRecipientName?: string;
421
- giftCard?: boolean;
422
- currency?: string;
423
- isWebOrder?: boolean;
424
- leadTime?: leadTime;
425
- lineDiscount?: any;
426
- attributes?: CoreAttribute[];
427
- }
428
- export interface ItemDiscounts {
429
- trnDiscountsPortion: number;
430
- trnPromotionsPortion: number;
431
- refundPortion: number;
432
- }
433
- export interface Customer {
434
- id: string;
435
- title?: string;
436
- firstName: string;
437
- lastName: string;
438
- email: string;
439
- postCode: string;
440
- telephone?: string;
441
- billingAddress?: Address | Address[];
442
- shippingAddress?: Address | Address[];
443
- shipmentDetails?: ShipmentDetails[];
444
- addressDetail?: string;
445
- noCustomerSelected?: boolean;
446
- externalId?: string;
447
- }
448
- export interface Address {
449
- id?: string;
450
- countryCode?: string;
451
- address1?: string;
452
- address2?: string;
453
- address3?: string;
454
- city?: string;
455
- county?: string;
456
- postCode?: string;
457
- country?: string;
458
- }
459
- export interface ShipmentDetails {
460
- id?: string;
461
- deliveryGroup?: string;
462
- }
463
- export interface PaymentDetails {
464
- cardNumber?: any;
465
- sqNo?: number;
466
- result?: string;
467
- currency: string;
468
- amount: string;
469
- authcode?: string;
470
- pan?: string;
471
- cardType?: string;
472
- transactionDate?: string;
473
- mid?: string;
474
- tid?: string;
475
- cvm?: string;
476
- hostReferenceId?: string;
477
- aid?: string;
478
- receiptNo?: string;
479
- expirydate?: string;
480
- transactionReference: string;
481
- applicationVersion?: string;
482
- entryMethod?: string;
483
- transactionType: string;
484
- totalamount: string;
485
- paymentType?: string;
486
- }
487
- export interface TaxBreakdown {
488
- taxLines: TaxLine[];
489
- totalTaxableAmount: number;
490
- }
491
- export interface TotalTaxSummary {
492
- VATCode: string;
493
- VAT: number;
494
- PreTaxSum: number;
495
- TaxSum: number;
496
- TXrateSum: number;
497
- }
498
- export interface TaxLine {
499
- itemLineId: number;
500
- taxableAmount: number;
501
- taxLineTotal: number;
502
- VAT: number;
503
- VATCode: string;
504
- PreTax: number;
505
- }
506
- export declare enum DISCOUNTTYPE {
507
- PERCENT = "Percent",
508
- AMOUNT = "AMOUNT"
509
- }
510
- export interface TransactionInfo {
511
- shippingId?: string;
512
- externalShippingId?: string;
513
- }
514
- export interface externalTransactionDetails {
515
- uniqueId?: string;
516
- providerType?: string;
517
- details?: TransactionInfo;
518
- }
519
- export declare enum INITIATING_MODULE {
520
- EBASKET = "eBasket"
521
- }
522
- export interface pendingMethod {
523
- _type?: string;
524
- type?: string;
525
- message?: string;
526
- path?: string;
527
- details?: ShipmentId;
528
- }
529
- export interface ShipmentId {
530
- shipmentId?: string;
531
- }
532
- export interface CustomerAddress {
533
- _type?: string;
534
- email?: string;
535
- address1?: string;
536
- city?: string;
537
- country_code?: string;
538
- first_name?: string;
539
- full_name?: string;
540
- id?: string;
541
- last_name?: string;
542
- phone?: string;
543
- salutation?: string;
544
- c_area?: string;
545
- c_email?: string;
546
- c_phoneWhatsApp?: string;
547
- c_strValue?: string;
548
- postal_code?: string;
549
- }
550
- export interface CustomerInfo {
551
- _type?: string;
552
- customer_id?: string;
553
- email?: string;
554
- }
555
- export interface GroupedTaxItem {
556
- _type?: string;
557
- tax_rate?: number;
558
- tax_value?: number;
559
- }
560
- export interface additionalNotes {
561
- _type?: string;
562
- link?: string;
563
- }
564
- export interface ProductItem {
565
- _type?: string;
566
- adjusted_tax?: number;
567
- base_price?: number;
568
- bonus_product_line_item?: boolean;
569
- gift?: boolean;
570
- item_id?: string;
571
- item_text?: string;
572
- price?: number;
573
- price_adjustments?: PriceAdjustment[];
574
- price_after_item_discount?: number;
575
- price_after_order_discount?: number;
576
- product_id?: string;
577
- product_name?: string;
578
- quantity?: number;
579
- shipment_id?: string;
580
- tax?: number;
581
- tax_basis?: number;
582
- tax_class_id?: string;
583
- tax_rate?: number;
584
- c_osuObjectData?: string;
585
- }
586
- export interface ShippingMethod {
587
- _type?: string;
588
- description?: string;
589
- id?: string;
590
- name?: string;
591
- price?: number;
592
- c_approachingThresholdMessage?: string;
593
- c_estimatedArrivalTime?: string;
594
- c_isEmail?: boolean;
595
- c_storePickupEnabled?: boolean;
596
- c_thresholdValue?: number;
597
- }
598
- export interface shipment {
599
- _type?: string;
600
- adjusted_merchandize_total_tax?: number;
601
- adjusted_shipping_total_tax?: number;
602
- gift?: boolean;
603
- merchandize_total_tax?: number;
604
- product_sub_total?: number;
605
- product_total?: number;
606
- shipment_id?: string;
607
- shipment_total?: number;
608
- shipping_address?: CustomerAddress;
609
- shipping_method?: ShippingMethod;
610
- shipping_status?: string;
611
- shipping_total?: number;
612
- shipping_total_tax?: number;
613
- tax_total?: number;
614
- c_fromStoreId?: string;
615
- }
616
- export interface ShippingItem {
617
- _type?: string;
618
- adjusted_tax?: number;
619
- base_price?: number;
620
- item_id?: string;
621
- item_text?: string;
622
- price?: number;
623
- price_after_item_discount?: number;
624
- shipment_id?: string;
625
- tax?: number;
626
- tax_basis?: number;
627
- tax_class_id?: string;
628
- tax_rate?: number;
629
- }
630
- export interface AppliedDiscount {
631
- _type?: string;
632
- amount?: number;
633
- percentage?: number;
634
- type?: string;
635
- }
636
- export interface PriceAdjustment {
637
- _type?: string;
638
- applied_discount?: AppliedDiscount;
639
- coupon_code?: string;
640
- creation_date?: string;
641
- custom?: boolean;
642
- item_text?: string;
643
- last_modified?: string;
644
- manual?: boolean;
645
- price?: number;
646
- price_adjustment_id?: string;
647
- promotion_id?: string;
648
- promotion_link?: string;
649
- }
650
- export interface OrderDetails {
651
- _v?: string;
652
- _type?: string;
653
- _resource_state?: string;
654
- _flash?: pendingMethod[];
655
- adjusted_merchandize_total_tax?: number;
656
- adjusted_shipping_total_tax?: number;
657
- agent_basket?: boolean;
658
- basket_id?: string;
659
- billing_address?: CustomerAddress;
660
- channel_type?: string;
661
- creation_date?: string;
662
- currency?: string;
663
- customer_info?: CustomerInfo;
664
- grouped_tax_items?: GroupedTaxItem[];
665
- last_modified?: string;
666
- merchandize_total_tax?: number;
667
- notes?: additionalNotes;
668
- order_price_adjustments?: PriceAdjustment[];
669
- order_no?: string;
670
- order_total?: number;
671
- product_items?: ProductItem[];
672
- product_sub_total?: number;
673
- product_total?: number;
674
- shipments?: shipment[];
675
- shipping_items?: ShippingItem[];
676
- shipping_total?: number;
677
- shipping_total_tax?: number;
678
- taxation?: string;
679
- tax_rounded_at_group?: boolean;
680
- tax_total?: number;
681
- c_isInStoreOrder?: boolean;
682
- }
683
- export declare enum PROVIDERS {
684
- SALESFORCE = "Salesforce"
685
- }
686
- export declare enum PROMOTION_LEVEL {
687
- LINE = "LINE",
688
- TRANSACTION = "TRANSACTION"
689
- }
690
- export declare enum PROMOTION_TYPE {
691
- COUPON = "COUPON"
692
- }
693
- export {};
1
+ export declare enum TRANSACTION_TYPE {
2
+ SALE = "SALE",
3
+ REFUND = "REFUND",
4
+ SALE_REFUND = "SALE_REFUND",
5
+ SALE_EXCHANGE = "SALE_EXCHANGE",
6
+ VOID = "VOID",
7
+ WEB_RETURNS = "WEB_RETURNS"
8
+ }
9
+ export interface ItemDiscount {
10
+ trnDiscountsPortion: number;
11
+ trnPromotionsPortion: number;
12
+ refundPortion: number;
13
+ currentRefundPortion?: number;
14
+ }
15
+ export declare enum DELIVERY_METHODS {
16
+ DELIVERY = 1,
17
+ DROP_SHIP = 2,
18
+ COLLECT_FROM_STORE = 3,
19
+ SHIP_TO_STORE = 4
20
+ }
21
+ export interface ProductChange {
22
+ itemLineId?: number;
23
+ SKU: string;
24
+ quantity: number;
25
+ selectedPrice?: number;
26
+ lineDiscount?: LineDiscount;
27
+ linePromotions?: LinePromotions;
28
+ exchange?: Exchange;
29
+ refundedQuantity?: number;
30
+ refundPromotionalQuantity?: number;
31
+ refunded?: boolean;
32
+ refundedTotal?: number;
33
+ refundedReason?: string;
34
+ refundedReasonDescription?: string;
35
+ isChecked?: boolean;
36
+ sealed?: boolean;
37
+ isLastExchanged?: boolean;
38
+ }
39
+ /**
40
+ * Product
41
+ */
42
+ export interface Product extends ProductChange {
43
+ itemLineId?: number;
44
+ status: number;
45
+ subGroup: number;
46
+ brand: string;
47
+ currency: string;
48
+ category: string;
49
+ countryofOrigin: string;
50
+ productId: string;
51
+ productType: number;
52
+ name?: string;
53
+ imageUrls: [string];
54
+ isImageFailToLoad?: boolean;
55
+ size: string;
56
+ type: string;
57
+ season: number;
58
+ productGroup: number;
59
+ styleCode: string;
60
+ nodeStructure: NodeStructure[];
61
+ barcode: string;
62
+ price: Price[];
63
+ colour: string;
64
+ description: string;
65
+ totalLinePrice: number;
66
+ total: number;
67
+ addedInBasket?: boolean;
68
+ selectedVAT?: number;
69
+ selectedVATCode?: string;
70
+ selectedRRPPrice?: number;
71
+ lineDiscount?: LineDiscount;
72
+ exchange?: Exchange;
73
+ refundPromotionalQuantity?: number;
74
+ exchangeReason?: string;
75
+ exchangeQuantity?: number;
76
+ itemDiscounts: ItemDiscount;
77
+ giftCardNumberIssued?: string;
78
+ giftCardAmount?: number;
79
+ giftCardRecipientEmail?: string;
80
+ giftCardExpiryDate?: string;
81
+ giftCardRecipientName?: string;
82
+ giftCard?: boolean;
83
+ discountable: boolean;
84
+ excludePromotion: boolean;
85
+ categories: Categories[];
86
+ descriptions: Descriptions[];
87
+ barcodes: string[];
88
+ externalId: string;
89
+ createdDate: string;
90
+ updatedDate: string;
91
+ createdBy: string;
92
+ updatedBy: string;
93
+ attributes: CoreAttribute[];
94
+ id: string;
95
+ long_description: string;
96
+ isWebOrder?: boolean;
97
+ fullfilmentId: string;
98
+ fullfilmentLocationName?: string;
99
+ deliveryMethod?: string;
100
+ deliveryGroup?: string;
101
+ selectedInventory?: InventoryInfo;
102
+ leadTime?: leadTime;
103
+ }
104
+ export interface leadTime {
105
+ type: string;
106
+ value: string;
107
+ }
108
+ export interface Exchange {
109
+ exchangeId: number;
110
+ lineItemId: number;
111
+ reason: string;
112
+ quantity: number;
113
+ newItems: Product[];
114
+ }
115
+ export interface Categories {
116
+ id: string;
117
+ parentId: string;
118
+ name: string;
119
+ categoryId: string;
120
+ status: boolean;
121
+ }
122
+ export interface Descriptions {
123
+ name: string;
124
+ countryCode: string;
125
+ value: string;
126
+ }
127
+ export interface CoreAttribute {
128
+ name: string;
129
+ value: string;
130
+ searchable: boolean;
131
+ countryCode: string;
132
+ }
133
+ /**
134
+ * Basket
135
+ */
136
+ export interface Basket {
137
+ subsidiaryId?: string;
138
+ products: Product[];
139
+ transactionDiscount: any[];
140
+ quantity: number;
141
+ total: number;
142
+ saleTotal: number;
143
+ discountTotal?: number;
144
+ transactionId?: string;
145
+ offlineTransactionId?: string;
146
+ baseCurrency: string;
147
+ basketTotal?: number;
148
+ refundTotal?: number;
149
+ transactionPromotion?: TransactionPromotion[];
150
+ customer?: any;
151
+ exchange?: Exchange[];
152
+ inStoreFlag?: boolean;
153
+ }
154
+ /**
155
+ * Price
156
+ */
157
+ export interface Price {
158
+ VAT: number;
159
+ VATCode: string;
160
+ salesPrice: number;
161
+ currencyCode: string;
162
+ RRPPrice: number;
163
+ }
164
+ /**
165
+ * Node structure
166
+ */
167
+ interface NodeStructure {
168
+ status: boolean;
169
+ name: string;
170
+ nodeType: string;
171
+ isOverride: boolean;
172
+ nodeId: string;
173
+ parentId: string;
174
+ }
175
+ /**
176
+ * Line Discount
177
+ */
178
+ export interface LineDiscount {
179
+ itemLineId: string;
180
+ discountAmount: number;
181
+ discountType: string;
182
+ name?: string;
183
+ unitPrice: number;
184
+ discountedLinePrice?: number;
185
+ priceManagerOverride?: UserOverride;
186
+ priceOverrideReasonCode?: string;
187
+ priceOverrideReasonName?: string;
188
+ priceOverrideAmount?: number;
189
+ percentageDiscountManagerOverride?: UserOverride;
190
+ percentageDiscountReasonCode?: string;
191
+ percentageDiscountReasonName?: string;
192
+ percentageDiscountValue?: number;
193
+ }
194
+ /**
195
+ * User Override
196
+ */
197
+ export interface UserOverride {
198
+ userId: string;
199
+ automaticApprove: string;
200
+ originalUserId: string;
201
+ }
202
+ /**
203
+ * line Promotions
204
+ */
205
+ export interface LinePromotions {
206
+ trigger: Trigger[];
207
+ itemLineId: number;
208
+ promotionId: string;
209
+ displayText: string;
210
+ promotionType: string;
211
+ promotionAmount: number;
212
+ name: string;
213
+ promotionInfo: string;
214
+ promotionLinePrice: number;
215
+ refunded?: boolean;
216
+ }
217
+ /**
218
+ * trigger
219
+ */
220
+ export interface Trigger {
221
+ itemLineId: string;
222
+ quantity?: number;
223
+ totalQuantity?: number;
224
+ linePromotionAmount?: number;
225
+ promotionAmount?: number;
226
+ refundedReason?: string;
227
+ refundedReasonDescription?: string;
228
+ promotionId?: string;
229
+ }
230
+ /**
231
+ * Transaction Promotion
232
+ */
233
+ export interface TransactionPromotion {
234
+ displayText: string;
235
+ name: string;
236
+ promotionAmount: number;
237
+ promotionId: string;
238
+ promotionInfo: string;
239
+ promotionType: string;
240
+ itemLineIds: number[];
241
+ type?: string;
242
+ subLevelType?: PROMOTION_LEVEL;
243
+ trigger?: Trigger[];
244
+ couponCode?: string;
245
+ }
246
+ export interface RefundProductChange {
247
+ itemLineId?: number;
248
+ refundedQuantity?: number;
249
+ refundedPromotionalQuantity?: number;
250
+ refundTotal?: number;
251
+ refundedReason?: string;
252
+ refundedReasonDescription?: string;
253
+ refundWithPromotion: boolean;
254
+ isLastExchanged?: boolean;
255
+ }
256
+ export interface InventoryInfo {
257
+ storeName: string;
258
+ storeId: string;
259
+ quantityAvailable: number;
260
+ quantityRequired: number;
261
+ }
262
+ export interface InventoryRequestInfo extends InventoryInfo {
263
+ requestedQuantity: number;
264
+ requestedAction: DELIVERY_METHODS;
265
+ }
266
+ export interface DeliveryInfo {
267
+ groups: DeliveryGroupInfo[];
268
+ }
269
+ export interface DeliveryGroupInfo {
270
+ groupNumber: number;
271
+ items: Product[];
272
+ estimate?: Estimate;
273
+ }
274
+ export interface Estimate {
275
+ type: string;
276
+ value: string;
277
+ }
278
+ export interface TransactionDocument {
279
+ transactionId?: string;
280
+ subsidiaryId?: string;
281
+ offlineTransactionId?: string;
282
+ transactionRef?: string;
283
+ dateTime?: string;
284
+ orgCode: string;
285
+ storeId: string;
286
+ storeNodeId: string;
287
+ storeNodeStructure: string;
288
+ deviceId: string;
289
+ terminalId: string;
290
+ initiatingModule: string;
291
+ export: boolean;
292
+ userId?: string;
293
+ userName?: string;
294
+ customer?: Customer;
295
+ basket: any;
296
+ basketSummary: BasketSummary;
297
+ baseCurrency: string;
298
+ splitPayment?: boolean;
299
+ isPaymentCompleted?: boolean;
300
+ paymentDetails?: any;
301
+ type?: string;
302
+ operationStatus?: string;
303
+ createdAt?: string;
304
+ updatedAt?: string;
305
+ transCompletedAt?: string;
306
+ id?: string;
307
+ saleTotal?: number;
308
+ reasonCode?: string;
309
+ reasonDescription?: string;
310
+ override?: UserOverride;
311
+ originalTransId?: string;
312
+ originalExternalId?: string;
313
+ apiResponse?: APIResponse;
314
+ unreferencedRefund?: boolean;
315
+ giftedReceipt?: boolean;
316
+ currentTransactionDetails?: any;
317
+ isChecked?: boolean;
318
+ externalTransactionDetails?: externalTransactionDetails[];
319
+ refundRequest?: any[];
320
+ isInStoreOrder?: boolean;
321
+ }
322
+ export interface APIResponse {
323
+ internalId?: number;
324
+ tranid?: string;
325
+ }
326
+ export interface CurrentTransactionDetails {
327
+ products: Product[];
328
+ lineDiscount?: LineDiscount[];
329
+ linePromotion?: LinePromotions[];
330
+ transactionPromotion?: TransactionPromotion[];
331
+ transactionDiscount?: TransactionDiscount[];
332
+ basketSummary?: BasketSummary;
333
+ taxBreakdown?: TaxBreakdown;
334
+ totalTaxSummary?: TotalTaxSummary[];
335
+ }
336
+ export interface BasketSummary {
337
+ totalItems?: number;
338
+ saleTotal?: number;
339
+ VATTotal?: number;
340
+ discountTotal?: number;
341
+ basketTotal?: number;
342
+ refundTotal?: number;
343
+ shippingTotal?: number;
344
+ basketTotalWithShippingTotal?: number;
345
+ inStore?: BasketSummaryDetails;
346
+ webOrder?: BasketSummaryDetails;
347
+ cnc?: BasketSummaryDetails;
348
+ }
349
+ export interface BasketSummaryDetails {
350
+ totalItems?: number;
351
+ saleTotal?: number;
352
+ VATTotal?: number;
353
+ discountTotal?: number;
354
+ basketTotal?: number;
355
+ refundTotal?: number;
356
+ shippingTotal?: number;
357
+ basketTotalWithShippingTotal?: number;
358
+ }
359
+ export interface TransactionDiscount {
360
+ discountAmount: number;
361
+ discountType: String;
362
+ reasonCode: string;
363
+ override?: UserOverride;
364
+ itemLineIds?: number[];
365
+ }
366
+ export interface TBasket {
367
+ products: TProduct[];
368
+ lineDiscount: LineDiscount[];
369
+ exchange: Exchange[];
370
+ linePromotion: LinePromotions[];
371
+ transactionPromotion?: TransactionPromotion[];
372
+ transactionDiscount?: TransactionDiscount[];
373
+ taxBreakdown?: TaxBreakdown;
374
+ totalTaxSummary?: TotalTaxSummary[];
375
+ }
376
+ export interface TExchange {
377
+ exchangeId?: number;
378
+ lineItemId?: number;
379
+ reason?: string;
380
+ quantity?: number;
381
+ newItems?: TNewItems[];
382
+ }
383
+ export interface TNewItems {
384
+ lineItemId: number;
385
+ Quantity: number;
386
+ }
387
+ export interface TProduct {
388
+ itemLineId: string;
389
+ SKU: string;
390
+ description: string;
391
+ imageUrls: [string];
392
+ price: number;
393
+ taxCode?: string;
394
+ taxPercent?: string;
395
+ quantity: number;
396
+ refundedQuantity?: number;
397
+ refundedPromotionalQuantity?: number;
398
+ refunded?: boolean;
399
+ refundedTotal?: number;
400
+ refundedReason?: string;
401
+ refundedReasonDescription?: string;
402
+ selectedRRPPrice?: number;
403
+ totalLinePrice: number;
404
+ barCode?: string;
405
+ barcodes?: string[];
406
+ flagged?: boolean;
407
+ exchange?: Exchange;
408
+ excludePromotion: boolean;
409
+ discountable?: boolean;
410
+ itemDiscounts?: ItemDiscounts;
411
+ isLastExchanged?: boolean;
412
+ fullfilmentId: string;
413
+ fullfilmentLocationName: string;
414
+ deliveryMethod?: string;
415
+ deliveryGroup?: string;
416
+ giftCardNumberIssued?: string;
417
+ giftCardAmount?: number;
418
+ giftCardRecipientEmail?: string;
419
+ giftCardExpiryDate?: string;
420
+ giftCardRecipientName?: string;
421
+ giftCard?: boolean;
422
+ currency?: string;
423
+ isWebOrder?: boolean;
424
+ leadTime?: leadTime;
425
+ lineDiscount?: any;
426
+ attributes?: CoreAttribute[];
427
+ }
428
+ export interface ItemDiscounts {
429
+ trnDiscountsPortion: number;
430
+ trnPromotionsPortion: number;
431
+ refundPortion: number;
432
+ }
433
+ export interface Customer {
434
+ id: string;
435
+ title?: string;
436
+ firstName: string;
437
+ lastName: string;
438
+ email: string;
439
+ postCode: string;
440
+ telephone?: string;
441
+ billingAddress?: Address | Address[];
442
+ shippingAddress?: Address | Address[];
443
+ shipmentDetails?: ShipmentDetails[];
444
+ addressDetail?: string;
445
+ noCustomerSelected?: boolean;
446
+ externalId?: string;
447
+ }
448
+ export interface Address {
449
+ id?: string;
450
+ countryCode?: string;
451
+ address1?: string;
452
+ address2?: string;
453
+ address3?: string;
454
+ city?: string;
455
+ county?: string;
456
+ postCode?: string;
457
+ country?: string;
458
+ }
459
+ export interface ShipmentDetails {
460
+ id?: string;
461
+ deliveryGroup?: string;
462
+ }
463
+ export interface PaymentDetails {
464
+ cardNumber?: any;
465
+ sqNo?: number;
466
+ result?: string;
467
+ currency: string;
468
+ amount: string;
469
+ authcode?: string;
470
+ pan?: string;
471
+ cardType?: string;
472
+ transactionDate?: string;
473
+ mid?: string;
474
+ tid?: string;
475
+ cvm?: string;
476
+ hostReferenceId?: string;
477
+ aid?: string;
478
+ receiptNo?: string;
479
+ expirydate?: string;
480
+ transactionReference: string;
481
+ applicationVersion?: string;
482
+ entryMethod?: string;
483
+ transactionType: string;
484
+ totalamount: string;
485
+ paymentType?: string;
486
+ }
487
+ export interface TaxBreakdown {
488
+ taxLines: TaxLine[];
489
+ totalTaxableAmount: number;
490
+ }
491
+ export interface TotalTaxSummary {
492
+ VATCode: string;
493
+ VAT: number;
494
+ PreTaxSum: number;
495
+ TaxSum: number;
496
+ TXrateSum: number;
497
+ }
498
+ export interface TaxLine {
499
+ itemLineId: number;
500
+ taxableAmount: number;
501
+ taxLineTotal: number;
502
+ VAT: number;
503
+ VATCode: string;
504
+ PreTax: number;
505
+ }
506
+ export declare enum DISCOUNTTYPE {
507
+ PERCENT = "Percent",
508
+ AMOUNT = "AMOUNT"
509
+ }
510
+ export interface TransactionInfo {
511
+ shippingId?: string;
512
+ externalShippingId?: string;
513
+ }
514
+ export interface externalTransactionDetails {
515
+ uniqueId?: string;
516
+ providerType?: string;
517
+ details?: TransactionInfo;
518
+ }
519
+ export declare enum INITIATING_MODULE {
520
+ EBASKET = "eBasket"
521
+ }
522
+ export interface pendingMethod {
523
+ _type?: string;
524
+ type?: string;
525
+ message?: string;
526
+ path?: string;
527
+ details?: ShipmentId;
528
+ }
529
+ export interface ShipmentId {
530
+ shipmentId?: string;
531
+ }
532
+ export interface CustomerAddress {
533
+ _type?: string;
534
+ email?: string;
535
+ address1?: string;
536
+ city?: string;
537
+ country_code?: string;
538
+ first_name?: string;
539
+ full_name?: string;
540
+ id?: string;
541
+ last_name?: string;
542
+ phone?: string;
543
+ salutation?: string;
544
+ c_area?: string;
545
+ c_email?: string;
546
+ c_phoneWhatsApp?: string;
547
+ c_strValue?: string;
548
+ postal_code?: string;
549
+ }
550
+ export interface CustomerInfo {
551
+ _type?: string;
552
+ customer_id?: string;
553
+ email?: string;
554
+ }
555
+ export interface GroupedTaxItem {
556
+ _type?: string;
557
+ tax_rate?: number;
558
+ tax_value?: number;
559
+ }
560
+ export interface additionalNotes {
561
+ _type?: string;
562
+ link?: string;
563
+ }
564
+ export interface ProductItem {
565
+ _type?: string;
566
+ adjusted_tax?: number;
567
+ base_price?: number;
568
+ bonus_product_line_item?: boolean;
569
+ gift?: boolean;
570
+ item_id?: string;
571
+ item_text?: string;
572
+ price?: number;
573
+ price_adjustments?: PriceAdjustment[];
574
+ price_after_item_discount?: number;
575
+ price_after_order_discount?: number;
576
+ product_id?: string;
577
+ product_name?: string;
578
+ quantity?: number;
579
+ shipment_id?: string;
580
+ tax?: number;
581
+ tax_basis?: number;
582
+ tax_class_id?: string;
583
+ tax_rate?: number;
584
+ c_osuObjectData?: string;
585
+ }
586
+ export interface ShippingMethod {
587
+ _type?: string;
588
+ description?: string;
589
+ id?: string;
590
+ name?: string;
591
+ price?: number;
592
+ c_approachingThresholdMessage?: string;
593
+ c_estimatedArrivalTime?: string;
594
+ c_isEmail?: boolean;
595
+ c_storePickupEnabled?: boolean;
596
+ c_thresholdValue?: number;
597
+ }
598
+ export interface shipment {
599
+ _type?: string;
600
+ adjusted_merchandize_total_tax?: number;
601
+ adjusted_shipping_total_tax?: number;
602
+ gift?: boolean;
603
+ merchandize_total_tax?: number;
604
+ product_sub_total?: number;
605
+ product_total?: number;
606
+ shipment_id?: string;
607
+ shipment_total?: number;
608
+ shipping_address?: CustomerAddress;
609
+ shipping_method?: ShippingMethod;
610
+ shipping_status?: string;
611
+ shipping_total?: number;
612
+ shipping_total_tax?: number;
613
+ tax_total?: number;
614
+ c_fromStoreId?: string;
615
+ }
616
+ export interface ShippingItem {
617
+ _type?: string;
618
+ adjusted_tax?: number;
619
+ base_price?: number;
620
+ item_id?: string;
621
+ item_text?: string;
622
+ price?: number;
623
+ price_after_item_discount?: number;
624
+ shipment_id?: string;
625
+ tax?: number;
626
+ tax_basis?: number;
627
+ tax_class_id?: string;
628
+ tax_rate?: number;
629
+ }
630
+ export interface AppliedDiscount {
631
+ _type?: string;
632
+ amount?: number;
633
+ percentage?: number;
634
+ type?: string;
635
+ }
636
+ export interface PriceAdjustment {
637
+ _type?: string;
638
+ applied_discount?: AppliedDiscount;
639
+ coupon_code?: string;
640
+ creation_date?: string;
641
+ custom?: boolean;
642
+ item_text?: string;
643
+ last_modified?: string;
644
+ manual?: boolean;
645
+ price?: number;
646
+ price_adjustment_id?: string;
647
+ promotion_id?: string;
648
+ promotion_link?: string;
649
+ }
650
+ export interface OrderDetails {
651
+ _v?: string;
652
+ _type?: string;
653
+ _resource_state?: string;
654
+ _flash?: pendingMethod[];
655
+ adjusted_merchandize_total_tax?: number;
656
+ adjusted_shipping_total_tax?: number;
657
+ agent_basket?: boolean;
658
+ basket_id?: string;
659
+ billing_address?: CustomerAddress;
660
+ channel_type?: string;
661
+ creation_date?: string;
662
+ currency?: string;
663
+ customer_info?: CustomerInfo;
664
+ grouped_tax_items?: GroupedTaxItem[];
665
+ last_modified?: string;
666
+ merchandize_total_tax?: number;
667
+ notes?: additionalNotes;
668
+ order_price_adjustments?: PriceAdjustment[];
669
+ order_no?: string;
670
+ order_total?: number;
671
+ product_items?: ProductItem[];
672
+ product_sub_total?: number;
673
+ product_total?: number;
674
+ shipments?: shipment[];
675
+ shipping_items?: ShippingItem[];
676
+ shipping_total?: number;
677
+ shipping_total_tax?: number;
678
+ taxation?: string;
679
+ tax_rounded_at_group?: boolean;
680
+ tax_total?: number;
681
+ c_isInStoreOrder?: boolean;
682
+ }
683
+ export declare enum PROVIDERS {
684
+ SALESFORCE = "Salesforce"
685
+ }
686
+ export declare enum PROMOTION_LEVEL {
687
+ LINE = "LINE",
688
+ TRANSACTION = "TRANSACTION"
689
+ }
690
+ export declare enum PROMOTION_TYPE {
691
+ COUPON = "COUPON"
692
+ }
693
+ export {};
694
+ //# sourceMappingURL=mapper-library.model.d.ts.map