@wix/auto_sdk_bookings_categories 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-v1-category-categories.context.d.ts +12 -0
- package/build/cjs/src/bookings-v1-category-categories.context.js +18 -0
- package/build/cjs/src/bookings-v1-category-categories.context.js.map +1 -0
- package/build/cjs/src/bookings-v1-category-categories.http.d.ts +12 -0
- package/build/cjs/src/bookings-v1-category-categories.http.js +177 -0
- package/build/cjs/src/bookings-v1-category-categories.http.js.map +1 -0
- package/build/cjs/src/bookings-v1-category-categories.meta.d.ts +20 -0
- package/build/cjs/src/bookings-v1-category-categories.meta.js +104 -0
- package/build/cjs/src/bookings-v1-category-categories.meta.js.map +1 -0
- package/build/cjs/src/bookings-v1-category-categories.public.d.ts +40 -0
- package/build/cjs/src/bookings-v1-category-categories.public.js +37 -0
- package/build/cjs/src/bookings-v1-category-categories.public.js.map +1 -0
- package/build/cjs/src/bookings-v1-category-categories.types.d.ts +149 -0
- package/build/cjs/src/bookings-v1-category-categories.types.js +25 -0
- package/build/cjs/src/bookings-v1-category-categories.types.js.map +1 -0
- package/build/cjs/src/bookings-v1-category-categories.universal.d.ts +252 -0
- package/build/cjs/src/bookings-v1-category-categories.universal.js +221 -0
- package/build/cjs/src/bookings-v1-category-categories.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-v1-category-categories.context.d.ts +12 -0
- package/build/es/src/bookings-v1-category-categories.context.js +12 -0
- package/build/es/src/bookings-v1-category-categories.context.js.map +1 -0
- package/build/es/src/bookings-v1-category-categories.http.d.ts +12 -0
- package/build/es/src/bookings-v1-category-categories.http.js +170 -0
- package/build/es/src/bookings-v1-category-categories.http.js.map +1 -0
- package/build/es/src/bookings-v1-category-categories.meta.d.ts +20 -0
- package/build/es/src/bookings-v1-category-categories.meta.js +74 -0
- package/build/es/src/bookings-v1-category-categories.meta.js.map +1 -0
- package/build/es/src/bookings-v1-category-categories.public.d.ts +40 -0
- package/build/es/src/bookings-v1-category-categories.public.js +27 -0
- package/build/es/src/bookings-v1-category-categories.public.js.map +1 -0
- package/build/es/src/bookings-v1-category-categories.types.d.ts +149 -0
- package/build/es/src/bookings-v1-category-categories.types.js +22 -0
- package/build/es/src/bookings-v1-category-categories.types.js.map +1 -0
- package/build/es/src/bookings-v1-category-categories.universal.d.ts +252 -0
- package/build/es/src/bookings-v1-category-categories.universal.js +191 -0
- package/build/es/src/bookings-v1-category-categories.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-v1-category-categories.context.d.ts +12 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.context.js +18 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.http.d.ts +12 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.http.js +177 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.meta.d.ts +20 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.meta.js +104 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.public.d.ts +40 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.public.js +37 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.types.d.ts +149 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.types.js +25 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.types.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.universal.d.ts +275 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.universal.js +221 -0
- package/build/internal/cjs/src/bookings-v1-category-categories.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-v1-category-categories.context.d.ts +12 -0
- package/build/internal/es/src/bookings-v1-category-categories.context.js +12 -0
- package/build/internal/es/src/bookings-v1-category-categories.context.js.map +1 -0
- package/build/internal/es/src/bookings-v1-category-categories.http.d.ts +12 -0
- package/build/internal/es/src/bookings-v1-category-categories.http.js +170 -0
- package/build/internal/es/src/bookings-v1-category-categories.http.js.map +1 -0
- package/build/internal/es/src/bookings-v1-category-categories.meta.d.ts +20 -0
- package/build/internal/es/src/bookings-v1-category-categories.meta.js +74 -0
- package/build/internal/es/src/bookings-v1-category-categories.meta.js.map +1 -0
- package/build/internal/es/src/bookings-v1-category-categories.public.d.ts +40 -0
- package/build/internal/es/src/bookings-v1-category-categories.public.js +27 -0
- package/build/internal/es/src/bookings-v1-category-categories.public.js.map +1 -0
- package/build/internal/es/src/bookings-v1-category-categories.types.d.ts +149 -0
- package/build/internal/es/src/bookings-v1-category-categories.types.js +22 -0
- package/build/internal/es/src/bookings-v1-category-categories.types.js.map +1 -0
- package/build/internal/es/src/bookings-v1-category-categories.universal.d.ts +275 -0
- package/build/internal/es/src/bookings-v1-category-categories.universal.js +191 -0
- package/build/internal/es/src/bookings-v1-category-categories.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */
|
|
2
|
+
export interface Category {
|
|
3
|
+
/**
|
|
4
|
+
* Category ID.
|
|
5
|
+
* @readonly
|
|
6
|
+
*/
|
|
7
|
+
_id?: string | null;
|
|
8
|
+
/** Category name. */
|
|
9
|
+
name?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
* @internal
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
status?: Status;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* @internal */
|
|
19
|
+
sortOrder?: number | null;
|
|
20
|
+
}
|
|
21
|
+
export declare enum Status {
|
|
22
|
+
/** The category was created. */
|
|
23
|
+
CREATED = "CREATED",
|
|
24
|
+
/** The category was deleted. */
|
|
25
|
+
DELETED = "DELETED"
|
|
26
|
+
}
|
|
27
|
+
export interface ListCategoryRequest {
|
|
28
|
+
/** Category IDs. */
|
|
29
|
+
categoryIds?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
* @internal */
|
|
33
|
+
includeDeleted?: boolean | null;
|
|
34
|
+
}
|
|
35
|
+
export interface ListCategoryResponse {
|
|
36
|
+
/** Category information. */
|
|
37
|
+
categories?: Category[];
|
|
38
|
+
}
|
|
39
|
+
/** An event sent every time a category entity is changed. */
|
|
40
|
+
export interface CategoryNotification {
|
|
41
|
+
category?: Category;
|
|
42
|
+
event?: Event;
|
|
43
|
+
}
|
|
44
|
+
export declare enum Event {
|
|
45
|
+
Updated = "Updated",
|
|
46
|
+
Deleted = "Deleted",
|
|
47
|
+
Created = "Created"
|
|
48
|
+
}
|
|
49
|
+
export interface CreateCategoryRequest {
|
|
50
|
+
/** Category information. */
|
|
51
|
+
category: Category;
|
|
52
|
+
}
|
|
53
|
+
export interface CreateCategoryResponse {
|
|
54
|
+
/** Category information. */
|
|
55
|
+
category?: Category;
|
|
56
|
+
}
|
|
57
|
+
export interface BatchCreateCategoryRequest {
|
|
58
|
+
/** Category information. */
|
|
59
|
+
categories?: Category[];
|
|
60
|
+
}
|
|
61
|
+
export interface BatchCreateCategoryResponse {
|
|
62
|
+
/** Category information. */
|
|
63
|
+
categories?: Category[];
|
|
64
|
+
}
|
|
65
|
+
export interface UpdateCategoryRequest {
|
|
66
|
+
category: Category;
|
|
67
|
+
}
|
|
68
|
+
export interface UpdateCategoryResponse {
|
|
69
|
+
/** The updated category. */
|
|
70
|
+
category?: Category;
|
|
71
|
+
}
|
|
72
|
+
export interface DeleteCategoryRequest {
|
|
73
|
+
/** Category ID. */
|
|
74
|
+
_id: string | null;
|
|
75
|
+
/** Cascade delete all the services in this category. Defaults to false (when false, the services will still exist but will not be accessible in the dashboard). */
|
|
76
|
+
deleteServices?: boolean | null;
|
|
77
|
+
}
|
|
78
|
+
export interface DeleteCategoryResponse {
|
|
79
|
+
/** Deleted Category ID. */
|
|
80
|
+
_id?: string | null;
|
|
81
|
+
}
|
|
82
|
+
export interface BatchDeleteCategoryRequest {
|
|
83
|
+
/** Category ID. */
|
|
84
|
+
ids?: string[] | null;
|
|
85
|
+
}
|
|
86
|
+
export interface BatchDeleteCategoryResponse {
|
|
87
|
+
}
|
|
88
|
+
export interface BatchUpdateCategoryRequest {
|
|
89
|
+
/** List of categories to be updated. */
|
|
90
|
+
categories?: Category[];
|
|
91
|
+
/** Field mask of fields to update. */
|
|
92
|
+
fieldMask?: string[];
|
|
93
|
+
}
|
|
94
|
+
export interface BatchUpdateCategoryResponse {
|
|
95
|
+
}
|
|
96
|
+
export interface MessageEnvelope {
|
|
97
|
+
/** App instance ID. */
|
|
98
|
+
instanceId?: string | null;
|
|
99
|
+
/** Event type. */
|
|
100
|
+
eventType?: string;
|
|
101
|
+
/** The identification type and identity data. */
|
|
102
|
+
identity?: IdentificationData;
|
|
103
|
+
/** Stringify payload. */
|
|
104
|
+
data?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
107
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
108
|
+
anonymousVisitorId?: string;
|
|
109
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
110
|
+
memberId?: string;
|
|
111
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
112
|
+
wixUserId?: string;
|
|
113
|
+
/** ID of an app. */
|
|
114
|
+
appId?: string;
|
|
115
|
+
/** @readonly */
|
|
116
|
+
identityType?: WebhookIdentityType;
|
|
117
|
+
}
|
|
118
|
+
/** @oneof */
|
|
119
|
+
export interface IdentificationDataIdOneOf {
|
|
120
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
121
|
+
anonymousVisitorId?: string;
|
|
122
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
123
|
+
memberId?: string;
|
|
124
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
125
|
+
wixUserId?: string;
|
|
126
|
+
/** ID of an app. */
|
|
127
|
+
appId?: string;
|
|
128
|
+
}
|
|
129
|
+
export declare enum WebhookIdentityType {
|
|
130
|
+
UNKNOWN = "UNKNOWN",
|
|
131
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
132
|
+
MEMBER = "MEMBER",
|
|
133
|
+
WIX_USER = "WIX_USER",
|
|
134
|
+
APP = "APP"
|
|
135
|
+
}
|
|
136
|
+
export interface CategoryNonNullableFields {
|
|
137
|
+
status: Status;
|
|
138
|
+
}
|
|
139
|
+
export interface ListCategoryResponseNonNullableFields {
|
|
140
|
+
categories: CategoryNonNullableFields[];
|
|
141
|
+
}
|
|
142
|
+
export interface CreateCategoryResponseNonNullableFields {
|
|
143
|
+
category?: CategoryNonNullableFields;
|
|
144
|
+
}
|
|
145
|
+
export interface UpdateCategoryResponseNonNullableFields {
|
|
146
|
+
category?: CategoryNonNullableFields;
|
|
147
|
+
}
|
|
148
|
+
export interface BaseEventMetadata {
|
|
149
|
+
/** App instance ID. */
|
|
150
|
+
instanceId?: string | null;
|
|
151
|
+
/** Event type. */
|
|
152
|
+
eventType?: string;
|
|
153
|
+
/** The identification type and identity data. */
|
|
154
|
+
identity?: IdentificationData;
|
|
155
|
+
}
|
|
156
|
+
export interface CategoryNotificationEnvelope {
|
|
157
|
+
data: CategoryNotification;
|
|
158
|
+
metadata: BaseEventMetadata;
|
|
159
|
+
}
|
|
160
|
+
/** @permissionScope Read Bookings - Public Data
|
|
161
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
162
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
163
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
164
|
+
* @permissionScope Manage Bookings
|
|
165
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
166
|
+
* @permissionScope Read Bookings - Including Participants
|
|
167
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
168
|
+
* @permissionScope Read Bookings - all read permissions
|
|
169
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
170
|
+
* @permissionScope Manage Bookings - all permissions
|
|
171
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
172
|
+
* @permissionId BOOKINGS.CATEGORIES_READ
|
|
173
|
+
* @webhook
|
|
174
|
+
* @eventType com.wixpress.bookings.services.api.v1.CategoryNotification
|
|
175
|
+
* @documentationMaturity preview
|
|
176
|
+
*/
|
|
177
|
+
export declare function onCategoryNotification(handler: (event: CategoryNotificationEnvelope) => void | Promise<void>): void;
|
|
178
|
+
/**
|
|
179
|
+
* Lists all categories.
|
|
180
|
+
* @public
|
|
181
|
+
* @documentationMaturity preview
|
|
182
|
+
* @permissionId BOOKINGS.CATEGORIES_READ
|
|
183
|
+
* @permissionScope Read Bookings - Public Data
|
|
184
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
185
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
186
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
187
|
+
* @permissionScope Manage Bookings
|
|
188
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
189
|
+
* @permissionScope Read Bookings - Including Participants
|
|
190
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
191
|
+
* @permissionScope Read Bookings - all read permissions
|
|
192
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
193
|
+
* @permissionScope Manage Bookings - all permissions
|
|
194
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
195
|
+
* @applicableIdentity APP
|
|
196
|
+
* @applicableIdentity VISITOR
|
|
197
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List
|
|
198
|
+
*/
|
|
199
|
+
export declare function listCategories(options?: ListCategoriesOptions): Promise<ListCategoryResponse & ListCategoryResponseNonNullableFields>;
|
|
200
|
+
export interface ListCategoriesOptions {
|
|
201
|
+
/** Category IDs. */
|
|
202
|
+
categoryIds?: string[];
|
|
203
|
+
/** @internal */
|
|
204
|
+
includeDeleted?: boolean | null;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Creates a new category.
|
|
208
|
+
* @param category - Category information.
|
|
209
|
+
* @public
|
|
210
|
+
* @documentationMaturity preview
|
|
211
|
+
* @requiredField category
|
|
212
|
+
* @requiredField category.name
|
|
213
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
214
|
+
* @permissionScope Manage Bookings
|
|
215
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
216
|
+
* @permissionScope Manage Bookings - all permissions
|
|
217
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
218
|
+
* @applicableIdentity APP
|
|
219
|
+
* @returns Category information.
|
|
220
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create
|
|
221
|
+
*/
|
|
222
|
+
export declare function createCategory(category: Category): Promise<Category & CategoryNonNullableFields>;
|
|
223
|
+
/**
|
|
224
|
+
* Updates an existing category.
|
|
225
|
+
* @param _id - Category ID.
|
|
226
|
+
* @public
|
|
227
|
+
* @documentationMaturity preview
|
|
228
|
+
* @requiredField _id
|
|
229
|
+
* @requiredField category
|
|
230
|
+
* @requiredField category.name
|
|
231
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
232
|
+
* @permissionScope Manage Bookings
|
|
233
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
234
|
+
* @permissionScope Manage Bookings - all permissions
|
|
235
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
236
|
+
* @applicableIdentity APP
|
|
237
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update
|
|
238
|
+
*/
|
|
239
|
+
export declare function updateCategory(_id: string | null, category: UpdateCategory): Promise<UpdateCategoryResponse & UpdateCategoryResponseNonNullableFields>;
|
|
240
|
+
export interface UpdateCategory {
|
|
241
|
+
/**
|
|
242
|
+
* Category ID.
|
|
243
|
+
* @readonly
|
|
244
|
+
*/
|
|
245
|
+
_id?: string | null;
|
|
246
|
+
/** Category name. */
|
|
247
|
+
name?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* @internal
|
|
250
|
+
* @readonly
|
|
251
|
+
*/
|
|
252
|
+
status?: Status;
|
|
253
|
+
/** @internal */
|
|
254
|
+
sortOrder?: number | null;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Deletes a category.
|
|
258
|
+
* When deleting a category, you have the option to delete all the associated services within this category using the `deleteServices` field in the request.
|
|
259
|
+
* @param _id - Category ID.
|
|
260
|
+
* @public
|
|
261
|
+
* @documentationMaturity preview
|
|
262
|
+
* @requiredField _id
|
|
263
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
264
|
+
* @permissionScope Manage Bookings
|
|
265
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
266
|
+
* @permissionScope Manage Bookings - all permissions
|
|
267
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
268
|
+
* @applicableIdentity APP
|
|
269
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete
|
|
270
|
+
*/
|
|
271
|
+
export declare function deleteCategory(_id: string | null, options?: DeleteCategoryOptions): Promise<DeleteCategoryResponse>;
|
|
272
|
+
export interface DeleteCategoryOptions {
|
|
273
|
+
/** Cascade delete all the services in this category. Defaults to false (when false, the services will still exist but will not be accessible in the dashboard). */
|
|
274
|
+
deleteServices?: boolean | null;
|
|
275
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.deleteCategory = exports.updateCategory = exports.createCategory = exports.listCategories = exports.WebhookIdentityType = exports.Event = exports.Status = void 0;
|
|
27
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
+
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
+
const ambassadorWixBookingsV1Category = __importStar(require("./bookings-v1-category-categories.http.js"));
|
|
30
|
+
var Status;
|
|
31
|
+
(function (Status) {
|
|
32
|
+
/** The category was created. */
|
|
33
|
+
Status["CREATED"] = "CREATED";
|
|
34
|
+
/** The category was deleted. */
|
|
35
|
+
Status["DELETED"] = "DELETED";
|
|
36
|
+
})(Status || (exports.Status = Status = {}));
|
|
37
|
+
var Event;
|
|
38
|
+
(function (Event) {
|
|
39
|
+
Event["Updated"] = "Updated";
|
|
40
|
+
Event["Deleted"] = "Deleted";
|
|
41
|
+
Event["Created"] = "Created";
|
|
42
|
+
})(Event || (exports.Event = Event = {}));
|
|
43
|
+
var WebhookIdentityType;
|
|
44
|
+
(function (WebhookIdentityType) {
|
|
45
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
46
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
47
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
48
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
49
|
+
WebhookIdentityType["APP"] = "APP";
|
|
50
|
+
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
51
|
+
/**
|
|
52
|
+
* Lists all categories.
|
|
53
|
+
* @public
|
|
54
|
+
* @documentationMaturity preview
|
|
55
|
+
* @permissionId BOOKINGS.CATEGORIES_READ
|
|
56
|
+
* @permissionScope Read Bookings - Public Data
|
|
57
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
58
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
59
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
60
|
+
* @permissionScope Manage Bookings
|
|
61
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
62
|
+
* @permissionScope Read Bookings - Including Participants
|
|
63
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
64
|
+
* @permissionScope Read Bookings - all read permissions
|
|
65
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
66
|
+
* @permissionScope Manage Bookings - all permissions
|
|
67
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
68
|
+
* @applicableIdentity APP
|
|
69
|
+
* @applicableIdentity VISITOR
|
|
70
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List
|
|
71
|
+
*/
|
|
72
|
+
async function listCategories(options) {
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
75
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
76
|
+
categoryIds: options?.categoryIds,
|
|
77
|
+
includeDeleted: options?.includeDeleted,
|
|
78
|
+
});
|
|
79
|
+
const reqOpts = ambassadorWixBookingsV1Category.list(payload);
|
|
80
|
+
sideEffects?.onSiteCall?.();
|
|
81
|
+
try {
|
|
82
|
+
const result = await httpClient.request(reqOpts);
|
|
83
|
+
sideEffects?.onSuccess?.(result);
|
|
84
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
88
|
+
spreadPathsToArguments: {},
|
|
89
|
+
explicitPathsToArguments: {
|
|
90
|
+
categoryIds: '$[0].categoryIds',
|
|
91
|
+
includeDeleted: '$[0].includeDeleted',
|
|
92
|
+
},
|
|
93
|
+
singleArgumentUnchanged: false,
|
|
94
|
+
}, ['options']);
|
|
95
|
+
sideEffects?.onError?.(err);
|
|
96
|
+
throw transformedError;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.listCategories = listCategories;
|
|
100
|
+
/**
|
|
101
|
+
* Creates a new category.
|
|
102
|
+
* @param category - Category information.
|
|
103
|
+
* @public
|
|
104
|
+
* @documentationMaturity preview
|
|
105
|
+
* @requiredField category
|
|
106
|
+
* @requiredField category.name
|
|
107
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
108
|
+
* @permissionScope Manage Bookings
|
|
109
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
110
|
+
* @permissionScope Manage Bookings - all permissions
|
|
111
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
112
|
+
* @applicableIdentity APP
|
|
113
|
+
* @returns Category information.
|
|
114
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create
|
|
115
|
+
*/
|
|
116
|
+
async function createCategory(category) {
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
119
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({ category: category });
|
|
120
|
+
const reqOpts = ambassadorWixBookingsV1Category.create(payload);
|
|
121
|
+
sideEffects?.onSiteCall?.();
|
|
122
|
+
try {
|
|
123
|
+
const result = await httpClient.request(reqOpts);
|
|
124
|
+
sideEffects?.onSuccess?.(result);
|
|
125
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.category;
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
129
|
+
spreadPathsToArguments: {},
|
|
130
|
+
explicitPathsToArguments: { category: '$[0]' },
|
|
131
|
+
singleArgumentUnchanged: false,
|
|
132
|
+
}, ['category']);
|
|
133
|
+
sideEffects?.onError?.(err);
|
|
134
|
+
throw transformedError;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.createCategory = createCategory;
|
|
138
|
+
/**
|
|
139
|
+
* Updates an existing category.
|
|
140
|
+
* @param _id - Category ID.
|
|
141
|
+
* @public
|
|
142
|
+
* @documentationMaturity preview
|
|
143
|
+
* @requiredField _id
|
|
144
|
+
* @requiredField category
|
|
145
|
+
* @requiredField category.name
|
|
146
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
147
|
+
* @permissionScope Manage Bookings
|
|
148
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
149
|
+
* @permissionScope Manage Bookings - all permissions
|
|
150
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
151
|
+
* @applicableIdentity APP
|
|
152
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update
|
|
153
|
+
*/
|
|
154
|
+
async function updateCategory(_id, category) {
|
|
155
|
+
// @ts-ignore
|
|
156
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
157
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
158
|
+
category: { ...category, id: _id },
|
|
159
|
+
});
|
|
160
|
+
const reqOpts = ambassadorWixBookingsV1Category.update(payload);
|
|
161
|
+
sideEffects?.onSiteCall?.();
|
|
162
|
+
try {
|
|
163
|
+
const result = await httpClient.request(reqOpts);
|
|
164
|
+
sideEffects?.onSuccess?.(result);
|
|
165
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
169
|
+
spreadPathsToArguments: { category: '$[1]' },
|
|
170
|
+
explicitPathsToArguments: { 'category.id': '$[0]' },
|
|
171
|
+
singleArgumentUnchanged: false,
|
|
172
|
+
}, ['_id', 'category']);
|
|
173
|
+
sideEffects?.onError?.(err);
|
|
174
|
+
throw transformedError;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
exports.updateCategory = updateCategory;
|
|
178
|
+
/**
|
|
179
|
+
* Deletes a category.
|
|
180
|
+
* When deleting a category, you have the option to delete all the associated services within this category using the `deleteServices` field in the request.
|
|
181
|
+
* @param _id - Category ID.
|
|
182
|
+
* @public
|
|
183
|
+
* @documentationMaturity preview
|
|
184
|
+
* @requiredField _id
|
|
185
|
+
* @permissionId BOOKINGS.MANAGE_CATEGORIES
|
|
186
|
+
* @permissionScope Manage Bookings
|
|
187
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
188
|
+
* @permissionScope Manage Bookings - all permissions
|
|
189
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
190
|
+
* @applicableIdentity APP
|
|
191
|
+
* @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete
|
|
192
|
+
*/
|
|
193
|
+
async function deleteCategory(_id, options) {
|
|
194
|
+
// @ts-ignore
|
|
195
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
196
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
197
|
+
id: _id,
|
|
198
|
+
deleteServices: options?.deleteServices,
|
|
199
|
+
});
|
|
200
|
+
const reqOpts = ambassadorWixBookingsV1Category._delete(payload);
|
|
201
|
+
sideEffects?.onSiteCall?.();
|
|
202
|
+
try {
|
|
203
|
+
const result = await httpClient.request(reqOpts);
|
|
204
|
+
sideEffects?.onSuccess?.(result);
|
|
205
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
209
|
+
spreadPathsToArguments: {},
|
|
210
|
+
explicitPathsToArguments: {
|
|
211
|
+
id: '$[0]',
|
|
212
|
+
deleteServices: '$[1].deleteServices',
|
|
213
|
+
},
|
|
214
|
+
singleArgumentUnchanged: false,
|
|
215
|
+
}, ['_id', 'options']);
|
|
216
|
+
sideEffects?.onError?.(err);
|
|
217
|
+
throw transformedError;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
exports.deleteCategory = deleteCategory;
|
|
221
|
+
//# sourceMappingURL=bookings-v1-category-categories.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v1-category-categories.universal.js","sourceRoot":"","sources":["../../../../src/bookings-v1-category-categories.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAGiD;AAEjD,2GAA6F;AAuB7F,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,gCAAgC;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C,CAAC;IAEH,MAAM,OAAO,GAAG,+BAA+B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE;gBACxB,EAAE,EAAE,MAAM;gBACV,cAAc,EAAE,qBAAqB;aACtC;YACD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAxCD,wCAwCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v1-category-categories.context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v1-category-categories.universal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v1-category-categories.meta.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { listCategories as publicListCategories, createCategory as publicCreateCategory, updateCategory as publicUpdateCategory, deleteCategory as publicDeleteCategory } from './bookings-v1-category-categories.public.js';
|
|
2
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
3
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
4
|
+
import { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';
|
|
5
|
+
export declare const listCategories: MaybeContext<BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories>;
|
|
6
|
+
export declare const createCategory: MaybeContext<BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory>;
|
|
7
|
+
export declare const updateCategory: MaybeContext<BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory>;
|
|
8
|
+
export declare const deleteCategory: MaybeContext<BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory>;
|
|
9
|
+
/** */
|
|
10
|
+
export declare const onCategoryNotification: ReturnType<typeof createEventModule<typeof publicOnCategoryNotification>>;
|
|
11
|
+
export { Status, Event, WebhookIdentityType, } from './bookings-v1-category-categories.universal.js';
|
|
12
|
+
export { Category, ListCategoryRequest, ListCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, BatchCreateCategoryRequest, BatchCreateCategoryResponse, UpdateCategoryRequest, UpdateCategoryResponse, DeleteCategoryRequest, DeleteCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, CategoryNonNullableFields, ListCategoryResponseNonNullableFields, CreateCategoryResponseNonNullableFields, UpdateCategoryResponseNonNullableFields, BaseEventMetadata, CategoryNotificationEnvelope, ListCategoriesOptions, UpdateCategory, DeleteCategoryOptions, } from './bookings-v1-category-categories.universal.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { listCategories as publicListCategories, createCategory as publicCreateCategory, updateCategory as publicUpdateCategory, deleteCategory as publicDeleteCategory, } from './bookings-v1-category-categories.public.js';
|
|
2
|
+
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
4
|
+
import { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';
|
|
5
|
+
export const listCategories = /*#__PURE__*/ createRESTModule(publicListCategories);
|
|
6
|
+
export const createCategory = /*#__PURE__*/ createRESTModule(publicCreateCategory);
|
|
7
|
+
export const updateCategory = /*#__PURE__*/ createRESTModule(publicUpdateCategory);
|
|
8
|
+
export const deleteCategory = /*#__PURE__*/ createRESTModule(publicDeleteCategory);
|
|
9
|
+
/** */
|
|
10
|
+
export const onCategoryNotification = createEventModule(publicOnCategoryNotification);
|
|
11
|
+
export { Status, Event, WebhookIdentityType, } from './bookings-v1-category-categories.universal.js';
|
|
12
|
+
//# sourceMappingURL=bookings-v1-category-categories.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v1-category-categories.context.js","sourceRoot":"","sources":["../../../../src/bookings-v1-category-categories.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,GACvC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,sBAAsB,IAAI,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAErH,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM;AACN,MAAM,CAAC,MAAM,sBAAsB,GAE/B,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AAEpD,OAAO,EACL,MAAM,EACN,KAAK,EACL,mBAAmB,GACpB,MAAM,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/** Lists all categories. */
|
|
3
|
+
export declare function list(payload: object): RequestOptionsFactory<any>;
|
|
4
|
+
/** Creates a new category. */
|
|
5
|
+
export declare function create(payload: object): RequestOptionsFactory<any>;
|
|
6
|
+
/** Updates an existing category. */
|
|
7
|
+
export declare function update(payload: object): RequestOptionsFactory<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Deletes a category.
|
|
10
|
+
* When deleting a category, you have the option to delete all the associated services within this category using the `deleteServices` field in the request.
|
|
11
|
+
*/
|
|
12
|
+
export declare function _delete(payload: object): RequestOptionsFactory<any>;
|