@wix/auto_sdk_bookings_categories 1.0.49 → 1.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +4 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -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 AccountInfo,\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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 AccountInfo,\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;AA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ories","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 AccountInfo,\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo,\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,IAC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AA,EACf;AACJ;AAiBO,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"]}
|
|
@@ -126,6 +126,8 @@ interface MessageEnvelope {
|
|
|
126
126
|
identity?: IdentificationData;
|
|
127
127
|
/** Stringify payload. */
|
|
128
128
|
data?: string;
|
|
129
|
+
/** Details related to the account */
|
|
130
|
+
accountInfo?: AccountInfo;
|
|
129
131
|
}
|
|
130
132
|
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
131
133
|
/**
|
|
@@ -219,6 +221,8 @@ interface BaseEventMetadata {
|
|
|
219
221
|
eventType?: string;
|
|
220
222
|
/** The identification type and identity data. */
|
|
221
223
|
identity?: IdentificationData;
|
|
224
|
+
/** Details related to the account */
|
|
225
|
+
accountInfo?: AccountInfo;
|
|
222
226
|
}
|
|
223
227
|
interface CategoryNotificationEnvelope {
|
|
224
228
|
data: CategoryNotification;
|
|
@@ -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\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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;A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O;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"]}
|
|
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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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,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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"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -142,6 +142,8 @@ interface MessageEnvelope {
|
|
|
142
142
|
identity?: IdentificationData;
|
|
143
143
|
/** Stringify payload. */
|
|
144
144
|
data?: string;
|
|
145
|
+
/** Details related to the account */
|
|
146
|
+
accountInfo?: AccountInfo;
|
|
145
147
|
}
|
|
146
148
|
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
147
149
|
/**
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -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\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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 AccountInfo as AccountInfoOriginal,\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;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE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","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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\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 AccountInfo as AccountInfoOriginal,\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;AA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