@wix/auto_sdk_bookings_categories 1.0.35 → 1.0.37
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 +12 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +0 -2
- package/build/cjs/index.typings.js +12 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +12 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +12 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +0 -2
- package/build/es/index.typings.mjs +12 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +12 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +12 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +0 -2
- package/build/internal/cjs/index.typings.js +12 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +12 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +12 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +0 -2
- package/build/internal/es/index.typings.mjs +12 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +12 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -137,6 +137,9 @@ function list(payload) {
|
|
|
137
137
|
method: "GET",
|
|
138
138
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.List",
|
|
139
139
|
packageName: PACKAGE_NAME,
|
|
140
|
+
migrationOptions: {
|
|
141
|
+
optInTransformResponse: true
|
|
142
|
+
},
|
|
140
143
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
141
144
|
protoPath: "/v1/categories",
|
|
142
145
|
data: payload,
|
|
@@ -155,6 +158,9 @@ function create(payload) {
|
|
|
155
158
|
method: "POST",
|
|
156
159
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Create",
|
|
157
160
|
packageName: PACKAGE_NAME,
|
|
161
|
+
migrationOptions: {
|
|
162
|
+
optInTransformResponse: true
|
|
163
|
+
},
|
|
158
164
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
159
165
|
protoPath: "/v1/categories",
|
|
160
166
|
data: payload,
|
|
@@ -173,6 +179,9 @@ function update(payload) {
|
|
|
173
179
|
method: "PUT",
|
|
174
180
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Update",
|
|
175
181
|
packageName: PACKAGE_NAME,
|
|
182
|
+
migrationOptions: {
|
|
183
|
+
optInTransformResponse: true
|
|
184
|
+
},
|
|
176
185
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
177
186
|
protoPath: "/v1/categories/{category.id}",
|
|
178
187
|
data: payload,
|
|
@@ -191,6 +200,9 @@ function _delete(payload) {
|
|
|
191
200
|
method: "DELETE",
|
|
192
201
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService._delete",
|
|
193
202
|
packageName: PACKAGE_NAME,
|
|
203
|
+
migrationOptions: {
|
|
204
|
+
optInTransformResponse: true
|
|
205
|
+
},
|
|
194
206
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
195
207
|
protoPath: "/v1/categories/{id}",
|
|
196
208
|
data: payload,
|
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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: Category[];\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope 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 * @permissionScope Picasso private app mega scope (site)\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> &\n typeof publicOnCategoryNotification = createEventModule(\n publicOnCategoryNotification\n);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n StatusWithLiterals,\n EventWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateCategoryApplicationErrors,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAA8D;;;ACD9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;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AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,IAAI;AAAA,UACJ,gBAAgB;AAAA,QAClB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,SAAS;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD3gBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,YACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;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;AAmBO,IAAM,6BAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,cACC,wEAAwC,KAAK;AACjD,EAAgC;;;AGhIhC,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"]}
|
|
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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: Category[];\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope 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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n 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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> &\n typeof publicOnCategoryNotification = createEventModule(\n publicOnCategoryNotification\n);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n StatusWithLiterals,\n EventWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateCategoryApplicationErrors,\n} from './bookings-v1-category-categories.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAA8D;;;ACD9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAA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,cACC,wEAAwC,KAAK;AACjD,EAAgC;;;AGhIhC,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"]}
|
|
@@ -221,8 +221,6 @@ interface CategoryNotificationEnvelope {
|
|
|
221
221
|
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
222
222
|
* @permissionScope Manage Bookings - all permissions
|
|
223
223
|
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
224
|
-
* @permissionScope Picasso private app mega scope (site)
|
|
225
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
226
224
|
* @permissionId BOOKINGS.CATEGORIES_READ
|
|
227
225
|
* @webhook
|
|
228
226
|
* @eventType com.wixpress.bookings.services.api.v1.CategoryNotification
|
|
@@ -132,6 +132,9 @@ function list(payload) {
|
|
|
132
132
|
method: "GET",
|
|
133
133
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.List",
|
|
134
134
|
packageName: PACKAGE_NAME,
|
|
135
|
+
migrationOptions: {
|
|
136
|
+
optInTransformResponse: true
|
|
137
|
+
},
|
|
135
138
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
136
139
|
protoPath: "/v1/categories",
|
|
137
140
|
data: payload,
|
|
@@ -150,6 +153,9 @@ function create(payload) {
|
|
|
150
153
|
method: "POST",
|
|
151
154
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Create",
|
|
152
155
|
packageName: PACKAGE_NAME,
|
|
156
|
+
migrationOptions: {
|
|
157
|
+
optInTransformResponse: true
|
|
158
|
+
},
|
|
153
159
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
154
160
|
protoPath: "/v1/categories",
|
|
155
161
|
data: payload,
|
|
@@ -168,6 +174,9 @@ function update(payload) {
|
|
|
168
174
|
method: "PUT",
|
|
169
175
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Update",
|
|
170
176
|
packageName: PACKAGE_NAME,
|
|
177
|
+
migrationOptions: {
|
|
178
|
+
optInTransformResponse: true
|
|
179
|
+
},
|
|
171
180
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
172
181
|
protoPath: "/v1/categories/{category.id}",
|
|
173
182
|
data: payload,
|
|
@@ -186,6 +195,9 @@ function _delete(payload) {
|
|
|
186
195
|
method: "DELETE",
|
|
187
196
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService._delete",
|
|
188
197
|
packageName: PACKAGE_NAME,
|
|
198
|
+
migrationOptions: {
|
|
199
|
+
optInTransformResponse: true
|
|
200
|
+
},
|
|
189
201
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
190
202
|
protoPath: "/v1/categories/{id}",
|
|
191
203
|
data: payload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/bookings-v1-category-categories.universal.ts","../../src/bookings-v1-category-categories.http.ts"],"sourcesContent":["export * from './src/bookings-v1-category-categories.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsV1Category from './bookings-v1-category-categories.http.js';\n\n/** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * @internal\n * @internal\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * @internal\n * @internal */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport interface ListCategoryRequest {\n /**\n * IDs of the categories to retrieve.\n *\n * Default: All categories are retrieved.\n * @format GUID\n */\n categoryIds?: string[];\n /**\n * @internal\n * @internal */\n includeDeleted?: boolean | null;\n}\n\nexport interface ListCategoryResponse {\n /** Retrieved categories. */\n categories?: Category[];\n}\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: EventWithLiterals;\n}\n\nexport enum Event {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface BatchCreateCategoryRequest {\n /** Categories to create. */\n categories?: Category[];\n}\n\nexport interface BatchCreateCategoryResponse {\n /** Created categories. */\n categories?: Category[];\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n _id: string | null;\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n\nexport interface DeleteCategoryResponse {\n /**\n * ID of the deleted category.\n * @format GUID\n */\n _id?: string | null;\n}\n\nexport interface BatchDeleteCategoryRequest {\n /**\n * IDs of the categories to delete.\n * @format GUID\n */\n ids?: string[] | null;\n}\n\nexport interface BatchDeleteCategoryResponse {}\n\nexport interface BatchUpdateCategoryRequest {\n /** List of categories to be updated. */\n categories?: Category[];\n /** Field mask of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BatchUpdateCategoryResponse {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope 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 * @permissionScope Picasso private app mega scope (site)\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAA,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF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AA,EACnC,CAAC;AAED,QAAM,UAA0C,OAAO,OAAO;AAE9D,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,EAAE,UAAU,OAAO;AAAA,QAC3C,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,UAAU;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAuCA,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}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateCategoryApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface CategoryNotificationEnvelope {\n data: CategoryNotification;\n metadata: BaseEventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\n * @permissionScope 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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param _id - ID of the category to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId BOOKINGS.MANAGE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wixpress.bookings.services.api.v1.CategoriesService._delete\n * @deprecated\n */\nexport async function deleteCategory(\n _id: string,\n options?: DeleteCategoryOptions\n): Promise<DeleteCategoryResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n deleteServices: options?.deleteServices,\n });\n\n const reqOpts = ambassadorWixBookingsV1Category._delete(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n deleteServices: '$[1].deleteServices',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteCategoryOptions {\n /**\n * Whether to delete all the services associated with the category.\n *\n * Default: `false`\n */\n deleteServices?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/bookings/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v1/categories',\n destPath: '/v1/categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/categories-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n 'bookings._base_domain_': [\n {\n srcPath: '/_api/services-server/v1/categories',\n destPath: '/v1/categories',\n },\n {\n srcPath: '/_api/services-server/v1/batch/categories',\n destPath: '/v1/batch/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_categories';\n\n/**\n * Retrieves all categories.\n * @deprecated\n */\nexport function list(payload: object): RequestOptionsFactory<any> {\n function __list({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.bookings.services.api.v1.CategoriesService.List',\n packageName: PACKAGE_NAME,\n 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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n 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,SA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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"]}
|
package/build/cjs/meta.js
CHANGED
|
@@ -125,6 +125,9 @@ function list(payload) {
|
|
|
125
125
|
method: "GET",
|
|
126
126
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.List",
|
|
127
127
|
packageName: PACKAGE_NAME,
|
|
128
|
+
migrationOptions: {
|
|
129
|
+
optInTransformResponse: true
|
|
130
|
+
},
|
|
128
131
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
129
132
|
protoPath: "/v1/categories",
|
|
130
133
|
data: payload,
|
|
@@ -143,6 +146,9 @@ function create(payload) {
|
|
|
143
146
|
method: "POST",
|
|
144
147
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Create",
|
|
145
148
|
packageName: PACKAGE_NAME,
|
|
149
|
+
migrationOptions: {
|
|
150
|
+
optInTransformResponse: true
|
|
151
|
+
},
|
|
146
152
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
147
153
|
protoPath: "/v1/categories",
|
|
148
154
|
data: payload,
|
|
@@ -161,6 +167,9 @@ function update(payload) {
|
|
|
161
167
|
method: "PUT",
|
|
162
168
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Update",
|
|
163
169
|
packageName: PACKAGE_NAME,
|
|
170
|
+
migrationOptions: {
|
|
171
|
+
optInTransformResponse: true
|
|
172
|
+
},
|
|
164
173
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
165
174
|
protoPath: "/v1/categories/{category.id}",
|
|
166
175
|
data: payload,
|
|
@@ -179,6 +188,9 @@ function _delete(payload) {
|
|
|
179
188
|
method: "DELETE",
|
|
180
189
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService._delete",
|
|
181
190
|
packageName: PACKAGE_NAME,
|
|
191
|
+
migrationOptions: {
|
|
192
|
+
optInTransformResponse: true
|
|
193
|
+
},
|
|
182
194
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
183
195
|
protoPath: "/v1/categories/{id}",
|
|
184
196
|
data: payload,
|
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.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 url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __list;\n}\n\n/**\n * Creates a category.\n * @deprecated\n */\nexport function create(payload: object): RequestOptionsFactory<any> {\n function __create({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Create',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __create;\n}\n\n/**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @deprecated\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n function __update({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService.Update',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{category.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __update;\n}\n\n/**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({\n protoPath: '/v1/categories/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return ___delete;\n}\n","import * 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"],"mappings":";;;;;;;;;;;;;;;;;;;;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;A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;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["import_rest_modules"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/bookings-v1-category-categories.http.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*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @deprecated\n */\nexport function _delete(payload: object): RequestOptionsFactory<any> {\n function ___delete({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.v1.category',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.bookings.services.api.v1.CategoriesService._delete',\n packageName: PACKAGE_NAME,\n 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 * 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"],"mappings":";;;;;;;;;;;;;;;;;;;;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,SAA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AAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["import_rest_modules"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -107,6 +107,9 @@ function list(payload) {
|
|
|
107
107
|
method: "GET",
|
|
108
108
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.List",
|
|
109
109
|
packageName: PACKAGE_NAME,
|
|
110
|
+
migrationOptions: {
|
|
111
|
+
optInTransformResponse: true
|
|
112
|
+
},
|
|
110
113
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
111
114
|
protoPath: "/v1/categories",
|
|
112
115
|
data: payload,
|
|
@@ -125,6 +128,9 @@ function create(payload) {
|
|
|
125
128
|
method: "POST",
|
|
126
129
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Create",
|
|
127
130
|
packageName: PACKAGE_NAME,
|
|
131
|
+
migrationOptions: {
|
|
132
|
+
optInTransformResponse: true
|
|
133
|
+
},
|
|
128
134
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
129
135
|
protoPath: "/v1/categories",
|
|
130
136
|
data: payload,
|
|
@@ -143,6 +149,9 @@ function update(payload) {
|
|
|
143
149
|
method: "PUT",
|
|
144
150
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService.Update",
|
|
145
151
|
packageName: PACKAGE_NAME,
|
|
152
|
+
migrationOptions: {
|
|
153
|
+
optInTransformResponse: true
|
|
154
|
+
},
|
|
146
155
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
147
156
|
protoPath: "/v1/categories/{category.id}",
|
|
148
157
|
data: payload,
|
|
@@ -161,6 +170,9 @@ function _delete(payload) {
|
|
|
161
170
|
method: "DELETE",
|
|
162
171
|
methodFqn: "com.wixpress.bookings.services.api.v1.CategoriesService._delete",
|
|
163
172
|
packageName: PACKAGE_NAME,
|
|
173
|
+
migrationOptions: {
|
|
174
|
+
optInTransformResponse: true
|
|
175
|
+
},
|
|
164
176
|
url: resolveComWixpressBookingsServicesApiV1CategoriesServiceUrl({
|
|
165
177
|
protoPath: "/v1/categories/{id}",
|
|
166
178
|
data: payload,
|