@wix/auto_sdk_bookings_categories 1.0.46 → 1.0.48

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { ListCategoriesOptions, ListCategoryResponse, Category, UpdateCategory, UpdateCategoryResponse, UpdateCategoryApplicationErrors, DeleteCategoryOptions, DeleteCategoryResponse, CategoryNotificationEnvelope } from './index.typings.js';
3
- export { BaseEventMetadata, BatchCreateCategoryRequest, BatchCreateCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, DeleteCategoryRequest, Event, EventWithLiterals, IdentificationData, IdentificationDataIdOneOf, ListCategoryRequest, MessageEnvelope, Status, StatusWithLiterals, UpdateCategoryRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
3
+ export { AccountDetails, BaseEventMetadata, BatchCreateCategoryRequest, BatchCreateCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, DeleteCategoryRequest, Event, EventWithLiterals, IdentificationData, IdentificationDataIdOneOf, ListCategoryRequest, MessageEnvelope, Status, StatusWithLiterals, UpdateCategoryRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {
@@ -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 CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryApplicationErrors,\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 `categories` | `categories.${number}.status`,\n 4\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`, 2>) =>\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`, 2>): Promise<\n NonNullablePaths<Category, `status`, 2>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`, 2>) =>\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`, 2>): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 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/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\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 Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\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\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 * @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 `categories` | `categories.${number}.status`,\n 4\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`, 2>\n): Promise<NonNullablePaths<Category, `status`, 2>> {\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`, 2>\n): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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> &\n typeof publicOnCategoryNotification = createEventModule(\n publicOnCategoryNotification\n);\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';\nexport {\n StatusWithLiterals,\n EventWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateCategoryApplicationErrors,\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,QAC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eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAEhD,IAAMC,8BAG2B;AAAA,EACtC;AACF;","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 UpdateCategoryApplicationErrors,\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 `categories` | `categories.${number}.status`,\n 4\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`, 2>) =>\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`, 2>): Promise<\n NonNullablePaths<Category, `status`, 2>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`, 2>) =>\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`, 2>): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 AccountDetails,\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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\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 Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\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\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 * @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 `categories` | `categories.${number}.status`,\n 4\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`, 2>\n): Promise<NonNullablePaths<Category, `status`, 2>> {\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`, 2>\n): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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> &\n typeof publicOnCategoryNotification = createEventModule(\n publicOnCategoryNotification\n);\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 AccountDetails,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n StatusWithLiterals,\n EventWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateCategoryApplicationErrors,\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;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,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAA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BO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,aACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,aACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,KAAa,YACnB;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,IAAM,6BAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,cACC,wEAAwC,KAAK;AACjD,EAAgC;;;AG/HhC,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,8BAG2B;AAAA,EACtC;AACF;","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"]}
@@ -183,6 +183,23 @@ declare enum WebhookIdentityType {
183
183
  }
184
184
  /** @enumType */
185
185
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
186
+ interface AccountDetails {
187
+ /**
188
+ * ID of the account.
189
+ * @format GUID
190
+ */
191
+ accountId?: string | null;
192
+ /**
193
+ * ID of the parent account.
194
+ * @format GUID
195
+ */
196
+ parentAccountId?: string | null;
197
+ /**
198
+ * ID of the site, if applicable.
199
+ * @format GUID
200
+ */
201
+ siteId?: string | null;
202
+ }
186
203
  /** @docsIgnore */
187
204
  type UpdateCategoryApplicationErrors = {
188
205
  code?: 'NOT_FOUND';
@@ -326,4 +343,4 @@ interface DeleteCategoryOptions {
326
343
  deleteServices?: boolean | null;
327
344
  }
328
345
 
329
- export { type BaseEventMetadata, type BatchCreateCategoryRequest, type BatchCreateCategoryResponse, type BatchDeleteCategoryRequest, type BatchDeleteCategoryResponse, type BatchUpdateCategoryRequest, type BatchUpdateCategoryResponse, type Category, type CategoryNotification, type CategoryNotificationEnvelope, type CreateCategoryRequest, type CreateCategoryResponse, type DeleteCategoryOptions, type DeleteCategoryRequest, type DeleteCategoryResponse, Event, type EventWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, type ListCategoriesOptions, type ListCategoryRequest, type ListCategoryResponse, type MessageEnvelope, Status, type StatusWithLiterals, type UpdateCategory, type UpdateCategoryApplicationErrors, type UpdateCategoryRequest, type UpdateCategoryResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCategory, deleteCategory, listCategories, onCategoryNotification, updateCategory };
346
+ export { type AccountDetails, type BaseEventMetadata, type BatchCreateCategoryRequest, type BatchCreateCategoryResponse, type BatchDeleteCategoryRequest, type BatchDeleteCategoryResponse, type BatchUpdateCategoryRequest, type BatchUpdateCategoryResponse, type Category, type CategoryNotification, type CategoryNotificationEnvelope, type CreateCategoryRequest, type CreateCategoryResponse, type DeleteCategoryOptions, type DeleteCategoryRequest, type DeleteCategoryResponse, Event, type EventWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, type ListCategoriesOptions, type ListCategoryRequest, type ListCategoryResponse, type MessageEnvelope, Status, type StatusWithLiterals, type UpdateCategory, type UpdateCategoryApplicationErrors, type UpdateCategoryRequest, type UpdateCategoryResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCategory, deleteCategory, listCategories, onCategoryNotification, updateCategory };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts"],"sourcesContent":["export * from './src/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/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\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 Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\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\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 * @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 `categories` | `categories.${number}.status`,\n 4\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`, 2>\n): Promise<NonNullablePaths<Category, `status`, 2>> {\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`, 2>\n): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAA,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;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA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AQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,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;","names":["import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts"],"sourcesContent":["export * from './src/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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\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 Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\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\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 * @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 `categories` | `categories.${number}.status`,\n 4\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`, 2>\n): Promise<NonNullablePaths<Category, `status`, 2>> {\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`, 2>\n): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAA,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;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,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA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;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAA;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,EAAE,UAAU,OAAO;AAAA,QAC3C,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,UAAU;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAsCA,eAAsB,eACpB,KACA,SACiC;AAEjC,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,IAAI;AAAA,IACJ,gBAAgB,SAAS;AAAA,EAC3B,CAAC;AAED,QAAM,UAA0C,QAAQ,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,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;","names":["import_rest_modules","Status","Event","WebhookIdentityType","sdkTransformError"]}
@@ -199,6 +199,23 @@ declare enum WebhookIdentityType {
199
199
  }
200
200
  /** @enumType */
201
201
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
202
+ interface AccountDetails {
203
+ /**
204
+ * ID of the account.
205
+ * @format GUID
206
+ */
207
+ accountId?: string | null;
208
+ /**
209
+ * ID of the parent account.
210
+ * @format GUID
211
+ */
212
+ parentAccountId?: string | null;
213
+ /**
214
+ * ID of the site, if applicable.
215
+ * @format GUID
216
+ */
217
+ siteId?: string | null;
218
+ }
202
219
  /** @docsIgnore */
203
220
  type UpdateApplicationErrors = {
204
221
  code?: 'NOT_FOUND';
@@ -225,4 +242,4 @@ declare function deleteCategory(): __PublicMethodMetaInfo<'DELETE', {
225
242
  id: string;
226
243
  }, DeleteCategoryRequest$1, DeleteCategoryRequest, DeleteCategoryResponse$1, DeleteCategoryResponse>;
227
244
 
228
- export { type BatchCreateCategoryRequest as BatchCreateCategoryRequestOriginal, type BatchCreateCategoryResponse as BatchCreateCategoryResponseOriginal, type BatchDeleteCategoryRequest as BatchDeleteCategoryRequestOriginal, type BatchDeleteCategoryResponse as BatchDeleteCategoryResponseOriginal, type BatchUpdateCategoryRequest as BatchUpdateCategoryRequestOriginal, type BatchUpdateCategoryResponse as BatchUpdateCategoryResponseOriginal, type CategoryNotification as CategoryNotificationOriginal, type Category as CategoryOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, Event as EventOriginal, type EventWithLiterals as EventWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListCategoryRequest as ListCategoryRequestOriginal, type ListCategoryResponse as ListCategoryResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type UpdateApplicationErrors as UpdateApplicationErrorsOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createCategory, deleteCategory, listCategories, updateCategory };
245
+ export { type AccountDetails as AccountDetailsOriginal, type BatchCreateCategoryRequest as BatchCreateCategoryRequestOriginal, type BatchCreateCategoryResponse as BatchCreateCategoryResponseOriginal, type BatchDeleteCategoryRequest as BatchDeleteCategoryRequestOriginal, type BatchDeleteCategoryResponse as BatchDeleteCategoryResponseOriginal, type BatchUpdateCategoryRequest as BatchUpdateCategoryRequestOriginal, type BatchUpdateCategoryResponse as BatchUpdateCategoryResponseOriginal, type CategoryNotification as CategoryNotificationOriginal, type Category as CategoryOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, Event as EventOriginal, type EventWithLiterals as EventWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListCategoryRequest as ListCategoryRequestOriginal, type ListCategoryResponse as ListCategoryResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type UpdateApplicationErrors as UpdateApplicationErrorsOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createCategory, deleteCategory, listCategories, updateCategory };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.types.ts","../../src/bookings-v1-category-categories.meta.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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","/** 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 * Category status.\n *\n * Default: `CREATED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /** Sort order of the category in the live site and dashboard. */\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 * Whether to include deleted categories in the response.\n *\n * Default: `false`\n */\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/** @docsIgnore */\nexport type UpdateApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\nimport * as ambassadorWixBookingsV1CategoryTypes from './bookings-v1-category-categories.types.js';\nimport * as ambassadorWixBookingsV1CategoryUniversalTypes from './bookings-v1-category-categories.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listCategories(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsV1CategoryUniversalTypes.ListCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.ListCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.ListCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.ListCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.list(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCategory(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsV1CategoryUniversalTypes.CreateCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.CreateCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.CreateCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.CreateCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.create(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateCategory(): __PublicMethodMetaInfo<\n 'PUT',\n { categoryId: string },\n ambassadorWixBookingsV1CategoryUniversalTypes.UpdateCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.UpdateCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.UpdateCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.UpdateCategoryResponse\n> {\n const payload = { category: { id: ':categoryId' } } as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.update(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v1/categories/{category.id}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteCategory(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixBookingsV1CategoryUniversalTypes.DeleteCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.DeleteCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.DeleteCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.DeleteCategoryResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category._delete(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/categories/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Category as CategoryOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n ListCategoryRequest as ListCategoryRequestOriginal,\n ListCategoryResponse as ListCategoryResponseOriginal,\n CategoryNotification as CategoryNotificationOriginal,\n Event as EventOriginal,\n EventWithLiterals as EventWithLiteralsOriginal,\n CreateCategoryRequest as CreateCategoryRequestOriginal,\n CreateCategoryResponse as CreateCategoryResponseOriginal,\n BatchCreateCategoryRequest as BatchCreateCategoryRequestOriginal,\n BatchCreateCategoryResponse as BatchCreateCategoryResponseOriginal,\n UpdateCategoryRequest as UpdateCategoryRequestOriginal,\n UpdateCategoryResponse as UpdateCategoryResponseOriginal,\n DeleteCategoryRequest as DeleteCategoryRequestOriginal,\n DeleteCategoryResponse as DeleteCategoryResponseOriginal,\n BatchDeleteCategoryRequest as BatchDeleteCategoryRequestOriginal,\n BatchDeleteCategoryResponse as BatchDeleteCategoryResponseOriginal,\n BatchUpdateCategoryRequest as BatchUpdateCategoryRequestOriginal,\n BatchUpdateCategoryResponse as BatchUpdateCategoryResponseOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n UpdateApplicationErrors as UpdateApplicationErrorsOriginal,\n} from './bookings-v1-category-categories.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAA,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;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,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;A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AA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["import_rest_modules","Status","Event","WebhookIdentityType"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/bookings-v1-category-categories.http.ts","../../src/bookings-v1-category-categories.types.ts","../../src/bookings-v1-category-categories.meta.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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](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 migrationOptions: {\n optInTransformResponse: true,\n },\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","/** 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 * Category status.\n *\n * Default: `CREATED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /** Sort order of the category in the live site and dashboard. */\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 * Whether to include deleted categories in the response.\n *\n * Default: `false`\n */\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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpdateApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\nimport * as ambassadorWixBookingsV1CategoryTypes from './bookings-v1-category-categories.types.js';\nimport * as ambassadorWixBookingsV1CategoryUniversalTypes from './bookings-v1-category-categories.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listCategories(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsV1CategoryUniversalTypes.ListCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.ListCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.ListCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.ListCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.list(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCategory(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsV1CategoryUniversalTypes.CreateCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.CreateCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.CreateCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.CreateCategoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.create(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/categories',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateCategory(): __PublicMethodMetaInfo<\n 'PUT',\n { categoryId: string },\n ambassadorWixBookingsV1CategoryUniversalTypes.UpdateCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.UpdateCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.UpdateCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.UpdateCategoryResponse\n> {\n const payload = { category: { id: ':categoryId' } } as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category.update(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v1/categories/{category.id}',\n pathParams: { categoryId: 'categoryId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteCategory(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixBookingsV1CategoryUniversalTypes.DeleteCategoryRequest,\n ambassadorWixBookingsV1CategoryTypes.DeleteCategoryRequest,\n ambassadorWixBookingsV1CategoryUniversalTypes.DeleteCategoryResponse,\n ambassadorWixBookingsV1CategoryTypes.DeleteCategoryResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions = ambassadorWixBookingsV1Category._delete(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/categories/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Category as CategoryOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n ListCategoryRequest as ListCategoryRequestOriginal,\n ListCategoryResponse as ListCategoryResponseOriginal,\n CategoryNotification as CategoryNotificationOriginal,\n Event as EventOriginal,\n EventWithLiterals as EventWithLiteralsOriginal,\n CreateCategoryRequest as CreateCategoryRequestOriginal,\n CreateCategoryResponse as CreateCategoryResponseOriginal,\n BatchCreateCategoryRequest as BatchCreateCategoryRequestOriginal,\n BatchCreateCategoryResponse as BatchCreateCategoryResponseOriginal,\n UpdateCategoryRequest as UpdateCategoryRequestOriginal,\n UpdateCategoryResponse as UpdateCategoryResponseOriginal,\n DeleteCategoryRequest as DeleteCategoryRequestOriginal,\n DeleteCategoryResponse as DeleteCategoryResponseOriginal,\n BatchDeleteCategoryRequest as BatchDeleteCategoryRequestOriginal,\n BatchDeleteCategoryResponse as BatchDeleteCategoryResponseOriginal,\n BatchUpdateCategoryRequest as BatchUpdateCategoryRequestOriginal,\n BatchUpdateCategoryResponse as BatchUpdateCategoryResponseOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountDetails as AccountDetailsOriginal,\n UpdateApplicationErrors as UpdateApplicationErrorsOriginal,\n} from './bookings-v1-category-categories.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAA,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;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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AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAAS,iBAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBAAoD,QAAQ,OAAO;AAEzE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["import_rest_modules","Status","Event","WebhookIdentityType"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { ListCategoriesOptions, ListCategoryResponse, Category, UpdateCategory, UpdateCategoryResponse, UpdateCategoryApplicationErrors, DeleteCategoryOptions, DeleteCategoryResponse, CategoryNotificationEnvelope } from './index.typings.mjs';
3
- export { BaseEventMetadata, BatchCreateCategoryRequest, BatchCreateCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, DeleteCategoryRequest, Event, EventWithLiterals, IdentificationData, IdentificationDataIdOneOf, ListCategoryRequest, MessageEnvelope, Status, StatusWithLiterals, UpdateCategoryRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
3
+ export { AccountDetails, BaseEventMetadata, BatchCreateCategoryRequest, BatchCreateCategoryResponse, BatchDeleteCategoryRequest, BatchDeleteCategoryResponse, BatchUpdateCategoryRequest, BatchUpdateCategoryResponse, CategoryNotification, CreateCategoryRequest, CreateCategoryResponse, DeleteCategoryRequest, Event, EventWithLiterals, IdentificationData, IdentificationDataIdOneOf, ListCategoryRequest, MessageEnvelope, Status, StatusWithLiterals, UpdateCategoryRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function listCategories$1(httpClient: HttpClient): ListCategoriesSignature;
6
6
  interface ListCategoriesSignature {