@wix/auto_sdk_ai-site-chat_assistant-training 1.0.12 → 1.0.13

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.
@@ -0,0 +1,668 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ AddFeedbackRequest: () => AddFeedbackRequest,
34
+ AddFeedbackResponse: () => AddFeedbackResponse,
35
+ AskQuestionRequest: () => AskQuestionRequest,
36
+ AskQuestionResponse: () => AskQuestionResponse,
37
+ BulkUpdateMessageTagsByFilterRequest: () => BulkUpdateMessageTagsByFilterRequest,
38
+ BulkUpdateMessageTagsByFilterResponse: () => BulkUpdateMessageTagsByFilterResponse,
39
+ BulkUpdateMessageTagsRequest: () => BulkUpdateMessageTagsRequest,
40
+ BulkUpdateMessageTagsResponse: () => BulkUpdateMessageTagsResponse,
41
+ QueryMessagesRequest: () => QueryMessagesRequest,
42
+ QueryMessagesResponse: () => QueryMessagesResponse,
43
+ UpdateExtendedFieldsRequest: () => UpdateExtendedFieldsRequest,
44
+ UpdateExtendedFieldsResponse: () => UpdateExtendedFieldsResponse
45
+ });
46
+ module.exports = __toCommonJS(schemas_exports);
47
+
48
+ // src/innovation-playground-v2-message-assistant-training.schemas.ts
49
+ var z = __toESM(require("zod"));
50
+ var QueryMessagesRequest = z.object({
51
+ query: z.object({
52
+ filter: z.object({
53
+ _id: z.object({
54
+ $eq: z.string(),
55
+ $exists: z.boolean(),
56
+ $gt: z.string(),
57
+ $gte: z.string(),
58
+ $hasAll: z.array(z.string()),
59
+ $hasSome: z.array(z.string()),
60
+ $in: z.array(z.string()),
61
+ $lt: z.string(),
62
+ $lte: z.string(),
63
+ $ne: z.string(),
64
+ $nin: z.array(z.string()),
65
+ $startsWith: z.string()
66
+ }).partial().strict().optional(),
67
+ _createdDate: z.object({
68
+ $eq: z.string(),
69
+ $exists: z.boolean(),
70
+ $gt: z.string(),
71
+ $gte: z.string(),
72
+ $hasAll: z.array(z.string()),
73
+ $hasSome: z.array(z.string()),
74
+ $in: z.array(z.string()),
75
+ $lt: z.string(),
76
+ $lte: z.string(),
77
+ $ne: z.string(),
78
+ $nin: z.array(z.string()),
79
+ $startsWith: z.string()
80
+ }).partial().strict().optional(),
81
+ $and: z.array(z.any()).optional(),
82
+ $or: z.array(z.any()).optional(),
83
+ $not: z.any().optional()
84
+ }).strict().optional(),
85
+ sort: z.array(
86
+ z.object({
87
+ fieldName: z.enum(["_id", "_createdDate"]).optional(),
88
+ order: z.enum(["ASC", "DESC"]).optional()
89
+ })
90
+ ).optional()
91
+ }).catchall(z.any()).describe("Query options.")
92
+ });
93
+ var QueryMessagesResponse = z.object({
94
+ messages: z.array(
95
+ z.object({
96
+ _id: z.string().describe("Message ID.").regex(
97
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
98
+ "Must be a valid GUID"
99
+ ).optional(),
100
+ conversationId: z.string().describe("Conversation ID.").regex(
101
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
102
+ "Must be a valid GUID"
103
+ ).optional(),
104
+ sender: z.enum(["USER", "ASSISTANT", "GENERATED_BY_AI"]).describe("Message sender type.").optional(),
105
+ feedback: z.object({
106
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
107
+ document: z.object({
108
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
109
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
110
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
111
+ tags: z.array(z.string()).max(10).optional(),
112
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
113
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).describe("Category of the external document.").optional(),
114
+ action: z.enum(["NO_ANSWER", "CONTACT"]).describe(
115
+ "Action to be taken when the external document is presented to the user."
116
+ ).optional(),
117
+ isFeedback: z.boolean().describe(
118
+ "Whether the external document is generated from a feedback."
119
+ ).optional().nullable(),
120
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
121
+ updateTs: z.date().describe(
122
+ "Timestamp of the last update of the external document."
123
+ ).optional().nullable(),
124
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
125
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
126
+ reference: z.object({
127
+ _id: z.string().describe("ID of the document.").max(100).optional(),
128
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
129
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
130
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
131
+ img: z.string().describe("Image of the document.").max(1e3).optional()
132
+ }).describe("Reference to a site document.").optional()
133
+ }).describe("Document attached to the feedback.").optional(),
134
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
135
+ type: z.enum([
136
+ "THUMBS_UP",
137
+ "IRRELEVANT",
138
+ "INCORRECT",
139
+ "SHOULD_NOT_ANSWER",
140
+ "OK_BUT",
141
+ "OTHER"
142
+ ]).describe("Feedback type.").optional()
143
+ }).describe(
144
+ "Feedback attached to the message. Only relevant for messages sent by the AI assistant."
145
+ ).optional(),
146
+ _createdDate: z.date().describe("Date and time the message was created.").optional().nullable(),
147
+ _updatedDate: z.date().describe("Date and time the message was updated.").optional().nullable(),
148
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
149
+ "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.\n\nIgnored when creating a message."
150
+ ).optional().nullable(),
151
+ body: z.object({
152
+ mainText: z.string().describe("Main text of the message.").max(4096).optional().nullable(),
153
+ footerText: z.string().describe("Footer text of the message.").max(4096).optional().nullable(),
154
+ additionalData: z.array(z.record(z.string(), z.any())).max(30).optional()
155
+ }).describe("Message body.").optional(),
156
+ answerTo: z.string().describe("ID of the message that this message is answering.").regex(
157
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
158
+ "Must be a valid GUID"
159
+ ).optional().nullable(),
160
+ extendedFields: z.object({
161
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
162
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
163
+ ).optional()
164
+ }).describe("Extended fields.").optional(),
165
+ tags: z.object({
166
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
167
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
168
+ ).optional(),
169
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
170
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
171
+ ).optional()
172
+ }).describe("Tags.").optional()
173
+ })
174
+ ).max(1e3).optional(),
175
+ pagingMetadata: z.object({
176
+ count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
177
+ cursors: z.object({
178
+ next: z.string().describe(
179
+ "Cursor string pointing to the next page in the list of results."
180
+ ).max(16e3).optional().nullable(),
181
+ prev: z.string().describe(
182
+ "Cursor pointing to the previous page in the list of results."
183
+ ).max(16e3).optional().nullable()
184
+ }).describe(
185
+ "Cursor strings that point to the next page, previous page, or both."
186
+ ).optional(),
187
+ hasNext: z.boolean().describe(
188
+ "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."
189
+ ).optional().nullable()
190
+ }).describe("Paging metadata.").optional()
191
+ });
192
+ var AskQuestionRequest = z.object({
193
+ question: z.object({
194
+ _id: z.string().describe("Message ID.").regex(
195
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
196
+ "Must be a valid GUID"
197
+ ).optional(),
198
+ conversationId: z.string().describe("Conversation ID.").regex(
199
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
200
+ "Must be a valid GUID"
201
+ ).optional(),
202
+ sender: z.enum(["USER", "ASSISTANT", "GENERATED_BY_AI"]).optional(),
203
+ feedback: z.object({
204
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
205
+ document: z.object({
206
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
207
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
208
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
209
+ tags: z.array(z.string()).max(10).optional(),
210
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
211
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).optional(),
212
+ action: z.enum(["NO_ANSWER", "CONTACT"]).optional(),
213
+ isFeedback: z.boolean().describe(
214
+ "Whether the external document is generated from a feedback."
215
+ ).optional().nullable(),
216
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
217
+ updateTs: z.date().describe(
218
+ "Timestamp of the last update of the external document."
219
+ ).optional().nullable(),
220
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
221
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
222
+ reference: z.object({
223
+ _id: z.string().describe("ID of the document.").max(100).optional(),
224
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
225
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
226
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
227
+ img: z.string().describe("Image of the document.").max(1e3).optional()
228
+ }).describe("Reference to a site document.").optional()
229
+ }).describe("Document attached to the feedback.").optional(),
230
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
231
+ type: z.enum([
232
+ "THUMBS_UP",
233
+ "IRRELEVANT",
234
+ "INCORRECT",
235
+ "SHOULD_NOT_ANSWER",
236
+ "OK_BUT",
237
+ "OTHER"
238
+ ]).optional()
239
+ }).describe(
240
+ "Feedback attached to the message. Only relevant for messages sent by the AI assistant."
241
+ ).optional(),
242
+ _createdDate: z.date().describe("Date and time the message was created.").optional().nullable(),
243
+ _updatedDate: z.date().describe("Date and time the message was updated.").optional().nullable(),
244
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
245
+ "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.\n\nIgnored when creating a message."
246
+ ).optional().nullable(),
247
+ body: z.object({
248
+ mainText: z.string().describe("Main text of the message.").max(4096).optional().nullable(),
249
+ footerText: z.string().describe("Footer text of the message.").max(4096).optional().nullable(),
250
+ additionalData: z.array(z.record(z.string(), z.any())).max(30).optional()
251
+ }).describe("Message body.").optional(),
252
+ answerTo: z.string().describe("ID of the message that this message is answering.").regex(
253
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
254
+ "Must be a valid GUID"
255
+ ).optional().nullable(),
256
+ extendedFields: z.object({
257
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
258
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
259
+ ).optional()
260
+ }).describe("Extended fields.").optional(),
261
+ tags: z.object({
262
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
263
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
264
+ ).optional(),
265
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
266
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
267
+ ).optional()
268
+ }).describe("Tags.").optional()
269
+ }).describe("Question message.")
270
+ });
271
+ var AskQuestionResponse = z.object({
272
+ answer: z.object({
273
+ _id: z.string().describe("Message ID.").regex(
274
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
275
+ "Must be a valid GUID"
276
+ ).optional(),
277
+ conversationId: z.string().describe("Conversation ID.").regex(
278
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
279
+ "Must be a valid GUID"
280
+ ).optional(),
281
+ sender: z.enum(["USER", "ASSISTANT", "GENERATED_BY_AI"]).describe("Message sender type.").optional(),
282
+ feedback: z.object({
283
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
284
+ document: z.object({
285
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
286
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
287
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
288
+ tags: z.array(z.string()).max(10).optional(),
289
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
290
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).describe("Category of the external document.").optional(),
291
+ action: z.enum(["NO_ANSWER", "CONTACT"]).describe(
292
+ "Action to be taken when the external document is presented to the user."
293
+ ).optional(),
294
+ isFeedback: z.boolean().describe(
295
+ "Whether the external document is generated from a feedback."
296
+ ).optional().nullable(),
297
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
298
+ updateTs: z.date().describe(
299
+ "Timestamp of the last update of the external document."
300
+ ).optional().nullable(),
301
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
302
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
303
+ reference: z.object({
304
+ _id: z.string().describe("ID of the document.").max(100).optional(),
305
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
306
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
307
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
308
+ img: z.string().describe("Image of the document.").max(1e3).optional()
309
+ }).describe("Reference to a site document.").optional()
310
+ }).describe("Document attached to the feedback.").optional(),
311
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
312
+ type: z.enum([
313
+ "THUMBS_UP",
314
+ "IRRELEVANT",
315
+ "INCORRECT",
316
+ "SHOULD_NOT_ANSWER",
317
+ "OK_BUT",
318
+ "OTHER"
319
+ ]).describe("Feedback type.").optional()
320
+ }).describe(
321
+ "Feedback attached to the message. Only relevant for messages sent by the AI assistant."
322
+ ).optional(),
323
+ _createdDate: z.date().describe("Date and time the message was created.").optional().nullable(),
324
+ _updatedDate: z.date().describe("Date and time the message was updated.").optional().nullable(),
325
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
326
+ "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.\n\nIgnored when creating a message."
327
+ ).optional().nullable(),
328
+ body: z.object({
329
+ mainText: z.string().describe("Main text of the message.").max(4096).optional().nullable(),
330
+ footerText: z.string().describe("Footer text of the message.").max(4096).optional().nullable(),
331
+ additionalData: z.array(z.record(z.string(), z.any())).max(30).optional()
332
+ }).describe("Message body.").optional(),
333
+ answerTo: z.string().describe("ID of the message that this message is answering.").regex(
334
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
335
+ "Must be a valid GUID"
336
+ ).optional().nullable(),
337
+ extendedFields: z.object({
338
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
339
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
340
+ ).optional()
341
+ }).describe("Extended fields.").optional(),
342
+ tags: z.object({
343
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
344
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
345
+ ).optional(),
346
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
347
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
348
+ ).optional()
349
+ }).describe("Tags.").optional()
350
+ }).describe("Answer message.").optional()
351
+ });
352
+ var AddFeedbackRequest = z.object({
353
+ messageId: z.string().describe("ID of the message to add feedback to.").regex(
354
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
355
+ "Must be a valid GUID"
356
+ ),
357
+ options: z.object({
358
+ feedback: z.object({
359
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
360
+ document: z.object({
361
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
362
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
363
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
364
+ tags: z.array(z.string()).max(10).optional(),
365
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
366
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).optional(),
367
+ action: z.enum(["NO_ANSWER", "CONTACT"]).optional(),
368
+ isFeedback: z.boolean().describe(
369
+ "Whether the external document is generated from a feedback."
370
+ ).optional().nullable(),
371
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
372
+ updateTs: z.date().describe(
373
+ "Timestamp of the last update of the external document."
374
+ ).optional().nullable(),
375
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
376
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
377
+ reference: z.object({
378
+ _id: z.string().describe("ID of the document.").max(100).optional(),
379
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
380
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
381
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
382
+ img: z.string().describe("Image of the document.").max(1e3).optional()
383
+ }).describe("Reference to a site document.").optional()
384
+ }).describe("Document attached to the feedback.").optional(),
385
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
386
+ type: z.enum([
387
+ "THUMBS_UP",
388
+ "IRRELEVANT",
389
+ "INCORRECT",
390
+ "SHOULD_NOT_ANSWER",
391
+ "OK_BUT",
392
+ "OTHER"
393
+ ]).optional()
394
+ }).describe("Feedback to add to the message."),
395
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Latest message revision.")
396
+ })
397
+ });
398
+ var AddFeedbackResponse = z.object({
399
+ message: z.object({
400
+ _id: z.string().describe("Message ID.").regex(
401
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
402
+ "Must be a valid GUID"
403
+ ).optional(),
404
+ conversationId: z.string().describe("Conversation ID.").regex(
405
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
406
+ "Must be a valid GUID"
407
+ ).optional(),
408
+ sender: z.enum(["USER", "ASSISTANT", "GENERATED_BY_AI"]).describe("Message sender type.").optional(),
409
+ feedback: z.object({
410
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
411
+ document: z.object({
412
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
413
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
414
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
415
+ tags: z.array(z.string()).max(10).optional(),
416
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
417
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).describe("Category of the external document.").optional(),
418
+ action: z.enum(["NO_ANSWER", "CONTACT"]).describe(
419
+ "Action to be taken when the external document is presented to the user."
420
+ ).optional(),
421
+ isFeedback: z.boolean().describe(
422
+ "Whether the external document is generated from a feedback."
423
+ ).optional().nullable(),
424
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
425
+ updateTs: z.date().describe(
426
+ "Timestamp of the last update of the external document."
427
+ ).optional().nullable(),
428
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
429
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
430
+ reference: z.object({
431
+ _id: z.string().describe("ID of the document.").max(100).optional(),
432
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
433
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
434
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
435
+ img: z.string().describe("Image of the document.").max(1e3).optional()
436
+ }).describe("Reference to a site document.").optional()
437
+ }).describe("Document attached to the feedback.").optional(),
438
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
439
+ type: z.enum([
440
+ "THUMBS_UP",
441
+ "IRRELEVANT",
442
+ "INCORRECT",
443
+ "SHOULD_NOT_ANSWER",
444
+ "OK_BUT",
445
+ "OTHER"
446
+ ]).describe("Feedback type.").optional()
447
+ }).describe(
448
+ "Feedback attached to the message. Only relevant for messages sent by the AI assistant."
449
+ ).optional(),
450
+ _createdDate: z.date().describe("Date and time the message was created.").optional().nullable(),
451
+ _updatedDate: z.date().describe("Date and time the message was updated.").optional().nullable(),
452
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
453
+ "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.\n\nIgnored when creating a message."
454
+ ).optional().nullable(),
455
+ body: z.object({
456
+ mainText: z.string().describe("Main text of the message.").max(4096).optional().nullable(),
457
+ footerText: z.string().describe("Footer text of the message.").max(4096).optional().nullable(),
458
+ additionalData: z.array(z.record(z.string(), z.any())).max(30).optional()
459
+ }).describe("Message body.").optional(),
460
+ answerTo: z.string().describe("ID of the message that this message is answering.").regex(
461
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
462
+ "Must be a valid GUID"
463
+ ).optional().nullable(),
464
+ extendedFields: z.object({
465
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
466
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
467
+ ).optional()
468
+ }).describe("Extended fields.").optional(),
469
+ tags: z.object({
470
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
471
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
472
+ ).optional(),
473
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
474
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
475
+ ).optional()
476
+ }).describe("Tags.").optional()
477
+ }).describe("Updated message.").optional()
478
+ });
479
+ var BulkUpdateMessageTagsRequest = z.object({
480
+ ids: z.array(z.string()).min(1).max(100),
481
+ options: z.object({
482
+ assignTags: z.object({
483
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
484
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
485
+ ).optional(),
486
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
487
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
488
+ ).optional()
489
+ }).describe("Tags to assign."),
490
+ unassignTags: z.object({
491
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
492
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
493
+ ).optional(),
494
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
495
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
496
+ ).optional()
497
+ }).describe("Tags to unassign.").optional()
498
+ })
499
+ });
500
+ var BulkUpdateMessageTagsResponse = z.object({
501
+ results: z.array(
502
+ z.object({
503
+ itemMetadata: z.object({
504
+ _id: z.string().describe(
505
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
506
+ ).regex(
507
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
508
+ "Must be a valid GUID"
509
+ ).optional().nullable(),
510
+ originalIndex: z.number().int().describe(
511
+ "Index of the item within the request array. Allows for correlation between request and response items."
512
+ ).optional(),
513
+ success: z.boolean().describe(
514
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
515
+ ).optional(),
516
+ error: z.object({
517
+ code: z.string().describe("Error code.").optional(),
518
+ description: z.string().describe("Description of the error.").optional(),
519
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
520
+ }).describe("Details about the error in case of failure.").optional()
521
+ }).describe("Individual message metadata.").optional()
522
+ })
523
+ ).min(1).max(100).optional(),
524
+ bulkActionMetadata: z.object({
525
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
526
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
527
+ undetailedFailures: z.number().int().describe(
528
+ "Number of failures without details because detailed failure threshold was exceeded."
529
+ ).optional()
530
+ }).describe("Metadata.").optional()
531
+ });
532
+ var BulkUpdateMessageTagsByFilterRequest = z.object({
533
+ filter: z.record(z.string(), z.any()).describe(
534
+ "Filter to apply to the messages. Tags are updated for messages included in this filter."
535
+ ),
536
+ options: z.object({
537
+ assignTags: z.object({
538
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
539
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
540
+ ).optional(),
541
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
542
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
543
+ ).optional()
544
+ }).describe("Tags to assign."),
545
+ unassignTags: z.object({
546
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
547
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
548
+ ).optional(),
549
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
550
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
551
+ ).optional()
552
+ }).describe("Tags to unassign.").optional()
553
+ })
554
+ });
555
+ var BulkUpdateMessageTagsByFilterResponse = z.object({
556
+ jobId: z.string().describe("Job ID.").regex(
557
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
558
+ "Must be a valid GUID"
559
+ ).optional()
560
+ });
561
+ var UpdateExtendedFieldsRequest = z.object({
562
+ _id: z.string().describe("ID of the entity to update."),
563
+ namespace: z.string().describe(
564
+ "Identifier for the app whose extended fields are being updated."
565
+ ),
566
+ options: z.object({
567
+ namespaceData: z.record(z.string(), z.any()).describe(
568
+ "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."
569
+ )
570
+ })
571
+ });
572
+ var UpdateExtendedFieldsResponse = z.object({
573
+ message: z.object({
574
+ _id: z.string().describe("Message ID.").regex(
575
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
576
+ "Must be a valid GUID"
577
+ ).optional(),
578
+ conversationId: z.string().describe("Conversation ID.").regex(
579
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
580
+ "Must be a valid GUID"
581
+ ).optional(),
582
+ sender: z.enum(["USER", "ASSISTANT", "GENERATED_BY_AI"]).describe("Message sender type.").optional(),
583
+ feedback: z.object({
584
+ text: z.string().describe("Feedback text.").max(4096).optional().nullable(),
585
+ document: z.object({
586
+ _id: z.string().describe("ID of the external document.").max(36).optional(),
587
+ title: z.string().describe("Title of the external document.").max(1e3).optional(),
588
+ description: z.string().describe("Description of the external document.").max(1e5).optional(),
589
+ tags: z.array(z.string()).max(10).optional(),
590
+ url: z.string().describe("URL of the external document.").max(1e3).optional(),
591
+ category: z.enum(["ENRICHMENT", "RESTRICTION"]).describe("Category of the external document.").optional(),
592
+ action: z.enum(["NO_ANSWER", "CONTACT"]).describe(
593
+ "Action to be taken when the external document is presented to the user."
594
+ ).optional(),
595
+ isFeedback: z.boolean().describe(
596
+ "Whether the external document is generated from a feedback."
597
+ ).optional().nullable(),
598
+ isPublished: z.boolean().describe("Whether the external document is published.").optional().nullable(),
599
+ updateTs: z.date().describe(
600
+ "Timestamp of the last update of the external document."
601
+ ).optional().nullable(),
602
+ relevance: z.number().describe("Relevance of the external document.").optional().nullable(),
603
+ usage: z.number().int().describe("Usage of the external document.").optional().nullable(),
604
+ reference: z.object({
605
+ _id: z.string().describe("ID of the document.").max(100).optional(),
606
+ documentType: z.string().describe("Type of the document.").max(50).optional(),
607
+ title: z.string().describe("Title of the document.").max(1e3).optional(),
608
+ url: z.string().describe("URL of the document.").max(1e3).optional(),
609
+ img: z.string().describe("Image of the document.").max(1e3).optional()
610
+ }).describe("Reference to a site document.").optional()
611
+ }).describe("Document attached to the feedback.").optional(),
612
+ error: z.string().describe("Defined if there's an error attaching the document.").max(4096).optional().nullable(),
613
+ type: z.enum([
614
+ "THUMBS_UP",
615
+ "IRRELEVANT",
616
+ "INCORRECT",
617
+ "SHOULD_NOT_ANSWER",
618
+ "OK_BUT",
619
+ "OTHER"
620
+ ]).describe("Feedback type.").optional()
621
+ }).describe(
622
+ "Feedback attached to the message. Only relevant for messages sent by the AI assistant."
623
+ ).optional(),
624
+ _createdDate: z.date().describe("Date and time the message was created.").optional().nullable(),
625
+ _updatedDate: z.date().describe("Date and time the message was updated.").optional().nullable(),
626
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
627
+ "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.\n\nIgnored when creating a message."
628
+ ).optional().nullable(),
629
+ body: z.object({
630
+ mainText: z.string().describe("Main text of the message.").max(4096).optional().nullable(),
631
+ footerText: z.string().describe("Footer text of the message.").max(4096).optional().nullable(),
632
+ additionalData: z.array(z.record(z.string(), z.any())).max(30).optional()
633
+ }).describe("Message body.").optional(),
634
+ answerTo: z.string().describe("ID of the message that this message is answering.").regex(
635
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
636
+ "Must be a valid GUID"
637
+ ).optional().nullable(),
638
+ extendedFields: z.object({
639
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
640
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
641
+ ).optional()
642
+ }).describe("Extended fields.").optional(),
643
+ tags: z.object({
644
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
645
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
646
+ ).optional(),
647
+ tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
648
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
649
+ ).optional()
650
+ }).describe("Tags.").optional()
651
+ }).describe("Updated message.").optional()
652
+ });
653
+ // Annotate the CommonJS export names for ESM import in node:
654
+ 0 && (module.exports = {
655
+ AddFeedbackRequest,
656
+ AddFeedbackResponse,
657
+ AskQuestionRequest,
658
+ AskQuestionResponse,
659
+ BulkUpdateMessageTagsByFilterRequest,
660
+ BulkUpdateMessageTagsByFilterResponse,
661
+ BulkUpdateMessageTagsRequest,
662
+ BulkUpdateMessageTagsResponse,
663
+ QueryMessagesRequest,
664
+ QueryMessagesResponse,
665
+ UpdateExtendedFieldsRequest,
666
+ UpdateExtendedFieldsResponse
667
+ });
668
+ //# sourceMappingURL=schemas.js.map