@wix/auto_sdk_bookings_categories-v-2 1.0.29 → 1.0.31
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/meta.d.ts +157 -1
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/meta.d.mts +157 -1
- package/build/es/meta.mjs +25 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/meta.d.ts +157 -1
- package/build/internal/cjs/meta.js +28 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/meta.d.mts +157 -1
- package/build/internal/es/meta.mjs +25 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/meta.d.ts
CHANGED
|
@@ -220,6 +220,162 @@ interface MoveCategoryResponse {
|
|
|
220
220
|
/** Updated category. */
|
|
221
221
|
category?: Category;
|
|
222
222
|
}
|
|
223
|
+
interface ImportCategoriesRequest {
|
|
224
|
+
/**
|
|
225
|
+
* List of categories to import.
|
|
226
|
+
* @minSize 1
|
|
227
|
+
* @maxSize 100
|
|
228
|
+
*/
|
|
229
|
+
categories?: Category[];
|
|
230
|
+
}
|
|
231
|
+
interface ImportCategoriesResponse {
|
|
232
|
+
}
|
|
233
|
+
interface PublishCategoriesUpdatedRequest {
|
|
234
|
+
}
|
|
235
|
+
interface PublishCategoriesUpdatedResponse {
|
|
236
|
+
}
|
|
237
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
238
|
+
createdEvent?: EntityCreatedEvent;
|
|
239
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
240
|
+
deletedEvent?: EntityDeletedEvent;
|
|
241
|
+
actionEvent?: ActionEvent;
|
|
242
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
243
|
+
id?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
246
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
247
|
+
*/
|
|
248
|
+
entityFqdn?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
251
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
252
|
+
*/
|
|
253
|
+
slug?: string;
|
|
254
|
+
/** ID of the entity associated with the event. */
|
|
255
|
+
entityId?: string;
|
|
256
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
257
|
+
eventTime?: Date | null;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
260
|
+
* (for example, GDPR).
|
|
261
|
+
*/
|
|
262
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
263
|
+
/** If present, indicates the action that triggered the event. */
|
|
264
|
+
originatedFrom?: string | null;
|
|
265
|
+
/**
|
|
266
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
267
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
268
|
+
*/
|
|
269
|
+
entityEventSequence?: string | null;
|
|
270
|
+
}
|
|
271
|
+
/** @oneof */
|
|
272
|
+
interface DomainEventBodyOneOf {
|
|
273
|
+
createdEvent?: EntityCreatedEvent;
|
|
274
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
275
|
+
deletedEvent?: EntityDeletedEvent;
|
|
276
|
+
actionEvent?: ActionEvent;
|
|
277
|
+
}
|
|
278
|
+
interface EntityCreatedEvent {
|
|
279
|
+
entityAsJson?: string;
|
|
280
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
281
|
+
restoreInfo?: RestoreInfo;
|
|
282
|
+
}
|
|
283
|
+
interface RestoreInfo {
|
|
284
|
+
deletedDate?: Date | null;
|
|
285
|
+
}
|
|
286
|
+
interface EntityUpdatedEvent {
|
|
287
|
+
/**
|
|
288
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
289
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
290
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
291
|
+
*/
|
|
292
|
+
currentEntityAsJson?: string;
|
|
293
|
+
}
|
|
294
|
+
interface EntityDeletedEvent {
|
|
295
|
+
/** Entity that was deleted. */
|
|
296
|
+
deletedEntityAsJson?: string | null;
|
|
297
|
+
}
|
|
298
|
+
interface ActionEvent {
|
|
299
|
+
bodyAsJson?: string;
|
|
300
|
+
}
|
|
301
|
+
interface MessageEnvelope {
|
|
302
|
+
/**
|
|
303
|
+
* App instance ID.
|
|
304
|
+
* @format GUID
|
|
305
|
+
*/
|
|
306
|
+
instanceId?: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* Event type.
|
|
309
|
+
* @maxLength 150
|
|
310
|
+
*/
|
|
311
|
+
eventType?: string;
|
|
312
|
+
/** The identification type and identity data. */
|
|
313
|
+
identity?: IdentificationData;
|
|
314
|
+
/** Stringify payload. */
|
|
315
|
+
data?: string;
|
|
316
|
+
}
|
|
317
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
318
|
+
/**
|
|
319
|
+
* ID of a site visitor that has not logged in to the site.
|
|
320
|
+
* @format GUID
|
|
321
|
+
*/
|
|
322
|
+
anonymousVisitorId?: string;
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
327
|
+
memberId?: string;
|
|
328
|
+
/**
|
|
329
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
332
|
+
wixUserId?: string;
|
|
333
|
+
/**
|
|
334
|
+
* ID of an app.
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
337
|
+
appId?: string;
|
|
338
|
+
/** @readonly */
|
|
339
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
340
|
+
}
|
|
341
|
+
/** @oneof */
|
|
342
|
+
interface IdentificationDataIdOneOf {
|
|
343
|
+
/**
|
|
344
|
+
* ID of a site visitor that has not logged in to the site.
|
|
345
|
+
* @format GUID
|
|
346
|
+
*/
|
|
347
|
+
anonymousVisitorId?: string;
|
|
348
|
+
/**
|
|
349
|
+
* ID of a site visitor that has logged in to the site.
|
|
350
|
+
* @format GUID
|
|
351
|
+
*/
|
|
352
|
+
memberId?: string;
|
|
353
|
+
/**
|
|
354
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
355
|
+
* @format GUID
|
|
356
|
+
*/
|
|
357
|
+
wixUserId?: string;
|
|
358
|
+
/**
|
|
359
|
+
* ID of an app.
|
|
360
|
+
* @format GUID
|
|
361
|
+
*/
|
|
362
|
+
appId?: string;
|
|
363
|
+
}
|
|
364
|
+
declare enum WebhookIdentityType {
|
|
365
|
+
UNKNOWN = "UNKNOWN",
|
|
366
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
367
|
+
MEMBER = "MEMBER",
|
|
368
|
+
WIX_USER = "WIX_USER",
|
|
369
|
+
APP = "APP"
|
|
370
|
+
}
|
|
371
|
+
/** @enumType */
|
|
372
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
373
|
+
/** @docsIgnore */
|
|
374
|
+
type CreateCategoryApplicationErrors = {
|
|
375
|
+
code?: 'CATEGORY_LIMIT_REACHED';
|
|
376
|
+
description?: string;
|
|
377
|
+
data?: Record<string, any>;
|
|
378
|
+
};
|
|
223
379
|
|
|
224
380
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
225
381
|
getUrl: (context: any) => string;
|
|
@@ -247,4 +403,4 @@ declare function moveCategory(): __PublicMethodMetaInfo<'POST', {
|
|
|
247
403
|
categoryId: string;
|
|
248
404
|
}, MoveCategoryRequest$1, MoveCategoryRequest, MoveCategoryResponse$1, MoveCategoryResponse>;
|
|
249
405
|
|
|
250
|
-
export { type __PublicMethodMetaInfo, countCategories, createCategory, deleteCategory, getCategory, moveCategory, queryCategories, updateCategory };
|
|
406
|
+
export { type ActionEvent as ActionEventOriginal, type Category as CategoryOriginal, type CountCategoriesRequest as CountCategoriesRequestOriginal, type CountCategoriesResponse as CountCategoriesResponseOriginal, type CreateCategoryApplicationErrors as CreateCategoryApplicationErrorsOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetCategoryRequest as GetCategoryRequestOriginal, type GetCategoryResponse as GetCategoryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ImportCategoriesRequest as ImportCategoriesRequestOriginal, type ImportCategoriesResponse as ImportCategoriesResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MoveCategoryRequest as MoveCategoryRequestOriginal, type MoveCategoryResponse as MoveCategoryResponseOriginal, Position as PositionOriginal, type PositionWithLiterals as PositionWithLiteralsOriginal, type PublishCategoriesUpdatedRequest as PublishCategoriesUpdatedRequestOriginal, type PublishCategoriesUpdatedResponse as PublishCategoriesUpdatedResponseOriginal, type QueryCategoriesRequest as QueryCategoriesRequestOriginal, type QueryCategoriesResponse as QueryCategoriesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, countCategories, createCategory, deleteCategory, getCategory, moveCategory, queryCategories, updateCategory };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
PositionOriginal: () => Position,
|
|
24
|
+
SortOrderOriginal: () => SortOrder,
|
|
25
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
23
26
|
countCategories: () => countCategories2,
|
|
24
27
|
createCategory: () => createCategory2,
|
|
25
28
|
deleteCategory: () => deleteCategory2,
|
|
@@ -317,6 +320,28 @@ function moveCategory(payload) {
|
|
|
317
320
|
return __moveCategory;
|
|
318
321
|
}
|
|
319
322
|
|
|
323
|
+
// src/bookings-categories-v2-category-categories-v-2.types.ts
|
|
324
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
325
|
+
SortOrder2["ASC"] = "ASC";
|
|
326
|
+
SortOrder2["DESC"] = "DESC";
|
|
327
|
+
return SortOrder2;
|
|
328
|
+
})(SortOrder || {});
|
|
329
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
330
|
+
Position2["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
|
|
331
|
+
Position2["LAST"] = "LAST";
|
|
332
|
+
Position2["FIRST"] = "FIRST";
|
|
333
|
+
Position2["AFTER_CATEGORY"] = "AFTER_CATEGORY";
|
|
334
|
+
return Position2;
|
|
335
|
+
})(Position || {});
|
|
336
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
337
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
338
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
339
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
340
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
341
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
342
|
+
return WebhookIdentityType2;
|
|
343
|
+
})(WebhookIdentityType || {});
|
|
344
|
+
|
|
320
345
|
// src/bookings-categories-v2-category-categories-v-2.meta.ts
|
|
321
346
|
function createCategory2() {
|
|
322
347
|
const payload = {};
|
|
@@ -446,6 +471,9 @@ function moveCategory2() {
|
|
|
446
471
|
}
|
|
447
472
|
// Annotate the CommonJS export names for ESM import in node:
|
|
448
473
|
0 && (module.exports = {
|
|
474
|
+
PositionOriginal,
|
|
475
|
+
SortOrderOriginal,
|
|
476
|
+
WebhookIdentityTypeOriginal,
|
|
449
477
|
countCategories,
|
|
450
478
|
createCategory,
|
|
451
479
|
deleteCategory,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/bookings-categories-v2-category-categories-v-2.http.ts","../../src/bookings-categories-v2-category-categories-v-2.meta.ts"],"sourcesContent":["export * from './src/bookings-categories-v2-category-categories-v-2.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsCategoriesV2CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n _: [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories-v-2';\n\n/** Creates a category. */\nexport function createCategory(payload: object): RequestOptionsFactory<any> {\n function __createCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.CreateCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCategory;\n}\n\n/** Retrieves a category. */\nexport function getCategory(payload: object): RequestOptionsFactory<any> {\n function __getCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.GetCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCategory;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, `revision` increments by 1.\n * You must specify the current `revision` to prevent unintended overwrites.\n *\n * You can't adjust a categories `sortOrder` with this method, call Move Category ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/move-category) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/move-category)) instead.\n */\nexport function updateCategory(payload: object): RequestOptionsFactory<any> {\n function __updateCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.UpdateCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{category.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCategory;\n}\n\n/**\n * Deletes a category.\n *\n *\n * ### Impact on connected services\n *\n * 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.\n * 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`.\n */\nexport function deleteCategory(payload: object): RequestOptionsFactory<any> {\n function __deleteCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.DeleteCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCategory;\n}\n\n/**\n * Creates a query to retrieve a list of `category` objects.\n *\n * The `queryCategories()` function builds a query to retrieve a list of `category` objects and returns a `categoriesQueryBuilder` object.\n *\n * 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/categories-v2/categories-query-builder/find) function.\n *\n * 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.\n *\n * `queryCategories()` runs with the following `CategoriesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * 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`.\n *\n * 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/categories-v2/categories-query-result/items) property in `CategoriesQueryResult`.\n */\nexport function queryCategories(payload: object): RequestOptionsFactory<any> {\n function __queryCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.QueryCategories',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryCategories;\n}\n\n/**\n * Counts categories, given the specified filtering.\n *\n *\n * 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.\n */\nexport function countCategories(payload: object): RequestOptionsFactory<any> {\n function __countCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.CountCategories',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countCategories;\n}\n\n/**\n * Moves a category to the start, end, or immediately after a specified category by updating its `sortOrder` field.\n *\n * 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.\n */\nexport function moveCategory(payload: object): RequestOptionsFactory<any> {\n function __moveCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.MoveCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/set-position/{categoryId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __moveCategory;\n}\n","import * as ambassadorWixBookingsCategoriesV2Category from './bookings-categories-v2-category-categories-v-2.http.js';\nimport * as ambassadorWixBookingsCategoriesV2CategoryTypes from './bookings-categories-v2-category-categories-v-2.types.js';\nimport * as ambassadorWixBookingsCategoriesV2CategoryUniversalTypes from './bookings-categories-v2-category-categories-v-2.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createCategory(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CreateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CreateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CreateCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CreateCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.createCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getCategory(): __PublicMethodMetaInfo<\n 'GET',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.GetCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.GetCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.GetCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.GetCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.getCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/categories/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateCategory(): __PublicMethodMetaInfo<\n 'PATCH',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.UpdateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.UpdateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.UpdateCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.UpdateCategoryResponse\n> {\n const payload = { category: { id: ':categoryId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.updateCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/categories/{category.id}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteCategory(): __PublicMethodMetaInfo<\n 'DELETE',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.DeleteCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.DeleteCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.DeleteCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.DeleteCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.deleteCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/categories/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryCategories(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.QueryCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.QueryCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.QueryCategoriesResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.QueryCategoriesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.queryCategories(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/categories/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function countCategories(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CountCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CountCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CountCategoriesResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CountCategoriesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.countCategories(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories/count',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function moveCategory(): __PublicMethodMetaInfo<\n 'POST',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.MoveCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.MoveCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.MoveCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.MoveCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.moveCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories/set-position/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAA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EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,gBAOd;AACA,QAAM,UAAU,EAAE,YAAY,cAAc;AAE5C,QAAM,oBACsC,aAAa,OAAO;AAEhE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["countCategories","createCategory","deleteCategory","getCategory","moveCategory","queryCategories","updateCategory","import_timestamp","import_rest_modules","payload","createCategory","getCategory","updateCategory","deleteCategory","queryCategories","countCategories","moveCategory"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/bookings-categories-v2-category-categories-v-2.http.ts","../../src/bookings-categories-v2-category-categories-v-2.types.ts","../../src/bookings-categories-v2-category-categories-v-2.meta.ts"],"sourcesContent":["export * from './src/bookings-categories-v2-category-categories-v-2.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsCategoriesV2CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n _: [\n {\n srcPath: '/_api/bookings/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories-v-2';\n\n/** Creates a category. */\nexport function createCategory(payload: object): RequestOptionsFactory<any> {\n function __createCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.CreateCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCategory;\n}\n\n/** Retrieves a category. */\nexport function getCategory(payload: object): RequestOptionsFactory<any> {\n function __getCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.GetCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCategory;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, `revision` increments by 1.\n * You must specify the current `revision` to prevent unintended overwrites.\n *\n * You can't adjust a categories `sortOrder` with this method, call Move Category ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/move-category) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/move-category)) instead.\n */\nexport function updateCategory(payload: object): RequestOptionsFactory<any> {\n function __updateCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.UpdateCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{category.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCategory;\n}\n\n/**\n * Deletes a category.\n *\n *\n * ### Impact on connected services\n *\n * 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.\n * 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`.\n */\nexport function deleteCategory(payload: object): RequestOptionsFactory<any> {\n function __deleteCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.DeleteCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCategory;\n}\n\n/**\n * Creates a query to retrieve a list of `category` objects.\n *\n * The `queryCategories()` function builds a query to retrieve a list of `category` objects and returns a `categoriesQueryBuilder` object.\n *\n * 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/categories-v2/categories-query-builder/find) function.\n *\n * 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.\n *\n * `queryCategories()` runs with the following `CategoriesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * 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`.\n *\n * 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/categories-v2/categories-query-result/items) property in `CategoriesQueryResult`.\n */\nexport function queryCategories(payload: object): RequestOptionsFactory<any> {\n function __queryCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.QueryCategories',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryCategories;\n}\n\n/**\n * Counts categories, given the specified filtering.\n *\n *\n * 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.\n */\nexport function countCategories(payload: object): RequestOptionsFactory<any> {\n function __countCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.CountCategories',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countCategories;\n}\n\n/**\n * Moves a category to the start, end, or immediately after a specified category by updating its `sortOrder` field.\n *\n * 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.\n */\nexport function moveCategory(payload: object): RequestOptionsFactory<any> {\n function __moveCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.categories.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.categories.v2.CategoriesService.MoveCategory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsCategoriesV2CategoriesServiceUrl({\n protoPath: '/v2/categories/set-position/{categoryId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __moveCategory;\n}\n","/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the category is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the category.\n *\n * Ignored when creating a category.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the category was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the Category was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Category name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n /**\n * Defines the category's position in the categories list relative to other categories.\n * Wix Bookings assigns `sortOrder` values with large gaps between adjacent categories, allowing efficient reordering without updating the entire list. When gaps become too small, the system automatically reassigns new `sortOrder` values to restore larger gaps.\n * @readonly\n */\n sortOrder?: number | null;\n /**\n * Custom field data for the category object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface GetCategoryRequest {\n /**\n * ID of the category to retrieve.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface GetCategoryResponse {\n /** Retrieved category. */\n category?: Category;\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface DeleteCategoryResponse {}\n\nexport interface QueryCategoriesRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryCategoriesResponse {\n /** Retrieved categories. */\n categories?: Category[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountCategoriesRequest {\n /** Filter to base the count on. */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountCategoriesResponse {\n /** Number of categories matching the filter. */\n count?: number;\n}\n\nexport interface MoveCategoryRequest {\n /**\n * ID of the category to move.\n * @format GUID\n */\n categoryId: string;\n /** New position of the category. */\n position?: PositionWithLiterals;\n /**\n * ID of the reference category.\n * Specify only for `{\"position\": \"AFTER_CATEGORY\"}`.\n * @format GUID\n */\n afterCategoryId?: string | null;\n}\n\nexport enum Position {\n UNKNOWN_POSITION = 'UNKNOWN_POSITION',\n /** Place the category at the end of the list. */\n LAST = 'LAST',\n /** Place the category at the beginning of the list. */\n FIRST = 'FIRST',\n /** Place the category immediately after a specific category. */\n AFTER_CATEGORY = 'AFTER_CATEGORY',\n}\n\n/** @enumType */\nexport type PositionWithLiterals =\n | Position\n | 'UNKNOWN_POSITION'\n | 'LAST'\n | 'FIRST'\n | 'AFTER_CATEGORY';\n\nexport interface MoveCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface ImportCategoriesRequest {\n /**\n * List of categories to import.\n * @minSize 1\n * @maxSize 100\n */\n categories?: Category[];\n}\n\nexport interface ImportCategoriesResponse {}\n\nexport interface PublishCategoriesUpdatedRequest {}\n\nexport interface PublishCategoriesUpdatedResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateCategoryApplicationErrors = {\n code?: 'CATEGORY_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixBookingsCategoriesV2Category from './bookings-categories-v2-category-categories-v-2.http.js';\nimport * as ambassadorWixBookingsCategoriesV2CategoryTypes from './bookings-categories-v2-category-categories-v-2.types.js';\nimport * as ambassadorWixBookingsCategoriesV2CategoryUniversalTypes from './bookings-categories-v2-category-categories-v-2.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createCategory(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CreateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CreateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CreateCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CreateCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.createCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getCategory(): __PublicMethodMetaInfo<\n 'GET',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.GetCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.GetCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.GetCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.GetCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.getCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/categories/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateCategory(): __PublicMethodMetaInfo<\n 'PATCH',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.UpdateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.UpdateCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.UpdateCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.UpdateCategoryResponse\n> {\n const payload = { category: { id: ':categoryId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.updateCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/categories/{category.id}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteCategory(): __PublicMethodMetaInfo<\n 'DELETE',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.DeleteCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.DeleteCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.DeleteCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.DeleteCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.deleteCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/categories/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryCategories(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.QueryCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.QueryCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.QueryCategoriesResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.QueryCategoriesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.queryCategories(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/categories/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function countCategories(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CountCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CountCategoriesRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.CountCategoriesResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.CountCategoriesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.countCategories(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories/count',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function moveCategory(): __PublicMethodMetaInfo<\n 'POST',\n { categoryId: string },\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.MoveCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryTypes.MoveCategoryRequest,\n ambassadorWixBookingsCategoriesV2CategoryUniversalTypes.MoveCategoryResponse,\n ambassadorWixBookingsCategoriesV2CategoryTypes.MoveCategoryResponse\n> {\n const payload = { categoryId: ':categoryId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsCategoriesV2Category.moveCategory(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/categories/set-position/{categoryId}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Category as CategoryOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreateCategoryRequest as CreateCategoryRequestOriginal,\n CreateCategoryResponse as CreateCategoryResponseOriginal,\n GetCategoryRequest as GetCategoryRequestOriginal,\n GetCategoryResponse as GetCategoryResponseOriginal,\n UpdateCategoryRequest as UpdateCategoryRequestOriginal,\n UpdateCategoryResponse as UpdateCategoryResponseOriginal,\n DeleteCategoryRequest as DeleteCategoryRequestOriginal,\n DeleteCategoryResponse as DeleteCategoryResponseOriginal,\n QueryCategoriesRequest as QueryCategoriesRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryCategoriesResponse as QueryCategoriesResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n CountCategoriesRequest as CountCategoriesRequestOriginal,\n CountCategoriesResponse as CountCategoriesResponseOriginal,\n MoveCategoryRequest as MoveCategoryRequestOriginal,\n Position as PositionOriginal,\n PositionWithLiterals as PositionWithLiteralsOriginal,\n MoveCategoryResponse as MoveCategoryResponseOriginal,\n ImportCategoriesRequest as ImportCategoriesRequestOriginal,\n ImportCategoriesResponse as ImportCategoriesResponseOriginal,\n PublishCategoriesUpdatedRequest as PublishCategoriesUpdatedRequestOriginal,\n PublishCategoriesUpdatedResponse as PublishCategoriesUpdatedResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n CreateCategoryApplicationErrors as CreateCategoryApplicationErrorsOriginal,\n} from './bookings-categories-v2-category-categories-v-2.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,M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EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACsC,gBAAgB,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACsC,gBAAgB,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,gBAOd;AACA,QAAM,UAAU,EAAE,YAAY,cAAc;AAE5C,QAAM,oBACsC,aAAa,OAAO;AAEhE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["countCategories","createCategory","deleteCategory","getCategory","moveCategory","queryCategories","updateCategory","import_timestamp","import_rest_modules","payload","SortOrder","Position","WebhookIdentityType","createCategory","getCategory","updateCategory","deleteCategory","queryCategories","countCategories","moveCategory"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -220,6 +220,162 @@ interface MoveCategoryResponse {
|
|
|
220
220
|
/** Updated category. */
|
|
221
221
|
category?: Category;
|
|
222
222
|
}
|
|
223
|
+
interface ImportCategoriesRequest {
|
|
224
|
+
/**
|
|
225
|
+
* List of categories to import.
|
|
226
|
+
* @minSize 1
|
|
227
|
+
* @maxSize 100
|
|
228
|
+
*/
|
|
229
|
+
categories?: Category[];
|
|
230
|
+
}
|
|
231
|
+
interface ImportCategoriesResponse {
|
|
232
|
+
}
|
|
233
|
+
interface PublishCategoriesUpdatedRequest {
|
|
234
|
+
}
|
|
235
|
+
interface PublishCategoriesUpdatedResponse {
|
|
236
|
+
}
|
|
237
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
238
|
+
createdEvent?: EntityCreatedEvent;
|
|
239
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
240
|
+
deletedEvent?: EntityDeletedEvent;
|
|
241
|
+
actionEvent?: ActionEvent;
|
|
242
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
243
|
+
id?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
246
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
247
|
+
*/
|
|
248
|
+
entityFqdn?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
251
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
252
|
+
*/
|
|
253
|
+
slug?: string;
|
|
254
|
+
/** ID of the entity associated with the event. */
|
|
255
|
+
entityId?: string;
|
|
256
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
257
|
+
eventTime?: Date | null;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
260
|
+
* (for example, GDPR).
|
|
261
|
+
*/
|
|
262
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
263
|
+
/** If present, indicates the action that triggered the event. */
|
|
264
|
+
originatedFrom?: string | null;
|
|
265
|
+
/**
|
|
266
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
267
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
268
|
+
*/
|
|
269
|
+
entityEventSequence?: string | null;
|
|
270
|
+
}
|
|
271
|
+
/** @oneof */
|
|
272
|
+
interface DomainEventBodyOneOf {
|
|
273
|
+
createdEvent?: EntityCreatedEvent;
|
|
274
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
275
|
+
deletedEvent?: EntityDeletedEvent;
|
|
276
|
+
actionEvent?: ActionEvent;
|
|
277
|
+
}
|
|
278
|
+
interface EntityCreatedEvent {
|
|
279
|
+
entityAsJson?: string;
|
|
280
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
281
|
+
restoreInfo?: RestoreInfo;
|
|
282
|
+
}
|
|
283
|
+
interface RestoreInfo {
|
|
284
|
+
deletedDate?: Date | null;
|
|
285
|
+
}
|
|
286
|
+
interface EntityUpdatedEvent {
|
|
287
|
+
/**
|
|
288
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
289
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
290
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
291
|
+
*/
|
|
292
|
+
currentEntityAsJson?: string;
|
|
293
|
+
}
|
|
294
|
+
interface EntityDeletedEvent {
|
|
295
|
+
/** Entity that was deleted. */
|
|
296
|
+
deletedEntityAsJson?: string | null;
|
|
297
|
+
}
|
|
298
|
+
interface ActionEvent {
|
|
299
|
+
bodyAsJson?: string;
|
|
300
|
+
}
|
|
301
|
+
interface MessageEnvelope {
|
|
302
|
+
/**
|
|
303
|
+
* App instance ID.
|
|
304
|
+
* @format GUID
|
|
305
|
+
*/
|
|
306
|
+
instanceId?: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* Event type.
|
|
309
|
+
* @maxLength 150
|
|
310
|
+
*/
|
|
311
|
+
eventType?: string;
|
|
312
|
+
/** The identification type and identity data. */
|
|
313
|
+
identity?: IdentificationData;
|
|
314
|
+
/** Stringify payload. */
|
|
315
|
+
data?: string;
|
|
316
|
+
}
|
|
317
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
318
|
+
/**
|
|
319
|
+
* ID of a site visitor that has not logged in to the site.
|
|
320
|
+
* @format GUID
|
|
321
|
+
*/
|
|
322
|
+
anonymousVisitorId?: string;
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
327
|
+
memberId?: string;
|
|
328
|
+
/**
|
|
329
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
332
|
+
wixUserId?: string;
|
|
333
|
+
/**
|
|
334
|
+
* ID of an app.
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
337
|
+
appId?: string;
|
|
338
|
+
/** @readonly */
|
|
339
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
340
|
+
}
|
|
341
|
+
/** @oneof */
|
|
342
|
+
interface IdentificationDataIdOneOf {
|
|
343
|
+
/**
|
|
344
|
+
* ID of a site visitor that has not logged in to the site.
|
|
345
|
+
* @format GUID
|
|
346
|
+
*/
|
|
347
|
+
anonymousVisitorId?: string;
|
|
348
|
+
/**
|
|
349
|
+
* ID of a site visitor that has logged in to the site.
|
|
350
|
+
* @format GUID
|
|
351
|
+
*/
|
|
352
|
+
memberId?: string;
|
|
353
|
+
/**
|
|
354
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
355
|
+
* @format GUID
|
|
356
|
+
*/
|
|
357
|
+
wixUserId?: string;
|
|
358
|
+
/**
|
|
359
|
+
* ID of an app.
|
|
360
|
+
* @format GUID
|
|
361
|
+
*/
|
|
362
|
+
appId?: string;
|
|
363
|
+
}
|
|
364
|
+
declare enum WebhookIdentityType {
|
|
365
|
+
UNKNOWN = "UNKNOWN",
|
|
366
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
367
|
+
MEMBER = "MEMBER",
|
|
368
|
+
WIX_USER = "WIX_USER",
|
|
369
|
+
APP = "APP"
|
|
370
|
+
}
|
|
371
|
+
/** @enumType */
|
|
372
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
373
|
+
/** @docsIgnore */
|
|
374
|
+
type CreateCategoryApplicationErrors = {
|
|
375
|
+
code?: 'CATEGORY_LIMIT_REACHED';
|
|
376
|
+
description?: string;
|
|
377
|
+
data?: Record<string, any>;
|
|
378
|
+
};
|
|
223
379
|
|
|
224
380
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
225
381
|
getUrl: (context: any) => string;
|
|
@@ -247,4 +403,4 @@ declare function moveCategory(): __PublicMethodMetaInfo<'POST', {
|
|
|
247
403
|
categoryId: string;
|
|
248
404
|
}, MoveCategoryRequest$1, MoveCategoryRequest, MoveCategoryResponse$1, MoveCategoryResponse>;
|
|
249
405
|
|
|
250
|
-
export { type __PublicMethodMetaInfo, countCategories, createCategory, deleteCategory, getCategory, moveCategory, queryCategories, updateCategory };
|
|
406
|
+
export { type ActionEvent as ActionEventOriginal, type Category as CategoryOriginal, type CountCategoriesRequest as CountCategoriesRequestOriginal, type CountCategoriesResponse as CountCategoriesResponseOriginal, type CreateCategoryApplicationErrors as CreateCategoryApplicationErrorsOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetCategoryRequest as GetCategoryRequestOriginal, type GetCategoryResponse as GetCategoryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ImportCategoriesRequest as ImportCategoriesRequestOriginal, type ImportCategoriesResponse as ImportCategoriesResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MoveCategoryRequest as MoveCategoryRequestOriginal, type MoveCategoryResponse as MoveCategoryResponseOriginal, Position as PositionOriginal, type PositionWithLiterals as PositionWithLiteralsOriginal, type PublishCategoriesUpdatedRequest as PublishCategoriesUpdatedRequestOriginal, type PublishCategoriesUpdatedResponse as PublishCategoriesUpdatedResponseOriginal, type QueryCategoriesRequest as QueryCategoriesRequestOriginal, type QueryCategoriesResponse as QueryCategoriesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, countCategories, createCategory, deleteCategory, getCategory, moveCategory, queryCategories, updateCategory };
|
package/build/es/meta.mjs
CHANGED
|
@@ -285,6 +285,28 @@ function moveCategory(payload) {
|
|
|
285
285
|
return __moveCategory;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
+
// src/bookings-categories-v2-category-categories-v-2.types.ts
|
|
289
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
290
|
+
SortOrder2["ASC"] = "ASC";
|
|
291
|
+
SortOrder2["DESC"] = "DESC";
|
|
292
|
+
return SortOrder2;
|
|
293
|
+
})(SortOrder || {});
|
|
294
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
295
|
+
Position2["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
|
|
296
|
+
Position2["LAST"] = "LAST";
|
|
297
|
+
Position2["FIRST"] = "FIRST";
|
|
298
|
+
Position2["AFTER_CATEGORY"] = "AFTER_CATEGORY";
|
|
299
|
+
return Position2;
|
|
300
|
+
})(Position || {});
|
|
301
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
302
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
303
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
304
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
305
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
306
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
307
|
+
return WebhookIdentityType2;
|
|
308
|
+
})(WebhookIdentityType || {});
|
|
309
|
+
|
|
288
310
|
// src/bookings-categories-v2-category-categories-v-2.meta.ts
|
|
289
311
|
function createCategory2() {
|
|
290
312
|
const payload = {};
|
|
@@ -413,6 +435,9 @@ function moveCategory2() {
|
|
|
413
435
|
};
|
|
414
436
|
}
|
|
415
437
|
export {
|
|
438
|
+
Position as PositionOriginal,
|
|
439
|
+
SortOrder as SortOrderOriginal,
|
|
440
|
+
WebhookIdentityType as WebhookIdentityTypeOriginal,
|
|
416
441
|
countCategories2 as countCategories,
|
|
417
442
|
createCategory2 as createCategory,
|
|
418
443
|
deleteCategory2 as deleteCategory,
|