import { CreateCategoryRequest as CreateCategoryRequest$1, CreateCategoryResponse as CreateCategoryResponse$1, BulkCreateCategoryRequest as BulkCreateCategoryRequest$1, BulkCreateCategoryResponse as BulkCreateCategoryResponse$1, GetCategoryRequest as GetCategoryRequest$1, GetCategoryResponse as GetCategoryResponse$1, ListCategoriesRequest as ListCategoriesRequest$1, ListCategoriesResponse as ListCategoriesResponse$1, UpdateCategoryRequest as UpdateCategoryRequest$1, UpdateCategoryResponse as UpdateCategoryResponse$1, DeleteCategoryRequest as DeleteCategoryRequest$1, DeleteCategoryResponse as DeleteCategoryResponse$1, QueryCategoriesRequest as QueryCategoriesRequest$1, QueryCategoriesResponse as QueryCategoriesResponse$1, BulkAssignCategoriesToProgramRequest as BulkAssignCategoriesToProgramRequest$1, BulkAssignCategoriesToProgramResponse as BulkAssignCategoriesToProgramResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** Category is the main entity of CategoriesService that can be used to group programs by */ interface Category { /** * Category ID. * @format GUID * @readonly */ id?: string | null; /** * Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Represents the time this Category was created * @readonly */ createdDate?: Date | null; /** * Represents the time this Category was last updated * @readonly */ updatedDate?: Date | null; /** @maxLength 100 */ label?: string; /** * List of programs in that category. * @format GUID * @maxSize 200 */ assignedTo?: string[]; /** extensible field */ extendedFields?: ExtendedFields; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface CategoriesAssignedToProgram { /** * Categories which were added to program * @format GUID * @maxSize 10 */ categoriesAdded?: string[]; /** * Categories which were removed from program * @format GUID * @maxSize 10 */ categoriesRemoved?: string[]; } interface CategoryAssignedProgramsUpdated { /** * Programs which were added to category * @format GUID * @maxSize 10 */ programsAdded?: string[]; /** * Programs which were removed from category * @format GUID * @maxSize 10 */ programsRemoved?: string[]; } interface CreateCategoryRequest { /** Category to be created */ category: Category; } interface CreateCategoryResponse { /** The created Category */ category?: Category; } interface BulkCreateCategoryRequest { /** * List of categories you want to create * @minSize 1 * @maxSize 100 */ categories: Category[]; /** Flag to specify if you want to get created entities in response */ returnEntity?: boolean; } interface BulkCreateCategoryResponse { /** Results */ results?: BulkCategoryResult[]; /** bulk action metadata */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkCategoryResult { /** item metadata */ itemMetadata?: ItemMetadata; /** Only exists if `returnEntity` was set to true in the request */ item?: Category; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GetCategoryRequest { /** * Id of the Category to retrieve * @format GUID */ categoryId: string; } interface GetCategoryResponse { /** The retrieved Category */ category?: Category; } interface ListCategoriesRequest { /** * Ids of categories to list * @maxSize 100 * @format GUID */ categoryIds?: string[]; } interface ListCategoriesResponse { /** * The retrieved categories * @maxSize 100 */ categories?: Category[]; } interface UpdateCategoryRequest { /** Category to be updated, may be partial */ category: Category; } interface UpdateCategoryResponse { /** The updated Category */ category?: Category; } interface DeleteCategoryRequest { /** * Id of the Category to delete * @format GUID */ categoryId: string; } interface DeleteCategoryResponse { } interface QueryCategoriesRequest { /** WQL expression */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryCategoriesResponse { /** The retrieved Categories */ categories?: Category[]; /** Metadata for paging */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface BulkAssignCategoriesToProgramRequest { /** * program ID which categories are changing * @format GUID */ programId: string; /** * Categories which are added to program * @format GUID * @maxSize 10 */ categoriesToAssign?: string[]; /** * Categories which are removed from program * @format GUID * @maxSize 10 */ categoriesToUnassign?: string[]; /** Flag to specify if you want to get created entities in response */ returnEntity?: boolean; } interface BulkAssignCategoriesToProgramResponse { /** Results */ results?: BulkAssignCategoryResult[]; /** bulk action metadata */ bulkActionMetadata?: BulkActionMetadata; } declare enum Action { UNKNOWN = "UNKNOWN", ASSIGN_PROGRAMS = "ASSIGN_PROGRAMS" } /** @enumType */ type ActionWithLiterals = Action | 'UNKNOWN' | 'ASSIGN_PROGRAMS'; interface BulkAssignCategoryResult { /** result action */ action?: ActionWithLiterals; /** item metadata */ itemMetadata?: ItemMetadata; /** Only exists if `returnEntity` was set to true in the request */ item?: Category; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createCategory(): __PublicMethodMetaInfo<'POST', {}, CreateCategoryRequest$1, CreateCategoryRequest, CreateCategoryResponse$1, CreateCategoryResponse>; declare function bulkCreateCategory(): __PublicMethodMetaInfo<'POST', {}, BulkCreateCategoryRequest$1, BulkCreateCategoryRequest, BulkCreateCategoryResponse$1, BulkCreateCategoryResponse>; declare function getCategory(): __PublicMethodMetaInfo<'GET', { categoryId: string; }, GetCategoryRequest$1, GetCategoryRequest, GetCategoryResponse$1, GetCategoryResponse>; declare function listCategories(): __PublicMethodMetaInfo<'GET', {}, ListCategoriesRequest$1, ListCategoriesRequest, ListCategoriesResponse$1, ListCategoriesResponse>; declare function updateCategory(): __PublicMethodMetaInfo<'PATCH', { categoryId: string; }, UpdateCategoryRequest$1, UpdateCategoryRequest, UpdateCategoryResponse$1, UpdateCategoryResponse>; declare function deleteCategory(): __PublicMethodMetaInfo<'DELETE', { categoryId: string; }, DeleteCategoryRequest$1, DeleteCategoryRequest, DeleteCategoryResponse$1, DeleteCategoryResponse>; declare function queryCategories(): __PublicMethodMetaInfo<'POST', {}, QueryCategoriesRequest$1, QueryCategoriesRequest, QueryCategoriesResponse$1, QueryCategoriesResponse>; declare function bulkAssignCategoriesToProgram(): __PublicMethodMetaInfo<'POST', {}, BulkAssignCategoriesToProgramRequest$1, BulkAssignCategoriesToProgramRequest, BulkAssignCategoriesToProgramResponse$1, BulkAssignCategoriesToProgramResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, Action as ActionOriginal, type ActionWithLiterals as ActionWithLiteralsOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkAssignCategoriesToProgramRequest as BulkAssignCategoriesToProgramRequestOriginal, type BulkAssignCategoriesToProgramResponse as BulkAssignCategoriesToProgramResponseOriginal, type BulkAssignCategoryResult as BulkAssignCategoryResultOriginal, type BulkCategoryResult as BulkCategoryResultOriginal, type BulkCreateCategoryRequest as BulkCreateCategoryRequestOriginal, type BulkCreateCategoryResponse as BulkCreateCategoryResponseOriginal, type CategoriesAssignedToProgram as CategoriesAssignedToProgramOriginal, type CategoryAssignedProgramsUpdated as CategoryAssignedProgramsUpdatedOriginal, type Category as CategoryOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetCategoryRequest as GetCategoryRequestOriginal, type GetCategoryResponse as GetCategoryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type ListCategoriesRequest as ListCategoriesRequestOriginal, type ListCategoriesResponse as ListCategoriesResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryCategoriesRequest as QueryCategoriesRequestOriginal, type QueryCategoriesResponse as QueryCategoriesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkAssignCategoriesToProgram, bulkCreateCategory, createCategory, deleteCategory, getCategory, listCategories, queryCategories, updateCategory };