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