@wix/auto_sdk_legends_persona-chats 1.0.26 → 1.0.28
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 +134 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +135 -2
- package/build/cjs/index.typings.js +116 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +101 -3
- package/build/cjs/meta.js +90 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +19 -3
- package/build/es/index.mjs +131 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +135 -2
- package/build/es/index.typings.mjs +113 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +101 -3
- package/build/es/meta.mjs +87 -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 +135 -2
- package/build/internal/cjs/meta.d.ts +101 -3
- package/build/internal/es/index.d.mts +19 -3
- package/build/internal/es/index.typings.d.mts +135 -2
- package/build/internal/es/meta.d.mts +101 -3
- 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, KnowledgeRetrievalCompleted, KnowledgeRetrieved, KnowledgeSnippet, KnowledgeSnippetCreationTriggered, KnowledgeSourceOptionsOneOf, Limitation, LimitationType, LimitationTypeWithLiterals, ListPersonaChatsRequest, MessageEnvelope, MessageSource, MessageSourceWithLiterals, MessageStatus, MessageStatusWithLiterals, MessageType, MessageTypeWithLiterals, Metadata, Mode, ModeWithLiterals, 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
|
@@ -31,6 +31,7 @@ __export(index_exports, {
|
|
|
31
31
|
MessageSource: () => MessageSource,
|
|
32
32
|
MessageStatus: () => MessageStatus,
|
|
33
33
|
MessageType: () => MessageType,
|
|
34
|
+
Mode: () => Mode,
|
|
34
35
|
Namespace: () => Namespace,
|
|
35
36
|
ParticipantType: () => ParticipantType,
|
|
36
37
|
Role: () => Role,
|
|
@@ -57,6 +58,7 @@ __export(index_exports, {
|
|
|
57
58
|
getPermissions: () => getPermissions4,
|
|
58
59
|
getPersonaChat: () => getPersonaChat4,
|
|
59
60
|
getPersonaChatContext: () => getPersonaChatContext4,
|
|
61
|
+
getVisitorChatAttachment: () => getVisitorChatAttachment4,
|
|
60
62
|
listPersonaChats: () => listPersonaChats4,
|
|
61
63
|
persistConversationMessage: () => persistConversationMessage4,
|
|
62
64
|
queryChatMessages: () => queryChatMessages4,
|
|
@@ -65,6 +67,7 @@ __export(index_exports, {
|
|
|
65
67
|
sendChatMessage: () => sendChatMessage4,
|
|
66
68
|
sendChatMessageStreamed: () => sendChatMessageStreamed4,
|
|
67
69
|
switchConfig: () => switchConfig4,
|
|
70
|
+
uploadVisitorChatAttachment: () => uploadVisitorChatAttachment4,
|
|
68
71
|
upsertKnowledgeSnippet: () => upsertKnowledgeSnippet4
|
|
69
72
|
});
|
|
70
73
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -366,6 +369,48 @@ function retrievePersonaKnowledge(payload) {
|
|
|
366
369
|
}
|
|
367
370
|
return __retrievePersonaKnowledge;
|
|
368
371
|
}
|
|
372
|
+
function uploadVisitorChatAttachment(payload) {
|
|
373
|
+
function __uploadVisitorChatAttachment({ host }) {
|
|
374
|
+
const metadata = {
|
|
375
|
+
entityFqdn: "wix.legends.persona.v1.chat",
|
|
376
|
+
method: "POST",
|
|
377
|
+
methodFqn: "wix.legends.chat.v1.PersonaChatService.UploadVisitorChatAttachment",
|
|
378
|
+
packageName: PACKAGE_NAME,
|
|
379
|
+
migrationOptions: {
|
|
380
|
+
optInTransformResponse: true
|
|
381
|
+
},
|
|
382
|
+
url: resolveWixLegendsChatV1PersonaChatServiceUrl({
|
|
383
|
+
protoPath: "/v1/chats/{chatId}/visitor-attachments",
|
|
384
|
+
data: payload,
|
|
385
|
+
host
|
|
386
|
+
}),
|
|
387
|
+
data: payload
|
|
388
|
+
};
|
|
389
|
+
return metadata;
|
|
390
|
+
}
|
|
391
|
+
return __uploadVisitorChatAttachment;
|
|
392
|
+
}
|
|
393
|
+
function getVisitorChatAttachment(payload) {
|
|
394
|
+
function __getVisitorChatAttachment({ host }) {
|
|
395
|
+
const metadata = {
|
|
396
|
+
entityFqdn: "wix.legends.persona.v1.chat",
|
|
397
|
+
method: "GET",
|
|
398
|
+
methodFqn: "wix.legends.chat.v1.PersonaChatService.GetVisitorChatAttachment",
|
|
399
|
+
packageName: PACKAGE_NAME,
|
|
400
|
+
migrationOptions: {
|
|
401
|
+
optInTransformResponse: true
|
|
402
|
+
},
|
|
403
|
+
url: resolveWixLegendsChatV1PersonaChatServiceUrl({
|
|
404
|
+
protoPath: "/v1/chats/{chatId}/visitor-attachments/{attachmentId}",
|
|
405
|
+
data: payload,
|
|
406
|
+
host
|
|
407
|
+
}),
|
|
408
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
409
|
+
};
|
|
410
|
+
return metadata;
|
|
411
|
+
}
|
|
412
|
+
return __getVisitorChatAttachment;
|
|
413
|
+
}
|
|
369
414
|
function sendChatMessage(payload) {
|
|
370
415
|
function __sendChatMessage({ host }) {
|
|
371
416
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1049,6 +1094,12 @@ var State = /* @__PURE__ */ ((State2) => {
|
|
|
1049
1094
|
State2["DELETED"] = "DELETED";
|
|
1050
1095
|
return State2;
|
|
1051
1096
|
})(State || {});
|
|
1097
|
+
var Mode = /* @__PURE__ */ ((Mode2) => {
|
|
1098
|
+
Mode2["UNKNOWN_MODE"] = "UNKNOWN_MODE";
|
|
1099
|
+
Mode2["PUBLISHED"] = "PUBLISHED";
|
|
1100
|
+
Mode2["PREVIEW"] = "PREVIEW";
|
|
1101
|
+
return Mode2;
|
|
1102
|
+
})(Mode || {});
|
|
1052
1103
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
1053
1104
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1054
1105
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -1175,6 +1226,68 @@ async function retrievePersonaKnowledge2(chatId, options) {
|
|
|
1175
1226
|
throw transformedError;
|
|
1176
1227
|
}
|
|
1177
1228
|
}
|
|
1229
|
+
async function uploadVisitorChatAttachment2(chatId, fileName, options) {
|
|
1230
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1231
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1232
|
+
chatId,
|
|
1233
|
+
fileName,
|
|
1234
|
+
mimeType: options?.mimeType,
|
|
1235
|
+
contentBase64: options?.contentBase64
|
|
1236
|
+
});
|
|
1237
|
+
const reqOpts = uploadVisitorChatAttachment(payload);
|
|
1238
|
+
sideEffects?.onSiteCall?.();
|
|
1239
|
+
try {
|
|
1240
|
+
const result = await httpClient.request(reqOpts);
|
|
1241
|
+
sideEffects?.onSuccess?.(result);
|
|
1242
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1243
|
+
} catch (err) {
|
|
1244
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1245
|
+
err,
|
|
1246
|
+
{
|
|
1247
|
+
spreadPathsToArguments: {},
|
|
1248
|
+
explicitPathsToArguments: {
|
|
1249
|
+
chatId: "$[0]",
|
|
1250
|
+
fileName: "$[1]",
|
|
1251
|
+
mimeType: "$[2].mimeType",
|
|
1252
|
+
contentBase64: "$[2].contentBase64"
|
|
1253
|
+
},
|
|
1254
|
+
singleArgumentUnchanged: false
|
|
1255
|
+
},
|
|
1256
|
+
["chatId", "fileName", "options"]
|
|
1257
|
+
);
|
|
1258
|
+
sideEffects?.onError?.(err);
|
|
1259
|
+
throw transformedError;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
async function getVisitorChatAttachment2(identifiers) {
|
|
1263
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1264
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1265
|
+
chatId: identifiers?.chatId,
|
|
1266
|
+
attachmentId: identifiers?.attachmentId
|
|
1267
|
+
});
|
|
1268
|
+
const reqOpts = getVisitorChatAttachment(payload);
|
|
1269
|
+
sideEffects?.onSiteCall?.();
|
|
1270
|
+
try {
|
|
1271
|
+
const result = await httpClient.request(reqOpts);
|
|
1272
|
+
sideEffects?.onSuccess?.(result);
|
|
1273
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1274
|
+
} catch (err) {
|
|
1275
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1276
|
+
err,
|
|
1277
|
+
{
|
|
1278
|
+
spreadPathsToArguments: {},
|
|
1279
|
+
explicitPathsToArguments: {
|
|
1280
|
+
chatId: "$[0].chatId",
|
|
1281
|
+
attachmentId: "$[0].attachmentId"
|
|
1282
|
+
},
|
|
1283
|
+
singleArgumentUnchanged: false
|
|
1284
|
+
},
|
|
1285
|
+
["identifiers"]
|
|
1286
|
+
);
|
|
1287
|
+
sideEffects?.onError?.(err);
|
|
1288
|
+
throw transformedError;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1178
1291
|
async function sendChatMessage2(chatId, options) {
|
|
1179
1292
|
const { httpClient, sideEffects } = arguments[2];
|
|
1180
1293
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1869,6 +1982,22 @@ function retrievePersonaKnowledge3(httpClient) {
|
|
|
1869
1982
|
{ httpClient }
|
|
1870
1983
|
);
|
|
1871
1984
|
}
|
|
1985
|
+
function uploadVisitorChatAttachment3(httpClient) {
|
|
1986
|
+
return (chatId, fileName, options) => uploadVisitorChatAttachment2(
|
|
1987
|
+
chatId,
|
|
1988
|
+
fileName,
|
|
1989
|
+
options,
|
|
1990
|
+
// @ts-ignore
|
|
1991
|
+
{ httpClient }
|
|
1992
|
+
);
|
|
1993
|
+
}
|
|
1994
|
+
function getVisitorChatAttachment3(httpClient) {
|
|
1995
|
+
return (identifiers) => getVisitorChatAttachment2(
|
|
1996
|
+
identifiers,
|
|
1997
|
+
// @ts-ignore
|
|
1998
|
+
{ httpClient }
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
1872
2001
|
function sendChatMessage3(httpClient) {
|
|
1873
2002
|
return (chatId, options) => sendChatMessage2(
|
|
1874
2003
|
chatId,
|
|
@@ -2017,6 +2146,8 @@ var createPersonaChat4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModu
|
|
|
2017
2146
|
var getPersonaChat4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPersonaChat3);
|
|
2018
2147
|
var getPersonaChatContext4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPersonaChatContext3);
|
|
2019
2148
|
var retrievePersonaKnowledge4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(retrievePersonaKnowledge3);
|
|
2149
|
+
var uploadVisitorChatAttachment4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(uploadVisitorChatAttachment3);
|
|
2150
|
+
var getVisitorChatAttachment4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getVisitorChatAttachment3);
|
|
2020
2151
|
var sendChatMessage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(sendChatMessage3);
|
|
2021
2152
|
var sendChatMessageStreamed4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(sendChatMessageStreamed3);
|
|
2022
2153
|
var persistConversationMessage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(persistConversationMessage3);
|
|
@@ -2050,6 +2181,7 @@ var generateConversationOutcome4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
2050
2181
|
MessageSource,
|
|
2051
2182
|
MessageStatus,
|
|
2052
2183
|
MessageType,
|
|
2184
|
+
Mode,
|
|
2053
2185
|
Namespace,
|
|
2054
2186
|
ParticipantType,
|
|
2055
2187
|
Role,
|
|
@@ -2076,6 +2208,7 @@ var generateConversationOutcome4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
2076
2208
|
getPermissions,
|
|
2077
2209
|
getPersonaChat,
|
|
2078
2210
|
getPersonaChatContext,
|
|
2211
|
+
getVisitorChatAttachment,
|
|
2079
2212
|
listPersonaChats,
|
|
2080
2213
|
persistConversationMessage,
|
|
2081
2214
|
queryChatMessages,
|
|
@@ -2084,6 +2217,7 @@ var generateConversationOutcome4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
2084
2217
|
sendChatMessage,
|
|
2085
2218
|
sendChatMessageStreamed,
|
|
2086
2219
|
switchConfig,
|
|
2220
|
+
uploadVisitorChatAttachment,
|
|
2087
2221
|
upsertKnowledgeSnippet
|
|
2088
2222
|
});
|
|
2089
2223
|
//# sourceMappingURL=index.js.map
|