mitra-interactions-sdk 1.0.37 → 1.0.39

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
@@ -46,7 +46,7 @@ await instance.executeServerFunction({ serverFunctionId: 42 }); // OK — sem to
46
46
  `configureSdkMitra` retorna uma `MitraInstance` que também pode ser usada diretamente:
47
47
 
48
48
  ```typescript
49
- await instance.executeDbAction({ dbActionId: 456 }); // projectId já vem do configureSdkMitra
49
+ await instance.executeServerFunction({ serverFunctionId: 42 }); // projectId já vem do configureSdkMitra
50
50
  ```
51
51
 
52
52
  ## Autenticação (Login)
@@ -329,6 +329,66 @@ const result2 = await listRecordsMitra({
329
329
  });
330
330
  ```
331
331
 
332
+ ### Profile Management
333
+
334
+ Gerenciamento de perfis de acesso. Permite gestão de quem pode acessar quais recursos no projeto.
335
+
336
+ #### CRUD de Perfis
337
+
338
+ - `listProfilesMitra({ projectId? })` → `ListProfilesResponse` - Lista todos os perfis do projeto
339
+ - `getProfileDetailsMitra({ projectId?, profileId })` → `GetProfileDetailsResponse` - Detalhes de um perfil (usuários, tabelas, actions, screens, server functions)
340
+ - `createProfileMitra({ projectId?, name, color?, homeScreenId? })` → `CreateProfileResponse` - Cria um novo perfil
341
+ - `updateProfileMitra({ projectId?, profileId, name?, color?, homeScreenId? })` → `UpdateProfileResponse` - Atualiza um perfil existente
342
+ - `deleteProfileMitra({ projectId?, profileId })` → `DeleteProfileResponse` - Deleta um perfil
343
+
344
+ ```typescript
345
+ import { listProfilesMitra, createProfileMitra, getProfileDetailsMitra } from 'mitra-interactions-sdk';
346
+
347
+ // Listar perfis
348
+ const profiles = await listProfilesMitra({ projectId: 123 });
349
+ // { status, projectId, result: [{ id, name, color, homeScreenId }] }
350
+
351
+ // Criar perfil
352
+ const created = await createProfileMitra({ projectId: 123, name: 'Vendedores', color: '#FF5733' });
353
+ // { status, result: { id, name, message } }
354
+
355
+ // Detalhes do perfil
356
+ const details = await getProfileDetailsMitra({ projectId: 123, profileId: 1 });
357
+ // { status, projectId, result: { id, name, users, selectTables, dmlTables, actions, screens, serverFunctions } }
358
+ ```
359
+
360
+ #### Permissões de Perfil
361
+
362
+ Define quais recursos cada perfil pode acessar. Todas substituem a lista atual (não fazem append).
363
+
364
+ - `setProfileUsersMitra({ projectId?, profileId, userIds })` - Define os usuários do perfil
365
+ - `setProfileSelectTablesMitra({ projectId?, profileId, jdbcConnectionConfigId?, tables })` - Define tabelas SELECT permitidas
366
+ - `setProfileDmlTablesMitra({ projectId?, profileId, jdbcConnectionConfigId?, tables })` - Define tabelas DML permitidas
367
+ - `setProfileActionsMitra({ projectId?, profileId, actionIds })` - Define actions permitidas
368
+ - `setProfileScreensMitra({ projectId?, profileId, screenIds })` - Define screens permitidas
369
+ - `setProfileServerFunctionsMitra({ projectId?, profileId, serverFunctionIds })` - Define server functions permitidas
370
+
371
+ ```typescript
372
+ import { setProfileUsersMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra } from 'mitra-interactions-sdk';
373
+
374
+ // Definir usuários do perfil
375
+ await setProfileUsersMitra({ projectId: 123, profileId: 1, userIds: [10, 20, 30] });
376
+
377
+ // Definir tabelas SELECT
378
+ await setProfileSelectTablesMitra({
379
+ projectId: 123,
380
+ profileId: 1,
381
+ jdbcConnectionConfigId: 1, // Opcional — ID da conexão JDBC (default: banco principal)
382
+ tables: [
383
+ { tableName: 'clientes' },
384
+ { tableName: 'pedidos' }
385
+ ]
386
+ });
387
+
388
+ // Definir server functions
389
+ await setProfileServerFunctionsMitra({ projectId: 123, profileId: 1, serverFunctionIds: [5, 8, 12] });
390
+ ```
391
+
332
392
  ## Tipos TypeScript
333
393
 
334
394
  Todos os tipos estão incluídos:
@@ -361,7 +421,26 @@ import type {
361
421
  ExecuteServerFunctionAsyncResponse,
362
422
  UploadFileResponse,
363
423
  StopServerFunctionExecutionResponse,
364
- ListRecordsResponse
424
+ ListRecordsResponse,
425
+ // Profile Management
426
+ ListProfilesOptions,
427
+ ListProfilesResponse,
428
+ GetProfileDetailsOptions,
429
+ GetProfileDetailsResponse,
430
+ CreateProfileOptions,
431
+ CreateProfileResponse,
432
+ UpdateProfileOptions,
433
+ UpdateProfileResponse,
434
+ DeleteProfileOptions,
435
+ DeleteProfileResponse,
436
+ SetProfileUsersOptions,
437
+ SetProfileSelectTablesOptions,
438
+ SetProfileDmlTablesOptions,
439
+ SetProfileActionsOptions,
440
+ SetProfileScreensOptions,
441
+ SetProfileServerFunctionsOptions,
442
+ ProfileTableRef,
443
+ SetProfilePermissionResponse
365
444
  } from 'mitra-interactions-sdk';
366
445
  ```
367
446
 
package/dist/index.d.mts CHANGED
@@ -322,6 +322,138 @@ interface StopServerFunctionExecutionResponse {
322
322
  executionStatus: string;
323
323
  };
324
324
  }
325
+ interface ListProfilesOptions {
326
+ projectId?: number;
327
+ }
328
+ interface ListProfilesResponse {
329
+ status: string;
330
+ projectId: number;
331
+ result: {
332
+ id: number;
333
+ name: string;
334
+ color: string;
335
+ homeScreenId: number;
336
+ }[];
337
+ }
338
+ interface GetProfileDetailsOptions {
339
+ projectId?: number;
340
+ profileId: number;
341
+ }
342
+ interface GetProfileDetailsResponse {
343
+ status: string;
344
+ projectId: number;
345
+ result: {
346
+ id: number;
347
+ name: string;
348
+ users: {
349
+ id: number;
350
+ name: string;
351
+ email: string;
352
+ }[];
353
+ selectTables: {
354
+ tableName: string;
355
+ jdbcConnectionConfigId?: number;
356
+ }[];
357
+ dmlTables: {
358
+ tableName: string;
359
+ jdbcConnectionConfigId?: number;
360
+ }[];
361
+ actions: {
362
+ id: number;
363
+ name: string;
364
+ }[];
365
+ screens: {
366
+ id: number;
367
+ name: string;
368
+ }[];
369
+ serverFunctions: {
370
+ id: number;
371
+ name: string;
372
+ }[];
373
+ };
374
+ }
375
+ interface CreateProfileOptions {
376
+ projectId?: number;
377
+ name: string;
378
+ color?: string;
379
+ homeScreenId?: number;
380
+ }
381
+ interface CreateProfileResponse {
382
+ status: string;
383
+ result: {
384
+ id: number;
385
+ name: string;
386
+ message: string;
387
+ };
388
+ }
389
+ interface UpdateProfileOptions {
390
+ projectId?: number;
391
+ profileId: number;
392
+ name?: string;
393
+ color?: string;
394
+ homeScreenId?: number;
395
+ }
396
+ interface UpdateProfileResponse {
397
+ status: string;
398
+ result: {
399
+ id: number;
400
+ name: string;
401
+ message: string;
402
+ };
403
+ }
404
+ interface DeleteProfileOptions {
405
+ projectId?: number;
406
+ profileId: number;
407
+ }
408
+ interface DeleteProfileResponse {
409
+ status: string;
410
+ result: {
411
+ message: string;
412
+ };
413
+ }
414
+ interface SetProfileUsersOptions {
415
+ projectId?: number;
416
+ profileId: number;
417
+ userIds: number[];
418
+ }
419
+ interface ProfileTableRef {
420
+ tableName: string;
421
+ }
422
+ interface SetProfileSelectTablesOptions {
423
+ projectId?: number;
424
+ profileId: number;
425
+ jdbcConnectionConfigId?: number;
426
+ tables: ProfileTableRef[];
427
+ }
428
+ interface SetProfileDmlTablesOptions {
429
+ projectId?: number;
430
+ profileId: number;
431
+ jdbcConnectionConfigId?: number;
432
+ tables: ProfileTableRef[];
433
+ }
434
+ interface SetProfileActionsOptions {
435
+ projectId?: number;
436
+ profileId: number;
437
+ actionIds: number[];
438
+ }
439
+ interface SetProfileScreensOptions {
440
+ projectId?: number;
441
+ profileId: number;
442
+ screenIds: number[];
443
+ }
444
+ interface SetProfileServerFunctionsOptions {
445
+ projectId?: number;
446
+ profileId: number;
447
+ serverFunctionIds: number[];
448
+ }
449
+ interface SetProfilePermissionResponse {
450
+ status: string;
451
+ result: {
452
+ profileId: number;
453
+ message: string;
454
+ [key: string]: unknown;
455
+ };
456
+ }
325
457
 
326
458
  /**
327
459
  * Mitra Interactions SDK - Instance
@@ -352,6 +484,17 @@ interface MitraInstance {
352
484
  patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
353
485
  deleteRecord(options: DeleteRecordOptions): Promise<void>;
354
486
  createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
487
+ listProfiles(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
488
+ getProfileDetails(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
489
+ createProfile(options: CreateProfileOptions): Promise<CreateProfileResponse>;
490
+ updateProfile(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
491
+ deleteProfile(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
492
+ setProfileUsers(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
493
+ setProfileSelectTables(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
494
+ setProfileDmlTables(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
495
+ setProfileActions(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
496
+ setProfileScreens(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
497
+ setProfileServerFunctions(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
355
498
  }
356
499
  declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
357
500
 
@@ -516,5 +659,60 @@ declare function updateRecordMitra(options: UpdateRecordOptions): Promise<Record
516
659
  declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<string, any>>;
517
660
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
518
661
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
662
+ /**
663
+ * GET /interactions/profiles?projectId={id}
664
+ * Lista todos os perfis do projeto
665
+ */
666
+ declare function listProfilesMitra(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
667
+ /**
668
+ * GET /interactions/profiles/{profileId}?projectId={id}
669
+ * Detalhes de um perfil (usuários, tabelas, actions, screens, server functions)
670
+ */
671
+ declare function getProfileDetailsMitra(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
672
+ /**
673
+ * POST /interactions/profiles
674
+ * Cria um novo perfil
675
+ */
676
+ declare function createProfileMitra(options: CreateProfileOptions): Promise<CreateProfileResponse>;
677
+ /**
678
+ * PUT /interactions/profiles
679
+ * Atualiza um perfil existente
680
+ */
681
+ declare function updateProfileMitra(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
682
+ /**
683
+ * DELETE /interactions/profiles
684
+ * Deleta um perfil
685
+ */
686
+ declare function deleteProfileMitra(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
687
+ /**
688
+ * POST /interactions/profiles/users
689
+ * Define os usuários de um perfil (substitui lista atual)
690
+ */
691
+ declare function setProfileUsersMitra(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
692
+ /**
693
+ * POST /interactions/profiles/selectTables
694
+ * Define as tabelas SELECT permitidas por perfil
695
+ */
696
+ declare function setProfileSelectTablesMitra(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
697
+ /**
698
+ * POST /interactions/profiles/dmlTables
699
+ * Define as tabelas DML permitidas por perfil
700
+ */
701
+ declare function setProfileDmlTablesMitra(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
702
+ /**
703
+ * POST /interactions/profiles/actions
704
+ * Define as actions permitidas por perfil
705
+ */
706
+ declare function setProfileActionsMitra(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
707
+ /**
708
+ * POST /interactions/profiles/screens
709
+ * Define as screens permitidas por perfil
710
+ */
711
+ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
712
+ /**
713
+ * POST /interactions/profiles/serverFunctions
714
+ * Define as server functions permitidas por perfil
715
+ */
716
+ declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
519
717
 
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 };
718
+ 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 ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetProfileDetailsOptions, type GetProfileDetailsResponse, 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 RunQueryOptions, type RunQueryResponse, 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, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getProfileDetailsMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };
package/dist/index.d.ts CHANGED
@@ -322,6 +322,138 @@ interface StopServerFunctionExecutionResponse {
322
322
  executionStatus: string;
323
323
  };
324
324
  }
325
+ interface ListProfilesOptions {
326
+ projectId?: number;
327
+ }
328
+ interface ListProfilesResponse {
329
+ status: string;
330
+ projectId: number;
331
+ result: {
332
+ id: number;
333
+ name: string;
334
+ color: string;
335
+ homeScreenId: number;
336
+ }[];
337
+ }
338
+ interface GetProfileDetailsOptions {
339
+ projectId?: number;
340
+ profileId: number;
341
+ }
342
+ interface GetProfileDetailsResponse {
343
+ status: string;
344
+ projectId: number;
345
+ result: {
346
+ id: number;
347
+ name: string;
348
+ users: {
349
+ id: number;
350
+ name: string;
351
+ email: string;
352
+ }[];
353
+ selectTables: {
354
+ tableName: string;
355
+ jdbcConnectionConfigId?: number;
356
+ }[];
357
+ dmlTables: {
358
+ tableName: string;
359
+ jdbcConnectionConfigId?: number;
360
+ }[];
361
+ actions: {
362
+ id: number;
363
+ name: string;
364
+ }[];
365
+ screens: {
366
+ id: number;
367
+ name: string;
368
+ }[];
369
+ serverFunctions: {
370
+ id: number;
371
+ name: string;
372
+ }[];
373
+ };
374
+ }
375
+ interface CreateProfileOptions {
376
+ projectId?: number;
377
+ name: string;
378
+ color?: string;
379
+ homeScreenId?: number;
380
+ }
381
+ interface CreateProfileResponse {
382
+ status: string;
383
+ result: {
384
+ id: number;
385
+ name: string;
386
+ message: string;
387
+ };
388
+ }
389
+ interface UpdateProfileOptions {
390
+ projectId?: number;
391
+ profileId: number;
392
+ name?: string;
393
+ color?: string;
394
+ homeScreenId?: number;
395
+ }
396
+ interface UpdateProfileResponse {
397
+ status: string;
398
+ result: {
399
+ id: number;
400
+ name: string;
401
+ message: string;
402
+ };
403
+ }
404
+ interface DeleteProfileOptions {
405
+ projectId?: number;
406
+ profileId: number;
407
+ }
408
+ interface DeleteProfileResponse {
409
+ status: string;
410
+ result: {
411
+ message: string;
412
+ };
413
+ }
414
+ interface SetProfileUsersOptions {
415
+ projectId?: number;
416
+ profileId: number;
417
+ userIds: number[];
418
+ }
419
+ interface ProfileTableRef {
420
+ tableName: string;
421
+ }
422
+ interface SetProfileSelectTablesOptions {
423
+ projectId?: number;
424
+ profileId: number;
425
+ jdbcConnectionConfigId?: number;
426
+ tables: ProfileTableRef[];
427
+ }
428
+ interface SetProfileDmlTablesOptions {
429
+ projectId?: number;
430
+ profileId: number;
431
+ jdbcConnectionConfigId?: number;
432
+ tables: ProfileTableRef[];
433
+ }
434
+ interface SetProfileActionsOptions {
435
+ projectId?: number;
436
+ profileId: number;
437
+ actionIds: number[];
438
+ }
439
+ interface SetProfileScreensOptions {
440
+ projectId?: number;
441
+ profileId: number;
442
+ screenIds: number[];
443
+ }
444
+ interface SetProfileServerFunctionsOptions {
445
+ projectId?: number;
446
+ profileId: number;
447
+ serverFunctionIds: number[];
448
+ }
449
+ interface SetProfilePermissionResponse {
450
+ status: string;
451
+ result: {
452
+ profileId: number;
453
+ message: string;
454
+ [key: string]: unknown;
455
+ };
456
+ }
325
457
 
326
458
  /**
327
459
  * Mitra Interactions SDK - Instance
@@ -352,6 +484,17 @@ interface MitraInstance {
352
484
  patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
353
485
  deleteRecord(options: DeleteRecordOptions): Promise<void>;
354
486
  createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
487
+ listProfiles(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
488
+ getProfileDetails(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
489
+ createProfile(options: CreateProfileOptions): Promise<CreateProfileResponse>;
490
+ updateProfile(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
491
+ deleteProfile(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
492
+ setProfileUsers(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
493
+ setProfileSelectTables(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
494
+ setProfileDmlTables(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
495
+ setProfileActions(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
496
+ setProfileScreens(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
497
+ setProfileServerFunctions(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
355
498
  }
356
499
  declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
357
500
 
@@ -516,5 +659,60 @@ declare function updateRecordMitra(options: UpdateRecordOptions): Promise<Record
516
659
  declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<string, any>>;
517
660
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
518
661
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
662
+ /**
663
+ * GET /interactions/profiles?projectId={id}
664
+ * Lista todos os perfis do projeto
665
+ */
666
+ declare function listProfilesMitra(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
667
+ /**
668
+ * GET /interactions/profiles/{profileId}?projectId={id}
669
+ * Detalhes de um perfil (usuários, tabelas, actions, screens, server functions)
670
+ */
671
+ declare function getProfileDetailsMitra(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
672
+ /**
673
+ * POST /interactions/profiles
674
+ * Cria um novo perfil
675
+ */
676
+ declare function createProfileMitra(options: CreateProfileOptions): Promise<CreateProfileResponse>;
677
+ /**
678
+ * PUT /interactions/profiles
679
+ * Atualiza um perfil existente
680
+ */
681
+ declare function updateProfileMitra(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
682
+ /**
683
+ * DELETE /interactions/profiles
684
+ * Deleta um perfil
685
+ */
686
+ declare function deleteProfileMitra(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
687
+ /**
688
+ * POST /interactions/profiles/users
689
+ * Define os usuários de um perfil (substitui lista atual)
690
+ */
691
+ declare function setProfileUsersMitra(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
692
+ /**
693
+ * POST /interactions/profiles/selectTables
694
+ * Define as tabelas SELECT permitidas por perfil
695
+ */
696
+ declare function setProfileSelectTablesMitra(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
697
+ /**
698
+ * POST /interactions/profiles/dmlTables
699
+ * Define as tabelas DML permitidas por perfil
700
+ */
701
+ declare function setProfileDmlTablesMitra(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
702
+ /**
703
+ * POST /interactions/profiles/actions
704
+ * Define as actions permitidas por perfil
705
+ */
706
+ declare function setProfileActionsMitra(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
707
+ /**
708
+ * POST /interactions/profiles/screens
709
+ * Define as screens permitidas por perfil
710
+ */
711
+ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
712
+ /**
713
+ * POST /interactions/profiles/serverFunctions
714
+ * Define as server functions permitidas por perfil
715
+ */
716
+ declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
519
717
 
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 };
718
+ 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 ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetProfileDetailsOptions, type GetProfileDetailsResponse, 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 RunQueryOptions, type RunQueryResponse, 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, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDbActionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getProfileDetailsMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, runActionMitra, runQueryMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra };