@wix/auto_sdk_ai-site-chat_assistant-training 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.d.ts +10 -0
  11. package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.js +19 -0
  12. package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.js.map +1 -0
  13. package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.d.ts +44 -0
  14. package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.js +247 -0
  15. package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.js.map +1 -0
  16. package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.d.ts +20 -0
  17. package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.js +142 -0
  18. package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.js.map +1 -0
  19. package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.d.ts +77 -0
  20. package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.js +49 -0
  21. package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.js.map +1 -0
  22. package/build/cjs/src/innovation-playground-v2-message-assistant-training.types.d.ts +510 -0
  23. package/build/cjs/src/innovation-playground-v2-message-assistant-training.types.js +58 -0
  24. package/build/cjs/src/innovation-playground-v2-message-assistant-training.types.js.map +1 -0
  25. package/build/cjs/src/innovation-playground-v2-message-assistant-training.universal.d.ts +742 -0
  26. package/build/cjs/src/innovation-playground-v2-message-assistant-training.universal.js +397 -0
  27. package/build/cjs/src/innovation-playground-v2-message-assistant-training.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/innovation-playground-v2-message-assistant-training.context.d.ts +10 -0
  39. package/build/es/src/innovation-playground-v2-message-assistant-training.context.js +10 -0
  40. package/build/es/src/innovation-playground-v2-message-assistant-training.context.js.map +1 -0
  41. package/build/es/src/innovation-playground-v2-message-assistant-training.http.d.ts +44 -0
  42. package/build/es/src/innovation-playground-v2-message-assistant-training.http.js +238 -0
  43. package/build/es/src/innovation-playground-v2-message-assistant-training.http.js.map +1 -0
  44. package/build/es/src/innovation-playground-v2-message-assistant-training.meta.d.ts +20 -0
  45. package/build/es/src/innovation-playground-v2-message-assistant-training.meta.js +110 -0
  46. package/build/es/src/innovation-playground-v2-message-assistant-training.meta.js.map +1 -0
  47. package/build/es/src/innovation-playground-v2-message-assistant-training.public.d.ts +77 -0
  48. package/build/es/src/innovation-playground-v2-message-assistant-training.public.js +34 -0
  49. package/build/es/src/innovation-playground-v2-message-assistant-training.public.js.map +1 -0
  50. package/build/es/src/innovation-playground-v2-message-assistant-training.types.d.ts +510 -0
  51. package/build/es/src/innovation-playground-v2-message-assistant-training.types.js +55 -0
  52. package/build/es/src/innovation-playground-v2-message-assistant-training.types.js.map +1 -0
  53. package/build/es/src/innovation-playground-v2-message-assistant-training.universal.d.ts +742 -0
  54. package/build/es/src/innovation-playground-v2-message-assistant-training.universal.js +365 -0
  55. package/build/es/src/innovation-playground-v2-message-assistant-training.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.d.ts +10 -0
  66. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.js +19 -0
  67. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.js.map +1 -0
  68. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.d.ts +44 -0
  69. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.js +247 -0
  70. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.js.map +1 -0
  71. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.d.ts +20 -0
  72. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.js +142 -0
  73. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.js.map +1 -0
  74. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.d.ts +77 -0
  75. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.js +49 -0
  76. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.js.map +1 -0
  77. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.d.ts +510 -0
  78. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.js +58 -0
  79. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.js.map +1 -0
  80. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.d.ts +742 -0
  81. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.js +397 -0
  82. package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.d.ts +10 -0
  93. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.js +10 -0
  94. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.js.map +1 -0
  95. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.d.ts +44 -0
  96. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.js +238 -0
  97. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.js.map +1 -0
  98. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.d.ts +20 -0
  99. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.js +110 -0
  100. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.js.map +1 -0
  101. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.d.ts +77 -0
  102. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.js +34 -0
  103. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.js.map +1 -0
  104. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.types.d.ts +510 -0
  105. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.types.js +55 -0
  106. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.types.js.map +1 -0
  107. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.d.ts +742 -0
  108. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.js +365 -0
  109. package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,742 @@
1
+ export interface Message {
2
+ /** Message ID. */
3
+ _id?: string;
4
+ /** Conversation ID. */
5
+ conversationId?: string;
6
+ /** Message sender type. */
7
+ sender?: Sender;
8
+ /** Feedback attached to the message. Only relevant for messages sent by the AI assistant. */
9
+ feedback?: Feedback;
10
+ /**
11
+ * Date and time the message was created.
12
+ * @readonly
13
+ */
14
+ _createdDate?: Date | null;
15
+ /**
16
+ * Date and time the message was updated.
17
+ * @readonly
18
+ */
19
+ _updatedDate?: Date | null;
20
+ /**
21
+ * 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.
22
+ *
23
+ * Ignored when creating a message.
24
+ * @readonly
25
+ */
26
+ revision?: string | null;
27
+ /** Message body. */
28
+ body?: Body;
29
+ /** ID of the message that this message is answering. */
30
+ answerTo?: string | null;
31
+ /** Extended fields. */
32
+ extendedFields?: ExtendedFields;
33
+ /** Tags. */
34
+ tags?: Tags;
35
+ }
36
+ export declare enum Sender {
37
+ /** Unknown sender type. */
38
+ UNKNOWN_SENDER = "UNKNOWN_SENDER",
39
+ /** Wix user. For example, a site admin. */
40
+ USER = "USER",
41
+ /** AI assistant. */
42
+ ASSISTANT = "ASSISTANT"
43
+ }
44
+ export interface Feedback {
45
+ /** Feedback text. */
46
+ text?: string | null;
47
+ /**
48
+ * Document attached to the feedback.
49
+ * @readonly
50
+ */
51
+ document?: Document;
52
+ /**
53
+ * Defined if there's an error attaching the document.
54
+ * @readonly
55
+ */
56
+ error?: string | null;
57
+ /** Feedback type. */
58
+ type?: FeedbackType;
59
+ }
60
+ export interface Document {
61
+ /** ID of the external document. */
62
+ _id?: string;
63
+ /** Title of the external document. */
64
+ title?: string;
65
+ /** Description of the external document. */
66
+ description?: string;
67
+ /** Tags of the external document. */
68
+ tags?: string[];
69
+ /** URL of the external document. */
70
+ url?: string;
71
+ /** Category of the external document. */
72
+ category?: Category;
73
+ /** Action to be taken when the external document is presented to the user. */
74
+ action?: Action;
75
+ /** Whether the external document is generated from a feedback. */
76
+ isFeedback?: boolean | null;
77
+ /** Whether the external document is published. */
78
+ isPublished?: boolean | null;
79
+ /** Timestamp of the last update of the external document. */
80
+ updateTs?: Date | null;
81
+ /** Relevance of the external document. */
82
+ relevance?: number | null;
83
+ /** Usage of the external document. */
84
+ usage?: number | null;
85
+ }
86
+ /** Category of the external document. */
87
+ export declare enum Category {
88
+ NO_CATEGORY = "NO_CATEGORY",
89
+ ENRICHMENT = "ENRICHMENT",
90
+ /** FEEDBACK = 2; */
91
+ RESTRICTION = "RESTRICTION"
92
+ }
93
+ /** Action to be taken when the external document is presented to the user. */
94
+ export declare enum Action {
95
+ NO_ACTION = "NO_ACTION",
96
+ NO_ANSWER = "NO_ANSWER",
97
+ CONTACT = "CONTACT"
98
+ }
99
+ export declare enum FeedbackType {
100
+ /** Unknown feedback type. */
101
+ UNKNOWN = "UNKNOWN",
102
+ /** AI assistant provided relevant and correct information. */
103
+ THUMBS_UP = "THUMBS_UP",
104
+ /** AI assistant didn't answer the question. */
105
+ IRRELEVANT = "IRRELEVANT",
106
+ /** AI assistant provided incorrect information. */
107
+ INCORRECT = "INCORRECT",
108
+ /** AI Assistant should not answer the question asked. */
109
+ SHOULD_NOT_ANSWER = "SHOULD_NOT_ANSWER",
110
+ /** AI Assistant answered the question, but could be improved. */
111
+ OK_BUT = "OK_BUT",
112
+ /** Other. */
113
+ OTHER = "OTHER"
114
+ }
115
+ export interface Body {
116
+ /** Main text of the message. */
117
+ mainText?: string | null;
118
+ /** Footer text of the message. */
119
+ footerText?: string | null;
120
+ /** Additional data. */
121
+ additionalData?: Record<string, any>[] | null;
122
+ }
123
+ export interface ExtendedFields {
124
+ /**
125
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
126
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
127
+ *
128
+ * You can only access fields for which you have the appropriate permissions.
129
+ *
130
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
131
+ */
132
+ namespaces?: Record<string, Record<string, any>>;
133
+ }
134
+ /**
135
+ * Common object for tags.
136
+ * Should be use as in this example:
137
+ * message Foo {
138
+ * string id = 1;
139
+ * ...
140
+ * Tags tags = 5
141
+ * }
142
+ *
143
+ * example of taggable entity
144
+ * {
145
+ * id: "123"
146
+ * tags: {
147
+ * tags: {
148
+ * tag_ids:["11","22"]
149
+ * },
150
+ * private_tags: {
151
+ * tag_ids: ["33", "44"]
152
+ * }
153
+ * }
154
+ * }
155
+ */
156
+ export interface Tags {
157
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
158
+ privateTags?: TagList;
159
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
160
+ tags?: TagList;
161
+ }
162
+ export interface TagList {
163
+ /** List of tag IDs */
164
+ tagIds?: string[];
165
+ }
166
+ export interface QueryMessagesRequest {
167
+ /** WQL expression. */
168
+ query?: CursorQuery;
169
+ }
170
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
171
+ /**
172
+ * Cursor paging options.
173
+ *
174
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
175
+ */
176
+ cursorPaging?: CursorPaging;
177
+ /**
178
+ * Filter object.
179
+ *
180
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
181
+ */
182
+ filter?: Record<string, any> | null;
183
+ /**
184
+ * Sort object.
185
+ *
186
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
187
+ */
188
+ sort?: Sorting[];
189
+ }
190
+ /** @oneof */
191
+ export interface CursorQueryPagingMethodOneOf {
192
+ /**
193
+ * Cursor paging options.
194
+ *
195
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
196
+ */
197
+ cursorPaging?: CursorPaging;
198
+ }
199
+ export interface Sorting {
200
+ /** Name of the field to sort by. */
201
+ fieldName?: string;
202
+ /** Sort order. */
203
+ order?: SortOrder;
204
+ }
205
+ export declare enum SortOrder {
206
+ ASC = "ASC",
207
+ DESC = "DESC"
208
+ }
209
+ export interface CursorPaging {
210
+ /** Maximum number of items to return in the results. */
211
+ limit?: number | null;
212
+ /**
213
+ * Pointer to the next or previous page in the list of results.
214
+ *
215
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
216
+ * Not relevant for the first request.
217
+ */
218
+ cursor?: string | null;
219
+ }
220
+ export interface QueryMessagesResponse {
221
+ /**
222
+ * Messages type.
223
+ *
224
+ */
225
+ messages?: Message[];
226
+ /** Paging metadata. */
227
+ pagingMetadata?: CursorPagingMetadata;
228
+ }
229
+ export interface CursorPagingMetadata {
230
+ /** Number of items returned in current page. */
231
+ count?: number | null;
232
+ /** Cursor strings that point to the next page, previous page, or both. */
233
+ cursors?: Cursors;
234
+ /**
235
+ * Whether there are more pages to retrieve following the current page.
236
+ *
237
+ * + `true`: Another page of results can be retrieved.
238
+ * + `false`: This is the last page.
239
+ */
240
+ hasNext?: boolean | null;
241
+ }
242
+ export interface Cursors {
243
+ /** Cursor string pointing to the next page in the list of results. */
244
+ next?: string | null;
245
+ /** Cursor pointing to the previous page in the list of results. */
246
+ prev?: string | null;
247
+ }
248
+ export interface AskQuestionRequest {
249
+ /** Question message. */
250
+ question: Message;
251
+ }
252
+ export interface AskQuestionResponse {
253
+ /** Answer message. */
254
+ answer?: Message;
255
+ }
256
+ export interface AddFeedbackRequest {
257
+ /** ID of the message to add feedback to. */
258
+ messageId: string;
259
+ /** Feedback to add to the message. */
260
+ feedback: Feedback;
261
+ /** Latest message revision. */
262
+ revision: string;
263
+ }
264
+ export interface AddFeedbackResponse {
265
+ /** Updated message. */
266
+ message?: Message;
267
+ }
268
+ export interface BulkUpdateMessageTagsRequest {
269
+ /** Message IDs. Tags are updated for messages included in this list. */
270
+ ids: string[] | null;
271
+ /** Tags to assign. */
272
+ assignTags: Tags;
273
+ /** Tags to unassign. */
274
+ unassignTags?: Tags;
275
+ }
276
+ export interface BulkUpdateMessageTagsResponse {
277
+ /** List of metadata for each message updated. */
278
+ results?: BulkUpdateMessageTagsResult[];
279
+ /** Metadata. */
280
+ bulkActionMetadata?: BulkActionMetadata;
281
+ }
282
+ export interface ItemMetadata {
283
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
284
+ _id?: string | null;
285
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
286
+ originalIndex?: number;
287
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
288
+ success?: boolean;
289
+ /** Details about the error in case of failure. */
290
+ error?: ApplicationError;
291
+ }
292
+ export interface ApplicationError {
293
+ /** Error code. */
294
+ code?: string;
295
+ /** Description of the error. */
296
+ description?: string;
297
+ /** Data related to the error. */
298
+ data?: Record<string, any> | null;
299
+ }
300
+ export interface BulkUpdateMessageTagsResult {
301
+ /** Individual message metadata. */
302
+ itemMetadata?: ItemMetadata;
303
+ }
304
+ export interface BulkActionMetadata {
305
+ /** Number of items that were successfully processed. */
306
+ totalSuccesses?: number;
307
+ /** Number of items that couldn't be processed. */
308
+ totalFailures?: number;
309
+ /** Number of failures without details because detailed failure threshold was exceeded. */
310
+ undetailedFailures?: number;
311
+ }
312
+ export interface BulkUpdateMessageTagsByFilterRequest {
313
+ /** Filter to apply to the messages. Tags are updated for messages included in this filter. */
314
+ filter: Record<string, any> | null;
315
+ /** Tags to assign. */
316
+ assignTags: Tags;
317
+ /** Tags to unassign. */
318
+ unassignTags?: Tags;
319
+ }
320
+ export interface BulkUpdateMessageTagsByFilterResponse {
321
+ /** Job ID. */
322
+ jobId?: string;
323
+ }
324
+ export interface UpdateExtendedFieldsRequest {
325
+ /** ID of the entity to update. */
326
+ _id: string;
327
+ /** Identifier for the app whose extended fields are being updated. */
328
+ namespace: string;
329
+ /** 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. */
330
+ namespaceData: Record<string, any> | null;
331
+ }
332
+ export interface UpdateExtendedFieldsResponse {
333
+ /** Updated message. */
334
+ message?: Message;
335
+ }
336
+ export interface Empty {
337
+ }
338
+ export interface DomainEvent extends DomainEventBodyOneOf {
339
+ createdEvent?: EntityCreatedEvent;
340
+ updatedEvent?: EntityUpdatedEvent;
341
+ deletedEvent?: EntityDeletedEvent;
342
+ actionEvent?: ActionEvent;
343
+ /**
344
+ * Unique event ID.
345
+ * Allows clients to ignore duplicate webhooks.
346
+ */
347
+ _id?: string;
348
+ /**
349
+ * Assumes actions are also always typed to an entity_type
350
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
351
+ */
352
+ entityFqdn?: string;
353
+ /**
354
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
355
+ * This is although the created/updated/deleted notion is duplication of the oneof types
356
+ * Example: created/updated/deleted/started/completed/email_opened
357
+ */
358
+ slug?: string;
359
+ /** ID of the entity associated with the event. */
360
+ entityId?: string;
361
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
362
+ eventTime?: Date | null;
363
+ /**
364
+ * Whether the event was triggered as a result of a privacy regulation application
365
+ * (for example, GDPR).
366
+ */
367
+ triggeredByAnonymizeRequest?: boolean | null;
368
+ /** If present, indicates the action that triggered the event. */
369
+ originatedFrom?: string | null;
370
+ /**
371
+ * A sequence number defining the order of updates to the underlying entity.
372
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
373
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
374
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
375
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
376
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
377
+ */
378
+ entityEventSequence?: string | null;
379
+ }
380
+ /** @oneof */
381
+ export interface DomainEventBodyOneOf {
382
+ createdEvent?: EntityCreatedEvent;
383
+ updatedEvent?: EntityUpdatedEvent;
384
+ deletedEvent?: EntityDeletedEvent;
385
+ actionEvent?: ActionEvent;
386
+ }
387
+ export interface EntityCreatedEvent {
388
+ entity?: string;
389
+ }
390
+ export interface RestoreInfo {
391
+ deletedDate?: Date | null;
392
+ }
393
+ export interface EntityUpdatedEvent {
394
+ /**
395
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
396
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
397
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
398
+ */
399
+ currentEntity?: string;
400
+ }
401
+ export interface EntityDeletedEvent {
402
+ /** Entity that was deleted */
403
+ deletedEntity?: string | null;
404
+ }
405
+ export interface ActionEvent {
406
+ body?: string;
407
+ }
408
+ export interface MessageEnvelope {
409
+ /** App instance ID. */
410
+ instanceId?: string | null;
411
+ /** Event type. */
412
+ eventType?: string;
413
+ /** The identification type and identity data. */
414
+ identity?: IdentificationData;
415
+ /** Stringify payload. */
416
+ data?: string;
417
+ }
418
+ export interface IdentificationData extends IdentificationDataIdOneOf {
419
+ /** ID of a site visitor that has not logged in to the site. */
420
+ anonymousVisitorId?: string;
421
+ /** ID of a site visitor that has logged in to the site. */
422
+ memberId?: string;
423
+ /** ID of a Wix user (site owner, contributor, etc.). */
424
+ wixUserId?: string;
425
+ /** ID of an app. */
426
+ appId?: string;
427
+ /** @readonly */
428
+ identityType?: WebhookIdentityType;
429
+ }
430
+ /** @oneof */
431
+ export interface IdentificationDataIdOneOf {
432
+ /** ID of a site visitor that has not logged in to the site. */
433
+ anonymousVisitorId?: string;
434
+ /** ID of a site visitor that has logged in to the site. */
435
+ memberId?: string;
436
+ /** ID of a Wix user (site owner, contributor, etc.). */
437
+ wixUserId?: string;
438
+ /** ID of an app. */
439
+ appId?: string;
440
+ }
441
+ export declare enum WebhookIdentityType {
442
+ UNKNOWN = "UNKNOWN",
443
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
444
+ MEMBER = "MEMBER",
445
+ WIX_USER = "WIX_USER",
446
+ APP = "APP"
447
+ }
448
+ interface DocumentNonNullableFields {
449
+ _id: string;
450
+ title: string;
451
+ description: string;
452
+ tags: string[];
453
+ url: string;
454
+ category: Category;
455
+ action: Action;
456
+ }
457
+ interface FeedbackNonNullableFields {
458
+ document?: DocumentNonNullableFields;
459
+ type: FeedbackType;
460
+ }
461
+ interface TagListNonNullableFields {
462
+ tagIds: string[];
463
+ }
464
+ interface TagsNonNullableFields {
465
+ privateTags?: TagListNonNullableFields;
466
+ tags?: TagListNonNullableFields;
467
+ }
468
+ interface MessageNonNullableFields {
469
+ _id: string;
470
+ conversationId: string;
471
+ sender: Sender;
472
+ feedback?: FeedbackNonNullableFields;
473
+ tags?: TagsNonNullableFields;
474
+ }
475
+ export interface QueryMessagesResponseNonNullableFields {
476
+ messages: MessageNonNullableFields[];
477
+ }
478
+ export interface AskQuestionResponseNonNullableFields {
479
+ answer?: MessageNonNullableFields;
480
+ }
481
+ export interface AddFeedbackResponseNonNullableFields {
482
+ message?: MessageNonNullableFields;
483
+ }
484
+ interface ApplicationErrorNonNullableFields {
485
+ code: string;
486
+ description: string;
487
+ }
488
+ interface ItemMetadataNonNullableFields {
489
+ originalIndex: number;
490
+ success: boolean;
491
+ error?: ApplicationErrorNonNullableFields;
492
+ }
493
+ interface BulkUpdateMessageTagsResultNonNullableFields {
494
+ itemMetadata?: ItemMetadataNonNullableFields;
495
+ }
496
+ interface BulkActionMetadataNonNullableFields {
497
+ totalSuccesses: number;
498
+ totalFailures: number;
499
+ undetailedFailures: number;
500
+ }
501
+ export interface BulkUpdateMessageTagsResponseNonNullableFields {
502
+ results: BulkUpdateMessageTagsResultNonNullableFields[];
503
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
504
+ }
505
+ export interface BulkUpdateMessageTagsByFilterResponseNonNullableFields {
506
+ jobId: string;
507
+ }
508
+ export interface UpdateExtendedFieldsResponseNonNullableFields {
509
+ message?: MessageNonNullableFields;
510
+ }
511
+ /**
512
+ * Creates a query to retrieve a list of messages.
513
+ * The `queryMessages()` function builds a query to retrieve a list of messages and returns a `MessagesQueryBuilder` object.
514
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
515
+ * You can refine the query by chaining `MessagesQueryBuilder` functions onto the query. `MessagesQueryBuilder` functions enable you to sort, filter, and control the results `queryMessages()` returns.
516
+ * `queryMessages()` runs with these `MessagesQueryBuilder` defaults, which you can override:
517
+ *
518
+ * *`skip(0)`
519
+ * * `limit(50)`
520
+ * * `ascending("createdDate")`
521
+ *
522
+ * The functions that are chained to `queryMessages()` are applied in the order they are called. For example, if you apply `ascending('createdDate')` and then `descending('id')`, the results are sorted first by the created date, and then, if there are multiple results with the same created date, the messages are sorted by ID.
523
+ *
524
+ * ## Supported Filters and Sorting
525
+ *
526
+ * | Field | Supported Filters | Sortable |
527
+ * |----------------|------------------------------------------------------------------------------------------|-----------|
528
+ * | `id` | [All operators](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#operators). | Sortable |
529
+ * | `createdDate` | [All operators](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#operators). | Sortable |
530
+ * @public
531
+ * @documentationMaturity preview
532
+ * @permissionScope Manage Bookings Services and Settings
533
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
534
+ * @permissionScope Manage Portfolio
535
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
536
+ * @permissionScope Manage Restaurants - all permissions
537
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
538
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
539
+ * @applicableIdentity APP
540
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.QueryMessages
541
+ */
542
+ export declare function queryMessages(): MessagesQueryBuilder;
543
+ interface QueryCursorResult {
544
+ cursors: Cursors;
545
+ hasNext: () => boolean;
546
+ hasPrev: () => boolean;
547
+ length: number;
548
+ pageSize: number;
549
+ }
550
+ export interface MessagesQueryResult extends QueryCursorResult {
551
+ items: Message[];
552
+ query: MessagesQueryBuilder;
553
+ next: () => Promise<MessagesQueryResult>;
554
+ prev: () => Promise<MessagesQueryResult>;
555
+ }
556
+ export interface MessagesQueryBuilder {
557
+ /** @param propertyName - Property whose value is compared with `value`.
558
+ * @param value - Value to compare against.
559
+ * @documentationMaturity preview
560
+ */
561
+ eq: (propertyName: '_id' | '_createdDate', value: any) => MessagesQueryBuilder;
562
+ /** @param propertyName - Property whose value is compared with `value`.
563
+ * @param value - Value to compare against.
564
+ * @documentationMaturity preview
565
+ */
566
+ ne: (propertyName: '_id' | '_createdDate', value: any) => MessagesQueryBuilder;
567
+ /** @param propertyName - Property whose value is compared with `value`.
568
+ * @param value - Value to compare against.
569
+ * @documentationMaturity preview
570
+ */
571
+ ge: (propertyName: '_createdDate', value: any) => MessagesQueryBuilder;
572
+ /** @param propertyName - Property whose value is compared with `value`.
573
+ * @param value - Value to compare against.
574
+ * @documentationMaturity preview
575
+ */
576
+ gt: (propertyName: '_createdDate', value: any) => MessagesQueryBuilder;
577
+ /** @param propertyName - Property whose value is compared with `value`.
578
+ * @param value - Value to compare against.
579
+ * @documentationMaturity preview
580
+ */
581
+ le: (propertyName: '_createdDate', value: any) => MessagesQueryBuilder;
582
+ /** @param propertyName - Property whose value is compared with `value`.
583
+ * @param value - Value to compare against.
584
+ * @documentationMaturity preview
585
+ */
586
+ lt: (propertyName: '_createdDate', value: any) => MessagesQueryBuilder;
587
+ /** @param propertyName - Property whose value is compared with `string`.
588
+ * @param string - String to compare against. Case-insensitive.
589
+ * @documentationMaturity preview
590
+ */
591
+ startsWith: (propertyName: '_id', value: string) => MessagesQueryBuilder;
592
+ /** @param propertyName - Property whose value is compared with `values`.
593
+ * @param values - List of values to compare against.
594
+ * @documentationMaturity preview
595
+ */
596
+ hasSome: (propertyName: '_id' | '_createdDate', value: any[]) => MessagesQueryBuilder;
597
+ /** @documentationMaturity preview */
598
+ in: (propertyName: '_id' | '_createdDate', value: any) => MessagesQueryBuilder;
599
+ /** @documentationMaturity preview */
600
+ exists: (propertyName: '_id' | '_createdDate', value: boolean) => MessagesQueryBuilder;
601
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
602
+ * @documentationMaturity preview
603
+ */
604
+ ascending: (...propertyNames: Array<'_id' | '_createdDate'>) => MessagesQueryBuilder;
605
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
606
+ * @documentationMaturity preview
607
+ */
608
+ descending: (...propertyNames: Array<'_id' | '_createdDate'>) => MessagesQueryBuilder;
609
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
610
+ * @documentationMaturity preview
611
+ */
612
+ limit: (limit: number) => MessagesQueryBuilder;
613
+ /** @param cursor - A pointer to specific record
614
+ * @documentationMaturity preview
615
+ */
616
+ skipTo: (cursor: string) => MessagesQueryBuilder;
617
+ /** @documentationMaturity preview */
618
+ find: () => Promise<MessagesQueryResult>;
619
+ }
620
+ /**
621
+ * Asks a question to the AI Assistant.
622
+ *
623
+ * This method creates and sends a message from a Wix user.
624
+ * @param question - Question message.
625
+ * @public
626
+ * @documentationMaturity preview
627
+ * @requiredField question
628
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
629
+ * @permissionScope Manage Bookings Services and Settings
630
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
631
+ * @permissionScope Manage Portfolio
632
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
633
+ * @permissionScope Manage Restaurants - all permissions
634
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
635
+ * @applicableIdentity APP
636
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.AskQuestion
637
+ */
638
+ export declare function askQuestion(question: Message): Promise<AskQuestionResponse & AskQuestionResponseNonNullableFields>;
639
+ /**
640
+ * Adds feedback to a message.
641
+ * @param messageId - ID of the message to add feedback to.
642
+ * @public
643
+ * @documentationMaturity preview
644
+ * @requiredField messageId
645
+ * @requiredField options
646
+ * @requiredField options.feedback
647
+ * @requiredField options.revision
648
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
649
+ * @permissionScope Manage Bookings Services and Settings
650
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
651
+ * @permissionScope Manage Portfolio
652
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
653
+ * @permissionScope Manage Restaurants - all permissions
654
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
655
+ * @applicableIdentity APP
656
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.AddFeedback
657
+ */
658
+ export declare function addFeedback(messageId: string, options: AddFeedbackOptions): Promise<AddFeedbackResponse & AddFeedbackResponseNonNullableFields>;
659
+ export interface AddFeedbackOptions {
660
+ /** Feedback to add to the message. */
661
+ feedback: Feedback;
662
+ /** Latest message revision. */
663
+ revision: string;
664
+ }
665
+ /**
666
+ * Synchronously updates tags on a list of messages, specified using the messages' IDs.
667
+ *
668
+ * If a tag appears in both `assignTags` and `unassignTags`, it is assigned.
669
+ * @param ids - Message IDs. Tags are updated for messages included in this list.
670
+ * @public
671
+ * @documentationMaturity preview
672
+ * @requiredField ids
673
+ * @requiredField options.assignTags
674
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
675
+ * @permissionScope Manage Bookings Services and Settings
676
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
677
+ * @permissionScope Manage Portfolio
678
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
679
+ * @permissionScope Manage Restaurants - all permissions
680
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
681
+ * @applicableIdentity APP
682
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.BulkUpdateMessageTags
683
+ */
684
+ export declare function bulkUpdateMessageTags(ids: string[] | null, options?: BulkUpdateMessageTagsOptions): Promise<BulkUpdateMessageTagsResponse & BulkUpdateMessageTagsResponseNonNullableFields>;
685
+ export interface BulkUpdateMessageTagsOptions {
686
+ /** Tags to assign. */
687
+ assignTags: Tags;
688
+ /** Tags to unassign. */
689
+ unassignTags?: Tags;
690
+ }
691
+ /**
692
+ * Asynchronously updates tags on a list of messages, specified by applying a filter to all messages. If a filter is not specified, this method updates all messages.
693
+ *
694
+ * If a tag appears in both `assignTags` and `unassignTags`, it is assigned.
695
+ * @param filter - Filter to apply to the messages. Tags are updated for messages included in this filter.
696
+ * @public
697
+ * @documentationMaturity preview
698
+ * @requiredField filter
699
+ * @requiredField options.assignTags
700
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
701
+ * @permissionScope Manage Bookings Services and Settings
702
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
703
+ * @permissionScope Manage Portfolio
704
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
705
+ * @permissionScope Manage Restaurants - all permissions
706
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
707
+ * @applicableIdentity APP
708
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.BulkUpdateMessageTagsByFilter
709
+ */
710
+ export declare function bulkUpdateMessageTagsByFilter(filter: Record<string, any> | null, options?: BulkUpdateMessageTagsByFilterOptions): Promise<BulkUpdateMessageTagsByFilterResponse & BulkUpdateMessageTagsByFilterResponseNonNullableFields>;
711
+ export interface BulkUpdateMessageTagsByFilterOptions {
712
+ /** Tags to assign. */
713
+ assignTags: Tags;
714
+ /** Tags to unassign. */
715
+ unassignTags?: Tags;
716
+ }
717
+ /**
718
+ * Updates extended fields. This method does not increment the revision.
719
+ * @param _id - ID of the entity to update.
720
+ * @param namespace - Identifier for the app whose extended fields are being updated.
721
+ * @public
722
+ * @documentationMaturity preview
723
+ * @requiredField _id
724
+ * @requiredField namespace
725
+ * @requiredField options
726
+ * @requiredField options.namespaceData
727
+ * @permissionId INNOVATION_LAB.WIX_ASSISTANT
728
+ * @permissionScope Manage Bookings Services and Settings
729
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
730
+ * @permissionScope Manage Portfolio
731
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
732
+ * @permissionScope Manage Restaurants - all permissions
733
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
734
+ * @applicableIdentity APP
735
+ * @fqn wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.UpdateExtendedFields
736
+ */
737
+ export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
738
+ export interface UpdateExtendedFieldsOptions {
739
+ /** 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. */
740
+ namespaceData: Record<string, any> | null;
741
+ }
742
+ export {};