@wix/auto_sdk_ecom_delivery-solutions 1.0.6 → 1.0.7

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 (134) hide show
  1. package/build/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.mts +561 -0
  2. package/build/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.ts +561 -0
  3. package/build/index.d.mts +18 -0
  4. package/build/index.d.ts +18 -0
  5. package/build/index.js +256 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +226 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.mts +568 -0
  10. package/build/internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.ts +568 -0
  11. package/build/internal/index.d.mts +18 -0
  12. package/build/internal/index.d.ts +18 -0
  13. package/build/internal/index.js +256 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +226 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/{cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → internal/meta.d.mts} +49 -84
  18. package/build/{es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → internal/meta.d.ts} +49 -84
  19. package/build/internal/meta.js +127 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +100 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/{internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → meta.d.mts} +49 -84
  24. package/build/{internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → meta.d.ts} +49 -84
  25. package/build/meta.js +127 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +100 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
  40. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -14
  41. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
  42. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
  43. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -79
  44. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
  45. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
  46. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -47
  47. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
  48. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
  49. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -19
  50. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
  51. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -72
  52. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
  53. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -576
  54. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -168
  55. package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
  67. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -5
  68. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
  69. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
  70. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -75
  71. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
  72. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
  73. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -20
  74. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
  75. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
  76. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -9
  77. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
  78. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -69
  79. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
  80. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -576
  81. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -141
  82. package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
  93. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -14
  94. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
  95. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
  96. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -79
  97. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
  98. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
  99. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -47
  100. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
  101. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
  102. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -19
  103. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
  104. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -72
  105. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
  106. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -583
  107. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -168
  108. package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
  119. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -5
  120. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
  121. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
  122. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -75
  123. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
  124. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
  125. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -20
  126. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
  127. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
  128. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -9
  129. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
  130. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -69
  131. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
  132. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -583
  133. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -141
  134. package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
@@ -1,576 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface DeliveryRatesGateway {
3
- /**
4
- * @format GUID
5
- * @readonly
6
- */
7
- _id?: string | null;
8
- }
9
- export interface GetDeliverySolutionsRequest {
10
- /**
11
- * list of items to delivery that each of them points to delivery profile and delivery rule.
12
- * @minSize 1
13
- * @maxSize 300
14
- */
15
- lineItems: DeliverableItem[];
16
- /** Destination the items should deliver to */
17
- destination: Address;
18
- /**
19
- * Origin the items should deliver from
20
- * @deprecated Origin the items should deliver from
21
- * @targetRemovalDate 2025-04-01
22
- */
23
- origin?: Address;
24
- /**
25
- * Currency - Defaults to site's currency
26
- * @format CURRENCY
27
- */
28
- currency: string | null;
29
- /** Contact details */
30
- contactDetails?: FullAddressContactDetails;
31
- /** Measure unit - defaults to site's weight unit */
32
- weightUnit?: WeightUnit;
33
- /**
34
- * list of user preferences which are delivery options codes combined with delivery carrier app id
35
- * @maxSize 5
36
- */
37
- userPreferences?: UserPreference[];
38
- /**
39
- * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
40
- * @format GUID
41
- */
42
- purchaseFlowId?: string | null;
43
- }
44
- export interface DeliverableItem {
45
- /**
46
- * The ID of the line item.
47
- * @minLength 1
48
- * @maxLength 100
49
- */
50
- _id?: string;
51
- /**
52
- * Item name.
53
- * @maxLength 400
54
- */
55
- name?: string;
56
- /**
57
- * The number of items ordered.
58
- * @max 999999999
59
- */
60
- quantity?: number;
61
- /** Reference to the item's origin catalog. */
62
- catalogReference?: CatalogReference;
63
- /** Physical properties of the item. */
64
- physicalProperties?: PhysicalProperties;
65
- /**
66
- * Price of a single item after discounts.
67
- * @format DECIMAL_VALUE
68
- * @decimalValue options { gte:0, maxScale:36 }
69
- */
70
- price?: string;
71
- /**
72
- * Total line item price before discounts.
73
- * @format DECIMAL_VALUE
74
- * @decimalValue options { gte:0, maxScale:36 }
75
- */
76
- totalPriceBeforeDiscount?: string | null;
77
- /**
78
- * Price of a single item before discounts.
79
- * @format DECIMAL_VALUE
80
- * @decimalValue options { gte:0, maxScale:36 }
81
- */
82
- priceBeforeDiscount?: string | null;
83
- /**
84
- * Total line item price after discounts. This is equal to `price` multiplied by `quantity`.
85
- * @format DECIMAL_VALUE
86
- * @decimalValue options { gte:0, maxScale:36 }
87
- */
88
- totalPrice?: string | null;
89
- /**
90
- * For delivery rates by delivery profile id
91
- * @format GUID
92
- */
93
- deliveryProfileId?: string | null;
94
- /** whether tax is included in line item price */
95
- taxIncludedInPrice?: boolean | null;
96
- }
97
- /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
98
- export interface CatalogReference {
99
- /**
100
- * ID of the item within the catalog it belongs to.
101
- * @minLength 1
102
- * @maxLength 36
103
- */
104
- catalogItemId?: string;
105
- /**
106
- * ID of the app providing the catalog.
107
- *
108
- * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
109
- *
110
- * For items from Wix catalogs, the following values always apply:
111
- * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
112
- * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
113
- * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
114
- * @minLength 1
115
- */
116
- appId?: string;
117
- /**
118
- * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
119
- *
120
- * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
121
- */
122
- options?: Record<string, any> | null;
123
- }
124
- export interface PhysicalProperties {
125
- /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
126
- weight?: number | null;
127
- /**
128
- * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
129
- * @maxLength 40
130
- */
131
- sku?: string | null;
132
- /** Whether this line item is shippable. */
133
- shippable?: boolean;
134
- }
135
- /** Physical address */
136
- export interface Address extends AddressStreetOneOf {
137
- /** Street name and number. */
138
- streetAddress?: StreetAddress;
139
- /** Main address line, usually street and number as free text. */
140
- addressLine1?: string | null;
141
- /**
142
- * Country code.
143
- * @format COUNTRY
144
- */
145
- country?: string | null;
146
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
147
- subdivision?: string | null;
148
- /** City name. */
149
- city?: string | null;
150
- /** Zip/postal code. */
151
- postalCode?: string | null;
152
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
153
- addressLine2?: string | null;
154
- }
155
- /** @oneof */
156
- export interface AddressStreetOneOf {
157
- /** Street name and number. */
158
- streetAddress?: StreetAddress;
159
- /** Main address line, usually street and number as free text. */
160
- addressLine?: string | null;
161
- }
162
- export interface StreetAddress {
163
- /** Street number. */
164
- number?: string;
165
- /** Street name. */
166
- name?: string;
167
- }
168
- export interface AddressLocation {
169
- /** Address latitude. */
170
- latitude?: number | null;
171
- /** Address longitude. */
172
- longitude?: number | null;
173
- }
174
- export interface Subdivision {
175
- /** Short subdivision code. */
176
- code?: string;
177
- /** Subdivision full name. */
178
- name?: string;
179
- }
180
- export declare enum SubdivisionType {
181
- UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
182
- /** State */
183
- ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
184
- /** County */
185
- ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
186
- /** City/town */
187
- ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
188
- /** Neighborhood/quarter */
189
- ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
190
- /** Street/block */
191
- ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
192
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
193
- COUNTRY = "COUNTRY"
194
- }
195
- /** Full contact details for an address */
196
- export interface FullAddressContactDetails {
197
- /** Contact's first name. */
198
- firstName?: string | null;
199
- /** Contact's last name. */
200
- lastName?: string | null;
201
- /**
202
- * Contact's phone number.
203
- * @format PHONE
204
- */
205
- phone?: string | null;
206
- /** Contact's company name. */
207
- company?: string | null;
208
- /**
209
- * Email associated with the address.
210
- * @format EMAIL
211
- */
212
- email?: string | null;
213
- /** Tax info. Currently usable only in Brazil. */
214
- vatId?: VatId;
215
- }
216
- export interface VatId {
217
- /** Customer's tax ID. */
218
- _id?: string;
219
- /**
220
- * Tax type.
221
- *
222
- * Supported values:
223
- * + `CPF`: for individual tax payers
224
- * + `CNPJ`: for corporations
225
- */
226
- type?: VatType;
227
- }
228
- /** tax info types */
229
- export declare enum VatType {
230
- UNSPECIFIED = "UNSPECIFIED",
231
- /** CPF - for individual tax payers. */
232
- CPF = "CPF",
233
- /** CNPJ - for corporations */
234
- CNPJ = "CNPJ"
235
- }
236
- export declare enum WeightUnit {
237
- /** Weight unit can't be classified due to an error. */
238
- UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
239
- /** Kilograms. */
240
- KG = "KG",
241
- /** Pounds. */
242
- LB = "LB"
243
- }
244
- export interface UserPreference {
245
- /**
246
- * The delivery carrier app id
247
- * @format GUID
248
- */
249
- appId?: string | null;
250
- /**
251
- * The delivery option code
252
- * @maxLength 250
253
- */
254
- code?: string;
255
- }
256
- export interface ExternalReference {
257
- /**
258
- * ID of the app associated with the purchase flow.
259
- * For example, the Wix Pay Links app ID.
260
- * @format GUID
261
- * @immutable
262
- */
263
- appId?: string;
264
- /**
265
- * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
266
- * For example, a Wix Pay Link ID.
267
- * @minLength 1
268
- * @maxLength 100
269
- * @immutable
270
- */
271
- resourceId?: string | null;
272
- }
273
- /**
274
- * Each delivery option has a list of items that can be delivered by it - the chosen one
275
- * on Errors throw a business error from TC to catch and trigger destination completion
276
- */
277
- export interface GetDeliverySolutionsResponse {
278
- /**
279
- * Delivery Options with their associated items
280
- * @maxSize 300
281
- */
282
- deliverySolutions?: DeliverySolution[];
283
- /**
284
- * If a delivery carrier could not calculate rates, the error will be detailed here
285
- * @maxSize 50
286
- */
287
- errors?: DeliveryCarrierError[];
288
- }
289
- export interface DeliverySolution {
290
- /**
291
- * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
292
- * @maxLength 250
293
- */
294
- code?: string;
295
- /**
296
- * Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
297
- * @maxLength 250
298
- */
299
- title?: string;
300
- /** Delivery logistics. */
301
- logistics?: DeliveryLogistics;
302
- /** Delivery cost. */
303
- cost?: DeliveryCost;
304
- /**
305
- * Delivery solution allocations to different delivery carriers and delivery regions
306
- * @minSize 1
307
- * @maxSize 300
308
- */
309
- deliveryAllocations?: DeliveryAllocation[];
310
- /** If the delivery solution is a partial and doesn't apply to all items. */
311
- partial?: boolean | null;
312
- }
313
- export interface DeliveryLogistics {
314
- /**
315
- * When the item is expected to be delivered in free text. For example, `"3-5 business days"`.
316
- * @maxLength 1000
317
- */
318
- deliveryTime?: string | null;
319
- /**
320
- * Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don't park in the disabled spot"`.
321
- * @maxLength 1000
322
- */
323
- instructions?: string | null;
324
- /** Pickup details. Should be returned only if order is for pickup. */
325
- pickupDetails?: PickupDetails;
326
- /** Date and Time of the delivery option */
327
- deliveryTimeSlot?: DeliveryTimeSlot;
328
- }
329
- export interface PickupDetails {
330
- /** Pickup address. */
331
- address?: Address;
332
- /**
333
- * Pickup method.
334
- *
335
- * Supported values:
336
- * + `"STORE_PICKUP"`: When pickup is from the merchant's brick and mortar store.
337
- * + `"PICKUP_POINT"`: When item is shipped to a specified pickup point.
338
- */
339
- pickupMethod?: PickupMethod;
340
- }
341
- export declare enum PickupMethod {
342
- UNKNOWN_METHOD = "UNKNOWN_METHOD",
343
- STORE_PICKUP = "STORE_PICKUP",
344
- PICKUP_POINT = "PICKUP_POINT"
345
- }
346
- export interface DeliveryTimeSlot {
347
- /** starting time of the delivery time slot */
348
- from?: Date | null;
349
- /** ending time of the delivery time slot */
350
- to?: Date | null;
351
- }
352
- export interface DeliveryCost {
353
- /**
354
- * The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
355
- * @format DECIMAL_VALUE
356
- * @decimalValue options { gte:0, lte:1000000000000000 }
357
- */
358
- price?: string;
359
- /**
360
- * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.
361
- * @format CURRENCY
362
- */
363
- currency?: string;
364
- /**
365
- * Additional costs. For example, a handling fee for packaging fragile items.
366
- * @maxSize 100
367
- */
368
- additionalCharges?: AdditionalCharge[];
369
- }
370
- export interface AdditionalCharge {
371
- /** Additional charge type. */
372
- type?: ChargeType;
373
- /**
374
- * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
375
- * @maxLength 250
376
- */
377
- description?: string | null;
378
- /**
379
- * Cost of additional charge. For example, `12.5`.
380
- * @format DECIMAL_VALUE
381
- * @decimalValue options { gte:0, lte:1000000000000000 }
382
- */
383
- price?: string;
384
- }
385
- export declare enum ChargeType {
386
- HANDLING_FEE = "HANDLING_FEE"
387
- }
388
- export interface DeliveryAllocation {
389
- /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
390
- deliveryCarrier?: Carrier;
391
- /** The delivery region that are relevant for this delivery solution. */
392
- deliveryRegion?: Region;
393
- /** Populated if the delivery solution is a partially supplied by this carrier. */
394
- applicableLineItems?: ApplicableLineItems;
395
- }
396
- export interface Carrier {
397
- /**
398
- * The carrier app id
399
- * @format GUID
400
- */
401
- appId?: string | null;
402
- /**
403
- * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
404
- * @maxLength 250
405
- */
406
- code?: string;
407
- }
408
- export interface Region {
409
- /**
410
- * The delivery region id.
411
- * @format GUID
412
- */
413
- _id?: string | null;
414
- /**
415
- * The delivery region name.
416
- * @maxLength 100
417
- */
418
- name?: string | null;
419
- }
420
- export interface ApplicableLineItems {
421
- /**
422
- * Line items that the delivery solution is for.
423
- * @maxSize 300
424
- * @minLength 1
425
- * @maxLength 100
426
- */
427
- lineItemIds?: string[];
428
- }
429
- export interface DeliveryCarrierError {
430
- /**
431
- * The carrier app id
432
- * @format GUID
433
- */
434
- appId?: string | null;
435
- /** The error details */
436
- errorDetails?: Details;
437
- }
438
- export interface Details extends DetailsKindOneOf {
439
- applicationError?: ApplicationError;
440
- validationError?: ValidationError;
441
- systemError?: SystemError;
442
- /**
443
- * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
444
- * @deprecated
445
- */
446
- tracing?: Record<string, string>;
447
- }
448
- /** @oneof */
449
- export interface DetailsKindOneOf {
450
- applicationError?: ApplicationError;
451
- validationError?: ValidationError;
452
- systemError?: SystemError;
453
- }
454
- export interface ApplicationError {
455
- /** Error code. */
456
- code?: string;
457
- /** Description of the error. */
458
- description?: string;
459
- /** Data related to the error. */
460
- data?: Record<string, any> | null;
461
- }
462
- /**
463
- * example result:
464
- * {
465
- * "fieldViolations": [
466
- * {
467
- * "field": "fieldA",
468
- * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
469
- * "violatedRule": "OTHER",
470
- * "ruleName": "INVALID_NOTE",
471
- * "data": {
472
- * "value": "FI"
473
- * }
474
- * },
475
- * {
476
- * "field": "fieldB",
477
- * "description": "field value out of range. supported range: [0-20]",
478
- * "violatedRule": "MAX",
479
- * "data": {
480
- * "threshold": 20
481
- * }
482
- * },
483
- * {
484
- * "field": "fieldC",
485
- * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
486
- * "violatedRule": "FORMAT",
487
- * "data": {
488
- * "type": "PHONE"
489
- * }
490
- * }
491
- * ]
492
- * }
493
- */
494
- export interface ValidationError {
495
- fieldViolations?: FieldViolation[];
496
- }
497
- export declare enum RuleType {
498
- VALIDATION = "VALIDATION",
499
- OTHER = "OTHER",
500
- MAX = "MAX",
501
- MIN = "MIN",
502
- MAX_LENGTH = "MAX_LENGTH",
503
- MIN_LENGTH = "MIN_LENGTH",
504
- MAX_SIZE = "MAX_SIZE",
505
- MIN_SIZE = "MIN_SIZE",
506
- FORMAT = "FORMAT",
507
- DECIMAL_LTE = "DECIMAL_LTE",
508
- DECIMAL_GTE = "DECIMAL_GTE",
509
- DECIMAL_LT = "DECIMAL_LT",
510
- DECIMAL_GT = "DECIMAL_GT",
511
- DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
512
- INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
513
- REQUIRED_FIELD = "REQUIRED_FIELD",
514
- FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
515
- ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
516
- EXACT_LENGTH = "EXACT_LENGTH",
517
- EXACT_SIZE = "EXACT_SIZE",
518
- REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
519
- }
520
- export interface FieldViolation {
521
- field?: string;
522
- description?: string;
523
- violatedRule?: RuleType;
524
- /** applicable when violated_rule=OTHER */
525
- ruleName?: string | null;
526
- data?: Record<string, any> | null;
527
- }
528
- export interface SystemError {
529
- /** Error code. */
530
- errorCode?: string | null;
531
- }
532
- /**
533
- * Get Delivery Solutions for the given line items from all relevant delivery carriers
534
- * @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule.
535
- * @public
536
- * @documentationMaturity preview
537
- * @requiredField lineItems
538
- * @requiredField options.currency
539
- * @requiredField options.destination
540
- * @requiredField options.destination.country
541
- * @permissionId ECOM.DELIVERY_SOLUTION_READ
542
- * @applicableIdentity VISITOR
543
- * @returns Each delivery option has a list of items that can be delivered by it - the chosen one
544
- * on Errors throw a business error from TC to catch and trigger destination completion
545
- * @fqn wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions
546
- */
547
- export declare function getDeliverySolutions(lineItems: DeliverableItem[], options?: NonNullablePaths<GetDeliverySolutionsOptions, `currency` | `destination` | `destination.country`>): Promise<NonNullablePaths<GetDeliverySolutionsResponse, `deliverySolutions` | `deliverySolutions.${number}.code` | `deliverySolutions.${number}.title` | `deliverySolutions.${number}.logistics.pickupDetails.address.streetAddress.number` | `deliverySolutions.${number}.logistics.pickupDetails.address.streetAddress.name` | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod` | `deliverySolutions.${number}.cost.price` | `deliverySolutions.${number}.cost.currency` | `deliverySolutions.${number}.cost.additionalCharges` | `deliverySolutions.${number}.cost.additionalCharges.${number}.type` | `deliverySolutions.${number}.cost.additionalCharges.${number}.price` | `deliverySolutions.${number}.deliveryAllocations` | `deliverySolutions.${number}.deliveryAllocations.${number}.deliveryCarrier.code` | `deliverySolutions.${number}.deliveryAllocations.${number}.applicableLineItems.lineItemIds` | `errors` | `errors.${number}.errorDetails.applicationError.code` | `errors.${number}.errorDetails.applicationError.description` | `errors.${number}.errorDetails.validationError.fieldViolations` | `errors.${number}.errorDetails.validationError.fieldViolations.${number}.field` | `errors.${number}.errorDetails.validationError.fieldViolations.${number}.description` | `errors.${number}.errorDetails.validationError.fieldViolations.${number}.violatedRule`>>;
548
- export interface GetDeliverySolutionsOptions {
549
- /** Destination the items should deliver to */
550
- destination: Address;
551
- /**
552
- * Origin the items should deliver from
553
- * @deprecated Origin the items should deliver from
554
- * @targetRemovalDate 2025-04-01
555
- */
556
- origin?: Address;
557
- /**
558
- * Currency - Defaults to site's currency
559
- * @format CURRENCY
560
- */
561
- currency: string | null;
562
- /** Contact details */
563
- contactDetails?: FullAddressContactDetails;
564
- /** Measure unit - defaults to site's weight unit */
565
- weightUnit?: WeightUnit;
566
- /**
567
- * list of user preferences which are delivery options codes combined with delivery carrier app id
568
- * @maxSize 5
569
- */
570
- userPreferences?: UserPreference[];
571
- /**
572
- * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
573
- * @format GUID
574
- */
575
- purchaseFlowId?: string | null;
576
- }