@wix/auto_sdk_get-paid_billable-items 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/billable-items-v1-billable-item-billable-items.context.d.ts +2 -0
  11. package/build/cjs/src/billable-items-v1-billable-item-billable-items.context.js +39 -0
  12. package/build/cjs/src/billable-items-v1-billable-item-billable-items.context.js.map +1 -0
  13. package/build/cjs/src/billable-items-v1-billable-item-billable-items.http.d.ts +54 -0
  14. package/build/cjs/src/billable-items-v1-billable-item-billable-items.http.js +438 -0
  15. package/build/cjs/src/billable-items-v1-billable-item-billable-items.http.js.map +1 -0
  16. package/build/cjs/src/billable-items-v1-billable-item-billable-items.meta.d.ts +29 -0
  17. package/build/cjs/src/billable-items-v1-billable-item-billable-items.meta.js +237 -0
  18. package/build/cjs/src/billable-items-v1-billable-item-billable-items.meta.js.map +1 -0
  19. package/build/cjs/src/billable-items-v1-billable-item-billable-items.public.d.ts +4 -0
  20. package/build/cjs/src/billable-items-v1-billable-item-billable-items.public.js +94 -0
  21. package/build/cjs/src/billable-items-v1-billable-item-billable-items.public.js.map +1 -0
  22. package/build/cjs/src/billable-items-v1-billable-item-billable-items.types.d.ts +1181 -0
  23. package/build/cjs/src/billable-items-v1-billable-item-billable-items.types.js +99 -0
  24. package/build/cjs/src/billable-items-v1-billable-item-billable-items.types.js.map +1 -0
  25. package/build/cjs/src/billable-items-v1-billable-item-billable-items.universal.d.ts +1301 -0
  26. package/build/cjs/src/billable-items-v1-billable-item-billable-items.universal.js +611 -0
  27. package/build/cjs/src/billable-items-v1-billable-item-billable-items.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/billable-items-v1-billable-item-billable-items.context.d.ts +2 -0
  39. package/build/es/src/billable-items-v1-billable-item-billable-items.context.js +26 -0
  40. package/build/es/src/billable-items-v1-billable-item-billable-items.context.js.map +1 -0
  41. package/build/es/src/billable-items-v1-billable-item-billable-items.http.d.ts +54 -0
  42. package/build/es/src/billable-items-v1-billable-item-billable-items.http.js +424 -0
  43. package/build/es/src/billable-items-v1-billable-item-billable-items.http.js.map +1 -0
  44. package/build/es/src/billable-items-v1-billable-item-billable-items.meta.d.ts +29 -0
  45. package/build/es/src/billable-items-v1-billable-item-billable-items.meta.js +200 -0
  46. package/build/es/src/billable-items-v1-billable-item-billable-items.meta.js.map +1 -0
  47. package/build/es/src/billable-items-v1-billable-item-billable-items.public.d.ts +4 -0
  48. package/build/es/src/billable-items-v1-billable-item-billable-items.public.js +70 -0
  49. package/build/es/src/billable-items-v1-billable-item-billable-items.public.js.map +1 -0
  50. package/build/es/src/billable-items-v1-billable-item-billable-items.types.d.ts +1181 -0
  51. package/build/es/src/billable-items-v1-billable-item-billable-items.types.js +96 -0
  52. package/build/es/src/billable-items-v1-billable-item-billable-items.types.js.map +1 -0
  53. package/build/es/src/billable-items-v1-billable-item-billable-items.universal.d.ts +1301 -0
  54. package/build/es/src/billable-items-v1-billable-item-billable-items.universal.js +574 -0
  55. package/build/es/src/billable-items-v1-billable-item-billable-items.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/billable-items-v1-billable-item-billable-items.context.d.ts +26 -0
  66. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.context.js +39 -0
  67. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.context.js.map +1 -0
  68. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.http.d.ts +54 -0
  69. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.http.js +438 -0
  70. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.http.js.map +1 -0
  71. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.meta.d.ts +29 -0
  72. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.meta.js +237 -0
  73. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.meta.js.map +1 -0
  74. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.public.d.ts +126 -0
  75. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.public.js +94 -0
  76. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.public.js.map +1 -0
  77. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.types.d.ts +1181 -0
  78. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.types.js +99 -0
  79. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.types.js.map +1 -0
  80. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.universal.d.ts +1439 -0
  81. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.universal.js +611 -0
  82. package/build/internal/cjs/src/billable-items-v1-billable-item-billable-items.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/billable-items-v1-billable-item-billable-items.context.d.ts +26 -0
  93. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.context.js +26 -0
  94. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.context.js.map +1 -0
  95. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.http.d.ts +54 -0
  96. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.http.js +424 -0
  97. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.http.js.map +1 -0
  98. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.meta.d.ts +29 -0
  99. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.meta.js +200 -0
  100. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.meta.js.map +1 -0
  101. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.public.d.ts +126 -0
  102. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.public.js +70 -0
  103. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.public.js.map +1 -0
  104. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.types.d.ts +1181 -0
  105. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.types.js +96 -0
  106. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.types.js.map +1 -0
  107. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.universal.d.ts +1439 -0
  108. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.universal.js +574 -0
  109. package/build/internal/es/src/billable-items-v1-billable-item-billable-items.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1301 @@
1
+ /**
2
+ * A BillableItem represents a billable product or service that can be added to invoices.
3
+ * You can create, manage, and organize these items to streamline your billing process.
4
+ * BillableItems include details like name, description, price, and tax information.
5
+ */
6
+ export interface BillableItem {
7
+ /**
8
+ * BillableItem ID.
9
+ * @format GUID
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /**
14
+ * Revision number, which increments by 1 each time the BillableItem is updated.
15
+ * To prevent conflicting changes,
16
+ * the current revision must be passed when updating the BillableItem.
17
+ *
18
+ * Ignored when creating a BillableItem.
19
+ * @readonly
20
+ */
21
+ revision?: string | null;
22
+ /**
23
+ * Date and time the BillableItem was created.
24
+ * @readonly
25
+ */
26
+ _createdDate?: Date | null;
27
+ /**
28
+ * Date and time the BillableItem was last updated.
29
+ * @readonly
30
+ */
31
+ _updatedDate?: Date | null;
32
+ /**
33
+ * The name or title of the billable item. Used to identify the item on an invoice and display to customers.
34
+ * Must be between 1-100 characters. This is a required field when creating a new BillableItem.
35
+ * Example: "Premium Consultation", "Website Design Package", "Monthly Maintenance Service"
36
+ * @minLength 1
37
+ * @maxLength 100
38
+ */
39
+ name?: string;
40
+ /**
41
+ * Detailed description of the billable item. Provides additional information about the product or service.
42
+ * Optional field with maximum 600 characters. Can include formatting details, specifications, or terms.
43
+ * Example: "One hour consultation session with a senior expert including follow-up email"
44
+ * @minLength 1
45
+ * @maxLength 600
46
+ */
47
+ description?: string | null;
48
+ /**
49
+ * Price of the billable item in decimal format with up to 4 decimal places.
50
+ * Represents the base cost before taxes are applied. This is a required field when creating a new BillableItem.
51
+ * Must be greater than 0 and less than or equal to 1,000,000,000,000,000.
52
+ * Examples: "99.99", "149.50", "1200.00", "0.5000" (for 50 cents)
53
+ * @format DECIMAL_VALUE
54
+ * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
55
+ */
56
+ price?: string;
57
+ /**
58
+ * Reference to a tax group that defines the tax rules applicable to this billable item.
59
+ * Use the Tax Groups API to retrieve available tax groups for the business.
60
+ * The tax group determines how taxes are calculated when this item is added to an invoice.
61
+ * If not specified, the default tax rules for the business will apply.
62
+ * Example: "b52a5d5c-f8f5-4e6c-a856-66578913921a"
63
+ * See: https://dev.wix.com/api/rest/wix-billing/tax-groups/introduction
64
+ * @format GUID
65
+ */
66
+ taxGroupId?: string | null;
67
+ /**
68
+ * The billable item image. Optional visual representation of the product or service.
69
+ * Image must be uploaded to Wix Media Manager before referencing here.
70
+ * Contains image ID, URL, dimensions, and alt text for accessibility.
71
+ * To upload an image, use the Media Manager API or dashboard before creating/updating the BillableItem.
72
+ * Example: { "id": "media/12345", "url": "https://static.wixstatic.com/media/12345.jpg", "height": 600, "width": 800, "altText": "Premium Consultation Service" }
73
+ */
74
+ image?: string;
75
+ /** Data Extensions */
76
+ extendedFields?: ExtendedFields;
77
+ /** Tags */
78
+ tags?: Tags;
79
+ }
80
+ export interface ExtendedFields {
81
+ /**
82
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
83
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
84
+ *
85
+ * You can only access fields for which you have the appropriate permissions.
86
+ *
87
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
88
+ */
89
+ namespaces?: Record<string, Record<string, any>>;
90
+ }
91
+ /**
92
+ * Common object for tags.
93
+ * Should be use as in this example:
94
+ * message Foo {
95
+ * string id = 1;
96
+ * ...
97
+ * Tags tags = 5
98
+ * }
99
+ *
100
+ * example of taggable entity
101
+ * {
102
+ * id: "123"
103
+ * tags: {
104
+ * tags: {
105
+ * tag_ids:["11","22"]
106
+ * },
107
+ * private_tags: {
108
+ * tag_ids: ["33", "44"]
109
+ * }
110
+ * }
111
+ * }
112
+ */
113
+ export interface Tags {
114
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
115
+ privateTags?: TagList;
116
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
117
+ tags?: TagList;
118
+ }
119
+ export interface TagList {
120
+ /**
121
+ * List of tag IDs
122
+ * @maxSize 100
123
+ * @maxLength 5
124
+ */
125
+ tagIds?: string[];
126
+ }
127
+ export interface CreateBillableItemRequest {
128
+ /** BillableItem to be created. */
129
+ billableItem: BillableItem;
130
+ }
131
+ export interface CreateBillableItemResponse {
132
+ /** The created BillableItem. */
133
+ billableItem?: BillableItem;
134
+ }
135
+ export interface GetBillableItemRequest {
136
+ /**
137
+ * ID of the BillableItem to retrieve.
138
+ * @format GUID
139
+ */
140
+ billableItemId: string;
141
+ }
142
+ export interface GetBillableItemResponse {
143
+ /** The requested BillableItem. */
144
+ billableItem?: BillableItem;
145
+ }
146
+ export interface UpdateBillableItemRequest {
147
+ /** BillableItem to be updated, may be partial. */
148
+ billableItem: BillableItem;
149
+ }
150
+ export interface UpdateBillableItemResponse {
151
+ /** Updated BillableItem. */
152
+ billableItem?: BillableItem;
153
+ }
154
+ export interface DeleteBillableItemRequest {
155
+ /**
156
+ * Id of the BillableItem to delete.
157
+ * @format GUID
158
+ */
159
+ billableItemId: string;
160
+ }
161
+ export interface DeleteBillableItemResponse {
162
+ }
163
+ export interface QueryBillableItemsRequest {
164
+ /** WQL expression. */
165
+ query?: CursorQuery;
166
+ }
167
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
168
+ /** 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`. */
169
+ cursorPaging?: CursorPaging;
170
+ /**
171
+ * Filter object in the following format:
172
+ * `"filter" : {
173
+ * "fieldName1": "value1",
174
+ * "fieldName2":{"$operator":"value2"}
175
+ * }`
176
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
177
+ */
178
+ filter?: Record<string, any> | null;
179
+ /**
180
+ * Sort object in the following format:
181
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
182
+ * @maxSize 5
183
+ */
184
+ sort?: Sorting[];
185
+ }
186
+ /** @oneof */
187
+ export interface CursorQueryPagingMethodOneOf {
188
+ /** 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`. */
189
+ cursorPaging?: CursorPaging;
190
+ }
191
+ export interface Sorting {
192
+ /**
193
+ * Name of the field to sort by.
194
+ * @maxLength 512
195
+ */
196
+ fieldName?: string;
197
+ /** Sort order. */
198
+ order?: SortOrder;
199
+ }
200
+ export declare enum SortOrder {
201
+ ASC = "ASC",
202
+ DESC = "DESC"
203
+ }
204
+ export interface CursorPaging {
205
+ /**
206
+ * Maximum number of items to return in the results.
207
+ * @max 100
208
+ */
209
+ limit?: number | null;
210
+ /**
211
+ * Pointer to the next or previous page in the list of results.
212
+ *
213
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
214
+ * Not relevant for the first request.
215
+ * @maxLength 16000
216
+ */
217
+ cursor?: string | null;
218
+ }
219
+ export interface QueryBillableItemsResponse {
220
+ /** List of BillableItems. */
221
+ billableItems?: BillableItem[];
222
+ /** Paging metadata */
223
+ pagingMetadata?: CursorPagingMetadata;
224
+ }
225
+ export interface CursorPagingMetadata {
226
+ /** Number of items returned in the response. */
227
+ count?: number | null;
228
+ /** Cursor strings that point to the next page, previous page, or both. */
229
+ cursors?: Cursors;
230
+ /**
231
+ * Whether there are more pages to retrieve following the current page.
232
+ *
233
+ * + `true`: Another page of results can be retrieved.
234
+ * + `false`: This is the last page.
235
+ */
236
+ hasNext?: boolean | null;
237
+ }
238
+ export interface Cursors {
239
+ /**
240
+ * Cursor string pointing to the next page in the list of results.
241
+ * @maxLength 16000
242
+ */
243
+ next?: string | null;
244
+ /**
245
+ * Cursor pointing to the previous page in the list of results.
246
+ * @maxLength 16000
247
+ */
248
+ prev?: string | null;
249
+ }
250
+ export interface BulkCreateBillableItemsRequest {
251
+ /**
252
+ * List of BillableItems to be created
253
+ * @minSize 1
254
+ * @maxSize 100
255
+ */
256
+ billableItems: BillableItem[];
257
+ /** set to `true` if you wish to receive back the created BillableItems in the response */
258
+ returnEntity?: boolean;
259
+ }
260
+ export interface BulkCreateBillableItemsResponse {
261
+ /**
262
+ * List of the bulk create operation results including the BillableItems and metadata.
263
+ * @minSize 1
264
+ * @maxSize 100
265
+ */
266
+ results?: BulkBillableItemResult[];
267
+ /** Metadata regarding the bulk create operation */
268
+ bulkActionMetadata?: BulkActionMetadata;
269
+ }
270
+ export interface ItemMetadata {
271
+ /**
272
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
273
+ * @format GUID
274
+ */
275
+ _id?: string | null;
276
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
277
+ originalIndex?: number;
278
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
279
+ success?: boolean;
280
+ /** Details about the error in case of failure. */
281
+ error?: ApplicationError;
282
+ }
283
+ export interface ApplicationError {
284
+ /** Error code. */
285
+ code?: string;
286
+ /** Description of the error. */
287
+ description?: string;
288
+ /** Data related to the error. */
289
+ data?: Record<string, any> | null;
290
+ }
291
+ export interface BulkBillableItemResult {
292
+ /** Metadata regarding the specific single create operation */
293
+ itemMetadata?: ItemMetadata;
294
+ /** Only exists if `returnEntity` was set to true in the request */
295
+ item?: BillableItem;
296
+ }
297
+ export interface BulkActionMetadata {
298
+ /** Number of items that were successfully processed. */
299
+ totalSuccesses?: number;
300
+ /** Number of items that couldn't be processed. */
301
+ totalFailures?: number;
302
+ /** Number of failures without details because detailed failure threshold was exceeded. */
303
+ undetailedFailures?: number;
304
+ }
305
+ export interface BulkUpdateBillableItemsRequest {
306
+ /**
307
+ * List of BillableItems to be updated.
308
+ * @minSize 1
309
+ * @maxSize 100
310
+ */
311
+ billableItems: MaskedBillableItem[];
312
+ /** set to `true` if you wish to receive back the updated BillableItems in the response */
313
+ returnEntity?: boolean;
314
+ }
315
+ export interface MaskedBillableItem {
316
+ /** BillableItem to be updated, may be partial */
317
+ billableItem?: BillableItem;
318
+ }
319
+ export interface BulkUpdateBillableItemsResponse {
320
+ /**
321
+ * Results
322
+ * @minSize 1
323
+ * @maxSize 100
324
+ */
325
+ results?: BulkUpdateBillableItemsResponseBulkBillableItemResult[];
326
+ /** Metadata regarding the bulk update operation */
327
+ bulkActionMetadata?: BulkActionMetadata;
328
+ }
329
+ export interface BulkUpdateBillableItemsResponseBulkBillableItemResult {
330
+ /** Metadata regarding the specific single update operation */
331
+ itemMetadata?: ItemMetadata;
332
+ /** Only exists if `returnEntity` was set to true in the request */
333
+ item?: BillableItem;
334
+ }
335
+ export interface BulkDeleteBillableItemsRequest {
336
+ /**
337
+ * BillableItem ids to be deleted
338
+ * @minSize 1
339
+ * @maxSize 100
340
+ * @format GUID
341
+ */
342
+ billableItemIds: string[];
343
+ }
344
+ export interface BulkDeleteBillableItemsResponse {
345
+ /**
346
+ * Results
347
+ * @minSize 1
348
+ * @maxSize 100
349
+ */
350
+ results?: BulkDeleteBillableItemsResponseBulkBillableItemResult[];
351
+ /** Metadata regarding the bulk delete operation */
352
+ bulkActionMetadata?: BulkActionMetadata;
353
+ }
354
+ export interface BulkDeleteBillableItemsResponseBulkBillableItemResult {
355
+ /** Metadata regarding the specific single delete operation */
356
+ itemMetadata?: ItemMetadata;
357
+ }
358
+ export interface BulkUpdateBillableItemTagsRequest {
359
+ /**
360
+ * List of NileProtoTagsEntities that their tags will update.
361
+ * @minSize 1
362
+ * @maxSize 100
363
+ * @format GUID
364
+ */
365
+ billableItemIds: string[];
366
+ /** List of Tags to assign */
367
+ assignTags?: Tags;
368
+ /** List of Tags to unAssign */
369
+ unassignTags?: Tags;
370
+ }
371
+ export interface BulkUpdateBillableItemTagsResponse {
372
+ /**
373
+ * Results
374
+ * @minSize 1
375
+ * @maxSize 100
376
+ */
377
+ results?: BulkUpdateBillableItemTagsResult[];
378
+ /** Metadata regarding the bulk update operation */
379
+ bulkActionMetadata?: BulkActionMetadata;
380
+ }
381
+ export interface BulkUpdateBillableItemTagsResult {
382
+ /** Metadata regarding the specific single update operation */
383
+ itemMetadata?: ItemMetadata;
384
+ }
385
+ export interface BulkUpdateBillableItemTagsByFilterRequest {
386
+ /** Filter */
387
+ filter: Record<string, any> | null;
388
+ /** List of Tags to assign */
389
+ assignTags?: Tags;
390
+ /** List of Tags to unAssign */
391
+ unassignTags?: Tags;
392
+ }
393
+ export interface BulkUpdateBillableItemTagsByFilterResponse {
394
+ /**
395
+ * Job ID
396
+ * @format GUID
397
+ */
398
+ jobId?: string;
399
+ }
400
+ export interface SearchBillableItemsRequest {
401
+ /** Search options. */
402
+ search: CursorSearch;
403
+ }
404
+ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
405
+ /**
406
+ * Cursor pointing to page of results.
407
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
408
+ */
409
+ cursorPaging?: CursorPaging;
410
+ /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
411
+ filter?: Record<string, any> | null;
412
+ /**
413
+ * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
414
+ * @maxSize 10
415
+ */
416
+ sort?: Sorting[];
417
+ /**
418
+ * Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
419
+ * @maxSize 10
420
+ */
421
+ aggregations?: Aggregation[];
422
+ /** Free text to match in searchable fields */
423
+ search?: SearchDetails;
424
+ /**
425
+ * UTC offset or IANA time zone. Valid values are
426
+ * ISO 8601 UTC offsets, such as +02:00 or -06:00,
427
+ * and IANA time zone IDs, such as Europe/Rome
428
+ *
429
+ * Affects all filters and aggregations returned values.
430
+ * You may override this behavior in a specific filter by providing
431
+ * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
432
+ * @maxLength 50
433
+ */
434
+ timeZone?: string | null;
435
+ }
436
+ /** @oneof */
437
+ export interface CursorSearchPagingMethodOneOf {
438
+ /**
439
+ * Cursor pointing to page of results.
440
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
441
+ */
442
+ cursorPaging?: CursorPaging;
443
+ }
444
+ export interface Aggregation extends AggregationKindOneOf {
445
+ /** Value aggregation */
446
+ value?: ValueAggregation;
447
+ /** Range aggregation */
448
+ range?: RangeAggregation;
449
+ /** Scalar aggregation */
450
+ scalar?: ScalarAggregation;
451
+ /** Date histogram aggregation */
452
+ dateHistogram?: DateHistogramAggregation;
453
+ /** Nested aggregation */
454
+ nested?: NestedAggregation;
455
+ /**
456
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
457
+ * @maxLength 100
458
+ */
459
+ name?: string | null;
460
+ /** Type of aggregation, client must provide matching aggregation field below */
461
+ type?: AggregationType;
462
+ /**
463
+ * Field to aggregate by, use dot notation to specify json path
464
+ * @maxLength 200
465
+ */
466
+ fieldPath?: string;
467
+ }
468
+ /** @oneof */
469
+ export interface AggregationKindOneOf {
470
+ /** Value aggregation */
471
+ value?: ValueAggregation;
472
+ /** Range aggregation */
473
+ range?: RangeAggregation;
474
+ /** Scalar aggregation */
475
+ scalar?: ScalarAggregation;
476
+ /** Date histogram aggregation */
477
+ dateHistogram?: DateHistogramAggregation;
478
+ /** Nested aggregation */
479
+ nested?: NestedAggregation;
480
+ }
481
+ export interface RangeBucket {
482
+ /** Inclusive lower bound of the range. Required if to is not given */
483
+ from?: number | null;
484
+ /** Exclusive upper bound of the range. Required if from is not given */
485
+ to?: number | null;
486
+ }
487
+ export declare enum SortType {
488
+ /** Should sort by number of matches */
489
+ COUNT = "COUNT",
490
+ /** Should sort by value of the field alphabetically */
491
+ VALUE = "VALUE"
492
+ }
493
+ export declare enum SortDirection {
494
+ /** Should sort in descending order */
495
+ DESC = "DESC",
496
+ /** Should sort in ascending order */
497
+ ASC = "ASC"
498
+ }
499
+ export declare enum MissingValues {
500
+ /** Should missing values be excluded from the aggregation results */
501
+ EXCLUDE = "EXCLUDE",
502
+ /** Should missing values be included in the aggregation results */
503
+ INCLUDE = "INCLUDE"
504
+ }
505
+ export interface IncludeMissingValuesOptions {
506
+ /**
507
+ * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
508
+ * @maxLength 20
509
+ */
510
+ addToBucket?: string;
511
+ }
512
+ export declare enum ScalarType {
513
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
514
+ /** Count of distinct values */
515
+ COUNT_DISTINCT = "COUNT_DISTINCT",
516
+ /** Minimum value */
517
+ MIN = "MIN",
518
+ /** Maximum value */
519
+ MAX = "MAX"
520
+ }
521
+ export interface ValueAggregation extends ValueAggregationOptionsOneOf {
522
+ /** Options for including missing values */
523
+ includeOptions?: IncludeMissingValuesOptions;
524
+ /** Should sort by number of matches or value of the field */
525
+ sortType?: SortType;
526
+ /** Should sort in ascending or descending order */
527
+ sortDirection?: SortDirection;
528
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
529
+ limit?: number | null;
530
+ /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
531
+ missingValues?: MissingValues;
532
+ }
533
+ /** @oneof */
534
+ export interface ValueAggregationOptionsOneOf {
535
+ /** Options for including missing values */
536
+ includeOptions?: IncludeMissingValuesOptions;
537
+ }
538
+ export declare enum NestedAggregationType {
539
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
540
+ /** An aggregation where result buckets are dynamically built - one per unique value */
541
+ VALUE = "VALUE",
542
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
543
+ RANGE = "RANGE",
544
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
545
+ SCALAR = "SCALAR",
546
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
547
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
548
+ }
549
+ export interface RangeAggregation {
550
+ /**
551
+ * List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds
552
+ * @maxSize 50
553
+ */
554
+ buckets?: RangeBucket[];
555
+ }
556
+ export interface ScalarAggregation {
557
+ /** Define the operator for the scalar aggregation */
558
+ type?: ScalarType;
559
+ }
560
+ export interface DateHistogramAggregation {
561
+ /** Interval for date histogram aggregation */
562
+ interval?: Interval;
563
+ }
564
+ export declare enum Interval {
565
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
566
+ /** Yearly interval */
567
+ YEAR = "YEAR",
568
+ /** Monthly interval */
569
+ MONTH = "MONTH",
570
+ /** Weekly interval */
571
+ WEEK = "WEEK",
572
+ /** Daily interval */
573
+ DAY = "DAY",
574
+ /** Hourly interval */
575
+ HOUR = "HOUR",
576
+ /** Minute interval */
577
+ MINUTE = "MINUTE",
578
+ /** Second interval */
579
+ SECOND = "SECOND"
580
+ }
581
+ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
582
+ /** Value aggregation */
583
+ value?: ValueAggregation;
584
+ /** Range aggregation */
585
+ range?: RangeAggregation;
586
+ /** Scalar aggregation */
587
+ scalar?: ScalarAggregation;
588
+ /** Date histogram aggregation */
589
+ dateHistogram?: DateHistogramAggregation;
590
+ /**
591
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
592
+ * @maxLength 100
593
+ */
594
+ name?: string | null;
595
+ /** Type of aggregation, client must provide matching aggregation field below */
596
+ type?: NestedAggregationType;
597
+ /**
598
+ * Field to aggregate by, use dont notation to specify json path
599
+ * @maxLength 200
600
+ */
601
+ fieldPath?: string;
602
+ }
603
+ /** @oneof */
604
+ export interface NestedAggregationItemKindOneOf {
605
+ /** Value aggregation */
606
+ value?: ValueAggregation;
607
+ /** Range aggregation */
608
+ range?: RangeAggregation;
609
+ /** Scalar aggregation */
610
+ scalar?: ScalarAggregation;
611
+ /** Date histogram aggregation */
612
+ dateHistogram?: DateHistogramAggregation;
613
+ }
614
+ export declare enum AggregationType {
615
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
616
+ /** An aggregation where result buckets are dynamically built - one per unique value */
617
+ VALUE = "VALUE",
618
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
619
+ RANGE = "RANGE",
620
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
621
+ SCALAR = "SCALAR",
622
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
623
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
624
+ /** Multi-level aggregation, where each next aggregation is nested within previous one */
625
+ NESTED = "NESTED"
626
+ }
627
+ /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
628
+ export interface NestedAggregation {
629
+ /**
630
+ * Flattened list of aggregations, where each next aggregation is nested within previous one
631
+ * @minSize 2
632
+ * @maxSize 3
633
+ */
634
+ nestedAggregations?: NestedAggregationItem[];
635
+ }
636
+ export interface SearchDetails {
637
+ /** Defines how separate search terms in `expression` are combined */
638
+ mode?: Mode;
639
+ /**
640
+ * Search term or expression
641
+ * @maxLength 100
642
+ */
643
+ expression?: string | null;
644
+ /**
645
+ * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
646
+ * @maxLength 200
647
+ * @maxSize 20
648
+ */
649
+ fields?: string[];
650
+ /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
651
+ fuzzy?: boolean;
652
+ }
653
+ export declare enum Mode {
654
+ /** Any of the search terms must be present */
655
+ OR = "OR",
656
+ /** All search terms must be present */
657
+ AND = "AND"
658
+ }
659
+ export interface SearchBillableItemsResponse {
660
+ /** Retrieved payment link payments. */
661
+ billableItems?: BillableItem[];
662
+ /** Paging metadata. */
663
+ pagingMetadata?: PagingMetadataV2;
664
+ /** Response aggregation data. */
665
+ aggregationData?: AggregationData;
666
+ }
667
+ export interface PagingMetadataV2 {
668
+ /** Number of items returned in the response. */
669
+ count?: number | null;
670
+ /** Offset that was requested. */
671
+ offset?: number | null;
672
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
673
+ total?: number | null;
674
+ /** Flag that indicates the server failed to calculate the `total` field. */
675
+ tooManyToCount?: boolean | null;
676
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
677
+ cursors?: Cursors;
678
+ }
679
+ export interface AggregationData {
680
+ /**
681
+ * key = aggregation name (as derived from search request)
682
+ * @maxSize 10000
683
+ */
684
+ results?: AggregationResults[];
685
+ }
686
+ export interface ValueAggregationResult {
687
+ /**
688
+ * Value of the field
689
+ * @maxLength 100
690
+ */
691
+ value?: string;
692
+ /** Count of entities with this value */
693
+ count?: number;
694
+ }
695
+ export interface RangeAggregationResult {
696
+ /** Inclusive lower bound of the range */
697
+ from?: number | null;
698
+ /** Exclusive upper bound of the range */
699
+ to?: number | null;
700
+ /** Count of entities in this range */
701
+ count?: number;
702
+ }
703
+ export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
704
+ /** Value aggregation results */
705
+ values?: ValueResults;
706
+ /** Range aggregation results */
707
+ ranges?: RangeResults;
708
+ /** Scalar aggregation results */
709
+ scalar?: AggregationResultsScalarResult;
710
+ /**
711
+ * User-defined name of aggregation, matches the one provided in request
712
+ * @maxLength 100
713
+ */
714
+ name?: string;
715
+ /** Type of aggregation that matches result */
716
+ type?: AggregationType;
717
+ /**
718
+ * Field to aggregate by, matches the one provided in request
719
+ * @maxLength 200
720
+ */
721
+ fieldPath?: string;
722
+ }
723
+ /** @oneof */
724
+ export interface NestedAggregationResultsResultOneOf {
725
+ /** Value aggregation results */
726
+ values?: ValueResults;
727
+ /** Range aggregation results */
728
+ ranges?: RangeResults;
729
+ /** Scalar aggregation results */
730
+ scalar?: AggregationResultsScalarResult;
731
+ }
732
+ export interface ValueResults {
733
+ /**
734
+ * List of value aggregations
735
+ * @maxSize 250
736
+ */
737
+ results?: ValueAggregationResult[];
738
+ }
739
+ export interface RangeResults {
740
+ /**
741
+ * List of ranges returned in same order as requested
742
+ * @maxSize 50
743
+ */
744
+ results?: RangeAggregationResult[];
745
+ }
746
+ export interface AggregationResultsScalarResult {
747
+ /** Type of scalar aggregation */
748
+ type?: ScalarType;
749
+ /** Value of the scalar aggregation */
750
+ value?: number;
751
+ }
752
+ export interface NestedValueAggregationResult {
753
+ /**
754
+ * Value of the field
755
+ * @maxLength 1000
756
+ */
757
+ value?: string;
758
+ /** Nested aggregations */
759
+ nestedResults?: NestedAggregationResults;
760
+ }
761
+ export interface ValueResult {
762
+ /**
763
+ * Value of the field
764
+ * @maxLength 1000
765
+ */
766
+ value?: string;
767
+ /** Count of entities with this value */
768
+ count?: number | null;
769
+ }
770
+ export interface RangeResult {
771
+ /** Inclusive lower bound of the range */
772
+ from?: number | null;
773
+ /** Exclusive upper bound of the range */
774
+ to?: number | null;
775
+ /** Count of entities in this range */
776
+ count?: number | null;
777
+ }
778
+ export interface ScalarResult {
779
+ /** Value of the scalar aggregation */
780
+ value?: number;
781
+ }
782
+ export interface NestedResultValue extends NestedResultValueResultOneOf {
783
+ /** Value aggregation result */
784
+ value?: ValueResult;
785
+ /** Range aggregation result */
786
+ range?: RangeResult;
787
+ /** Scalar aggregation result */
788
+ scalar?: ScalarResult;
789
+ /** Date histogram aggregation result */
790
+ dateHistogram?: ValueResult;
791
+ }
792
+ /** @oneof */
793
+ export interface NestedResultValueResultOneOf {
794
+ /** Value aggregation result */
795
+ value?: ValueResult;
796
+ /** Range aggregation result */
797
+ range?: RangeResult;
798
+ /** Scalar aggregation result */
799
+ scalar?: ScalarResult;
800
+ /** Date histogram aggregation result */
801
+ dateHistogram?: ValueResult;
802
+ }
803
+ export interface Results {
804
+ /** List of nested aggregations */
805
+ results?: Record<string, NestedResultValue>;
806
+ }
807
+ export interface DateHistogramResult {
808
+ /**
809
+ * Date in ISO 8601 format
810
+ * @maxLength 100
811
+ */
812
+ value?: string;
813
+ /** Count of documents in the bucket */
814
+ count?: number;
815
+ }
816
+ export interface GroupByValueResults {
817
+ /**
818
+ * List of value aggregations
819
+ * @maxSize 1000
820
+ */
821
+ results?: NestedValueAggregationResult[];
822
+ }
823
+ export interface DateHistogramResults {
824
+ /**
825
+ * List of date histogram aggregations
826
+ * @maxSize 200
827
+ */
828
+ results?: DateHistogramResult[];
829
+ }
830
+ /**
831
+ * Results of `NESTED` aggregation type in a flattened form
832
+ * aggregations in resulting array are keyed by requested aggregation `name`.
833
+ */
834
+ export interface NestedResults {
835
+ /**
836
+ * List of nested aggregations
837
+ * @maxSize 1000
838
+ */
839
+ results?: Results[];
840
+ }
841
+ export interface AggregationResults extends AggregationResultsResultOneOf {
842
+ /** Value aggregation results */
843
+ values?: ValueResults;
844
+ /** Range aggregation results */
845
+ ranges?: RangeResults;
846
+ /** Scalar aggregation results */
847
+ scalar?: AggregationResultsScalarResult;
848
+ /** Group by value aggregation results */
849
+ groupedByValue?: GroupByValueResults;
850
+ /** Date histogram aggregation results */
851
+ dateHistogram?: DateHistogramResults;
852
+ /** Nested aggregation results */
853
+ nested?: NestedResults;
854
+ /**
855
+ * User-defined name of aggregation as derived from search request
856
+ * @maxLength 100
857
+ */
858
+ name?: string;
859
+ /** Type of aggregation that must match provided kind as derived from search request */
860
+ type?: AggregationType;
861
+ /**
862
+ * Field to aggregate by as derived from search request
863
+ * @maxLength 200
864
+ */
865
+ fieldPath?: string;
866
+ }
867
+ /** @oneof */
868
+ export interface AggregationResultsResultOneOf {
869
+ /** Value aggregation results */
870
+ values?: ValueResults;
871
+ /** Range aggregation results */
872
+ ranges?: RangeResults;
873
+ /** Scalar aggregation results */
874
+ scalar?: AggregationResultsScalarResult;
875
+ /** Group by value aggregation results */
876
+ groupedByValue?: GroupByValueResults;
877
+ /** Date histogram aggregation results */
878
+ dateHistogram?: DateHistogramResults;
879
+ /** Nested aggregation results */
880
+ nested?: NestedResults;
881
+ }
882
+ export interface DomainEvent extends DomainEventBodyOneOf {
883
+ createdEvent?: EntityCreatedEvent;
884
+ updatedEvent?: EntityUpdatedEvent;
885
+ deletedEvent?: EntityDeletedEvent;
886
+ actionEvent?: ActionEvent;
887
+ /**
888
+ * Unique event ID.
889
+ * Allows clients to ignore duplicate webhooks.
890
+ */
891
+ _id?: string;
892
+ /**
893
+ * Assumes actions are also always typed to an entity_type
894
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
895
+ */
896
+ entityFqdn?: string;
897
+ /**
898
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
899
+ * This is although the created/updated/deleted notion is duplication of the oneof types
900
+ * Example: created/updated/deleted/started/completed/email_opened
901
+ */
902
+ slug?: string;
903
+ /** ID of the entity associated with the event. */
904
+ entityId?: string;
905
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
906
+ eventTime?: Date | null;
907
+ /**
908
+ * Whether the event was triggered as a result of a privacy regulation application
909
+ * (for example, GDPR).
910
+ */
911
+ triggeredByAnonymizeRequest?: boolean | null;
912
+ /** If present, indicates the action that triggered the event. */
913
+ originatedFrom?: string | null;
914
+ /**
915
+ * A sequence number defining the order of updates to the underlying entity.
916
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
917
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
918
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
919
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
920
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
921
+ */
922
+ entityEventSequence?: string | null;
923
+ }
924
+ /** @oneof */
925
+ export interface DomainEventBodyOneOf {
926
+ createdEvent?: EntityCreatedEvent;
927
+ updatedEvent?: EntityUpdatedEvent;
928
+ deletedEvent?: EntityDeletedEvent;
929
+ actionEvent?: ActionEvent;
930
+ }
931
+ export interface EntityCreatedEvent {
932
+ entity?: string;
933
+ }
934
+ export interface RestoreInfo {
935
+ deletedDate?: Date | null;
936
+ }
937
+ export interface EntityUpdatedEvent {
938
+ /**
939
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
940
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
941
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
942
+ */
943
+ currentEntity?: string;
944
+ }
945
+ export interface EntityDeletedEvent {
946
+ /** Entity that was deleted */
947
+ deletedEntity?: string | null;
948
+ }
949
+ export interface ActionEvent {
950
+ body?: string;
951
+ }
952
+ export interface MessageEnvelope {
953
+ /**
954
+ * App instance ID.
955
+ * @format GUID
956
+ */
957
+ instanceId?: string | null;
958
+ /**
959
+ * Event type.
960
+ * @maxLength 150
961
+ */
962
+ eventType?: string;
963
+ /** The identification type and identity data. */
964
+ identity?: IdentificationData;
965
+ /** Stringify payload. */
966
+ data?: string;
967
+ }
968
+ export interface IdentificationData extends IdentificationDataIdOneOf {
969
+ /**
970
+ * ID of a site visitor that has not logged in to the site.
971
+ * @format GUID
972
+ */
973
+ anonymousVisitorId?: string;
974
+ /**
975
+ * ID of a site visitor that has logged in to the site.
976
+ * @format GUID
977
+ */
978
+ memberId?: string;
979
+ /**
980
+ * ID of a Wix user (site owner, contributor, etc.).
981
+ * @format GUID
982
+ */
983
+ wixUserId?: string;
984
+ /**
985
+ * ID of an app.
986
+ * @format GUID
987
+ */
988
+ appId?: string;
989
+ /** @readonly */
990
+ identityType?: WebhookIdentityType;
991
+ }
992
+ /** @oneof */
993
+ export interface IdentificationDataIdOneOf {
994
+ /**
995
+ * ID of a site visitor that has not logged in to the site.
996
+ * @format GUID
997
+ */
998
+ anonymousVisitorId?: string;
999
+ /**
1000
+ * ID of a site visitor that has logged in to the site.
1001
+ * @format GUID
1002
+ */
1003
+ memberId?: string;
1004
+ /**
1005
+ * ID of a Wix user (site owner, contributor, etc.).
1006
+ * @format GUID
1007
+ */
1008
+ wixUserId?: string;
1009
+ /**
1010
+ * ID of an app.
1011
+ * @format GUID
1012
+ */
1013
+ appId?: string;
1014
+ }
1015
+ export declare enum WebhookIdentityType {
1016
+ UNKNOWN = "UNKNOWN",
1017
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1018
+ MEMBER = "MEMBER",
1019
+ WIX_USER = "WIX_USER",
1020
+ APP = "APP"
1021
+ }
1022
+ interface TagListNonNullableFields {
1023
+ tagIds: string[];
1024
+ }
1025
+ interface TagsNonNullableFields {
1026
+ privateTags?: TagListNonNullableFields;
1027
+ tags?: TagListNonNullableFields;
1028
+ }
1029
+ export interface BillableItemNonNullableFields {
1030
+ name: string;
1031
+ price: string;
1032
+ image: string;
1033
+ tags?: TagsNonNullableFields;
1034
+ }
1035
+ export interface CreateBillableItemResponseNonNullableFields {
1036
+ billableItem?: BillableItemNonNullableFields;
1037
+ }
1038
+ export interface GetBillableItemResponseNonNullableFields {
1039
+ billableItem?: BillableItemNonNullableFields;
1040
+ }
1041
+ export interface UpdateBillableItemResponseNonNullableFields {
1042
+ billableItem?: BillableItemNonNullableFields;
1043
+ }
1044
+ export interface QueryBillableItemsResponseNonNullableFields {
1045
+ billableItems: BillableItemNonNullableFields[];
1046
+ }
1047
+ interface ApplicationErrorNonNullableFields {
1048
+ code: string;
1049
+ description: string;
1050
+ }
1051
+ interface ItemMetadataNonNullableFields {
1052
+ originalIndex: number;
1053
+ success: boolean;
1054
+ error?: ApplicationErrorNonNullableFields;
1055
+ }
1056
+ interface BulkBillableItemResultNonNullableFields {
1057
+ itemMetadata?: ItemMetadataNonNullableFields;
1058
+ item?: BillableItemNonNullableFields;
1059
+ }
1060
+ interface BulkActionMetadataNonNullableFields {
1061
+ totalSuccesses: number;
1062
+ totalFailures: number;
1063
+ undetailedFailures: number;
1064
+ }
1065
+ export interface BulkCreateBillableItemsResponseNonNullableFields {
1066
+ results: BulkBillableItemResultNonNullableFields[];
1067
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1068
+ }
1069
+ interface BulkUpdateBillableItemsResponseBulkBillableItemResultNonNullableFields {
1070
+ itemMetadata?: ItemMetadataNonNullableFields;
1071
+ item?: BillableItemNonNullableFields;
1072
+ }
1073
+ export interface BulkUpdateBillableItemsResponseNonNullableFields {
1074
+ results: BulkUpdateBillableItemsResponseBulkBillableItemResultNonNullableFields[];
1075
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1076
+ }
1077
+ interface BulkDeleteBillableItemsResponseBulkBillableItemResultNonNullableFields {
1078
+ itemMetadata?: ItemMetadataNonNullableFields;
1079
+ }
1080
+ export interface BulkDeleteBillableItemsResponseNonNullableFields {
1081
+ results: BulkDeleteBillableItemsResponseBulkBillableItemResultNonNullableFields[];
1082
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1083
+ }
1084
+ interface BulkUpdateBillableItemTagsResultNonNullableFields {
1085
+ itemMetadata?: ItemMetadataNonNullableFields;
1086
+ }
1087
+ export interface BulkUpdateBillableItemTagsResponseNonNullableFields {
1088
+ results: BulkUpdateBillableItemTagsResultNonNullableFields[];
1089
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1090
+ }
1091
+ export interface BulkUpdateBillableItemTagsByFilterResponseNonNullableFields {
1092
+ jobId: string;
1093
+ }
1094
+ interface ValueAggregationResultNonNullableFields {
1095
+ value: string;
1096
+ count: number;
1097
+ }
1098
+ interface ValueResultsNonNullableFields {
1099
+ results: ValueAggregationResultNonNullableFields[];
1100
+ }
1101
+ interface RangeAggregationResultNonNullableFields {
1102
+ count: number;
1103
+ }
1104
+ interface RangeResultsNonNullableFields {
1105
+ results: RangeAggregationResultNonNullableFields[];
1106
+ }
1107
+ interface AggregationResultsScalarResultNonNullableFields {
1108
+ type: ScalarType;
1109
+ value: number;
1110
+ }
1111
+ interface NestedAggregationResultsNonNullableFields {
1112
+ values?: ValueResultsNonNullableFields;
1113
+ ranges?: RangeResultsNonNullableFields;
1114
+ scalar?: AggregationResultsScalarResultNonNullableFields;
1115
+ name: string;
1116
+ type: AggregationType;
1117
+ fieldPath: string;
1118
+ }
1119
+ interface NestedValueAggregationResultNonNullableFields {
1120
+ value: string;
1121
+ nestedResults?: NestedAggregationResultsNonNullableFields;
1122
+ }
1123
+ interface GroupByValueResultsNonNullableFields {
1124
+ results: NestedValueAggregationResultNonNullableFields[];
1125
+ }
1126
+ interface DateHistogramResultNonNullableFields {
1127
+ value: string;
1128
+ count: number;
1129
+ }
1130
+ interface DateHistogramResultsNonNullableFields {
1131
+ results: DateHistogramResultNonNullableFields[];
1132
+ }
1133
+ interface AggregationResultsNonNullableFields {
1134
+ values?: ValueResultsNonNullableFields;
1135
+ ranges?: RangeResultsNonNullableFields;
1136
+ scalar?: AggregationResultsScalarResultNonNullableFields;
1137
+ groupedByValue?: GroupByValueResultsNonNullableFields;
1138
+ dateHistogram?: DateHistogramResultsNonNullableFields;
1139
+ name: string;
1140
+ type: AggregationType;
1141
+ fieldPath: string;
1142
+ }
1143
+ interface AggregationDataNonNullableFields {
1144
+ results: AggregationResultsNonNullableFields[];
1145
+ }
1146
+ export interface SearchBillableItemsResponseNonNullableFields {
1147
+ billableItems: BillableItemNonNullableFields[];
1148
+ aggregationData?: AggregationDataNonNullableFields;
1149
+ }
1150
+ export interface UpdateBillableItem {
1151
+ /**
1152
+ * BillableItem ID.
1153
+ * @format GUID
1154
+ * @readonly
1155
+ */
1156
+ _id?: string | null;
1157
+ /**
1158
+ * Revision number, which increments by 1 each time the BillableItem is updated.
1159
+ * To prevent conflicting changes,
1160
+ * the current revision must be passed when updating the BillableItem.
1161
+ *
1162
+ * Ignored when creating a BillableItem.
1163
+ * @readonly
1164
+ */
1165
+ revision?: string | null;
1166
+ /**
1167
+ * Date and time the BillableItem was created.
1168
+ * @readonly
1169
+ */
1170
+ _createdDate?: Date | null;
1171
+ /**
1172
+ * Date and time the BillableItem was last updated.
1173
+ * @readonly
1174
+ */
1175
+ _updatedDate?: Date | null;
1176
+ /**
1177
+ * The name or title of the billable item. Used to identify the item on an invoice and display to customers.
1178
+ * Must be between 1-100 characters. This is a required field when creating a new BillableItem.
1179
+ * Example: "Premium Consultation", "Website Design Package", "Monthly Maintenance Service"
1180
+ * @minLength 1
1181
+ * @maxLength 100
1182
+ */
1183
+ name?: string;
1184
+ /**
1185
+ * Detailed description of the billable item. Provides additional information about the product or service.
1186
+ * Optional field with maximum 600 characters. Can include formatting details, specifications, or terms.
1187
+ * Example: "One hour consultation session with a senior expert including follow-up email"
1188
+ * @minLength 1
1189
+ * @maxLength 600
1190
+ */
1191
+ description?: string | null;
1192
+ /**
1193
+ * Price of the billable item in decimal format with up to 4 decimal places.
1194
+ * Represents the base cost before taxes are applied. This is a required field when creating a new BillableItem.
1195
+ * Must be greater than 0 and less than or equal to 1,000,000,000,000,000.
1196
+ * Examples: "99.99", "149.50", "1200.00", "0.5000" (for 50 cents)
1197
+ * @format DECIMAL_VALUE
1198
+ * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
1199
+ */
1200
+ price?: string;
1201
+ /**
1202
+ * Reference to a tax group that defines the tax rules applicable to this billable item.
1203
+ * Use the Tax Groups API to retrieve available tax groups for the business.
1204
+ * The tax group determines how taxes are calculated when this item is added to an invoice.
1205
+ * If not specified, the default tax rules for the business will apply.
1206
+ * Example: "b52a5d5c-f8f5-4e6c-a856-66578913921a"
1207
+ * See: https://dev.wix.com/api/rest/wix-billing/tax-groups/introduction
1208
+ * @format GUID
1209
+ */
1210
+ taxGroupId?: string | null;
1211
+ /**
1212
+ * The billable item image. Optional visual representation of the product or service.
1213
+ * Image must be uploaded to Wix Media Manager before referencing here.
1214
+ * Contains image ID, URL, dimensions, and alt text for accessibility.
1215
+ * To upload an image, use the Media Manager API or dashboard before creating/updating the BillableItem.
1216
+ * Example: { "id": "media/12345", "url": "https://static.wixstatic.com/media/12345.jpg", "height": 600, "width": 800, "altText": "Premium Consultation Service" }
1217
+ */
1218
+ image?: string;
1219
+ /** Data Extensions */
1220
+ extendedFields?: ExtendedFields;
1221
+ /** Tags */
1222
+ tags?: Tags;
1223
+ }
1224
+ interface QueryCursorResult {
1225
+ cursors: Cursors;
1226
+ hasNext: () => boolean;
1227
+ hasPrev: () => boolean;
1228
+ length: number;
1229
+ pageSize: number;
1230
+ }
1231
+ export interface BillableItemsQueryResult extends QueryCursorResult {
1232
+ items: BillableItem[];
1233
+ query: BillableItemsQueryBuilder;
1234
+ next: () => Promise<BillableItemsQueryResult>;
1235
+ prev: () => Promise<BillableItemsQueryResult>;
1236
+ }
1237
+ export interface BillableItemsQueryBuilder {
1238
+ /** @param propertyName - Property whose value is compared with `value`.
1239
+ * @param value - Value to compare against.
1240
+ * @documentationMaturity preview
1241
+ */
1242
+ eq: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags', value: any) => BillableItemsQueryBuilder;
1243
+ /** @param propertyName - Property whose value is compared with `value`.
1244
+ * @param value - Value to compare against.
1245
+ * @documentationMaturity preview
1246
+ */
1247
+ ne: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags', value: any) => BillableItemsQueryBuilder;
1248
+ /** @param propertyName - Property whose value is compared with `string`.
1249
+ * @param string - String to compare against. Case-insensitive.
1250
+ * @documentationMaturity preview
1251
+ */
1252
+ startsWith: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId', value: string) => BillableItemsQueryBuilder;
1253
+ /** @param propertyName - Property whose value is compared with `values`.
1254
+ * @param values - List of values to compare against.
1255
+ * @documentationMaturity preview
1256
+ */
1257
+ hasSome: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags', value: any[]) => BillableItemsQueryBuilder;
1258
+ /** @documentationMaturity preview */
1259
+ in: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags', value: any) => BillableItemsQueryBuilder;
1260
+ /** @documentationMaturity preview */
1261
+ exists: (propertyName: '_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags', value: boolean) => BillableItemsQueryBuilder;
1262
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1263
+ * @documentationMaturity preview
1264
+ */
1265
+ ascending: (...propertyNames: Array<'_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags'>) => BillableItemsQueryBuilder;
1266
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1267
+ * @documentationMaturity preview
1268
+ */
1269
+ descending: (...propertyNames: Array<'_id' | 'name' | 'description' | 'price' | 'taxGroupId' | 'image' | 'tags'>) => BillableItemsQueryBuilder;
1270
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1271
+ * @documentationMaturity preview
1272
+ */
1273
+ limit: (limit: number) => BillableItemsQueryBuilder;
1274
+ /** @param cursor - A pointer to specific record
1275
+ * @documentationMaturity preview
1276
+ */
1277
+ skipTo: (cursor: string) => BillableItemsQueryBuilder;
1278
+ /** @documentationMaturity preview */
1279
+ find: () => Promise<BillableItemsQueryResult>;
1280
+ }
1281
+ export interface BulkCreateBillableItemsOptions {
1282
+ /** set to `true` if you wish to receive back the created BillableItems in the response */
1283
+ returnEntity?: boolean;
1284
+ }
1285
+ export interface BulkUpdateBillableItemsOptions {
1286
+ /** set to `true` if you wish to receive back the updated BillableItems in the response */
1287
+ returnEntity?: boolean;
1288
+ }
1289
+ export interface BulkUpdateBillableItemTagsOptions {
1290
+ /** List of Tags to assign */
1291
+ assignTags?: Tags;
1292
+ /** List of Tags to unAssign */
1293
+ unassignTags?: Tags;
1294
+ }
1295
+ export interface BulkUpdateBillableItemTagsByFilterOptions {
1296
+ /** List of Tags to assign */
1297
+ assignTags?: Tags;
1298
+ /** List of Tags to unAssign */
1299
+ unassignTags?: Tags;
1300
+ }
1301
+ export {};