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