mitra-interactions-sdk 1.0.37 → 1.0.38

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,65 @@ 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, tables })` - Define tabelas SELECT permitidas
366
+ - `setProfileDmlTablesMitra({ projectId?, profileId, 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
+ tables: [
382
+ { tableName: 'clientes', jdbcConnectionConfigId: 1 },
383
+ { tableName: 'pedidos', jdbcConnectionConfigId: 1 }
384
+ ]
385
+ });
386
+
387
+ // Definir server functions
388
+ await setProfileServerFunctionsMitra({ projectId: 123, profileId: 1, serverFunctionIds: [5, 8, 12] });
389
+ ```
390
+
332
391
  ## Tipos TypeScript
333
392
 
334
393
  Todos os tipos estão incluídos:
@@ -361,7 +420,26 @@ import type {
361
420
  ExecuteServerFunctionAsyncResponse,
362
421
  UploadFileResponse,
363
422
  StopServerFunctionExecutionResponse,
364
- ListRecordsResponse
423
+ ListRecordsResponse,
424
+ // Profile Management
425
+ ListProfilesOptions,
426
+ ListProfilesResponse,
427
+ GetProfileDetailsOptions,
428
+ GetProfileDetailsResponse,
429
+ CreateProfileOptions,
430
+ CreateProfileResponse,
431
+ UpdateProfileOptions,
432
+ UpdateProfileResponse,
433
+ DeleteProfileOptions,
434
+ DeleteProfileResponse,
435
+ SetProfileUsersOptions,
436
+ SetProfileSelectTablesOptions,
437
+ SetProfileDmlTablesOptions,
438
+ SetProfileActionsOptions,
439
+ SetProfileScreensOptions,
440
+ SetProfileServerFunctionsOptions,
441
+ ProfileTableRef,
442
+ SetProfilePermissionResponse
365
443
  } from 'mitra-interactions-sdk';
366
444
  ```
367
445
 
package/dist/index.d.mts CHANGED
@@ -322,6 +322,137 @@ 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
+ jdbcConnectionConfigId: number;
422
+ }
423
+ interface SetProfileSelectTablesOptions {
424
+ projectId?: number;
425
+ profileId: number;
426
+ tables: ProfileTableRef[];
427
+ }
428
+ interface SetProfileDmlTablesOptions {
429
+ projectId?: number;
430
+ profileId: number;
431
+ tables: ProfileTableRef[];
432
+ }
433
+ interface SetProfileActionsOptions {
434
+ projectId?: number;
435
+ profileId: number;
436
+ actionIds: number[];
437
+ }
438
+ interface SetProfileScreensOptions {
439
+ projectId?: number;
440
+ profileId: number;
441
+ screenIds: number[];
442
+ }
443
+ interface SetProfileServerFunctionsOptions {
444
+ projectId?: number;
445
+ profileId: number;
446
+ serverFunctionIds: number[];
447
+ }
448
+ interface SetProfilePermissionResponse {
449
+ status: string;
450
+ result: {
451
+ profileId: number;
452
+ message: string;
453
+ [key: string]: unknown;
454
+ };
455
+ }
325
456
 
326
457
  /**
327
458
  * Mitra Interactions SDK - Instance
@@ -352,6 +483,17 @@ interface MitraInstance {
352
483
  patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
353
484
  deleteRecord(options: DeleteRecordOptions): Promise<void>;
354
485
  createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
486
+ listProfiles(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
487
+ getProfileDetails(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
488
+ createProfile(options: CreateProfileOptions): Promise<CreateProfileResponse>;
489
+ updateProfile(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
490
+ deleteProfile(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
491
+ setProfileUsers(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
492
+ setProfileSelectTables(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
493
+ setProfileDmlTables(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
494
+ setProfileActions(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
495
+ setProfileScreens(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
496
+ setProfileServerFunctions(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
355
497
  }
356
498
  declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
357
499
 
@@ -516,5 +658,60 @@ declare function updateRecordMitra(options: UpdateRecordOptions): Promise<Record
516
658
  declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<string, any>>;
517
659
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
518
660
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
661
+ /**
662
+ * GET /interactions/profiles?projectId={id}
663
+ * Lista todos os perfis do projeto
664
+ */
665
+ declare function listProfilesMitra(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
666
+ /**
667
+ * GET /interactions/profiles/{profileId}?projectId={id}
668
+ * Detalhes de um perfil (usuários, tabelas, actions, screens, server functions)
669
+ */
670
+ declare function getProfileDetailsMitra(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
671
+ /**
672
+ * POST /interactions/profiles
673
+ * Cria um novo perfil
674
+ */
675
+ declare function createProfileMitra(options: CreateProfileOptions): Promise<CreateProfileResponse>;
676
+ /**
677
+ * PUT /interactions/profiles
678
+ * Atualiza um perfil existente
679
+ */
680
+ declare function updateProfileMitra(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
681
+ /**
682
+ * DELETE /interactions/profiles
683
+ * Deleta um perfil
684
+ */
685
+ declare function deleteProfileMitra(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
686
+ /**
687
+ * POST /interactions/profiles/users
688
+ * Define os usuários de um perfil (substitui lista atual)
689
+ */
690
+ declare function setProfileUsersMitra(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
691
+ /**
692
+ * POST /interactions/profiles/selectTables
693
+ * Define as tabelas SELECT permitidas por perfil
694
+ */
695
+ declare function setProfileSelectTablesMitra(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
696
+ /**
697
+ * POST /interactions/profiles/dmlTables
698
+ * Define as tabelas DML permitidas por perfil
699
+ */
700
+ declare function setProfileDmlTablesMitra(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
701
+ /**
702
+ * POST /interactions/profiles/actions
703
+ * Define as actions permitidas por perfil
704
+ */
705
+ declare function setProfileActionsMitra(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
706
+ /**
707
+ * POST /interactions/profiles/screens
708
+ * Define as screens permitidas por perfil
709
+ */
710
+ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
711
+ /**
712
+ * POST /interactions/profiles/serverFunctions
713
+ * Define as server functions permitidas por perfil
714
+ */
715
+ declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
519
716
 
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 };
717
+ 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,137 @@ 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
+ jdbcConnectionConfigId: number;
422
+ }
423
+ interface SetProfileSelectTablesOptions {
424
+ projectId?: number;
425
+ profileId: number;
426
+ tables: ProfileTableRef[];
427
+ }
428
+ interface SetProfileDmlTablesOptions {
429
+ projectId?: number;
430
+ profileId: number;
431
+ tables: ProfileTableRef[];
432
+ }
433
+ interface SetProfileActionsOptions {
434
+ projectId?: number;
435
+ profileId: number;
436
+ actionIds: number[];
437
+ }
438
+ interface SetProfileScreensOptions {
439
+ projectId?: number;
440
+ profileId: number;
441
+ screenIds: number[];
442
+ }
443
+ interface SetProfileServerFunctionsOptions {
444
+ projectId?: number;
445
+ profileId: number;
446
+ serverFunctionIds: number[];
447
+ }
448
+ interface SetProfilePermissionResponse {
449
+ status: string;
450
+ result: {
451
+ profileId: number;
452
+ message: string;
453
+ [key: string]: unknown;
454
+ };
455
+ }
325
456
 
326
457
  /**
327
458
  * Mitra Interactions SDK - Instance
@@ -352,6 +483,17 @@ interface MitraInstance {
352
483
  patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
353
484
  deleteRecord(options: DeleteRecordOptions): Promise<void>;
354
485
  createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
486
+ listProfiles(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
487
+ getProfileDetails(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
488
+ createProfile(options: CreateProfileOptions): Promise<CreateProfileResponse>;
489
+ updateProfile(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
490
+ deleteProfile(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
491
+ setProfileUsers(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
492
+ setProfileSelectTables(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
493
+ setProfileDmlTables(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
494
+ setProfileActions(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
495
+ setProfileScreens(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
496
+ setProfileServerFunctions(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
355
497
  }
356
498
  declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
357
499
 
@@ -516,5 +658,60 @@ declare function updateRecordMitra(options: UpdateRecordOptions): Promise<Record
516
658
  declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<string, any>>;
517
659
  declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
518
660
  declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
661
+ /**
662
+ * GET /interactions/profiles?projectId={id}
663
+ * Lista todos os perfis do projeto
664
+ */
665
+ declare function listProfilesMitra(options?: ListProfilesOptions): Promise<ListProfilesResponse>;
666
+ /**
667
+ * GET /interactions/profiles/{profileId}?projectId={id}
668
+ * Detalhes de um perfil (usuários, tabelas, actions, screens, server functions)
669
+ */
670
+ declare function getProfileDetailsMitra(options: GetProfileDetailsOptions): Promise<GetProfileDetailsResponse>;
671
+ /**
672
+ * POST /interactions/profiles
673
+ * Cria um novo perfil
674
+ */
675
+ declare function createProfileMitra(options: CreateProfileOptions): Promise<CreateProfileResponse>;
676
+ /**
677
+ * PUT /interactions/profiles
678
+ * Atualiza um perfil existente
679
+ */
680
+ declare function updateProfileMitra(options: UpdateProfileOptions): Promise<UpdateProfileResponse>;
681
+ /**
682
+ * DELETE /interactions/profiles
683
+ * Deleta um perfil
684
+ */
685
+ declare function deleteProfileMitra(options: DeleteProfileOptions): Promise<DeleteProfileResponse>;
686
+ /**
687
+ * POST /interactions/profiles/users
688
+ * Define os usuários de um perfil (substitui lista atual)
689
+ */
690
+ declare function setProfileUsersMitra(options: SetProfileUsersOptions): Promise<SetProfilePermissionResponse>;
691
+ /**
692
+ * POST /interactions/profiles/selectTables
693
+ * Define as tabelas SELECT permitidas por perfil
694
+ */
695
+ declare function setProfileSelectTablesMitra(options: SetProfileSelectTablesOptions): Promise<SetProfilePermissionResponse>;
696
+ /**
697
+ * POST /interactions/profiles/dmlTables
698
+ * Define as tabelas DML permitidas por perfil
699
+ */
700
+ declare function setProfileDmlTablesMitra(options: SetProfileDmlTablesOptions): Promise<SetProfilePermissionResponse>;
701
+ /**
702
+ * POST /interactions/profiles/actions
703
+ * Define as actions permitidas por perfil
704
+ */
705
+ declare function setProfileActionsMitra(options: SetProfileActionsOptions): Promise<SetProfilePermissionResponse>;
706
+ /**
707
+ * POST /interactions/profiles/screens
708
+ * Define as screens permitidas por perfil
709
+ */
710
+ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Promise<SetProfilePermissionResponse>;
711
+ /**
712
+ * POST /interactions/profiles/serverFunctions
713
+ * Define as server functions permitidas por perfil
714
+ */
715
+ declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
519
716
 
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 };
717
+ 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 };