@viu/emporix-sdk 2.35.0 → 2.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/orders.d.ts CHANGED
@@ -22,6 +22,9 @@ type Restriction = string | null;
22
22
  type LocalizedValue = string | {
23
23
  [key: string]: string;
24
24
  };
25
+ /**
26
+ * Aggregate Fee
27
+ */
25
28
  type AggregateFee = {
26
29
  total: {
27
30
  subTotal?: number;
@@ -62,6 +65,9 @@ type AggregateFee = {
62
65
  }>;
63
66
  };
64
67
  type OrderEntriesDto = {
68
+ /**
69
+ * Entries of the order
70
+ */
65
71
  entries: Array<{
66
72
  /**
67
73
  * Order entry id. Required if `productId` is not provided. Use for entry modification. Cannot be provided along with `productId`.
@@ -79,11 +85,15 @@ type OrderEntriesDto = {
79
85
  };
80
86
  type OrderCalculationDto = {
81
87
  /**
88
+ * Order Calculation DTO
89
+ *
82
90
  * Order recalculation DTO contains a list of entries, where each entry contains entry ID and delivered amount of items.
83
91
  */
84
92
  entries?: Array<OrderCalculationEntryDto>;
85
93
  };
86
94
  /**
95
+ * Order Calculation Entry DTO
96
+ *
87
97
  * Order Calculation DTO contains information to recalculate a single entry. Required information is ID of entry and (new) delivered amount of items.
88
98
  */
89
99
  type OrderCalculationEntryDto = {
@@ -104,11 +114,16 @@ type OrderCalculationEntryDto = {
104
114
  */
105
115
  unit?: string;
106
116
  };
117
+ /**
118
+ * Channel
119
+ */
107
120
  type Channel = {
108
121
  name?: string;
109
122
  source?: string;
110
123
  };
111
124
  /**
125
+ * Order entry
126
+ *
112
127
  * The ordered item.
113
128
  */
114
129
  type OrderEntry = {
@@ -138,16 +153,19 @@ type OrderEntry = {
138
153
  effectiveQuantity?: number;
139
154
  /**
140
155
  * The original amount. **This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
156
+ *
141
157
  * @deprecated
142
158
  */
143
159
  originalAmount?: number;
144
160
  /**
145
161
  * The original price. **This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
162
+ *
146
163
  * @deprecated
147
164
  */
148
165
  originalPrice?: number;
149
166
  /**
150
167
  * **This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
168
+ *
151
169
  * @deprecated
152
170
  */
153
171
  unitPrice?: number;
@@ -161,16 +179,19 @@ type OrderEntry = {
161
179
  link?: string;
162
180
  /**
163
181
  * The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality.
182
+ *
164
183
  * @deprecated
165
184
  */
166
185
  discounts?: unknown;
167
186
  /**
168
187
  * The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality.
188
+ *
169
189
  * @deprecated
170
190
  */
171
191
  totalPrice?: number;
172
192
  /**
173
193
  * The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.
194
+ *
174
195
  * @deprecated
175
196
  */
176
197
  authorizedAmount?: number;
@@ -196,6 +217,9 @@ type OrderEntry = {
196
217
  */
197
218
  externalFees?: Array<ExternalFee>;
198
219
  };
220
+ /**
221
+ * Delivery Window
222
+ */
199
223
  type DeliveryWindow = {
200
224
  /**
201
225
  * Id of the delivery window
@@ -219,6 +243,9 @@ type DeliveryWindow = {
219
243
  */
220
244
  deliveryCycleName?: string;
221
245
  };
246
+ /**
247
+ * Delivery Time Range
248
+ */
222
249
  type DeliveryTimeRange = {
223
250
  /**
224
251
  * Start Time
@@ -229,6 +256,9 @@ type DeliveryTimeRange = {
229
256
  */
230
257
  timeTo?: string;
231
258
  };
259
+ /**
260
+ * Discount
261
+ */
232
262
  type Discount = {
233
263
  /**
234
264
  * Discount's code.
@@ -277,6 +307,9 @@ type Discount = {
277
307
  [key: string]: unknown;
278
308
  };
279
309
  };
310
+ /**
311
+ * Discount Restrictions
312
+ */
280
313
  type DiscountRestrictions = {
281
314
  /**
282
315
  * The date from which the discount restriction is valid.
@@ -298,6 +331,9 @@ type DiscountRestrictions = {
298
331
  */
299
332
  excludedCategories?: Array<string>;
300
333
  };
334
+ /**
335
+ * Discount Restrictions Price
336
+ */
301
337
  type DiscountRestrictionsPrice = {
302
338
  /**
303
339
  * The amount of discount price
@@ -308,6 +344,9 @@ type DiscountRestrictionsPrice = {
308
344
  */
309
345
  currency?: string;
310
346
  };
347
+ /**
348
+ * Link
349
+ */
311
350
  type Reference = {
312
351
  /**
313
352
  * Unique identifier of a link.
@@ -323,6 +362,8 @@ type Reference = {
323
362
  url: string;
324
363
  };
325
364
  /**
365
+ * Customer
366
+ *
326
367
  * Customer data.
327
368
  *
328
369
  * One of these properties needs to be provided:
@@ -374,6 +415,8 @@ type Customer = {
374
415
  };
375
416
  };
376
417
  /**
418
+ * Address
419
+ *
377
420
  * Customer's address.
378
421
  */
379
422
  type Address = {
@@ -444,6 +487,8 @@ type Address = {
444
487
  };
445
488
  };
446
489
  /**
490
+ * Payment
491
+ *
447
492
  * Payment details.
448
493
  */
449
494
  type Payment = {
@@ -489,6 +534,8 @@ type Payment = {
489
534
  provider?: string;
490
535
  };
491
536
  /**
537
+ * Shipping
538
+ *
492
539
  * Shipping details.
493
540
  */
494
541
  type Shipping = {
@@ -511,6 +558,8 @@ type Shipping = {
511
558
  lines?: Array<ShippingLine>;
512
559
  };
513
560
  /**
561
+ * Shipping line
562
+ *
514
563
  * Shipping line.
515
564
  */
516
565
  type ShippingLine = {
@@ -545,6 +594,8 @@ type ShippingLine = {
545
594
  shippingTaxCode?: string;
546
595
  };
547
596
  /**
597
+ * Shipment
598
+ *
548
599
  * Shippment details.
549
600
  */
550
601
  type Shipment = {
@@ -566,6 +617,8 @@ type Shipment = {
566
617
  expectDeliveryOn?: string;
567
618
  };
568
619
  /**
620
+ * Tax
621
+ *
569
622
  * Tax details.
570
623
  */
571
624
  type Tax = {
@@ -573,6 +626,8 @@ type Tax = {
573
626
  total: TaxTotal;
574
627
  };
575
628
  /**
629
+ * Tax
630
+ *
576
631
  * Tax details.
577
632
  */
578
633
  type ShippingTax = {
@@ -584,6 +639,8 @@ type ShippingTax = {
584
639
  rate?: number;
585
640
  };
586
641
  /**
642
+ * taxLine
643
+ *
587
644
  * Tax line details.
588
645
  */
589
646
  type TaxLine = {
@@ -621,6 +678,8 @@ type TaxLine = {
621
678
  inclusive: boolean;
622
679
  };
623
680
  /**
681
+ * Tax total
682
+ *
624
683
  * The tax total tax amount.
625
684
  */
626
685
  type TaxTotal = {
@@ -638,7 +697,11 @@ type TaxTotal = {
638
697
  inclusive: boolean;
639
698
  };
640
699
  /**
641
- * Product details.
700
+ * Product
701
+ *
702
+ * Product details stored on the order entry as a creation-time snapshot.
703
+ * For `DYNAMIC_VARIANT` products, the snapshot includes `parentVariantId`, `parentVariantPath`, `ownVariantAttributes`, `inheritedVariantAttributes`, and `sellable` when those fields are present on the source product. The fields are omitted when they are not present, for example on `BASIC` or `VARIANT` products.
704
+ *
642
705
  */
643
706
  type Product = {
644
707
  /**
@@ -672,9 +735,9 @@ type Product = {
672
735
  */
673
736
  published?: boolean;
674
737
  /**
675
- * Type of the product (BASIC, VARIANT, BUNDLE).
738
+ * Type of the product. Possible values: `BASIC`, `VARIANT`, `BUNDLE`, `DYNAMIC_VARIANT`.
676
739
  */
677
- productType?: 'BASIC' | 'VARIANT' | 'BUNDLE';
740
+ productType?: 'BASIC' | 'VARIANT' | 'BUNDLE' | 'DYNAMIC_VARIANT';
678
741
  /**
679
742
  * The collection of products assigned to the bundle.
680
743
  */
@@ -690,11 +753,37 @@ type Product = {
690
753
  mixins?: {
691
754
  [key: string]: unknown;
692
755
  };
756
+ /**
757
+ * Identifier of the immediate parent variant. Present only for `DYNAMIC_VARIANT` products that are not root variants.
758
+ */
759
+ parentVariantId?: string;
760
+ /**
761
+ * Ancestor variant identifiers ordered from the direct parent (index 0) to the root variant. Present only for `DYNAMIC_VARIANT` products.
762
+ */
763
+ parentVariantPath?: Array<string>;
764
+ /**
765
+ * Variant attributes defined on this `DYNAMIC_VARIANT` product.
766
+ */
767
+ ownVariantAttributes?: {
768
+ [key: string]: unknown;
769
+ };
770
+ /**
771
+ * Read-only variant attributes merged from ancestor variants of this `DYNAMIC_VARIANT` product.
772
+ */
773
+ inheritedVariantAttributes?: {
774
+ [key: string]: unknown;
775
+ };
776
+ /**
777
+ * Flag indicating whether this `DYNAMIC_VARIANT` product can be sold. The value is set per product and is not inherited.
778
+ */
779
+ sellable?: boolean;
693
780
  metadata?: MixinsMetadata & {
694
781
  [key: string]: unknown;
695
782
  };
696
783
  };
697
784
  /**
785
+ * Bundle Product
786
+ *
698
787
  * Represents the product used in a bundle.
699
788
  */
700
789
  type BundleProduct = {
@@ -708,6 +797,8 @@ type BundleProduct = {
708
797
  productId?: string;
709
798
  };
710
799
  /**
800
+ * Price
801
+ *
711
802
  * Price details.
712
803
  */
713
804
  type Price = {
@@ -736,6 +827,8 @@ type Price = {
736
827
  };
737
828
  };
738
829
  /**
830
+ * Media
831
+ *
739
832
  * The media.
740
833
  */
741
834
  type Media = {
@@ -753,6 +846,8 @@ type Media = {
753
846
  stored?: boolean;
754
847
  };
755
848
  /**
849
+ * Sale Price
850
+ *
756
851
  * The sale price.
757
852
  */
758
853
  type SalePrice = {
@@ -770,6 +865,8 @@ type SalePrice = {
770
865
  description?: string;
771
866
  };
772
867
  /**
868
+ * Product Metadata
869
+ *
773
870
  * Product Metadata
774
871
  */
775
872
  type MixinsMetadata = {
@@ -783,11 +880,11 @@ type MixinsMetadata = {
783
880
  * The document version number.
784
881
  */
785
882
  version?: number;
786
- [key: string]: unknown | {
787
- [key: string]: unknown;
788
- } | number | undefined;
883
+ [key: string]: unknown;
789
884
  };
790
885
  /**
886
+ * Measurement Unit
887
+ *
791
888
  * The entry measurement unit
792
889
  */
793
890
  type MeasurementUnit = {
@@ -801,6 +898,8 @@ type MeasurementUnit = {
801
898
  value: number;
802
899
  };
803
900
  /**
901
+ * Resource location
902
+ *
804
903
  * Resource location is a response object which contains ID and link to created resource.
805
904
  */
806
905
  type ResourceLocation = {
@@ -821,6 +920,8 @@ type Vendor = {
821
920
  name?: string;
822
921
  };
823
922
  /**
923
+ * Order Common DTO
924
+ *
824
925
  * The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.
825
926
  */
826
927
  type OrderCommonDto = {
@@ -875,11 +976,13 @@ type OrderCommonDto = {
875
976
  } & unknown;
876
977
  /**
877
978
  * Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality.
979
+ *
878
980
  * @deprecated
879
981
  */
880
982
  subTotalPrice?: number;
881
983
  /**
882
984
  * Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality.
985
+ *
883
986
  * @deprecated
884
987
  */
885
988
  totalPrice?: number;
@@ -895,6 +998,7 @@ type OrderCommonDto = {
895
998
  * Order cycle date.
896
999
  *
897
1000
  * **This field is deprecated**. Please use the `deliveryWindow.deliveryCycle` attribute instead.
1001
+ *
898
1002
  * @deprecated
899
1003
  */
900
1004
  orderCycle?: string;
@@ -902,6 +1006,7 @@ type OrderCommonDto = {
902
1006
  * Delivery window's unique identifier.
903
1007
  *
904
1008
  * **This field is deprecated**. Please use the `deliveryWindow.id` attribute instead.
1009
+ *
905
1010
  * @deprecated
906
1011
  */
907
1012
  deliveryWindowId?: string;
@@ -918,6 +1023,9 @@ type OrderCommonDto = {
918
1023
  */
919
1024
  legalEntityId?: string;
920
1025
  };
1026
+ /**
1027
+ * Order
1028
+ */
921
1029
  type Order = {
922
1030
  /**
923
1031
  * Order's unique identifier.
@@ -964,6 +1072,9 @@ type SalesOrder = {
964
1072
  */
965
1073
  checkout?: boolean;
966
1074
  } & OrderUpdateDto;
1075
+ /**
1076
+ * Order Creation DTO
1077
+ */
967
1078
  type SalesOrderCreationDto = {
968
1079
  /**
969
1080
  * Identifier of the quote from which the order has been created
@@ -987,9 +1098,15 @@ type SearchRequest = {
987
1098
  */
988
1099
  q?: string;
989
1100
  };
1101
+ /**
1102
+ * Order Creation DTO
1103
+ */
990
1104
  type OrderCreationDto = {
991
1105
  channel?: Channel;
992
1106
  } & OrderCommonDto;
1107
+ /**
1108
+ * Order Update DTO
1109
+ */
993
1110
  type OrderUpdateDto = {
994
1111
  channel?: Channel;
995
1112
  /**
@@ -1060,12 +1177,16 @@ type OrderSplitResponse = {
1060
1177
  */
1061
1178
  type PaymentStatus = 'PENDING' | 'AUTHORIZATION_SUCCESS' | 'AUTHORIZATION_FAILURE' | 'CAPTURE_SUCCESS' | 'CAPTURE_FAILURE' | 'SUCCESS' | 'FAILURE' | 'CANCELLATION_SUCCESS' | 'CANCELLATION_FAILURE' | 'REFUND_SUCCESS' | 'REFUND_FAILURE';
1062
1179
  /**
1180
+ * Transition
1181
+ *
1063
1182
  * Order status transition.
1064
1183
  */
1065
1184
  type Transition = {
1066
1185
  status?: OrderStatus;
1067
1186
  };
1068
1187
  /**
1188
+ * Historical Transition
1189
+ *
1069
1190
  * A historical order status transition entry.
1070
1191
  */
1071
1192
  type HistoricalTransition = {
@@ -1076,6 +1197,8 @@ type HistoricalTransition = {
1076
1197
  timestamp: string;
1077
1198
  };
1078
1199
  /**
1200
+ * Historical Transitions Metadata
1201
+ *
1079
1202
  * Metadata related to historical order status transitions.
1080
1203
  */
1081
1204
  type HistoricalTransitionsMetadata = {
@@ -1093,6 +1216,8 @@ type HistoricalTransitionsMetadata = {
1093
1216
  modifiedAt: string;
1094
1217
  };
1095
1218
  /**
1219
+ * Historical Transitions Response
1220
+ *
1096
1221
  * Historical order status transitions with metadata.
1097
1222
  */
1098
1223
  type HistoricalTransitionsResponse = {
@@ -1102,21 +1227,27 @@ type HistoricalTransitionsResponse = {
1102
1227
  transitions: Array<HistoricalTransition>;
1103
1228
  metadata: HistoricalTransitionsMetadata;
1104
1229
  };
1230
+ /**
1231
+ * Metadata DTO
1232
+ */
1105
1233
  type MetadataMixins = {
1106
1234
  mixins?: {
1107
1235
  [key: string]: unknown;
1108
1236
  };
1109
1237
  version?: number;
1110
- [key: string]: unknown | {
1111
- [key: string]: unknown;
1112
- } | number | undefined;
1238
+ [key: string]: unknown;
1113
1239
  };
1114
1240
  /**
1241
+ * YRN
1242
+ *
1115
1243
  * In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.
1116
1244
  *
1117
1245
  * It is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.
1118
1246
  */
1119
1247
  type Yrn = string;
1248
+ /**
1249
+ * AssistedBuyingEntry
1250
+ */
1120
1251
  type AssistedBuyingEntry = {
1121
1252
  /**
1122
1253
  * Identifier of an employee who performed an action on behalf of a customer.
@@ -1132,6 +1263,8 @@ type AssistedBuyingEntry = {
1132
1263
  timestamp?: string;
1133
1264
  };
1134
1265
  /**
1266
+ * assistedBuying
1267
+ *
1135
1268
  * The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation.
1136
1269
  */
1137
1270
  type AssistedBuying = {
@@ -1465,6 +1598,9 @@ type CalculatedFee = {
1465
1598
  price?: CalculatedPrice;
1466
1599
  discountedPrice?: CalculatedPriceWithDiscounts;
1467
1600
  };
1601
+ /**
1602
+ * calculatedPaymentFee
1603
+ */
1468
1604
  type CalculatedPaymentFee = {
1469
1605
  /**
1470
1606
  * Unique identifier of the fee.
@@ -1834,6 +1970,8 @@ type ExternalFee = {
1834
1970
  taxCode?: string;
1835
1971
  };
1836
1972
  /**
1973
+ * priceMatchDetails
1974
+ *
1837
1975
  * This model represents the price value retrieved from the price service
1838
1976
  */
1839
1977
  type PriceMatchDetails = {
@@ -1,5 +1,8 @@
1
1
  import { C as ClientContext, b as AuthContext } from './context-DK8jg6y5.cjs';
2
2
 
3
+ /**
4
+ * paymentModeRequest
5
+ */
3
6
  type PaymentModeRequest = {
4
7
  /**
5
8
  * Indicates a code of a given method.
@@ -38,6 +41,9 @@ type PaymentModeRequest = {
38
41
  [key: string]: string;
39
42
  };
40
43
  };
44
+ /**
45
+ * paymentMethodUpdateRequest
46
+ */
41
47
  type PaymentMethodUpdateRequest = {
42
48
  /**
43
49
  * Indicates whether a give mode is active.
@@ -59,6 +65,9 @@ type PaymentMethodUpdateRequest = {
59
65
  };
60
66
  };
61
67
  type Provider = 'INVOICE' | 'CASH_ON_DELIVERY' | 'SPREEDLY' | 'SPREEDLY_SAFERPAY' | 'UNZER';
68
+ /**
69
+ * paymentModeResponse
70
+ */
62
71
  type PaymentModeResponse = {
63
72
  /**
64
73
  * Indicates an autogenerated identifier of a given payment method.
@@ -89,6 +98,9 @@ type PaymentModeResponse = {
89
98
  [key: string]: string;
90
99
  };
91
100
  };
101
+ /**
102
+ * paymentModeFrontendResponse
103
+ */
92
104
  type PaymentModeFrontendResponse = {
93
105
  /**
94
106
  * Indicates an autogenerated identifier of a given payment method.
@@ -131,6 +143,9 @@ type PaymentModeFrontendResponse = {
131
143
  */
132
144
  receiverId?: string;
133
145
  };
146
+ /**
147
+ * initializePaymentRequest
148
+ */
134
149
  type InitializePaymentRequest = {
135
150
  order?: {
136
151
  /**
@@ -147,6 +162,9 @@ type InitializePaymentRequest = {
147
162
  */
148
163
  creditCardToken?: string;
149
164
  };
165
+ /**
166
+ * authorizeFrontendPaymentRequest
167
+ */
150
168
  type AuthorizeFrontendPaymentRequest = InitializePaymentRequest & {
151
169
  /**
152
170
  * Contains a token generated during the 3DS authentication process.
@@ -161,6 +179,9 @@ type AuthorizeFrontendPaymentRequest = InitializePaymentRequest & {
161
179
  */
162
180
  clientIP?: string;
163
181
  };
182
+ /**
183
+ * authorizePaymentRequest
184
+ */
164
185
  type AuthorizePaymentRequest = AuthorizeFrontendPaymentRequest & {
165
186
  /**
166
187
  * Amount that should be authorized.
@@ -171,6 +192,9 @@ type AuthorizePaymentRequest = AuthorizeFrontendPaymentRequest & {
171
192
  */
172
193
  currency?: string;
173
194
  };
195
+ /**
196
+ * initializePaymentResponse
197
+ */
174
198
  type InitializePaymentResponse = {
175
199
  /**
176
200
  * Indicates if the authorization process finished with success.
@@ -199,12 +223,18 @@ type InitializePaymentResponse = {
199
223
  [key: string]: string;
200
224
  };
201
225
  };
226
+ /**
227
+ * authorizePaymentResponse
228
+ */
202
229
  type AuthorizePaymentResponse = InitializePaymentResponse & {
203
230
  /**
204
231
  * Indicates if a redirect to an external site is required in order to finish the authorization flow.
205
232
  */
206
233
  requiresExternalPayment?: boolean;
207
234
  };
235
+ /**
236
+ * captureRequest
237
+ */
208
238
  type CaptureRequest = {
209
239
  /**
210
240
  * Amount that should be captured. The amount should not be greater than amount that was authorized.
@@ -215,6 +245,9 @@ type CaptureRequest = {
215
245
  */
216
246
  currency?: string;
217
247
  };
248
+ /**
249
+ * commonPaymentResponse
250
+ */
218
251
  type CommonPaymentResponse = {
219
252
  /**
220
253
  * Indicates if the operation finished with success or not.
@@ -225,6 +258,9 @@ type CommonPaymentResponse = {
225
258
  */
226
259
  message?: string;
227
260
  };
261
+ /**
262
+ * refundRequest
263
+ */
228
264
  type RefundRequest = {
229
265
  /**
230
266
  * Amount that should be refunded. The amount should not be greater than amount that was captured.
@@ -239,6 +275,9 @@ type RefundRequest = {
239
275
  */
240
276
  captureId?: string;
241
277
  };
278
+ /**
279
+ * paymentTransactionResponse
280
+ */
242
281
  type PaymentTransactionResponse = {
243
282
  /**
244
283
  * A unique identifier of a payment transaction.