@envsync-cloud/envsync-ts-sdk 0.9.1 → 0.10.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
@@ -356,7 +356,7 @@ declare class AuditLogsService {
356
356
  * @returns GetAuditLogsResponseWrapper Audit logs retrieved successfully
357
357
  * @throws ApiError
358
358
  */
359
- getAuditLogs(page?: string, perPage?: string, filterByUser?: string, filterByCategory?: 'app*' | 'audit_log*' | 'env*' | 'env_store*' | 'secret_store*' | 'onboarding*' | 'org*' | 'role*' | 'user*' | 'api_key*' | 'webhook*' | 'cli*' | 'gpg_key*' | 'cert*', filterByPastTime?: 'last_3_hours' | 'last_24_hours' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_1_year' | 'all_time'): CancelablePromise<GetAuditLogsResponseWrapper>;
359
+ getAuditLogs(page?: string, perPage?: string, filterByUser?: string, filterByCategory?: 'app*' | 'audit_log*' | 'env*' | 'env_store*' | 'secret_store*' | 'onboarding*' | 'org*' | 'role*' | 'user*' | 'api_key*' | 'webhook*' | 'cli*' | 'gpg_key*' | 'cert*' | 'enterprise*' | 'service_token*', filterByPastTime?: 'last_3_hours' | 'last_24_hours' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_1_year' | 'all_time'): CancelablePromise<GetAuditLogsResponseWrapper>;
360
360
  }
361
361
 
362
362
  type RoleResponse = {
@@ -402,6 +402,18 @@ type WhoAmIResponse = {
402
402
  updated_at: string;
403
403
  };
404
404
  role: RoleResponse;
405
+ memberships: Array<{
406
+ user_id: string;
407
+ org_id: string;
408
+ org_name: string;
409
+ org_slug: string;
410
+ role_id: string;
411
+ role_name: string;
412
+ is_admin: boolean;
413
+ is_master: boolean;
414
+ is_active: boolean;
415
+ }>;
416
+ active_membership_user_id: string;
405
417
  };
406
418
 
407
419
  declare class AuthenticationService {
@@ -414,6 +426,26 @@ declare class AuthenticationService {
414
426
  * @throws ApiError
415
427
  */
416
428
  whoami(): CancelablePromise<WhoAmIResponse>;
429
+ /**
430
+ * Create Workspace
431
+ * Create a new workspace for the current enterprise web session and switch into it
432
+ * @param requestBody
433
+ * @returns WhoAmIResponse Workspace created successfully
434
+ * @throws ApiError
435
+ */
436
+ createWorkspace(requestBody?: {
437
+ name: string;
438
+ }): CancelablePromise<WhoAmIResponse>;
439
+ /**
440
+ * Switch Active Organization
441
+ * Switch the active organization membership for the current web session
442
+ * @param requestBody
443
+ * @returns WhoAmIResponse Active organization switched successfully
444
+ * @throws ApiError
445
+ */
446
+ switchOrg(requestBody?: {
447
+ org_id: string;
448
+ }): CancelablePromise<WhoAmIResponse>;
417
449
  }
418
450
 
419
451
  type BaseCertificateResponse = {
@@ -2426,6 +2458,154 @@ declare class SecretsRollbackService {
2426
2458
  rollbackSecretVariableToTimestamp(key: string, requestBody?: SecretVariableRollbackToTimestampRequest): CancelablePromise<SecretVariableRollbackResponse>;
2427
2459
  }
2428
2460
 
2461
+ type ServiceTokenPermissions = {
2462
+ read: boolean;
2463
+ write: boolean;
2464
+ };
2465
+
2466
+ type CreateServiceTokenRequest = {
2467
+ name: string;
2468
+ app_id?: string;
2469
+ env_type_id?: string;
2470
+ permissions?: ServiceTokenPermissions;
2471
+ expires_in_days?: number;
2472
+ };
2473
+
2474
+ type CreateServiceTokenResponse = {
2475
+ id: string;
2476
+ token: string;
2477
+ name: string;
2478
+ app_id: string | null;
2479
+ env_type_id: string | null;
2480
+ permissions: ServiceTokenPermissions;
2481
+ expires_at: string;
2482
+ created_at: string;
2483
+ };
2484
+
2485
+ type ErrorResponse = {
2486
+ error: string;
2487
+ };
2488
+
2489
+ type ServiceTokenResponse = {
2490
+ id: string;
2491
+ name: string;
2492
+ app_id: string | null;
2493
+ env_type_id: string | null;
2494
+ permissions: ServiceTokenPermissions;
2495
+ expires_at: string;
2496
+ last_used_at: string | null;
2497
+ created_at: string;
2498
+ };
2499
+
2500
+ type ServiceTokensResponse = Array<ServiceTokenResponse>;
2501
+
2502
+ declare class ServiceTokensService {
2503
+ readonly httpRequest: BaseHttpRequest;
2504
+ constructor(httpRequest: BaseHttpRequest);
2505
+ /**
2506
+ * Create Service Token
2507
+ * Create a new scoped service token for the organization
2508
+ * @param requestBody
2509
+ * @returns CreateServiceTokenResponse Service token created successfully
2510
+ * @throws ApiError
2511
+ */
2512
+ createServiceToken(requestBody?: CreateServiceTokenRequest): CancelablePromise<CreateServiceTokenResponse>;
2513
+ /**
2514
+ * Get All Service Tokens
2515
+ * Retrieve all service tokens for the organization
2516
+ * @returns ServiceTokensResponse Service tokens retrieved successfully
2517
+ * @throws ApiError
2518
+ */
2519
+ getAllServiceTokens(): CancelablePromise<ServiceTokensResponse>;
2520
+ /**
2521
+ * Get Service Token
2522
+ * Retrieve a specific service token (does not return the raw token)
2523
+ * @param id
2524
+ * @returns ServiceTokenResponse Service token retrieved successfully
2525
+ * @throws ApiError
2526
+ */
2527
+ getServiceToken(id: string): CancelablePromise<ServiceTokenResponse>;
2528
+ /**
2529
+ * Delete Service Token
2530
+ * Delete an existing service token
2531
+ * @param id
2532
+ * @returns ErrorResponse Service token deleted successfully
2533
+ * @throws ApiError
2534
+ */
2535
+ deleteServiceToken(id: string): CancelablePromise<ErrorResponse>;
2536
+ }
2537
+
2538
+ type LicenseState = {
2539
+ status: LicenseState.status;
2540
+ lease_expires_at?: string | null;
2541
+ last_verified_at?: string | null;
2542
+ last_error_code?: string | null;
2543
+ last_error_message?: string | null;
2544
+ validation_mode?: LicenseState.validation_mode;
2545
+ certificate_serial_hex?: string | null;
2546
+ certificate_fingerprint_sha256?: string | null;
2547
+ certificate_subject?: string | null;
2548
+ certificate_issuer?: string | null;
2549
+ certificate_expires_at?: string | null;
2550
+ root_ca_fingerprint_sha256?: string | null;
2551
+ validated_at?: string | null;
2552
+ };
2553
+ declare namespace LicenseState {
2554
+ enum status {
2555
+ UNKNOWN = "unknown",
2556
+ ACTIVE = "active",
2557
+ INACTIVE = "inactive",
2558
+ EXPIRED = "expired",
2559
+ ERROR = "error",
2560
+ LOCKED = "locked"
2561
+ }
2562
+ enum validation_mode {
2563
+ NONE = "none",
2564
+ LEASE = "lease",
2565
+ CERTIFICATE = "certificate"
2566
+ }
2567
+ }
2568
+
2569
+ type LicenseStatusResponse = {
2570
+ required: boolean;
2571
+ locked: boolean;
2572
+ reason?: string | null;
2573
+ state: LicenseState;
2574
+ };
2575
+
2576
+ type SystemStatusState = {
2577
+ edition: SystemStatusState.edition;
2578
+ single_org_mode: boolean;
2579
+ management_enabled: boolean;
2580
+ observability_enabled: boolean;
2581
+ management_web_enabled: boolean;
2582
+ landing_enabled: boolean;
2583
+ first_bootstrap_completed_at?: string | null;
2584
+ org_count: number;
2585
+ };
2586
+ declare namespace SystemStatusState {
2587
+ enum edition {
2588
+ OSS = "oss",
2589
+ ENTERPRISE = "enterprise"
2590
+ }
2591
+ }
2592
+
2593
+ type SystemStatusResponse = {
2594
+ system: SystemStatusState;
2595
+ license: LicenseStatusResponse;
2596
+ };
2597
+
2598
+ declare class SystemService {
2599
+ readonly httpRequest: BaseHttpRequest;
2600
+ constructor(httpRequest: BaseHttpRequest);
2601
+ /**
2602
+ * Get Management System Status
2603
+ * @returns SystemStatusResponse Management system status
2604
+ * @throws ApiError
2605
+ */
2606
+ getManagementSystemStatus(): CancelablePromise<SystemStatusResponse>;
2607
+ }
2608
+
2429
2609
  type AddTeamMemberRequest = {
2430
2610
  user_id: string;
2431
2611
  };
@@ -2666,7 +2846,14 @@ declare namespace CreateWebhookRequest {
2666
2846
  enum webhook_type {
2667
2847
  DISCORD = "DISCORD",
2668
2848
  SLACK = "SLACK",
2669
- CUSTOM = "CUSTOM"
2849
+ CUSTOM = "CUSTOM",
2850
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2851
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2852
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2853
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2854
+ CIRCLECI = "CIRCLECI",
2855
+ TRAVIS_CI = "TRAVIS_CI",
2856
+ JENKINS = "JENKINS"
2670
2857
  }
2671
2858
  enum linked_to {
2672
2859
  ORG = "org",
@@ -2687,7 +2874,14 @@ declare namespace UpdateWebhookRequest {
2687
2874
  enum webhook_type {
2688
2875
  DISCORD = "DISCORD",
2689
2876
  SLACK = "SLACK",
2690
- CUSTOM = "CUSTOM"
2877
+ CUSTOM = "CUSTOM",
2878
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2879
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2880
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2881
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2882
+ CIRCLECI = "CIRCLECI",
2883
+ TRAVIS_CI = "TRAVIS_CI",
2884
+ JENKINS = "JENKINS"
2691
2885
  }
2692
2886
  enum linked_to {
2693
2887
  ORG = "org",
@@ -2714,7 +2908,14 @@ declare namespace WebhookResponse {
2714
2908
  enum webhook_type {
2715
2909
  DISCORD = "DISCORD",
2716
2910
  SLACK = "SLACK",
2717
- CUSTOM = "CUSTOM"
2911
+ CUSTOM = "CUSTOM",
2912
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2913
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2914
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2915
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2916
+ CIRCLECI = "CIRCLECI",
2917
+ TRAVIS_CI = "TRAVIS_CI",
2918
+ JENKINS = "JENKINS"
2718
2919
  }
2719
2920
  enum linked_to {
2720
2921
  ORG = "org",
@@ -2791,6 +2992,8 @@ declare class EnvSyncAPISDK {
2791
2992
  readonly secrets: SecretsService;
2792
2993
  readonly secretsPointInTime: SecretsPointInTimeService;
2793
2994
  readonly secretsRollback: SecretsRollbackService;
2995
+ readonly serviceTokens: ServiceTokensService;
2996
+ readonly system: SystemService;
2794
2997
  readonly teams: TeamsService;
2795
2998
  readonly users: UsersService;
2796
2999
  readonly webhooks: WebhooksService;
@@ -2815,12 +3018,13 @@ declare class ApiError extends Error {
2815
3018
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
2816
3019
  }
2817
3020
 
2818
- type ErrorResponse = {
2819
- error: string;
2820
- };
2821
-
2822
3021
  type UploadFileError = {
2823
3022
  error: string;
2824
3023
  };
2825
3024
 
2826
- export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, type AssignTeamRoleRequest, AuditLogsService, AuthenticationService, type BaseCertificateResponse, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CRLResponse, type CallbackResponse, CancelError, CancelablePromise, type CertificateListResponse, CertificatesService, type ChangeRequestListResponse, ChangeRequestResponse, ChangeRequestsService, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateTeamRequest, type CreateTeamResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteOrgRequest, type DeleteOrgResponse, type DeleteSecretRequest, type DeleteUserInviteResponse, type DirectChangeRequestBody, EffectiveAccessEntry, type EffectiveAccessResponse, type EffectivePermissionsResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRangeDiffRequest, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, ExportEnvRequest, type ExportEnvResponse, type ExportKeyResponse, type ExtendGpgKeyExpiryRequest, FileUploadService, GenerateGpgKeyRequest, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetTeamResponse, type GetTeamsResponse, type GetUserInviteByTokenResponse, type GpgKeyDetailResponse, type GpgKeyResponse, type GpgKeysResponse, GpgKeysService, GrantAccessRequest, GrantEntry, type GrantsListResponse, type ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, type LoginUrlResponse, type LogoutUrlResponse, type MemberCertResponse, type MyCertificateBundleResponse, type OCSPResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgCAResponse, type OrgResponse, OrganizationsService, type PermissionMessageResponse, PermissionsService, type PromotionChangeRequestBody, type RegenerateApiKeyResponse, type RejectChangeRequestBody, type RenewCertRequest, type RevealSecretsRequest, type RevealSecretsResponse, RevokeAccessRequest, type RevokeCertRequest, type RevokeCertResponse, type RevokeGpgKeyRequest, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type RootCAResponse, type RotateCertRequest, RotateGpgKeyRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRangeDiffRequest, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, SignDataRequest, type SignatureResponse, type TeamMessageResponse, TeamsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateTeamRequest, UpdateTrustLevelRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type VerifyResponse, type VerifySignatureRequest, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse };
3025
+ /**
3026
+ * Optional. Bearer-token clients can use this to select the active organization for the request. Ignored for cookie sessions and API keys.
3027
+ */
3028
+ type XEnvSyncOrgIdHeader = string;
3029
+
3030
+ export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, type AssignTeamRoleRequest, AuditLogsService, AuthenticationService, type BaseCertificateResponse, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CRLResponse, type CallbackResponse, CancelError, CancelablePromise, type CertificateListResponse, CertificatesService, type ChangeRequestListResponse, ChangeRequestResponse, ChangeRequestsService, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateServiceTokenRequest, type CreateServiceTokenResponse, type CreateTeamRequest, type CreateTeamResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteOrgRequest, type DeleteOrgResponse, type DeleteSecretRequest, type DeleteUserInviteResponse, type DirectChangeRequestBody, EffectiveAccessEntry, type EffectiveAccessResponse, type EffectivePermissionsResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRangeDiffRequest, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, ExportEnvRequest, type ExportEnvResponse, type ExportKeyResponse, type ExtendGpgKeyExpiryRequest, FileUploadService, GenerateGpgKeyRequest, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetTeamResponse, type GetTeamsResponse, type GetUserInviteByTokenResponse, type GpgKeyDetailResponse, type GpgKeyResponse, type GpgKeysResponse, GpgKeysService, GrantAccessRequest, GrantEntry, type GrantsListResponse, type ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, LicenseState, type LicenseStatusResponse, type LoginUrlResponse, type LogoutUrlResponse, type MemberCertResponse, type MyCertificateBundleResponse, type OCSPResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgCAResponse, type OrgResponse, OrganizationsService, type PermissionMessageResponse, PermissionsService, type PromotionChangeRequestBody, type RegenerateApiKeyResponse, type RejectChangeRequestBody, type RenewCertRequest, type RevealSecretsRequest, type RevealSecretsResponse, RevokeAccessRequest, type RevokeCertRequest, type RevokeCertResponse, type RevokeGpgKeyRequest, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type RootCAResponse, type RotateCertRequest, RotateGpgKeyRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRangeDiffRequest, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type ServiceTokenPermissions, type ServiceTokenResponse, type ServiceTokensResponse, ServiceTokensService, SignDataRequest, type SignatureResponse, SystemService, type SystemStatusResponse, SystemStatusState, type TeamMessageResponse, TeamsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateTeamRequest, UpdateTrustLevelRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type VerifyResponse, type VerifySignatureRequest, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse, type XEnvSyncOrgIdHeader };
package/dist/index.d.ts CHANGED
@@ -356,7 +356,7 @@ declare class AuditLogsService {
356
356
  * @returns GetAuditLogsResponseWrapper Audit logs retrieved successfully
357
357
  * @throws ApiError
358
358
  */
359
- getAuditLogs(page?: string, perPage?: string, filterByUser?: string, filterByCategory?: 'app*' | 'audit_log*' | 'env*' | 'env_store*' | 'secret_store*' | 'onboarding*' | 'org*' | 'role*' | 'user*' | 'api_key*' | 'webhook*' | 'cli*' | 'gpg_key*' | 'cert*', filterByPastTime?: 'last_3_hours' | 'last_24_hours' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_1_year' | 'all_time'): CancelablePromise<GetAuditLogsResponseWrapper>;
359
+ getAuditLogs(page?: string, perPage?: string, filterByUser?: string, filterByCategory?: 'app*' | 'audit_log*' | 'env*' | 'env_store*' | 'secret_store*' | 'onboarding*' | 'org*' | 'role*' | 'user*' | 'api_key*' | 'webhook*' | 'cli*' | 'gpg_key*' | 'cert*' | 'enterprise*' | 'service_token*', filterByPastTime?: 'last_3_hours' | 'last_24_hours' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_1_year' | 'all_time'): CancelablePromise<GetAuditLogsResponseWrapper>;
360
360
  }
361
361
 
362
362
  type RoleResponse = {
@@ -402,6 +402,18 @@ type WhoAmIResponse = {
402
402
  updated_at: string;
403
403
  };
404
404
  role: RoleResponse;
405
+ memberships: Array<{
406
+ user_id: string;
407
+ org_id: string;
408
+ org_name: string;
409
+ org_slug: string;
410
+ role_id: string;
411
+ role_name: string;
412
+ is_admin: boolean;
413
+ is_master: boolean;
414
+ is_active: boolean;
415
+ }>;
416
+ active_membership_user_id: string;
405
417
  };
406
418
 
407
419
  declare class AuthenticationService {
@@ -414,6 +426,26 @@ declare class AuthenticationService {
414
426
  * @throws ApiError
415
427
  */
416
428
  whoami(): CancelablePromise<WhoAmIResponse>;
429
+ /**
430
+ * Create Workspace
431
+ * Create a new workspace for the current enterprise web session and switch into it
432
+ * @param requestBody
433
+ * @returns WhoAmIResponse Workspace created successfully
434
+ * @throws ApiError
435
+ */
436
+ createWorkspace(requestBody?: {
437
+ name: string;
438
+ }): CancelablePromise<WhoAmIResponse>;
439
+ /**
440
+ * Switch Active Organization
441
+ * Switch the active organization membership for the current web session
442
+ * @param requestBody
443
+ * @returns WhoAmIResponse Active organization switched successfully
444
+ * @throws ApiError
445
+ */
446
+ switchOrg(requestBody?: {
447
+ org_id: string;
448
+ }): CancelablePromise<WhoAmIResponse>;
417
449
  }
418
450
 
419
451
  type BaseCertificateResponse = {
@@ -2426,6 +2458,154 @@ declare class SecretsRollbackService {
2426
2458
  rollbackSecretVariableToTimestamp(key: string, requestBody?: SecretVariableRollbackToTimestampRequest): CancelablePromise<SecretVariableRollbackResponse>;
2427
2459
  }
2428
2460
 
2461
+ type ServiceTokenPermissions = {
2462
+ read: boolean;
2463
+ write: boolean;
2464
+ };
2465
+
2466
+ type CreateServiceTokenRequest = {
2467
+ name: string;
2468
+ app_id?: string;
2469
+ env_type_id?: string;
2470
+ permissions?: ServiceTokenPermissions;
2471
+ expires_in_days?: number;
2472
+ };
2473
+
2474
+ type CreateServiceTokenResponse = {
2475
+ id: string;
2476
+ token: string;
2477
+ name: string;
2478
+ app_id: string | null;
2479
+ env_type_id: string | null;
2480
+ permissions: ServiceTokenPermissions;
2481
+ expires_at: string;
2482
+ created_at: string;
2483
+ };
2484
+
2485
+ type ErrorResponse = {
2486
+ error: string;
2487
+ };
2488
+
2489
+ type ServiceTokenResponse = {
2490
+ id: string;
2491
+ name: string;
2492
+ app_id: string | null;
2493
+ env_type_id: string | null;
2494
+ permissions: ServiceTokenPermissions;
2495
+ expires_at: string;
2496
+ last_used_at: string | null;
2497
+ created_at: string;
2498
+ };
2499
+
2500
+ type ServiceTokensResponse = Array<ServiceTokenResponse>;
2501
+
2502
+ declare class ServiceTokensService {
2503
+ readonly httpRequest: BaseHttpRequest;
2504
+ constructor(httpRequest: BaseHttpRequest);
2505
+ /**
2506
+ * Create Service Token
2507
+ * Create a new scoped service token for the organization
2508
+ * @param requestBody
2509
+ * @returns CreateServiceTokenResponse Service token created successfully
2510
+ * @throws ApiError
2511
+ */
2512
+ createServiceToken(requestBody?: CreateServiceTokenRequest): CancelablePromise<CreateServiceTokenResponse>;
2513
+ /**
2514
+ * Get All Service Tokens
2515
+ * Retrieve all service tokens for the organization
2516
+ * @returns ServiceTokensResponse Service tokens retrieved successfully
2517
+ * @throws ApiError
2518
+ */
2519
+ getAllServiceTokens(): CancelablePromise<ServiceTokensResponse>;
2520
+ /**
2521
+ * Get Service Token
2522
+ * Retrieve a specific service token (does not return the raw token)
2523
+ * @param id
2524
+ * @returns ServiceTokenResponse Service token retrieved successfully
2525
+ * @throws ApiError
2526
+ */
2527
+ getServiceToken(id: string): CancelablePromise<ServiceTokenResponse>;
2528
+ /**
2529
+ * Delete Service Token
2530
+ * Delete an existing service token
2531
+ * @param id
2532
+ * @returns ErrorResponse Service token deleted successfully
2533
+ * @throws ApiError
2534
+ */
2535
+ deleteServiceToken(id: string): CancelablePromise<ErrorResponse>;
2536
+ }
2537
+
2538
+ type LicenseState = {
2539
+ status: LicenseState.status;
2540
+ lease_expires_at?: string | null;
2541
+ last_verified_at?: string | null;
2542
+ last_error_code?: string | null;
2543
+ last_error_message?: string | null;
2544
+ validation_mode?: LicenseState.validation_mode;
2545
+ certificate_serial_hex?: string | null;
2546
+ certificate_fingerprint_sha256?: string | null;
2547
+ certificate_subject?: string | null;
2548
+ certificate_issuer?: string | null;
2549
+ certificate_expires_at?: string | null;
2550
+ root_ca_fingerprint_sha256?: string | null;
2551
+ validated_at?: string | null;
2552
+ };
2553
+ declare namespace LicenseState {
2554
+ enum status {
2555
+ UNKNOWN = "unknown",
2556
+ ACTIVE = "active",
2557
+ INACTIVE = "inactive",
2558
+ EXPIRED = "expired",
2559
+ ERROR = "error",
2560
+ LOCKED = "locked"
2561
+ }
2562
+ enum validation_mode {
2563
+ NONE = "none",
2564
+ LEASE = "lease",
2565
+ CERTIFICATE = "certificate"
2566
+ }
2567
+ }
2568
+
2569
+ type LicenseStatusResponse = {
2570
+ required: boolean;
2571
+ locked: boolean;
2572
+ reason?: string | null;
2573
+ state: LicenseState;
2574
+ };
2575
+
2576
+ type SystemStatusState = {
2577
+ edition: SystemStatusState.edition;
2578
+ single_org_mode: boolean;
2579
+ management_enabled: boolean;
2580
+ observability_enabled: boolean;
2581
+ management_web_enabled: boolean;
2582
+ landing_enabled: boolean;
2583
+ first_bootstrap_completed_at?: string | null;
2584
+ org_count: number;
2585
+ };
2586
+ declare namespace SystemStatusState {
2587
+ enum edition {
2588
+ OSS = "oss",
2589
+ ENTERPRISE = "enterprise"
2590
+ }
2591
+ }
2592
+
2593
+ type SystemStatusResponse = {
2594
+ system: SystemStatusState;
2595
+ license: LicenseStatusResponse;
2596
+ };
2597
+
2598
+ declare class SystemService {
2599
+ readonly httpRequest: BaseHttpRequest;
2600
+ constructor(httpRequest: BaseHttpRequest);
2601
+ /**
2602
+ * Get Management System Status
2603
+ * @returns SystemStatusResponse Management system status
2604
+ * @throws ApiError
2605
+ */
2606
+ getManagementSystemStatus(): CancelablePromise<SystemStatusResponse>;
2607
+ }
2608
+
2429
2609
  type AddTeamMemberRequest = {
2430
2610
  user_id: string;
2431
2611
  };
@@ -2666,7 +2846,14 @@ declare namespace CreateWebhookRequest {
2666
2846
  enum webhook_type {
2667
2847
  DISCORD = "DISCORD",
2668
2848
  SLACK = "SLACK",
2669
- CUSTOM = "CUSTOM"
2849
+ CUSTOM = "CUSTOM",
2850
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2851
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2852
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2853
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2854
+ CIRCLECI = "CIRCLECI",
2855
+ TRAVIS_CI = "TRAVIS_CI",
2856
+ JENKINS = "JENKINS"
2670
2857
  }
2671
2858
  enum linked_to {
2672
2859
  ORG = "org",
@@ -2687,7 +2874,14 @@ declare namespace UpdateWebhookRequest {
2687
2874
  enum webhook_type {
2688
2875
  DISCORD = "DISCORD",
2689
2876
  SLACK = "SLACK",
2690
- CUSTOM = "CUSTOM"
2877
+ CUSTOM = "CUSTOM",
2878
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2879
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2880
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2881
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2882
+ CIRCLECI = "CIRCLECI",
2883
+ TRAVIS_CI = "TRAVIS_CI",
2884
+ JENKINS = "JENKINS"
2691
2885
  }
2692
2886
  enum linked_to {
2693
2887
  ORG = "org",
@@ -2714,7 +2908,14 @@ declare namespace WebhookResponse {
2714
2908
  enum webhook_type {
2715
2909
  DISCORD = "DISCORD",
2716
2910
  SLACK = "SLACK",
2717
- CUSTOM = "CUSTOM"
2911
+ CUSTOM = "CUSTOM",
2912
+ GITHUB_ACTIONS = "GITHUB_ACTIONS",
2913
+ GITLAB_PIPELINE = "GITLAB_PIPELINE",
2914
+ AWS_CODEPIPELINE = "AWS_CODEPIPELINE",
2915
+ GCP_CLOUD_BUILD = "GCP_CLOUD_BUILD",
2916
+ CIRCLECI = "CIRCLECI",
2917
+ TRAVIS_CI = "TRAVIS_CI",
2918
+ JENKINS = "JENKINS"
2718
2919
  }
2719
2920
  enum linked_to {
2720
2921
  ORG = "org",
@@ -2791,6 +2992,8 @@ declare class EnvSyncAPISDK {
2791
2992
  readonly secrets: SecretsService;
2792
2993
  readonly secretsPointInTime: SecretsPointInTimeService;
2793
2994
  readonly secretsRollback: SecretsRollbackService;
2995
+ readonly serviceTokens: ServiceTokensService;
2996
+ readonly system: SystemService;
2794
2997
  readonly teams: TeamsService;
2795
2998
  readonly users: UsersService;
2796
2999
  readonly webhooks: WebhooksService;
@@ -2815,12 +3018,13 @@ declare class ApiError extends Error {
2815
3018
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
2816
3019
  }
2817
3020
 
2818
- type ErrorResponse = {
2819
- error: string;
2820
- };
2821
-
2822
3021
  type UploadFileError = {
2823
3022
  error: string;
2824
3023
  };
2825
3024
 
2826
- export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, type AssignTeamRoleRequest, AuditLogsService, AuthenticationService, type BaseCertificateResponse, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CRLResponse, type CallbackResponse, CancelError, CancelablePromise, type CertificateListResponse, CertificatesService, type ChangeRequestListResponse, ChangeRequestResponse, ChangeRequestsService, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateTeamRequest, type CreateTeamResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteOrgRequest, type DeleteOrgResponse, type DeleteSecretRequest, type DeleteUserInviteResponse, type DirectChangeRequestBody, EffectiveAccessEntry, type EffectiveAccessResponse, type EffectivePermissionsResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRangeDiffRequest, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, ExportEnvRequest, type ExportEnvResponse, type ExportKeyResponse, type ExtendGpgKeyExpiryRequest, FileUploadService, GenerateGpgKeyRequest, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetTeamResponse, type GetTeamsResponse, type GetUserInviteByTokenResponse, type GpgKeyDetailResponse, type GpgKeyResponse, type GpgKeysResponse, GpgKeysService, GrantAccessRequest, GrantEntry, type GrantsListResponse, type ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, type LoginUrlResponse, type LogoutUrlResponse, type MemberCertResponse, type MyCertificateBundleResponse, type OCSPResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgCAResponse, type OrgResponse, OrganizationsService, type PermissionMessageResponse, PermissionsService, type PromotionChangeRequestBody, type RegenerateApiKeyResponse, type RejectChangeRequestBody, type RenewCertRequest, type RevealSecretsRequest, type RevealSecretsResponse, RevokeAccessRequest, type RevokeCertRequest, type RevokeCertResponse, type RevokeGpgKeyRequest, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type RootCAResponse, type RotateCertRequest, RotateGpgKeyRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRangeDiffRequest, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, SignDataRequest, type SignatureResponse, type TeamMessageResponse, TeamsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateTeamRequest, UpdateTrustLevelRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type VerifyResponse, type VerifySignatureRequest, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse };
3025
+ /**
3026
+ * Optional. Bearer-token clients can use this to select the active organization for the request. Ignored for cookie sessions and API keys.
3027
+ */
3028
+ type XEnvSyncOrgIdHeader = string;
3029
+
3030
+ export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, type AssignTeamRoleRequest, AuditLogsService, AuthenticationService, type BaseCertificateResponse, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CRLResponse, type CallbackResponse, CancelError, CancelablePromise, type CertificateListResponse, CertificatesService, type ChangeRequestListResponse, ChangeRequestResponse, ChangeRequestsService, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateServiceTokenRequest, type CreateServiceTokenResponse, type CreateTeamRequest, type CreateTeamResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteOrgRequest, type DeleteOrgResponse, type DeleteSecretRequest, type DeleteUserInviteResponse, type DirectChangeRequestBody, EffectiveAccessEntry, type EffectiveAccessResponse, type EffectivePermissionsResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRangeDiffRequest, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, ExportEnvRequest, type ExportEnvResponse, type ExportKeyResponse, type ExtendGpgKeyExpiryRequest, FileUploadService, GenerateGpgKeyRequest, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetTeamResponse, type GetTeamsResponse, type GetUserInviteByTokenResponse, type GpgKeyDetailResponse, type GpgKeyResponse, type GpgKeysResponse, GpgKeysService, GrantAccessRequest, GrantEntry, type GrantsListResponse, type ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, LicenseState, type LicenseStatusResponse, type LoginUrlResponse, type LogoutUrlResponse, type MemberCertResponse, type MyCertificateBundleResponse, type OCSPResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgCAResponse, type OrgResponse, OrganizationsService, type PermissionMessageResponse, PermissionsService, type PromotionChangeRequestBody, type RegenerateApiKeyResponse, type RejectChangeRequestBody, type RenewCertRequest, type RevealSecretsRequest, type RevealSecretsResponse, RevokeAccessRequest, type RevokeCertRequest, type RevokeCertResponse, type RevokeGpgKeyRequest, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type RootCAResponse, type RotateCertRequest, RotateGpgKeyRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRangeDiffRequest, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type ServiceTokenPermissions, type ServiceTokenResponse, type ServiceTokensResponse, ServiceTokensService, SignDataRequest, type SignatureResponse, SystemService, type SystemStatusResponse, SystemStatusState, type TeamMessageResponse, TeamsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateTeamRequest, UpdateTrustLevelRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type VerifyResponse, type VerifySignatureRequest, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse, type XEnvSyncOrgIdHeader };