import { QueryMessagesRequest as QueryMessagesRequest$1, QueryMessagesResponse as QueryMessagesResponse$1, AskQuestionRequest as AskQuestionRequest$1, AskQuestionResponse as AskQuestionResponse$1, AddFeedbackRequest as AddFeedbackRequest$1, AddFeedbackResponse as AddFeedbackResponse$1, BulkUpdateMessageTagsRequest as BulkUpdateMessageTagsRequest$1, BulkUpdateMessageTagsResponse as BulkUpdateMessageTagsResponse$1, BulkUpdateMessageTagsByFilterRequest as BulkUpdateMessageTagsByFilterRequest$1, BulkUpdateMessageTagsByFilterResponse as BulkUpdateMessageTagsByFilterResponse$1, UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest$1, UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Message { /** * Message ID. * @format GUID */ id?: string; /** * Conversation ID. * @format GUID */ conversationId?: string; /** Message sender type. */ sender?: SenderWithLiterals; /** Feedback attached to the message. Only relevant for messages sent by the AI assistant. */ feedback?: Feedback; /** * Date and time the message was created. * @readonly */ createdDate?: Date | null; /** * Date and time the message was updated. * @readonly */ updatedDate?: Date | null; /** * Revision number, which increments by 1 each time the message is updated. To prevent conflicting changes, the current revision must be passed when updating the message. * * Ignored when creating a message. * @readonly */ revision?: string | null; /** Message body. */ body?: Body; /** * ID of the message that this message is answering. * @format GUID */ answerTo?: string | null; /** Extended fields. */ extendedFields?: ExtendedFields; /** Tags. */ tags?: Tags; } declare enum Sender { /** Question sent by a Wix user. */ USER = "USER", /** Question generated by AI. */ GENERATED_BY_AI = "GENERATED_BY_AI", /** AI assistant answer. */ ASSISTANT = "ASSISTANT" } /** @enumType */ type SenderWithLiterals = Sender | 'USER' | 'GENERATED_BY_AI' | 'ASSISTANT'; interface Feedback { /** * Feedback text. * @maxLength 4096 */ text?: string | null; /** * Document attached to the feedback. * @readonly */ document?: Document; /** * Defined if there's an error attaching the document. * @maxLength 4096 * @readonly */ error?: string | null; /** Feedback type. */ type?: FeedbackTypeWithLiterals; } interface Document { /** * ID of the external document. * @maxLength 36 */ id?: string; /** * Title of the external document. * @maxLength 1000 */ title?: string; /** * Description of the external document. * @maxLength 100000 */ description?: string; /** * Tags of the external document. * @maxLength 1000 * @maxSize 10 */ tags?: string[]; /** * URL of the external document. * @maxLength 1000 */ url?: string; /** Category of the external document. */ category?: CategoryWithLiterals; /** Action to be taken when the external document is presented to the user. */ action?: ActionWithLiterals; /** Whether the external document is generated from a feedback. */ isFeedback?: boolean | null; /** Whether the external document is published. */ isPublished?: boolean | null; /** Timestamp of the last update of the external document. */ updateTs?: Date | null; /** Relevance of the external document. */ relevance?: number | null; /** Usage of the external document. */ usage?: number | null; /** Reference to a site document. */ reference?: ReferenceDocument; } /** Category of the external document. */ declare enum Category { ENRICHMENT = "ENRICHMENT", /** FEEDBACK = 2; */ RESTRICTION = "RESTRICTION" } /** @enumType */ type CategoryWithLiterals = Category | 'ENRICHMENT' | 'RESTRICTION'; /** Action to be taken when the external document is presented to the user. */ declare enum Action { NO_ANSWER = "NO_ANSWER", CONTACT = "CONTACT" } /** @enumType */ type ActionWithLiterals = Action | 'NO_ANSWER' | 'CONTACT'; /** Document for reference. */ interface ReferenceDocument { /** * ID of the document. * @maxLength 100 */ id?: string; /** * Type of the document. * @maxLength 50 */ documentType?: string; /** * Title of the document. * @maxLength 1000 */ title?: string; /** * URL of the document. * @maxLength 1000 */ url?: string; /** * Image of the document. * @maxLength 1000 */ img?: string; } declare enum FeedbackType { /** AI assistant provided relevant and correct information. */ THUMBS_UP = "THUMBS_UP", /** AI assistant didn't answer the question. */ IRRELEVANT = "IRRELEVANT", /** AI assistant provided incorrect information. */ INCORRECT = "INCORRECT", /** AI Assistant should not answer the question asked. */ SHOULD_NOT_ANSWER = "SHOULD_NOT_ANSWER", /** AI Assistant answered the question, but could be improved. */ OK_BUT = "OK_BUT", /** Other. */ OTHER = "OTHER" } /** @enumType */ type FeedbackTypeWithLiterals = FeedbackType | 'THUMBS_UP' | 'IRRELEVANT' | 'INCORRECT' | 'SHOULD_NOT_ANSWER' | 'OK_BUT' | 'OTHER'; interface Body { /** * Main text of the message. * @maxLength 4096 */ mainText?: string | null; /** * Footer text of the message. * @maxLength 4096 */ footerText?: string | null; /** * Additional data. * @maxSize 30 */ additionalData?: Record[] | null; } 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>; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface QueryMessagesRequest { /** 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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). * @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 QueryMessagesResponse { /** * List of messages. * @maxSize 1000 */ messages?: Message[]; /** Paging metadata. */ 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 AskQuestionRequest { /** Question message. */ question: Message; } interface AskQuestionResponse { /** Answer message. */ answer?: Message; } interface AddFeedbackRequest { /** * ID of the message to add feedback to. * @format GUID */ messageId: string; /** Feedback to add to the message. */ feedback: Feedback; /** Latest message revision. */ revision: string; } interface AddFeedbackResponse { /** Updated message. */ message?: Message; } interface BulkUpdateMessageTagsRequest { /** * Message IDs. Tags are updated for messages included in this list. * @minSize 1 * @maxSize 100 * @format GUID */ ids: string[] | null; /** Tags to assign. */ assignTags: Tags; /** Tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateMessageTagsResponse { /** * List of metadata for each message updated. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateMessageTagsResult[]; /** Metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ 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 BulkUpdateMessageTagsResult { /** Individual message metadata. */ itemMetadata?: ItemMetadata; } 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 BulkUpdateMessageTagsByFilterRequest { /** Filter to apply to the messages. Tags are updated for messages included in this filter. */ filter: Record | null; /** Tags to assign. */ assignTags: Tags; /** Tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateMessageTagsByFilterResponse { /** * Job ID. * @format GUID */ jobId?: string; } interface UpdateExtendedFieldsRequest { /** ID of the entity to update. */ id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** 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. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Updated message. */ message?: Message; } interface Empty { } 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 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; } 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'; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function queryMessages(): __PublicMethodMetaInfo<'POST', {}, QueryMessagesRequest$1, QueryMessagesRequest, QueryMessagesResponse$1, QueryMessagesResponse>; declare function askQuestion(): __PublicMethodMetaInfo<'POST', {}, AskQuestionRequest$1, AskQuestionRequest, AskQuestionResponse$1, AskQuestionResponse>; declare function addFeedback(): __PublicMethodMetaInfo<'POST', {}, AddFeedbackRequest$1, AddFeedbackRequest, AddFeedbackResponse$1, AddFeedbackResponse>; declare function bulkUpdateMessageTags(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateMessageTagsRequest$1, BulkUpdateMessageTagsRequest, BulkUpdateMessageTagsResponse$1, BulkUpdateMessageTagsResponse>; declare function bulkUpdateMessageTagsByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateMessageTagsByFilterRequest$1, BulkUpdateMessageTagsByFilterRequest, BulkUpdateMessageTagsByFilterResponse$1, BulkUpdateMessageTagsByFilterResponse>; declare function updateExtendedFields(): __PublicMethodMetaInfo<'POST', { id: string; }, UpdateExtendedFieldsRequest$1, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse$1, UpdateExtendedFieldsResponse>; export { type ActionEvent as ActionEventOriginal, Action as ActionOriginal, type ActionWithLiterals as ActionWithLiteralsOriginal, type AddFeedbackRequest as AddFeedbackRequestOriginal, type AddFeedbackResponse as AddFeedbackResponseOriginal, type ApplicationError as ApplicationErrorOriginal, type AskQuestionRequest as AskQuestionRequestOriginal, type AskQuestionResponse as AskQuestionResponseOriginal, type Body as BodyOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkUpdateMessageTagsByFilterRequest as BulkUpdateMessageTagsByFilterRequestOriginal, type BulkUpdateMessageTagsByFilterResponse as BulkUpdateMessageTagsByFilterResponseOriginal, type BulkUpdateMessageTagsRequest as BulkUpdateMessageTagsRequestOriginal, type BulkUpdateMessageTagsResponse as BulkUpdateMessageTagsResponseOriginal, type BulkUpdateMessageTagsResult as BulkUpdateMessageTagsResultOriginal, Category as CategoryOriginal, type CategoryWithLiterals as CategoryWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type Document as DocumentOriginal, 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 Feedback as FeedbackOriginal, FeedbackType as FeedbackTypeOriginal, type FeedbackTypeWithLiterals as FeedbackTypeWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Message as MessageOriginal, type QueryMessagesRequest as QueryMessagesRequestOriginal, type QueryMessagesResponse as QueryMessagesResponseOriginal, type ReferenceDocument as ReferenceDocumentOriginal, type RestoreInfo as RestoreInfoOriginal, Sender as SenderOriginal, type SenderWithLiterals as SenderWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TagList as TagListOriginal, type Tags as TagsOriginal, type UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequestOriginal, type UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, addFeedback, askQuestion, bulkUpdateMessageTags, bulkUpdateMessageTagsByFilter, queryMessages, updateExtendedFields };