mitra-interactions-sdk 1.0.58-beta.6 → 1.0.58-beta.8
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/dist/index.d.mts +34 -6
- package/dist/index.d.ts +34 -6
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -536,10 +536,30 @@ interface AgentMessage {
|
|
|
536
536
|
createdAt: string;
|
|
537
537
|
metadata?: Record<string, unknown> | null;
|
|
538
538
|
}
|
|
539
|
-
|
|
539
|
+
type ChatManageAction = 'list' | 'rename' | 'delete';
|
|
540
|
+
interface ManageAgentChatListOptions {
|
|
541
|
+
action: 'list';
|
|
540
542
|
/** Sobrescreve o projectId configurado globalmente. */
|
|
541
543
|
projectId?: number;
|
|
542
544
|
}
|
|
545
|
+
interface ManageAgentChatRenameOptions {
|
|
546
|
+
action: 'rename';
|
|
547
|
+
taskId: string;
|
|
548
|
+
name: string;
|
|
549
|
+
}
|
|
550
|
+
interface ManageAgentChatDeleteOptions {
|
|
551
|
+
action: 'delete';
|
|
552
|
+
taskId: string;
|
|
553
|
+
}
|
|
554
|
+
type ManageAgentChatOptions = ManageAgentChatListOptions | ManageAgentChatRenameOptions | ManageAgentChatDeleteOptions;
|
|
555
|
+
interface RenameAgentChatResult {
|
|
556
|
+
taskId: string;
|
|
557
|
+
name: string;
|
|
558
|
+
}
|
|
559
|
+
interface DeleteAgentChatResult {
|
|
560
|
+
taskId: string;
|
|
561
|
+
deleted: boolean;
|
|
562
|
+
}
|
|
543
563
|
interface GetAgentTaskCreateOptions {
|
|
544
564
|
/** Cria chat novo. taskId é preenchido depois do primeiro send(). */
|
|
545
565
|
create: true;
|
|
@@ -849,8 +869,8 @@ interface MitraInstance {
|
|
|
849
869
|
sendPasswordResetCode(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
850
870
|
validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
851
871
|
resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
852
|
-
getAgentChats(options?: GetAgentChatsOptions): Promise<AgentChat[]>;
|
|
853
872
|
getAgentTask(options: GetAgentTaskOptions): AgentTaskSession;
|
|
873
|
+
manageAgentChat(options: ManageAgentChatOptions): Promise<unknown>;
|
|
854
874
|
manageAgentCredential(options: ManageAgentCredentialOptions | ConnectAgentCredentialOptions): Promise<unknown>;
|
|
855
875
|
openChat(): void;
|
|
856
876
|
closeChat(): void;
|
|
@@ -984,7 +1004,7 @@ declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Reco
|
|
|
984
1004
|
* Mitra Interactions SDK — Agent Chat
|
|
985
1005
|
*
|
|
986
1006
|
* Hub do WebSocket compartilhado e factories da API pública:
|
|
987
|
-
* -
|
|
1007
|
+
* - manageAgentChatMitra({ action: 'list' | 'rename' | 'delete', ... })
|
|
988
1008
|
* - getAgentTaskMitra({ create | taskId, ... })
|
|
989
1009
|
*
|
|
990
1010
|
* O WS é singleton: todas as sessions usam UMA conexão. O roteamento
|
|
@@ -995,9 +1015,17 @@ declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Reco
|
|
|
995
1015
|
*/
|
|
996
1016
|
|
|
997
1017
|
/**
|
|
998
|
-
*
|
|
1018
|
+
* Gerencia os chats do user (coleção) — espelha `manageAgentCredentialMitra`.
|
|
1019
|
+
* Operações stateless: listar, renomear, deletar.
|
|
1020
|
+
*
|
|
1021
|
+
* @example
|
|
1022
|
+
* const chats = await manageAgentChatMitra({ action: 'list' });
|
|
1023
|
+
* await manageAgentChatMitra({ action: 'rename', taskId, name: 'Novo nome' });
|
|
1024
|
+
* await manageAgentChatMitra({ action: 'delete', taskId });
|
|
999
1025
|
*/
|
|
1000
|
-
declare function
|
|
1026
|
+
declare function manageAgentChatMitra(options: ManageAgentChatListOptions): Promise<AgentChat[]>;
|
|
1027
|
+
declare function manageAgentChatMitra(options: ManageAgentChatRenameOptions): Promise<RenameAgentChatResult>;
|
|
1028
|
+
declare function manageAgentChatMitra(options: ManageAgentChatDeleteOptions): Promise<DeleteAgentChatResult>;
|
|
1001
1029
|
/**
|
|
1002
1030
|
* Abre um handle de chat (session). Use:
|
|
1003
1031
|
* - `{ create: true }` para iniciar um chat novo
|
|
@@ -1218,4 +1246,4 @@ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Prom
|
|
|
1218
1246
|
*/
|
|
1219
1247
|
declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
|
|
1220
1248
|
|
|
1221
|
-
export { type AgentApiKeyTarget, type AgentAuthMeta, type AgentChat, type AgentDeltaEvent, type AgentErrorEvent, type AgentMessage, type AgentModelGroup, type AgentModelOption, type AgentProviderListItem, type AgentQueueChangeEvent, type AgentStatusChangeEvent, type AgentSubscriptionAccount, type AgentSubscriptionTarget, type AgentTaskCreatedEvent, type AgentTaskEventMap, type AgentTaskEventName, type AgentTaskSession, type AgentTaskStatus, type AgentToolEvent, type AgentTurnEndEvent, type AgentType, type AuthAgentCredentialOptions, type AuthAgentCredentialResult, type AuthClaudeResult, type AuthCodexResult, type AuthMethod, type CallIntegrationOptions, type CallIntegrationResponse, type ConnectAgentCredentialOptions, type ConnectAgentSubscriptionResult, type ConnectableSubscriptionTarget, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type CredentialAccessType, type CredentialAction, type CredentialTarget, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type
|
|
1249
|
+
export { type AgentApiKeyTarget, type AgentAuthMeta, type AgentChat, type AgentDeltaEvent, type AgentErrorEvent, type AgentMessage, type AgentModelGroup, type AgentModelOption, type AgentProviderListItem, type AgentQueueChangeEvent, type AgentStatusChangeEvent, type AgentSubscriptionAccount, type AgentSubscriptionTarget, type AgentTaskCreatedEvent, type AgentTaskEventMap, type AgentTaskEventName, type AgentTaskSession, type AgentTaskStatus, type AgentToolEvent, type AgentTurnEndEvent, type AgentType, type AuthAgentCredentialOptions, type AuthAgentCredentialResult, type AuthClaudeResult, type AuthCodexResult, type AuthMethod, type CallIntegrationOptions, type CallIntegrationResponse, type ChatManageAction, type ConnectAgentCredentialOptions, type ConnectAgentSubscriptionResult, type ConnectableSubscriptionTarget, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type CredentialAccessType, type CredentialAction, type CredentialTarget, type DeleteAgentChatResult, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetAgentTaskCreateOptions, type GetAgentTaskOpenOptions, type GetAgentTaskOptions, type GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListAgentModelsResult, type ListAgentProvidersResult, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type ManageAgentChatDeleteOptions, type ManageAgentChatListOptions, type ManageAgentChatOptions, type ManageAgentChatRenameOptions, type ManageAgentCredentialOptions, type ManageAgentCredentialResult, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type QueuedItem, type RenameAgentChatResult, type ResetPasswordOptions, type RunActionOptions, type RunActionResponse, type SendOptions, type SendPasswordResetCodeOptions, type SetFileStatusOptions, type SetFileStatusResponse, type SetProfileActionsOptions, type SetProfileDmlTablesOptions, type SetProfilePermissionResponse, type SetProfileScreensOptions, type SetProfileSelectTablesOptions, type SetProfileServerFunctionsOptions, type SetProfileUsersOptions, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateProfileOptions, type UpdateProfileResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, type ValidatePasswordResetCodeOptions, callIntegrationMitra, closeChatMitra, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDataLoaderMitra, executeDbActionMitra, executePublicServerFunctionAsyncMitra, executePublicServerFunctionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getAgentTaskMitra, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, manageAgentChatMitra, manageAgentCredentialMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resetPasswordMitra, resolveProjectId, runActionMitra, sendPasswordResetCodeMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra, validatePasswordResetCodeMitra };
|
package/dist/index.d.ts
CHANGED
|
@@ -536,10 +536,30 @@ interface AgentMessage {
|
|
|
536
536
|
createdAt: string;
|
|
537
537
|
metadata?: Record<string, unknown> | null;
|
|
538
538
|
}
|
|
539
|
-
|
|
539
|
+
type ChatManageAction = 'list' | 'rename' | 'delete';
|
|
540
|
+
interface ManageAgentChatListOptions {
|
|
541
|
+
action: 'list';
|
|
540
542
|
/** Sobrescreve o projectId configurado globalmente. */
|
|
541
543
|
projectId?: number;
|
|
542
544
|
}
|
|
545
|
+
interface ManageAgentChatRenameOptions {
|
|
546
|
+
action: 'rename';
|
|
547
|
+
taskId: string;
|
|
548
|
+
name: string;
|
|
549
|
+
}
|
|
550
|
+
interface ManageAgentChatDeleteOptions {
|
|
551
|
+
action: 'delete';
|
|
552
|
+
taskId: string;
|
|
553
|
+
}
|
|
554
|
+
type ManageAgentChatOptions = ManageAgentChatListOptions | ManageAgentChatRenameOptions | ManageAgentChatDeleteOptions;
|
|
555
|
+
interface RenameAgentChatResult {
|
|
556
|
+
taskId: string;
|
|
557
|
+
name: string;
|
|
558
|
+
}
|
|
559
|
+
interface DeleteAgentChatResult {
|
|
560
|
+
taskId: string;
|
|
561
|
+
deleted: boolean;
|
|
562
|
+
}
|
|
543
563
|
interface GetAgentTaskCreateOptions {
|
|
544
564
|
/** Cria chat novo. taskId é preenchido depois do primeiro send(). */
|
|
545
565
|
create: true;
|
|
@@ -849,8 +869,8 @@ interface MitraInstance {
|
|
|
849
869
|
sendPasswordResetCode(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
850
870
|
validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
851
871
|
resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
852
|
-
getAgentChats(options?: GetAgentChatsOptions): Promise<AgentChat[]>;
|
|
853
872
|
getAgentTask(options: GetAgentTaskOptions): AgentTaskSession;
|
|
873
|
+
manageAgentChat(options: ManageAgentChatOptions): Promise<unknown>;
|
|
854
874
|
manageAgentCredential(options: ManageAgentCredentialOptions | ConnectAgentCredentialOptions): Promise<unknown>;
|
|
855
875
|
openChat(): void;
|
|
856
876
|
closeChat(): void;
|
|
@@ -984,7 +1004,7 @@ declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Reco
|
|
|
984
1004
|
* Mitra Interactions SDK — Agent Chat
|
|
985
1005
|
*
|
|
986
1006
|
* Hub do WebSocket compartilhado e factories da API pública:
|
|
987
|
-
* -
|
|
1007
|
+
* - manageAgentChatMitra({ action: 'list' | 'rename' | 'delete', ... })
|
|
988
1008
|
* - getAgentTaskMitra({ create | taskId, ... })
|
|
989
1009
|
*
|
|
990
1010
|
* O WS é singleton: todas as sessions usam UMA conexão. O roteamento
|
|
@@ -995,9 +1015,17 @@ declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Reco
|
|
|
995
1015
|
*/
|
|
996
1016
|
|
|
997
1017
|
/**
|
|
998
|
-
*
|
|
1018
|
+
* Gerencia os chats do user (coleção) — espelha `manageAgentCredentialMitra`.
|
|
1019
|
+
* Operações stateless: listar, renomear, deletar.
|
|
1020
|
+
*
|
|
1021
|
+
* @example
|
|
1022
|
+
* const chats = await manageAgentChatMitra({ action: 'list' });
|
|
1023
|
+
* await manageAgentChatMitra({ action: 'rename', taskId, name: 'Novo nome' });
|
|
1024
|
+
* await manageAgentChatMitra({ action: 'delete', taskId });
|
|
999
1025
|
*/
|
|
1000
|
-
declare function
|
|
1026
|
+
declare function manageAgentChatMitra(options: ManageAgentChatListOptions): Promise<AgentChat[]>;
|
|
1027
|
+
declare function manageAgentChatMitra(options: ManageAgentChatRenameOptions): Promise<RenameAgentChatResult>;
|
|
1028
|
+
declare function manageAgentChatMitra(options: ManageAgentChatDeleteOptions): Promise<DeleteAgentChatResult>;
|
|
1001
1029
|
/**
|
|
1002
1030
|
* Abre um handle de chat (session). Use:
|
|
1003
1031
|
* - `{ create: true }` para iniciar um chat novo
|
|
@@ -1218,4 +1246,4 @@ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Prom
|
|
|
1218
1246
|
*/
|
|
1219
1247
|
declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
|
|
1220
1248
|
|
|
1221
|
-
export { type AgentApiKeyTarget, type AgentAuthMeta, type AgentChat, type AgentDeltaEvent, type AgentErrorEvent, type AgentMessage, type AgentModelGroup, type AgentModelOption, type AgentProviderListItem, type AgentQueueChangeEvent, type AgentStatusChangeEvent, type AgentSubscriptionAccount, type AgentSubscriptionTarget, type AgentTaskCreatedEvent, type AgentTaskEventMap, type AgentTaskEventName, type AgentTaskSession, type AgentTaskStatus, type AgentToolEvent, type AgentTurnEndEvent, type AgentType, type AuthAgentCredentialOptions, type AuthAgentCredentialResult, type AuthClaudeResult, type AuthCodexResult, type AuthMethod, type CallIntegrationOptions, type CallIntegrationResponse, type ConnectAgentCredentialOptions, type ConnectAgentSubscriptionResult, type ConnectableSubscriptionTarget, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type CredentialAccessType, type CredentialAction, type CredentialTarget, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type
|
|
1249
|
+
export { type AgentApiKeyTarget, type AgentAuthMeta, type AgentChat, type AgentDeltaEvent, type AgentErrorEvent, type AgentMessage, type AgentModelGroup, type AgentModelOption, type AgentProviderListItem, type AgentQueueChangeEvent, type AgentStatusChangeEvent, type AgentSubscriptionAccount, type AgentSubscriptionTarget, type AgentTaskCreatedEvent, type AgentTaskEventMap, type AgentTaskEventName, type AgentTaskSession, type AgentTaskStatus, type AgentToolEvent, type AgentTurnEndEvent, type AgentType, type AuthAgentCredentialOptions, type AuthAgentCredentialResult, type AuthClaudeResult, type AuthCodexResult, type AuthMethod, type CallIntegrationOptions, type CallIntegrationResponse, type ChatManageAction, type ConnectAgentCredentialOptions, type ConnectAgentSubscriptionResult, type ConnectableSubscriptionTarget, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type CredentialAccessType, type CredentialAction, type CredentialTarget, type DeleteAgentChatResult, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetAgentTaskCreateOptions, type GetAgentTaskOpenOptions, type GetAgentTaskOptions, type GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListAgentModelsResult, type ListAgentProvidersResult, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type ManageAgentChatDeleteOptions, type ManageAgentChatListOptions, type ManageAgentChatOptions, type ManageAgentChatRenameOptions, type ManageAgentCredentialOptions, type ManageAgentCredentialResult, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type QueuedItem, type RenameAgentChatResult, type ResetPasswordOptions, type RunActionOptions, type RunActionResponse, type SendOptions, type SendPasswordResetCodeOptions, type SetFileStatusOptions, type SetFileStatusResponse, type SetProfileActionsOptions, type SetProfileDmlTablesOptions, type SetProfilePermissionResponse, type SetProfileScreensOptions, type SetProfileSelectTablesOptions, type SetProfileServerFunctionsOptions, type SetProfileUsersOptions, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateProfileOptions, type UpdateProfileResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, type ValidatePasswordResetCodeOptions, callIntegrationMitra, closeChatMitra, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDataLoaderMitra, executeDbActionMitra, executePublicServerFunctionAsyncMitra, executePublicServerFunctionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getAgentTaskMitra, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, manageAgentChatMitra, manageAgentCredentialMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resetPasswordMitra, resolveProjectId, runActionMitra, sendPasswordResetCodeMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra, validatePasswordResetCodeMitra };
|
package/dist/index.js
CHANGED
|
@@ -919,9 +919,22 @@ var transport = {
|
|
|
919
919
|
function getTransport() {
|
|
920
920
|
return transport;
|
|
921
921
|
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
922
|
+
function manageAgentChatMitra(options) {
|
|
923
|
+
var _a;
|
|
924
|
+
if (options.action === "list") {
|
|
925
|
+
const projectId = resolveProjectId2(options.projectId);
|
|
926
|
+
return transport.request("chats", { action: "list", projectId });
|
|
927
|
+
}
|
|
928
|
+
if (options.action === "rename") {
|
|
929
|
+
if (!options.taskId) throw new Error("manageAgentChatMitra(rename): taskId obrigat\xF3rio.");
|
|
930
|
+
if (!((_a = options.name) == null ? void 0 : _a.trim())) throw new Error("manageAgentChatMitra(rename): name obrigat\xF3rio.");
|
|
931
|
+
return transport.request("chats", { action: "rename", taskId: options.taskId, name: options.name.trim() });
|
|
932
|
+
}
|
|
933
|
+
if (options.action === "delete") {
|
|
934
|
+
if (!options.taskId) throw new Error("manageAgentChatMitra(delete): taskId obrigat\xF3rio.");
|
|
935
|
+
return transport.request("chats", { action: "delete", taskId: options.taskId });
|
|
936
|
+
}
|
|
937
|
+
throw new Error(`manageAgentChatMitra: action inv\xE1lida (${options.action}).`);
|
|
925
938
|
}
|
|
926
939
|
function getAgentTaskMitra(options) {
|
|
927
940
|
if ("taskId" in options && options.taskId) {
|
|
@@ -1391,12 +1404,12 @@ function createMitraInstance(initialConfig) {
|
|
|
1391
1404
|
return resetPasswordMitra({ ...options, authUrl: (_a2 = options.authUrl) != null ? _a2 : _config.authUrl });
|
|
1392
1405
|
},
|
|
1393
1406
|
// Agent Chat (embedded)
|
|
1394
|
-
getAgentChats(options) {
|
|
1395
|
-
return getAgentChatsMitra(options);
|
|
1396
|
-
},
|
|
1397
1407
|
getAgentTask(options) {
|
|
1398
1408
|
return getAgentTaskMitra(options);
|
|
1399
1409
|
},
|
|
1410
|
+
manageAgentChat(options) {
|
|
1411
|
+
return manageAgentChatMitra(options);
|
|
1412
|
+
},
|
|
1400
1413
|
manageAgentCredential(options) {
|
|
1401
1414
|
return manageAgentCredentialMitra(options);
|
|
1402
1415
|
},
|
|
@@ -1925,7 +1938,6 @@ exports.executePublicServerFunctionAsyncMitra = executePublicServerFunctionAsync
|
|
|
1925
1938
|
exports.executePublicServerFunctionMitra = executePublicServerFunctionMitra;
|
|
1926
1939
|
exports.executeServerFunctionAsyncMitra = executeServerFunctionAsyncMitra;
|
|
1927
1940
|
exports.executeServerFunctionMitra = executeServerFunctionMitra;
|
|
1928
|
-
exports.getAgentChatsMitra = getAgentChatsMitra;
|
|
1929
1941
|
exports.getAgentTaskMitra = getAgentTaskMitra;
|
|
1930
1942
|
exports.getConfig = getConfig;
|
|
1931
1943
|
exports.getProfileDetailsMitra = getProfileDetailsMitra;
|
|
@@ -1940,6 +1952,7 @@ exports.loginMitra = loginMitra;
|
|
|
1940
1952
|
exports.loginWithEmailMitra = loginWithEmailMitra;
|
|
1941
1953
|
exports.loginWithGoogleMitra = loginWithGoogleMitra;
|
|
1942
1954
|
exports.loginWithMicrosoftMitra = loginWithMicrosoftMitra;
|
|
1955
|
+
exports.manageAgentChatMitra = manageAgentChatMitra;
|
|
1943
1956
|
exports.manageAgentCredentialMitra = manageAgentCredentialMitra;
|
|
1944
1957
|
exports.openChatMitra = openChatMitra;
|
|
1945
1958
|
exports.patchRecordMitra = patchRecordMitra;
|