@wix/auto_sdk_ecom_shipping-options 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.context.d.ts +20 -0
  11. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.context.js +27 -0
  12. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.http.d.ts +38 -0
  14. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.http.js +255 -0
  15. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.meta.d.ts +26 -0
  17. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.meta.js +142 -0
  18. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.public.d.ts +77 -0
  20. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.public.js +81 -0
  21. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.public.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.types.d.ts +337 -0
  23. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.types.js +33 -0
  24. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.universal.d.ts +622 -0
  26. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.universal.js +344 -0
  27. package/build/cjs/src/ecom-v1-shipping-option-shipping-options.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-shipping-option-shipping-options.context.d.ts +20 -0
  39. package/build/es/src/ecom-v1-shipping-option-shipping-options.context.js +20 -0
  40. package/build/es/src/ecom-v1-shipping-option-shipping-options.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-shipping-option-shipping-options.http.d.ts +38 -0
  42. package/build/es/src/ecom-v1-shipping-option-shipping-options.http.js +246 -0
  43. package/build/es/src/ecom-v1-shipping-option-shipping-options.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-shipping-option-shipping-options.meta.d.ts +26 -0
  45. package/build/es/src/ecom-v1-shipping-option-shipping-options.meta.js +110 -0
  46. package/build/es/src/ecom-v1-shipping-option-shipping-options.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-shipping-option-shipping-options.public.d.ts +77 -0
  48. package/build/es/src/ecom-v1-shipping-option-shipping-options.public.js +68 -0
  49. package/build/es/src/ecom-v1-shipping-option-shipping-options.public.js.map +1 -0
  50. package/build/es/src/ecom-v1-shipping-option-shipping-options.types.d.ts +337 -0
  51. package/build/es/src/ecom-v1-shipping-option-shipping-options.types.js +30 -0
  52. package/build/es/src/ecom-v1-shipping-option-shipping-options.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-shipping-option-shipping-options.universal.d.ts +622 -0
  54. package/build/es/src/ecom-v1-shipping-option-shipping-options.universal.js +312 -0
  55. package/build/es/src/ecom-v1-shipping-option-shipping-options.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.context.d.ts +20 -0
  66. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.context.js +27 -0
  67. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.http.d.ts +38 -0
  69. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.http.js +255 -0
  70. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.meta.d.ts +26 -0
  72. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.meta.js +142 -0
  73. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.public.d.ts +77 -0
  75. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.public.js +81 -0
  76. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.types.d.ts +337 -0
  78. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.types.js +33 -0
  79. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.universal.d.ts +622 -0
  81. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.universal.js +344 -0
  82. package/build/internal/cjs/src/ecom-v1-shipping-option-shipping-options.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.context.d.ts +20 -0
  93. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.context.js +20 -0
  94. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.http.d.ts +38 -0
  96. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.http.js +246 -0
  97. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.meta.d.ts +26 -0
  99. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.meta.js +110 -0
  100. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.public.d.ts +77 -0
  102. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.public.js +68 -0
  103. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.types.d.ts +337 -0
  105. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.types.js +30 -0
  106. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.universal.d.ts +622 -0
  108. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.universal.js +312 -0
  109. package/build/internal/es/src/ecom-v1-shipping-option-shipping-options.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,622 @@
1
+ export interface ShippingOption {
2
+ /**
3
+ * ShippingOption ID.
4
+ * @readonly
5
+ */
6
+ _id?: string | null;
7
+ /**
8
+ * Revision number, which increments by 1 each time the ShippingOption is updated.
9
+ * To prevent conflicting changes,
10
+ * the current revision must be passed when updating the ShippingOption.
11
+ *
12
+ * Ignored when creating a ShippingOption.
13
+ * @readonly
14
+ */
15
+ revision?: string | null;
16
+ /**
17
+ * Date and time the ShippingOption was created.
18
+ * @readonly
19
+ */
20
+ _createdDate?: Date | null;
21
+ /**
22
+ * Date and time the ShippingOption was last updated.
23
+ * @readonly
24
+ */
25
+ _updatedDate?: Date | null;
26
+ /** Associated delivery region id. */
27
+ deliveryRegionId?: string;
28
+ /** Delivery option configured for the ShippingOption */
29
+ title?: string | null;
30
+ estimateDeliveryTime?: string | null;
31
+ /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */
32
+ rates?: ConditionalRates[];
33
+ /** Data Extensions */
34
+ extendedFields?: ExtendedFields;
35
+ }
36
+ export interface ConditionalRates {
37
+ /**
38
+ * there is an AND logic between all the conditions. Empty conditions means true.
39
+ * For example: weight > 0 and weight <= 10
40
+ */
41
+ conditions?: Condition[];
42
+ amount?: string;
43
+ }
44
+ export interface Condition {
45
+ type?: ConditionType;
46
+ /**
47
+ * The value in respective to the condition type
48
+ * Weight values should be in the same weight units of the store: KG / LB
49
+ * Total price is according to the store currency
50
+ * Quantity of items should be integers
51
+ */
52
+ value?: string;
53
+ operator?: LogicalOperator;
54
+ }
55
+ export declare enum ConditionType {
56
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
57
+ BY_TOTAL_WEIGHT = "BY_TOTAL_WEIGHT",
58
+ BY_TOTAL_PRICE = "BY_TOTAL_PRICE",
59
+ BY_TOTAL_QUANTITY = "BY_TOTAL_QUANTITY"
60
+ }
61
+ export declare enum LogicalOperator {
62
+ UNKNOWN_LOGICAL_OPERATOR_TYPE = "UNKNOWN_LOGICAL_OPERATOR_TYPE",
63
+ EQ = "EQ",
64
+ GT = "GT",
65
+ GTE = "GTE",
66
+ LT = "LT",
67
+ LTE = "LTE"
68
+ }
69
+ export interface ExtendedFields {
70
+ /**
71
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
72
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
73
+ *
74
+ * You can only access fields for which you have the appropriate permissions.
75
+ *
76
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
77
+ */
78
+ namespaces?: Record<string, Record<string, any>>;
79
+ }
80
+ export interface CreateShippingOptionRequest {
81
+ /** ShippingOption to be created. */
82
+ shippingOption: ShippingOption;
83
+ }
84
+ export interface CreateShippingOptionResponse {
85
+ /** The created ShippingOption. */
86
+ shippingOption?: ShippingOption;
87
+ }
88
+ export interface GetShippingOptionRequest {
89
+ /** ID of the ShippingOption to retrieve. */
90
+ shippingOptionId: string;
91
+ }
92
+ export interface GetShippingOptionResponse {
93
+ /** The requested ShippingOption. */
94
+ shippingOption?: ShippingOption;
95
+ }
96
+ export interface UpdateShippingOptionRequest {
97
+ /** ShippingOption to be updated, may be partial. */
98
+ shippingOption: ShippingOption;
99
+ }
100
+ export interface UpdateShippingOptionResponse {
101
+ /** Updated ShippingOption. */
102
+ shippingOption?: ShippingOption;
103
+ }
104
+ export interface DeleteShippingOptionRequest {
105
+ /** Id of the ShippingOption to delete. */
106
+ shippingOptionId: string;
107
+ }
108
+ export interface DeleteShippingOptionResponse {
109
+ }
110
+ export interface QueryShippingOptionsRequest {
111
+ /** WQL expression. */
112
+ query?: CursorQuery;
113
+ }
114
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
115
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
116
+ cursorPaging?: CursorPaging;
117
+ /**
118
+ * Filter object in the following format:
119
+ * `"filter" : {
120
+ * "fieldName1": "value1",
121
+ * "fieldName2":{"$operator":"value2"}
122
+ * }`
123
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
124
+ */
125
+ filter?: Record<string, any> | null;
126
+ /**
127
+ * Sort object in the following format:
128
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
129
+ */
130
+ sort?: Sorting[];
131
+ }
132
+ /** @oneof */
133
+ export interface CursorQueryPagingMethodOneOf {
134
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
135
+ cursorPaging?: CursorPaging;
136
+ }
137
+ export interface Sorting {
138
+ /** Name of the field to sort by. */
139
+ fieldName?: string;
140
+ /** Sort order. */
141
+ order?: SortOrder;
142
+ }
143
+ export declare enum SortOrder {
144
+ ASC = "ASC",
145
+ DESC = "DESC"
146
+ }
147
+ export interface CursorPaging {
148
+ /** Maximum number of items to return in the results. */
149
+ limit?: number | null;
150
+ /**
151
+ * Pointer to the next or previous page in the list of results.
152
+ *
153
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
154
+ * Not relevant for the first request.
155
+ */
156
+ cursor?: string | null;
157
+ }
158
+ export interface QueryShippingOptionsResponse {
159
+ /** List of ShippingOptions. */
160
+ shippingOptions?: ShippingOption[];
161
+ /** Paging metadata */
162
+ pagingMetadata?: CursorPagingMetadata;
163
+ }
164
+ export interface CursorPagingMetadata {
165
+ /** Number of items returned in the response. */
166
+ count?: number | null;
167
+ /** Cursor strings that point to the next page, previous page, or both. */
168
+ cursors?: Cursors;
169
+ /**
170
+ * Whether there are more pages to retrieve following the current page.
171
+ *
172
+ * + `true`: Another page of results can be retrieved.
173
+ * + `false`: This is the last page.
174
+ */
175
+ hasNext?: boolean | null;
176
+ }
177
+ export interface Cursors {
178
+ /** Cursor string pointing to the next page in the list of results. */
179
+ next?: string | null;
180
+ /** Cursor pointing to the previous page in the list of results. */
181
+ prev?: string | null;
182
+ }
183
+ export interface UpdateExtendedFieldsRequest {
184
+ /** ID of the entity to update. */
185
+ _id: string;
186
+ /** Identifier for the app whose extended fields are being updated. */
187
+ namespace: string;
188
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
189
+ namespaceData: Record<string, any> | null;
190
+ }
191
+ export interface UpdateExtendedFieldsResponse {
192
+ /** Updated ShippingOption. */
193
+ shippingOption?: ShippingOption;
194
+ }
195
+ export interface DomainEvent extends DomainEventBodyOneOf {
196
+ createdEvent?: EntityCreatedEvent;
197
+ updatedEvent?: EntityUpdatedEvent;
198
+ deletedEvent?: EntityDeletedEvent;
199
+ actionEvent?: ActionEvent;
200
+ /**
201
+ * Unique event ID.
202
+ * Allows clients to ignore duplicate webhooks.
203
+ */
204
+ _id?: string;
205
+ /**
206
+ * Assumes actions are also always typed to an entity_type
207
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
208
+ */
209
+ entityFqdn?: string;
210
+ /**
211
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
212
+ * This is although the created/updated/deleted notion is duplication of the oneof types
213
+ * Example: created/updated/deleted/started/completed/email_opened
214
+ */
215
+ slug?: string;
216
+ /** ID of the entity associated with the event. */
217
+ entityId?: string;
218
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
219
+ eventTime?: Date | null;
220
+ /**
221
+ * Whether the event was triggered as a result of a privacy regulation application
222
+ * (for example, GDPR).
223
+ */
224
+ triggeredByAnonymizeRequest?: boolean | null;
225
+ /** If present, indicates the action that triggered the event. */
226
+ originatedFrom?: string | null;
227
+ /**
228
+ * A sequence number defining the order of updates to the underlying entity.
229
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
230
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
231
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
232
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
233
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
234
+ */
235
+ entityEventSequence?: string | null;
236
+ }
237
+ /** @oneof */
238
+ export interface DomainEventBodyOneOf {
239
+ createdEvent?: EntityCreatedEvent;
240
+ updatedEvent?: EntityUpdatedEvent;
241
+ deletedEvent?: EntityDeletedEvent;
242
+ actionEvent?: ActionEvent;
243
+ }
244
+ export interface EntityCreatedEvent {
245
+ entity?: string;
246
+ }
247
+ export interface RestoreInfo {
248
+ deletedDate?: Date | null;
249
+ }
250
+ export interface EntityUpdatedEvent {
251
+ /**
252
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
253
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
254
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
255
+ */
256
+ currentEntity?: string;
257
+ }
258
+ export interface EntityDeletedEvent {
259
+ /** Entity that was deleted */
260
+ deletedEntity?: string | null;
261
+ }
262
+ export interface ActionEvent {
263
+ body?: string;
264
+ }
265
+ export interface Empty {
266
+ }
267
+ export interface MessageEnvelope {
268
+ /** App instance ID. */
269
+ instanceId?: string | null;
270
+ /** Event type. */
271
+ eventType?: string;
272
+ /** The identification type and identity data. */
273
+ identity?: IdentificationData;
274
+ /** Stringify payload. */
275
+ data?: string;
276
+ }
277
+ export interface IdentificationData extends IdentificationDataIdOneOf {
278
+ /** ID of a site visitor that has not logged in to the site. */
279
+ anonymousVisitorId?: string;
280
+ /** ID of a site visitor that has logged in to the site. */
281
+ memberId?: string;
282
+ /** ID of a Wix user (site owner, contributor, etc.). */
283
+ wixUserId?: string;
284
+ /** ID of an app. */
285
+ appId?: string;
286
+ /** @readonly */
287
+ identityType?: WebhookIdentityType;
288
+ }
289
+ /** @oneof */
290
+ export interface IdentificationDataIdOneOf {
291
+ /** ID of a site visitor that has not logged in to the site. */
292
+ anonymousVisitorId?: string;
293
+ /** ID of a site visitor that has logged in to the site. */
294
+ memberId?: string;
295
+ /** ID of a Wix user (site owner, contributor, etc.). */
296
+ wixUserId?: string;
297
+ /** ID of an app. */
298
+ appId?: string;
299
+ }
300
+ export declare enum WebhookIdentityType {
301
+ UNKNOWN = "UNKNOWN",
302
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
303
+ MEMBER = "MEMBER",
304
+ WIX_USER = "WIX_USER",
305
+ APP = "APP"
306
+ }
307
+ interface ConditionNonNullableFields {
308
+ type: ConditionType;
309
+ value: string;
310
+ operator: LogicalOperator;
311
+ }
312
+ interface ConditionalRatesNonNullableFields {
313
+ conditions: ConditionNonNullableFields[];
314
+ amount: string;
315
+ }
316
+ export interface ShippingOptionNonNullableFields {
317
+ deliveryRegionId: string;
318
+ rates: ConditionalRatesNonNullableFields[];
319
+ }
320
+ export interface CreateShippingOptionResponseNonNullableFields {
321
+ shippingOption?: ShippingOptionNonNullableFields;
322
+ }
323
+ export interface GetShippingOptionResponseNonNullableFields {
324
+ shippingOption?: ShippingOptionNonNullableFields;
325
+ }
326
+ export interface UpdateShippingOptionResponseNonNullableFields {
327
+ shippingOption?: ShippingOptionNonNullableFields;
328
+ }
329
+ export interface QueryShippingOptionsResponseNonNullableFields {
330
+ shippingOptions: ShippingOptionNonNullableFields[];
331
+ }
332
+ export interface UpdateExtendedFieldsResponseNonNullableFields {
333
+ shippingOption?: ShippingOptionNonNullableFields;
334
+ }
335
+ export interface BaseEventMetadata {
336
+ /** App instance ID. */
337
+ instanceId?: string | null;
338
+ /** Event type. */
339
+ eventType?: string;
340
+ /** The identification type and identity data. */
341
+ identity?: IdentificationData;
342
+ }
343
+ export interface EventMetadata extends BaseEventMetadata {
344
+ /**
345
+ * Unique event ID.
346
+ * Allows clients to ignore duplicate webhooks.
347
+ */
348
+ _id?: string;
349
+ /**
350
+ * Assumes actions are also always typed to an entity_type
351
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
352
+ */
353
+ entityFqdn?: string;
354
+ /**
355
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
356
+ * This is although the created/updated/deleted notion is duplication of the oneof types
357
+ * Example: created/updated/deleted/started/completed/email_opened
358
+ */
359
+ slug?: string;
360
+ /** ID of the entity associated with the event. */
361
+ entityId?: string;
362
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
363
+ eventTime?: Date | null;
364
+ /**
365
+ * Whether the event was triggered as a result of a privacy regulation application
366
+ * (for example, GDPR).
367
+ */
368
+ triggeredByAnonymizeRequest?: boolean | null;
369
+ /** If present, indicates the action that triggered the event. */
370
+ originatedFrom?: string | null;
371
+ /**
372
+ * A sequence number defining the order of updates to the underlying entity.
373
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
374
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
375
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
376
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
377
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
378
+ */
379
+ entityEventSequence?: string | null;
380
+ }
381
+ export interface ShippingOptionCreatedEnvelope {
382
+ entity: ShippingOption;
383
+ metadata: EventMetadata;
384
+ }
385
+ /** @webhook
386
+ * @eventType wix.ecom.v1.shipping_option_created
387
+ * @documentationMaturity preview
388
+ */
389
+ export declare function onShippingOptionCreated(handler: (event: ShippingOptionCreatedEnvelope) => void | Promise<void>): void;
390
+ export interface ShippingOptionDeletedEnvelope {
391
+ entity: ShippingOption;
392
+ metadata: EventMetadata;
393
+ }
394
+ /** @webhook
395
+ * @eventType wix.ecom.v1.shipping_option_deleted
396
+ * @documentationMaturity preview
397
+ */
398
+ export declare function onShippingOptionDeleted(handler: (event: ShippingOptionDeletedEnvelope) => void | Promise<void>): void;
399
+ export interface ShippingOptionUpdatedEnvelope {
400
+ entity: ShippingOption;
401
+ metadata: EventMetadata;
402
+ }
403
+ /** @webhook
404
+ * @eventType wix.ecom.v1.shipping_option_updated
405
+ * @documentationMaturity preview
406
+ */
407
+ export declare function onShippingOptionUpdated(handler: (event: ShippingOptionUpdatedEnvelope) => void | Promise<void>): void;
408
+ /**
409
+ * Creates a ShippingOption.
410
+ *
411
+ * The request body must include shipping option and delivery region associated to.
412
+ * @param shippingOption - ShippingOption to be created.
413
+ * @public
414
+ * @documentationMaturity preview
415
+ * @requiredField shippingOption
416
+ * @permissionId ECOM.SHIPPING_OPTION_CREATE
417
+ * @permissionScope Manage Stores - all permissions
418
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
419
+ * @permissionScope Manage eCommerce - all permissions
420
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
421
+ * @applicableIdentity APP
422
+ * @returns The created ShippingOption.
423
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.CreateShippingOption
424
+ */
425
+ export declare function createShippingOption(shippingOption: ShippingOption): Promise<ShippingOption & ShippingOptionNonNullableFields>;
426
+ /**
427
+ * Retrieves a ShippingOption.
428
+ * @param shippingOptionId - ID of the ShippingOption to retrieve.
429
+ * @public
430
+ * @documentationMaturity preview
431
+ * @requiredField shippingOptionId
432
+ * @permissionId ECOM.SHIPPING_OPTION_READ
433
+ * @permissionScope Manage Stores - all permissions
434
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
435
+ * @permissionScope Read eCommerce - all read permissions
436
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
437
+ * @permissionScope Manage eCommerce - all permissions
438
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
439
+ * @applicableIdentity APP
440
+ * @returns The requested ShippingOption.
441
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.GetShippingOption
442
+ */
443
+ export declare function getShippingOption(shippingOptionId: string): Promise<ShippingOption & ShippingOptionNonNullableFields>;
444
+ /**
445
+ * Updates a ShippingOption.
446
+ *
447
+ *
448
+ * Each time the ShippingOption is updated,
449
+ * `revision` increments by 1.
450
+ * The current `revision` must be passed when updating the ShippingOption.
451
+ * This ensures you're working with the latest ShippingOption
452
+ * and prevents unintended overwrites.
453
+ * @param _id - ShippingOption ID.
454
+ * @public
455
+ * @documentationMaturity preview
456
+ * @requiredField _id
457
+ * @requiredField shippingOption
458
+ * @requiredField shippingOption.revision
459
+ * @permissionId ECOM.SHIPPING_OPTION_UPDATE
460
+ * @permissionScope Manage Stores - all permissions
461
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
462
+ * @permissionScope Manage eCommerce - all permissions
463
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
464
+ * @applicableIdentity APP
465
+ * @returns Updated ShippingOption.
466
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.UpdateShippingOption
467
+ */
468
+ export declare function updateShippingOption(_id: string | null, shippingOption: UpdateShippingOption): Promise<ShippingOption & ShippingOptionNonNullableFields>;
469
+ export interface UpdateShippingOption {
470
+ /**
471
+ * ShippingOption ID.
472
+ * @readonly
473
+ */
474
+ _id?: string | null;
475
+ /**
476
+ * Revision number, which increments by 1 each time the ShippingOption is updated.
477
+ * To prevent conflicting changes,
478
+ * the current revision must be passed when updating the ShippingOption.
479
+ *
480
+ * Ignored when creating a ShippingOption.
481
+ * @readonly
482
+ */
483
+ revision?: string | null;
484
+ /**
485
+ * Date and time the ShippingOption was created.
486
+ * @readonly
487
+ */
488
+ _createdDate?: Date | null;
489
+ /**
490
+ * Date and time the ShippingOption was last updated.
491
+ * @readonly
492
+ */
493
+ _updatedDate?: Date | null;
494
+ /** Associated delivery region id. */
495
+ deliveryRegionId?: string;
496
+ /** Delivery option configured for the ShippingOption */
497
+ title?: string | null;
498
+ estimateDeliveryTime?: string | null;
499
+ /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */
500
+ rates?: ConditionalRates[];
501
+ /** Data Extensions */
502
+ extendedFields?: ExtendedFields;
503
+ }
504
+ /**
505
+ * Deletes a ShippingOption.
506
+ * Deleting a ShippingOption permanently removes them from the ShippingOption List.
507
+ * @param shippingOptionId - Id of the ShippingOption to delete.
508
+ * @public
509
+ * @documentationMaturity preview
510
+ * @requiredField shippingOptionId
511
+ * @permissionId ECOM.SHIPPING_OPTION_DELETE
512
+ * @permissionScope Manage Stores - all permissions
513
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
514
+ * @permissionScope Manage eCommerce - all permissions
515
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
516
+ * @applicableIdentity APP
517
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.DeleteShippingOption
518
+ */
519
+ export declare function deleteShippingOption(shippingOptionId: string): Promise<void>;
520
+ /**
521
+ * Retrieves a list of ShippingOptions, given the provided [paging, filtering, and sorting][1].
522
+ *
523
+ * Up to 1,000 ShippingOptions can be returned per request.
524
+ *
525
+ * To learn how to query ShippingOptions, see [API Query Language][2].
526
+ *
527
+ * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
528
+ * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
529
+ * @public
530
+ * @documentationMaturity preview
531
+ * @permissionScope Manage Stores - all permissions
532
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
533
+ * @permissionScope Read eCommerce - all read permissions
534
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
535
+ * @permissionScope Manage eCommerce - all permissions
536
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
537
+ * @permissionId ECOM.SHIPPING_OPTION_READ
538
+ * @applicableIdentity APP
539
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.QueryShippingOptions
540
+ */
541
+ export declare function queryShippingOptions(): ShippingOptionsQueryBuilder;
542
+ interface QueryCursorResult {
543
+ cursors: Cursors;
544
+ hasNext: () => boolean;
545
+ hasPrev: () => boolean;
546
+ length: number;
547
+ pageSize: number;
548
+ }
549
+ export interface ShippingOptionsQueryResult extends QueryCursorResult {
550
+ items: ShippingOption[];
551
+ query: ShippingOptionsQueryBuilder;
552
+ next: () => Promise<ShippingOptionsQueryResult>;
553
+ prev: () => Promise<ShippingOptionsQueryResult>;
554
+ }
555
+ export interface ShippingOptionsQueryBuilder {
556
+ /** @param propertyName - Property whose value is compared with `value`.
557
+ * @param value - Value to compare against.
558
+ * @documentationMaturity preview
559
+ */
560
+ eq: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder;
561
+ /** @param propertyName - Property whose value is compared with `value`.
562
+ * @param value - Value to compare against.
563
+ * @documentationMaturity preview
564
+ */
565
+ ne: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder;
566
+ /** @param propertyName - Property whose value is compared with `string`.
567
+ * @param string - String to compare against. Case-insensitive.
568
+ * @documentationMaturity preview
569
+ */
570
+ startsWith: (propertyName: '_id' | 'deliveryRegionId', value: string) => ShippingOptionsQueryBuilder;
571
+ /** @param propertyName - Property whose value is compared with `values`.
572
+ * @param values - List of values to compare against.
573
+ * @documentationMaturity preview
574
+ */
575
+ hasSome: (propertyName: '_id' | 'deliveryRegionId', value: any[]) => ShippingOptionsQueryBuilder;
576
+ /** @documentationMaturity preview */
577
+ in: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder;
578
+ /** @documentationMaturity preview */
579
+ exists: (propertyName: '_id' | 'deliveryRegionId', value: boolean) => ShippingOptionsQueryBuilder;
580
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
581
+ * @documentationMaturity preview
582
+ */
583
+ ascending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippingOptionsQueryBuilder;
584
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
585
+ * @documentationMaturity preview
586
+ */
587
+ descending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippingOptionsQueryBuilder;
588
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
589
+ * @documentationMaturity preview
590
+ */
591
+ limit: (limit: number) => ShippingOptionsQueryBuilder;
592
+ /** @param cursor - A pointer to specific record
593
+ * @documentationMaturity preview
594
+ */
595
+ skipTo: (cursor: string) => ShippingOptionsQueryBuilder;
596
+ /** @documentationMaturity preview */
597
+ find: () => Promise<ShippingOptionsQueryResult>;
598
+ }
599
+ /**
600
+ * Updates extended fields of a ShippingOption without incrementing revision
601
+ * @param _id - ID of the entity to update.
602
+ * @param namespace - Identifier for the app whose extended fields are being updated.
603
+ * @public
604
+ * @documentationMaturity preview
605
+ * @requiredField _id
606
+ * @requiredField namespace
607
+ * @requiredField options
608
+ * @requiredField options.namespaceData
609
+ * @permissionId ECOM.SHIPPING_OPTION_UPDATE
610
+ * @permissionScope Manage Stores - all permissions
611
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
612
+ * @permissionScope Manage eCommerce - all permissions
613
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
614
+ * @applicableIdentity APP
615
+ * @fqn wix.ecom.delivery.v1.ShippingOptionService.UpdateExtendedFields
616
+ */
617
+ export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
618
+ export interface UpdateExtendedFieldsOptions {
619
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
620
+ namespaceData: Record<string, any> | null;
621
+ }
622
+ export {};