mitra-interactions-sdk 1.0.36 → 1.0.37

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mitra Interactions SDK
2
2
 
3
- SDK para interações com a plataforma Mitra via endpoints `/agentAiShortcut/`.
3
+ SDK para interações com a plataforma Mitra via endpoints `/interactions/`.
4
4
 
5
5
  ## Instalação
6
6
 
@@ -91,7 +91,7 @@ await loginMitra('mitra', {
91
91
  Navega o usuário para a página de auth. Após o login, redireciona de volta com token nos query params.
92
92
 
93
93
  ```typescript
94
- import { loginMitra, handleAuthRedirect } from 'mitra-interactions-sdk';
94
+ import { loginMitra } from 'mitra-interactions-sdk';
95
95
 
96
96
  // Iniciar login — o navegador navega para fora da página
97
97
  await loginMitra('google', {
@@ -114,25 +114,6 @@ await loginMitra('mitra', {
114
114
  });
115
115
  ```
116
116
 
117
- ### Processar Retorno do Redirect
118
-
119
- Após o redirect, a página de destino deve chamar `handleAuthRedirect()` para capturar o token:
120
-
121
- ```typescript
122
- import { handleAuthRedirect, configureSdkMitra } from 'mitra-interactions-sdk';
123
-
124
- // No mounted/onLoad da página de retorno
125
- const session = handleAuthRedirect();
126
- if (session) {
127
- // Login OK — session: { token, baseURL, integrationURL? }
128
- configureSdkMitra({
129
- baseURL: session.baseURL,
130
- token: session.token,
131
- integrationURL: session.integrationURL
132
- });
133
- }
134
- ```
135
-
136
117
  ### Token Refresh Automático
137
118
 
138
119
  Quando qualquer requisição retorna **403**, o SDK tenta renovar o token automaticamente via iframe invisível (usa o cookie de sessão do provider). Se o refresh funcionar, a requisição é retentada com o novo token — transparente para o desenvolvedor.
@@ -227,24 +208,6 @@ await executeDbActionMitra({ dbActionId: 1 });
227
208
 
228
209
  ## Métodos Disponíveis
229
210
 
230
- ### executeDbActionMitra
231
-
232
- Executa uma DBAction (DML) cadastrada.
233
-
234
- ```typescript
235
- import { executeDbActionMitra } from 'mitra-interactions-sdk';
236
-
237
- const result = await executeDbActionMitra({
238
- projectId: 123,
239
- dbActionId: 456,
240
- params: { // Opcional
241
- campo1: 'valor1',
242
- campo2: 'valor2'
243
- }
244
- });
245
- // result: { status, result: { rowsAffected: number } }
246
- ```
247
-
248
211
  ### executeServerFunctionMitra
249
212
 
250
213
  Executa uma Server Function de forma **síncrona** (timeout de 60s no backend). Retorna o resultado diretamente.
@@ -293,39 +256,6 @@ const result = await stopServerFunctionExecutionMitra({
293
256
  // result: { status, result: { executionId, executionStatus: "CANCELLED" | "ALREADY_FINISHED" } }
294
257
  ```
295
258
 
296
- ### Integrações
297
-
298
- > **Requisito:** A `integrationURL` deve ser configurada via `configureSdkMitra({ ..., integrationURL: 'https://api0.mitraecp.com:1003' })`.
299
-
300
- #### listIntegrationsMitra
301
-
302
- Lista as integrações configuradas no projeto.
303
-
304
- ```typescript
305
- import { listIntegrationsMitra } from 'mitra-interactions-sdk';
306
-
307
- const integrations = await listIntegrationsMitra({ projectId: 123 });
308
- // result: IntegrationResponse[] — [{ id, projectId, name, slug, blueprintId, blueprintType, authType, credentials, status, lastCheckedAt, createdAt, updatedAt }]
309
- ```
310
-
311
- #### callIntegrationMitra
312
-
313
- Chama uma integração configurada, delegando a requisição ao serviço externo.
314
-
315
- ```typescript
316
- import { callIntegrationMitra } from 'mitra-interactions-sdk';
317
-
318
- const result = await callIntegrationMitra({
319
- projectId: 123,
320
- connection: 'meu-erp', // Slug da integração
321
- method: 'GET', // GET, POST, PUT, DELETE
322
- endpoint: '/api/v1/pedidos', // Path no serviço externo (opcional)
323
- params: { status: 'ativo' }, // Query params (opcional)
324
- body: { nome: 'Teste' } // Body para POST/PUT (opcional)
325
- });
326
- // result: { statusCode: number, body: any }
327
- ```
328
-
329
259
  ### uploadFilePublicMitra / uploadFileLoadableMitra
330
260
 
331
261
  Faz upload de um arquivo diretamente para a pasta PUBLIC ou LOADABLE do projeto. Usa `multipart/form-data`.
@@ -348,75 +278,6 @@ const result2 = await uploadFileLoadableMitra({
348
278
  // result2: { status, result: { fileName, currentPath, publicUrl: null, message } }
349
279
  ```
350
280
 
351
- ### setFileStatusMitra
352
-
353
- Move arquivo do chat para PUBLIC ou LOADABLE.
354
-
355
- ```typescript
356
- import { setFileStatusMitra } from 'mitra-interactions-sdk';
357
-
358
- const result = await setFileStatusMitra({
359
- projectId: 123,
360
- fileName: 'arquivo.jpg',
361
- targetPath: 'PUBLIC' // 'PUBLIC' ou 'LOADABLE'
362
- });
363
- // result: { status, result: { fileName, currentPath, publicUrl, message } }
364
- ```
365
-
366
- ### setVariableMitra
367
-
368
- Cria ou atualiza uma variável customizada.
369
-
370
- ```typescript
371
- import { setVariableMitra } from 'mitra-interactions-sdk';
372
-
373
- const result = await setVariableMitra({
374
- projectId: 123,
375
- key: 'minhaVariavel',
376
- value: 'meuValor' // Opcional
377
- });
378
- // result: { status, result: { key, value } }
379
- ```
380
-
381
- ### listVariablesMitra
382
-
383
- Lista variáveis de um projeto.
384
-
385
- ```typescript
386
- import { listVariablesMitra } from 'mitra-interactions-sdk';
387
-
388
- const result = await listVariablesMitra({ projectId: 123 });
389
- // result: { status, projectId, result: [{ key, value }] }
390
- ```
391
-
392
- ### getVariableMitra
393
-
394
- Busca o valor de uma variável específica.
395
-
396
- ```typescript
397
- import { getVariableMitra } from 'mitra-interactions-sdk';
398
-
399
- const result = await getVariableMitra({ projectId: 123, key: 'minhaVariavel' });
400
- // result: { status, result: { key, value } }
401
- ```
402
-
403
- ### runActionMitra
404
-
405
- Executa uma Action (fluxo de ação Low-Code) cadastrada.
406
-
407
- ```typescript
408
- import { runActionMitra } from 'mitra-interactions-sdk';
409
-
410
- const result = await runActionMitra({
411
- projectId: 123,
412
- actionId: 456,
413
- params: { // Opcional
414
- campo1: 'valor1'
415
- }
416
- });
417
- // result: { status, executionTime, result: { stepsExecuted, message } }
418
- ```
419
-
420
281
  ### Dynamic Schema CRUD
421
282
 
422
283
  CRUD completo em tabelas do projeto via Dynamic Schema (usa header `X-TenantID`).
@@ -484,18 +345,10 @@ import type {
484
345
  EmailVerifyCodeOptions,
485
346
  EmailResendCodeOptions,
486
347
  // Options
487
- ExecuteDbActionOptions,
488
348
  ExecuteServerFunctionOptions,
489
349
  ExecuteServerFunctionAsyncOptions,
490
- ListIntegrationsOptions,
491
- CallIntegrationOptions,
492
350
  UploadFileOptions,
493
351
  StopServerFunctionExecutionOptions,
494
- SetFileStatusOptions,
495
- SetVariableOptions,
496
- ListVariablesOptions,
497
- GetVariableOptions,
498
- RunActionOptions,
499
352
  ListRecordsOptions,
500
353
  GetRecordOptions,
501
354
  CreateRecordOptions,
@@ -504,16 +357,8 @@ import type {
504
357
  DeleteRecordOptions,
505
358
  CreateRecordsBatchOptions,
506
359
  // Responses
507
- ExecuteDbActionResponse,
508
- SetFileStatusResponse,
509
- SetVariableResponse,
510
- ListVariablesResponse,
511
- GetVariableResponse,
512
- RunActionResponse,
513
360
  ExecuteServerFunctionResponse,
514
361
  ExecuteServerFunctionAsyncResponse,
515
- IntegrationResponse,
516
- CallIntegrationResponse,
517
362
  UploadFileResponse,
518
363
  StopServerFunctionExecutionResponse,
519
364
  ListRecordsResponse
package/dist/index.d.mts CHANGED
@@ -85,8 +85,8 @@ interface ExecuteDbActionOptions {
85
85
  projectId?: number;
86
86
  /** ID da DBAction cadastrada */
87
87
  dbActionId: number;
88
- /** Variáveis para o statement (opcional) */
89
- params?: Record<string, unknown>;
88
+ /** Parâmetros de entrada (opcional) — substituição de variáveis no SQL (ex: { "nome": "João" } substitui :nome) */
89
+ input?: Record<string, unknown>;
90
90
  }
91
91
  interface ExecuteDbActionResponse {
92
92
  status: string;
@@ -260,8 +260,8 @@ interface RunActionOptions {
260
260
  projectId?: number;
261
261
  /** ID da Action a executar */
262
262
  actionId: number;
263
- /** Variáveis para a action (opcional) */
264
- params?: Record<string, unknown>;
263
+ /** Parâmetros de entrada para a action (opcional) */
264
+ input?: Record<string, unknown>;
265
265
  }
266
266
  interface RunActionResponse {
267
267
  status: string;
@@ -405,19 +405,6 @@ declare function loginWithMicrosoftMitra(options?: LoginOptions): Promise<LoginR
405
405
  * Login genérico via popup/redirect seguro Mitra.
406
406
  */
407
407
  declare function loginMitra(method: 'email' | 'google' | 'microsoft' | 'mitra', options?: LoginOptions): Promise<LoginResponse>;
408
- /**
409
- * Processa o retorno de um login com mode 'redirect'.
410
- *
411
- * Após o redirect, a página de auth redireciona de volta com query params:
412
- * ?tokenMitra={token}&backURLMitra={baseURL}&integrationURLMitra={integrationURL}
413
- *
414
- * Esta função:
415
- * - Lê os query params da URL atual
416
- * - Se `tokenMitra=error`, lança erro
417
- * - Se encontrou tokens, limpa a URL e retorna LoginResponse
418
- * - Se não encontrou nada, retorna null
419
- */
420
- declare function handleAuthRedirect(): LoginResponse | null;
421
408
  /**
422
409
  * Renova o token silenciosamente via iframe invisível.
423
410
  * Se já houver um refresh em andamento, reaproveita a mesma promise.
@@ -452,73 +439,73 @@ declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginRespo
452
439
  */
453
440
 
454
441
  /**
455
- * POST /agentAiShortcut/runQuery
442
+ * POST /interactions/runQuery
456
443
  * Executa query SELECT em um projeto
457
444
  */
458
445
  declare function runQueryMitra(options: RunQueryOptions): Promise<RunQueryResponse>;
459
446
  /**
460
- * POST /agentAiShortcut/executeDbAction
447
+ * POST /interactions/executeDbAction
461
448
  * Executa uma DBAction (DML) cadastrada
462
449
  */
463
450
  declare function executeDbActionMitra(options: ExecuteDbActionOptions): Promise<ExecuteDbActionResponse>;
464
451
  /**
465
- * POST /agentAiShortcut/setFileStatus
452
+ * POST /interactions/setFileStatus
466
453
  * Move arquivo do chat para PUBLIC ou LOADABLE
467
454
  */
468
455
  declare function setFileStatusMitra(options: SetFileStatusOptions): Promise<SetFileStatusResponse>;
469
456
  /**
470
- * POST /agentAiShortcut/setVariable
457
+ * POST /interactions/setVariable
471
458
  * Cria ou atualiza uma variável customizada
472
459
  */
473
460
  declare function setVariableMitra(options: SetVariableOptions): Promise<SetVariableResponse>;
474
461
  /**
475
- * GET /agentAiShortcut/listVariables?projectId={id}
462
+ * GET /interactions/listVariables?projectId={id}
476
463
  * Lista variáveis de um projeto
477
464
  */
478
465
  declare function listVariablesMitra(options?: ListVariablesOptions): Promise<ListVariablesResponse>;
479
466
  /**
480
- * GET /agentAiShortcut/getVariable?projectId={id}&key={key}
467
+ * GET /interactions/getVariable?projectId={id}&key={key}
481
468
  * Busca o valor de uma variável específica
482
469
  */
483
470
  declare function getVariableMitra(options: GetVariableOptions): Promise<GetVariableResponse>;
484
471
  /**
485
- * POST /agentAiShortcut/runAction
472
+ * POST /interactions/runAction
486
473
  * Executa uma Action (fluxo de ação) cadastrada
487
474
  */
488
475
  declare function runActionMitra(options: RunActionOptions): Promise<RunActionResponse>;
489
476
  /**
490
- * POST /agentAiShortcut/executeServerFunction
477
+ * POST /interactions/executeServerFunction
491
478
  * Executa uma Server Function de forma SÍNCRONA (timeout 60s no backend)
492
479
  */
493
480
  declare function executeServerFunctionMitra(options: ExecuteServerFunctionOptions): Promise<ExecuteServerFunctionResponse>;
494
481
  /**
495
- * POST /agentAiShortcut/executeServerFunctionAsync
482
+ * POST /interactions/executeServerFunctionAsync
496
483
  * Executa uma Server Function de forma ASSÍNCRONA (retorna executionId imediatamente)
497
484
  */
498
485
  declare function executeServerFunctionAsyncMitra(options: ExecuteServerFunctionAsyncOptions): Promise<ExecuteServerFunctionAsyncResponse>;
499
486
  /**
500
- * GET /integration?projectId=X
487
+ * GET /interactions/integrations?projectId=X
501
488
  * Lista integrações configuradas no projeto
502
489
  */
503
490
  declare function listIntegrationsMitra(options?: ListIntegrationsOptions): Promise<IntegrationResponse[]>;
504
491
  /**
505
- * POST /integration/call
506
- * Chama uma API externa via serviço de integrações (porta separada)
492
+ * POST /interactions/integrations/call
493
+ * Chama uma API externa via serviço de integrações
507
494
  * Mapeia connection → integrationSlug no body
508
495
  */
509
496
  declare function callIntegrationMitra(options: CallIntegrationOptions): Promise<CallIntegrationResponse>;
510
497
  /**
511
- * POST /agentAiShortcut/stopServerFunctionExecution
498
+ * POST /interactions/stopServerFunctionExecution
512
499
  * Para a execução de uma Server Function em andamento
513
500
  */
514
501
  declare function stopServerFunctionExecutionMitra(options: StopServerFunctionExecutionOptions): Promise<StopServerFunctionExecutionResponse>;
515
502
  /**
516
- * POST /agentAiShortcut/uploadFilePublic (multipart/form-data)
503
+ * POST /interactions/uploadFilePublic (multipart/form-data)
517
504
  * Faz upload de um arquivo para a pasta PUBLIC do projeto.
518
505
  */
519
506
  declare function uploadFilePublicMitra(options: UploadFileOptions): Promise<UploadFileResponse>;
520
507
  /**
521
- * POST /agentAiShortcut/uploadFileLoadable (multipart/form-data)
508
+ * POST /interactions/uploadFileLoadable (multipart/form-data)
522
509
  * Faz upload de um arquivo para a pasta LOADABLE do projeto.
523
510
  */
524
511
  declare function uploadFileLoadableMitra(options: UploadFileOptions): Promise<UploadFileResponse>;
@@ -530,4 +517,4 @@ declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<s
530
517
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
531
518
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
532
519
 
533
- export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type RunActionOptions, type RunActionResponse, type RunQueryOptions, type RunQueryResponse, type SetFileStatusOptions, type SetFileStatusResponse, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, getVariableMitra, handleAuthRedirect, listIntegrationsMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };
520
+ export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type RunActionOptions, type RunActionResponse, type RunQueryOptions, type RunQueryResponse, type SetFileStatusOptions, type SetFileStatusResponse, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, getVariableMitra, listIntegrationsMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };
package/dist/index.d.ts CHANGED
@@ -85,8 +85,8 @@ interface ExecuteDbActionOptions {
85
85
  projectId?: number;
86
86
  /** ID da DBAction cadastrada */
87
87
  dbActionId: number;
88
- /** Variáveis para o statement (opcional) */
89
- params?: Record<string, unknown>;
88
+ /** Parâmetros de entrada (opcional) — substituição de variáveis no SQL (ex: { "nome": "João" } substitui :nome) */
89
+ input?: Record<string, unknown>;
90
90
  }
91
91
  interface ExecuteDbActionResponse {
92
92
  status: string;
@@ -260,8 +260,8 @@ interface RunActionOptions {
260
260
  projectId?: number;
261
261
  /** ID da Action a executar */
262
262
  actionId: number;
263
- /** Variáveis para a action (opcional) */
264
- params?: Record<string, unknown>;
263
+ /** Parâmetros de entrada para a action (opcional) */
264
+ input?: Record<string, unknown>;
265
265
  }
266
266
  interface RunActionResponse {
267
267
  status: string;
@@ -405,19 +405,6 @@ declare function loginWithMicrosoftMitra(options?: LoginOptions): Promise<LoginR
405
405
  * Login genérico via popup/redirect seguro Mitra.
406
406
  */
407
407
  declare function loginMitra(method: 'email' | 'google' | 'microsoft' | 'mitra', options?: LoginOptions): Promise<LoginResponse>;
408
- /**
409
- * Processa o retorno de um login com mode 'redirect'.
410
- *
411
- * Após o redirect, a página de auth redireciona de volta com query params:
412
- * ?tokenMitra={token}&backURLMitra={baseURL}&integrationURLMitra={integrationURL}
413
- *
414
- * Esta função:
415
- * - Lê os query params da URL atual
416
- * - Se `tokenMitra=error`, lança erro
417
- * - Se encontrou tokens, limpa a URL e retorna LoginResponse
418
- * - Se não encontrou nada, retorna null
419
- */
420
- declare function handleAuthRedirect(): LoginResponse | null;
421
408
  /**
422
409
  * Renova o token silenciosamente via iframe invisível.
423
410
  * Se já houver um refresh em andamento, reaproveita a mesma promise.
@@ -452,73 +439,73 @@ declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginRespo
452
439
  */
453
440
 
454
441
  /**
455
- * POST /agentAiShortcut/runQuery
442
+ * POST /interactions/runQuery
456
443
  * Executa query SELECT em um projeto
457
444
  */
458
445
  declare function runQueryMitra(options: RunQueryOptions): Promise<RunQueryResponse>;
459
446
  /**
460
- * POST /agentAiShortcut/executeDbAction
447
+ * POST /interactions/executeDbAction
461
448
  * Executa uma DBAction (DML) cadastrada
462
449
  */
463
450
  declare function executeDbActionMitra(options: ExecuteDbActionOptions): Promise<ExecuteDbActionResponse>;
464
451
  /**
465
- * POST /agentAiShortcut/setFileStatus
452
+ * POST /interactions/setFileStatus
466
453
  * Move arquivo do chat para PUBLIC ou LOADABLE
467
454
  */
468
455
  declare function setFileStatusMitra(options: SetFileStatusOptions): Promise<SetFileStatusResponse>;
469
456
  /**
470
- * POST /agentAiShortcut/setVariable
457
+ * POST /interactions/setVariable
471
458
  * Cria ou atualiza uma variável customizada
472
459
  */
473
460
  declare function setVariableMitra(options: SetVariableOptions): Promise<SetVariableResponse>;
474
461
  /**
475
- * GET /agentAiShortcut/listVariables?projectId={id}
462
+ * GET /interactions/listVariables?projectId={id}
476
463
  * Lista variáveis de um projeto
477
464
  */
478
465
  declare function listVariablesMitra(options?: ListVariablesOptions): Promise<ListVariablesResponse>;
479
466
  /**
480
- * GET /agentAiShortcut/getVariable?projectId={id}&key={key}
467
+ * GET /interactions/getVariable?projectId={id}&key={key}
481
468
  * Busca o valor de uma variável específica
482
469
  */
483
470
  declare function getVariableMitra(options: GetVariableOptions): Promise<GetVariableResponse>;
484
471
  /**
485
- * POST /agentAiShortcut/runAction
472
+ * POST /interactions/runAction
486
473
  * Executa uma Action (fluxo de ação) cadastrada
487
474
  */
488
475
  declare function runActionMitra(options: RunActionOptions): Promise<RunActionResponse>;
489
476
  /**
490
- * POST /agentAiShortcut/executeServerFunction
477
+ * POST /interactions/executeServerFunction
491
478
  * Executa uma Server Function de forma SÍNCRONA (timeout 60s no backend)
492
479
  */
493
480
  declare function executeServerFunctionMitra(options: ExecuteServerFunctionOptions): Promise<ExecuteServerFunctionResponse>;
494
481
  /**
495
- * POST /agentAiShortcut/executeServerFunctionAsync
482
+ * POST /interactions/executeServerFunctionAsync
496
483
  * Executa uma Server Function de forma ASSÍNCRONA (retorna executionId imediatamente)
497
484
  */
498
485
  declare function executeServerFunctionAsyncMitra(options: ExecuteServerFunctionAsyncOptions): Promise<ExecuteServerFunctionAsyncResponse>;
499
486
  /**
500
- * GET /integration?projectId=X
487
+ * GET /interactions/integrations?projectId=X
501
488
  * Lista integrações configuradas no projeto
502
489
  */
503
490
  declare function listIntegrationsMitra(options?: ListIntegrationsOptions): Promise<IntegrationResponse[]>;
504
491
  /**
505
- * POST /integration/call
506
- * Chama uma API externa via serviço de integrações (porta separada)
492
+ * POST /interactions/integrations/call
493
+ * Chama uma API externa via serviço de integrações
507
494
  * Mapeia connection → integrationSlug no body
508
495
  */
509
496
  declare function callIntegrationMitra(options: CallIntegrationOptions): Promise<CallIntegrationResponse>;
510
497
  /**
511
- * POST /agentAiShortcut/stopServerFunctionExecution
498
+ * POST /interactions/stopServerFunctionExecution
512
499
  * Para a execução de uma Server Function em andamento
513
500
  */
514
501
  declare function stopServerFunctionExecutionMitra(options: StopServerFunctionExecutionOptions): Promise<StopServerFunctionExecutionResponse>;
515
502
  /**
516
- * POST /agentAiShortcut/uploadFilePublic (multipart/form-data)
503
+ * POST /interactions/uploadFilePublic (multipart/form-data)
517
504
  * Faz upload de um arquivo para a pasta PUBLIC do projeto.
518
505
  */
519
506
  declare function uploadFilePublicMitra(options: UploadFileOptions): Promise<UploadFileResponse>;
520
507
  /**
521
- * POST /agentAiShortcut/uploadFileLoadable (multipart/form-data)
508
+ * POST /interactions/uploadFileLoadable (multipart/form-data)
522
509
  * Faz upload de um arquivo para a pasta LOADABLE do projeto.
523
510
  */
524
511
  declare function uploadFileLoadableMitra(options: UploadFileOptions): Promise<UploadFileResponse>;
@@ -530,4 +517,4 @@ declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<s
530
517
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
531
518
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
532
519
 
533
- export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type RunActionOptions, type RunActionResponse, type RunQueryOptions, type RunQueryResponse, type SetFileStatusOptions, type SetFileStatusResponse, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, getVariableMitra, handleAuthRedirect, listIntegrationsMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };
520
+ export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type RunActionOptions, type RunActionResponse, type RunQueryOptions, type RunQueryResponse, type SetFileStatusOptions, type SetFileStatusResponse, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, getVariableMitra, listIntegrationsMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };