@wix/auto_sdk_bookings_categories-v-2 1.0.6 → 1.0.8
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/{internal/cjs/src/bookings-categories-v2-category-categories-v-2.universal.d.ts → bookings-categories-v2-category-categories-v-2.universal-jn7yfKDq.d.mts} +54 -273
- package/build/{internal/es/src/bookings-categories-v2-category-categories-v-2.universal.d.ts → bookings-categories-v2-category-categories-v-2.universal-jn7yfKDq.d.ts} +54 -273
- package/build/index.d.mts +118 -0
- package/build/index.d.ts +118 -0
- package/build/index.js +664 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +628 -0
- package/build/index.mjs.map +1 -0
- package/build/{cjs/src/bookings-categories-v2-category-categories-v-2.universal.d.ts → internal/bookings-categories-v2-category-categories-v-2.universal-jn7yfKDq.d.mts} +54 -273
- package/build/{es/src/bookings-categories-v2-category-categories-v-2.universal.d.ts → internal/bookings-categories-v2-category-categories-v-2.universal-jn7yfKDq.d.ts} +54 -273
- package/build/internal/index.d.mts +118 -0
- package/build/internal/index.d.ts +118 -0
- package/build/internal/index.js +664 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +628 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{cjs/src/bookings-categories-v2-category-categories-v-2.types.d.ts → internal/meta.d.mts} +56 -176
- package/build/{es/src/bookings-categories-v2-category-categories-v-2.types.d.ts → internal/meta.d.ts} +56 -176
- package/build/internal/meta.js +436 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +403 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.d.ts → meta.d.mts} +56 -176
- package/build/{internal/es/src/bookings-categories-v2-category-categories-v-2.types.d.ts → meta.d.ts} +56 -176
- package/build/meta.js +436 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +403 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.context.d.ts +0 -27
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.context.js +0 -33
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.context.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.d.ts +0 -57
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.js +0 -324
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.http.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +0 -27
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js +0 -161
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.d.ts +0 -98
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.js +0 -86
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.public.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.types.js +0 -27
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.types.js.map +0 -1
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js +0 -399
- package/build/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.context.d.ts +0 -27
- package/build/es/src/bookings-categories-v2-category-categories-v-2.context.js +0 -27
- package/build/es/src/bookings-categories-v2-category-categories-v-2.context.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.d.ts +0 -57
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.js +0 -314
- package/build/es/src/bookings-categories-v2-category-categories-v-2.http.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +0 -27
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.js +0 -128
- package/build/es/src/bookings-categories-v2-category-categories-v-2.meta.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.d.ts +0 -98
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.js +0 -73
- package/build/es/src/bookings-categories-v2-category-categories-v-2.public.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.types.js +0 -24
- package/build/es/src/bookings-categories-v2-category-categories-v-2.types.js.map +0 -1
- package/build/es/src/bookings-categories-v2-category-categories-v-2.universal.js +0 -366
- package/build/es/src/bookings-categories-v2-category-categories-v-2.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.context.d.ts +0 -27
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.context.js +0 -33
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.context.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.d.ts +0 -57
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.js +0 -324
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.http.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +0 -27
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js +0 -161
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.d.ts +0 -98
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.js +0 -86
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.public.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.js +0 -27
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.types.js.map +0 -1
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js +0 -399
- package/build/internal/cjs/src/bookings-categories-v2-category-categories-v-2.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.context.d.ts +0 -27
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.context.js +0 -27
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.context.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.d.ts +0 -57
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.js +0 -314
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.http.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.d.ts +0 -27
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.js +0 -128
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.meta.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.d.ts +0 -98
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.js +0 -73
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.public.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.types.js +0 -24
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.types.js.map +0 -1
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.universal.js +0 -366
- package/build/internal/es/src/bookings-categories-v2-category-categories-v-2.universal.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
1
|
/** 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
|
-
|
|
2
|
+
interface Category {
|
|
4
3
|
/**
|
|
5
4
|
* Category ID.
|
|
6
5
|
* @format GUID
|
|
@@ -44,7 +43,7 @@ export interface Category {
|
|
|
44
43
|
*/
|
|
45
44
|
extendedFields?: ExtendedFields;
|
|
46
45
|
}
|
|
47
|
-
|
|
46
|
+
interface ExtendedFields {
|
|
48
47
|
/**
|
|
49
48
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
50
49
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -55,47 +54,47 @@ export interface ExtendedFields {
|
|
|
55
54
|
*/
|
|
56
55
|
namespaces?: Record<string, Record<string, any>>;
|
|
57
56
|
}
|
|
58
|
-
|
|
57
|
+
interface CreateCategoryRequest {
|
|
59
58
|
/** Category to create. */
|
|
60
59
|
category: Category;
|
|
61
60
|
}
|
|
62
|
-
|
|
61
|
+
interface CreateCategoryResponse {
|
|
63
62
|
/** Created category. */
|
|
64
63
|
category?: Category;
|
|
65
64
|
}
|
|
66
|
-
|
|
65
|
+
interface GetCategoryRequest {
|
|
67
66
|
/**
|
|
68
67
|
* ID of the category to retrieve.
|
|
69
68
|
* @format GUID
|
|
70
69
|
*/
|
|
71
70
|
categoryId: string;
|
|
72
71
|
}
|
|
73
|
-
|
|
72
|
+
interface GetCategoryResponse {
|
|
74
73
|
/** Retrieved category. */
|
|
75
74
|
category?: Category;
|
|
76
75
|
}
|
|
77
|
-
|
|
76
|
+
interface UpdateCategoryRequest {
|
|
78
77
|
/** Category to update. */
|
|
79
78
|
category: Category;
|
|
80
79
|
}
|
|
81
|
-
|
|
80
|
+
interface UpdateCategoryResponse {
|
|
82
81
|
/** Updated category. */
|
|
83
82
|
category?: Category;
|
|
84
83
|
}
|
|
85
|
-
|
|
84
|
+
interface DeleteCategoryRequest {
|
|
86
85
|
/**
|
|
87
86
|
* ID of the category to delete.
|
|
88
87
|
* @format GUID
|
|
89
88
|
*/
|
|
90
89
|
categoryId: string;
|
|
91
90
|
}
|
|
92
|
-
|
|
91
|
+
interface DeleteCategoryResponse {
|
|
93
92
|
}
|
|
94
|
-
|
|
93
|
+
interface QueryCategoriesRequest {
|
|
95
94
|
/** WQL expression. */
|
|
96
95
|
query?: CursorQuery;
|
|
97
96
|
}
|
|
98
|
-
|
|
97
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
99
98
|
/** 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`. */
|
|
100
99
|
cursorPaging?: CursorPaging;
|
|
101
100
|
/**
|
|
@@ -115,11 +114,11 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
115
114
|
sort?: Sorting[];
|
|
116
115
|
}
|
|
117
116
|
/** @oneof */
|
|
118
|
-
|
|
117
|
+
interface CursorQueryPagingMethodOneOf {
|
|
119
118
|
/** 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`. */
|
|
120
119
|
cursorPaging?: CursorPaging;
|
|
121
120
|
}
|
|
122
|
-
|
|
121
|
+
interface Sorting {
|
|
123
122
|
/**
|
|
124
123
|
* Name of the field to sort by.
|
|
125
124
|
* @maxLength 512
|
|
@@ -128,13 +127,13 @@ export interface Sorting {
|
|
|
128
127
|
/** Sort order. */
|
|
129
128
|
order?: SortOrderWithLiterals;
|
|
130
129
|
}
|
|
131
|
-
|
|
130
|
+
declare enum SortOrder {
|
|
132
131
|
ASC = "ASC",
|
|
133
132
|
DESC = "DESC"
|
|
134
133
|
}
|
|
135
134
|
/** @enumType */
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
136
|
+
interface CursorPaging {
|
|
138
137
|
/**
|
|
139
138
|
* Maximum number of items to return in the results.
|
|
140
139
|
* @max 100
|
|
@@ -149,13 +148,13 @@ export interface CursorPaging {
|
|
|
149
148
|
*/
|
|
150
149
|
cursor?: string | null;
|
|
151
150
|
}
|
|
152
|
-
|
|
151
|
+
interface QueryCategoriesResponse {
|
|
153
152
|
/** Retrieved categories. */
|
|
154
153
|
categories?: Category[];
|
|
155
154
|
/** Paging metadata. */
|
|
156
155
|
pagingMetadata?: CursorPagingMetadata;
|
|
157
156
|
}
|
|
158
|
-
|
|
157
|
+
interface CursorPagingMetadata {
|
|
159
158
|
/** Number of items returned in the response. */
|
|
160
159
|
count?: number | null;
|
|
161
160
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -168,7 +167,7 @@ export interface CursorPagingMetadata {
|
|
|
168
167
|
*/
|
|
169
168
|
hasNext?: boolean | null;
|
|
170
169
|
}
|
|
171
|
-
|
|
170
|
+
interface Cursors {
|
|
172
171
|
/**
|
|
173
172
|
* Cursor string pointing to the next page in the list of results.
|
|
174
173
|
* @maxLength 16000
|
|
@@ -180,15 +179,15 @@ export interface Cursors {
|
|
|
180
179
|
*/
|
|
181
180
|
prev?: string | null;
|
|
182
181
|
}
|
|
183
|
-
|
|
182
|
+
interface CountCategoriesRequest {
|
|
184
183
|
/** Filter to base the count on. */
|
|
185
184
|
filter?: Record<string, any> | null;
|
|
186
185
|
}
|
|
187
|
-
|
|
186
|
+
interface CountCategoriesResponse {
|
|
188
187
|
/** Number of categories matching the filter. */
|
|
189
188
|
count?: number;
|
|
190
189
|
}
|
|
191
|
-
|
|
190
|
+
interface MoveCategoryRequest {
|
|
192
191
|
/**
|
|
193
192
|
* ID of the category to move.
|
|
194
193
|
* @format GUID
|
|
@@ -203,7 +202,7 @@ export interface MoveCategoryRequest {
|
|
|
203
202
|
*/
|
|
204
203
|
afterCategoryId?: string | null;
|
|
205
204
|
}
|
|
206
|
-
|
|
205
|
+
declare enum Position {
|
|
207
206
|
UNKNOWN_POSITION = "UNKNOWN_POSITION",
|
|
208
207
|
/** Place the category at the end of the list. */
|
|
209
208
|
LAST = "LAST",
|
|
@@ -213,12 +212,12 @@ export declare enum Position {
|
|
|
213
212
|
AFTER_CATEGORY = "AFTER_CATEGORY"
|
|
214
213
|
}
|
|
215
214
|
/** @enumType */
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
type PositionWithLiterals = Position | 'UNKNOWN_POSITION' | 'LAST' | 'FIRST' | 'AFTER_CATEGORY';
|
|
216
|
+
interface MoveCategoryResponse {
|
|
218
217
|
/** Updated category. */
|
|
219
218
|
category?: Category;
|
|
220
219
|
}
|
|
221
|
-
|
|
220
|
+
interface ImportCategoriesRequest {
|
|
222
221
|
/**
|
|
223
222
|
* List of categories to import.
|
|
224
223
|
* @minSize 1
|
|
@@ -226,13 +225,13 @@ export interface ImportCategoriesRequest {
|
|
|
226
225
|
*/
|
|
227
226
|
categories?: Category[];
|
|
228
227
|
}
|
|
229
|
-
|
|
228
|
+
interface ImportCategoriesResponse {
|
|
230
229
|
}
|
|
231
|
-
|
|
230
|
+
interface PublishCategoriesUpdatedRequest {
|
|
232
231
|
}
|
|
233
|
-
|
|
232
|
+
interface PublishCategoriesUpdatedResponse {
|
|
234
233
|
}
|
|
235
|
-
|
|
234
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
236
235
|
createdEvent?: EntityCreatedEvent;
|
|
237
236
|
updatedEvent?: EntityUpdatedEvent;
|
|
238
237
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -267,19 +266,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
267
266
|
entityEventSequence?: string | null;
|
|
268
267
|
}
|
|
269
268
|
/** @oneof */
|
|
270
|
-
|
|
269
|
+
interface DomainEventBodyOneOf {
|
|
271
270
|
createdEvent?: EntityCreatedEvent;
|
|
272
271
|
updatedEvent?: EntityUpdatedEvent;
|
|
273
272
|
deletedEvent?: EntityDeletedEvent;
|
|
274
273
|
actionEvent?: ActionEvent;
|
|
275
274
|
}
|
|
276
|
-
|
|
275
|
+
interface EntityCreatedEvent {
|
|
277
276
|
entity?: string;
|
|
278
277
|
}
|
|
279
|
-
|
|
278
|
+
interface RestoreInfo {
|
|
280
279
|
deletedDate?: Date | null;
|
|
281
280
|
}
|
|
282
|
-
|
|
281
|
+
interface EntityUpdatedEvent {
|
|
283
282
|
/**
|
|
284
283
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
285
284
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -287,14 +286,14 @@ export interface EntityUpdatedEvent {
|
|
|
287
286
|
*/
|
|
288
287
|
currentEntity?: string;
|
|
289
288
|
}
|
|
290
|
-
|
|
289
|
+
interface EntityDeletedEvent {
|
|
291
290
|
/** Entity that was deleted. */
|
|
292
291
|
deletedEntity?: string | null;
|
|
293
292
|
}
|
|
294
|
-
|
|
293
|
+
interface ActionEvent {
|
|
295
294
|
body?: string;
|
|
296
295
|
}
|
|
297
|
-
|
|
296
|
+
interface MessageEnvelope {
|
|
298
297
|
/**
|
|
299
298
|
* App instance ID.
|
|
300
299
|
* @format GUID
|
|
@@ -310,7 +309,7 @@ export interface MessageEnvelope {
|
|
|
310
309
|
/** Stringify payload. */
|
|
311
310
|
data?: string;
|
|
312
311
|
}
|
|
313
|
-
|
|
312
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
314
313
|
/**
|
|
315
314
|
* ID of a site visitor that has not logged in to the site.
|
|
316
315
|
* @format GUID
|
|
@@ -335,7 +334,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
335
334
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
336
335
|
}
|
|
337
336
|
/** @oneof */
|
|
338
|
-
|
|
337
|
+
interface IdentificationDataIdOneOf {
|
|
339
338
|
/**
|
|
340
339
|
* ID of a site visitor that has not logged in to the site.
|
|
341
340
|
* @format GUID
|
|
@@ -357,7 +356,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
357
356
|
*/
|
|
358
357
|
appId?: string;
|
|
359
358
|
}
|
|
360
|
-
|
|
359
|
+
declare enum WebhookIdentityType {
|
|
361
360
|
UNKNOWN = "UNKNOWN",
|
|
362
361
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
363
362
|
MEMBER = "MEMBER",
|
|
@@ -365,8 +364,8 @@ export declare enum WebhookIdentityType {
|
|
|
365
364
|
APP = "APP"
|
|
366
365
|
}
|
|
367
366
|
/** @enumType */
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
368
|
+
interface BaseEventMetadata {
|
|
370
369
|
/**
|
|
371
370
|
* App instance ID.
|
|
372
371
|
* @format GUID
|
|
@@ -380,7 +379,7 @@ export interface BaseEventMetadata {
|
|
|
380
379
|
/** The identification type and identity data. */
|
|
381
380
|
identity?: IdentificationData;
|
|
382
381
|
}
|
|
383
|
-
|
|
382
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
384
383
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
385
384
|
_id?: string;
|
|
386
385
|
/**
|
|
@@ -410,142 +409,19 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
410
409
|
*/
|
|
411
410
|
entityEventSequence?: string | null;
|
|
412
411
|
}
|
|
413
|
-
|
|
412
|
+
interface CategoryCreatedEnvelope {
|
|
414
413
|
entity: Category;
|
|
415
414
|
metadata: EventMetadata;
|
|
416
415
|
}
|
|
417
|
-
|
|
418
|
-
* Triggered when a category is created.
|
|
419
|
-
* @permissionScope Read Bookings - Public Data
|
|
420
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
421
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
422
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
423
|
-
* @permissionScope Manage Bookings
|
|
424
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
425
|
-
* @permissionScope Read Bookings - Including Participants
|
|
426
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
427
|
-
* @permissionScope Read Bookings - all read permissions
|
|
428
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
429
|
-
* @permissionScope Manage Bookings - all permissions
|
|
430
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
431
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
432
|
-
* @webhook
|
|
433
|
-
* @eventType wix.bookings.categories.v2.category_created
|
|
434
|
-
* @slug created
|
|
435
|
-
*/
|
|
436
|
-
export declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) => void | Promise<void>): void;
|
|
437
|
-
export interface CategoryDeletedEnvelope {
|
|
416
|
+
interface CategoryDeletedEnvelope {
|
|
438
417
|
entity: Category;
|
|
439
418
|
metadata: EventMetadata;
|
|
440
419
|
}
|
|
441
|
-
|
|
442
|
-
* Triggered when a category is deleted.
|
|
443
|
-
* @permissionScope Read Bookings - Public Data
|
|
444
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
445
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
446
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
447
|
-
* @permissionScope Manage Bookings
|
|
448
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
449
|
-
* @permissionScope Read Bookings - Including Participants
|
|
450
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
451
|
-
* @permissionScope Read Bookings - all read permissions
|
|
452
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
453
|
-
* @permissionScope Manage Bookings - all permissions
|
|
454
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
455
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
456
|
-
* @webhook
|
|
457
|
-
* @eventType wix.bookings.categories.v2.category_deleted
|
|
458
|
-
* @slug deleted
|
|
459
|
-
*/
|
|
460
|
-
export declare function onCategoryDeleted(handler: (event: CategoryDeletedEnvelope) => void | Promise<void>): void;
|
|
461
|
-
export interface CategoryUpdatedEnvelope {
|
|
420
|
+
interface CategoryUpdatedEnvelope {
|
|
462
421
|
entity: Category;
|
|
463
422
|
metadata: EventMetadata;
|
|
464
423
|
}
|
|
465
|
-
|
|
466
|
-
* Triggered when a category is updated.
|
|
467
|
-
* @permissionScope Read Bookings - Public Data
|
|
468
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
469
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
470
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
471
|
-
* @permissionScope Manage Bookings
|
|
472
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
473
|
-
* @permissionScope Read Bookings - Including Participants
|
|
474
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
475
|
-
* @permissionScope Read Bookings - all read permissions
|
|
476
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
477
|
-
* @permissionScope Manage Bookings - all permissions
|
|
478
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
479
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
480
|
-
* @webhook
|
|
481
|
-
* @eventType wix.bookings.categories.v2.category_updated
|
|
482
|
-
* @slug updated
|
|
483
|
-
*/
|
|
484
|
-
export declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>): void;
|
|
485
|
-
/**
|
|
486
|
-
* Creates a category.
|
|
487
|
-
* @param category - Category to create.
|
|
488
|
-
* @public
|
|
489
|
-
* @requiredField category
|
|
490
|
-
* @requiredField category.name
|
|
491
|
-
* @permissionId BOOKINGS.CATEGORY_CREATE
|
|
492
|
-
* @permissionScope Manage Bookings
|
|
493
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
494
|
-
* @permissionScope Manage Bookings - all permissions
|
|
495
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
496
|
-
* @applicableIdentity APP
|
|
497
|
-
* @returns Created category.
|
|
498
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.CreateCategory
|
|
499
|
-
*/
|
|
500
|
-
export declare function createCategory(category: NonNullablePaths<Category, `name`>): Promise<Category>;
|
|
501
|
-
/**
|
|
502
|
-
* Retrieves a category.
|
|
503
|
-
* @param categoryId - ID of the category to retrieve.
|
|
504
|
-
* @public
|
|
505
|
-
* @requiredField categoryId
|
|
506
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
507
|
-
* @permissionScope Read Bookings - Public Data
|
|
508
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
509
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
510
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
511
|
-
* @permissionScope Manage Bookings
|
|
512
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
513
|
-
* @permissionScope Read Bookings - Including Participants
|
|
514
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
515
|
-
* @permissionScope Read Bookings - all read permissions
|
|
516
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
517
|
-
* @permissionScope Manage Bookings - all permissions
|
|
518
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
519
|
-
* @applicableIdentity APP
|
|
520
|
-
* @applicableIdentity VISITOR
|
|
521
|
-
* @returns Retrieved category.
|
|
522
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.GetCategory
|
|
523
|
-
*/
|
|
524
|
-
export declare function getCategory(categoryId: string): Promise<Category>;
|
|
525
|
-
/**
|
|
526
|
-
* Updates a category.
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* Each time the category is updated, `revision` increments by 1.
|
|
530
|
-
* You must specify the current `revision` to prevent unintended overwrites.
|
|
531
|
-
*
|
|
532
|
-
* 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.
|
|
533
|
-
* @param _id - Category ID.
|
|
534
|
-
* @public
|
|
535
|
-
* @requiredField _id
|
|
536
|
-
* @requiredField category
|
|
537
|
-
* @requiredField category.revision
|
|
538
|
-
* @permissionId BOOKINGS.CATEGORY_UPDATE
|
|
539
|
-
* @permissionScope Manage Bookings
|
|
540
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
541
|
-
* @permissionScope Manage Bookings - all permissions
|
|
542
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
543
|
-
* @applicableIdentity APP
|
|
544
|
-
* @returns Updated category.
|
|
545
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.UpdateCategory
|
|
546
|
-
*/
|
|
547
|
-
export declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision`>): Promise<Category>;
|
|
548
|
-
export interface UpdateCategory {
|
|
424
|
+
interface UpdateCategory {
|
|
549
425
|
/**
|
|
550
426
|
* Category ID.
|
|
551
427
|
* @format GUID
|
|
@@ -589,62 +465,6 @@ export interface UpdateCategory {
|
|
|
589
465
|
*/
|
|
590
466
|
extendedFields?: ExtendedFields;
|
|
591
467
|
}
|
|
592
|
-
/**
|
|
593
|
-
* Deletes a category.
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
* ## Impact on connected services
|
|
597
|
-
*
|
|
598
|
-
* 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.
|
|
599
|
-
* 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`.
|
|
600
|
-
* @param categoryId - ID of the category to delete.
|
|
601
|
-
* @public
|
|
602
|
-
* @requiredField categoryId
|
|
603
|
-
* @permissionId BOOKINGS.CATEGORY_DELETE
|
|
604
|
-
* @permissionScope Manage Bookings
|
|
605
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
606
|
-
* @permissionScope Manage Bookings - all permissions
|
|
607
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
608
|
-
* @applicableIdentity APP
|
|
609
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.DeleteCategory
|
|
610
|
-
*/
|
|
611
|
-
export declare function deleteCategory(categoryId: string): Promise<void>;
|
|
612
|
-
/**
|
|
613
|
-
* Creates a query to retrieve a list of `category` objects.
|
|
614
|
-
*
|
|
615
|
-
* The `queryCategories()` function builds a query to retrieve a list of `category` objects and returns a `categoriesQueryBuilder` object.
|
|
616
|
-
*
|
|
617
|
-
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-categories/categories-query-builder/find) function.
|
|
618
|
-
*
|
|
619
|
-
* You can refine the query by chaining `CategoriesQueryBuilder` functions onto the query. `CategoriesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCategories()` returns.
|
|
620
|
-
*
|
|
621
|
-
* `queryCategories()` runs with the following `CategoriesQueryBuilder` defaults that you can override:
|
|
622
|
-
*
|
|
623
|
-
* + `limit` is `100`.
|
|
624
|
-
* + Sorted by `createdDate` in ascending order.
|
|
625
|
-
*
|
|
626
|
-
* The functions that are chained to `queryCategories()` are applied in the order they are called. For example, if you apply `ascending("name")` and then `ascending("id")`, the results are sorted first by `name`, and then, if there are multiple results with the same `name`, the items are sorted by `id`.
|
|
627
|
-
*
|
|
628
|
-
* The following `CategoriesQueryBuilder` functions are supported for the `queryCategories()` function. For a full description of the `category` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-categories/categories-query-result/items) property in `CategoriesQueryResult`.
|
|
629
|
-
* @public
|
|
630
|
-
* @permissionScope Read Bookings - Public Data
|
|
631
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
632
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
633
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
634
|
-
* @permissionScope Manage Bookings
|
|
635
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
636
|
-
* @permissionScope Read Bookings - Including Participants
|
|
637
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
638
|
-
* @permissionScope Read Bookings - all read permissions
|
|
639
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
640
|
-
* @permissionScope Manage Bookings - all permissions
|
|
641
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
642
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
643
|
-
* @applicableIdentity APP
|
|
644
|
-
* @applicableIdentity VISITOR
|
|
645
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.QueryCategories
|
|
646
|
-
*/
|
|
647
|
-
export declare function queryCategories(): CategoriesQueryBuilder;
|
|
648
468
|
interface QueryCursorResult {
|
|
649
469
|
cursors: Cursors;
|
|
650
470
|
hasNext: () => boolean;
|
|
@@ -652,13 +472,13 @@ interface QueryCursorResult {
|
|
|
652
472
|
length: number;
|
|
653
473
|
pageSize: number;
|
|
654
474
|
}
|
|
655
|
-
|
|
475
|
+
interface CategoriesQueryResult extends QueryCursorResult {
|
|
656
476
|
items: Category[];
|
|
657
477
|
query: CategoriesQueryBuilder;
|
|
658
478
|
next: () => Promise<CategoriesQueryResult>;
|
|
659
479
|
prev: () => Promise<CategoriesQueryResult>;
|
|
660
480
|
}
|
|
661
|
-
|
|
481
|
+
interface CategoriesQueryBuilder {
|
|
662
482
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
663
483
|
* @param value - Value to compare against.
|
|
664
484
|
*/
|
|
@@ -703,51 +523,11 @@ export interface CategoriesQueryBuilder {
|
|
|
703
523
|
skipTo: (cursor: string) => CategoriesQueryBuilder;
|
|
704
524
|
find: () => Promise<CategoriesQueryResult>;
|
|
705
525
|
}
|
|
706
|
-
|
|
707
|
-
* Counts categories, given the specified filtering.
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
* 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.
|
|
711
|
-
* @public
|
|
712
|
-
* @permissionId BOOKINGS.CATEGORY_READ
|
|
713
|
-
* @permissionScope Read Bookings - Public Data
|
|
714
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
715
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
716
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
717
|
-
* @permissionScope Manage Bookings
|
|
718
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
719
|
-
* @permissionScope Read Bookings - Including Participants
|
|
720
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
721
|
-
* @permissionScope Read Bookings - all read permissions
|
|
722
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
723
|
-
* @permissionScope Manage Bookings - all permissions
|
|
724
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
725
|
-
* @applicableIdentity APP
|
|
726
|
-
* @applicableIdentity VISITOR
|
|
727
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.CountCategories
|
|
728
|
-
*/
|
|
729
|
-
export declare function countCategories(options?: CountCategoriesOptions): Promise<NonNullablePaths<CountCategoriesResponse, `count`>>;
|
|
730
|
-
export interface CountCategoriesOptions {
|
|
526
|
+
interface CountCategoriesOptions {
|
|
731
527
|
/** Filter to base the count on. */
|
|
732
528
|
filter?: Record<string, any> | null;
|
|
733
529
|
}
|
|
734
|
-
|
|
735
|
-
* Moves a category to the start, end, or immediately after a specified category by updating its `sortOrder` field.
|
|
736
|
-
*
|
|
737
|
-
* Wix Bookings assigns `sortOrder` values with large gaps between categories, allowing efficient reordering without updating the entire list. When gaps become too small, the system automatically reassigns new values to restore larger gaps.
|
|
738
|
-
* @param categoryId - ID of the category to move.
|
|
739
|
-
* @public
|
|
740
|
-
* @requiredField categoryId
|
|
741
|
-
* @permissionId BOOKINGS.CATEGORY_MOVE
|
|
742
|
-
* @permissionScope Manage Bookings
|
|
743
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
744
|
-
* @permissionScope Manage Bookings - all permissions
|
|
745
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
746
|
-
* @applicableIdentity APP
|
|
747
|
-
* @fqn wix.bookings.categories.v2.CategoriesService.MoveCategory
|
|
748
|
-
*/
|
|
749
|
-
export declare function moveCategory(categoryId: string, options?: MoveCategoryOptions): Promise<MoveCategoryResponse>;
|
|
750
|
-
export interface MoveCategoryOptions {
|
|
530
|
+
interface MoveCategoryOptions {
|
|
751
531
|
/** New position of the category. */
|
|
752
532
|
position?: PositionWithLiterals;
|
|
753
533
|
/**
|
|
@@ -757,4 +537,5 @@ export interface MoveCategoryOptions {
|
|
|
757
537
|
*/
|
|
758
538
|
afterCategoryId?: string | null;
|
|
759
539
|
}
|
|
760
|
-
|
|
540
|
+
|
|
541
|
+
export { type DomainEventBodyOneOf as A, type EntityCreatedEvent as B, type Category as C, type DeleteCategoryRequest as D, type ExtendedFields as E, type EntityUpdatedEvent as F, type GetCategoryRequest as G, type EntityDeletedEvent as H, type ImportCategoriesRequest as I, type ActionEvent as J, type MessageEnvelope as K, type IdentificationData as L, type MoveCategoryOptions as M, type IdentificationDataIdOneOf as N, type BaseEventMetadata as O, Position as P, type QueryCategoriesRequest as Q, type RestoreInfo as R, SortOrder as S, type EventMetadata as T, type UpdateCategory as U, type CategoriesQueryResult as V, WebhookIdentityType as W, type CategoriesQueryBuilder as a, type CountCategoriesOptions as b, type CountCategoriesResponse as c, type MoveCategoryResponse as d, type CategoryCreatedEnvelope as e, type CategoryDeletedEnvelope as f, type CategoryUpdatedEnvelope as g, type CreateCategoryRequest as h, type CreateCategoryResponse as i, type GetCategoryResponse as j, type UpdateCategoryRequest as k, type UpdateCategoryResponse as l, type DeleteCategoryResponse as m, type CursorQuery as n, type CursorQueryPagingMethodOneOf as o, type Sorting as p, type CursorPaging as q, type QueryCategoriesResponse as r, type CursorPagingMetadata as s, type Cursors as t, type CountCategoriesRequest as u, type MoveCategoryRequest as v, type ImportCategoriesResponse as w, type PublishCategoriesUpdatedRequest as x, type PublishCategoriesUpdatedResponse as y, type DomainEvent as z };
|