@wix/auto_sdk_legends_persona-chats 1.0.26 → 1.0.27
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 +19 -3
- package/build/cjs/index.js +126 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +100 -1
- package/build/cjs/index.typings.js +108 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +66 -2
- package/build/cjs/meta.js +82 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +19 -3
- package/build/es/index.mjs +124 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +100 -1
- package/build/es/index.typings.mjs +106 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +66 -2
- package/build/es/meta.mjs +80 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +19 -3
- package/build/internal/cjs/index.typings.d.ts +100 -1
- package/build/internal/cjs/meta.d.ts +66 -2
- package/build/internal/es/index.d.mts +19 -3
- package/build/internal/es/index.typings.d.mts +100 -1
- package/build/internal/es/meta.d.mts +66 -2
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { PersonaChat, CreatePersonaChatOptions, GetPersonaChatOptions, GetPersonaChatContextResponse, GetPersonaChatContextApplicationErrors, RetrievePersonaKnowledgeOptions, RetrievePersonaKnowledgeResponse, RetrievePersonaKnowledgeApplicationErrors, SendChatMessageOptions, SendChatMessageResponse, SendChatMessageStreamedOptions, RawHttpResponse, PersistConversationMessageOptions, PersistConversationMessageResponse, ListPersonaChatsOptions, ListPersonaChatsResponse, CreateInteractiveConversationOptions, CreateInteractiveConversationResponse, CreateVoiceConversationOptions, CreateVoiceConversationResponse, EndInteractiveConversationOptions, GetInteractiveConversationIdentifiers, GetInteractiveConversationOptions, GetInteractiveConversationResponse, GenerateChatCompletionsWithVendorOptions, GenerateChatCompletionsStreamWithVendorOptions, QueryChatMessagesOptions, QueryChatMessagesResponse, GetPermissionsOptions, GetPermissionsResponse, QueryPersonaChatsOptions, QueryPersonaChatsResponse, UpsertKnowledgeSnippetOptions, UpsertKnowledgeSnippetResponse, UpsertKnowledgeSnippetApplicationErrors, SwitchConfigOptions, DeletePersonaChatOptions, BulkDeletePersonaChatsByPersonaOptions, BulkDeletePersonaChatsByPersonaResponse, GenerateConversationOutcomeOptions, GenerateConversationOutcomeResponse } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, ActionEvent, AdditionalMetadata, AssistantConfigurationOverrides, AvatarPolicy, AvatarPolicyOptionsOneOf, AvatarSourcePolicy, AvatarSourcePolicyWithLiterals, BulkDeletePersonaChatsByPersonaRequest, CallSettings, CallSupportArticle, CapturedContact, Category, CategoryWithLiterals, Channel, ChannelWithLiterals, ChatConfig, ChatContext, ChatFollowUpSuggestion, ChatFollowUpSuggestions, ChatMessage, ChatMessageAdded, ChatMessageAttachment, ChatMode, ChatModeWithLiterals, Citation, ClientToolDefinition, ConversationEnded, ConversationExpired, ConversationOutcome, ConversationType, ConversationTypeWithLiterals, CreateInteractiveConversationRequest, CreatePersonaChatRequest, CreatePersonaChatResponse, CreateVoiceConversationRequest, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeletePersonaChatRequest, DeletePersonaChatResponse, DomainEvent, DomainEventBodyOneOf, ElevenLabsData, Empty, EndInteractiveConversationRequest, EndInteractiveConversationResponse, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FishAudioData, FollowUp, FollowUpWithLiterals, FunctionCall, FunctionCallResult, GenerateConversationOutcomeRequest, GeneratedSnippet, GetCallMemberRequest, GetCallMemberResponse, GetCallSupportKnowledgeRequest, GetCallSupportKnowledgeResponse, GetInteractiveConversationRequest, GetPermissionsRequest, GetPersonaChatContextRequest, GetPersonaChatRequest, GetPersonaChatResponse, HeadersEntry, HourOneData, HumeData, IdentificationData, IdentificationDataIdOneOf, InteractiveConversationStatus, InteractiveConversationStatusWithLiterals, Knowledge, KnowledgeChunkMetadata, KnowledgePageCard, KnowledgeRetrieved, KnowledgeSnippet, KnowledgeSnippetCreationTriggered, KnowledgeSourceOptionsOneOf, Limitation, LimitationType, LimitationTypeWithLiterals, ListPersonaChatsRequest, MessageEnvelope, MessageSource, MessageSourceWithLiterals, MessageStatus, MessageStatusWithLiterals, MessageType, MessageTypeWithLiterals, Metadata, Namespace, NamespaceWithLiterals, ParticipantType, ParticipantTypeWithLiterals, PathParametersEntry, PersistConversationMessageRequest, PersistedConversationMessage, PersistedConversationMonitoringData, PersonaDetails, QueryChatMessagesRequest, QueryParametersEntry, QueryPersonaChatsRequest, RawHttpRequest, RestoreInfo, RetrievePersonaKnowledgeInternalRequest, RetrievePersonaKnowledgeInternalResponse, RetrievePersonaKnowledgeRequest, Role, RoleWithLiterals, SendChatMessageRequest, SendChatMessageStreamedRequest, SetChatCallSettingsRequest, SetChatCallSettingsResponse, SetChatFollowUpSuggestionsRequest, SetChatFollowUpSuggestionsResponse, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, State, StateWithLiterals, Subcategory, SubcategoryWithLiterals, SwitchConfigRequest, SwitchConfigResponse, SystemAvatarOptions, SystemVoiceOptions, TagList, Tags, TriggerKnowledgeSnippetCreationRequest, TriggerKnowledgeSnippetCreationResponse, Type, TypeWithLiterals, UpdateType, UpdateTypeWithLiterals, UpsertKnowledgeSnippetRequest, VendorType, VendorTypeWithLiterals, VoicePolicy, VoicePolicyOptionsOneOf, VoiceSourcePolicy, VoiceSourcePolicyWithLiterals, VoiceVendor, VoiceVendorData, VoiceVendorDataVendorDataOneOf, VoiceVendorWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
2
|
+
import { PersonaChat, CreatePersonaChatOptions, GetPersonaChatOptions, GetPersonaChatContextResponse, GetPersonaChatContextApplicationErrors, RetrievePersonaKnowledgeOptions, RetrievePersonaKnowledgeResponse, RetrievePersonaKnowledgeApplicationErrors, UploadVisitorChatAttachmentOptions, UploadVisitorChatAttachmentResponse, GetVisitorChatAttachmentIdentifiers, GetVisitorChatAttachmentResponse, SendChatMessageOptions, SendChatMessageResponse, SendChatMessageStreamedOptions, RawHttpResponse, PersistConversationMessageOptions, PersistConversationMessageResponse, ListPersonaChatsOptions, ListPersonaChatsResponse, CreateInteractiveConversationOptions, CreateInteractiveConversationResponse, CreateVoiceConversationOptions, CreateVoiceConversationResponse, EndInteractiveConversationOptions, GetInteractiveConversationIdentifiers, GetInteractiveConversationOptions, GetInteractiveConversationResponse, GenerateChatCompletionsWithVendorOptions, GenerateChatCompletionsStreamWithVendorOptions, QueryChatMessagesOptions, QueryChatMessagesResponse, GetPermissionsOptions, GetPermissionsResponse, QueryPersonaChatsOptions, QueryPersonaChatsResponse, UpsertKnowledgeSnippetOptions, UpsertKnowledgeSnippetResponse, UpsertKnowledgeSnippetApplicationErrors, SwitchConfigOptions, DeletePersonaChatOptions, BulkDeletePersonaChatsByPersonaOptions, BulkDeletePersonaChatsByPersonaResponse, GenerateConversationOutcomeOptions, GenerateConversationOutcomeResponse } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, AdditionalMetadata, AssistantConfigurationOverrides, AvatarPolicy, AvatarPolicyOptionsOneOf, AvatarSourcePolicy, AvatarSourcePolicyWithLiterals, BulkDeletePersonaChatsByPersonaRequest, CallSettings, CallSupportArticle, CapturedContact, Category, CategoryWithLiterals, Channel, ChannelWithLiterals, ChatConfig, ChatContext, ChatFollowUpSuggestion, ChatFollowUpSuggestions, ChatMessage, ChatMessageAdded, ChatMessageAttachment, ChatMode, ChatModeWithLiterals, Citation, ClientToolDefinition, ConversationEnded, ConversationExpired, ConversationOutcome, ConversationType, ConversationTypeWithLiterals, CreateInteractiveConversationRequest, CreatePersonaChatRequest, CreatePersonaChatResponse, CreateVoiceConversationRequest, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeletePersonaChatRequest, DeletePersonaChatResponse, DomainEvent, DomainEventBodyOneOf, ElevenLabsData, Empty, EndInteractiveConversationRequest, EndInteractiveConversationResponse, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FishAudioData, FollowUp, FollowUpWithLiterals, FunctionCall, FunctionCallResult, GenerateConversationOutcomeRequest, GeneratedSnippet, GetCallMemberRequest, GetCallMemberResponse, GetCallSupportKnowledgeRequest, GetCallSupportKnowledgeResponse, GetInteractiveConversationRequest, GetPermissionsRequest, GetPersonaChatContextRequest, GetPersonaChatRequest, GetPersonaChatResponse, GetVisitorChatAttachmentRequest, HeadersEntry, HourOneData, HumeData, IdentificationData, IdentificationDataIdOneOf, InteractiveConversationStatus, InteractiveConversationStatusWithLiterals, Knowledge, KnowledgeChunkMetadata, KnowledgePageCard, KnowledgeRetrieved, KnowledgeSnippet, KnowledgeSnippetCreationTriggered, KnowledgeSourceOptionsOneOf, Limitation, LimitationType, LimitationTypeWithLiterals, ListPersonaChatsRequest, MessageEnvelope, MessageSource, MessageSourceWithLiterals, MessageStatus, MessageStatusWithLiterals, MessageType, MessageTypeWithLiterals, Metadata, Namespace, NamespaceWithLiterals, ParticipantType, ParticipantTypeWithLiterals, PathParametersEntry, PersistConversationMessageRequest, PersistedConversationMessage, PersistedConversationMonitoringData, PersonaDetails, QueryChatMessagesRequest, QueryParametersEntry, QueryPersonaChatsRequest, RawHttpRequest, ResolveCallAttachmentRequest, ResolveCallAttachmentResponse, RestoreInfo, RetrievePersonaKnowledgeInternalRequest, RetrievePersonaKnowledgeInternalResponse, RetrievePersonaKnowledgeRequest, Role, RoleWithLiterals, SendChatMessageRequest, SendChatMessageStreamedRequest, SetChatCallSettingsRequest, SetChatCallSettingsResponse, SetChatFollowUpSuggestionsRequest, SetChatFollowUpSuggestionsResponse, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, State, StateWithLiterals, Subcategory, SubcategoryWithLiterals, SwitchConfigRequest, SwitchConfigResponse, SystemAvatarOptions, SystemVoiceOptions, TagList, Tags, TriggerKnowledgeSnippetCreationRequest, TriggerKnowledgeSnippetCreationResponse, Type, TypeWithLiterals, UpdateType, UpdateTypeWithLiterals, UploadVisitorChatAttachmentRequest, UpsertKnowledgeSnippetRequest, VendorType, VendorTypeWithLiterals, VoicePolicy, VoicePolicyOptionsOneOf, VoiceSourcePolicy, VoiceSourcePolicyWithLiterals, VoiceVendor, VoiceVendorData, VoiceVendorDataVendorDataOneOf, VoiceVendorWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createPersonaChat$1(httpClient: HttpClient): CreatePersonaChatSignature;
|
|
6
6
|
interface CreatePersonaChatSignature {
|
|
@@ -40,6 +40,20 @@ interface RetrievePersonaKnowledgeSignature {
|
|
|
40
40
|
__applicationErrorsType?: RetrievePersonaKnowledgeApplicationErrors;
|
|
41
41
|
}>;
|
|
42
42
|
}
|
|
43
|
+
declare function uploadVisitorChatAttachment$1(httpClient: HttpClient): UploadVisitorChatAttachmentSignature;
|
|
44
|
+
interface UploadVisitorChatAttachmentSignature {
|
|
45
|
+
/**
|
|
46
|
+
* Uploads a private attachment to the anonymous visitor's published Legend chat.
|
|
47
|
+
*/
|
|
48
|
+
(chatId: string, fileName: string, options: NonNullablePaths<UploadVisitorChatAttachmentOptions, `contentBase64` | `mimeType`, 0>): Promise<NonNullablePaths<UploadVisitorChatAttachmentResponse, `attachmentId` | `downloadUrl`, 0>>;
|
|
49
|
+
}
|
|
50
|
+
declare function getVisitorChatAttachment$1(httpClient: HttpClient): GetVisitorChatAttachmentSignature;
|
|
51
|
+
interface GetVisitorChatAttachmentSignature {
|
|
52
|
+
/**
|
|
53
|
+
* Generates a temporary download URL for a private attachment in the visitor's chat.
|
|
54
|
+
*/
|
|
55
|
+
(identifiers: NonNullablePaths<GetVisitorChatAttachmentIdentifiers, `attachmentId` | `chatId`, 0>): Promise<NonNullablePaths<GetVisitorChatAttachmentResponse, `downloadUrl`, 0>>;
|
|
56
|
+
}
|
|
43
57
|
declare function sendChatMessage$1(httpClient: HttpClient): SendChatMessageSignature;
|
|
44
58
|
interface SendChatMessageSignature {
|
|
45
59
|
/**
|
|
@@ -187,6 +201,8 @@ declare const createPersonaChat: MaybeContext<BuildRESTFunction<typeof createPer
|
|
|
187
201
|
declare const getPersonaChat: MaybeContext<BuildRESTFunction<typeof getPersonaChat$1> & typeof getPersonaChat$1>;
|
|
188
202
|
declare const getPersonaChatContext: MaybeContext<BuildRESTFunction<typeof getPersonaChatContext$1> & typeof getPersonaChatContext$1>;
|
|
189
203
|
declare const retrievePersonaKnowledge: MaybeContext<BuildRESTFunction<typeof retrievePersonaKnowledge$1> & typeof retrievePersonaKnowledge$1>;
|
|
204
|
+
declare const uploadVisitorChatAttachment: MaybeContext<BuildRESTFunction<typeof uploadVisitorChatAttachment$1> & typeof uploadVisitorChatAttachment$1>;
|
|
205
|
+
declare const getVisitorChatAttachment: MaybeContext<BuildRESTFunction<typeof getVisitorChatAttachment$1> & typeof getVisitorChatAttachment$1>;
|
|
190
206
|
declare const sendChatMessage: MaybeContext<BuildRESTFunction<typeof sendChatMessage$1> & typeof sendChatMessage$1>;
|
|
191
207
|
declare const sendChatMessageStreamed: MaybeContext<BuildRESTFunction<typeof sendChatMessageStreamed$1> & typeof sendChatMessageStreamed$1>;
|
|
192
208
|
declare const persistConversationMessage: MaybeContext<BuildRESTFunction<typeof persistConversationMessage$1> & typeof persistConversationMessage$1>;
|
|
@@ -206,4 +222,4 @@ declare const deletePersonaChat: MaybeContext<BuildRESTFunction<typeof deletePer
|
|
|
206
222
|
declare const bulkDeletePersonaChatsByPersona: MaybeContext<BuildRESTFunction<typeof bulkDeletePersonaChatsByPersona$1> & typeof bulkDeletePersonaChatsByPersona$1>;
|
|
207
223
|
declare const generateConversationOutcome: MaybeContext<BuildRESTFunction<typeof generateConversationOutcome$1> & typeof generateConversationOutcome$1>;
|
|
208
224
|
|
|
209
|
-
export { BulkDeletePersonaChatsByPersonaOptions, BulkDeletePersonaChatsByPersonaResponse, CreateInteractiveConversationOptions, CreateInteractiveConversationResponse, CreatePersonaChatOptions, CreateVoiceConversationOptions, CreateVoiceConversationResponse, DeletePersonaChatOptions, EndInteractiveConversationOptions, GenerateChatCompletionsStreamWithVendorOptions, GenerateChatCompletionsWithVendorOptions, GenerateConversationOutcomeOptions, GenerateConversationOutcomeResponse, GetInteractiveConversationIdentifiers, GetInteractiveConversationOptions, GetInteractiveConversationResponse, GetPermissionsOptions, GetPermissionsResponse, GetPersonaChatContextApplicationErrors, GetPersonaChatContextResponse, GetPersonaChatOptions, ListPersonaChatsOptions, ListPersonaChatsResponse, PersistConversationMessageOptions, PersistConversationMessageResponse, PersonaChat, QueryChatMessagesOptions, QueryChatMessagesResponse, QueryPersonaChatsOptions, QueryPersonaChatsResponse, RawHttpResponse, RetrievePersonaKnowledgeApplicationErrors, RetrievePersonaKnowledgeOptions, RetrievePersonaKnowledgeResponse, SendChatMessageOptions, SendChatMessageResponse, SendChatMessageStreamedOptions, SwitchConfigOptions, UpsertKnowledgeSnippetApplicationErrors, UpsertKnowledgeSnippetOptions, UpsertKnowledgeSnippetResponse, bulkDeletePersonaChatsByPersona, createInteractiveConversation, createPersonaChat, createVoiceConversation, deletePersonaChat, endInteractiveConversation, generateChatCompletionsStreamWithVendor, generateChatCompletionsWithVendor, generateConversationOutcome, getInteractiveConversation, getPermissions, getPersonaChat, getPersonaChatContext, listPersonaChats, persistConversationMessage, queryChatMessages, queryPersonaChats, retrievePersonaKnowledge, sendChatMessage, sendChatMessageStreamed, switchConfig, upsertKnowledgeSnippet };
|
|
225
|
+
export { BulkDeletePersonaChatsByPersonaOptions, BulkDeletePersonaChatsByPersonaResponse, CreateInteractiveConversationOptions, CreateInteractiveConversationResponse, CreatePersonaChatOptions, CreateVoiceConversationOptions, CreateVoiceConversationResponse, DeletePersonaChatOptions, EndInteractiveConversationOptions, GenerateChatCompletionsStreamWithVendorOptions, GenerateChatCompletionsWithVendorOptions, GenerateConversationOutcomeOptions, GenerateConversationOutcomeResponse, GetInteractiveConversationIdentifiers, GetInteractiveConversationOptions, GetInteractiveConversationResponse, GetPermissionsOptions, GetPermissionsResponse, GetPersonaChatContextApplicationErrors, GetPersonaChatContextResponse, GetPersonaChatOptions, GetVisitorChatAttachmentIdentifiers, GetVisitorChatAttachmentResponse, ListPersonaChatsOptions, ListPersonaChatsResponse, PersistConversationMessageOptions, PersistConversationMessageResponse, PersonaChat, QueryChatMessagesOptions, QueryChatMessagesResponse, QueryPersonaChatsOptions, QueryPersonaChatsResponse, RawHttpResponse, RetrievePersonaKnowledgeApplicationErrors, RetrievePersonaKnowledgeOptions, RetrievePersonaKnowledgeResponse, SendChatMessageOptions, SendChatMessageResponse, SendChatMessageStreamedOptions, SwitchConfigOptions, UploadVisitorChatAttachmentOptions, UploadVisitorChatAttachmentResponse, UpsertKnowledgeSnippetApplicationErrors, UpsertKnowledgeSnippetOptions, UpsertKnowledgeSnippetResponse, bulkDeletePersonaChatsByPersona, createInteractiveConversation, createPersonaChat, createVoiceConversation, deletePersonaChat, endInteractiveConversation, generateChatCompletionsStreamWithVendor, generateChatCompletionsWithVendor, generateConversationOutcome, getInteractiveConversation, getPermissions, getPersonaChat, getPersonaChatContext, getVisitorChatAttachment, listPersonaChats, persistConversationMessage, queryChatMessages, queryPersonaChats, retrievePersonaKnowledge, sendChatMessage, sendChatMessageStreamed, switchConfig, uploadVisitorChatAttachment, upsertKnowledgeSnippet };
|
package/build/cjs/index.js
CHANGED
|
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
|
57
57
|
getPermissions: () => getPermissions4,
|
|
58
58
|
getPersonaChat: () => getPersonaChat4,
|
|
59
59
|
getPersonaChatContext: () => getPersonaChatContext4,
|
|
60
|
+
getVisitorChatAttachment: () => getVisitorChatAttachment4,
|
|
60
61
|
listPersonaChats: () => listPersonaChats4,
|
|
61
62
|
persistConversationMessage: () => persistConversationMessage4,
|
|
62
63
|
queryChatMessages: () => queryChatMessages4,
|
|
@@ -65,6 +66,7 @@ __export(index_exports, {
|
|
|
65
66
|
sendChatMessage: () => sendChatMessage4,
|
|
66
67
|
sendChatMessageStreamed: () => sendChatMessageStreamed4,
|
|
67
68
|
switchConfig: () => switchConfig4,
|
|
69
|
+
uploadVisitorChatAttachment: () => uploadVisitorChatAttachment4,
|
|
68
70
|
upsertKnowledgeSnippet: () => upsertKnowledgeSnippet4
|
|
69
71
|
});
|
|
70
72
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -366,6 +368,48 @@ function retrievePersonaKnowledge(payload) {
|
|
|
366
368
|
}
|
|
367
369
|
return __retrievePersonaKnowledge;
|
|
368
370
|
}
|
|
371
|
+
function uploadVisitorChatAttachment(payload) {
|
|
372
|
+
function __uploadVisitorChatAttachment({ host }) {
|
|
373
|
+
const metadata = {
|
|
374
|
+
entityFqdn: "wix.legends.persona.v1.chat",
|
|
375
|
+
method: "POST",
|
|
376
|
+
methodFqn: "wix.legends.chat.v1.PersonaChatService.UploadVisitorChatAttachment",
|
|
377
|
+
packageName: PACKAGE_NAME,
|
|
378
|
+
migrationOptions: {
|
|
379
|
+
optInTransformResponse: true
|
|
380
|
+
},
|
|
381
|
+
url: resolveWixLegendsChatV1PersonaChatServiceUrl({
|
|
382
|
+
protoPath: "/v1/chats/{chatId}/visitor-attachments",
|
|
383
|
+
data: payload,
|
|
384
|
+
host
|
|
385
|
+
}),
|
|
386
|
+
data: payload
|
|
387
|
+
};
|
|
388
|
+
return metadata;
|
|
389
|
+
}
|
|
390
|
+
return __uploadVisitorChatAttachment;
|
|
391
|
+
}
|
|
392
|
+
function getVisitorChatAttachment(payload) {
|
|
393
|
+
function __getVisitorChatAttachment({ host }) {
|
|
394
|
+
const metadata = {
|
|
395
|
+
entityFqdn: "wix.legends.persona.v1.chat",
|
|
396
|
+
method: "GET",
|
|
397
|
+
methodFqn: "wix.legends.chat.v1.PersonaChatService.GetVisitorChatAttachment",
|
|
398
|
+
packageName: PACKAGE_NAME,
|
|
399
|
+
migrationOptions: {
|
|
400
|
+
optInTransformResponse: true
|
|
401
|
+
},
|
|
402
|
+
url: resolveWixLegendsChatV1PersonaChatServiceUrl({
|
|
403
|
+
protoPath: "/v1/chats/{chatId}/visitor-attachments/{attachmentId}",
|
|
404
|
+
data: payload,
|
|
405
|
+
host
|
|
406
|
+
}),
|
|
407
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
408
|
+
};
|
|
409
|
+
return metadata;
|
|
410
|
+
}
|
|
411
|
+
return __getVisitorChatAttachment;
|
|
412
|
+
}
|
|
369
413
|
function sendChatMessage(payload) {
|
|
370
414
|
function __sendChatMessage({ host }) {
|
|
371
415
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1175,6 +1219,68 @@ async function retrievePersonaKnowledge2(chatId, options) {
|
|
|
1175
1219
|
throw transformedError;
|
|
1176
1220
|
}
|
|
1177
1221
|
}
|
|
1222
|
+
async function uploadVisitorChatAttachment2(chatId, fileName, options) {
|
|
1223
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1224
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1225
|
+
chatId,
|
|
1226
|
+
fileName,
|
|
1227
|
+
mimeType: options?.mimeType,
|
|
1228
|
+
contentBase64: options?.contentBase64
|
|
1229
|
+
});
|
|
1230
|
+
const reqOpts = uploadVisitorChatAttachment(payload);
|
|
1231
|
+
sideEffects?.onSiteCall?.();
|
|
1232
|
+
try {
|
|
1233
|
+
const result = await httpClient.request(reqOpts);
|
|
1234
|
+
sideEffects?.onSuccess?.(result);
|
|
1235
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1236
|
+
} catch (err) {
|
|
1237
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1238
|
+
err,
|
|
1239
|
+
{
|
|
1240
|
+
spreadPathsToArguments: {},
|
|
1241
|
+
explicitPathsToArguments: {
|
|
1242
|
+
chatId: "$[0]",
|
|
1243
|
+
fileName: "$[1]",
|
|
1244
|
+
mimeType: "$[2].mimeType",
|
|
1245
|
+
contentBase64: "$[2].contentBase64"
|
|
1246
|
+
},
|
|
1247
|
+
singleArgumentUnchanged: false
|
|
1248
|
+
},
|
|
1249
|
+
["chatId", "fileName", "options"]
|
|
1250
|
+
);
|
|
1251
|
+
sideEffects?.onError?.(err);
|
|
1252
|
+
throw transformedError;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
async function getVisitorChatAttachment2(identifiers) {
|
|
1256
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1257
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1258
|
+
chatId: identifiers?.chatId,
|
|
1259
|
+
attachmentId: identifiers?.attachmentId
|
|
1260
|
+
});
|
|
1261
|
+
const reqOpts = getVisitorChatAttachment(payload);
|
|
1262
|
+
sideEffects?.onSiteCall?.();
|
|
1263
|
+
try {
|
|
1264
|
+
const result = await httpClient.request(reqOpts);
|
|
1265
|
+
sideEffects?.onSuccess?.(result);
|
|
1266
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1267
|
+
} catch (err) {
|
|
1268
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1269
|
+
err,
|
|
1270
|
+
{
|
|
1271
|
+
spreadPathsToArguments: {},
|
|
1272
|
+
explicitPathsToArguments: {
|
|
1273
|
+
chatId: "$[0].chatId",
|
|
1274
|
+
attachmentId: "$[0].attachmentId"
|
|
1275
|
+
},
|
|
1276
|
+
singleArgumentUnchanged: false
|
|
1277
|
+
},
|
|
1278
|
+
["identifiers"]
|
|
1279
|
+
);
|
|
1280
|
+
sideEffects?.onError?.(err);
|
|
1281
|
+
throw transformedError;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1178
1284
|
async function sendChatMessage2(chatId, options) {
|
|
1179
1285
|
const { httpClient, sideEffects } = arguments[2];
|
|
1180
1286
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1869,6 +1975,22 @@ function retrievePersonaKnowledge3(httpClient) {
|
|
|
1869
1975
|
{ httpClient }
|
|
1870
1976
|
);
|
|
1871
1977
|
}
|
|
1978
|
+
function uploadVisitorChatAttachment3(httpClient) {
|
|
1979
|
+
return (chatId, fileName, options) => uploadVisitorChatAttachment2(
|
|
1980
|
+
chatId,
|
|
1981
|
+
fileName,
|
|
1982
|
+
options,
|
|
1983
|
+
// @ts-ignore
|
|
1984
|
+
{ httpClient }
|
|
1985
|
+
);
|
|
1986
|
+
}
|
|
1987
|
+
function getVisitorChatAttachment3(httpClient) {
|
|
1988
|
+
return (identifiers) => getVisitorChatAttachment2(
|
|
1989
|
+
identifiers,
|
|
1990
|
+
// @ts-ignore
|
|
1991
|
+
{ httpClient }
|
|
1992
|
+
);
|
|
1993
|
+
}
|
|
1872
1994
|
function sendChatMessage3(httpClient) {
|
|
1873
1995
|
return (chatId, options) => sendChatMessage2(
|
|
1874
1996
|
chatId,
|
|
@@ -2017,6 +2139,8 @@ var createPersonaChat4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModu
|
|
|
2017
2139
|
var getPersonaChat4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPersonaChat3);
|
|
2018
2140
|
var getPersonaChatContext4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPersonaChatContext3);
|
|
2019
2141
|
var retrievePersonaKnowledge4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(retrievePersonaKnowledge3);
|
|
2142
|
+
var uploadVisitorChatAttachment4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(uploadVisitorChatAttachment3);
|
|
2143
|
+
var getVisitorChatAttachment4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getVisitorChatAttachment3);
|
|
2020
2144
|
var sendChatMessage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(sendChatMessage3);
|
|
2021
2145
|
var sendChatMessageStreamed4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(sendChatMessageStreamed3);
|
|
2022
2146
|
var persistConversationMessage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(persistConversationMessage3);
|
|
@@ -2076,6 +2200,7 @@ var generateConversationOutcome4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
2076
2200
|
getPermissions,
|
|
2077
2201
|
getPersonaChat,
|
|
2078
2202
|
getPersonaChatContext,
|
|
2203
|
+
getVisitorChatAttachment,
|
|
2079
2204
|
listPersonaChats,
|
|
2080
2205
|
persistConversationMessage,
|
|
2081
2206
|
queryChatMessages,
|
|
@@ -2084,6 +2209,7 @@ var generateConversationOutcome4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
2084
2209
|
sendChatMessage,
|
|
2085
2210
|
sendChatMessageStreamed,
|
|
2086
2211
|
switchConfig,
|
|
2212
|
+
uploadVisitorChatAttachment,
|
|
2087
2213
|
upsertKnowledgeSnippet
|
|
2088
2214
|
});
|
|
2089
2215
|
//# sourceMappingURL=index.js.map
|