@envsync-cloud/envsync-ts-sdk 0.7.6 → 0.7.8

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
@@ -416,7 +416,7 @@ declare class AuthenticationService {
416
416
  whoami(): CancelablePromise<WhoAmIResponse>;
417
417
  }
418
418
 
419
- type CertificateListResponse = Array<{
419
+ type BaseCertificateResponse = {
420
420
  id: string;
421
421
  org_id: string;
422
422
  serial_hex: string;
@@ -424,15 +424,19 @@ type CertificateListResponse = Array<{
424
424
  subject_cn: string;
425
425
  subject_email: string | null;
426
426
  status: string;
427
- not_before: string | null;
428
- not_after: string | null;
429
- description: string | null;
427
+ description?: string | null;
430
428
  metadata?: any | null;
431
- revoked_at: string | null;
429
+ cert_pem?: string | null;
430
+ is_system_generated: boolean;
431
+ not_before?: string | null;
432
+ not_after?: string | null;
433
+ revoked_at?: string | null;
432
434
  supersedes_certificate_id?: string | null;
433
435
  created_at: string;
434
436
  updated_at: string;
435
- }>;
437
+ };
438
+
439
+ type CertificateListResponse = Array<BaseCertificateResponse>;
436
440
 
437
441
  type CRLResponse = {
438
442
  crl_pem: string;
@@ -447,7 +451,7 @@ type InitOrgCARequest = {
447
451
 
448
452
  type IssueMemberCertRequest = {
449
453
  member_email: string;
450
- role: string;
454
+ role?: string;
451
455
  description?: string;
452
456
  metadata?: Record<string, string>;
453
457
  };
@@ -460,10 +464,41 @@ type MemberCertResponse = {
460
464
  subject_cn: string;
461
465
  subject_email: string | null;
462
466
  status: string;
467
+ description?: string | null;
463
468
  metadata?: any | null;
464
- cert_pem: string;
465
- key_pem: string;
469
+ cert_pem?: string | null;
470
+ is_system_generated: boolean;
471
+ not_before?: string | null;
472
+ not_after?: string | null;
473
+ revoked_at?: string | null;
474
+ supersedes_certificate_id?: string | null;
466
475
  created_at: string;
476
+ updated_at: string;
477
+ key_pem: string;
478
+ };
479
+
480
+ type MyCertificateBundleResponse = {
481
+ root_ca_pem: string;
482
+ member_certificate: {
483
+ id: string;
484
+ org_id: string;
485
+ serial_hex: string;
486
+ cert_type: string;
487
+ subject_cn: string;
488
+ subject_email: string | null;
489
+ status: string;
490
+ description?: string | null;
491
+ metadata?: any | null;
492
+ cert_pem?: string | null;
493
+ is_system_generated: boolean;
494
+ not_before?: string | null;
495
+ not_after?: string | null;
496
+ revoked_at?: string | null;
497
+ supersedes_certificate_id?: string | null;
498
+ created_at: string;
499
+ updated_at: string;
500
+ key_pem: string;
501
+ };
467
502
  };
468
503
 
469
504
  type OCSPResponse = {
@@ -477,9 +512,18 @@ type OrgCAResponse = {
477
512
  serial_hex: string;
478
513
  cert_type: string;
479
514
  subject_cn: string;
515
+ subject_email: string | null;
480
516
  status: string;
481
- cert_pem?: string;
517
+ description?: string | null;
518
+ metadata?: any | null;
519
+ cert_pem?: string | null;
520
+ is_system_generated: boolean;
521
+ not_before?: string | null;
522
+ not_after?: string | null;
523
+ revoked_at?: string | null;
524
+ supersedes_certificate_id?: string | null;
482
525
  created_at: string;
526
+ updated_at: string;
483
527
  };
484
528
 
485
529
  type RenewCertRequest = {
@@ -547,6 +591,13 @@ declare class CertificatesService {
547
591
  * @throws ApiError
548
592
  */
549
593
  getCrl(): CancelablePromise<CRLResponse>;
594
+ /**
595
+ * Get Current User Certificate Bundle
596
+ * Retrieve the current user's active system-generated certificate bundle
597
+ * @returns MyCertificateBundleResponse Certificate bundle retrieved successfully
598
+ * @throws ApiError
599
+ */
600
+ getMyCertificateBundle(): CancelablePromise<MyCertificateBundleResponse>;
550
601
  /**
551
602
  * List Certificates
552
603
  * List all certificates for the organization
@@ -1016,6 +1067,8 @@ type EnvHistoryRequest = {
1016
1067
  env_type_id: string;
1017
1068
  page?: number;
1018
1069
  per_page?: number;
1070
+ from_created_at?: string;
1071
+ to_created_at?: string;
1019
1072
  };
1020
1073
 
1021
1074
  type EnvHistoryResponse = {
@@ -1028,6 +1081,7 @@ type EnvHistoryResponse = {
1028
1081
  user_id: string;
1029
1082
  created_at: string;
1030
1083
  updated_at: string;
1084
+ changes_count: number;
1031
1085
  }>;
1032
1086
  totalPages: number;
1033
1087
  };
@@ -1045,6 +1099,13 @@ type EnvPitStateResponse = Array<{
1045
1099
  operation: 'CREATE' | 'UPDATE' | 'DELETE';
1046
1100
  }>;
1047
1101
 
1102
+ type EnvTimestampRangeDiffRequest = {
1103
+ app_id: string;
1104
+ env_type_id: string;
1105
+ from_timestamp: string;
1106
+ to_timestamp: string;
1107
+ };
1108
+
1048
1109
  type EnvTimestampRequest = {
1049
1110
  app_id: string;
1050
1111
  env_type_id: string;
@@ -1102,6 +1163,14 @@ declare class EnvironmentVariablesPointInTimeService {
1102
1163
  * @throws ApiError
1103
1164
  */
1104
1165
  getEnvDiff(requestBody?: EnvDiffRequest): CancelablePromise<EnvDiffResponse>;
1166
+ /**
1167
+ * Get Environment Variables Diff By Timestamp Range
1168
+ * Compare environment variables between two timestamps
1169
+ * @param requestBody
1170
+ * @returns EnvDiffResponse Environment variables timestamp-range diff retrieved successfully
1171
+ * @throws ApiError
1172
+ */
1173
+ getEnvDiffByTimestampRange(requestBody?: EnvTimestampRangeDiffRequest): CancelablePromise<EnvDiffResponse>;
1105
1174
  /**
1106
1175
  * Get Variable Timeline
1107
1176
  * Get timeline of changes for a specific environment variable
@@ -1474,6 +1543,14 @@ type AcceptOrgInviteRequest = {
1474
1543
 
1475
1544
  type AcceptOrgInviteResponse = {
1476
1545
  message: string;
1546
+ generated_certificate_bundle: {
1547
+ root_ca_pem: string;
1548
+ member_cert_pem: string;
1549
+ member_key_pem: string;
1550
+ member_certificate_id: string;
1551
+ member_serial_hex: string;
1552
+ is_system_generated: boolean;
1553
+ };
1477
1554
  };
1478
1555
 
1479
1556
  type AcceptUserInviteRequest = {
@@ -1483,6 +1560,14 @@ type AcceptUserInviteRequest = {
1483
1560
 
1484
1561
  type AcceptUserInviteResponse = {
1485
1562
  message: string;
1563
+ generated_certificate_bundle: {
1564
+ root_ca_pem: string;
1565
+ member_cert_pem: string;
1566
+ member_key_pem: string;
1567
+ member_certificate_id: string;
1568
+ member_serial_hex: string;
1569
+ is_system_generated: boolean;
1570
+ };
1486
1571
  };
1487
1572
 
1488
1573
  type CreateOrgInviteRequest = {
@@ -1621,6 +1706,14 @@ type CheckSlugResponse = {
1621
1706
  exists: boolean;
1622
1707
  };
1623
1708
 
1709
+ type DeleteOrgRequest = {
1710
+ confirm_name: string;
1711
+ };
1712
+
1713
+ type DeleteOrgResponse = {
1714
+ message: string;
1715
+ };
1716
+
1624
1717
  type OrgResponse = {
1625
1718
  id: string;
1626
1719
  name: string;
@@ -1659,6 +1752,14 @@ declare class OrganizationsService {
1659
1752
  * @throws ApiError
1660
1753
  */
1661
1754
  updateOrg(requestBody?: UpdateOrgRequest): CancelablePromise<OrgResponse>;
1755
+ /**
1756
+ * Delete Organization
1757
+ * Permanently delete the current organization
1758
+ * @param requestBody
1759
+ * @returns DeleteOrgResponse Organization deleted successfully
1760
+ * @throws ApiError
1761
+ */
1762
+ deleteOrg(requestBody?: DeleteOrgRequest): CancelablePromise<DeleteOrgResponse>;
1662
1763
  /**
1663
1764
  * Check Slug Availability
1664
1765
  * Check if an organization slug is available
@@ -1669,13 +1770,40 @@ declare class OrganizationsService {
1669
1770
  checkIfSlugExists(slug: string): CancelablePromise<CheckSlugResponse>;
1670
1771
  }
1671
1772
 
1672
- type EffectiveAccessResponse = Array<{
1773
+ type EffectiveAccessEntry = {
1673
1774
  user_id: string;
1674
1775
  email: string;
1675
- relation: 'admin' | 'editor' | 'viewer';
1676
- source: 'direct' | 'team' | 'both';
1776
+ relation: EffectiveAccessEntry.relation;
1777
+ org_relation: EffectiveAccessEntry.org_relation;
1778
+ direct_relation: EffectiveAccessEntry.direct_relation;
1779
+ team_relation: EffectiveAccessEntry.team_relation;
1780
+ sources: Array<'org' | 'direct' | 'team'>;
1677
1781
  teams: Array<string>;
1678
- }>;
1782
+ };
1783
+ declare namespace EffectiveAccessEntry {
1784
+ enum relation {
1785
+ ADMIN = "admin",
1786
+ EDITOR = "editor",
1787
+ VIEWER = "viewer"
1788
+ }
1789
+ enum org_relation {
1790
+ ADMIN = "admin",
1791
+ EDITOR = "editor",
1792
+ VIEWER = "viewer"
1793
+ }
1794
+ enum direct_relation {
1795
+ ADMIN = "admin",
1796
+ EDITOR = "editor",
1797
+ VIEWER = "viewer"
1798
+ }
1799
+ enum team_relation {
1800
+ ADMIN = "admin",
1801
+ EDITOR = "editor",
1802
+ VIEWER = "viewer"
1803
+ }
1804
+ }
1805
+
1806
+ type EffectiveAccessResponse = Array<EffectiveAccessEntry>;
1679
1807
 
1680
1808
  type EffectivePermissionsResponse = {
1681
1809
  can_view: boolean;
@@ -1712,11 +1840,24 @@ declare namespace GrantAccessRequest {
1712
1840
  }
1713
1841
  }
1714
1842
 
1715
- type GrantsListResponse = Array<{
1843
+ type GrantEntry = {
1716
1844
  subject_id: string;
1717
- subject_type: 'user' | 'team';
1718
- relation: 'admin' | 'editor' | 'viewer';
1719
- }>;
1845
+ subject_type: GrantEntry.subject_type;
1846
+ relation: GrantEntry.relation;
1847
+ };
1848
+ declare namespace GrantEntry {
1849
+ enum subject_type {
1850
+ USER = "user",
1851
+ TEAM = "team"
1852
+ }
1853
+ enum relation {
1854
+ ADMIN = "admin",
1855
+ EDITOR = "editor",
1856
+ VIEWER = "viewer"
1857
+ }
1858
+ }
1859
+
1860
+ type GrantsListResponse = Array<GrantEntry>;
1720
1861
 
1721
1862
  type PermissionMessageResponse = {
1722
1863
  message: string;
@@ -2076,6 +2217,8 @@ type SecretHistoryRequest = {
2076
2217
  env_type_id: string;
2077
2218
  page?: number;
2078
2219
  per_page?: number;
2220
+ from_created_at?: string;
2221
+ to_created_at?: string;
2079
2222
  };
2080
2223
 
2081
2224
  type SecretHistoryResponse = {
@@ -2088,6 +2231,7 @@ type SecretHistoryResponse = {
2088
2231
  user_id: string;
2089
2232
  created_at: string;
2090
2233
  updated_at: string;
2234
+ changes_count: number;
2091
2235
  }>;
2092
2236
  totalPages: number;
2093
2237
  };
@@ -2102,8 +2246,16 @@ type SecretPitStateResponse = Array<{
2102
2246
  key: string;
2103
2247
  value: string;
2104
2248
  last_updated: string;
2249
+ operation: 'CREATE' | 'UPDATE' | 'DELETE';
2105
2250
  }>;
2106
2251
 
2252
+ type SecretTimestampRangeDiffRequest = {
2253
+ app_id: string;
2254
+ env_type_id: string;
2255
+ from_timestamp: string;
2256
+ to_timestamp: string;
2257
+ };
2258
+
2107
2259
  type SecretTimestampRequest = {
2108
2260
  app_id: string;
2109
2261
  env_type_id: string;
@@ -2161,6 +2313,14 @@ declare class SecretsPointInTimeService {
2161
2313
  * @throws ApiError
2162
2314
  */
2163
2315
  getSecretDiff(requestBody?: SecretDiffRequest): CancelablePromise<SecretDiffResponse>;
2316
+ /**
2317
+ * Get Secrets Diff By Timestamp Range
2318
+ * Compare secrets between two timestamps
2319
+ * @param requestBody
2320
+ * @returns SecretDiffResponse Secrets timestamp-range diff retrieved successfully
2321
+ * @throws ApiError
2322
+ */
2323
+ getSecretDiffByTimestampRange(requestBody?: SecretTimestampRangeDiffRequest): CancelablePromise<SecretDiffResponse>;
2164
2324
  /**
2165
2325
  * Get Secret Variable Timeline
2166
2326
  * Get timeline of changes for a specific secret variable
@@ -2663,4 +2823,4 @@ type UploadFileError = {
2663
2823
  error: string;
2664
2824
  };
2665
2825
 
2666
- export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, type AssignTeamRoleRequest, AuditLogsService, AuthenticationService, 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 DeleteSecretRequest, type DeleteUserInviteResponse, type DirectChangeRequestBody, type EffectiveAccessResponse, type EffectivePermissionsResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, 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, type GrantsListResponse, type ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, type LoginUrlResponse, type LogoutUrlResponse, type MemberCertResponse, 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 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 };
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 };