@wix/auto_sdk_bookings_categories 1.0.20 → 1.0.22

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.
@@ -197,7 +197,6 @@ interface CategoryNotificationEnvelope {
197
197
  data: CategoryNotification;
198
198
  metadata: BaseEventMetadata;
199
199
  }
200
- type CategoryNonNullablePaths = `status`;
201
200
  interface ListCategoriesOptions {
202
201
  /**
203
202
  * IDs of the categories to retrieve.
@@ -229,4 +228,4 @@ interface DeleteCategoryOptions {
229
228
  deleteServices?: boolean | null;
230
229
  }
231
230
 
232
- export { type BatchCreateCategoryRequest as B, type CategoryNonNullablePaths as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type Category as b, type UpdateCategoryResponse as c, type DeleteCategoryResponse as d, type CategoryNotificationEnvelope as e, type ListCategoryRequest as f, type CategoryNotification as g, type CreateCategoryRequest as h, type CreateCategoryResponse as i, type BatchCreateCategoryResponse as j, type UpdateCategoryRequest as k, type DeleteCategoryRequest as l, type BatchDeleteCategoryRequest as m, type BatchDeleteCategoryResponse as n, type BatchUpdateCategoryRequest as o, type BatchUpdateCategoryResponse as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r };
231
+ export { type BatchCreateCategoryRequest as B, type Category as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type UpdateCategoryResponse as b, type DeleteCategoryResponse as c, type CategoryNotificationEnvelope as d, type ListCategoryRequest as e, type CategoryNotification as f, type CreateCategoryRequest as g, type CreateCategoryResponse as h, type BatchCreateCategoryResponse as i, type UpdateCategoryRequest as j, type DeleteCategoryRequest as k, type BatchDeleteCategoryRequest as l, type BatchDeleteCategoryResponse as m, type BatchUpdateCategoryRequest as n, type BatchUpdateCategoryResponse as o, type IdentificationDataIdOneOf as p, type BaseEventMetadata as q };
@@ -1,6 +1,6 @@
1
- import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { L as ListCategoriesOptions, a as ListCategoryResponse, C as CategoryNonNullablePaths, b as Category, U as UpdateCategory, c as UpdateCategoryResponse, D as DeleteCategoryOptions, d as DeleteCategoryResponse, e as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DRMtv3I0.js';
3
- export { r as BaseEventMetadata, B as BatchCreateCategoryRequest, j as BatchCreateCategoryResponse, m as BatchDeleteCategoryRequest, n as BatchDeleteCategoryResponse, o as BatchUpdateCategoryRequest, p as BatchUpdateCategoryResponse, g as CategoryNotification, h as CreateCategoryRequest, i as CreateCategoryResponse, l as DeleteCategoryRequest, E as Event, I as IdentificationData, q as IdentificationDataIdOneOf, f as ListCategoryRequest, M as MessageEnvelope, S as Status, k as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DRMtv3I0.js';
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { L as ListCategoriesOptions, a as ListCategoryResponse, C as Category, U as UpdateCategory, b as UpdateCategoryResponse, D as DeleteCategoryOptions, c as DeleteCategoryResponse, d as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DrWLnqJ6.js';
3
+ export { q as BaseEventMetadata, B as BatchCreateCategoryRequest, i as BatchCreateCategoryResponse, l as BatchDeleteCategoryRequest, m as BatchDeleteCategoryResponse, n as BatchUpdateCategoryRequest, o as BatchUpdateCategoryResponse, f as CategoryNotification, g as CreateCategoryRequest, h as CreateCategoryResponse, k as DeleteCategoryRequest, E as Event, I as IdentificationData, p as IdentificationDataIdOneOf, e as ListCategoryRequest, M as MessageEnvelope, S as Status, j as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DrWLnqJ6.js';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {
@@ -9,9 +9,7 @@ interface ListCategoriesSignature {
9
9
  * @param - Options to use when listing categories.
10
10
  * @deprecated
11
11
  */
12
- (options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoryResponse, {
13
- [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;
14
- }[CategoryNonNullablePaths]>>;
12
+ (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;
15
13
  }
16
14
  declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
17
15
  interface CreateCategorySignature {
@@ -21,7 +19,7 @@ interface CreateCategorySignature {
21
19
  * @returns Created category.
22
20
  * @deprecated
23
21
  */
24
- (category: NonNullablePaths<Category, `name`>): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
22
+ (category: Category): Promise<Category>;
25
23
  }
26
24
  declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
27
25
  interface UpdateCategorySignature {
@@ -36,9 +34,7 @@ interface UpdateCategorySignature {
36
34
  * @param - Category ID.
37
35
  * @deprecated
38
36
  */
39
- (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<NonNullablePaths<UpdateCategoryResponse, {
40
- [P in CategoryNonNullablePaths]: `category.${P}`;
41
- }[CategoryNonNullablePaths]>>;
37
+ (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;
42
38
  }
43
39
  declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
44
40
  interface DeleteCategorySignature {
@@ -52,7 +48,7 @@ interface DeleteCategorySignature {
52
48
  * @param - ID of the category to delete.
53
49
  * @deprecated
54
50
  */
55
- (_id: string, options?: DeleteCategoryOptions): Promise<DeleteCategoryResponse>;
51
+ (_id: string, options?: DeleteCategoryOptions | undefined): Promise<DeleteCategoryResponse>;
56
52
  }
57
53
  declare const onCategoryNotification$1: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
58
54
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/bookings-v1-category-categories.public.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNonNullablePaths,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: NonNullablePaths<Category, `name`>): Promise<\n NonNullablePaths<Category, CategoryNonNullablePaths>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNonNullablePaths,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n EventWithLiterals,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n StatusWithLiterals,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n WebhookIdentityTypeWithLiterals,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\nexport type CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAA8D;;;ACD9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;A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BAA4B;","names":["createCategory","deleteCategory","listCategories","onCategoryNotification","updateCategory","import_rename_all_nested_keys","import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError","listCategories","createCategory","updateCategory","deleteCategory","import_rest_modules","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/bookings-v1-category-categories.public.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: Category): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions | undefined\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\ntype CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAA8D;;;ACD9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AA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UAAM,uBAAmB,uBAAAA;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,IAAI;AAAA,UACJ,gBAAgB;AAAA,QAClB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,SAAS;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD3gBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,YACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,aACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,aACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,YACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,6BAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,cACC,wEAAwC,KAAK;AACjD,EAAgC;;;AGnHhC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAEhD,IAAMC,8BAET,mDAAkB,sBAA4B;","names":["createCategory","deleteCategory","listCategories","onCategoryNotification","updateCategory","import_rename_all_nested_keys","import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError","listCategories","createCategory","updateCategory","deleteCategory","import_rest_modules","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
@@ -1,4 +1,4 @@
1
- import { f as ListCategoryRequest$1, a as ListCategoryResponse$1, h as CreateCategoryRequest$1, i as CreateCategoryResponse$1, k as UpdateCategoryRequest$1, c as UpdateCategoryResponse$1, l as DeleteCategoryRequest$1, d as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DRMtv3I0.js';
1
+ import { e as ListCategoryRequest$1, a as ListCategoryResponse$1, g as CreateCategoryRequest$1, h as CreateCategoryResponse$1, j as UpdateCategoryRequest$1, b as UpdateCategoryResponse$1, k as DeleteCategoryRequest$1, c as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DrWLnqJ6.js';
2
2
 
3
3
  /** 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. */
4
4
  interface Category {
@@ -197,7 +197,6 @@ interface CategoryNotificationEnvelope {
197
197
  data: CategoryNotification;
198
198
  metadata: BaseEventMetadata;
199
199
  }
200
- type CategoryNonNullablePaths = `status`;
201
200
  interface ListCategoriesOptions {
202
201
  /**
203
202
  * IDs of the categories to retrieve.
@@ -229,4 +228,4 @@ interface DeleteCategoryOptions {
229
228
  deleteServices?: boolean | null;
230
229
  }
231
230
 
232
- export { type BatchCreateCategoryRequest as B, type CategoryNonNullablePaths as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type Category as b, type UpdateCategoryResponse as c, type DeleteCategoryResponse as d, type CategoryNotificationEnvelope as e, type ListCategoryRequest as f, type CategoryNotification as g, type CreateCategoryRequest as h, type CreateCategoryResponse as i, type BatchCreateCategoryResponse as j, type UpdateCategoryRequest as k, type DeleteCategoryRequest as l, type BatchDeleteCategoryRequest as m, type BatchDeleteCategoryResponse as n, type BatchUpdateCategoryRequest as o, type BatchUpdateCategoryResponse as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r };
231
+ export { type BatchCreateCategoryRequest as B, type Category as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type UpdateCategoryResponse as b, type DeleteCategoryResponse as c, type CategoryNotificationEnvelope as d, type ListCategoryRequest as e, type CategoryNotification as f, type CreateCategoryRequest as g, type CreateCategoryResponse as h, type BatchCreateCategoryResponse as i, type UpdateCategoryRequest as j, type DeleteCategoryRequest as k, type BatchDeleteCategoryRequest as l, type BatchDeleteCategoryResponse as m, type BatchUpdateCategoryRequest as n, type BatchUpdateCategoryResponse as o, type IdentificationDataIdOneOf as p, type BaseEventMetadata as q };
@@ -1,6 +1,6 @@
1
- import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { L as ListCategoriesOptions, a as ListCategoryResponse, C as CategoryNonNullablePaths, b as Category, U as UpdateCategory, c as UpdateCategoryResponse, D as DeleteCategoryOptions, d as DeleteCategoryResponse, e as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DRMtv3I0.mjs';
3
- export { r as BaseEventMetadata, B as BatchCreateCategoryRequest, j as BatchCreateCategoryResponse, m as BatchDeleteCategoryRequest, n as BatchDeleteCategoryResponse, o as BatchUpdateCategoryRequest, p as BatchUpdateCategoryResponse, g as CategoryNotification, h as CreateCategoryRequest, i as CreateCategoryResponse, l as DeleteCategoryRequest, E as Event, I as IdentificationData, q as IdentificationDataIdOneOf, f as ListCategoryRequest, M as MessageEnvelope, S as Status, k as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DRMtv3I0.mjs';
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { L as ListCategoriesOptions, a as ListCategoryResponse, C as Category, U as UpdateCategory, b as UpdateCategoryResponse, D as DeleteCategoryOptions, c as DeleteCategoryResponse, d as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DrWLnqJ6.mjs';
3
+ export { q as BaseEventMetadata, B as BatchCreateCategoryRequest, i as BatchCreateCategoryResponse, l as BatchDeleteCategoryRequest, m as BatchDeleteCategoryResponse, n as BatchUpdateCategoryRequest, o as BatchUpdateCategoryResponse, f as CategoryNotification, g as CreateCategoryRequest, h as CreateCategoryResponse, k as DeleteCategoryRequest, E as Event, I as IdentificationData, p as IdentificationDataIdOneOf, e as ListCategoryRequest, M as MessageEnvelope, S as Status, j as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DrWLnqJ6.mjs';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {
@@ -9,9 +9,7 @@ interface ListCategoriesSignature {
9
9
  * @param - Options to use when listing categories.
10
10
  * @deprecated
11
11
  */
12
- (options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoryResponse, {
13
- [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;
14
- }[CategoryNonNullablePaths]>>;
12
+ (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;
15
13
  }
16
14
  declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
17
15
  interface CreateCategorySignature {
@@ -21,7 +19,7 @@ interface CreateCategorySignature {
21
19
  * @returns Created category.
22
20
  * @deprecated
23
21
  */
24
- (category: NonNullablePaths<Category, `name`>): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
22
+ (category: Category): Promise<Category>;
25
23
  }
26
24
  declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
27
25
  interface UpdateCategorySignature {
@@ -36,9 +34,7 @@ interface UpdateCategorySignature {
36
34
  * @param - Category ID.
37
35
  * @deprecated
38
36
  */
39
- (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<NonNullablePaths<UpdateCategoryResponse, {
40
- [P in CategoryNonNullablePaths]: `category.${P}`;
41
- }[CategoryNonNullablePaths]>>;
37
+ (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;
42
38
  }
43
39
  declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
44
40
  interface DeleteCategorySignature {
@@ -52,7 +48,7 @@ interface DeleteCategorySignature {
52
48
  * @param - ID of the category to delete.
53
49
  * @deprecated
54
50
  */
55
- (_id: string, options?: DeleteCategoryOptions): Promise<DeleteCategoryResponse>;
51
+ (_id: string, options?: DeleteCategoryOptions | undefined): Promise<DeleteCategoryResponse>;
56
52
  }
57
53
  declare const onCategoryNotification$1: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
58
54
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/bookings-v1-category-categories.public.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNonNullablePaths,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: NonNullablePaths<Category, `name`>): Promise<\n NonNullablePaths<Category, CategoryNonNullablePaths>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNonNullablePaths,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n EventWithLiterals,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n StatusWithLiterals,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n WebhookIdentityTypeWithLiterals,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\nexport type CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,S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S,yBAAyB;AAQ3B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","Status","Event","WebhookIdentityType","listCategories","createCategory","updateCategory","deleteCategory","renameKeysFromRESTResponseToSDKResponse","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
1
+ {"version":3,"sources":["../../src/bookings-v1-category-categories.public.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: Category): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions | undefined\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\ntype CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,uBAAqD;;;ACD9D,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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mB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,IAAI;AAAA,UACJ,gBAAgB;AAAA,QAClB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,SAAS;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD3gBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,YACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,aACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,aACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,YACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,UACCC,yCAAwC,KAAK;AACjD,EAAgC;;;AGnHhC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","Status","Event","WebhookIdentityType","listCategories","createCategory","updateCategory","deleteCategory","renameKeysFromRESTResponseToSDKResponse","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
@@ -1,4 +1,4 @@
1
- import { f as ListCategoryRequest$1, a as ListCategoryResponse$1, h as CreateCategoryRequest$1, i as CreateCategoryResponse$1, k as UpdateCategoryRequest$1, c as UpdateCategoryResponse$1, l as DeleteCategoryRequest$1, d as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DRMtv3I0.mjs';
1
+ import { e as ListCategoryRequest$1, a as ListCategoryResponse$1, g as CreateCategoryRequest$1, h as CreateCategoryResponse$1, j as UpdateCategoryRequest$1, b as UpdateCategoryResponse$1, k as DeleteCategoryRequest$1, c as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DrWLnqJ6.mjs';
2
2
 
3
3
  /** 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. */
4
4
  interface Category {
@@ -213,7 +213,6 @@ interface CategoryNotificationEnvelope {
213
213
  data: CategoryNotification;
214
214
  metadata: BaseEventMetadata;
215
215
  }
216
- type CategoryNonNullablePaths = `status`;
217
216
  interface ListCategoriesOptions {
218
217
  /**
219
218
  * IDs of the categories to retrieve.
@@ -254,4 +253,4 @@ interface DeleteCategoryOptions {
254
253
  deleteServices?: boolean | null;
255
254
  }
256
255
 
257
- export { type BatchCreateCategoryRequest as B, type CategoryNonNullablePaths as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type Category as b, type UpdateCategoryResponse as c, type DeleteCategoryResponse as d, type CategoryNotificationEnvelope as e, type ListCategoryRequest as f, type CategoryNotification as g, type CreateCategoryRequest as h, type CreateCategoryResponse as i, type BatchCreateCategoryResponse as j, type UpdateCategoryRequest as k, type DeleteCategoryRequest as l, type BatchDeleteCategoryRequest as m, type BatchDeleteCategoryResponse as n, type BatchUpdateCategoryRequest as o, type BatchUpdateCategoryResponse as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r };
256
+ export { type BatchCreateCategoryRequest as B, type Category as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type UpdateCategoryResponse as b, type DeleteCategoryResponse as c, type CategoryNotificationEnvelope as d, type ListCategoryRequest as e, type CategoryNotification as f, type CreateCategoryRequest as g, type CreateCategoryResponse as h, type BatchCreateCategoryResponse as i, type UpdateCategoryRequest as j, type DeleteCategoryRequest as k, type BatchDeleteCategoryRequest as l, type BatchDeleteCategoryResponse as m, type BatchUpdateCategoryRequest as n, type BatchUpdateCategoryResponse as o, type IdentificationDataIdOneOf as p, type BaseEventMetadata as q };
@@ -1,6 +1,6 @@
1
- import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { L as ListCategoriesOptions, a as ListCategoryResponse, C as CategoryNonNullablePaths, b as Category, U as UpdateCategory, c as UpdateCategoryResponse, D as DeleteCategoryOptions, d as DeleteCategoryResponse, e as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DYaMPvL0.js';
3
- export { r as BaseEventMetadata, B as BatchCreateCategoryRequest, j as BatchCreateCategoryResponse, m as BatchDeleteCategoryRequest, n as BatchDeleteCategoryResponse, o as BatchUpdateCategoryRequest, p as BatchUpdateCategoryResponse, g as CategoryNotification, h as CreateCategoryRequest, i as CreateCategoryResponse, l as DeleteCategoryRequest, E as Event, I as IdentificationData, q as IdentificationDataIdOneOf, f as ListCategoryRequest, M as MessageEnvelope, S as Status, k as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DYaMPvL0.js';
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { L as ListCategoriesOptions, a as ListCategoryResponse, C as Category, U as UpdateCategory, b as UpdateCategoryResponse, D as DeleteCategoryOptions, c as DeleteCategoryResponse, d as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DY7XN7m0.js';
3
+ export { q as BaseEventMetadata, B as BatchCreateCategoryRequest, i as BatchCreateCategoryResponse, l as BatchDeleteCategoryRequest, m as BatchDeleteCategoryResponse, n as BatchUpdateCategoryRequest, o as BatchUpdateCategoryResponse, f as CategoryNotification, g as CreateCategoryRequest, h as CreateCategoryResponse, k as DeleteCategoryRequest, E as Event, I as IdentificationData, p as IdentificationDataIdOneOf, e as ListCategoryRequest, M as MessageEnvelope, S as Status, j as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DY7XN7m0.js';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {
@@ -9,9 +9,7 @@ interface ListCategoriesSignature {
9
9
  * @param - Options to use when listing categories.
10
10
  * @deprecated
11
11
  */
12
- (options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoryResponse, {
13
- [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;
14
- }[CategoryNonNullablePaths]>>;
12
+ (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;
15
13
  }
16
14
  declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
17
15
  interface CreateCategorySignature {
@@ -21,7 +19,7 @@ interface CreateCategorySignature {
21
19
  * @returns Created category.
22
20
  * @deprecated
23
21
  */
24
- (category: NonNullablePaths<Category, `name`>): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
22
+ (category: Category): Promise<Category>;
25
23
  }
26
24
  declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
27
25
  interface UpdateCategorySignature {
@@ -36,9 +34,7 @@ interface UpdateCategorySignature {
36
34
  * @param - Category ID.
37
35
  * @deprecated
38
36
  */
39
- (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<NonNullablePaths<UpdateCategoryResponse, {
40
- [P in CategoryNonNullablePaths]: `category.${P}`;
41
- }[CategoryNonNullablePaths]>>;
37
+ (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;
42
38
  }
43
39
  declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
44
40
  interface DeleteCategorySignature {
@@ -52,7 +48,7 @@ interface DeleteCategorySignature {
52
48
  * @param - ID of the category to delete.
53
49
  * @deprecated
54
50
  */
55
- (_id: string, options?: DeleteCategoryOptions): Promise<DeleteCategoryResponse>;
51
+ (_id: string, options?: DeleteCategoryOptions | undefined): Promise<DeleteCategoryResponse>;
56
52
  }
57
53
  declare const onCategoryNotification$1: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
58
54
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.ts","../../../src/bookings-v1-category-categories.public.ts","../../../src/bookings-v1-category-categories.universal.ts","../../../src/bookings-v1-category-categories.http.ts","../../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNonNullablePaths,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: NonNullablePaths<Category, `name`>): Promise<\n NonNullablePaths<Category, CategoryNonNullablePaths>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNonNullablePaths,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n EventWithLiterals,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n StatusWithLiterals,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n WebhookIdentityTypeWithLiterals,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\nexport type CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAA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;AAmBO,IAAM,6BAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,cACC,wEAAwC,KAAK;AACjD,EAAgC;;;AGpIhC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAEhD,IAAMC,8BAET,mDAAkB,sBAA4B;","names":["createCategory","deleteCategory","listCategories","onCategoryNotification","updateCategory","import_rename_all_nested_keys","import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError","listCategories","createCategory","updateCategory","deleteCategory","import_rest_modules","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
1
+ {"version":3,"sources":["../../../index.ts","../../../src/bookings-v1-category-categories.public.ts","../../../src/bookings-v1-category-categories.universal.ts","../../../src/bookings-v1-category-categories.http.ts","../../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: Category): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions | undefined\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\ntype CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAA8D;;;ACD9D,6BAAoD;AACpD,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D,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAEhD,IAAMC,8BAET,mDAAkB,sBAA4B;","names":["createCategory","deleteCategory","listCategories","onCategoryNotification","updateCategory","import_rename_all_nested_keys","import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError","listCategories","createCategory","updateCategory","deleteCategory","import_rest_modules","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
@@ -1,4 +1,4 @@
1
- import { f as ListCategoryRequest$1, a as ListCategoryResponse$1, h as CreateCategoryRequest$1, i as CreateCategoryResponse$1, k as UpdateCategoryRequest$1, c as UpdateCategoryResponse$1, l as DeleteCategoryRequest$1, d as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DYaMPvL0.js';
1
+ import { e as ListCategoryRequest$1, a as ListCategoryResponse$1, g as CreateCategoryRequest$1, h as CreateCategoryResponse$1, j as UpdateCategoryRequest$1, b as UpdateCategoryResponse$1, k as DeleteCategoryRequest$1, c as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DY7XN7m0.js';
2
2
 
3
3
  /** 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. */
4
4
  interface Category {
@@ -213,7 +213,6 @@ interface CategoryNotificationEnvelope {
213
213
  data: CategoryNotification;
214
214
  metadata: BaseEventMetadata;
215
215
  }
216
- type CategoryNonNullablePaths = `status`;
217
216
  interface ListCategoriesOptions {
218
217
  /**
219
218
  * IDs of the categories to retrieve.
@@ -254,4 +253,4 @@ interface DeleteCategoryOptions {
254
253
  deleteServices?: boolean | null;
255
254
  }
256
255
 
257
- export { type BatchCreateCategoryRequest as B, type CategoryNonNullablePaths as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type Category as b, type UpdateCategoryResponse as c, type DeleteCategoryResponse as d, type CategoryNotificationEnvelope as e, type ListCategoryRequest as f, type CategoryNotification as g, type CreateCategoryRequest as h, type CreateCategoryResponse as i, type BatchCreateCategoryResponse as j, type UpdateCategoryRequest as k, type DeleteCategoryRequest as l, type BatchDeleteCategoryRequest as m, type BatchDeleteCategoryResponse as n, type BatchUpdateCategoryRequest as o, type BatchUpdateCategoryResponse as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r };
256
+ export { type BatchCreateCategoryRequest as B, type Category as C, type DeleteCategoryOptions as D, Event as E, type IdentificationData as I, type ListCategoriesOptions as L, type MessageEnvelope as M, Status as S, type UpdateCategory as U, WebhookIdentityType as W, type ListCategoryResponse as a, type UpdateCategoryResponse as b, type DeleteCategoryResponse as c, type CategoryNotificationEnvelope as d, type ListCategoryRequest as e, type CategoryNotification as f, type CreateCategoryRequest as g, type CreateCategoryResponse as h, type BatchCreateCategoryResponse as i, type UpdateCategoryRequest as j, type DeleteCategoryRequest as k, type BatchDeleteCategoryRequest as l, type BatchDeleteCategoryResponse as m, type BatchUpdateCategoryRequest as n, type BatchUpdateCategoryResponse as o, type IdentificationDataIdOneOf as p, type BaseEventMetadata as q };
@@ -1,6 +1,6 @@
1
- import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { L as ListCategoriesOptions, a as ListCategoryResponse, C as CategoryNonNullablePaths, b as Category, U as UpdateCategory, c as UpdateCategoryResponse, D as DeleteCategoryOptions, d as DeleteCategoryResponse, e as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DYaMPvL0.mjs';
3
- export { r as BaseEventMetadata, B as BatchCreateCategoryRequest, j as BatchCreateCategoryResponse, m as BatchDeleteCategoryRequest, n as BatchDeleteCategoryResponse, o as BatchUpdateCategoryRequest, p as BatchUpdateCategoryResponse, g as CategoryNotification, h as CreateCategoryRequest, i as CreateCategoryResponse, l as DeleteCategoryRequest, E as Event, I as IdentificationData, q as IdentificationDataIdOneOf, f as ListCategoryRequest, M as MessageEnvelope, S as Status, k as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DYaMPvL0.mjs';
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { L as ListCategoriesOptions, a as ListCategoryResponse, C as Category, U as UpdateCategory, b as UpdateCategoryResponse, D as DeleteCategoryOptions, c as DeleteCategoryResponse, d as CategoryNotificationEnvelope } from './bookings-v1-category-categories.universal-DY7XN7m0.mjs';
3
+ export { q as BaseEventMetadata, B as BatchCreateCategoryRequest, i as BatchCreateCategoryResponse, l as BatchDeleteCategoryRequest, m as BatchDeleteCategoryResponse, n as BatchUpdateCategoryRequest, o as BatchUpdateCategoryResponse, f as CategoryNotification, g as CreateCategoryRequest, h as CreateCategoryResponse, k as DeleteCategoryRequest, E as Event, I as IdentificationData, p as IdentificationDataIdOneOf, e as ListCategoryRequest, M as MessageEnvelope, S as Status, j as UpdateCategoryRequest, W as WebhookIdentityType } from './bookings-v1-category-categories.universal-DY7XN7m0.mjs';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {
@@ -9,9 +9,7 @@ interface ListCategoriesSignature {
9
9
  * @param - Options to use when listing categories.
10
10
  * @deprecated
11
11
  */
12
- (options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoryResponse, {
13
- [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;
14
- }[CategoryNonNullablePaths]>>;
12
+ (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;
15
13
  }
16
14
  declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
17
15
  interface CreateCategorySignature {
@@ -21,7 +19,7 @@ interface CreateCategorySignature {
21
19
  * @returns Created category.
22
20
  * @deprecated
23
21
  */
24
- (category: NonNullablePaths<Category, `name`>): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
22
+ (category: Category): Promise<Category>;
25
23
  }
26
24
  declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
27
25
  interface UpdateCategorySignature {
@@ -36,9 +34,7 @@ interface UpdateCategorySignature {
36
34
  * @param - Category ID.
37
35
  * @deprecated
38
36
  */
39
- (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<NonNullablePaths<UpdateCategoryResponse, {
40
- [P in CategoryNonNullablePaths]: `category.${P}`;
41
- }[CategoryNonNullablePaths]>>;
37
+ (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;
42
38
  }
43
39
  declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
44
40
  interface DeleteCategorySignature {
@@ -52,7 +48,7 @@ interface DeleteCategorySignature {
52
48
  * @param - ID of the category to delete.
53
49
  * @deprecated
54
50
  */
55
- (_id: string, options?: DeleteCategoryOptions): Promise<DeleteCategoryResponse>;
51
+ (_id: string, options?: DeleteCategoryOptions | undefined): Promise<DeleteCategoryResponse>;
56
52
  }
57
53
  declare const onCategoryNotification$1: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
58
54
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/bookings-v1-category-categories.public.ts","../../../src/bookings-v1-category-categories.universal.ts","../../../src/bookings-v1-category-categories.http.ts","../../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNonNullablePaths,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: NonNullablePaths<Category, `name`>): Promise<\n NonNullablePaths<Category, CategoryNonNullablePaths>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: NonNullablePaths<UpdateCategory, `name`>): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n >;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNonNullablePaths,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n EventWithLiterals,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n StatusWithLiterals,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n WebhookIdentityTypeWithLiterals,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\nexport type CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,uBAAqD;;;ACD9D,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,k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nB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAwBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,YACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,UACCC,yCAAwC,KAAK;AACjD,EAAgC;;;AGpIhC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","Status","Event","WebhookIdentityType","listCategories","createCategory","updateCategory","deleteCategory","renameKeysFromRESTResponseToSDKResponse","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
1
+ {"version":3,"sources":["../../../src/bookings-v1-category-categories.public.ts","../../../src/bookings-v1-category-categories.universal.ts","../../../src/bookings-v1-category-categories.http.ts","../../../src/bookings-v1-category-categories.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions | undefined): Promise<ListCategoryResponse>;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: Category): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions | undefined\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** 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. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\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 BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: 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 _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @webhook\n * @eventType com.wixpress.bookings.services.api.v1.CategoryNotification\n * @serviceIdentifier com.wixpress.bookings.services.api.v1.CategoriesService\n * @slug category_notification\n * @documentationMaturity preview\n * @deprecated\n */\nexport declare function onCategoryNotification(\n handler: (event: CategoryNotificationEnvelope) => void | Promise<void>\n): void;\n\ntype CategoryNonNullablePaths = `status`;\n\n/**\n * Retrieves all categories.\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when listing categories.\n * @permissionId BOOKINGS.CATEGORIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.List\n * @deprecated\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `categories.${number}.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryIds: options?.categoryIds,\n includeDeleted: options?.includeDeleted,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.list(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n categoryIds: '$[0].categoryIds',\n includeDeleted: '$[0].includeDeleted',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /** @internal */\n includeDeleted?: boolean | null;\n}\n\n/**\n * Creates a category.\n * @param category - Category to create.\n * @public\n * @documentationMaturity preview\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Create\n * @deprecated\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `name`>\n): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ category: category });\n\n const reqOpts = ambassadorWixBookingsV1Category.create(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.category!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { category: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param _id - Category ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField category\n * @requiredField category.name\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService.Update\n * @deprecated\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `name`>\n): Promise<\n NonNullablePaths<\n UpdateCategoryResponse,\n {\n [P in CategoryNonNullablePaths]: `category.${P}`;\n }[CategoryNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n category: { ...category, id: _id },\n });\n\n const reqOpts = ambassadorWixBookingsV1Category.update(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { category: '$[1]' },\n explicitPathsToArguments: { 'category.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'category']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCategory {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /** @internal */\n sortOrder?: number | null;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> = createEventModule(publicOnCategoryNotification);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,uBAAqD;;;ACD9D,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EAC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C,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","Status","Event","WebhookIdentityType","listCategories","createCategory","updateCategory","deleteCategory","renameKeysFromRESTResponseToSDKResponse","listCategories","createCategory","updateCategory","deleteCategory","onCategoryNotification"]}
@@ -1,4 +1,4 @@
1
- import { f as ListCategoryRequest$1, a as ListCategoryResponse$1, h as CreateCategoryRequest$1, i as CreateCategoryResponse$1, k as UpdateCategoryRequest$1, c as UpdateCategoryResponse$1, l as DeleteCategoryRequest$1, d as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DYaMPvL0.mjs';
1
+ import { e as ListCategoryRequest$1, a as ListCategoryResponse$1, g as CreateCategoryRequest$1, h as CreateCategoryResponse$1, j as UpdateCategoryRequest$1, b as UpdateCategoryResponse$1, k as DeleteCategoryRequest$1, c as DeleteCategoryResponse$1 } from './bookings-v1-category-categories.universal-DY7XN7m0.mjs';
2
2
 
3
3
  /** 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. */
4
4
  interface Category {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_bookings_categories",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -28,7 +28,7 @@
28
28
  "service-plugins"
29
29
  ],
30
30
  "dependencies": {
31
- "@wix/sdk-runtime": "^0.3.49",
31
+ "@wix/sdk-runtime": "^0.3.55",
32
32
  "@wix/sdk-types": "^1.13.28"
33
33
  },
34
34
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "fqdn": "wix.bookings.v1.category"
50
50
  }
51
51
  },
52
- "falconPackageHash": "fc1450c06f70397ea2dd282c93965277cb1c3dd358c493dfced40e77"
52
+ "falconPackageHash": "a289ee0339c6588cb9f83d4dd5e2ee6d67b44038eaa6822040bcfe30"
53
53
  }