@wix/auto_sdk_bookings_categories-v-2 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/bookings-categories-v2-category-categories-v-2.context.d.ts +27 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.context.js +33 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.context.js.map +1 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.d.ts +65 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.js +332 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.js.map +1 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +27 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js +161 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js.map +1 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.d.ts +106 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.js +86 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.js.map +1 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.types.d.ts +372 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.types.js +27 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.types.js.map +1 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.universal.d.ts +780 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js +405 -0
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.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/bookings-categories-v2-category-categories-v-2.context.d.ts +27 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.context.js +27 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.context.js.map +1 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.d.ts +65 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.js +322 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.js.map +1 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +27 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.js +128 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.js.map +1 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.d.ts +106 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.js +73 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.js.map +1 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.types.d.ts +372 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.types.js +24 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.types.js.map +1 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.universal.d.ts +780 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.universal.js +372 -0
- package/build/es/src/bookings-categories-v2-category-categories-v-2.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/bookings-categories-v2-category-categories-v-2.context.d.ts +27 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.context.js +33 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.d.ts +65 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.js +332 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +27 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js +161 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.d.ts +106 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.js +86 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.d.ts +372 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.js +27 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.js.map +1 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.universal.d.ts +780 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js +405 -0
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.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/bookings-categories-v2-category-categories-v-2.context.d.ts +27 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.context.js +27 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.context.js.map +1 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.d.ts +65 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.js +322 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.js.map +1 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +27 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.js +128 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.js.map +1 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.d.ts +106 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.js +73 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.js.map +1 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.types.d.ts +372 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.types.js +24 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.types.js.map +1 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.universal.d.ts +780 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.universal.js +372 -0
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
/** Categories organize services ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)) by controlling the order in which customers see services on the live site and business owners see them in the dashboard. */
|
|
3
|
+
export interface Category {
|
|
4
|
+
/**
|
|
5
|
+
* Category ID.
|
|
6
|
+
* @format GUID
|
|
7
|
+
* @readonly
|
|
8
|
+
*/
|
|
9
|
+
_id?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Revision number, which increments by 1 each time the category is updated.
|
|
12
|
+
* To prevent conflicting changes, you must specify the current revision when updating the category.
|
|
13
|
+
*
|
|
14
|
+
* Ignored when creating a category.
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
revision?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Date and time the category was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
_createdDate?: Date | null;
|
|
23
|
+
/**
|
|
24
|
+
* Date and time the Category was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
_updatedDate?: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* Category name.
|
|
30
|
+
* @minLength 1
|
|
31
|
+
* @maxLength 100
|
|
32
|
+
*/
|
|
33
|
+
name?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Sort order of the category. Determines the relative position of a category in the categories list.
|
|
36
|
+
* Large initial gaps between `sortOrder` values of adjacent categories let Wix Bookings efficiently reorder categories without updating the entire list.
|
|
37
|
+
* If gaps become too small, Wix Bookings automatically restores larger gaps.
|
|
38
|
+
* @readonly
|
|
39
|
+
*/
|
|
40
|
+
sortOrder?: number | null;
|
|
41
|
+
/**
|
|
42
|
+
* Custom field data for the category object.
|
|
43
|
+
*
|
|
44
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
|
|
45
|
+
*/
|
|
46
|
+
extendedFields?: ExtendedFields;
|
|
47
|
+
}
|
|
48
|
+
export interface ExtendedFields {
|
|
49
|
+
/**
|
|
50
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
51
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
52
|
+
*
|
|
53
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
54
|
+
*
|
|
55
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
56
|
+
*/
|
|
57
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
58
|
+
}
|
|
59
|
+
export interface CreateCategoryRequest {
|
|
60
|
+
/** Category to create. */
|
|
61
|
+
category: Category;
|
|
62
|
+
}
|
|
63
|
+
export interface CreateCategoryResponse {
|
|
64
|
+
/** Created category. */
|
|
65
|
+
category?: Category;
|
|
66
|
+
}
|
|
67
|
+
export interface GetCategoryRequest {
|
|
68
|
+
/**
|
|
69
|
+
* ID of the category to retrieve.
|
|
70
|
+
* @format GUID
|
|
71
|
+
*/
|
|
72
|
+
categoryId: string;
|
|
73
|
+
}
|
|
74
|
+
export interface GetCategoryResponse {
|
|
75
|
+
/** Retrieved category. */
|
|
76
|
+
category?: Category;
|
|
77
|
+
}
|
|
78
|
+
export interface UpdateCategoryRequest {
|
|
79
|
+
/** Category to update. */
|
|
80
|
+
category: Category;
|
|
81
|
+
}
|
|
82
|
+
export interface UpdateCategoryResponse {
|
|
83
|
+
/** Updated category. */
|
|
84
|
+
category?: Category;
|
|
85
|
+
}
|
|
86
|
+
export interface DeleteCategoryRequest {
|
|
87
|
+
/**
|
|
88
|
+
* ID of the category to delete.
|
|
89
|
+
* @format GUID
|
|
90
|
+
*/
|
|
91
|
+
categoryId: string;
|
|
92
|
+
}
|
|
93
|
+
export interface DeleteCategoryResponse {
|
|
94
|
+
}
|
|
95
|
+
export interface QueryCategoriesRequest {
|
|
96
|
+
/** WQL expression. */
|
|
97
|
+
query?: CursorQuery;
|
|
98
|
+
}
|
|
99
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
100
|
+
/** 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`. */
|
|
101
|
+
cursorPaging?: CursorPaging;
|
|
102
|
+
/**
|
|
103
|
+
* Filter object in the following format:
|
|
104
|
+
* `"filter" : {
|
|
105
|
+
* "fieldName1": "value1",
|
|
106
|
+
* "fieldName2":{"$operator":"value2"}
|
|
107
|
+
* }`
|
|
108
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
109
|
+
*/
|
|
110
|
+
filter?: Record<string, any> | null;
|
|
111
|
+
/**
|
|
112
|
+
* Sort object in the following format:
|
|
113
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
114
|
+
* @maxSize 5
|
|
115
|
+
*/
|
|
116
|
+
sort?: Sorting[];
|
|
117
|
+
}
|
|
118
|
+
/** @oneof */
|
|
119
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
120
|
+
/** 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`. */
|
|
121
|
+
cursorPaging?: CursorPaging;
|
|
122
|
+
}
|
|
123
|
+
export interface Sorting {
|
|
124
|
+
/**
|
|
125
|
+
* Name of the field to sort by.
|
|
126
|
+
* @maxLength 512
|
|
127
|
+
*/
|
|
128
|
+
fieldName?: string;
|
|
129
|
+
/** Sort order. */
|
|
130
|
+
order?: SortOrder;
|
|
131
|
+
}
|
|
132
|
+
export declare enum SortOrder {
|
|
133
|
+
ASC = "ASC",
|
|
134
|
+
DESC = "DESC"
|
|
135
|
+
}
|
|
136
|
+
export interface CursorPaging {
|
|
137
|
+
/**
|
|
138
|
+
* Maximum number of items to return in the results.
|
|
139
|
+
* @max 100
|
|
140
|
+
*/
|
|
141
|
+
limit?: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* Pointer to the next or previous page in the list of results.
|
|
144
|
+
*
|
|
145
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
146
|
+
* Not relevant for the first request.
|
|
147
|
+
* @maxLength 16000
|
|
148
|
+
*/
|
|
149
|
+
cursor?: string | null;
|
|
150
|
+
}
|
|
151
|
+
export interface QueryCategoriesResponse {
|
|
152
|
+
/** Retrieved categories. */
|
|
153
|
+
categories?: Category[];
|
|
154
|
+
/** Paging metadata. */
|
|
155
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
156
|
+
}
|
|
157
|
+
export interface CursorPagingMetadata {
|
|
158
|
+
/** Number of items returned in the response. */
|
|
159
|
+
count?: number | null;
|
|
160
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
161
|
+
cursors?: Cursors;
|
|
162
|
+
/**
|
|
163
|
+
* Whether there are more pages to retrieve following the current page.
|
|
164
|
+
*
|
|
165
|
+
* + `true`: Another page of results can be retrieved.
|
|
166
|
+
* + `false`: This is the last page.
|
|
167
|
+
*/
|
|
168
|
+
hasNext?: boolean | null;
|
|
169
|
+
}
|
|
170
|
+
export interface Cursors {
|
|
171
|
+
/**
|
|
172
|
+
* Cursor string pointing to the next page in the list of results.
|
|
173
|
+
* @maxLength 16000
|
|
174
|
+
*/
|
|
175
|
+
next?: string | null;
|
|
176
|
+
/**
|
|
177
|
+
* Cursor pointing to the previous page in the list of results.
|
|
178
|
+
* @maxLength 16000
|
|
179
|
+
*/
|
|
180
|
+
prev?: string | null;
|
|
181
|
+
}
|
|
182
|
+
export interface CountCategoriesRequest {
|
|
183
|
+
/** Filter to base the count on. */
|
|
184
|
+
filter?: Record<string, any> | null;
|
|
185
|
+
}
|
|
186
|
+
export interface CountCategoriesResponse {
|
|
187
|
+
/** Number of categories matching the filter. */
|
|
188
|
+
count?: number;
|
|
189
|
+
}
|
|
190
|
+
export interface MoveCategoryRequest {
|
|
191
|
+
/**
|
|
192
|
+
* ID of the category to move.
|
|
193
|
+
* @format GUID
|
|
194
|
+
*/
|
|
195
|
+
categoryId: string;
|
|
196
|
+
/** New position of the category. */
|
|
197
|
+
position?: Position;
|
|
198
|
+
/**
|
|
199
|
+
* ID of the reference category.
|
|
200
|
+
* Specify only for `{"position": "AFTER_CATEGORY"}`.
|
|
201
|
+
* @format GUID
|
|
202
|
+
*/
|
|
203
|
+
afterCategoryId?: string | null;
|
|
204
|
+
}
|
|
205
|
+
export declare enum Position {
|
|
206
|
+
UNKNOWN_POSITION = "UNKNOWN_POSITION",
|
|
207
|
+
/** Place the category at the end of the list. */
|
|
208
|
+
LAST = "LAST",
|
|
209
|
+
/** Place the category at the beginning of the list. */
|
|
210
|
+
FIRST = "FIRST",
|
|
211
|
+
/** Place the category immediately after a specific category. */
|
|
212
|
+
AFTER_CATEGORY = "AFTER_CATEGORY"
|
|
213
|
+
}
|
|
214
|
+
export interface MoveCategoryResponse {
|
|
215
|
+
/** Updated category. */
|
|
216
|
+
category?: Category;
|
|
217
|
+
}
|
|
218
|
+
export interface ImportCategoriesRequest {
|
|
219
|
+
/**
|
|
220
|
+
* List of categories to import.
|
|
221
|
+
* @minSize 1
|
|
222
|
+
* @maxSize 100
|
|
223
|
+
*/
|
|
224
|
+
categories?: Category[];
|
|
225
|
+
}
|
|
226
|
+
export interface ImportCategoriesResponse {
|
|
227
|
+
}
|
|
228
|
+
export interface PublishCategoriesUpdatedRequest {
|
|
229
|
+
}
|
|
230
|
+
export interface PublishCategoriesUpdatedResponse {
|
|
231
|
+
}
|
|
232
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
233
|
+
createdEvent?: EntityCreatedEvent;
|
|
234
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
235
|
+
deletedEvent?: EntityDeletedEvent;
|
|
236
|
+
actionEvent?: ActionEvent;
|
|
237
|
+
/**
|
|
238
|
+
* Unique event ID.
|
|
239
|
+
* Allows clients to ignore duplicate webhooks.
|
|
240
|
+
*/
|
|
241
|
+
_id?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Assumes actions are also always typed to an entity_type
|
|
244
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
245
|
+
*/
|
|
246
|
+
entityFqdn?: string;
|
|
247
|
+
/**
|
|
248
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
249
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
250
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
251
|
+
*/
|
|
252
|
+
slug?: string;
|
|
253
|
+
/** ID of the entity associated with the event. */
|
|
254
|
+
entityId?: string;
|
|
255
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
256
|
+
eventTime?: Date | null;
|
|
257
|
+
/**
|
|
258
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
259
|
+
* (for example, GDPR).
|
|
260
|
+
*/
|
|
261
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
262
|
+
/** If present, indicates the action that triggered the event. */
|
|
263
|
+
originatedFrom?: string | null;
|
|
264
|
+
/**
|
|
265
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
266
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
267
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
268
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
269
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
270
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
271
|
+
*/
|
|
272
|
+
entityEventSequence?: string | null;
|
|
273
|
+
}
|
|
274
|
+
/** @oneof */
|
|
275
|
+
export interface DomainEventBodyOneOf {
|
|
276
|
+
createdEvent?: EntityCreatedEvent;
|
|
277
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
278
|
+
deletedEvent?: EntityDeletedEvent;
|
|
279
|
+
actionEvent?: ActionEvent;
|
|
280
|
+
}
|
|
281
|
+
export interface EntityCreatedEvent {
|
|
282
|
+
entity?: string;
|
|
283
|
+
}
|
|
284
|
+
export interface RestoreInfo {
|
|
285
|
+
deletedDate?: Date | null;
|
|
286
|
+
}
|
|
287
|
+
export interface EntityUpdatedEvent {
|
|
288
|
+
/**
|
|
289
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
290
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
291
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
292
|
+
*/
|
|
293
|
+
currentEntity?: string;
|
|
294
|
+
}
|
|
295
|
+
export interface EntityDeletedEvent {
|
|
296
|
+
/** Entity that was deleted */
|
|
297
|
+
deletedEntity?: string | null;
|
|
298
|
+
}
|
|
299
|
+
export interface ActionEvent {
|
|
300
|
+
body?: string;
|
|
301
|
+
}
|
|
302
|
+
export interface MessageEnvelope {
|
|
303
|
+
/**
|
|
304
|
+
* App instance ID.
|
|
305
|
+
* @format GUID
|
|
306
|
+
*/
|
|
307
|
+
instanceId?: string | null;
|
|
308
|
+
/**
|
|
309
|
+
* Event type.
|
|
310
|
+
* @maxLength 150
|
|
311
|
+
*/
|
|
312
|
+
eventType?: string;
|
|
313
|
+
/** The identification type and identity data. */
|
|
314
|
+
identity?: IdentificationData;
|
|
315
|
+
/** Stringify payload. */
|
|
316
|
+
data?: string;
|
|
317
|
+
}
|
|
318
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
319
|
+
/**
|
|
320
|
+
* ID of a site visitor that has not logged in to the site.
|
|
321
|
+
* @format GUID
|
|
322
|
+
*/
|
|
323
|
+
anonymousVisitorId?: string;
|
|
324
|
+
/**
|
|
325
|
+
* ID of a site visitor that has logged in to the site.
|
|
326
|
+
* @format GUID
|
|
327
|
+
*/
|
|
328
|
+
memberId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
331
|
+
* @format GUID
|
|
332
|
+
*/
|
|
333
|
+
wixUserId?: string;
|
|
334
|
+
/**
|
|
335
|
+
* ID of an app.
|
|
336
|
+
* @format GUID
|
|
337
|
+
*/
|
|
338
|
+
appId?: string;
|
|
339
|
+
/** @readonly */
|
|
340
|
+
identityType?: WebhookIdentityType;
|
|
341
|
+
}
|
|
342
|
+
/** @oneof */
|
|
343
|
+
export interface IdentificationDataIdOneOf {
|
|
344
|
+
/**
|
|
345
|
+
* ID of a site visitor that has not logged in to the site.
|
|
346
|
+
* @format GUID
|
|
347
|
+
*/
|
|
348
|
+
anonymousVisitorId?: string;
|
|
349
|
+
/**
|
|
350
|
+
* ID of a site visitor that has logged in to the site.
|
|
351
|
+
* @format GUID
|
|
352
|
+
*/
|
|
353
|
+
memberId?: string;
|
|
354
|
+
/**
|
|
355
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
356
|
+
* @format GUID
|
|
357
|
+
*/
|
|
358
|
+
wixUserId?: string;
|
|
359
|
+
/**
|
|
360
|
+
* ID of an app.
|
|
361
|
+
* @format GUID
|
|
362
|
+
*/
|
|
363
|
+
appId?: string;
|
|
364
|
+
}
|
|
365
|
+
export declare enum WebhookIdentityType {
|
|
366
|
+
UNKNOWN = "UNKNOWN",
|
|
367
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
368
|
+
MEMBER = "MEMBER",
|
|
369
|
+
WIX_USER = "WIX_USER",
|
|
370
|
+
APP = "APP"
|
|
371
|
+
}
|
|
372
|
+
export interface BaseEventMetadata {
|
|
373
|
+
/**
|
|
374
|
+
* App instance ID.
|
|
375
|
+
* @format GUID
|
|
376
|
+
*/
|
|
377
|
+
instanceId?: string | null;
|
|
378
|
+
/**
|
|
379
|
+
* Event type.
|
|
380
|
+
* @maxLength 150
|
|
381
|
+
*/
|
|
382
|
+
eventType?: string;
|
|
383
|
+
/** The identification type and identity data. */
|
|
384
|
+
identity?: IdentificationData;
|
|
385
|
+
}
|
|
386
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
387
|
+
/**
|
|
388
|
+
* Unique event ID.
|
|
389
|
+
* Allows clients to ignore duplicate webhooks.
|
|
390
|
+
*/
|
|
391
|
+
_id?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Assumes actions are also always typed to an entity_type
|
|
394
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
395
|
+
*/
|
|
396
|
+
entityFqdn?: string;
|
|
397
|
+
/**
|
|
398
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
399
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
400
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
401
|
+
*/
|
|
402
|
+
slug?: string;
|
|
403
|
+
/** ID of the entity associated with the event. */
|
|
404
|
+
entityId?: string;
|
|
405
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
406
|
+
eventTime?: Date | null;
|
|
407
|
+
/**
|
|
408
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
409
|
+
* (for example, GDPR).
|
|
410
|
+
*/
|
|
411
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
412
|
+
/** If present, indicates the action that triggered the event. */
|
|
413
|
+
originatedFrom?: string | null;
|
|
414
|
+
/**
|
|
415
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
416
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
417
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
418
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
419
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
420
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
421
|
+
*/
|
|
422
|
+
entityEventSequence?: string | null;
|
|
423
|
+
}
|
|
424
|
+
export interface CategoryCreatedEnvelope {
|
|
425
|
+
entity: Category;
|
|
426
|
+
metadata: EventMetadata;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Triggered when a category is created.
|
|
430
|
+
* @permissionScope Read Bookings - Public Data
|
|
431
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
432
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
433
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
434
|
+
* @permissionScope Manage Bookings
|
|
435
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
436
|
+
* @permissionScope Read Bookings - Including Participants
|
|
437
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
438
|
+
* @permissionScope Read Bookings - all read permissions
|
|
439
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
440
|
+
* @permissionScope Manage Bookings - all permissions
|
|
441
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
442
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
443
|
+
* @webhook
|
|
444
|
+
* @eventType wix.bookings.categories.v2.category_created
|
|
445
|
+
* @slug created
|
|
446
|
+
*/
|
|
447
|
+
export declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) => void | Promise<void>): void;
|
|
448
|
+
export interface CategoryDeletedEnvelope {
|
|
449
|
+
entity: Category;
|
|
450
|
+
metadata: EventMetadata;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Triggered when a category is deleted.
|
|
454
|
+
* @permissionScope Read Bookings - Public Data
|
|
455
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
456
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
457
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
458
|
+
* @permissionScope Manage Bookings
|
|
459
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
460
|
+
* @permissionScope Read Bookings - Including Participants
|
|
461
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
462
|
+
* @permissionScope Read Bookings - all read permissions
|
|
463
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
464
|
+
* @permissionScope Manage Bookings - all permissions
|
|
465
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
466
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
467
|
+
* @webhook
|
|
468
|
+
* @eventType wix.bookings.categories.v2.category_deleted
|
|
469
|
+
* @slug deleted
|
|
470
|
+
*/
|
|
471
|
+
export declare function onCategoryDeleted(handler: (event: CategoryDeletedEnvelope) => void | Promise<void>): void;
|
|
472
|
+
export interface CategoryUpdatedEnvelope {
|
|
473
|
+
entity: Category;
|
|
474
|
+
metadata: EventMetadata;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Triggered when a category is updated.
|
|
478
|
+
* @permissionScope Read Bookings - Public Data
|
|
479
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
480
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
481
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
482
|
+
* @permissionScope Manage Bookings
|
|
483
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
484
|
+
* @permissionScope Read Bookings - Including Participants
|
|
485
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
486
|
+
* @permissionScope Read Bookings - all read permissions
|
|
487
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
488
|
+
* @permissionScope Manage Bookings - all permissions
|
|
489
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
490
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
491
|
+
* @webhook
|
|
492
|
+
* @eventType wix.bookings.categories.v2.category_updated
|
|
493
|
+
* @slug updated
|
|
494
|
+
*/
|
|
495
|
+
export declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>): void;
|
|
496
|
+
/**
|
|
497
|
+
* Creates a category.
|
|
498
|
+
* @param category - Category to create.
|
|
499
|
+
* @public
|
|
500
|
+
* @requiredField category
|
|
501
|
+
* @requiredField category.name
|
|
502
|
+
* @permissionId BOOKINGS.CATEGORY_CREATE
|
|
503
|
+
* @permissionScope Manage Bookings
|
|
504
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
505
|
+
* @permissionScope Manage Bookings - all permissions
|
|
506
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
507
|
+
* @applicableIdentity APP
|
|
508
|
+
* @returns Created category.
|
|
509
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.CreateCategory
|
|
510
|
+
*/
|
|
511
|
+
export declare function createCategory(category: NonNullablePaths<Category, `name`>): Promise<Category>;
|
|
512
|
+
/**
|
|
513
|
+
* Retrieves a category.
|
|
514
|
+
* @param categoryId - ID of the category to retrieve.
|
|
515
|
+
* @public
|
|
516
|
+
* @requiredField categoryId
|
|
517
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
518
|
+
* @permissionScope Read Bookings - Public Data
|
|
519
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
520
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
521
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
522
|
+
* @permissionScope Manage Bookings
|
|
523
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
524
|
+
* @permissionScope Read Bookings - Including Participants
|
|
525
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
526
|
+
* @permissionScope Read Bookings - all read permissions
|
|
527
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
528
|
+
* @permissionScope Manage Bookings - all permissions
|
|
529
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
530
|
+
* @applicableIdentity APP
|
|
531
|
+
* @applicableIdentity VISITOR
|
|
532
|
+
* @returns Retrieved category.
|
|
533
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.GetCategory
|
|
534
|
+
*/
|
|
535
|
+
export declare function getCategory(categoryId: string): Promise<Category>;
|
|
536
|
+
/**
|
|
537
|
+
* Updates a category.
|
|
538
|
+
*
|
|
539
|
+
*
|
|
540
|
+
* Each time the category is updated, `revision` increments by 1.
|
|
541
|
+
* You must specify the current `revision` to prevent unintended overwrites.
|
|
542
|
+
*
|
|
543
|
+
* You can't adjust a categories `sortOrder` with this method, call Move Category ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-categories/move-category) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/move-category)) instead.
|
|
544
|
+
* @param _id - Category ID.
|
|
545
|
+
* @public
|
|
546
|
+
* @requiredField _id
|
|
547
|
+
* @requiredField category
|
|
548
|
+
* @requiredField category.revision
|
|
549
|
+
* @permissionId BOOKINGS.CATEGORY_UPDATE
|
|
550
|
+
* @permissionScope Manage Bookings
|
|
551
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
552
|
+
* @permissionScope Manage Bookings - all permissions
|
|
553
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
554
|
+
* @applicableIdentity APP
|
|
555
|
+
* @returns Updated category.
|
|
556
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.UpdateCategory
|
|
557
|
+
*/
|
|
558
|
+
export declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision`>): Promise<Category>;
|
|
559
|
+
export interface UpdateCategory {
|
|
560
|
+
/**
|
|
561
|
+
* Category ID.
|
|
562
|
+
* @format GUID
|
|
563
|
+
* @readonly
|
|
564
|
+
*/
|
|
565
|
+
_id?: string | null;
|
|
566
|
+
/**
|
|
567
|
+
* Revision number, which increments by 1 each time the category is updated.
|
|
568
|
+
* To prevent conflicting changes, you must specify the current revision when updating the category.
|
|
569
|
+
*
|
|
570
|
+
* Ignored when creating a category.
|
|
571
|
+
* @readonly
|
|
572
|
+
*/
|
|
573
|
+
revision?: string | null;
|
|
574
|
+
/**
|
|
575
|
+
* Date and time the category was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
576
|
+
* @readonly
|
|
577
|
+
*/
|
|
578
|
+
_createdDate?: Date | null;
|
|
579
|
+
/**
|
|
580
|
+
* Date and time the Category was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
581
|
+
* @readonly
|
|
582
|
+
*/
|
|
583
|
+
_updatedDate?: Date | null;
|
|
584
|
+
/**
|
|
585
|
+
* Category name.
|
|
586
|
+
* @minLength 1
|
|
587
|
+
* @maxLength 100
|
|
588
|
+
*/
|
|
589
|
+
name?: string | null;
|
|
590
|
+
/**
|
|
591
|
+
* Sort order of the category. Determines the relative position of a category in the categories list.
|
|
592
|
+
* Large initial gaps between `sortOrder` values of adjacent categories let Wix Bookings efficiently reorder categories without updating the entire list.
|
|
593
|
+
* If gaps become too small, Wix Bookings automatically restores larger gaps.
|
|
594
|
+
* @readonly
|
|
595
|
+
*/
|
|
596
|
+
sortOrder?: number | null;
|
|
597
|
+
/**
|
|
598
|
+
* Custom field data for the category object.
|
|
599
|
+
*
|
|
600
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
|
|
601
|
+
*/
|
|
602
|
+
extendedFields?: ExtendedFields;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Deletes a category.
|
|
606
|
+
*
|
|
607
|
+
*
|
|
608
|
+
* ## Impact on connected services
|
|
609
|
+
*
|
|
610
|
+
* When you delete a category, any services linked to it remain associated with the now-deleted category. Wix Bookings still displays these services to business owners in the dashboard, but they aren't visible to customers on the live site.
|
|
611
|
+
* Attempting to call Update Service ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service)) for a service that's linked to a deleted category fails, unless you specify a different, existing category ID in `service.category.id`.
|
|
612
|
+
* @param categoryId - ID of the category to delete.
|
|
613
|
+
* @public
|
|
614
|
+
* @requiredField categoryId
|
|
615
|
+
* @permissionId BOOKINGS.CATEGORY_DELETE
|
|
616
|
+
* @permissionScope Manage Bookings
|
|
617
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
618
|
+
* @permissionScope Manage Bookings - all permissions
|
|
619
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
620
|
+
* @applicableIdentity APP
|
|
621
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.DeleteCategory
|
|
622
|
+
*/
|
|
623
|
+
export declare function deleteCategory(categoryId: string): Promise<void>;
|
|
624
|
+
/**
|
|
625
|
+
* Retrieves up to 1000 categories, given the specified paging, filtering, and sorting.
|
|
626
|
+
*
|
|
627
|
+
*
|
|
628
|
+
* ## Defaults
|
|
629
|
+
*
|
|
630
|
+
* Query Categories has the following default settings, which you can override:
|
|
631
|
+
*
|
|
632
|
+
* - Most responses are sorted by `id` in ascending order.
|
|
633
|
+
* *Tip**: Always specify a sort order to ensure consistent results.
|
|
634
|
+
* - `cursorPaging.limit` set to `50`.
|
|
635
|
+
*
|
|
636
|
+
* ## Filters
|
|
637
|
+
*
|
|
638
|
+
* Refer to the Supported Filters article ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/filtering-and-sorting)) for a complete list of supported filters and sorting options.
|
|
639
|
+
*
|
|
640
|
+
* ## See also
|
|
641
|
+
*
|
|
642
|
+
* To learn about working with Query methods in general, see:
|
|
643
|
+
*
|
|
644
|
+
* - API Query Language ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)).
|
|
645
|
+
* - Sorting ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging#sort-query-endpoints)).
|
|
646
|
+
* - Paging ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-paging-object) | [REST](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging#paging)).
|
|
647
|
+
* @public
|
|
648
|
+
* @permissionScope Read Bookings - Public Data
|
|
649
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
650
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
651
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
652
|
+
* @permissionScope Manage Bookings
|
|
653
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
654
|
+
* @permissionScope Read Bookings - Including Participants
|
|
655
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
656
|
+
* @permissionScope Read Bookings - all read permissions
|
|
657
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
658
|
+
* @permissionScope Manage Bookings - all permissions
|
|
659
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
660
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
661
|
+
* @applicableIdentity APP
|
|
662
|
+
* @applicableIdentity VISITOR
|
|
663
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.QueryCategories
|
|
664
|
+
*/
|
|
665
|
+
export declare function queryCategories(): CategoriesQueryBuilder;
|
|
666
|
+
interface QueryCursorResult {
|
|
667
|
+
cursors: Cursors;
|
|
668
|
+
hasNext: () => boolean;
|
|
669
|
+
hasPrev: () => boolean;
|
|
670
|
+
length: number;
|
|
671
|
+
pageSize: number;
|
|
672
|
+
}
|
|
673
|
+
export interface CategoriesQueryResult extends QueryCursorResult {
|
|
674
|
+
items: Category[];
|
|
675
|
+
query: CategoriesQueryBuilder;
|
|
676
|
+
next: () => Promise<CategoriesQueryResult>;
|
|
677
|
+
prev: () => Promise<CategoriesQueryResult>;
|
|
678
|
+
}
|
|
679
|
+
export interface CategoriesQueryBuilder {
|
|
680
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
681
|
+
* @param value - Value to compare against.
|
|
682
|
+
*/
|
|
683
|
+
eq: (propertyName: '_id' | 'name' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
684
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
685
|
+
* @param value - Value to compare against.
|
|
686
|
+
*/
|
|
687
|
+
ne: (propertyName: '_id' | 'name' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
688
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
689
|
+
* @param value - Value to compare against.
|
|
690
|
+
*/
|
|
691
|
+
ge: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
692
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
693
|
+
* @param value - Value to compare against.
|
|
694
|
+
*/
|
|
695
|
+
gt: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
696
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
697
|
+
* @param value - Value to compare against.
|
|
698
|
+
*/
|
|
699
|
+
le: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
700
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
701
|
+
* @param value - Value to compare against.
|
|
702
|
+
*/
|
|
703
|
+
lt: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
704
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
705
|
+
* @param string - String to compare against. Case-insensitive.
|
|
706
|
+
*/
|
|
707
|
+
startsWith: (propertyName: '_id' | 'name', value: string) => CategoriesQueryBuilder;
|
|
708
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
709
|
+
* @param values - List of values to compare against.
|
|
710
|
+
*/
|
|
711
|
+
hasSome: (propertyName: '_id' | 'name' | 'sortOrder', value: any[]) => CategoriesQueryBuilder;
|
|
712
|
+
in: (propertyName: '_id' | 'name' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
713
|
+
exists: (propertyName: '_id' | 'name' | 'sortOrder', value: boolean) => CategoriesQueryBuilder;
|
|
714
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
715
|
+
ascending: (...propertyNames: Array<'_id' | 'name' | 'sortOrder'>) => CategoriesQueryBuilder;
|
|
716
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
717
|
+
descending: (...propertyNames: Array<'_id' | 'name' | 'sortOrder'>) => CategoriesQueryBuilder;
|
|
718
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
719
|
+
limit: (limit: number) => CategoriesQueryBuilder;
|
|
720
|
+
/** @param cursor - A pointer to specific record */
|
|
721
|
+
skipTo: (cursor: string) => CategoriesQueryBuilder;
|
|
722
|
+
find: () => Promise<CategoriesQueryResult>;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Counts categories, given the specified filtering.
|
|
726
|
+
*
|
|
727
|
+
*
|
|
728
|
+
* Refer to the Supported Filters article ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/filtering-and-sorting)) for a complete list of supported filters.
|
|
729
|
+
* @public
|
|
730
|
+
* @permissionId BOOKINGS.CATEGORY_READ
|
|
731
|
+
* @permissionScope Read Bookings - Public Data
|
|
732
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
733
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
734
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
735
|
+
* @permissionScope Manage Bookings
|
|
736
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
737
|
+
* @permissionScope Read Bookings - Including Participants
|
|
738
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
739
|
+
* @permissionScope Read Bookings - all read permissions
|
|
740
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
741
|
+
* @permissionScope Manage Bookings - all permissions
|
|
742
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
743
|
+
* @applicableIdentity APP
|
|
744
|
+
* @applicableIdentity VISITOR
|
|
745
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.CountCategories
|
|
746
|
+
*/
|
|
747
|
+
export declare function countCategories(options?: CountCategoriesOptions): Promise<NonNullablePaths<CountCategoriesResponse, `count`>>;
|
|
748
|
+
export interface CountCategoriesOptions {
|
|
749
|
+
/** Filter to base the count on. */
|
|
750
|
+
filter?: Record<string, any> | null;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Moves a category to the start, the end, or immediately after a specified category in the list.
|
|
754
|
+
*
|
|
755
|
+
*
|
|
756
|
+
* Large initial gaps between `sortOrder` values let Wix Bookings efficiently reorder categories without updating the entire list.
|
|
757
|
+
* If gaps become too small, Wix Bookings automatically restores larger gaps.
|
|
758
|
+
* @param categoryId - ID of the category to move.
|
|
759
|
+
* @public
|
|
760
|
+
* @requiredField categoryId
|
|
761
|
+
* @permissionId BOOKINGS.CATEGORY_MOVE
|
|
762
|
+
* @permissionScope Manage Bookings
|
|
763
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
764
|
+
* @permissionScope Manage Bookings - all permissions
|
|
765
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
766
|
+
* @applicableIdentity APP
|
|
767
|
+
* @fqn wix.bookings.categories.v2.CategoriesService.MoveCategory
|
|
768
|
+
*/
|
|
769
|
+
export declare function moveCategory(categoryId: string, options?: MoveCategoryOptions): Promise<MoveCategoryResponse>;
|
|
770
|
+
export interface MoveCategoryOptions {
|
|
771
|
+
/** New position of the category. */
|
|
772
|
+
position?: Position;
|
|
773
|
+
/**
|
|
774
|
+
* ID of the reference category.
|
|
775
|
+
* Specify only for `{"position": "AFTER_CATEGORY"}`.
|
|
776
|
+
* @format GUID
|
|
777
|
+
*/
|
|
778
|
+
afterCategoryId?: string | null;
|
|
779
|
+
}
|
|
780
|
+
export {};
|