mitra-interactions-sdk 1.0.55 → 1.0.56-beta.1

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 CHANGED
@@ -5,7 +5,7 @@ interface LoginOptions {
5
5
  /** URL da página de autenticação Mitra (ex: https://coder.mitralab.io/sdk-auth/). Opcional se já configurado via configureSdkMitra. */
6
6
  authUrl?: string;
7
7
  /** ID do projeto. Opcional se já configurado via configureSdkMitra. */
8
- projectId?: number;
8
+ projectId?: number | string;
9
9
  /** Modo de login: 'popup' (default) abre popup, 'redirect' navega para a página de auth. */
10
10
  mode?: 'popup' | 'redirect';
11
11
  /** URL de retorno após login com mode 'redirect'. A página de auth redirecionará de volta para esta URL com token nos query params. */
@@ -18,6 +18,8 @@ interface LoginOptions {
18
18
  interface LoginResponse {
19
19
  /** Token JWT (já com prefixo Bearer) */
20
20
  token: string;
21
+ /** Refresh token (novo Mitra). Presente apenas no novo mundo. */
22
+ refreshToken?: string;
21
23
  /** URL base da API */
22
24
  baseURL: string;
23
25
  /** URL do serviço de integrações (opcional) */
@@ -27,7 +29,7 @@ interface EmailSignupOptions {
27
29
  /** URL da página de auth (ex: https://validacao.mitralab.io/sdk-auth/). Opcional se já configurado via configureSdkMitra. */
28
30
  authUrl?: string;
29
31
  /** ID do projeto. Opcional se já configurado via configureSdkMitra. */
30
- projectId?: number;
32
+ projectId?: number | string;
31
33
  /** Nome completo do usuário */
32
34
  name: string;
33
35
  /** Email do usuário */
@@ -39,7 +41,7 @@ interface EmailLoginOptions {
39
41
  /** URL da página de auth (ex: https://validacao.mitralab.io/sdk-auth/). Opcional se já configurado via configureSdkMitra. */
40
42
  authUrl?: string;
41
43
  /** ID do projeto. Opcional se já configurado via configureSdkMitra. */
42
- projectId?: number;
44
+ projectId?: number | string;
43
45
  /** Email do usuário */
44
46
  email: string;
45
47
  /** Senha */
@@ -49,7 +51,7 @@ interface EmailVerifyCodeOptions {
49
51
  /** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
50
52
  authUrl?: string;
51
53
  /** ID do projeto. Opcional se já configurado via configureSdkMitra. */
52
- projectId?: number;
54
+ projectId?: number | string;
53
55
  /** Email do usuário */
54
56
  email: string;
55
57
  /** Código de verificação de 6 dígitos */
@@ -61,19 +63,43 @@ interface EmailResendCodeOptions {
61
63
  /** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
62
64
  authUrl?: string;
63
65
  /** ID do projeto. Opcional se já configurado via configureSdkMitra. */
64
- projectId?: number;
66
+ projectId?: number | string;
65
67
  /** Email do usuário */
66
68
  email: string;
67
69
  }
70
+ interface SendPasswordResetCodeOptions {
71
+ /** Email do usuário que esqueceu a senha */
72
+ email: string;
73
+ /** URL da página de auth (opcional — usado pra derivar a API base). Default: do config global. */
74
+ authUrl?: string;
75
+ /** Override explícito da API base (ex: https://api0.mitraecp.com:1005). Default: derivado do authUrl. */
76
+ authApiURL?: string;
77
+ }
78
+ interface ValidatePasswordResetCodeOptions {
79
+ email: string;
80
+ /** Código de 6 dígitos recebido por email */
81
+ code: string;
82
+ authUrl?: string;
83
+ authApiURL?: string;
84
+ }
85
+ interface ResetPasswordOptions {
86
+ email: string;
87
+ /** Código de 6 dígitos recebido por email */
88
+ code: string;
89
+ /** Nova senha */
90
+ newPassword: string;
91
+ authUrl?: string;
92
+ authApiURL?: string;
93
+ }
68
94
  interface ExecuteDataLoaderOptions {
69
- projectId?: number;
70
- dataLoaderId: number;
95
+ projectId?: number | string;
96
+ dataLoaderId: number | string;
71
97
  input?: Record<string, unknown>;
72
98
  }
73
99
  interface ExecuteDataLoaderResponse {
74
100
  status: string;
75
101
  result: {
76
- dataLoaderId: number;
102
+ dataLoaderId: number | string;
77
103
  executionLog: {
78
104
  timestamp: string;
79
105
  rowCount: number;
@@ -87,9 +113,9 @@ interface ExecuteDataLoaderResponse {
87
113
  }
88
114
  interface ExecuteDbActionOptions {
89
115
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
90
- projectId?: number;
116
+ projectId?: number | string;
91
117
  /** ID da DBAction cadastrada */
92
- dbActionId: number;
118
+ dbActionId: number | string;
93
119
  /** Parâmetros de entrada (opcional) — substituição de variáveis no SQL (ex: { "nome": "João" } substitui :nome) */
94
120
  input?: Record<string, unknown>;
95
121
  }
@@ -101,7 +127,7 @@ interface ExecuteDbActionResponse {
101
127
  }
102
128
  interface SetFileStatusOptions {
103
129
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
104
- projectId?: number;
130
+ projectId?: number | string;
105
131
  /** Nome do arquivo */
106
132
  fileName: string;
107
133
  /** Caminho de destino: "PUBLIC" ou "LOADABLE" */
@@ -118,7 +144,7 @@ interface SetFileStatusResponse {
118
144
  }
119
145
  interface SetVariableOptions {
120
146
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
121
- projectId?: number;
147
+ projectId?: number | string;
122
148
  /** Nome da variável (key) */
123
149
  key: string;
124
150
  /** Valor da variável (opcional) */
@@ -133,9 +159,9 @@ interface SetVariableResponse {
133
159
  }
134
160
  interface ExecuteServerFunctionOptions {
135
161
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
136
- projectId?: number;
162
+ projectId?: number | string;
137
163
  /** ID da Server Function cadastrada */
138
- serverFunctionId: number;
164
+ serverFunctionId: number | string;
139
165
  /** Objeto de entrada para a função (opcional) */
140
166
  input?: Record<string, unknown>;
141
167
  }
@@ -152,9 +178,9 @@ interface ExecuteServerFunctionResponse {
152
178
  }
153
179
  interface ExecuteServerFunctionAsyncOptions {
154
180
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
155
- projectId?: number;
181
+ projectId?: number | string;
156
182
  /** ID da Server Function cadastrada */
157
- serverFunctionId: number;
183
+ serverFunctionId: number | string;
158
184
  /** Objeto de entrada para a função (opcional) */
159
185
  input?: Record<string, unknown>;
160
186
  }
@@ -167,9 +193,9 @@ interface ExecuteServerFunctionAsyncResponse {
167
193
  }
168
194
  interface ExecutePublicServerFunctionOptions {
169
195
  /** ID do projeto (tenant) */
170
- projectId: number;
196
+ projectId: number | string;
171
197
  /** ID da Server Function (deve ter publicExecution = true) */
172
- serverFunctionId: number;
198
+ serverFunctionId: number | string;
173
199
  /** Objeto de entrada para a função (opcional) */
174
200
  input?: Record<string, unknown>;
175
201
  }
@@ -186,7 +212,7 @@ interface ExecutePublicServerFunctionAsyncResponse {
186
212
  status: string;
187
213
  }
188
214
  interface GetPublicServerFunctionExecutionOptions {
189
- projectId: number;
215
+ projectId: number | string;
190
216
  executionId: string;
191
217
  }
192
218
  interface GetPublicServerFunctionExecutionResponse {
@@ -205,54 +231,54 @@ interface ListRecordsResponse {
205
231
  totalPages: number;
206
232
  }
207
233
  interface ListRecordsOptions {
208
- projectId?: number;
234
+ projectId?: number | string;
209
235
  tableName: string;
210
236
  page?: number;
211
237
  size?: number;
212
238
  filters?: Record<string, unknown>;
213
- jdbcConnectionConfigId?: number;
239
+ jdbcConnectionConfigId?: number | string;
214
240
  }
215
241
  interface GetRecordOptions {
216
- projectId?: number;
242
+ projectId?: number | string;
217
243
  tableName: string;
218
- id: number;
219
- jdbcConnectionConfigId?: number;
244
+ id: number | string;
245
+ jdbcConnectionConfigId?: number | string;
220
246
  }
221
247
  interface CreateRecordOptions {
222
- projectId?: number;
248
+ projectId?: number | string;
223
249
  tableName: string;
224
250
  data: Record<string, unknown>;
225
- jdbcConnectionConfigId?: number;
251
+ jdbcConnectionConfigId?: number | string;
226
252
  }
227
253
  interface UpdateRecordOptions {
228
- projectId?: number;
254
+ projectId?: number | string;
229
255
  tableName: string;
230
- id: number;
256
+ id: number | string;
231
257
  data: Record<string, unknown>;
232
- jdbcConnectionConfigId?: number;
258
+ jdbcConnectionConfigId?: number | string;
233
259
  }
234
260
  interface PatchRecordOptions {
235
- projectId?: number;
261
+ projectId?: number | string;
236
262
  tableName: string;
237
- id: number;
263
+ id: number | string;
238
264
  data: Record<string, unknown>;
239
- jdbcConnectionConfigId?: number;
265
+ jdbcConnectionConfigId?: number | string;
240
266
  }
241
267
  interface DeleteRecordOptions {
242
- projectId?: number;
268
+ projectId?: number | string;
243
269
  tableName: string;
244
- id: number;
245
- jdbcConnectionConfigId?: number;
270
+ id: number | string;
271
+ jdbcConnectionConfigId?: number | string;
246
272
  }
247
273
  interface CreateRecordsBatchOptions {
248
- projectId?: number;
274
+ projectId?: number | string;
249
275
  tableName: string;
250
276
  records: Record<string, unknown>[];
251
- jdbcConnectionConfigId?: number;
277
+ jdbcConnectionConfigId?: number | string;
252
278
  }
253
279
  interface UploadFileOptions {
254
280
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
255
- projectId?: number;
281
+ projectId?: number | string;
256
282
  /** Arquivo a ser enviado (File ou Blob) */
257
283
  file: File | Blob;
258
284
  /** Habilitar debug (opcional) */
@@ -269,11 +295,11 @@ interface UploadFileResponse {
269
295
  }
270
296
  interface ListVariablesOptions {
271
297
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
272
- projectId?: number;
298
+ projectId?: number | string;
273
299
  }
274
300
  interface ListVariablesResponse {
275
301
  status: string;
276
- projectId: number;
302
+ projectId: number | string;
277
303
  result: {
278
304
  key: string;
279
305
  value: string;
@@ -281,7 +307,7 @@ interface ListVariablesResponse {
281
307
  }
282
308
  interface GetVariableOptions {
283
309
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
284
- projectId?: number;
310
+ projectId?: number | string;
285
311
  /** Nome da variável (com ou sem :VAR_) */
286
312
  key: string;
287
313
  }
@@ -294,9 +320,9 @@ interface GetVariableResponse {
294
320
  }
295
321
  interface RunActionOptions {
296
322
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
297
- projectId?: number;
323
+ projectId?: number | string;
298
324
  /** ID da Action a executar */
299
- actionId: number;
325
+ actionId: number | string;
300
326
  /** Parâmetros de entrada para a action (opcional) */
301
327
  input?: Record<string, unknown>;
302
328
  }
@@ -310,7 +336,7 @@ interface RunActionResponse {
310
336
  }
311
337
  interface CallIntegrationOptions {
312
338
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
313
- projectId?: number;
339
+ projectId?: number | string;
314
340
  /** Slug da integração configurada no painel */
315
341
  connection: string;
316
342
  /** Método HTTP: GET, POST, PUT, DELETE */
@@ -330,11 +356,11 @@ interface CallIntegrationResponse {
330
356
  }
331
357
  interface ListIntegrationsOptions {
332
358
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
333
- projectId?: number;
359
+ projectId?: number | string;
334
360
  }
335
361
  interface IntegrationResponse {
336
362
  id: string;
337
- projectId: number;
363
+ projectId: number | string;
338
364
  name: string;
339
365
  slug: string;
340
366
  blueprintId: string | null;
@@ -348,7 +374,7 @@ interface IntegrationResponse {
348
374
  }
349
375
  interface StopServerFunctionExecutionOptions {
350
376
  /** ID do projeto (opcional se já configurado via configureSdkMitra) */
351
- projectId?: number;
377
+ projectId?: number | string;
352
378
  /** ID da execução a ser parada */
353
379
  executionId: string;
354
380
  }
@@ -360,87 +386,87 @@ interface StopServerFunctionExecutionResponse {
360
386
  };
361
387
  }
362
388
  interface ListProfilesOptions {
363
- projectId?: number;
389
+ projectId?: number | string;
364
390
  }
365
391
  interface ListProfilesResponse {
366
392
  status: string;
367
- projectId: number;
393
+ projectId: number | string;
368
394
  result: {
369
- id: number;
395
+ id: number | string;
370
396
  name: string;
371
397
  color: string;
372
- homeScreenId: number;
398
+ homeScreenId: number | string;
373
399
  }[];
374
400
  }
375
401
  interface GetProfileDetailsOptions {
376
- projectId?: number;
377
- profileId: number;
402
+ projectId?: number | string;
403
+ profileId: number | string;
378
404
  }
379
405
  interface GetProfileDetailsResponse {
380
406
  status: string;
381
- projectId: number;
407
+ projectId: number | string;
382
408
  result: {
383
- id: number;
409
+ id: number | string;
384
410
  name: string;
385
411
  users: {
386
- id: number;
412
+ id: number | string;
387
413
  name: string;
388
414
  email: string;
389
415
  }[];
390
416
  selectTables: {
391
417
  tableName: string;
392
- jdbcConnectionConfigId?: number;
418
+ jdbcConnectionConfigId?: number | string;
393
419
  }[];
394
420
  dmlTables: {
395
421
  tableName: string;
396
- jdbcConnectionConfigId?: number;
422
+ jdbcConnectionConfigId?: number | string;
397
423
  }[];
398
424
  actions: {
399
- id: number;
425
+ id: number | string;
400
426
  name: string;
401
427
  }[];
402
428
  screens: {
403
- id: number;
429
+ id: number | string;
404
430
  name: string;
405
431
  }[];
406
432
  serverFunctions: {
407
- id: number;
433
+ id: number | string;
408
434
  name: string;
409
435
  }[];
410
436
  };
411
437
  }
412
438
  interface CreateProfileOptions {
413
- projectId?: number;
439
+ projectId?: number | string;
414
440
  name: string;
415
441
  color?: string;
416
- homeScreenId?: number;
442
+ homeScreenId?: number | string;
417
443
  }
418
444
  interface CreateProfileResponse {
419
445
  status: string;
420
446
  result: {
421
- id: number;
447
+ id: number | string;
422
448
  name: string;
423
449
  message: string;
424
450
  };
425
451
  }
426
452
  interface UpdateProfileOptions {
427
- projectId?: number;
428
- profileId: number;
453
+ projectId?: number | string;
454
+ profileId: number | string;
429
455
  name?: string;
430
456
  color?: string;
431
- homeScreenId?: number;
457
+ homeScreenId?: number | string;
432
458
  }
433
459
  interface UpdateProfileResponse {
434
460
  status: string;
435
461
  result: {
436
- id: number;
462
+ id: number | string;
437
463
  name: string;
438
464
  message: string;
439
465
  };
440
466
  }
441
467
  interface DeleteProfileOptions {
442
- projectId?: number;
443
- profileId: number;
468
+ projectId?: number | string;
469
+ profileId: number | string;
444
470
  }
445
471
  interface DeleteProfileResponse {
446
472
  status: string;
@@ -449,44 +475,44 @@ interface DeleteProfileResponse {
449
475
  };
450
476
  }
451
477
  interface SetProfileUsersOptions {
452
- projectId?: number;
453
- profileId: number;
478
+ projectId?: number | string;
479
+ profileId: number | string;
454
480
  userIds: number[];
455
481
  }
456
482
  interface ProfileTableRef {
457
483
  tableName: string;
458
484
  }
459
485
  interface SetProfileSelectTablesOptions {
460
- projectId?: number;
461
- profileId: number;
462
- jdbcConnectionConfigId?: number;
486
+ projectId?: number | string;
487
+ profileId: number | string;
488
+ jdbcConnectionConfigId?: number | string;
463
489
  tables: ProfileTableRef[];
464
490
  }
465
491
  interface SetProfileDmlTablesOptions {
466
- projectId?: number;
467
- profileId: number;
468
- jdbcConnectionConfigId?: number;
492
+ projectId?: number | string;
493
+ profileId: number | string;
494
+ jdbcConnectionConfigId?: number | string;
469
495
  tables: ProfileTableRef[];
470
496
  }
471
497
  interface SetProfileActionsOptions {
472
- projectId?: number;
473
- profileId: number;
498
+ projectId?: number | string;
499
+ profileId: number | string;
474
500
  actionIds: number[];
475
501
  }
476
502
  interface SetProfileScreensOptions {
477
- projectId?: number;
478
- profileId: number;
503
+ projectId?: number | string;
504
+ profileId: number | string;
479
505
  screenIds: number[];
480
506
  }
481
507
  interface SetProfileServerFunctionsOptions {
482
- projectId?: number;
483
- profileId: number;
508
+ projectId?: number | string;
509
+ profileId: number | string;
484
510
  serverFunctionIds: number[];
485
511
  }
486
512
  interface SetProfilePermissionResponse {
487
513
  status: string;
488
514
  result: {
489
- profileId: number;
515
+ profileId: number | string;
490
516
  message: string;
491
517
  [key: string]: unknown;
492
518
  };
@@ -535,6 +561,9 @@ interface MitraInstance {
535
561
  setProfileActions(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
536
562
  setProfileScreens(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
537
563
  setProfileServerFunctions(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
564
+ sendPasswordResetCode(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
565
+ validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
566
+ resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
538
567
  openChat(): void;
539
568
  closeChat(): void;
540
569
  }
@@ -545,12 +574,14 @@ interface MitraConfig {
545
574
  baseURL: string;
546
575
  /** Token JWT para autenticação (opcional para Server Functions públicas) */
547
576
  token?: string;
577
+ /** Refresh token (novo Mitra). Necessário para refresh automático no novo mundo. */
578
+ refreshToken?: string;
548
579
  /** URL base do serviço de integrações (ex: https://api0.mitraecp.com:1003) */
549
580
  integrationURL?: string;
550
581
  /** URL da página de autenticação Mitra (ex: https://coder.mitralab.io/sdk-auth/) */
551
582
  authUrl?: string;
552
583
  /** ID do projeto (usado como fallback nos métodos de login e serviços) */
553
- projectId?: number;
584
+ projectId?: number | string;
554
585
  /** Callback chamado quando o token é renovado automaticamente (após 401/403). Recebe a nova sessão. */
555
586
  onTokenRefresh?: (session: LoginResponse) => void;
556
587
  }
@@ -565,12 +596,7 @@ declare function getConfig(): MitraConfig;
565
596
  /**
566
597
  * Resolve projectId: usa o valor passado, senão pega do config salvo.
567
598
  */
568
- declare function resolveProjectId(projectId?: number): number;
569
-
570
- /**
571
- * Stop tracking user activity.
572
- */
573
- declare function stopTracking(): void;
599
+ declare function resolveProjectId(projectId?: number | string): number | string;
574
600
 
575
601
  /**
576
602
  * Mitra Interactions SDK - Chat Integration
@@ -589,56 +615,48 @@ declare function openChatMitra(): void;
589
615
  declare function closeChatMitra(): void;
590
616
 
591
617
  /**
592
- * Mitra Interactions SDK - Autenticação
618
+ * Mitra Interactions SDK - Autenticação (Router)
619
+ *
620
+ * Roteia chamadas de auth para a implementação correta com base no `authUrl`:
621
+ * - URLs legadas (`coder.mitralab.io/sdk-auth/`, `agent.mitralab.io/sdk-auth/`) → auth-legacy.ts
622
+ * - Qualquer outro authUrl → auth-new.ts (novo Mitra: Kong gateway + IAM service)
593
623
  *
594
- * Login via popup seguro hospedado no domínio Mitra.
595
- * Credenciais nunca passam pelo código do desenvolvedor.
624
+ * A API pública é idêntica à legacy. Consumers não precisam alterar código.
596
625
  */
597
626
 
598
- /**
599
- * Login com email e senha via popup/redirect seguro Mitra.
600
- */
627
+ declare function loginMitra(method: 'email' | 'google' | 'microsoft' | 'mitra', options?: LoginOptions): Promise<LoginResponse>;
601
628
  declare function loginWithEmailMitra(options?: LoginOptions): Promise<LoginResponse>;
602
- /**
603
- * Login com Google via popup/redirect seguro Mitra.
604
- */
605
629
  declare function loginWithGoogleMitra(options?: LoginOptions): Promise<LoginResponse>;
606
- /**
607
- * Login com Microsoft via popup/redirect seguro Mitra.
608
- */
609
630
  declare function loginWithMicrosoftMitra(options?: LoginOptions): Promise<LoginResponse>;
631
+ declare function emailSignupMitra(options: EmailSignupOptions): Promise<void>;
632
+ declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginResponse>;
633
+ declare function emailVerifyCodeMitra(options: EmailVerifyCodeOptions): Promise<LoginResponse>;
634
+ declare function emailResendCodeMitra(options: EmailResendCodeOptions): Promise<void>;
635
+ declare function refreshTokenSilently(authUrl: string, projectId: number | string): Promise<LoginResponse>;
636
+
610
637
  /**
611
- * Login genérico via popup/redirect seguro Mitra.
612
- */
613
- declare function loginMitra(method: 'email' | 'google' | 'microsoft' | 'mitra', options?: LoginOptions): Promise<LoginResponse>;
614
- /**
615
- * Renova o token silenciosamente via iframe invisível.
616
- * Se já houver um refresh em andamento, reaproveita a mesma promise.
617
- */
618
- declare function refreshTokenSilently(authUrl: string, projectId: number): Promise<LoginResponse>;
619
- /**
620
- * Cria conta via email usando iframe silencioso.
621
- * Após sucesso, o usuário recebe um código de verificação por email.
622
- * Fluxo: emailSignupMitra → emailVerifyCodeMitra → emailLoginMitra
638
+ * Mitra Interactions SDK - Password Reset (legacy backend)
639
+ *
640
+ * Endpoints públicos (sem auth) para fluxo de "esqueci minha senha".
641
+ * Usa um backend separado (porta 1005 ou 4133 dependendo do ambiente),
642
+ * resolvido a partir do `authUrl` configurado.
623
643
  */
624
- declare function emailSignupMitra(options: EmailSignupOptions): Promise<void>;
644
+
625
645
  /**
626
- * Verifica o código de 6 dígitos enviado por email após signup.
627
- * Após verificação, faz login automático e retorna LoginResponse.
628
- * Auto-configura o SDK após sucesso.
646
+ * POST /mitraspace/auth/resetPassword
647
+ * Envia um código de verificação por email para iniciar o fluxo de reset de senha.
629
648
  */
630
- declare function emailVerifyCodeMitra(options: EmailVerifyCodeOptions): Promise<LoginResponse>;
649
+ declare function sendPasswordResetCodeMitra(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
631
650
  /**
632
- * Reenvia o código de verificação para o email.
651
+ * POST /mitraspace/auth/resetPassword/validateCode
652
+ * Valida o código recebido por email (sem trocar a senha ainda).
633
653
  */
634
- declare function emailResendCodeMitra(options: EmailResendCodeOptions): Promise<void>;
654
+ declare function validatePasswordResetCodeMitra(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
635
655
  /**
636
- * Login via email e senha usando iframe silencioso.
637
- * O HTML de auth faz a chamada à API e resolve as credenciais do projeto.
638
- * Retorna LoginResponse com token, baseURL e integrationURL.
639
- * Auto-configura o SDK após sucesso.
656
+ * PUT /mitraspace/auth/resetPassword
657
+ * Troca a senha usando email + código + nova senha.
640
658
  */
641
- declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginResponse>;
659
+ declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
642
660
 
643
661
  /**
644
662
  * Mitra Interactions SDK - Services
@@ -795,4 +813,4 @@ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Prom
795
813
  */
796
814
  declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
797
815
 
798
- export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, 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 GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type RunActionOptions, type RunActionResponse, 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, callIntegrationMitra, closeChatMitra, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDataLoaderMitra, executeDbActionMitra, executePublicServerFunctionAsyncMitra, executePublicServerFunctionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, stopTracking, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };
816
+ export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, 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 GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type ResetPasswordOptions, type RunActionOptions, type RunActionResponse, 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, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resetPasswordMitra, resolveProjectId, runActionMitra, sendPasswordResetCodeMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra, validatePasswordResetCodeMitra };