@wix/auto_sdk_faq_category 1.0.15 → 1.0.17
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.d.ts +15 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +14 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +15 -9
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +14 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +14 -11
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -9
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +14 -11
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { Category, UpdateCategory, ListCategoriesOptions, ListCategoriesResponse, CategoriesQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, CategoryCreatedEnvelope, CategoryDeletedEnvelope, CategoryUpdatedEnvelope } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, BaseEventMetadata, CategoriesQueryResult, CreateCategoryRequest, CreateCategoryResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCategoryRequest, DeleteCategoryResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetCategoryRequest, GetCategoryResponse, IdentificationData, IdentificationDataIdOneOf, ListCategoriesRequest, MessageEnvelope, PagingMetadataV2, QueryCategoriesRequest, QueryCategoriesResponse, RestoreInfo, SortOrder, Sorting, UpdateCategoryRequest, UpdateCategoryResponse, UpdateExtendedFieldsRequest, WebhookIdentityType } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, BaseEventMetadata, CategoriesQueryResult, CreateCategoryRequest, CreateCategoryResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCategoryRequest, DeleteCategoryResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetCategoryRequest, GetCategoryResponse, IdentificationData, IdentificationDataIdOneOf, ListCategoriesRequest, MessageEnvelope, PagingMetadataV2, QueryCategoriesRequest, QueryCategoriesResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UpdateCategoryRequest, UpdateCategoryResponse, UpdateExtendedFieldsRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
|
|
6
6
|
interface CreateCategorySignature {
|
|
@@ -9,7 +9,7 @@ interface CreateCategorySignature {
|
|
|
9
9
|
* @param - Category to create.
|
|
10
10
|
* @returns Created category.
|
|
11
11
|
*/
|
|
12
|
-
(category: NonNullablePaths<Category, `title
|
|
12
|
+
(category: NonNullablePaths<Category, `title`, 2>): Promise<Category>;
|
|
13
13
|
}
|
|
14
14
|
declare function getCategory$1(httpClient: HttpClient): GetCategorySignature;
|
|
15
15
|
interface GetCategorySignature {
|
|
@@ -32,7 +32,7 @@ interface UpdateCategorySignature {
|
|
|
32
32
|
* @param - Category ID.
|
|
33
33
|
* @returns Updated category.
|
|
34
34
|
*/
|
|
35
|
-
(_id: string, category: NonNullablePaths<UpdateCategory, `revision
|
|
35
|
+
(_id: string, category: NonNullablePaths<UpdateCategory, `revision`, 2>): Promise<Category>;
|
|
36
36
|
}
|
|
37
37
|
declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
|
|
38
38
|
interface DeleteCategorySignature {
|
|
@@ -50,14 +50,14 @@ interface ListCategoriesSignature {
|
|
|
50
50
|
/**
|
|
51
51
|
* Retrieves a list of all categories.
|
|
52
52
|
*/
|
|
53
|
-
(options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoriesResponse, `categories
|
|
53
|
+
(options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoriesResponse, `categories`, 2>>;
|
|
54
54
|
}
|
|
55
55
|
declare function queryCategories$1(httpClient: HttpClient): QueryCategoriesSignature;
|
|
56
56
|
interface QueryCategoriesSignature {
|
|
57
57
|
/**
|
|
58
58
|
* Retrieves a list of categories, given the provided paging, filtering, and sorting.
|
|
59
59
|
*
|
|
60
|
-
* For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters).
|
|
60
|
+
* For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters-and-sorting).
|
|
61
61
|
*/
|
|
62
62
|
(): CategoriesQueryBuilder;
|
|
63
63
|
}
|
|
@@ -68,7 +68,7 @@ interface UpdateExtendedFieldsSignature {
|
|
|
68
68
|
* @param - ID of the entity to update.
|
|
69
69
|
* @param - Identifier for the app whose extended fields are being updated.
|
|
70
70
|
*/
|
|
71
|
-
(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData
|
|
71
|
+
(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>): Promise<UpdateExtendedFieldsResponse>;
|
|
72
72
|
}
|
|
73
73
|
declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.faq.category.v2.category_created">;
|
|
74
74
|
declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.faq.category.v2.category_deleted">;
|
|
@@ -81,11 +81,17 @@ declare const deleteCategory: MaybeContext<BuildRESTFunction<typeof deleteCatego
|
|
|
81
81
|
declare const listCategories: MaybeContext<BuildRESTFunction<typeof listCategories$1> & typeof listCategories$1>;
|
|
82
82
|
declare const queryCategories: MaybeContext<BuildRESTFunction<typeof queryCategories$1> & typeof queryCategories$1>;
|
|
83
83
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
84
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Triggered when a category is created.
|
|
86
|
+
*/
|
|
85
87
|
declare const onCategoryCreated: BuildEventDefinition<typeof onCategoryCreated$1>;
|
|
86
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Triggered when a category is deleted.
|
|
90
|
+
*/
|
|
87
91
|
declare const onCategoryDeleted: BuildEventDefinition<typeof onCategoryDeleted$1>;
|
|
88
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Triggered when a category is updated.
|
|
94
|
+
*/
|
|
89
95
|
declare const onCategoryUpdated: BuildEventDefinition<typeof onCategoryUpdated$1>;
|
|
90
96
|
|
|
91
97
|
export { CategoriesQueryBuilder, Category, CategoryCreatedEnvelope, CategoryDeletedEnvelope, CategoryUpdatedEnvelope, ListCategoriesOptions, ListCategoriesResponse, UpdateCategory, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, createCategory, deleteCategory, getCategory, listCategories, onCategoryCreated, onCategoryDeleted, onCategoryUpdated, queryCategories, updateCategory, updateExtendedFields };
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/faq-category-v2-category-category.public.ts","../../src/faq-category-v2-category-category.universal.ts","../../src/faq-category-v2-category-category.http.ts","../../src/faq-category-v2-category-category.context.ts"],"sourcesContent":["export * from './src/faq-category-v2-category-category.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CategoriesQueryBuilder,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n ListCategoriesOptions,\n ListCategoriesResponse,\n UpdateCategory,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n getCategory as universalGetCategory,\n listCategories as universalListCategories,\n queryCategories as universalQueryCategories,\n updateCategory as universalUpdateCategory,\n updateExtendedFields as universalUpdateExtendedFields,\n} from './faq-category-v2-category-category.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/faq' };\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `title`>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a new Category.\n * @param - Category to create.\n * @returns Created category.\n */\n (category: NonNullablePaths<Category, `title`>): Promise<Category>;\n}\n\nexport function getCategory(httpClient: HttpClient): GetCategorySignature {\n return (categoryId: string) =>\n universalGetCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCategorySignature {\n /**\n * Retrieves a single category by ID.\n * @param - ID of the category to retrieve.\n * @returns Retrieved category.\n */\n (categoryId: string): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`>\n ) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n * @param - Category ID.\n * @returns Updated category.\n */\n (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`>\n ): Promise<Category>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (categoryId: string) =>\n universalDeleteCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n * @param - ID of the category to delete.\n */\n (categoryId: string): Promise<void>;\n}\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 a list of all categories.\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<ListCategoriesResponse, `categories`>\n >;\n}\n\nexport function queryCategories(\n httpClient: HttpClient\n): QueryCategoriesSignature {\n return () =>\n universalQueryCategories(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryCategoriesSignature {\n /**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters).\n */\n (): CategoriesQueryBuilder;\n}\n\nexport function updateExtendedFields(\n httpClient: HttpClient\n): UpdateExtendedFieldsSignature {\n return (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>\n ) =>\n universalUpdateExtendedFields(\n _id,\n namespace,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateExtendedFieldsSignature {\n /**\n * Updates extended fields of a category without incrementing `revision`.\n * @param - ID of the entity to update.\n * @param - Identifier for the app whose extended fields are being updated.\n */\n (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>\n ): Promise<UpdateExtendedFieldsResponse>;\n}\n\nexport const onCategoryCreated = EventDefinition(\n 'wix.faq.category.v2.category_created',\n true,\n (event: CategoryCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'entity.sortOrder' }],\n },\n ])\n )\n)<CategoryCreatedEnvelope>();\nexport const onCategoryDeleted = EventDefinition(\n 'wix.faq.category.v2.category_deleted',\n true,\n (event: CategoryDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'undefined.sortOrder' }],\n },\n ])\n )\n)<CategoryDeletedEnvelope>();\nexport const onCategoryUpdated = EventDefinition(\n 'wix.faq.category.v2.category_updated',\n true,\n (event: CategoryUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'entity.sortOrder' }],\n },\n ])\n )\n)<CategoryUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CategoriesQueryBuilder,\n CategoriesQueryResult,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetCategoryRequest,\n GetCategoryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoriesRequest,\n ListCategoriesResponse,\n MessageEnvelope,\n PagingMetadataV2,\n QueryCategoriesRequest,\n QueryCategoriesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n WebhookIdentityType,\n} from './faq-category-v2-category-category.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFaqCategoryV2Category from './faq-category-v2-category-category.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * Categories are themed groupings of FAQ question entries that a site owner can create to organize their\n * FAQ questions. For example, Shipping or Returns. Each category can contain multiple questions and is displayed\n * as a section on a site's Wix FAQ widgets.\n */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the category is updated.\n * To prevent conflicting changes,\n * the current revision must be specified when updating the category.\n *\n * Ignored when creating a category.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the category was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the category was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Category title displayed on a site's Wix FAQ widgets.\n * @maxLength 500\n * @minLength 1\n */\n title?: string | null;\n /** Order of the category within a site's Wix FAQ dashboard page. Categories with lower sort order values appear first. */\n sortOrder?: number | null;\n /**\n * Custom field data for the `category` object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface GetCategoryRequest {\n /**\n * ID of the category to retrieve.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface GetCategoryResponse {\n /** Retrieved category. */\n category?: Category;\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface DeleteCategoryResponse {}\n\nexport interface ListCategoriesRequest {\n /** Request more categories using cursor paging. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListCategoriesResponse {\n /** List of categories. */\n categories?: Category[];\n /** Paging metadata */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface QueryCategoriesRequest {\n /** WQL expression for filtering and sorting categories. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface QueryCategoriesResponse {\n /** List of categories matching the query. */\n categories?: Category[];\n /** Paging metadata for retrieving additional results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface UpdateExtendedFieldsRequest {\n /** ID of the entity to update. */\n _id: string;\n /** Identifier for the app whose extended fields are being updated. */\n namespace: string;\n /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n namespaceData: Record<string, any> | null;\n}\n\nexport interface UpdateExtendedFieldsResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\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 EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CategoryCreatedEnvelope {\n entity: Category;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_created\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug created\n */\nexport declare function onCategoryCreated(\n handler: (event: CategoryCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CategoryDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_deleted\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug deleted\n */\nexport declare function onCategoryDeleted(\n handler: (event: CategoryDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CategoryUpdatedEnvelope {\n entity: Category;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_updated\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug updated\n */\nexport declare function onCategoryUpdated(\n handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new Category.\n * @param category - Category to create.\n * @public\n * @requiredField category\n * @requiredField category.title\n * @permissionId FAQ.CREATE_CATEGORY\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn wix.faq.category.v2.CategoryService.CreateCategory\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `title`>\n): Promise<Category> {\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 = ambassadorWixFaqCategoryV2Category.createCategory(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 * Retrieves a single category by ID.\n * @param categoryId - ID of the category to retrieve.\n * @public\n * @requiredField categoryId\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Retrieved category.\n * @fqn wix.faq.category.v2.CategoryService.GetCategory\n */\nexport async function getCategory(categoryId: string): Promise<Category> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryId: categoryId,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.getCategory(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: { categoryId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['categoryId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n * @param _id - Category ID.\n * @public\n * @requiredField _id\n * @requiredField category\n * @requiredField category.revision\n * @permissionId FAQ.UPDATE_CATEGORY\n * @applicableIdentity APP\n * @returns Updated category.\n * @fqn wix.faq.category.v2.CategoryService.UpdateCategory\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`>\n): Promise<Category> {\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 = ambassadorWixFaqCategoryV2Category.updateCategory(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: { 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 * Revision number, which increments by 1 each time the category is updated.\n * To prevent conflicting changes,\n * the current revision must be specified when updating the category.\n *\n * Ignored when creating a category.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the category was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the category was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Category title displayed on a site's Wix FAQ widgets.\n * @maxLength 500\n * @minLength 1\n */\n title?: string | null;\n /** Order of the category within a site's Wix FAQ dashboard page. Categories with lower sort order values appear first. */\n sortOrder?: number | null;\n /**\n * Custom field data for the `category` object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n * @param categoryId - ID of the category to delete.\n * @public\n * @requiredField categoryId\n * @permissionId FAQ.DELETE_CATEGORY\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.DeleteCategory\n */\nexport async function deleteCategory(categoryId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryId: categoryId,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.deleteCategory(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { categoryId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['categoryId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of all categories.\n * @public\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.faq.category.v2.CategoryService.ListCategories\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<NonNullablePaths<ListCategoriesResponse, `categories`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.listCategories(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: { paging: '$[0].paging' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /** Request more categories using cursor paging. */\n paging?: CursorPaging;\n}\n\n/**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters).\n * @public\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.faq.category.v2.CategoryService.QueryCategories\n */\nexport function queryCategories(): CategoriesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Category,\n 'CURSOR',\n QueryCategoriesRequest,\n QueryCategoriesResponse\n >({\n func: async (payload: QueryCategoriesRequest) => {\n const reqOpts =\n ambassadorWixFaqCategoryV2Category.queryCategories(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryCategoriesRequest['query']) => {\n const args = [query, {}] as [QueryCategoriesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryCategoriesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.categories,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface CategoriesQueryResult extends QueryCursorResult {\n items: Category[];\n query: CategoriesQueryBuilder;\n next: () => Promise<CategoriesQueryResult>;\n prev: () => Promise<CategoriesQueryResult>;\n}\n\nexport interface CategoriesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: '_id' | 'title',\n value: string\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any[]\n ) => CategoriesQueryBuilder;\n in: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n exists: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: boolean\n ) => CategoriesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_id' | 'title' | 'sortOrder'>\n ) => CategoriesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<'_id' | 'title' | 'sortOrder'>\n ) => CategoriesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => CategoriesQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => CategoriesQueryBuilder;\n find: () => Promise<CategoriesQueryResult>;\n}\n\n/**\n * Updates extended fields of a category without incrementing `revision`.\n * @param _id - ID of the entity to update.\n * @param namespace - Identifier for the app whose extended fields are being updated.\n * @public\n * @requiredField _id\n * @requiredField namespace\n * @requiredField options\n * @requiredField options.namespaceData\n * @permissionId FAQ.UPDATE_CATEGORY\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.UpdateExtendedFields\n */\nexport async function updateExtendedFields(\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>\n): Promise<UpdateExtendedFieldsResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n namespace: namespace,\n namespaceData: options?.namespaceData,\n });\n\n const reqOpts =\n ambassadorWixFaqCategoryV2Category.updateExtendedFields(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 namespace: '$[1]',\n namespaceData: '$[2].namespaceData',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateExtendedFieldsOptions {\n /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n namespaceData: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixFaqCategoryV2CategoryServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/faq/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/faq/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n _: [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_faq_category';\n\n/** Creates a new Category. */\nexport function createCategory(payload: object): RequestOptionsFactory<any> {\n function __createCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.CreateCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCategory;\n}\n\n/** Retrieves a single category by ID. */\nexport function getCategory(payload: object): RequestOptionsFactory<any> {\n function __getCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.GetCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCategory;\n}\n\n/**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n */\nexport function updateCategory(payload: object): RequestOptionsFactory<any> {\n function __updateCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'PATCH' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.UpdateCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{category.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCategory;\n}\n\n/**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n */\nexport function deleteCategory(payload: object): RequestOptionsFactory<any> {\n function __deleteCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'DELETE' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.DeleteCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCategory;\n}\n\n/** Retrieves a list of all categories. */\nexport function listCategories(payload: object): RequestOptionsFactory<any> {\n function __listCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.ListCategories',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'categories.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listCategories;\n}\n\n/**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters).\n */\nexport function queryCategories(payload: object): RequestOptionsFactory<any> {\n function __queryCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.QueryCategories',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'categories.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryCategories;\n}\n\n/** Updates extended fields of a category without incrementing `revision`. */\nexport function updateExtendedFields(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateExtendedFields({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.UpdateExtendedFields',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{id}/update-extended-fields',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateExtendedFields;\n}\n","import {\n createCategory as publicCreateCategory,\n getCategory as publicGetCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n listCategories as publicListCategories,\n queryCategories as publicQueryCategories,\n updateExtendedFields as publicUpdateExtendedFields,\n} from './faq-category-v2-category-category.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 { onCategoryCreated as publicOnCategoryCreated } from './faq-category-v2-category-category.public.js';\nimport { onCategoryDeleted as publicOnCategoryDeleted } from './faq-category-v2-category-category.public.js';\nimport { onCategoryUpdated as publicOnCategoryUpdated } from './faq-category-v2-category-category.public.js';\n\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const getCategory: MaybeContext<\n BuildRESTFunction<typeof publicGetCategory> & typeof publicGetCategory\n> = /*#__PURE__*/ createRESTModule(publicGetCategory);\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);\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const queryCategories: MaybeContext<\n BuildRESTFunction<typeof publicQueryCategories> & typeof publicQueryCategories\n> = /*#__PURE__*/ createRESTModule(publicQueryCategories);\nexport const updateExtendedFields: MaybeContext<\n BuildRESTFunction<typeof publicUpdateExtendedFields> &\n typeof publicUpdateExtendedFields\n> = /*#__PURE__*/ createRESTModule(publicUpdateExtendedFields);\n/** */\nexport const onCategoryCreated: BuildEventDefinition<\n typeof publicOnCategoryCreated\n> = createEventModule(publicOnCategoryCreated);\n/** */\nexport const onCategoryDeleted: BuildEventDefinition<\n typeof publicOnCategoryDeleted\n> = createEventModule(publicOnCategoryDeleted);\n/** */\nexport const onCategoryUpdated: BuildEventDefinition<\n typeof publicOnCategoryUpdated\n> = createEventModule(publicOnCategoryUpdated);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './faq-category-v2-category-category.universal.js';\nexport {\n Category,\n ExtendedFields,\n CreateCategoryRequest,\n CreateCategoryResponse,\n GetCategoryRequest,\n GetCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n ListCategoriesRequest,\n CursorPaging,\n ListCategoriesResponse,\n PagingMetadataV2,\n Cursors,\n QueryCategoriesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n QueryCategoriesResponse,\n CursorPagingMetadata,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n UpdateCategory,\n ListCategoriesOptions,\n CategoriesQueryResult,\n CategoriesQueryBuilder,\n UpdateExtendedFieldsOptions,\n} from './faq-category-v2-category-category.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,4BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;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,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;AACpB,IAAM,wBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAAA,MACtC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;;;AGjP3B,IAAAC,uBAAiC;AACjC,sCAAkC;AAU3B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AAEtD,IAAMC,yBAET,mDAAkB,iBAAuB;AAEtC,IAAMC,yBAET,mDAAkB,iBAAuB;AAEtC,IAAMC,yBAET,mDAAkB,iBAAuB;","names":["createCategory","deleteCategory","getCategory","listCategories","onCategoryCreated","onCategoryDeleted","onCategoryUpdated","queryCategories","updateCategory","updateExtendedFields","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createCategory","sdkTransformError","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","createCategory","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","import_rest_modules","createCategory","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","onCategoryCreated","onCategoryDeleted","onCategoryUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/faq-category-v2-category-category.public.ts","../../src/faq-category-v2-category-category.universal.ts","../../src/faq-category-v2-category-category.http.ts","../../src/faq-category-v2-category-category.context.ts"],"sourcesContent":["export * from './src/faq-category-v2-category-category.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CategoriesQueryBuilder,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n ListCategoriesOptions,\n ListCategoriesResponse,\n UpdateCategory,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n getCategory as universalGetCategory,\n listCategories as universalListCategories,\n queryCategories as universalQueryCategories,\n updateCategory as universalUpdateCategory,\n updateExtendedFields as universalUpdateExtendedFields,\n} from './faq-category-v2-category-category.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/faq' };\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `title`, 2>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a new Category.\n * @param - Category to create.\n * @returns Created category.\n */\n (category: NonNullablePaths<Category, `title`, 2>): Promise<Category>;\n}\n\nexport function getCategory(httpClient: HttpClient): GetCategorySignature {\n return (categoryId: string) =>\n universalGetCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCategorySignature {\n /**\n * Retrieves a single category by ID.\n * @param - ID of the category to retrieve.\n * @returns Retrieved category.\n */\n (categoryId: string): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`, 2>\n ) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n * @param - Category ID.\n * @returns Updated category.\n */\n (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`, 2>\n ): Promise<Category>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (categoryId: string) =>\n universalDeleteCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n * @param - ID of the category to delete.\n */\n (categoryId: string): Promise<void>;\n}\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 a list of all categories.\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<ListCategoriesResponse, `categories`, 2>\n >;\n}\n\nexport function queryCategories(\n httpClient: HttpClient\n): QueryCategoriesSignature {\n return () =>\n universalQueryCategories(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryCategoriesSignature {\n /**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters-and-sorting).\n */\n (): CategoriesQueryBuilder;\n}\n\nexport function updateExtendedFields(\n httpClient: HttpClient\n): UpdateExtendedFieldsSignature {\n return (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>\n ) =>\n universalUpdateExtendedFields(\n _id,\n namespace,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateExtendedFieldsSignature {\n /**\n * Updates extended fields of a category without incrementing `revision`.\n * @param - ID of the entity to update.\n * @param - Identifier for the app whose extended fields are being updated.\n */\n (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>\n ): Promise<UpdateExtendedFieldsResponse>;\n}\n\nexport const onCategoryCreated = EventDefinition(\n 'wix.faq.category.v2.category_created',\n true,\n (event: CategoryCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'entity.sortOrder' }],\n },\n ])\n )\n)<CategoryCreatedEnvelope>();\nexport const onCategoryDeleted = EventDefinition(\n 'wix.faq.category.v2.category_deleted',\n true,\n (event: CategoryDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'undefined.sortOrder' }],\n },\n ])\n )\n)<CategoryDeletedEnvelope>();\nexport const onCategoryUpdated = EventDefinition(\n 'wix.faq.category.v2.category_updated',\n true,\n (event: CategoryUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'entity.sortOrder' }],\n },\n ])\n )\n)<CategoryUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CategoriesQueryBuilder,\n CategoriesQueryResult,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetCategoryRequest,\n GetCategoryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoriesRequest,\n ListCategoriesResponse,\n MessageEnvelope,\n PagingMetadataV2,\n QueryCategoriesRequest,\n QueryCategoriesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n WebhookIdentityType,\n} from './faq-category-v2-category-category.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFaqCategoryV2Category from './faq-category-v2-category-category.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * Categories are themed groupings of FAQ question entries that a site owner can create to organize their\n * FAQ questions. For example, Shipping or Returns. Each category can contain multiple questions and is displayed\n * as a section on a site's Wix FAQ widgets.\n */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the category is updated.\n * To prevent conflicting changes,\n * the current revision must be specified when updating the category.\n *\n * Ignored when creating a category.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the category was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the category was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Category title displayed on a site's Wix FAQ widgets.\n * @maxLength 500\n * @minLength 1\n */\n title?: string | null;\n /** Order of the category within a site's Wix FAQ dashboard page. Categories with lower sort order values appear first. */\n sortOrder?: number | null;\n /**\n * Custom field data for the `category` object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateCategoryRequest {\n /** Category to create. */\n category: Category;\n}\n\nexport interface CreateCategoryResponse {\n /** Created category. */\n category?: Category;\n}\n\nexport interface GetCategoryRequest {\n /**\n * ID of the category to retrieve.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface GetCategoryResponse {\n /** Retrieved category. */\n category?: Category;\n}\n\nexport interface UpdateCategoryRequest {\n /** Category to update. */\n category: Category;\n}\n\nexport interface UpdateCategoryResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DeleteCategoryRequest {\n /**\n * ID of the category to delete.\n * @format GUID\n */\n categoryId: string;\n}\n\nexport interface DeleteCategoryResponse {}\n\nexport interface ListCategoriesRequest {\n /** Request more categories using cursor paging. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListCategoriesResponse {\n /** List of categories. */\n categories?: Category[];\n /** Paging metadata */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface QueryCategoriesRequest {\n /** WQL expression for filtering and sorting categories. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface QueryCategoriesResponse {\n /** List of categories matching the query. */\n categories?: Category[];\n /** Paging metadata for retrieving additional results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface UpdateExtendedFieldsRequest {\n /** ID of the entity to update. */\n _id: string;\n /** Identifier for the app whose extended fields are being updated. */\n namespace: string;\n /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n namespaceData: Record<string, any> | null;\n}\n\nexport interface UpdateExtendedFieldsResponse {\n /** Updated category. */\n category?: Category;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\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 EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CategoryCreatedEnvelope {\n entity: Category;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a category is created.\n * @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_created\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug created\n */\nexport declare function onCategoryCreated(\n handler: (event: CategoryCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CategoryDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a category is deleted.\n * @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_deleted\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug deleted\n */\nexport declare function onCategoryDeleted(\n handler: (event: CategoryDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CategoryUpdatedEnvelope {\n entity: Category;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a category is updated.\n * @permissionScope Manage FAQ\n * @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ\n * @permissionScope Read FAQ\n * @permissionScopeId SCOPE.DC-LABS.READ-FAQ\n * @permissionId FAQ.READ_CATEGORIES\n * @webhook\n * @eventType wix.faq.category.v2.category_updated\n * @serviceIdentifier wix.faq.category.v2.CategoryService\n * @slug updated\n */\nexport declare function onCategoryUpdated(\n handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new Category.\n * @param category - Category to create.\n * @public\n * @requiredField category\n * @requiredField category.title\n * @permissionId FAQ.CREATE_CATEGORY\n * @applicableIdentity APP\n * @returns Created category.\n * @fqn wix.faq.category.v2.CategoryService.CreateCategory\n */\nexport async function createCategory(\n category: NonNullablePaths<Category, `title`, 2>\n): Promise<Category> {\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 = ambassadorWixFaqCategoryV2Category.createCategory(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 * Retrieves a single category by ID.\n * @param categoryId - ID of the category to retrieve.\n * @public\n * @requiredField categoryId\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @returns Retrieved category.\n * @fqn wix.faq.category.v2.CategoryService.GetCategory\n */\nexport async function getCategory(categoryId: string): Promise<Category> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryId: categoryId,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.getCategory(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: { categoryId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['categoryId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n * @param _id - Category ID.\n * @public\n * @requiredField _id\n * @requiredField category\n * @requiredField category.revision\n * @permissionId FAQ.UPDATE_CATEGORY\n * @applicableIdentity APP\n * @returns Updated category.\n * @fqn wix.faq.category.v2.CategoryService.UpdateCategory\n */\nexport async function updateCategory(\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`, 2>\n): Promise<Category> {\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 = ambassadorWixFaqCategoryV2Category.updateCategory(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: { 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 * Revision number, which increments by 1 each time the category is updated.\n * To prevent conflicting changes,\n * the current revision must be specified when updating the category.\n *\n * Ignored when creating a category.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the category was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the category was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Category title displayed on a site's Wix FAQ widgets.\n * @maxLength 500\n * @minLength 1\n */\n title?: string | null;\n /** Order of the category within a site's Wix FAQ dashboard page. Categories with lower sort order values appear first. */\n sortOrder?: number | null;\n /**\n * Custom field data for the `category` object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n * @param categoryId - ID of the category to delete.\n * @public\n * @requiredField categoryId\n * @permissionId FAQ.DELETE_CATEGORY\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.DeleteCategory\n */\nexport async function deleteCategory(categoryId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n categoryId: categoryId,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.deleteCategory(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { categoryId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['categoryId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of all categories.\n * @public\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.ListCategories\n */\nexport async function listCategories(\n options?: ListCategoriesOptions\n): Promise<NonNullablePaths<ListCategoriesResponse, `categories`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixFaqCategoryV2Category.listCategories(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: { paging: '$[0].paging' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCategoriesOptions {\n /** Request more categories using cursor paging. */\n paging?: CursorPaging;\n}\n\n/**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters-and-sorting).\n * @public\n * @permissionId FAQ.READ_CATEGORIES\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.QueryCategories\n */\nexport function queryCategories(): CategoriesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Category,\n 'CURSOR',\n QueryCategoriesRequest,\n QueryCategoriesResponse\n >({\n func: async (payload: QueryCategoriesRequest) => {\n const reqOpts =\n ambassadorWixFaqCategoryV2Category.queryCategories(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryCategoriesRequest['query']) => {\n const args = [query, {}] as [QueryCategoriesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryCategoriesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.categories,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface CategoriesQueryResult extends QueryCursorResult {\n items: Category[];\n query: CategoriesQueryBuilder;\n next: () => Promise<CategoriesQueryResult>;\n prev: () => Promise<CategoriesQueryResult>;\n}\n\nexport interface CategoriesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: '_id' | 'title',\n value: string\n ) => CategoriesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any[]\n ) => CategoriesQueryBuilder;\n in: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: any\n ) => CategoriesQueryBuilder;\n exists: (\n propertyName: '_id' | 'title' | 'sortOrder',\n value: boolean\n ) => CategoriesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_id' | 'title' | 'sortOrder'>\n ) => CategoriesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<'_id' | 'title' | 'sortOrder'>\n ) => CategoriesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => CategoriesQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => CategoriesQueryBuilder;\n find: () => Promise<CategoriesQueryResult>;\n}\n\n/**\n * Updates extended fields of a category without incrementing `revision`.\n * @param _id - ID of the entity to update.\n * @param namespace - Identifier for the app whose extended fields are being updated.\n * @public\n * @requiredField _id\n * @requiredField namespace\n * @requiredField options\n * @requiredField options.namespaceData\n * @permissionId FAQ.UPDATE_CATEGORY\n * @applicableIdentity APP\n * @fqn wix.faq.category.v2.CategoryService.UpdateExtendedFields\n */\nexport async function updateExtendedFields(\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>\n): Promise<UpdateExtendedFieldsResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n namespace: namespace,\n namespaceData: options?.namespaceData,\n });\n\n const reqOpts =\n ambassadorWixFaqCategoryV2Category.updateExtendedFields(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 namespace: '$[1]',\n namespaceData: '$[2].namespaceData',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateExtendedFieldsOptions {\n /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n namespaceData: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixFaqCategoryV2CategoryServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/category',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/faq/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/faq/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n _: [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/faq-server/v2/draft-categories',\n destPath: '/v2/draft-categories',\n },\n {\n srcPath: '/_api/faq-server/v2/categories',\n destPath: '/v2/categories',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_faq_category';\n\n/** Creates a new Category. */\nexport function createCategory(payload: object): RequestOptionsFactory<any> {\n function __createCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.CreateCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCategory;\n}\n\n/** Retrieves a single category by ID. */\nexport function getCategory(payload: object): RequestOptionsFactory<any> {\n function __getCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.GetCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCategory;\n}\n\n/**\n * Updates a category.\n *\n * Each time the category is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the category.\n * This ensures you're working with the latest category and prevents unintended overwrites.\n * Updates can be partial.\n */\nexport function updateCategory(payload: object): RequestOptionsFactory<any> {\n function __updateCategory({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'PATCH' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.UpdateCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{category.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCategory;\n}\n\n/**\n * Deletes a category.\n *\n * Deleting a category permanently removes it from the site's FAQ page.\n * Questions that belong to the deleted category are also deleted.\n */\nexport function deleteCategory(payload: object): RequestOptionsFactory<any> {\n function __deleteCategory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'DELETE' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.DeleteCategory',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{categoryId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCategory;\n}\n\n/** Retrieves a list of all categories. */\nexport function listCategories(payload: object): RequestOptionsFactory<any> {\n function __listCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'GET' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.ListCategories',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'categories.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listCategories;\n}\n\n/**\n * Retrieves a list of categories, given the provided paging, filtering, and sorting.\n *\n * For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters-and-sorting).\n */\nexport function queryCategories(payload: object): RequestOptionsFactory<any> {\n function __queryCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.QueryCategories',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'categories.createdDate' },\n { path: 'categories.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'categories.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryCategories;\n}\n\n/** Updates extended fields of a category without incrementing `revision`. */\nexport function updateExtendedFields(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateExtendedFields({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.faq.category.v2.category',\n method: 'POST' as any,\n methodFqn: 'wix.faq.category.v2.CategoryService.UpdateExtendedFields',\n packageName: PACKAGE_NAME,\n url: resolveWixFaqCategoryV2CategoryServiceUrl({\n protoPath: '/v2/categories/{id}/update-extended-fields',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'category.createdDate' },\n { path: 'category.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'category.sortOrder' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateExtendedFields;\n}\n","import {\n createCategory as publicCreateCategory,\n getCategory as publicGetCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n listCategories as publicListCategories,\n queryCategories as publicQueryCategories,\n updateExtendedFields as publicUpdateExtendedFields,\n} from './faq-category-v2-category-category.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 { onCategoryCreated as publicOnCategoryCreated } from './faq-category-v2-category-category.public.js';\nimport { onCategoryDeleted as publicOnCategoryDeleted } from './faq-category-v2-category-category.public.js';\nimport { onCategoryUpdated as publicOnCategoryUpdated } from './faq-category-v2-category-category.public.js';\n\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const getCategory: MaybeContext<\n BuildRESTFunction<typeof publicGetCategory> & typeof publicGetCategory\n> = /*#__PURE__*/ createRESTModule(publicGetCategory);\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);\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const queryCategories: MaybeContext<\n BuildRESTFunction<typeof publicQueryCategories> & typeof publicQueryCategories\n> = /*#__PURE__*/ createRESTModule(publicQueryCategories);\nexport const updateExtendedFields: MaybeContext<\n BuildRESTFunction<typeof publicUpdateExtendedFields> &\n typeof publicUpdateExtendedFields\n> = /*#__PURE__*/ createRESTModule(publicUpdateExtendedFields);\n/**\n * Triggered when a category is created.\n */\nexport const onCategoryCreated: BuildEventDefinition<\n typeof publicOnCategoryCreated\n> = createEventModule(publicOnCategoryCreated);\n/**\n * Triggered when a category is deleted.\n */\nexport const onCategoryDeleted: BuildEventDefinition<\n typeof publicOnCategoryDeleted\n> = createEventModule(publicOnCategoryDeleted);\n/**\n * Triggered when a category is updated.\n */\nexport const onCategoryUpdated: BuildEventDefinition<\n typeof publicOnCategoryUpdated\n> = createEventModule(publicOnCategoryUpdated);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './faq-category-v2-category-category.universal.js';\nexport {\n Category,\n ExtendedFields,\n CreateCategoryRequest,\n CreateCategoryResponse,\n GetCategoryRequest,\n GetCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n ListCategoriesRequest,\n CursorPaging,\n ListCategoriesResponse,\n PagingMetadataV2,\n Cursors,\n QueryCategoriesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n QueryCategoriesResponse,\n CursorPagingMetadata,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n UpdateCategory,\n ListCategoriesOptions,\n CategoriesQueryResult,\n CategoriesQueryBuilder,\n UpdateExtendedFieldsOptions,\n} from './faq-category-v2-category-category.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './faq-category-v2-category-category.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,4BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6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AiBA,gBAAqB;AACjD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AAItD,IAAMC,yBAET,mDAAkB,iBAAuB;AAItC,IAAMC,yBAET,mDAAkB,iBAAuB;AAItC,IAAMC,yBAET,mDAAkB,iBAAuB;","names":["createCategory","deleteCategory","getCategory","listCategories","onCategoryCreated","onCategoryDeleted","onCategoryUpdated","queryCategories","updateCategory","updateExtendedFields","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createCategory","sdkTransformError","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","createCategory","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","import_rest_modules","createCategory","getCategory","updateCategory","deleteCategory","listCategories","queryCategories","updateExtendedFields","onCategoryCreated","onCategoryDeleted","onCategoryUpdated"]}
|
|
@@ -404,7 +404,9 @@ interface CategoryCreatedEnvelope {
|
|
|
404
404
|
entity: Category;
|
|
405
405
|
metadata: EventMetadata;
|
|
406
406
|
}
|
|
407
|
-
/**
|
|
407
|
+
/**
|
|
408
|
+
* Triggered when a category is created.
|
|
409
|
+
* @permissionScope Manage FAQ
|
|
408
410
|
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
409
411
|
* @permissionScope Read FAQ
|
|
410
412
|
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
@@ -418,7 +420,9 @@ declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) =>
|
|
|
418
420
|
interface CategoryDeletedEnvelope {
|
|
419
421
|
metadata: EventMetadata;
|
|
420
422
|
}
|
|
421
|
-
/**
|
|
423
|
+
/**
|
|
424
|
+
* Triggered when a category is deleted.
|
|
425
|
+
* @permissionScope Manage FAQ
|
|
422
426
|
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
423
427
|
* @permissionScope Read FAQ
|
|
424
428
|
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
@@ -433,7 +437,9 @@ interface CategoryUpdatedEnvelope {
|
|
|
433
437
|
entity: Category;
|
|
434
438
|
metadata: EventMetadata;
|
|
435
439
|
}
|
|
436
|
-
/**
|
|
440
|
+
/**
|
|
441
|
+
* Triggered when a category is updated.
|
|
442
|
+
* @permissionScope Manage FAQ
|
|
437
443
|
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
438
444
|
* @permissionScope Read FAQ
|
|
439
445
|
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
@@ -455,7 +461,7 @@ declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) =>
|
|
|
455
461
|
* @returns Created category.
|
|
456
462
|
* @fqn wix.faq.category.v2.CategoryService.CreateCategory
|
|
457
463
|
*/
|
|
458
|
-
declare function createCategory(category: NonNullablePaths<Category, `title
|
|
464
|
+
declare function createCategory(category: NonNullablePaths<Category, `title`, 2>): Promise<Category>;
|
|
459
465
|
/**
|
|
460
466
|
* Retrieves a single category by ID.
|
|
461
467
|
* @param categoryId - ID of the category to retrieve.
|
|
@@ -463,7 +469,6 @@ declare function createCategory(category: NonNullablePaths<Category, `title`>):
|
|
|
463
469
|
* @requiredField categoryId
|
|
464
470
|
* @permissionId FAQ.READ_CATEGORIES
|
|
465
471
|
* @applicableIdentity APP
|
|
466
|
-
* @applicableIdentity VISITOR
|
|
467
472
|
* @returns Retrieved category.
|
|
468
473
|
* @fqn wix.faq.category.v2.CategoryService.GetCategory
|
|
469
474
|
*/
|
|
@@ -485,7 +490,7 @@ declare function getCategory(categoryId: string): Promise<Category>;
|
|
|
485
490
|
* @returns Updated category.
|
|
486
491
|
* @fqn wix.faq.category.v2.CategoryService.UpdateCategory
|
|
487
492
|
*/
|
|
488
|
-
declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision
|
|
493
|
+
declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision`, 2>): Promise<Category>;
|
|
489
494
|
interface UpdateCategory {
|
|
490
495
|
/**
|
|
491
496
|
* Category ID.
|
|
@@ -545,10 +550,9 @@ declare function deleteCategory(categoryId: string): Promise<void>;
|
|
|
545
550
|
* @public
|
|
546
551
|
* @permissionId FAQ.READ_CATEGORIES
|
|
547
552
|
* @applicableIdentity APP
|
|
548
|
-
* @applicableIdentity VISITOR
|
|
549
553
|
* @fqn wix.faq.category.v2.CategoryService.ListCategories
|
|
550
554
|
*/
|
|
551
|
-
declare function listCategories(options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoriesResponse, `categories
|
|
555
|
+
declare function listCategories(options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoriesResponse, `categories`, 2>>;
|
|
552
556
|
interface ListCategoriesOptions {
|
|
553
557
|
/** Request more categories using cursor paging. */
|
|
554
558
|
paging?: CursorPaging;
|
|
@@ -556,11 +560,10 @@ interface ListCategoriesOptions {
|
|
|
556
560
|
/**
|
|
557
561
|
* Retrieves a list of categories, given the provided paging, filtering, and sorting.
|
|
558
562
|
*
|
|
559
|
-
* For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters).
|
|
563
|
+
* For field support for filters, see [Categories V2: Supported Filters](https://dev.wix.com/docs/rest/business-management/faq-app/faq/category-v2/supported-filters-and-sorting).
|
|
560
564
|
* @public
|
|
561
565
|
* @permissionId FAQ.READ_CATEGORIES
|
|
562
566
|
* @applicableIdentity APP
|
|
563
|
-
* @applicableIdentity VISITOR
|
|
564
567
|
* @fqn wix.faq.category.v2.CategoryService.QueryCategories
|
|
565
568
|
*/
|
|
566
569
|
declare function queryCategories(): CategoriesQueryBuilder;
|
|
@@ -635,7 +638,7 @@ interface CategoriesQueryBuilder {
|
|
|
635
638
|
* @applicableIdentity APP
|
|
636
639
|
* @fqn wix.faq.category.v2.CategoryService.UpdateExtendedFields
|
|
637
640
|
*/
|
|
638
|
-
declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData
|
|
641
|
+
declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>): Promise<UpdateExtendedFieldsResponse>;
|
|
639
642
|
interface UpdateExtendedFieldsOptions {
|
|
640
643
|
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
641
644
|
namespaceData: Record<string, any> | null;
|