@wix/auto_sdk_ai-site-chat_assistant-training 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +90 -1
- package/build/cjs/index.js +580 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +799 -1
- package/build/cjs/index.typings.js +523 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +475 -1
- package/build/cjs/meta.js +381 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +90 -0
- package/build/es/index.mjs +548 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.d.ts → es/index.typings.d.mts} +145 -217
- package/build/es/index.typings.mjs +491 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/{internal/es/src/innovation-playground-v2-message-assistant-training.types.d.ts → es/meta.d.mts} +106 -248
- package/build/es/meta.mjs +352 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +90 -1
- package/build/internal/cjs/index.js +580 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +799 -1
- package/build/internal/cjs/index.typings.js +523 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +475 -1
- package/build/internal/cjs/meta.js +381 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +90 -0
- package/build/internal/es/index.mjs +548 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/{cjs/src/innovation-playground-v2-message-assistant-training.universal.d.ts → internal/es/index.typings.d.mts} +145 -217
- package/build/internal/es/index.typings.mjs +491 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{cjs/src/innovation-playground-v2-message-assistant-training.types.d.ts → internal/es/meta.d.mts} +106 -248
- package/build/internal/es/meta.mjs +352 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.d.ts +0 -10
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.js +0 -19
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.context.js.map +0 -1
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.d.ts +0 -44
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.js +0 -247
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.http.js.map +0 -1
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.d.ts +0 -20
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.js +0 -142
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.meta.js.map +0 -1
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.d.ts +0 -77
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.js +0 -49
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.public.js.map +0 -1
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.types.js +0 -58
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.types.js.map +0 -1
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.universal.js +0 -421
- package/build/cjs/src/innovation-playground-v2-message-assistant-training.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.context.d.ts +0 -10
- package/build/es/src/innovation-playground-v2-message-assistant-training.context.js +0 -10
- package/build/es/src/innovation-playground-v2-message-assistant-training.context.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.http.d.ts +0 -44
- package/build/es/src/innovation-playground-v2-message-assistant-training.http.js +0 -238
- package/build/es/src/innovation-playground-v2-message-assistant-training.http.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.meta.d.ts +0 -20
- package/build/es/src/innovation-playground-v2-message-assistant-training.meta.js +0 -110
- package/build/es/src/innovation-playground-v2-message-assistant-training.meta.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.public.d.ts +0 -77
- package/build/es/src/innovation-playground-v2-message-assistant-training.public.js +0 -34
- package/build/es/src/innovation-playground-v2-message-assistant-training.public.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.types.d.ts +0 -617
- package/build/es/src/innovation-playground-v2-message-assistant-training.types.js +0 -55
- package/build/es/src/innovation-playground-v2-message-assistant-training.types.js.map +0 -1
- package/build/es/src/innovation-playground-v2-message-assistant-training.universal.d.ts +0 -871
- package/build/es/src/innovation-playground-v2-message-assistant-training.universal.js +0 -389
- package/build/es/src/innovation-playground-v2-message-assistant-training.universal.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.d.ts +0 -10
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.js +0 -19
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.context.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.d.ts +0 -44
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.js +0 -247
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.http.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.d.ts +0 -20
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.js +0 -142
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.meta.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.d.ts +0 -77
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.js +0 -49
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.public.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.d.ts +0 -617
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.js +0 -58
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.types.js.map +0 -1
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.js +0 -421
- package/build/internal/cjs/src/innovation-playground-v2-message-assistant-training.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.d.ts +0 -10
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.js +0 -10
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.context.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.d.ts +0 -44
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.js +0 -238
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.http.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.d.ts +0 -20
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.js +0 -110
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.meta.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.d.ts +0 -77
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.js +0 -34
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.public.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.types.js +0 -55
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.types.js.map +0 -1
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.d.ts +0 -871
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.js +0 -389
- package/build/internal/es/src/innovation-playground-v2-message-assistant-training.universal.js.map +0 -1
package/build/cjs/index.d.ts
CHANGED
|
@@ -1 +1,90 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { MessagesQueryBuilder, Message, AskQuestionResponse, AddFeedbackOptions, AddFeedbackResponse, BulkUpdateMessageTagsOptions, BulkUpdateMessageTagsResponse, BulkUpdateMessageTagsByFilterOptions, BulkUpdateMessageTagsByFilterResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse } from './index.typings.js';
|
|
3
|
+
export { Action, ActionEvent, ActionWithLiterals, AddFeedbackRequest, ApplicationError, AskQuestionRequest, Body, BulkActionMetadata, BulkUpdateMessageTagsByFilterRequest, BulkUpdateMessageTagsRequest, BulkUpdateMessageTagsResult, Category, CategoryWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, Document, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, Feedback, FeedbackType, FeedbackTypeWithLiterals, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, MessagesQueryResult, QueryMessagesRequest, QueryMessagesResponse, ReferenceDocument, RestoreInfo, Sender, SenderWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, TagList, Tags, UpdateExtendedFieldsRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function queryMessages$1(httpClient: HttpClient): QueryMessagesSignature;
|
|
6
|
+
interface QueryMessagesSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a query to retrieve a list of messages.
|
|
9
|
+
* The `queryMessages()` function builds a query to retrieve a list of messages and returns a `MessagesQueryBuilder` object.
|
|
10
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
11
|
+
* 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.
|
|
12
|
+
* `queryMessages()` runs with these `MessagesQueryBuilder` defaults, which you can override:
|
|
13
|
+
*
|
|
14
|
+
* *`skip(0)`
|
|
15
|
+
* * `limit(50)`
|
|
16
|
+
* * `ascending("createdDate")`
|
|
17
|
+
*
|
|
18
|
+
* 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.
|
|
19
|
+
*
|
|
20
|
+
* ## Supported Filters and Sorting
|
|
21
|
+
*
|
|
22
|
+
* | Field | Supported Filters | Sortable |
|
|
23
|
+
* |----------------|------------------------------------------------------------------------------------------|-----------|
|
|
24
|
+
* | `id` | [All operators](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#operators). | Sortable |
|
|
25
|
+
* | `createdDate` | [All operators](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#operators). | Sortable |
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
28
|
+
(): MessagesQueryBuilder;
|
|
29
|
+
}
|
|
30
|
+
declare function askQuestion$1(httpClient: HttpClient): AskQuestionSignature;
|
|
31
|
+
interface AskQuestionSignature {
|
|
32
|
+
/**
|
|
33
|
+
* Asks a question to the AI Assistant.
|
|
34
|
+
*
|
|
35
|
+
* This method creates and sends a message from a Wix user.
|
|
36
|
+
* @param - Question message.
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
39
|
+
(question: Message): Promise<NonNullablePaths<AskQuestionResponse, `answer._id` | `answer.conversationId` | `answer.sender` | `answer.feedback.document._id` | `answer.feedback.document.title` | `answer.feedback.document.description` | `answer.feedback.document.tags` | `answer.feedback.document.url` | `answer.feedback.document.category` | `answer.feedback.document.action` | `answer.feedback.document.reference._id` | `answer.feedback.document.reference.documentType` | `answer.feedback.document.reference.title` | `answer.feedback.document.reference.url` | `answer.feedback.document.reference.img` | `answer.feedback.type` | `answer.body.additionalData` | `answer.tags.privateTags.tagIds`, 6>>;
|
|
40
|
+
}
|
|
41
|
+
declare function addFeedback$1(httpClient: HttpClient): AddFeedbackSignature;
|
|
42
|
+
interface AddFeedbackSignature {
|
|
43
|
+
/**
|
|
44
|
+
* Adds feedback to a message.
|
|
45
|
+
* @param - ID of the message to add feedback to.
|
|
46
|
+
* @deprecated
|
|
47
|
+
*/
|
|
48
|
+
(messageId: string, options: NonNullablePaths<AddFeedbackOptions, `feedback` | `revision`, 2>): Promise<NonNullablePaths<AddFeedbackResponse, `message._id` | `message.conversationId` | `message.sender` | `message.feedback.document._id` | `message.feedback.document.title` | `message.feedback.document.description` | `message.feedback.document.tags` | `message.feedback.document.url` | `message.feedback.document.category` | `message.feedback.document.action` | `message.feedback.document.reference._id` | `message.feedback.document.reference.documentType` | `message.feedback.document.reference.title` | `message.feedback.document.reference.url` | `message.feedback.document.reference.img` | `message.feedback.type` | `message.body.additionalData` | `message.tags.privateTags.tagIds`, 6>>;
|
|
49
|
+
}
|
|
50
|
+
declare function bulkUpdateMessageTags$1(httpClient: HttpClient): BulkUpdateMessageTagsSignature;
|
|
51
|
+
interface BulkUpdateMessageTagsSignature {
|
|
52
|
+
/**
|
|
53
|
+
* Synchronously updates tags on a list of messages, specified using the messages' IDs.
|
|
54
|
+
*
|
|
55
|
+
* If a tag appears in both `assignTags` and `unassignTags`, it is assigned.
|
|
56
|
+
* @param - Message IDs. Tags are updated for messages included in this list.
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
59
|
+
(ids: string[], options?: NonNullablePaths<BulkUpdateMessageTagsOptions, `assignTags`, 2>): Promise<NonNullablePaths<BulkUpdateMessageTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
60
|
+
}
|
|
61
|
+
declare function bulkUpdateMessageTagsByFilter$1(httpClient: HttpClient): BulkUpdateMessageTagsByFilterSignature;
|
|
62
|
+
interface BulkUpdateMessageTagsByFilterSignature {
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* If a tag appears in both `assignTags` and `unassignTags`, it is assigned.
|
|
67
|
+
* @param - Filter to apply to the messages. Tags are updated for messages included in this filter.
|
|
68
|
+
* @deprecated
|
|
69
|
+
*/
|
|
70
|
+
(filter: Record<string, any>, options?: NonNullablePaths<BulkUpdateMessageTagsByFilterOptions, `assignTags`, 2>): Promise<NonNullablePaths<BulkUpdateMessageTagsByFilterResponse, `jobId`, 2>>;
|
|
71
|
+
}
|
|
72
|
+
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
73
|
+
interface UpdateExtendedFieldsSignature {
|
|
74
|
+
/**
|
|
75
|
+
* Updates extended fields. This method does not increment the revision.
|
|
76
|
+
* @param - ID of the entity to update.
|
|
77
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
78
|
+
* @deprecated
|
|
79
|
+
*/
|
|
80
|
+
(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, `message._id` | `message.conversationId` | `message.sender` | `message.feedback.document._id` | `message.feedback.document.title` | `message.feedback.document.description` | `message.feedback.document.tags` | `message.feedback.document.url` | `message.feedback.document.category` | `message.feedback.document.action` | `message.feedback.document.reference._id` | `message.feedback.document.reference.documentType` | `message.feedback.document.reference.title` | `message.feedback.document.reference.url` | `message.feedback.document.reference.img` | `message.feedback.type` | `message.body.additionalData` | `message.tags.privateTags.tagIds`, 6>>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare const queryMessages: MaybeContext<BuildRESTFunction<typeof queryMessages$1> & typeof queryMessages$1>;
|
|
84
|
+
declare const askQuestion: MaybeContext<BuildRESTFunction<typeof askQuestion$1> & typeof askQuestion$1>;
|
|
85
|
+
declare const addFeedback: MaybeContext<BuildRESTFunction<typeof addFeedback$1> & typeof addFeedback$1>;
|
|
86
|
+
declare const bulkUpdateMessageTags: MaybeContext<BuildRESTFunction<typeof bulkUpdateMessageTags$1> & typeof bulkUpdateMessageTags$1>;
|
|
87
|
+
declare const bulkUpdateMessageTagsByFilter: MaybeContext<BuildRESTFunction<typeof bulkUpdateMessageTagsByFilter$1> & typeof bulkUpdateMessageTagsByFilter$1>;
|
|
88
|
+
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
89
|
+
|
|
90
|
+
export { AddFeedbackOptions, AddFeedbackResponse, AskQuestionResponse, BulkUpdateMessageTagsByFilterOptions, BulkUpdateMessageTagsByFilterResponse, BulkUpdateMessageTagsOptions, BulkUpdateMessageTagsResponse, Message, MessagesQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, addFeedback, askQuestion, bulkUpdateMessageTags, bulkUpdateMessageTagsByFilter, queryMessages, updateExtendedFields };
|
package/build/cjs/index.js
CHANGED
|
@@ -1,18 +1,583 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
9
|
};
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Action: () => Action,
|
|
24
|
+
Category: () => Category,
|
|
25
|
+
FeedbackType: () => FeedbackType,
|
|
26
|
+
Sender: () => Sender,
|
|
27
|
+
SortOrder: () => SortOrder,
|
|
28
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
29
|
+
addFeedback: () => addFeedback4,
|
|
30
|
+
askQuestion: () => askQuestion4,
|
|
31
|
+
bulkUpdateMessageTags: () => bulkUpdateMessageTags4,
|
|
32
|
+
bulkUpdateMessageTagsByFilter: () => bulkUpdateMessageTagsByFilter4,
|
|
33
|
+
queryMessages: () => queryMessages4,
|
|
34
|
+
updateExtendedFields: () => updateExtendedFields4
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
|
|
38
|
+
// src/innovation-playground-v2-message-assistant-training.universal.ts
|
|
39
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
40
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
41
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
42
|
+
|
|
43
|
+
// src/innovation-playground-v2-message-assistant-training.http.ts
|
|
44
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
45
|
+
var import_float2 = require("@wix/sdk-runtime/transformations/float");
|
|
46
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
47
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
48
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
49
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
50
|
+
function resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(opts) {
|
|
51
|
+
const domainToMappings = {
|
|
52
|
+
"manage._base_domain_": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/wix-assistant-playground",
|
|
55
|
+
destPath: ""
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
srcPath: "/_api/wix-assistant-playground",
|
|
59
|
+
destPath: "/api"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"www.wixapis.com": [
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/innovation/playground",
|
|
65
|
+
destPath: ""
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
70
|
+
}
|
|
71
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ai-site-chat_assistant-training";
|
|
72
|
+
function queryMessages(payload) {
|
|
73
|
+
function __queryMessages({ host }) {
|
|
74
|
+
const metadata = {
|
|
75
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
76
|
+
method: "POST",
|
|
77
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.QueryMessages",
|
|
78
|
+
packageName: PACKAGE_NAME,
|
|
79
|
+
migrationOptions: {
|
|
80
|
+
optInTransformResponse: true
|
|
81
|
+
},
|
|
82
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
83
|
+
{ protoPath: "/v2/messages/query", data: payload, host }
|
|
84
|
+
),
|
|
85
|
+
data: payload,
|
|
86
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
87
|
+
{
|
|
88
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
89
|
+
paths: [
|
|
90
|
+
{ path: "messages.createdDate" },
|
|
91
|
+
{ path: "messages.updatedDate" },
|
|
92
|
+
{ path: "messages.feedback.document.updateTs" }
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
97
|
+
paths: [{ path: "messages.feedback.document.relevance" }]
|
|
98
|
+
}
|
|
99
|
+
])
|
|
100
|
+
};
|
|
101
|
+
return metadata;
|
|
102
|
+
}
|
|
103
|
+
return __queryMessages;
|
|
104
|
+
}
|
|
105
|
+
function askQuestion(payload) {
|
|
106
|
+
function __askQuestion({ host }) {
|
|
107
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
108
|
+
{
|
|
109
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
110
|
+
paths: [
|
|
111
|
+
{ path: "question.createdDate" },
|
|
112
|
+
{ path: "question.updatedDate" },
|
|
113
|
+
{ path: "question.feedback.document.updateTs" }
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
118
|
+
paths: [{ path: "question.feedback.document.relevance" }]
|
|
119
|
+
}
|
|
120
|
+
]);
|
|
121
|
+
const metadata = {
|
|
122
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
123
|
+
method: "POST",
|
|
124
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.AskQuestion",
|
|
125
|
+
packageName: PACKAGE_NAME,
|
|
126
|
+
migrationOptions: {
|
|
127
|
+
optInTransformResponse: true
|
|
128
|
+
},
|
|
129
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
130
|
+
{ protoPath: "/v2/messages/ask-question", data: serializedData, host }
|
|
131
|
+
),
|
|
132
|
+
data: serializedData,
|
|
133
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
134
|
+
{
|
|
135
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
136
|
+
paths: [
|
|
137
|
+
{ path: "answer.createdDate" },
|
|
138
|
+
{ path: "answer.updatedDate" },
|
|
139
|
+
{ path: "answer.feedback.document.updateTs" }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
144
|
+
paths: [{ path: "answer.feedback.document.relevance" }]
|
|
145
|
+
}
|
|
146
|
+
])
|
|
147
|
+
};
|
|
148
|
+
return metadata;
|
|
149
|
+
}
|
|
150
|
+
return __askQuestion;
|
|
151
|
+
}
|
|
152
|
+
function addFeedback(payload) {
|
|
153
|
+
function __addFeedback({ host }) {
|
|
154
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
155
|
+
{
|
|
156
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
157
|
+
paths: [{ path: "feedback.document.updateTs" }]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
161
|
+
paths: [{ path: "feedback.document.relevance" }]
|
|
162
|
+
}
|
|
163
|
+
]);
|
|
164
|
+
const metadata = {
|
|
165
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
166
|
+
method: "POST",
|
|
167
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.AddFeedback",
|
|
168
|
+
packageName: PACKAGE_NAME,
|
|
169
|
+
migrationOptions: {
|
|
170
|
+
optInTransformResponse: true
|
|
171
|
+
},
|
|
172
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
173
|
+
{ protoPath: "/v2/messages/add-feedback", data: serializedData, host }
|
|
174
|
+
),
|
|
175
|
+
data: serializedData,
|
|
176
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
177
|
+
{
|
|
178
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
179
|
+
paths: [
|
|
180
|
+
{ path: "message.createdDate" },
|
|
181
|
+
{ path: "message.updatedDate" },
|
|
182
|
+
{ path: "message.feedback.document.updateTs" }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
187
|
+
paths: [{ path: "message.feedback.document.relevance" }]
|
|
188
|
+
}
|
|
189
|
+
])
|
|
190
|
+
};
|
|
191
|
+
return metadata;
|
|
192
|
+
}
|
|
193
|
+
return __addFeedback;
|
|
194
|
+
}
|
|
195
|
+
function bulkUpdateMessageTags(payload) {
|
|
196
|
+
function __bulkUpdateMessageTags({ host }) {
|
|
197
|
+
const metadata = {
|
|
198
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
199
|
+
method: "POST",
|
|
200
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.BulkUpdateMessageTags",
|
|
201
|
+
packageName: PACKAGE_NAME,
|
|
202
|
+
migrationOptions: {
|
|
203
|
+
optInTransformResponse: true
|
|
204
|
+
},
|
|
205
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
206
|
+
{ protoPath: "/v2/bulk/messages/update-tags", data: payload, host }
|
|
207
|
+
),
|
|
208
|
+
data: payload
|
|
209
|
+
};
|
|
210
|
+
return metadata;
|
|
211
|
+
}
|
|
212
|
+
return __bulkUpdateMessageTags;
|
|
213
|
+
}
|
|
214
|
+
function bulkUpdateMessageTagsByFilter(payload) {
|
|
215
|
+
function __bulkUpdateMessageTagsByFilter({ host }) {
|
|
216
|
+
const metadata = {
|
|
217
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
218
|
+
method: "POST",
|
|
219
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.BulkUpdateMessageTagsByFilter",
|
|
220
|
+
packageName: PACKAGE_NAME,
|
|
221
|
+
migrationOptions: {
|
|
222
|
+
optInTransformResponse: true
|
|
223
|
+
},
|
|
224
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
225
|
+
{
|
|
226
|
+
protoPath: "/v2/bulk/messages/update-tags-by-filter",
|
|
227
|
+
data: payload,
|
|
228
|
+
host
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
data: payload
|
|
232
|
+
};
|
|
233
|
+
return metadata;
|
|
234
|
+
}
|
|
235
|
+
return __bulkUpdateMessageTagsByFilter;
|
|
236
|
+
}
|
|
237
|
+
function updateExtendedFields(payload) {
|
|
238
|
+
function __updateExtendedFields({ host }) {
|
|
239
|
+
const metadata = {
|
|
240
|
+
entityFqdn: "wix.innovation.playground.v2.message",
|
|
241
|
+
method: "POST",
|
|
242
|
+
methodFqn: "wix.innovation.assistant.playground.v2.WixAssistantPlaygroundV2.UpdateExtendedFields",
|
|
243
|
+
packageName: PACKAGE_NAME,
|
|
244
|
+
migrationOptions: {
|
|
245
|
+
optInTransformResponse: true
|
|
246
|
+
},
|
|
247
|
+
url: resolveWixInnovationAssistantPlaygroundV2WixAssistantPlaygroundV2Url(
|
|
248
|
+
{
|
|
249
|
+
protoPath: "/v2/messages/{id}/update-extended-fields",
|
|
250
|
+
data: payload,
|
|
251
|
+
host
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
data: payload,
|
|
255
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
256
|
+
{
|
|
257
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
258
|
+
paths: [
|
|
259
|
+
{ path: "message.createdDate" },
|
|
260
|
+
{ path: "message.updatedDate" },
|
|
261
|
+
{ path: "message.feedback.document.updateTs" }
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
266
|
+
paths: [{ path: "message.feedback.document.relevance" }]
|
|
267
|
+
}
|
|
268
|
+
])
|
|
269
|
+
};
|
|
270
|
+
return metadata;
|
|
271
|
+
}
|
|
272
|
+
return __updateExtendedFields;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// src/innovation-playground-v2-message-assistant-training.universal.ts
|
|
276
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
277
|
+
var Sender = /* @__PURE__ */ ((Sender2) => {
|
|
278
|
+
Sender2["UNKNOWN_SENDER"] = "UNKNOWN_SENDER";
|
|
279
|
+
Sender2["USER"] = "USER";
|
|
280
|
+
Sender2["GENERATED_BY_AI"] = "GENERATED_BY_AI";
|
|
281
|
+
Sender2["ASSISTANT"] = "ASSISTANT";
|
|
282
|
+
return Sender2;
|
|
283
|
+
})(Sender || {});
|
|
284
|
+
var Category = /* @__PURE__ */ ((Category2) => {
|
|
285
|
+
Category2["NO_CATEGORY"] = "NO_CATEGORY";
|
|
286
|
+
Category2["ENRICHMENT"] = "ENRICHMENT";
|
|
287
|
+
Category2["RESTRICTION"] = "RESTRICTION";
|
|
288
|
+
return Category2;
|
|
289
|
+
})(Category || {});
|
|
290
|
+
var Action = /* @__PURE__ */ ((Action2) => {
|
|
291
|
+
Action2["NO_ACTION"] = "NO_ACTION";
|
|
292
|
+
Action2["NO_ANSWER"] = "NO_ANSWER";
|
|
293
|
+
Action2["CONTACT"] = "CONTACT";
|
|
294
|
+
return Action2;
|
|
295
|
+
})(Action || {});
|
|
296
|
+
var FeedbackType = /* @__PURE__ */ ((FeedbackType2) => {
|
|
297
|
+
FeedbackType2["UNKNOWN"] = "UNKNOWN";
|
|
298
|
+
FeedbackType2["THUMBS_UP"] = "THUMBS_UP";
|
|
299
|
+
FeedbackType2["IRRELEVANT"] = "IRRELEVANT";
|
|
300
|
+
FeedbackType2["INCORRECT"] = "INCORRECT";
|
|
301
|
+
FeedbackType2["SHOULD_NOT_ANSWER"] = "SHOULD_NOT_ANSWER";
|
|
302
|
+
FeedbackType2["OK_BUT"] = "OK_BUT";
|
|
303
|
+
FeedbackType2["OTHER"] = "OTHER";
|
|
304
|
+
return FeedbackType2;
|
|
305
|
+
})(FeedbackType || {});
|
|
306
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
307
|
+
SortOrder2["ASC"] = "ASC";
|
|
308
|
+
SortOrder2["DESC"] = "DESC";
|
|
309
|
+
return SortOrder2;
|
|
310
|
+
})(SortOrder || {});
|
|
311
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
312
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
313
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
314
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
315
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
316
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
317
|
+
return WebhookIdentityType2;
|
|
318
|
+
})(WebhookIdentityType || {});
|
|
319
|
+
function queryMessages2() {
|
|
320
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
321
|
+
return (0, import_query_builder.queryBuilder)({
|
|
322
|
+
func: async (payload) => {
|
|
323
|
+
const reqOpts = queryMessages(payload);
|
|
324
|
+
sideEffects?.onSiteCall?.();
|
|
325
|
+
try {
|
|
326
|
+
const result = await httpClient.request(reqOpts);
|
|
327
|
+
sideEffects?.onSuccess?.(result);
|
|
328
|
+
return result;
|
|
329
|
+
} catch (err) {
|
|
330
|
+
sideEffects?.onError?.(err);
|
|
331
|
+
throw err;
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
requestTransformer: (query) => {
|
|
335
|
+
const args = [query, {}];
|
|
336
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
337
|
+
...args?.[1],
|
|
338
|
+
query: args?.[0]
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
responseTransformer: ({ data }) => {
|
|
342
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
343
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
344
|
+
);
|
|
345
|
+
return {
|
|
346
|
+
items: transformedData?.messages,
|
|
347
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
348
|
+
};
|
|
349
|
+
},
|
|
350
|
+
errorTransformer: (err) => {
|
|
351
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
352
|
+
spreadPathsToArguments: {},
|
|
353
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
354
|
+
singleArgumentUnchanged: false
|
|
355
|
+
});
|
|
356
|
+
throw transformedError;
|
|
357
|
+
},
|
|
358
|
+
pagingMethod: "CURSOR",
|
|
359
|
+
transformationPaths: {}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
async function askQuestion2(question) {
|
|
363
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
364
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ question });
|
|
365
|
+
const reqOpts = askQuestion(payload);
|
|
366
|
+
sideEffects?.onSiteCall?.();
|
|
367
|
+
try {
|
|
368
|
+
const result = await httpClient.request(reqOpts);
|
|
369
|
+
sideEffects?.onSuccess?.(result);
|
|
370
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
371
|
+
} catch (err) {
|
|
372
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
373
|
+
err,
|
|
374
|
+
{
|
|
375
|
+
spreadPathsToArguments: {},
|
|
376
|
+
explicitPathsToArguments: { question: "$[0]" },
|
|
377
|
+
singleArgumentUnchanged: false
|
|
378
|
+
},
|
|
379
|
+
["question"]
|
|
380
|
+
);
|
|
381
|
+
sideEffects?.onError?.(err);
|
|
382
|
+
throw transformedError;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
async function addFeedback2(messageId, options) {
|
|
386
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
387
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
388
|
+
messageId,
|
|
389
|
+
feedback: options?.feedback,
|
|
390
|
+
revision: options?.revision
|
|
391
|
+
});
|
|
392
|
+
const reqOpts = addFeedback(payload);
|
|
393
|
+
sideEffects?.onSiteCall?.();
|
|
394
|
+
try {
|
|
395
|
+
const result = await httpClient.request(reqOpts);
|
|
396
|
+
sideEffects?.onSuccess?.(result);
|
|
397
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
398
|
+
} catch (err) {
|
|
399
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
400
|
+
err,
|
|
401
|
+
{
|
|
402
|
+
spreadPathsToArguments: {},
|
|
403
|
+
explicitPathsToArguments: {
|
|
404
|
+
messageId: "$[0]",
|
|
405
|
+
feedback: "$[1].feedback",
|
|
406
|
+
revision: "$[1].revision"
|
|
407
|
+
},
|
|
408
|
+
singleArgumentUnchanged: false
|
|
409
|
+
},
|
|
410
|
+
["messageId", "options"]
|
|
411
|
+
);
|
|
412
|
+
sideEffects?.onError?.(err);
|
|
413
|
+
throw transformedError;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
async function bulkUpdateMessageTags2(ids, options) {
|
|
417
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
418
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
419
|
+
ids,
|
|
420
|
+
assignTags: options?.assignTags,
|
|
421
|
+
unassignTags: options?.unassignTags
|
|
422
|
+
});
|
|
423
|
+
const reqOpts = bulkUpdateMessageTags(payload);
|
|
424
|
+
sideEffects?.onSiteCall?.();
|
|
425
|
+
try {
|
|
426
|
+
const result = await httpClient.request(reqOpts);
|
|
427
|
+
sideEffects?.onSuccess?.(result);
|
|
428
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
429
|
+
} catch (err) {
|
|
430
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
431
|
+
err,
|
|
432
|
+
{
|
|
433
|
+
spreadPathsToArguments: {},
|
|
434
|
+
explicitPathsToArguments: {
|
|
435
|
+
ids: "$[0]",
|
|
436
|
+
assignTags: "$[1].assignTags",
|
|
437
|
+
unassignTags: "$[1].unassignTags"
|
|
438
|
+
},
|
|
439
|
+
singleArgumentUnchanged: false
|
|
440
|
+
},
|
|
441
|
+
["ids", "options"]
|
|
442
|
+
);
|
|
443
|
+
sideEffects?.onError?.(err);
|
|
444
|
+
throw transformedError;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
async function bulkUpdateMessageTagsByFilter2(filter, options) {
|
|
448
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
449
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
450
|
+
filter,
|
|
451
|
+
assignTags: options?.assignTags,
|
|
452
|
+
unassignTags: options?.unassignTags
|
|
453
|
+
});
|
|
454
|
+
const reqOpts = bulkUpdateMessageTagsByFilter(
|
|
455
|
+
payload
|
|
456
|
+
);
|
|
457
|
+
sideEffects?.onSiteCall?.();
|
|
458
|
+
try {
|
|
459
|
+
const result = await httpClient.request(reqOpts);
|
|
460
|
+
sideEffects?.onSuccess?.(result);
|
|
461
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
462
|
+
} catch (err) {
|
|
463
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
464
|
+
err,
|
|
465
|
+
{
|
|
466
|
+
spreadPathsToArguments: {},
|
|
467
|
+
explicitPathsToArguments: {
|
|
468
|
+
filter: "$[0]",
|
|
469
|
+
assignTags: "$[1].assignTags",
|
|
470
|
+
unassignTags: "$[1].unassignTags"
|
|
471
|
+
},
|
|
472
|
+
singleArgumentUnchanged: false
|
|
473
|
+
},
|
|
474
|
+
["filter", "options"]
|
|
475
|
+
);
|
|
476
|
+
sideEffects?.onError?.(err);
|
|
477
|
+
throw transformedError;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
async function updateExtendedFields2(_id, namespace, options) {
|
|
481
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
482
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
483
|
+
id: _id,
|
|
484
|
+
namespace,
|
|
485
|
+
namespaceData: options?.namespaceData
|
|
486
|
+
});
|
|
487
|
+
const reqOpts = updateExtendedFields(payload);
|
|
488
|
+
sideEffects?.onSiteCall?.();
|
|
489
|
+
try {
|
|
490
|
+
const result = await httpClient.request(reqOpts);
|
|
491
|
+
sideEffects?.onSuccess?.(result);
|
|
492
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
493
|
+
} catch (err) {
|
|
494
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
495
|
+
err,
|
|
496
|
+
{
|
|
497
|
+
spreadPathsToArguments: {},
|
|
498
|
+
explicitPathsToArguments: {
|
|
499
|
+
id: "$[0]",
|
|
500
|
+
namespace: "$[1]",
|
|
501
|
+
namespaceData: "$[2].namespaceData"
|
|
502
|
+
},
|
|
503
|
+
singleArgumentUnchanged: false
|
|
504
|
+
},
|
|
505
|
+
["_id", "namespace", "options"]
|
|
506
|
+
);
|
|
507
|
+
sideEffects?.onError?.(err);
|
|
508
|
+
throw transformedError;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// src/innovation-playground-v2-message-assistant-training.public.ts
|
|
513
|
+
function queryMessages3(httpClient) {
|
|
514
|
+
return () => queryMessages2(
|
|
515
|
+
// @ts-ignore
|
|
516
|
+
{ httpClient }
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
function askQuestion3(httpClient) {
|
|
520
|
+
return (question) => askQuestion2(
|
|
521
|
+
question,
|
|
522
|
+
// @ts-ignore
|
|
523
|
+
{ httpClient }
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
function addFeedback3(httpClient) {
|
|
527
|
+
return (messageId, options) => addFeedback2(
|
|
528
|
+
messageId,
|
|
529
|
+
options,
|
|
530
|
+
// @ts-ignore
|
|
531
|
+
{ httpClient }
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
function bulkUpdateMessageTags3(httpClient) {
|
|
535
|
+
return (ids, options) => bulkUpdateMessageTags2(
|
|
536
|
+
ids,
|
|
537
|
+
options,
|
|
538
|
+
// @ts-ignore
|
|
539
|
+
{ httpClient }
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
function bulkUpdateMessageTagsByFilter3(httpClient) {
|
|
543
|
+
return (filter, options) => bulkUpdateMessageTagsByFilter2(
|
|
544
|
+
filter,
|
|
545
|
+
options,
|
|
546
|
+
// @ts-ignore
|
|
547
|
+
{ httpClient }
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
function updateExtendedFields3(httpClient) {
|
|
551
|
+
return (_id, namespace, options) => updateExtendedFields2(
|
|
552
|
+
_id,
|
|
553
|
+
namespace,
|
|
554
|
+
options,
|
|
555
|
+
// @ts-ignore
|
|
556
|
+
{ httpClient }
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// src/innovation-playground-v2-message-assistant-training.context.ts
|
|
561
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
562
|
+
var queryMessages4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(queryMessages3);
|
|
563
|
+
var askQuestion4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(askQuestion3);
|
|
564
|
+
var addFeedback4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(addFeedback3);
|
|
565
|
+
var bulkUpdateMessageTags4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkUpdateMessageTags3);
|
|
566
|
+
var bulkUpdateMessageTagsByFilter4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkUpdateMessageTagsByFilter3);
|
|
567
|
+
var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(updateExtendedFields3);
|
|
568
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
569
|
+
0 && (module.exports = {
|
|
570
|
+
Action,
|
|
571
|
+
Category,
|
|
572
|
+
FeedbackType,
|
|
573
|
+
Sender,
|
|
574
|
+
SortOrder,
|
|
575
|
+
WebhookIdentityType,
|
|
576
|
+
addFeedback,
|
|
577
|
+
askQuestion,
|
|
578
|
+
bulkUpdateMessageTags,
|
|
579
|
+
bulkUpdateMessageTagsByFilter,
|
|
580
|
+
queryMessages,
|
|
581
|
+
updateExtendedFields
|
|
582
|
+
});
|
|
18
583
|
//# sourceMappingURL=index.js.map
|