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