@wix/auto_sdk_ecom_tax-regions 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/billing-v1-tax-region-tax-regions.context.d.ts +23 -0
  11. package/build/cjs/src/billing-v1-tax-region-tax-regions.context.js +28 -0
  12. package/build/cjs/src/billing-v1-tax-region-tax-regions.context.js.map +1 -0
  13. package/build/cjs/src/billing-v1-tax-region-tax-regions.http.d.ts +44 -0
  14. package/build/cjs/src/billing-v1-tax-region-tax-regions.http.js +227 -0
  15. package/build/cjs/src/billing-v1-tax-region-tax-regions.http.js.map +1 -0
  16. package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.d.ts +23 -0
  17. package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.js +123 -0
  18. package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.js.map +1 -0
  19. package/build/cjs/src/billing-v1-tax-region-tax-regions.public.d.ts +77 -0
  20. package/build/cjs/src/billing-v1-tax-region-tax-regions.public.js +73 -0
  21. package/build/cjs/src/billing-v1-tax-region-tax-regions.public.js.map +1 -0
  22. package/build/cjs/src/billing-v1-tax-region-tax-regions.types.d.ts +446 -0
  23. package/build/cjs/src/billing-v1-tax-region-tax-regions.types.js +17 -0
  24. package/build/cjs/src/billing-v1-tax-region-tax-regions.types.js.map +1 -0
  25. package/build/cjs/src/billing-v1-tax-region-tax-regions.universal.d.ts +805 -0
  26. package/build/cjs/src/billing-v1-tax-region-tax-regions.universal.js +301 -0
  27. package/build/cjs/src/billing-v1-tax-region-tax-regions.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/billing-v1-tax-region-tax-regions.context.d.ts +23 -0
  39. package/build/es/src/billing-v1-tax-region-tax-regions.context.js +23 -0
  40. package/build/es/src/billing-v1-tax-region-tax-regions.context.js.map +1 -0
  41. package/build/es/src/billing-v1-tax-region-tax-regions.http.d.ts +44 -0
  42. package/build/es/src/billing-v1-tax-region-tax-regions.http.js +219 -0
  43. package/build/es/src/billing-v1-tax-region-tax-regions.http.js.map +1 -0
  44. package/build/es/src/billing-v1-tax-region-tax-regions.meta.d.ts +23 -0
  45. package/build/es/src/billing-v1-tax-region-tax-regions.meta.js +92 -0
  46. package/build/es/src/billing-v1-tax-region-tax-regions.meta.js.map +1 -0
  47. package/build/es/src/billing-v1-tax-region-tax-regions.public.d.ts +77 -0
  48. package/build/es/src/billing-v1-tax-region-tax-regions.public.js +63 -0
  49. package/build/es/src/billing-v1-tax-region-tax-regions.public.js.map +1 -0
  50. package/build/es/src/billing-v1-tax-region-tax-regions.types.d.ts +446 -0
  51. package/build/es/src/billing-v1-tax-region-tax-regions.types.js +14 -0
  52. package/build/es/src/billing-v1-tax-region-tax-regions.types.js.map +1 -0
  53. package/build/es/src/billing-v1-tax-region-tax-regions.universal.d.ts +805 -0
  54. package/build/es/src/billing-v1-tax-region-tax-regions.universal.js +270 -0
  55. package/build/es/src/billing-v1-tax-region-tax-regions.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/billing-v1-tax-region-tax-regions.context.d.ts +23 -0
  66. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.context.js +28 -0
  67. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.context.js.map +1 -0
  68. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.d.ts +44 -0
  69. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.js +227 -0
  70. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.js.map +1 -0
  71. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.d.ts +23 -0
  72. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.js +123 -0
  73. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.d.ts +77 -0
  75. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.js +73 -0
  76. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.js.map +1 -0
  77. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.d.ts +446 -0
  78. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.js +17 -0
  79. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.js.map +1 -0
  80. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.universal.d.ts +805 -0
  81. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.universal.js +301 -0
  82. package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.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/billing-v1-tax-region-tax-regions.context.d.ts +23 -0
  93. package/build/internal/es/src/billing-v1-tax-region-tax-regions.context.js +23 -0
  94. package/build/internal/es/src/billing-v1-tax-region-tax-regions.context.js.map +1 -0
  95. package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.d.ts +44 -0
  96. package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.js +219 -0
  97. package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.js.map +1 -0
  98. package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.d.ts +23 -0
  99. package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.js +92 -0
  100. package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.js.map +1 -0
  101. package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.d.ts +77 -0
  102. package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.js +63 -0
  103. package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.js.map +1 -0
  104. package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.d.ts +446 -0
  105. package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.js +14 -0
  106. package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.js.map +1 -0
  107. package/build/internal/es/src/billing-v1-tax-region-tax-regions.universal.d.ts +805 -0
  108. package/build/internal/es/src/billing-v1-tax-region-tax-regions.universal.js +270 -0
  109. package/build/internal/es/src/billing-v1-tax-region-tax-regions.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,805 @@
1
+ /**
2
+ * A tax region uses a location to define a specific tax treatment.
3
+ * A location is defined by `country` and `subdivision`. The tax region also
4
+ * dictates whether or not tax is included in the displayed price.
5
+ */
6
+ export interface TaxRegion {
7
+ /**
8
+ * Tax region ID.
9
+ * @format GUID
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /**
14
+ * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
15
+ * @format COUNTRY
16
+ * @minLength 2
17
+ */
18
+ country?: string;
19
+ /**
20
+ * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
21
+ * @maxLength 50
22
+ */
23
+ subdivision?: string;
24
+ /**
25
+ * The tax calculator ID to use to calculate tax for this region.
26
+ *
27
+ * Call List Tax Calculators to retrieve a list of available calculators for a site.
28
+ * @format GUID
29
+ */
30
+ appId?: string;
31
+ /** Whether tax is included in the price. */
32
+ taxIncludedInPrice?: boolean;
33
+ /**
34
+ * Revision number, which increments by 1 each time the tax region is updated.
35
+ * To prevent conflicting changes, the current revision must be passed when updating the tax region.
36
+ *
37
+ * Ignored when creating a tax region.
38
+ * @readonly
39
+ */
40
+ revision?: string | null;
41
+ /**
42
+ * Date and time the tax region was created.
43
+ * @readonly
44
+ */
45
+ _createdDate?: Date | null;
46
+ /**
47
+ * Date and time the tax region was last updated.
48
+ * @readonly
49
+ */
50
+ _updatedDate?: Date | null;
51
+ }
52
+ export interface CreateTaxRegionRequest {
53
+ /** Tax region to create. */
54
+ taxRegion: TaxRegion;
55
+ }
56
+ export interface CreateTaxRegionResponse {
57
+ /** Created tax region. */
58
+ taxRegion?: TaxRegion;
59
+ }
60
+ export interface ConflictErrorDetails {
61
+ /**
62
+ * Conflict details.
63
+ * @maxLength 1000
64
+ */
65
+ reasonForConflict?: string;
66
+ }
67
+ export interface BulkCreateTaxRegionRequest {
68
+ /**
69
+ * Tax regions to create.
70
+ * @minSize 1
71
+ * @maxSize 100
72
+ */
73
+ taxRegions?: TaxRegion[];
74
+ /**
75
+ * Whether to return the full tax region objects in the response.
76
+ *
77
+ * Default: `true`
78
+ */
79
+ returnEntity?: boolean;
80
+ }
81
+ export interface BulkCreateTaxRegionResponse {
82
+ /**
83
+ * Tax regions created by bulk action.
84
+ * @minSize 1
85
+ * @maxSize 100
86
+ */
87
+ results?: BulkCreateTaxRegionResult[];
88
+ /** Bulk action metadata. */
89
+ bulkActionMetadata?: BulkActionMetadata;
90
+ }
91
+ export interface BulkCreateTaxRegionResult {
92
+ /** Item metadata. */
93
+ itemMetadata?: ItemMetadata;
94
+ /**
95
+ * Tax region.
96
+ *
97
+ * This field is returned if the operation was successful and
98
+ * `returnEntity` is set to `true`.
99
+ */
100
+ item?: TaxRegion;
101
+ }
102
+ export interface ItemMetadata {
103
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
104
+ _id?: string | null;
105
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
106
+ originalIndex?: number;
107
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
108
+ success?: boolean;
109
+ /** Details about the error in case of failure. */
110
+ error?: ApplicationError;
111
+ }
112
+ export interface ApplicationError {
113
+ /** Error code. */
114
+ code?: string;
115
+ /** Description of the error. */
116
+ description?: string;
117
+ /** Data related to the error. */
118
+ data?: Record<string, any> | null;
119
+ }
120
+ export interface BulkActionMetadata {
121
+ /** Number of items that were successfully processed. */
122
+ totalSuccesses?: number;
123
+ /** Number of items that couldn't be processed. */
124
+ totalFailures?: number;
125
+ /** Number of failures without details because detailed failure threshold was exceeded. */
126
+ undetailedFailures?: number;
127
+ }
128
+ export interface GetTaxRegionRequest {
129
+ /**
130
+ * ID of the tax region to retrieve.
131
+ * @format GUID
132
+ */
133
+ taxRegionId: string;
134
+ }
135
+ export interface GetTaxRegionResponse {
136
+ /** Retrieved tax region. */
137
+ taxRegion?: TaxRegion;
138
+ }
139
+ export interface UpdateTaxRegionRequest {
140
+ /** Tax region info to update. */
141
+ taxRegion: TaxRegion;
142
+ }
143
+ export interface UpdateTaxRegionResponse {
144
+ /** Updated tax region. */
145
+ taxRegion?: TaxRegion;
146
+ }
147
+ export interface DeleteTaxRegionRequest {
148
+ /**
149
+ * ID of the tax region to delete.
150
+ * @format GUID
151
+ */
152
+ taxRegionId: string;
153
+ }
154
+ export interface DeleteTaxRegionResponse {
155
+ }
156
+ export interface QueryTaxRegionsRequest {
157
+ /** Query options. */
158
+ query?: CursorQuery;
159
+ }
160
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
161
+ /**
162
+ * Cursor paging options.
163
+ *
164
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
165
+ */
166
+ cursorPaging?: CursorPaging;
167
+ /**
168
+ * Filter object.
169
+ *
170
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
171
+ */
172
+ filter?: Record<string, any> | null;
173
+ /**
174
+ * Sort object.
175
+ *
176
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
177
+ * @maxSize 5
178
+ */
179
+ sort?: Sorting[];
180
+ }
181
+ /** @oneof */
182
+ export interface CursorQueryPagingMethodOneOf {
183
+ /**
184
+ * Cursor paging options.
185
+ *
186
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
187
+ */
188
+ cursorPaging?: CursorPaging;
189
+ }
190
+ export interface Sorting {
191
+ /**
192
+ * Name of the field to sort by.
193
+ * @maxLength 512
194
+ */
195
+ fieldName?: string;
196
+ /** Sort order. */
197
+ order?: SortOrder;
198
+ }
199
+ export declare enum SortOrder {
200
+ ASC = "ASC",
201
+ DESC = "DESC"
202
+ }
203
+ export interface CursorPaging {
204
+ /**
205
+ * Maximum number of items to return in the results.
206
+ * @max 100
207
+ */
208
+ limit?: number | null;
209
+ /**
210
+ * Pointer to the next or previous page in the list of results.
211
+ *
212
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
213
+ * Not relevant for the first request.
214
+ * @maxLength 16000
215
+ */
216
+ cursor?: string | null;
217
+ }
218
+ export interface QueryTaxRegionsResponse {
219
+ /** Retrieved tax regions. */
220
+ taxRegions?: TaxRegion[];
221
+ /** Paging metadata. */
222
+ pagingMetadata?: CursorPagingMetadata;
223
+ }
224
+ export interface CursorPagingMetadata {
225
+ /** Number of items returned in current page. */
226
+ count?: number | null;
227
+ /** Cursor strings that point to the next page, previous page, or both. */
228
+ cursors?: Cursors;
229
+ /**
230
+ * Whether there are more pages to retrieve following the current page.
231
+ *
232
+ * + `true`: Another page of results can be retrieved.
233
+ * + `false`: This is the last page.
234
+ */
235
+ hasNext?: boolean | null;
236
+ }
237
+ export interface Cursors {
238
+ /**
239
+ * Cursor string pointing to the next page in the list of results.
240
+ * @maxLength 16000
241
+ */
242
+ next?: string | null;
243
+ /**
244
+ * Cursor pointing to the previous page in the list of results.
245
+ * @maxLength 16000
246
+ */
247
+ prev?: string | null;
248
+ }
249
+ export interface CreateOrGetTaxRegionWithoutValidationRequest {
250
+ /** Tax region to create. */
251
+ taxRegion?: TaxRegion;
252
+ }
253
+ export interface CreateOrGetTaxRegionWithoutValidationResponse {
254
+ /** Created tax region. */
255
+ taxRegion?: TaxRegion;
256
+ }
257
+ export interface DeleteTaxRegionWithoutDomainEventsRequest {
258
+ /**
259
+ * ID of the tax region to delete.
260
+ * @format GUID
261
+ */
262
+ taxRegionId?: string;
263
+ }
264
+ export interface DeleteTaxRegionWithoutDomainEventsResponse {
265
+ }
266
+ export interface BulkRestoreTaxRegionsRequest {
267
+ /**
268
+ * Tax region IDs to restore.
269
+ * @format GUID
270
+ * @minSize 1
271
+ * @maxSize 200
272
+ */
273
+ taxRegionIds?: string[];
274
+ }
275
+ export interface BulkRestoreTaxRegionsResponse {
276
+ /**
277
+ * Restored tax regions result
278
+ * @minSize 1
279
+ * @maxSize 200
280
+ */
281
+ results?: BulkRestoreTaxRegionsResult[];
282
+ }
283
+ export interface BulkRestoreTaxRegionsResult {
284
+ itemMetadata?: ItemMetadata;
285
+ }
286
+ export interface DomainEvent extends DomainEventBodyOneOf {
287
+ createdEvent?: EntityCreatedEvent;
288
+ updatedEvent?: EntityUpdatedEvent;
289
+ deletedEvent?: EntityDeletedEvent;
290
+ actionEvent?: ActionEvent;
291
+ /**
292
+ * Unique event ID.
293
+ * Allows clients to ignore duplicate webhooks.
294
+ */
295
+ _id?: string;
296
+ /**
297
+ * Assumes actions are also always typed to an entity_type
298
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
299
+ */
300
+ entityFqdn?: string;
301
+ /**
302
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
303
+ * This is although the created/updated/deleted notion is duplication of the oneof types
304
+ * Example: created/updated/deleted/started/completed/email_opened
305
+ */
306
+ slug?: string;
307
+ /** ID of the entity associated with the event. */
308
+ entityId?: string;
309
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
310
+ eventTime?: Date | null;
311
+ /**
312
+ * Whether the event was triggered as a result of a privacy regulation application
313
+ * (for example, GDPR).
314
+ */
315
+ triggeredByAnonymizeRequest?: boolean | null;
316
+ /** If present, indicates the action that triggered the event. */
317
+ originatedFrom?: string | null;
318
+ /**
319
+ * A sequence number defining the order of updates to the underlying entity.
320
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
321
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
322
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
323
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
324
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
325
+ */
326
+ entityEventSequence?: string | null;
327
+ }
328
+ /** @oneof */
329
+ export interface DomainEventBodyOneOf {
330
+ createdEvent?: EntityCreatedEvent;
331
+ updatedEvent?: EntityUpdatedEvent;
332
+ deletedEvent?: EntityDeletedEvent;
333
+ actionEvent?: ActionEvent;
334
+ }
335
+ export interface EntityCreatedEvent {
336
+ entity?: string;
337
+ }
338
+ export interface RestoreInfo {
339
+ deletedDate?: Date | null;
340
+ }
341
+ export interface EntityUpdatedEvent {
342
+ /**
343
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
344
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
345
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
346
+ */
347
+ currentEntity?: string;
348
+ }
349
+ export interface EntityDeletedEvent {
350
+ /** Entity that was deleted */
351
+ deletedEntity?: string | null;
352
+ }
353
+ export interface ActionEvent {
354
+ body?: string;
355
+ }
356
+ export interface MessageEnvelope {
357
+ /**
358
+ * App instance ID.
359
+ * @format GUID
360
+ */
361
+ instanceId?: string | null;
362
+ /**
363
+ * Event type.
364
+ * @maxLength 150
365
+ */
366
+ eventType?: string;
367
+ /** The identification type and identity data. */
368
+ identity?: IdentificationData;
369
+ /** Stringify payload. */
370
+ data?: string;
371
+ }
372
+ export interface IdentificationData extends IdentificationDataIdOneOf {
373
+ /**
374
+ * ID of a site visitor that has not logged in to the site.
375
+ * @format GUID
376
+ */
377
+ anonymousVisitorId?: string;
378
+ /**
379
+ * ID of a site visitor that has logged in to the site.
380
+ * @format GUID
381
+ */
382
+ memberId?: string;
383
+ /**
384
+ * ID of a Wix user (site owner, contributor, etc.).
385
+ * @format GUID
386
+ */
387
+ wixUserId?: string;
388
+ /**
389
+ * ID of an app.
390
+ * @format GUID
391
+ */
392
+ appId?: string;
393
+ /** @readonly */
394
+ identityType?: WebhookIdentityType;
395
+ }
396
+ /** @oneof */
397
+ export interface IdentificationDataIdOneOf {
398
+ /**
399
+ * ID of a site visitor that has not logged in to the site.
400
+ * @format GUID
401
+ */
402
+ anonymousVisitorId?: string;
403
+ /**
404
+ * ID of a site visitor that has logged in to the site.
405
+ * @format GUID
406
+ */
407
+ memberId?: string;
408
+ /**
409
+ * ID of a Wix user (site owner, contributor, etc.).
410
+ * @format GUID
411
+ */
412
+ wixUserId?: string;
413
+ /**
414
+ * ID of an app.
415
+ * @format GUID
416
+ */
417
+ appId?: string;
418
+ }
419
+ export declare enum WebhookIdentityType {
420
+ UNKNOWN = "UNKNOWN",
421
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
422
+ MEMBER = "MEMBER",
423
+ WIX_USER = "WIX_USER",
424
+ APP = "APP"
425
+ }
426
+ export interface TaxRegionNonNullableFields {
427
+ country: string;
428
+ subdivision: string;
429
+ appId: string;
430
+ taxIncludedInPrice: boolean;
431
+ }
432
+ export interface CreateTaxRegionResponseNonNullableFields {
433
+ taxRegion?: TaxRegionNonNullableFields;
434
+ }
435
+ export interface GetTaxRegionResponseNonNullableFields {
436
+ taxRegion?: TaxRegionNonNullableFields;
437
+ }
438
+ export interface UpdateTaxRegionResponseNonNullableFields {
439
+ taxRegion?: TaxRegionNonNullableFields;
440
+ }
441
+ export interface QueryTaxRegionsResponseNonNullableFields {
442
+ taxRegions: TaxRegionNonNullableFields[];
443
+ }
444
+ export interface BaseEventMetadata {
445
+ /**
446
+ * App instance ID.
447
+ * @format GUID
448
+ */
449
+ instanceId?: string | null;
450
+ /**
451
+ * Event type.
452
+ * @maxLength 150
453
+ */
454
+ eventType?: string;
455
+ /** The identification type and identity data. */
456
+ identity?: IdentificationData;
457
+ }
458
+ export interface EventMetadata extends BaseEventMetadata {
459
+ /**
460
+ * Unique event ID.
461
+ * Allows clients to ignore duplicate webhooks.
462
+ */
463
+ _id?: string;
464
+ /**
465
+ * Assumes actions are also always typed to an entity_type
466
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
467
+ */
468
+ entityFqdn?: string;
469
+ /**
470
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
471
+ * This is although the created/updated/deleted notion is duplication of the oneof types
472
+ * Example: created/updated/deleted/started/completed/email_opened
473
+ */
474
+ slug?: string;
475
+ /** ID of the entity associated with the event. */
476
+ entityId?: string;
477
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
478
+ eventTime?: Date | null;
479
+ /**
480
+ * Whether the event was triggered as a result of a privacy regulation application
481
+ * (for example, GDPR).
482
+ */
483
+ triggeredByAnonymizeRequest?: boolean | null;
484
+ /** If present, indicates the action that triggered the event. */
485
+ originatedFrom?: string | null;
486
+ /**
487
+ * A sequence number defining the order of updates to the underlying entity.
488
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
489
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
490
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
491
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
492
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
493
+ */
494
+ entityEventSequence?: string | null;
495
+ }
496
+ export interface TaxRegionCreatedEnvelope {
497
+ entity: TaxRegion;
498
+ metadata: EventMetadata;
499
+ }
500
+ /** @permissionScope Manage Stores - all permissions
501
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
502
+ * @permissionScope Manage Restaurants - all permissions
503
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
504
+ * @permissionScope Manage eCommerce - all permissions
505
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
506
+ * @permissionScope Manage Orders
507
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
508
+ * @permissionId BILLING.TAX_REGION_READ
509
+ * @webhook
510
+ * @eventType wix.billing.v1.tax_region_created
511
+ * @serviceIdentifier wix.billing.v1.TaxRegionsService
512
+ * @slug created
513
+ * @documentationMaturity preview
514
+ */
515
+ export declare function onTaxRegionCreated(handler: (event: TaxRegionCreatedEnvelope) => void | Promise<void>): void;
516
+ export interface TaxRegionDeletedEnvelope {
517
+ metadata: EventMetadata;
518
+ }
519
+ /**
520
+ * Triggered when a tax region is deleted.
521
+ * @permissionScope Manage Stores - all permissions
522
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
523
+ * @permissionScope Manage Restaurants - all permissions
524
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
525
+ * @permissionScope Manage eCommerce - all permissions
526
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
527
+ * @permissionScope Manage Orders
528
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
529
+ * @permissionId BILLING.TAX_REGION_READ
530
+ * @webhook
531
+ * @eventType wix.billing.v1.tax_region_deleted
532
+ * @serviceIdentifier wix.billing.v1.TaxRegionsService
533
+ * @slug deleted
534
+ * @documentationMaturity preview
535
+ */
536
+ export declare function onTaxRegionDeleted(handler: (event: TaxRegionDeletedEnvelope) => void | Promise<void>): void;
537
+ export interface TaxRegionUpdatedEnvelope {
538
+ entity: TaxRegion;
539
+ metadata: EventMetadata;
540
+ }
541
+ /**
542
+ * Triggered when a tax region is updated.
543
+ * @permissionScope Manage Stores - all permissions
544
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
545
+ * @permissionScope Manage Restaurants - all permissions
546
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
547
+ * @permissionScope Manage eCommerce - all permissions
548
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
549
+ * @permissionScope Manage Orders
550
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
551
+ * @permissionId BILLING.TAX_REGION_READ
552
+ * @webhook
553
+ * @eventType wix.billing.v1.tax_region_updated
554
+ * @serviceIdentifier wix.billing.v1.TaxRegionsService
555
+ * @slug updated
556
+ * @documentationMaturity preview
557
+ */
558
+ export declare function onTaxRegionUpdated(handler: (event: TaxRegionUpdatedEnvelope) => void | Promise<void>): void;
559
+ /**
560
+ * Creates a tax region.
561
+ *
562
+ * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.
563
+ *
564
+ * Wix uses tax regions to calculate tax.
565
+ * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->
566
+ * @param taxRegion - Tax region to create.
567
+ * @public
568
+ * @documentationMaturity preview
569
+ * @requiredField taxRegion
570
+ * @requiredField taxRegion.appId
571
+ * @requiredField taxRegion.country
572
+ * @requiredField taxRegion.taxIncludedInPrice
573
+ * @permissionId BILLING.TAX_REGION_CREATE
574
+ * @permissionScope Manage Stores - all permissions
575
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
576
+ * @permissionScope Manage Restaurants - all permissions
577
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
578
+ * @permissionScope Manage Orders
579
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
580
+ * @applicableIdentity APP
581
+ * @returns Created tax region.
582
+ * @fqn wix.billing.v1.TaxRegionsService.CreateTaxRegion
583
+ */
584
+ export declare function createTaxRegion(taxRegion: TaxRegion): Promise<TaxRegion & TaxRegionNonNullableFields>;
585
+ /**
586
+ * Retrieves a tax region.
587
+ * @param taxRegionId - ID of the tax region to retrieve.
588
+ * @public
589
+ * @documentationMaturity preview
590
+ * @requiredField taxRegionId
591
+ * @permissionId BILLING.TAX_REGION_READ
592
+ * @permissionScope Manage Stores - all permissions
593
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
594
+ * @permissionScope Manage Restaurants - all permissions
595
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
596
+ * @permissionScope Manage eCommerce - all permissions
597
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
598
+ * @permissionScope Manage Orders
599
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
600
+ * @applicableIdentity APP
601
+ * @applicableIdentity VISITOR
602
+ * @returns Retrieved tax region.
603
+ * @fqn wix.billing.v1.TaxRegionsService.GetTaxRegion
604
+ */
605
+ export declare function getTaxRegion(taxRegionId: string): Promise<TaxRegion & TaxRegionNonNullableFields>;
606
+ /**
607
+ * Updates a tax region.
608
+ *
609
+ * Each time the tax region is updated, `revision` increments by 1.
610
+ * The current `revision` must be passed when updating the tax region.
611
+ * This ensures you're working with the latest tax region and prevents
612
+ * unintended overwrites.
613
+ * @param _id - Tax region ID.
614
+ * @public
615
+ * @documentationMaturity preview
616
+ * @requiredField _id
617
+ * @requiredField taxRegion
618
+ * @requiredField taxRegion.revision
619
+ * @param taxRegion - Tax region info.
620
+ * @permissionId BILLING.TAX_REGION_UPDATE
621
+ * @permissionScope Manage Stores - all permissions
622
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
623
+ * @permissionScope Manage Restaurants - all permissions
624
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
625
+ * @permissionScope Manage Orders
626
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
627
+ * @applicableIdentity APP
628
+ * @returns Updated tax region.
629
+ * @fqn wix.billing.v1.TaxRegionsService.UpdateTaxRegion
630
+ */
631
+ export declare function updateTaxRegion(_id: string | null, taxRegion: UpdateTaxRegion): Promise<TaxRegion & TaxRegionNonNullableFields>;
632
+ export interface UpdateTaxRegion {
633
+ /**
634
+ * Tax region ID.
635
+ * @format GUID
636
+ * @readonly
637
+ */
638
+ _id?: string | null;
639
+ /**
640
+ * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
641
+ * @format COUNTRY
642
+ * @minLength 2
643
+ */
644
+ country?: string;
645
+ /**
646
+ * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
647
+ * @maxLength 50
648
+ */
649
+ subdivision?: string;
650
+ /**
651
+ * The tax calculator ID to use to calculate tax for this region.
652
+ *
653
+ * Call List Tax Calculators to retrieve a list of available calculators for a site.
654
+ * @format GUID
655
+ */
656
+ appId?: string;
657
+ /** Whether tax is included in the price. */
658
+ taxIncludedInPrice?: boolean;
659
+ /**
660
+ * Revision number, which increments by 1 each time the tax region is updated.
661
+ * To prevent conflicting changes, the current revision must be passed when updating the tax region.
662
+ *
663
+ * Ignored when creating a tax region.
664
+ * @readonly
665
+ */
666
+ revision?: string | null;
667
+ /**
668
+ * Date and time the tax region was created.
669
+ * @readonly
670
+ */
671
+ _createdDate?: Date | null;
672
+ /**
673
+ * Date and time the tax region was last updated.
674
+ * @readonly
675
+ */
676
+ _updatedDate?: Date | null;
677
+ }
678
+ /**
679
+ * Deletes a tax region.
680
+ *
681
+ * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.
682
+ * @param taxRegionId - ID of the tax region to delete.
683
+ * @public
684
+ * @documentationMaturity preview
685
+ * @requiredField taxRegionId
686
+ * @permissionId BILLING.TAX_REGION_DELETE
687
+ * @permissionScope Manage Stores - all permissions
688
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
689
+ * @permissionScope Manage Restaurants - all permissions
690
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
691
+ * @permissionScope Manage Orders
692
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
693
+ * @applicableIdentity APP
694
+ * @fqn wix.billing.v1.TaxRegionsService.DeleteTaxRegion
695
+ */
696
+ export declare function deleteTaxRegion(taxRegionId: string): Promise<void>;
697
+ /**
698
+ * Creates a query to retrieve a list of tax regions.
699
+ *
700
+ * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` object.
701
+ *
702
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
703
+ *
704
+ * You can refine the query by chaining `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.
705
+ *
706
+ * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:
707
+ * + `ascending("_id")`
708
+ *
709
+ * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending("country")` and then `ascending("subdivision")`, the results are sorted first by the `"country"`, and then, if there are multiple results with the same `"country"`, the items are sorted by `"subdivision"`.
710
+ *
711
+ * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.
712
+ * @public
713
+ * @documentationMaturity preview
714
+ * @permissionScope Manage Stores - all permissions
715
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
716
+ * @permissionScope Manage Restaurants - all permissions
717
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
718
+ * @permissionScope Manage eCommerce - all permissions
719
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
720
+ * @permissionScope Manage Orders
721
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
722
+ * @permissionId BILLING.TAX_REGION_READ
723
+ * @applicableIdentity APP
724
+ * @applicableIdentity VISITOR
725
+ * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions
726
+ */
727
+ export declare function queryTaxRegions(): TaxRegionsQueryBuilder;
728
+ interface QueryCursorResult {
729
+ cursors: Cursors;
730
+ hasNext: () => boolean;
731
+ hasPrev: () => boolean;
732
+ length: number;
733
+ pageSize: number;
734
+ }
735
+ export interface TaxRegionsQueryResult extends QueryCursorResult {
736
+ items: TaxRegion[];
737
+ query: TaxRegionsQueryBuilder;
738
+ next: () => Promise<TaxRegionsQueryResult>;
739
+ prev: () => Promise<TaxRegionsQueryResult>;
740
+ }
741
+ export interface TaxRegionsQueryBuilder {
742
+ /** @param propertyName - Property whose value is compared with `value`.
743
+ * @param value - Value to compare against.
744
+ * @documentationMaturity preview
745
+ */
746
+ eq: (propertyName: '_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
747
+ /** @param propertyName - Property whose value is compared with `value`.
748
+ * @param value - Value to compare against.
749
+ * @documentationMaturity preview
750
+ */
751
+ ne: (propertyName: '_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
752
+ /** @param propertyName - Property whose value is compared with `value`.
753
+ * @param value - Value to compare against.
754
+ * @documentationMaturity preview
755
+ */
756
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
757
+ /** @param propertyName - Property whose value is compared with `value`.
758
+ * @param value - Value to compare against.
759
+ * @documentationMaturity preview
760
+ */
761
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
762
+ /** @param propertyName - Property whose value is compared with `value`.
763
+ * @param value - Value to compare against.
764
+ * @documentationMaturity preview
765
+ */
766
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
767
+ /** @param propertyName - Property whose value is compared with `value`.
768
+ * @param value - Value to compare against.
769
+ * @documentationMaturity preview
770
+ */
771
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
772
+ /** @param propertyName - Property whose value is compared with `string`.
773
+ * @param string - String to compare against. Case-insensitive.
774
+ * @documentationMaturity preview
775
+ */
776
+ startsWith: (propertyName: '_id' | 'country' | 'subdivision' | 'appId', value: string) => TaxRegionsQueryBuilder;
777
+ /** @param propertyName - Property whose value is compared with `values`.
778
+ * @param values - List of values to compare against.
779
+ * @documentationMaturity preview
780
+ */
781
+ hasSome: (propertyName: '_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate', value: any[]) => TaxRegionsQueryBuilder;
782
+ /** @documentationMaturity preview */
783
+ in: (propertyName: '_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate', value: any) => TaxRegionsQueryBuilder;
784
+ /** @documentationMaturity preview */
785
+ exists: (propertyName: '_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate', value: boolean) => TaxRegionsQueryBuilder;
786
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
787
+ * @documentationMaturity preview
788
+ */
789
+ ascending: (...propertyNames: Array<'_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate'>) => TaxRegionsQueryBuilder;
790
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
791
+ * @documentationMaturity preview
792
+ */
793
+ descending: (...propertyNames: Array<'_id' | 'country' | 'subdivision' | 'appId' | '_createdDate' | '_updatedDate'>) => TaxRegionsQueryBuilder;
794
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
795
+ * @documentationMaturity preview
796
+ */
797
+ limit: (limit: number) => TaxRegionsQueryBuilder;
798
+ /** @param cursor - A pointer to specific record
799
+ * @documentationMaturity preview
800
+ */
801
+ skipTo: (cursor: string) => TaxRegionsQueryBuilder;
802
+ /** @documentationMaturity preview */
803
+ find: () => Promise<TaxRegionsQueryResult>;
804
+ }
805
+ export {};