@wix/auto_sdk_billing_tax-calculation 1.0.1 → 1.0.3

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 (17) hide show
  1. package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts +221 -48
  2. package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +1 -1
  3. package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +240 -52
  4. package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map +1 -1
  5. package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts +221 -48
  6. package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +1 -1
  7. package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +240 -52
  8. package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map +1 -1
  9. package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts +221 -48
  10. package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +1 -1
  11. package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +240 -52
  12. package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map +1 -1
  13. package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts +221 -48
  14. package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +1 -1
  15. package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +240 -52
  16. package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map +1 -1
  17. package/package.json +2 -2
@@ -1,44 +1,99 @@
1
1
  export interface TaxCalculationGateway {
2
+ /** @format GUID */
2
3
  id?: string | null;
3
4
  }
4
5
  export interface CalculateTaxRequest {
5
- /** Optional ID of the entity that tax is being calculated for. For example, a cart ID. */
6
+ /**
7
+ * Optional ID of the entity that tax is being calculated for. For example, a cart ID.
8
+ * @format GUID
9
+ * @immutable
10
+ */
6
11
  externalId?: string | null;
7
- /** 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */
12
+ /**
13
+ * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
14
+ * @format CURRENCY
15
+ */
8
16
  currency?: string;
9
- /** Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`. */
17
+ /**
18
+ * Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`.
19
+ * @minSize 1
20
+ * @maxSize 3
21
+ */
10
22
  addresses: Address[];
11
- /** Line items to calculate tax for. */
23
+ /**
24
+ * Line items to calculate tax for.
25
+ * @minSize 1
26
+ * @maxSize 300
27
+ */
12
28
  lineItems: LineItem[];
13
29
  }
14
30
  /** Wix common address format for physical address to use if you plan to store addresses in your service. */
15
31
  export interface Address {
16
- /** 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
32
+ /**
33
+ * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
34
+ * @format COUNTRY
35
+ */
17
36
  country?: string | null;
18
- /** Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */
37
+ /**
38
+ * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
39
+ * @maxLength 50
40
+ */
19
41
  subdivision?: string | null;
20
- /** City name. */
42
+ /**
43
+ * City name.
44
+ * @maxLength 100
45
+ */
21
46
  city?: string | null;
22
- /** Postal or zip code. */
47
+ /**
48
+ * Postal or zip code.
49
+ * @maxLength 50
50
+ */
23
51
  postalCode?: string | null;
24
- /** Main address line, usually street and number as free text. */
52
+ /**
53
+ * Main address line, usually street and number as free text.
54
+ * @maxLength 200
55
+ */
25
56
  addressLine?: string | null;
26
- /** Free text providing more detailed address information, such as apartment, suite, or floor. */
57
+ /**
58
+ * Free text providing more detailed address information, such as apartment, suite, or floor.
59
+ * @maxLength 200
60
+ */
27
61
  addressLine2?: string | null;
28
62
  }
29
63
  /** Line items to calculate tax for. */
30
64
  export interface LineItem {
31
- /** Line item ID. */
65
+ /**
66
+ * Line item ID.
67
+ * @minLength 1
68
+ * @maxLength 100
69
+ */
32
70
  id?: string;
33
- /** Line item name to display. */
71
+ /**
72
+ * Line item name to display.
73
+ * @maxLength 250
74
+ */
34
75
  itemName?: string | null;
35
- /** Line item quantity. */
76
+ /**
77
+ * Line item quantity.
78
+ * @min 1
79
+ * @max 100000
80
+ */
36
81
  quantity?: number;
37
- /** Line item price. */
82
+ /**
83
+ * Line item price.
84
+ * @format DECIMAL_VALUE
85
+ * @decimalValue options { lte:1000000000000000 }
86
+ */
38
87
  price?: string;
39
- /** Stock keeping unit for this line item. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
88
+ /**
89
+ * Stock keeping unit for this line item. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
90
+ * @maxLength 40
91
+ */
40
92
  itemCode?: string | null;
41
- /** Tax group ID for this line item. If not provided, the default tax group applies. */
93
+ /**
94
+ * Tax group ID for this line item. If not provided, the default tax group applies.
95
+ * @format GUID
96
+ */
42
97
  taxGroupId?: string | null;
43
98
  /**
44
99
  * ID of the app providing the catalog for this line item.
@@ -49,6 +104,7 @@ export interface LineItem {
49
104
  * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
50
105
  * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
51
106
  * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
107
+ * @format GUID
52
108
  */
53
109
  appId?: string | null;
54
110
  /** Whether tax is included in the price. */
@@ -87,32 +143,67 @@ export interface MultipleAddresses {
87
143
  destination?: number;
88
144
  }
89
145
  export interface CalculateTaxResponse {
90
- /** Optional ID of the entity that tax is being calculated for. For example, a cart ID. */
146
+ /**
147
+ * Optional ID of the entity that tax is being calculated for. For example, a cart ID.
148
+ * @format GUID
149
+ * @immutable
150
+ */
91
151
  externalId?: string | null;
92
- /** 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */
152
+ /**
153
+ * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
154
+ * @format CURRENCY
155
+ */
93
156
  currency?: string;
94
- /** Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`. */
157
+ /**
158
+ * Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`.
159
+ * @minSize 1
160
+ * @maxSize 3
161
+ */
95
162
  addresses?: Address[];
96
163
  /** Summary of the tax calculated. */
97
164
  taxSummary?: TaxSummary;
98
- /** Details of each tax applied to each line item. */
165
+ /**
166
+ * Details of each tax applied to each line item.
167
+ * @minSize 1
168
+ * @maxSize 300
169
+ */
99
170
  lineItemTaxDetails?: LineItemTaxDetails[];
100
- /** Errors that occurred during the tax calculation. */
171
+ /**
172
+ * Errors that occurred during the tax calculation.
173
+ * @maxSize 100
174
+ */
101
175
  errors?: ApplicationError[];
102
176
  }
103
177
  export interface TaxSummary {
104
- /** Total price for all line items. */
178
+ /**
179
+ * Total price for all line items.
180
+ * @format DECIMAL_VALUE
181
+ * @decimalValue options { maxScale:4 }
182
+ */
105
183
  totalAmount?: string;
106
184
  /**
107
185
  * Total amount of tax calculated for all line items.
108
186
  * Note that due to rounding, `totalTax` may not equal the sum of `lineItemTaxDetails.taxSummary.taxAmount`.
187
+ * @format DECIMAL_VALUE
188
+ * @decimalValue options { maxScale:4 }
109
189
  */
110
190
  totalTax?: string;
111
- /** Total taxable amount for all line items. */
191
+ /**
192
+ * Total taxable amount for all line items.
193
+ * @format DECIMAL_VALUE
194
+ * @decimalValue options { maxScale:4 }
195
+ */
112
196
  totalTaxableAmount?: string;
113
- /** Total amount of `totalTax` that is included in price. Applies to line items with `taxIncludedInPrice` set to `true`. */
197
+ /**
198
+ * Total amount of `totalTax` that is included in price. Applies to line items with `taxIncludedInPrice` set to `true`.
199
+ * @format DECIMAL_VALUE
200
+ * @decimalValue options { maxScale:4 }
201
+ */
114
202
  totalTaxIncludedInPrice?: string;
115
- /** Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdictionType"`, `"taxType"`, `"taxName"` and `"rate"`. */
203
+ /**
204
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdictionType"`, `"taxType"`, `"taxName"` and `"rate"`.
205
+ * @maxSize 50
206
+ */
116
207
  aggregatedTaxBreakdown?: AggregatedTaxBreakdown[];
117
208
  }
118
209
  /**
@@ -124,17 +215,33 @@ export interface TaxSummary {
124
215
  * then the tax rate will be remain 10% but tax amount in the breakdown will be 5$ instead of 10$.
125
216
  */
126
217
  export interface AggregatedTaxBreakdown {
127
- /** Name of the tax that was calculated. */
218
+ /**
219
+ * Name of the tax that was calculated.
220
+ * @maxLength 200
221
+ */
128
222
  taxName?: string;
129
- /** Type of tax that was calculated. */
223
+ /**
224
+ * Type of tax that was calculated.
225
+ * @maxLength 200
226
+ */
130
227
  taxType?: string;
131
- /** Jurisdiction that taxes were calculated for. */
228
+ /**
229
+ * Jurisdiction that taxes were calculated for.
230
+ * @maxLength 200
231
+ */
132
232
  jurisdiction?: string;
133
233
  /** Type of jurisdiction that taxes were calculated for. */
134
234
  jurisdictionType?: JurisdictionType;
135
- /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`. */
235
+ /**
236
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
237
+ * @decimalValue options { gte:0, maxScale:6 }
238
+ */
136
239
  rate?: string;
137
- /** Total amount of this tax for this jurisdiction. */
240
+ /**
241
+ * Total amount of this tax for this jurisdiction.
242
+ * @format DECIMAL_VALUE
243
+ * @decimalValue options { maxScale:4 }
244
+ */
138
245
  aggregatedTaxAmount?: string;
139
246
  }
140
247
  /** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"County"`, `"City"`, `"Special"`, etc. */
@@ -148,13 +255,27 @@ export declare enum JurisdictionType {
148
255
  }
149
256
  /** Tax details for a specific line item. */
150
257
  export interface LineItemTaxDetails {
151
- /** Line item ID. */
258
+ /**
259
+ * Line item ID.
260
+ * @minLength 1
261
+ * @maxLength 100
262
+ */
152
263
  id?: string;
153
- /** Line item name to display. */
264
+ /**
265
+ * Line item name to display.
266
+ * @maxLength 250
267
+ */
154
268
  itemName?: string | null;
155
- /** Line item quantity. */
269
+ /**
270
+ * Line item quantity.
271
+ * @min 1
272
+ * @max 100000
273
+ */
156
274
  quantity?: number;
157
- /** Array of each tax applied, grouped by `jurisdiction`. */
275
+ /**
276
+ * Array of each tax applied, grouped by `jurisdiction`.
277
+ * @maxSize 7
278
+ */
158
279
  taxBreakdown?: TaxBreakdown[];
159
280
  /** Summary of this line item's total price and tax. */
160
281
  taxSummary?: LineItemTaxSummary;
@@ -165,19 +286,44 @@ export interface LineItemTaxDetails {
165
286
  }
166
287
  /** A detailed description of all the tax authorities applied on this item. */
167
288
  export interface TaxBreakdown {
168
- /** Jurisdiction that taxes were calculated for. */
289
+ /**
290
+ * Jurisdiction that taxes were calculated for.
291
+ * @maxLength 200
292
+ */
169
293
  jurisdiction?: string | null;
170
- /** Non-taxable amount of the price. */
294
+ /**
295
+ * Non-taxable amount of the price.
296
+ * @format DECIMAL_VALUE
297
+ * @decimalValue options { maxScale:4, gte:0 }
298
+ */
171
299
  nonTaxableAmount?: string | null;
172
- /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`. */
300
+ /**
301
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
302
+ * @format DECIMAL_VALUE
303
+ * @decimalValue options { maxScale:6, gte:0 }
304
+ */
173
305
  rate?: string | null;
174
- /** Amount of this tax calculated for this jurisdiction. */
306
+ /**
307
+ * Amount of this tax calculated for this jurisdiction.
308
+ * @format DECIMAL_VALUE
309
+ * @decimalValue options { maxScale:4 }
310
+ */
175
311
  taxAmount?: string | null;
176
- /** Taxable amount of the price. */
312
+ /**
313
+ * Taxable amount of the price.
314
+ * @format DECIMAL_VALUE
315
+ * @decimalValue options { maxScale:4, gte:0 }
316
+ */
177
317
  taxableAmount?: string | null;
178
- /** Type of tax that was calculated. For example, `"Sales Tax"`, `"Income Tax"`, `"Value Added Tax"`, etc. */
318
+ /**
319
+ * Type of tax that was calculated. For example, `"Sales Tax"`, `"Income Tax"`, `"Value Added Tax"`, etc.
320
+ * @maxLength 200
321
+ */
179
322
  taxType?: string | null;
180
- /** Name of the tax that was calculated. For example, `"NY State Sales Tax"`, `"Quebec GST"`, etc. */
323
+ /**
324
+ * Name of the tax that was calculated. For example, `"NY State Sales Tax"`, `"Quebec GST"`, etc.
325
+ * @maxLength 200
326
+ */
181
327
  taxName?: string | null;
182
328
  /** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"Çounty"`, `"City"`, `"Special"`, etc. */
183
329
  jurisdictionType?: JurisdictionType;
@@ -186,13 +332,26 @@ export interface LineItemTaxSummary {
186
332
  /**
187
333
  * Total price for this line item.
188
334
  * To determine the price for each individual unit of this line item, divide by `quantity`.
335
+ * @format DECIMAL_VALUE
336
+ * @decimalValue options { lte:1000000000000000 }
189
337
  */
190
338
  fullPrice?: string | null;
191
- /** Total amount of tax calculated for this line item. */
339
+ /**
340
+ * Total amount of tax calculated for this line item.
341
+ * @format DECIMAL_VALUE
342
+ * @decimalValue options { maxScale:4 }
343
+ */
192
344
  taxAmount?: string;
193
- /** Total taxable amount for this line item. */
345
+ /**
346
+ * Total taxable amount for this line item.
347
+ * @format DECIMAL_VALUE
348
+ * @decimalValue options { maxScale:4 }
349
+ */
194
350
  taxableAmount?: string;
195
- /** ID of the calculator app that calculated tax for this line item. */
351
+ /**
352
+ * ID of the calculator app that calculated tax for this line item.
353
+ * @maxLength 50
354
+ */
196
355
  appId?: string | null;
197
356
  }
198
357
  export interface ApplicationError {
@@ -206,15 +365,29 @@ export interface ApplicationError {
206
365
  export interface ListTaxCalculatorsRequest {
207
366
  }
208
367
  export interface ListTaxCalculatorsResponse {
209
- /** Retrieved tax calculators. */
368
+ /**
369
+ * Retrieved tax calculators.
370
+ * @maxSize 10
371
+ */
210
372
  taxCalculatorDetails?: TaxCalculatorDetails[];
211
373
  }
212
374
  export interface TaxCalculatorDetails {
213
- /** ID of the tax calculator. */
375
+ /**
376
+ * ID of the tax calculator.
377
+ * @format GUID
378
+ */
214
379
  appId?: string;
215
- /** Display name of the tax calculator. */
380
+ /**
381
+ * Display name of the tax calculator.
382
+ * @minLength 1
383
+ * @maxLength 200
384
+ */
216
385
  displayName?: string;
217
- /** List of countries, in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format, that the calculator does not support. */
386
+ /**
387
+ * List of countries, in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format, that the calculator does not support.
388
+ * @format COUNTRY
389
+ * @maxSize 195
390
+ */
218
391
  unsupportedCountries?: string[];
219
392
  }
220
393
  interface AggregatedTaxBreakdownNonNullableFields {
@@ -1 +1 @@
1
- {"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js","sourceRoot":"","sources":["../../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.ts"],"names":[],"mappings":";;;AAqJA,2HAA2H;AAC3H,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,uCAAmB,CAAA;AACrB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B"}
1
+ {"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js","sourceRoot":"","sources":["../../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.ts"],"names":[],"mappings":";;;AAgQA,2HAA2H;AAC3H,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,uCAAmB,CAAA;AACrB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B"}