@wix/bookings 1.0.206 → 1.0.207
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 +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +2 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/src/bookings-v1-category.http.d.ts +15 -0
- package/build/cjs/src/bookings-v1-category.http.js +249 -0
- package/build/cjs/src/bookings-v1-category.http.js.map +1 -0
- package/build/cjs/src/bookings-v1-category.public.d.ts +11 -0
- package/build/cjs/src/bookings-v1-category.public.js +33 -0
- package/build/cjs/src/bookings-v1-category.public.js.map +1 -0
- package/build/cjs/src/bookings-v1-category.types.d.ts +92 -0
- package/build/cjs/src/bookings-v1-category.types.js +17 -0
- package/build/cjs/src/bookings-v1-category.types.js.map +1 -0
- package/build/cjs/src/bookings-v1-category.universal.d.ts +179 -0
- package/build/cjs/src/bookings-v1-category.universal.js +295 -0
- package/build/cjs/src/bookings-v1-category.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/src/bookings-v1-category.http.d.ts +15 -0
- package/build/es/src/bookings-v1-category.http.js +242 -0
- package/build/es/src/bookings-v1-category.http.js.map +1 -0
- package/build/es/src/bookings-v1-category.public.d.ts +11 -0
- package/build/es/src/bookings-v1-category.public.js +24 -0
- package/build/es/src/bookings-v1-category.public.js.map +1 -0
- package/build/es/src/bookings-v1-category.types.d.ts +92 -0
- package/build/es/src/bookings-v1-category.types.js +14 -0
- package/build/es/src/bookings-v1-category.types.js.map +1 -0
- package/build/es/src/bookings-v1-category.universal.d.ts +179 -0
- package/build/es/src/bookings-v1-category.universal.js +269 -0
- package/build/es/src/bookings-v1-category.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
3
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
+
const _createCategoryRequest = {};
|
|
5
|
+
const _createCategoryResponse = {};
|
|
6
|
+
const _deleteCategoryRequest = {};
|
|
7
|
+
const _deleteCategoryResponse = {};
|
|
8
|
+
const _listCategoryRequest = {};
|
|
9
|
+
const _listCategoryResponse = {};
|
|
10
|
+
const _updateCategoryRequest = {};
|
|
11
|
+
const _updateCategoryResponse = {};
|
|
12
|
+
function resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(opts) {
|
|
13
|
+
const domainToMappings = {
|
|
14
|
+
'bookings._base_domain_': [
|
|
15
|
+
{
|
|
16
|
+
srcPath: '/_api/services-server',
|
|
17
|
+
destPath: '',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
srcPath: '/internal/services-server',
|
|
21
|
+
destPath: '/internal',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
_api_base_domain_: [
|
|
25
|
+
{
|
|
26
|
+
srcPath: '/services-server',
|
|
27
|
+
destPath: '',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
'api._api_base_domain_': [
|
|
31
|
+
{
|
|
32
|
+
srcPath: '/services-server',
|
|
33
|
+
destPath: '',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'www._base_domain_': [
|
|
37
|
+
{
|
|
38
|
+
srcPath: '/_api/services-server',
|
|
39
|
+
destPath: '',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
srcPath: '/_api/bookings/v1/categories',
|
|
43
|
+
destPath: '/v1/categories',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
srcPath: '/_api/bookings/v1/services',
|
|
47
|
+
destPath: '/v1/services',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
srcPath: '/_api/bookings/v1/forms',
|
|
51
|
+
destPath: '/v1/forms',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
'www.wixapis.com': [
|
|
55
|
+
{
|
|
56
|
+
srcPath: '/bookings/v1/categories',
|
|
57
|
+
destPath: '/v1/categories',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
srcPath: '/bookings/v1/forms',
|
|
61
|
+
destPath: '/v1/forms',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: '/bookings/v1/services',
|
|
65
|
+
destPath: '/v1/services',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'manage._base_domain_': [
|
|
69
|
+
{
|
|
70
|
+
srcPath: '/_api/services-server',
|
|
71
|
+
destPath: '',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
srcPath: '/_api/bookings/v1/categories',
|
|
75
|
+
destPath: '/v1/categories',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
srcPath: '/_api/bookings/v1/services',
|
|
79
|
+
destPath: '/v1/services',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
srcPath: '/_api/bookings/v1/forms',
|
|
83
|
+
destPath: '/v1/forms',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
srcPath: '/_api/bookings/v1/services/batch',
|
|
87
|
+
destPath: '/v1/services/batch',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
srcPath: '/_api/bookings/v1/batch/categories',
|
|
91
|
+
destPath: '/v1/batch/categories',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
'editor._base_domain_': [
|
|
95
|
+
{
|
|
96
|
+
srcPath: '/_api/bookings/v1/services',
|
|
97
|
+
destPath: '/v1/services',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
srcPath: '/_api/bookings/v1/categories',
|
|
101
|
+
destPath: '/v1/categories',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
srcPath: '/internal/services-server',
|
|
105
|
+
destPath: '/internal',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
'blocks._base_domain_': [
|
|
109
|
+
{
|
|
110
|
+
srcPath: '/_api/bookings/v1/services',
|
|
111
|
+
destPath: '/v1/services',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
srcPath: '/_api/bookings/v1/categories',
|
|
115
|
+
destPath: '/v1/categories',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
srcPath: '/internal/services-server',
|
|
119
|
+
destPath: '/internal',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
'create.editorx': [
|
|
123
|
+
{
|
|
124
|
+
srcPath: '/_api/bookings/v1/services',
|
|
125
|
+
destPath: '/v1/services',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
srcPath: '/_api/bookings/v1/categories',
|
|
129
|
+
destPath: '/v1/categories',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
srcPath: '/internal/services-server',
|
|
133
|
+
destPath: '/internal',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
'*.dev.wix-code.com': [
|
|
137
|
+
{
|
|
138
|
+
srcPath: '/_api/services-server',
|
|
139
|
+
destPath: '',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Lists all categories.
|
|
147
|
+
*
|
|
148
|
+
* > **Permissions**
|
|
149
|
+
* > This endpoint requires the Read Bookings - Public Data or the Read Bookings - Including Participants permissions scope
|
|
150
|
+
*/
|
|
151
|
+
export function list(payload) {
|
|
152
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listCategoryRequest, {});
|
|
153
|
+
const { fromJSON: fromRes } = serializer(_listCategoryResponse, {});
|
|
154
|
+
function __list({ host }) {
|
|
155
|
+
const serializedData = toReq(payload);
|
|
156
|
+
const metadata = {
|
|
157
|
+
entityFqdn: 'wix.bookings.v1.category',
|
|
158
|
+
method: 'GET',
|
|
159
|
+
methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',
|
|
160
|
+
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
161
|
+
protoPath: '/v1/categories',
|
|
162
|
+
data: serializedData,
|
|
163
|
+
host,
|
|
164
|
+
}),
|
|
165
|
+
params: toURLSearchParams(serializedData),
|
|
166
|
+
transformResponse: fromRes,
|
|
167
|
+
};
|
|
168
|
+
return metadata;
|
|
169
|
+
}
|
|
170
|
+
__list.fromReq = fromReq;
|
|
171
|
+
return __list;
|
|
172
|
+
}
|
|
173
|
+
/** Creates a new category. */
|
|
174
|
+
export function create(payload) {
|
|
175
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createCategoryRequest, {});
|
|
176
|
+
const { fromJSON: fromRes } = serializer(_createCategoryResponse, {});
|
|
177
|
+
function __create({ host }) {
|
|
178
|
+
const serializedData = toReq(payload);
|
|
179
|
+
const metadata = {
|
|
180
|
+
entityFqdn: 'wix.bookings.v1.category',
|
|
181
|
+
method: 'POST',
|
|
182
|
+
methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',
|
|
183
|
+
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
184
|
+
protoPath: '/v1/categories',
|
|
185
|
+
data: serializedData,
|
|
186
|
+
host,
|
|
187
|
+
}),
|
|
188
|
+
data: serializedData,
|
|
189
|
+
transformResponse: fromRes,
|
|
190
|
+
};
|
|
191
|
+
return metadata;
|
|
192
|
+
}
|
|
193
|
+
__create.fromReq = fromReq;
|
|
194
|
+
return __create;
|
|
195
|
+
}
|
|
196
|
+
/** Updates an existing category. */
|
|
197
|
+
export function update(payload) {
|
|
198
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateCategoryRequest, {});
|
|
199
|
+
const { fromJSON: fromRes } = serializer(_updateCategoryResponse, {});
|
|
200
|
+
function __update({ host }) {
|
|
201
|
+
const serializedData = toReq(payload);
|
|
202
|
+
const metadata = {
|
|
203
|
+
entityFqdn: 'wix.bookings.v1.category',
|
|
204
|
+
method: 'PUT',
|
|
205
|
+
methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',
|
|
206
|
+
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
207
|
+
protoPath: '/v1/categories/{category.id}',
|
|
208
|
+
data: serializedData,
|
|
209
|
+
host,
|
|
210
|
+
}),
|
|
211
|
+
data: serializedData,
|
|
212
|
+
transformResponse: fromRes,
|
|
213
|
+
};
|
|
214
|
+
return metadata;
|
|
215
|
+
}
|
|
216
|
+
__update.fromReq = fromReq;
|
|
217
|
+
return __update;
|
|
218
|
+
}
|
|
219
|
+
/** Deletes a category. */
|
|
220
|
+
export function _delete(payload) {
|
|
221
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteCategoryRequest, {});
|
|
222
|
+
const { fromJSON: fromRes } = serializer(_deleteCategoryResponse, {});
|
|
223
|
+
function ___delete({ host }) {
|
|
224
|
+
const serializedData = toReq(payload);
|
|
225
|
+
const metadata = {
|
|
226
|
+
entityFqdn: 'wix.bookings.v1.category',
|
|
227
|
+
method: 'DELETE',
|
|
228
|
+
methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',
|
|
229
|
+
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
230
|
+
protoPath: '/v1/categories/{id}',
|
|
231
|
+
data: serializedData,
|
|
232
|
+
host,
|
|
233
|
+
}),
|
|
234
|
+
params: toURLSearchParams(serializedData),
|
|
235
|
+
transformResponse: fromRes,
|
|
236
|
+
};
|
|
237
|
+
return metadata;
|
|
238
|
+
}
|
|
239
|
+
___delete.fromReq = fromReq;
|
|
240
|
+
return ___delete;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=bookings-v1-category.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v1-category.http.js","sourceRoot":"","sources":["../../../src/bookings-v1-category.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAchD,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,SAAS,2DAA2D,CAClE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,wBAAwB,EAAE;YACxB;gBACE,OAAO,EAAE,uBAAuB;gBAChC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,uBAAuB;gBAChC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,8BAA8B;gBACvC,QAAQ,EAAE,gBAAgB;aAC3B;YACD;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,OAAO,EAAE,yBAAyB;gBAClC,Q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AAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,0BAA0B;AAC1B,MAAM,UAAU,OAAO,CACrB,OAA8B;IAE9B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,sBAAsB,EACtB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IAEtE,SAAS,SAAS,CAAC,EAAE,IAAI,EAAO;QAC9B,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,0BAA0B;YACtC,MAAM,EAAE,QAAe;YACvB,SAAS,EACP,iEAAiE;YACnE,GAAG,EAAE,2DAA2D,CAAC;gBAC/D,SAAS,EAAE,qBAAqB;gBAChC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAE5B,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { Category, UpdateCategory, DeleteOptions, ListOptions } from './bookings-v1-category.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function list(httpClient: HttpClient): (options?: ListOptions | undefined) => Promise<import("./bookings-v1-category.universal").ListCategoryResponse>;
|
|
7
|
+
export declare function create(httpClient: HttpClient): (category: Category) => Promise<import("./bookings-v1-category.universal").CreateCategoryResponse>;
|
|
8
|
+
export declare function update(httpClient: HttpClient): (_id: string | null, category: UpdateCategory) => Promise<import("./bookings-v1-category.universal").UpdateCategoryResponse>;
|
|
9
|
+
export declare function _delete(httpClient: HttpClient): (_id: string | null, options?: DeleteOptions | undefined) => Promise<import("./bookings-v1-category.universal").DeleteCategoryResponse>;
|
|
10
|
+
export { Status, Event } from './bookings-v1-category.universal';
|
|
11
|
+
export { Category, ListCategoryRequest, ListCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, BatchCreateCategoryRequest, BatchCreateCategoryResponse, UpdateCategoryRequest, UpdateCategoryResponse, DeleteCategoryRequest, DeleteCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, ListOptions, UpdateCategory, DeleteOptions, } from './bookings-v1-category.universal';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { list as universalList, create as universalCreate, update as universalUpdate, _delete as universal_delete, } from './bookings-v1-category.universal';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/bookings' };
|
|
3
|
+
export function list(httpClient) {
|
|
4
|
+
return (options) => universalList(options,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export function create(httpClient) {
|
|
9
|
+
return (category) => universalCreate(category,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export function update(httpClient) {
|
|
14
|
+
return (_id, category) => universalUpdate(_id, category,
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
{ httpClient });
|
|
17
|
+
}
|
|
18
|
+
export function _delete(httpClient) {
|
|
19
|
+
return (_id, options) => universal_delete(_id, options,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
export { Status, Event } from './bookings-v1-category.universal';
|
|
24
|
+
//# sourceMappingURL=bookings-v1-category.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v1-category.public.js","sourceRoot":"","sources":["../../../src/bookings-v1-category.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,IAAI,aAAa,EACrB,MAAM,IAAI,eAAe,EACzB,MAAM,IAAI,eAAe,EACzB,OAAO,IAAI,gBAAgB,GAK5B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,MAAM,UAAU,IAAI,CAAC,UAAsB;IACzC,OAAO,CAAC,OAAqB,EAAE,EAAE,CAC/B,aAAa,CACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,QAAkB,EAAE,EAAE,CAC5B,eAAe,CACb,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,GAAkB,EAAE,QAAwB,EAAE,EAAE,CACtD,eAAe,CACb,GAAG,EACH,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,UAAsB;IAC5C,OAAO,CAAC,GAAkB,EAAE,OAAuB,EAAE,EAAE,CACrD,gBAAgB,CACd,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
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. Read-only.
|
|
5
|
+
* @readonly
|
|
6
|
+
*/
|
|
7
|
+
id?: string | null;
|
|
8
|
+
/** Category name. */
|
|
9
|
+
name?: string | null;
|
|
10
|
+
/** Custom properties that can be associated with the category. */
|
|
11
|
+
customProperties?: Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Category status Read-only.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
status?: Status;
|
|
17
|
+
/** Sorting order of the category for Wix Bookings UI. */
|
|
18
|
+
sortOrder?: number | null;
|
|
19
|
+
}
|
|
20
|
+
export declare enum Status {
|
|
21
|
+
/** Default status. */
|
|
22
|
+
CREATED = "CREATED",
|
|
23
|
+
/** Category is deleted. */
|
|
24
|
+
DELETED = "DELETED"
|
|
25
|
+
}
|
|
26
|
+
export interface ListCategoryRequest {
|
|
27
|
+
/** Category IDs. */
|
|
28
|
+
categoryIds?: string[];
|
|
29
|
+
/** Whether deleted categories are included. Default is false. */
|
|
30
|
+
includeDeleted?: boolean | null;
|
|
31
|
+
}
|
|
32
|
+
export interface ListCategoryResponse {
|
|
33
|
+
/** Category information. */
|
|
34
|
+
categories?: Category[];
|
|
35
|
+
}
|
|
36
|
+
/** An event sent every time a category entity is changed. */
|
|
37
|
+
export interface CategoryNotification {
|
|
38
|
+
category?: Category;
|
|
39
|
+
event?: Event;
|
|
40
|
+
}
|
|
41
|
+
export declare enum Event {
|
|
42
|
+
Updated = "Updated",
|
|
43
|
+
Deleted = "Deleted",
|
|
44
|
+
Created = "Created"
|
|
45
|
+
}
|
|
46
|
+
export interface CreateCategoryRequest {
|
|
47
|
+
/** Category information. */
|
|
48
|
+
category: Category;
|
|
49
|
+
}
|
|
50
|
+
export interface CreateCategoryResponse {
|
|
51
|
+
/** Category information. */
|
|
52
|
+
category?: Category;
|
|
53
|
+
}
|
|
54
|
+
export interface BatchCreateCategoryRequest {
|
|
55
|
+
/** Category information. */
|
|
56
|
+
categories?: Category[];
|
|
57
|
+
}
|
|
58
|
+
export interface BatchCreateCategoryResponse {
|
|
59
|
+
/** Category information. */
|
|
60
|
+
categories?: Category[];
|
|
61
|
+
}
|
|
62
|
+
export interface UpdateCategoryRequest {
|
|
63
|
+
category: Category;
|
|
64
|
+
}
|
|
65
|
+
export interface UpdateCategoryResponse {
|
|
66
|
+
/** The updated category. */
|
|
67
|
+
category?: Category;
|
|
68
|
+
}
|
|
69
|
+
export interface DeleteCategoryRequest {
|
|
70
|
+
/** Category ID. */
|
|
71
|
+
id: string | null;
|
|
72
|
+
/** 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 Wix Business Manager). */
|
|
73
|
+
deleteServices?: boolean | null;
|
|
74
|
+
}
|
|
75
|
+
export interface DeleteCategoryResponse {
|
|
76
|
+
/** Deleted Category ID. */
|
|
77
|
+
id?: string | null;
|
|
78
|
+
}
|
|
79
|
+
export interface BatchDeleteCategoryRequest {
|
|
80
|
+
/** Category ID. */
|
|
81
|
+
ids?: string[] | null;
|
|
82
|
+
}
|
|
83
|
+
export interface BatchDeleteCategoryResponse {
|
|
84
|
+
}
|
|
85
|
+
export interface BatchUpdateCategoryRequest {
|
|
86
|
+
/** List of categories to be updated. */
|
|
87
|
+
categories?: Category[];
|
|
88
|
+
/** Field mask of fields to update. */
|
|
89
|
+
fieldMask?: string[];
|
|
90
|
+
}
|
|
91
|
+
export interface BatchUpdateCategoryResponse {
|
|
92
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var Status;
|
|
2
|
+
(function (Status) {
|
|
3
|
+
/** Default status. */
|
|
4
|
+
Status["CREATED"] = "CREATED";
|
|
5
|
+
/** Category is deleted. */
|
|
6
|
+
Status["DELETED"] = "DELETED";
|
|
7
|
+
})(Status || (Status = {}));
|
|
8
|
+
export var Event;
|
|
9
|
+
(function (Event) {
|
|
10
|
+
Event["Updated"] = "Updated";
|
|
11
|
+
Event["Deleted"] = "Deleted";
|
|
12
|
+
Event["Created"] = "Created";
|
|
13
|
+
})(Event || (Event = {}));
|
|
14
|
+
//# sourceMappingURL=bookings-v1-category.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v1-category.types.js","sourceRoot":"","sources":["../../../src/bookings-v1-category.types.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,sBAAsB;IACtB,6BAAmB,CAAA;IACnB,2BAA2B;IAC3B,6BAAmB,CAAA;AACrB,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB;AAoBD,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;AACrB,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/** 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. */
|
|
8
|
+
export interface Category {
|
|
9
|
+
/**
|
|
10
|
+
* Category ID. Read-only.
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
_id?: string | null;
|
|
14
|
+
/** Category name. */
|
|
15
|
+
name?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* @internal */
|
|
19
|
+
customProperties?: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Category status Read-only.
|
|
22
|
+
* @readonly
|
|
23
|
+
*/
|
|
24
|
+
status?: Status;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* @internal */
|
|
28
|
+
sortOrder?: number | null;
|
|
29
|
+
}
|
|
30
|
+
export declare enum Status {
|
|
31
|
+
/** Default status. */
|
|
32
|
+
CREATED = "CREATED",
|
|
33
|
+
/** Category is deleted. */
|
|
34
|
+
DELETED = "DELETED"
|
|
35
|
+
}
|
|
36
|
+
export interface ListCategoryRequest {
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @internal */
|
|
40
|
+
categoryIds?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @internal */
|
|
44
|
+
includeDeleted?: boolean | null;
|
|
45
|
+
}
|
|
46
|
+
export interface ListCategoryResponse {
|
|
47
|
+
/** Category information. */
|
|
48
|
+
categories?: Category[];
|
|
49
|
+
}
|
|
50
|
+
/** An event sent every time a category entity is changed. */
|
|
51
|
+
export interface CategoryNotification {
|
|
52
|
+
category?: Category;
|
|
53
|
+
event?: Event;
|
|
54
|
+
}
|
|
55
|
+
export declare enum Event {
|
|
56
|
+
Updated = "Updated",
|
|
57
|
+
Deleted = "Deleted",
|
|
58
|
+
Created = "Created"
|
|
59
|
+
}
|
|
60
|
+
export interface CreateCategoryRequest {
|
|
61
|
+
/** Category information. */
|
|
62
|
+
category: Category;
|
|
63
|
+
}
|
|
64
|
+
export interface CreateCategoryResponse {
|
|
65
|
+
/** Category information. */
|
|
66
|
+
category?: Category;
|
|
67
|
+
}
|
|
68
|
+
export interface BatchCreateCategoryRequest {
|
|
69
|
+
/** Category information. */
|
|
70
|
+
categories?: Category[];
|
|
71
|
+
}
|
|
72
|
+
export interface BatchCreateCategoryResponse {
|
|
73
|
+
/** Category information. */
|
|
74
|
+
categories?: Category[];
|
|
75
|
+
}
|
|
76
|
+
export interface UpdateCategoryRequest {
|
|
77
|
+
category: Category;
|
|
78
|
+
}
|
|
79
|
+
export interface UpdateCategoryResponse {
|
|
80
|
+
/** The updated category. */
|
|
81
|
+
category?: Category;
|
|
82
|
+
}
|
|
83
|
+
export interface DeleteCategoryRequest {
|
|
84
|
+
/** Category ID. */
|
|
85
|
+
_id: string | null;
|
|
86
|
+
/** 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 Wix Business Manager). */
|
|
87
|
+
deleteServices?: boolean | null;
|
|
88
|
+
}
|
|
89
|
+
export interface DeleteCategoryResponse {
|
|
90
|
+
/** Deleted Category ID. */
|
|
91
|
+
_id?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface BatchDeleteCategoryRequest {
|
|
94
|
+
/** Category ID. */
|
|
95
|
+
ids?: string[] | null;
|
|
96
|
+
}
|
|
97
|
+
export interface BatchDeleteCategoryResponse {
|
|
98
|
+
}
|
|
99
|
+
export interface BatchUpdateCategoryRequest {
|
|
100
|
+
/** List of categories to be updated. */
|
|
101
|
+
categories?: Category[];
|
|
102
|
+
/** Field mask of fields to update. */
|
|
103
|
+
fieldMask?: string[];
|
|
104
|
+
}
|
|
105
|
+
export interface BatchUpdateCategoryResponse {
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Lists all categories.
|
|
109
|
+
*
|
|
110
|
+
* > **Permissions**
|
|
111
|
+
* > This endpoint requires the Read Bookings - Public Data or the Read Bookings - Including Participants permissions scope
|
|
112
|
+
* @public
|
|
113
|
+
* @documentationMaturity preview
|
|
114
|
+
* @permissionScope Read Bookings - Public Data
|
|
115
|
+
* @applicableIdentity APP
|
|
116
|
+
* @applicableIdentity MEMBER
|
|
117
|
+
* @applicableIdentity VISITOR
|
|
118
|
+
*/
|
|
119
|
+
export declare function list(options?: ListOptions): Promise<ListCategoryResponse>;
|
|
120
|
+
export interface ListOptions {
|
|
121
|
+
/** @internal */
|
|
122
|
+
categoryIds?: string[];
|
|
123
|
+
/** @internal */
|
|
124
|
+
includeDeleted?: boolean | null;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Creates a new category.
|
|
128
|
+
* @param category - Category information.
|
|
129
|
+
* @public
|
|
130
|
+
* @documentationMaturity preview
|
|
131
|
+
* @requiredField category
|
|
132
|
+
* @requiredField category.name
|
|
133
|
+
* @permissionScope Manage Bookings
|
|
134
|
+
* @applicableIdentity APP
|
|
135
|
+
*/
|
|
136
|
+
export declare function create(category: Category): Promise<CreateCategoryResponse>;
|
|
137
|
+
/**
|
|
138
|
+
* Updates an existing category.
|
|
139
|
+
* @param _id - Category ID. Read-only.
|
|
140
|
+
* @public
|
|
141
|
+
* @documentationMaturity preview
|
|
142
|
+
* @requiredField _id
|
|
143
|
+
* @requiredField category
|
|
144
|
+
* @permissionScope Manage Bookings
|
|
145
|
+
* @applicableIdentity APP
|
|
146
|
+
*/
|
|
147
|
+
export declare function update(_id: string | null, category: UpdateCategory): Promise<UpdateCategoryResponse>;
|
|
148
|
+
export interface UpdateCategory {
|
|
149
|
+
/**
|
|
150
|
+
* Category ID. Read-only.
|
|
151
|
+
* @readonly
|
|
152
|
+
*/
|
|
153
|
+
_id?: string | null;
|
|
154
|
+
/** Category name. */
|
|
155
|
+
name?: string | null;
|
|
156
|
+
/** @internal */
|
|
157
|
+
customProperties?: Record<string, string>;
|
|
158
|
+
/**
|
|
159
|
+
* Category status Read-only.
|
|
160
|
+
* @readonly
|
|
161
|
+
*/
|
|
162
|
+
status?: Status;
|
|
163
|
+
/** @internal */
|
|
164
|
+
sortOrder?: number | null;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Deletes a category.
|
|
168
|
+
* @param _id - Category ID.
|
|
169
|
+
* @public
|
|
170
|
+
* @documentationMaturity preview
|
|
171
|
+
* @requiredField _id
|
|
172
|
+
* @permissionScope Manage Bookings
|
|
173
|
+
* @applicableIdentity APP
|
|
174
|
+
*/
|
|
175
|
+
export declare function _delete(_id: string | null, options?: DeleteOptions): Promise<DeleteCategoryResponse>;
|
|
176
|
+
export interface DeleteOptions {
|
|
177
|
+
/** 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 Wix Business Manager). */
|
|
178
|
+
deleteServices?: boolean | null;
|
|
179
|
+
}
|