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