@envsync-cloud/envsync-ts-sdk 0.3.6 → 0.6.0
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/LICENSE +21 -0
- package/README.md +67 -3
- package/dist/index.d.mts +584 -8
- package/dist/index.d.ts +584 -8
- package/dist/index.js +721 -12
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +712 -12
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -11
- package/dist/index.global.js +0 -2291
package/dist/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ declare class AccessService {
|
|
|
89
89
|
createWebLogin(): CancelablePromise<LoginUrlResponse>;
|
|
90
90
|
/**
|
|
91
91
|
* Web Login Callback
|
|
92
|
-
* Handle web login callback from
|
|
92
|
+
* Handle web login callback from Zitadel
|
|
93
93
|
* @param code
|
|
94
94
|
* @returns void
|
|
95
95
|
* @throws ApiError
|
|
@@ -104,7 +104,7 @@ declare class AccessService {
|
|
|
104
104
|
createApiLogin(): CancelablePromise<LoginUrlResponse>;
|
|
105
105
|
/**
|
|
106
106
|
* API Login Callback
|
|
107
|
-
* Handle API login callback from
|
|
107
|
+
* Handle API login callback from Zitadel
|
|
108
108
|
* @param code
|
|
109
109
|
* @returns CallbackResponse API login callback successful
|
|
110
110
|
* @throws ApiError
|
|
@@ -338,10 +338,13 @@ declare class AuditLogsService {
|
|
|
338
338
|
* Retrieve audit logs for the organization with pagination
|
|
339
339
|
* @param page
|
|
340
340
|
* @param perPage
|
|
341
|
+
* @param filterByUser
|
|
342
|
+
* @param filterByCategory
|
|
343
|
+
* @param filterByPastTime
|
|
341
344
|
* @returns GetAuditLogsResponseWrapper Audit logs retrieved successfully
|
|
342
345
|
* @throws ApiError
|
|
343
346
|
*/
|
|
344
|
-
getAuditLogs(page?: string, perPage?: string): CancelablePromise<GetAuditLogsResponseWrapper>;
|
|
347
|
+
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>;
|
|
345
348
|
}
|
|
346
349
|
|
|
347
350
|
type RoleResponse = {
|
|
@@ -398,6 +401,159 @@ declare class AuthenticationService {
|
|
|
398
401
|
whoami(): CancelablePromise<WhoAmIResponse>;
|
|
399
402
|
}
|
|
400
403
|
|
|
404
|
+
type CertificateListResponse = Array<{
|
|
405
|
+
id: string;
|
|
406
|
+
org_id: string;
|
|
407
|
+
serial_hex: string;
|
|
408
|
+
cert_type: string;
|
|
409
|
+
subject_cn: string;
|
|
410
|
+
subject_email: string | null;
|
|
411
|
+
status: string;
|
|
412
|
+
not_before: string | null;
|
|
413
|
+
not_after: string | null;
|
|
414
|
+
description: string | null;
|
|
415
|
+
metadata?: Record<string, string> | null;
|
|
416
|
+
revoked_at: string | null;
|
|
417
|
+
created_at: string;
|
|
418
|
+
updated_at: string;
|
|
419
|
+
}>;
|
|
420
|
+
|
|
421
|
+
type CRLResponse = {
|
|
422
|
+
crl_pem: string;
|
|
423
|
+
crl_number: number;
|
|
424
|
+
is_delta: boolean;
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
type InitOrgCARequest = {
|
|
428
|
+
org_name: string;
|
|
429
|
+
description?: string;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
type IssueMemberCertRequest = {
|
|
433
|
+
member_email: string;
|
|
434
|
+
role: string;
|
|
435
|
+
description?: string;
|
|
436
|
+
metadata?: Record<string, string>;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
type MemberCertResponse = {
|
|
440
|
+
id: string;
|
|
441
|
+
org_id: string;
|
|
442
|
+
serial_hex: string;
|
|
443
|
+
cert_type: string;
|
|
444
|
+
subject_cn: string;
|
|
445
|
+
subject_email: string | null;
|
|
446
|
+
status: string;
|
|
447
|
+
metadata?: Record<string, string> | null;
|
|
448
|
+
cert_pem: string;
|
|
449
|
+
key_pem: string;
|
|
450
|
+
created_at: string;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
type OCSPResponse = {
|
|
454
|
+
status: string;
|
|
455
|
+
revoked_at: string | null;
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
type OrgCAResponse = {
|
|
459
|
+
id: string;
|
|
460
|
+
org_id: string;
|
|
461
|
+
serial_hex: string;
|
|
462
|
+
cert_type: string;
|
|
463
|
+
subject_cn: string;
|
|
464
|
+
status: string;
|
|
465
|
+
cert_pem?: string;
|
|
466
|
+
created_at: string;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
type RevokeCertRequest = {
|
|
470
|
+
reason: number;
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
type RevokeCertResponse = {
|
|
474
|
+
message: string;
|
|
475
|
+
serial_hex: string;
|
|
476
|
+
status: string;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
type RootCAResponse = {
|
|
480
|
+
cert_pem: string;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
declare class CertificatesService {
|
|
484
|
+
readonly httpRequest: BaseHttpRequest;
|
|
485
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
486
|
+
/**
|
|
487
|
+
* Initialize Organization CA
|
|
488
|
+
* Create an intermediate CA for the organization via miniKMS
|
|
489
|
+
* @param requestBody
|
|
490
|
+
* @returns OrgCAResponse Organization CA initialized successfully
|
|
491
|
+
* @throws ApiError
|
|
492
|
+
*/
|
|
493
|
+
initOrgCa(requestBody?: InitOrgCARequest): CancelablePromise<OrgCAResponse>;
|
|
494
|
+
/**
|
|
495
|
+
* Get Organization CA
|
|
496
|
+
* Retrieve the organization's intermediate CA certificate
|
|
497
|
+
* @returns OrgCAResponse Organization CA retrieved successfully
|
|
498
|
+
* @throws ApiError
|
|
499
|
+
*/
|
|
500
|
+
getOrgCa(): CancelablePromise<OrgCAResponse>;
|
|
501
|
+
/**
|
|
502
|
+
* Get Root CA
|
|
503
|
+
* Retrieve the root CA certificate
|
|
504
|
+
* @returns RootCAResponse Root CA retrieved successfully
|
|
505
|
+
* @throws ApiError
|
|
506
|
+
*/
|
|
507
|
+
getRootCa(): CancelablePromise<RootCAResponse>;
|
|
508
|
+
/**
|
|
509
|
+
* Issue Member Certificate
|
|
510
|
+
* Issue a new member certificate signed by the organization CA
|
|
511
|
+
* @param requestBody
|
|
512
|
+
* @returns MemberCertResponse Member certificate issued successfully
|
|
513
|
+
* @throws ApiError
|
|
514
|
+
*/
|
|
515
|
+
issueMemberCert(requestBody?: IssueMemberCertRequest): CancelablePromise<MemberCertResponse>;
|
|
516
|
+
/**
|
|
517
|
+
* Get CRL
|
|
518
|
+
* Retrieve the Certificate Revocation List for the organization
|
|
519
|
+
* @returns CRLResponse CRL retrieved successfully
|
|
520
|
+
* @throws ApiError
|
|
521
|
+
*/
|
|
522
|
+
getCrl(): CancelablePromise<CRLResponse>;
|
|
523
|
+
/**
|
|
524
|
+
* List Certificates
|
|
525
|
+
* List all certificates for the organization
|
|
526
|
+
* @returns CertificateListResponse Certificates retrieved successfully
|
|
527
|
+
* @throws ApiError
|
|
528
|
+
*/
|
|
529
|
+
listCertificates(): CancelablePromise<CertificateListResponse>;
|
|
530
|
+
/**
|
|
531
|
+
* Get Certificate
|
|
532
|
+
* Retrieve a specific certificate by ID
|
|
533
|
+
* @param id
|
|
534
|
+
* @returns CertificateListResponse Certificate retrieved successfully
|
|
535
|
+
* @throws ApiError
|
|
536
|
+
*/
|
|
537
|
+
getCertificate(id: string): CancelablePromise<CertificateListResponse>;
|
|
538
|
+
/**
|
|
539
|
+
* Revoke Certificate
|
|
540
|
+
* Revoke a certificate by its serial number
|
|
541
|
+
* @param serialHex
|
|
542
|
+
* @param requestBody
|
|
543
|
+
* @returns RevokeCertResponse Certificate revoked successfully
|
|
544
|
+
* @throws ApiError
|
|
545
|
+
*/
|
|
546
|
+
revokeCert(serialHex: string, requestBody?: RevokeCertRequest): CancelablePromise<RevokeCertResponse>;
|
|
547
|
+
/**
|
|
548
|
+
* Check OCSP Status
|
|
549
|
+
* Check the OCSP status of a certificate
|
|
550
|
+
* @param serialHex
|
|
551
|
+
* @returns OCSPResponse OCSP status retrieved successfully
|
|
552
|
+
* @throws ApiError
|
|
553
|
+
*/
|
|
554
|
+
checkOcsp(serialHex: string): CancelablePromise<OCSPResponse>;
|
|
555
|
+
}
|
|
556
|
+
|
|
401
557
|
type CreateEnvTypeRequest = {
|
|
402
558
|
name: string;
|
|
403
559
|
color?: string;
|
|
@@ -843,6 +999,197 @@ declare class FileUploadService {
|
|
|
843
999
|
}): CancelablePromise<UploadFileResponse>;
|
|
844
1000
|
}
|
|
845
1001
|
|
|
1002
|
+
type ExportKeyResponse = {
|
|
1003
|
+
public_key: string;
|
|
1004
|
+
fingerprint: string;
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
type GenerateGpgKeyRequest = {
|
|
1008
|
+
name: string;
|
|
1009
|
+
email: string;
|
|
1010
|
+
algorithm: GenerateGpgKeyRequest.algorithm;
|
|
1011
|
+
key_size?: number;
|
|
1012
|
+
usage_flags: Array<'sign' | 'encrypt' | 'certify'>;
|
|
1013
|
+
expires_in_days?: number;
|
|
1014
|
+
is_default?: boolean;
|
|
1015
|
+
};
|
|
1016
|
+
declare namespace GenerateGpgKeyRequest {
|
|
1017
|
+
enum algorithm {
|
|
1018
|
+
RSA = "rsa",
|
|
1019
|
+
ECC_CURVE25519 = "ecc-curve25519",
|
|
1020
|
+
ECC_P256 = "ecc-p256",
|
|
1021
|
+
ECC_P384 = "ecc-p384"
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
type GpgKeyResponse = {
|
|
1026
|
+
id: string;
|
|
1027
|
+
org_id: string;
|
|
1028
|
+
user_id: string;
|
|
1029
|
+
name: string;
|
|
1030
|
+
email: string;
|
|
1031
|
+
fingerprint: string;
|
|
1032
|
+
key_id: string;
|
|
1033
|
+
algorithm: string;
|
|
1034
|
+
key_size: number | null;
|
|
1035
|
+
usage_flags: Array<string>;
|
|
1036
|
+
trust_level: string;
|
|
1037
|
+
expires_at: string | null;
|
|
1038
|
+
revoked_at: string | null;
|
|
1039
|
+
is_default: boolean;
|
|
1040
|
+
created_at: string;
|
|
1041
|
+
updated_at: string;
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
type GpgKeyDetailResponse = (GpgKeyResponse & {
|
|
1045
|
+
public_key: string;
|
|
1046
|
+
revocation_reason: string | null;
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
type GpgKeysResponse = Array<GpgKeyResponse>;
|
|
1050
|
+
|
|
1051
|
+
type ImportGpgKeyRequest = {
|
|
1052
|
+
name: string;
|
|
1053
|
+
armored_public_key: string;
|
|
1054
|
+
armored_private_key?: string;
|
|
1055
|
+
passphrase?: string;
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
type RevokeGpgKeyRequest = {
|
|
1059
|
+
reason?: string;
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
type SignatureResponse = {
|
|
1063
|
+
signature: string;
|
|
1064
|
+
key_id: string;
|
|
1065
|
+
fingerprint: string;
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
type SignDataRequest = {
|
|
1069
|
+
gpg_key_id: string;
|
|
1070
|
+
data: string;
|
|
1071
|
+
mode?: SignDataRequest.mode;
|
|
1072
|
+
detached?: boolean;
|
|
1073
|
+
};
|
|
1074
|
+
declare namespace SignDataRequest {
|
|
1075
|
+
enum mode {
|
|
1076
|
+
BINARY = "binary",
|
|
1077
|
+
TEXT = "text",
|
|
1078
|
+
CLEARSIGN = "clearsign"
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
type UpdateTrustLevelRequest = {
|
|
1083
|
+
trust_level: UpdateTrustLevelRequest.trust_level;
|
|
1084
|
+
};
|
|
1085
|
+
declare namespace UpdateTrustLevelRequest {
|
|
1086
|
+
enum trust_level {
|
|
1087
|
+
UNKNOWN = "unknown",
|
|
1088
|
+
NEVER = "never",
|
|
1089
|
+
MARGINAL = "marginal",
|
|
1090
|
+
FULL = "full",
|
|
1091
|
+
ULTIMATE = "ultimate"
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
type VerifyResponse = {
|
|
1096
|
+
valid: boolean;
|
|
1097
|
+
signer_fingerprint: string | null;
|
|
1098
|
+
signer_key_id: string | null;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
type VerifySignatureRequest = {
|
|
1102
|
+
data: string;
|
|
1103
|
+
signature: string;
|
|
1104
|
+
gpg_key_id?: string;
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
declare class GpgKeysService {
|
|
1108
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1109
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1110
|
+
/**
|
|
1111
|
+
* Generate GPG Key
|
|
1112
|
+
* Generate a new GPG key pair for the organization
|
|
1113
|
+
* @param requestBody
|
|
1114
|
+
* @returns GpgKeyResponse GPG key generated successfully
|
|
1115
|
+
* @throws ApiError
|
|
1116
|
+
*/
|
|
1117
|
+
generateGpgKey(requestBody?: GenerateGpgKeyRequest): CancelablePromise<GpgKeyResponse>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Import GPG Key
|
|
1120
|
+
* Import an existing GPG key into the organization
|
|
1121
|
+
* @param requestBody
|
|
1122
|
+
* @returns GpgKeyResponse GPG key imported successfully
|
|
1123
|
+
* @throws ApiError
|
|
1124
|
+
*/
|
|
1125
|
+
importGpgKey(requestBody?: ImportGpgKeyRequest): CancelablePromise<GpgKeyResponse>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Sign Data
|
|
1128
|
+
* Sign data using a GPG key
|
|
1129
|
+
* @param requestBody
|
|
1130
|
+
* @returns SignatureResponse Data signed successfully
|
|
1131
|
+
* @throws ApiError
|
|
1132
|
+
*/
|
|
1133
|
+
signDataWithGpgKey(requestBody?: SignDataRequest): CancelablePromise<SignatureResponse>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Verify Signature
|
|
1136
|
+
* Verify a GPG signature
|
|
1137
|
+
* @param requestBody
|
|
1138
|
+
* @returns VerifyResponse Verification result
|
|
1139
|
+
* @throws ApiError
|
|
1140
|
+
*/
|
|
1141
|
+
verifyGpgSignature(requestBody?: VerifySignatureRequest): CancelablePromise<VerifyResponse>;
|
|
1142
|
+
/**
|
|
1143
|
+
* List GPG Keys
|
|
1144
|
+
* List all GPG keys for the organization
|
|
1145
|
+
* @returns GpgKeysResponse GPG keys retrieved successfully
|
|
1146
|
+
* @throws ApiError
|
|
1147
|
+
*/
|
|
1148
|
+
listGpgKeys(): CancelablePromise<GpgKeysResponse>;
|
|
1149
|
+
/**
|
|
1150
|
+
* Get GPG Key
|
|
1151
|
+
* Retrieve a specific GPG key
|
|
1152
|
+
* @param id
|
|
1153
|
+
* @returns GpgKeyDetailResponse GPG key retrieved successfully
|
|
1154
|
+
* @throws ApiError
|
|
1155
|
+
*/
|
|
1156
|
+
getGpgKey(id: string): CancelablePromise<GpgKeyDetailResponse>;
|
|
1157
|
+
/**
|
|
1158
|
+
* Delete GPG Key
|
|
1159
|
+
* Delete a GPG key from the organization
|
|
1160
|
+
* @param id
|
|
1161
|
+
* @returns GpgKeyResponse GPG key deleted successfully
|
|
1162
|
+
* @throws ApiError
|
|
1163
|
+
*/
|
|
1164
|
+
deleteGpgKey(id: string): CancelablePromise<GpgKeyResponse>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Export GPG Public Key
|
|
1167
|
+
* Export the ASCII-armored public key
|
|
1168
|
+
* @param id
|
|
1169
|
+
* @returns ExportKeyResponse Public key exported successfully
|
|
1170
|
+
* @throws ApiError
|
|
1171
|
+
*/
|
|
1172
|
+
exportGpgPublicKey(id: string): CancelablePromise<ExportKeyResponse>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Revoke GPG Key
|
|
1175
|
+
* Revoke a GPG key (keeps data but marks as revoked)
|
|
1176
|
+
* @param id
|
|
1177
|
+
* @param requestBody
|
|
1178
|
+
* @returns GpgKeyDetailResponse GPG key revoked successfully
|
|
1179
|
+
* @throws ApiError
|
|
1180
|
+
*/
|
|
1181
|
+
revokeGpgKey(id: string, requestBody?: RevokeGpgKeyRequest): CancelablePromise<GpgKeyDetailResponse>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Update Trust Level
|
|
1184
|
+
* Update the trust level of a GPG key
|
|
1185
|
+
* @param id
|
|
1186
|
+
* @param requestBody
|
|
1187
|
+
* @returns GpgKeyDetailResponse Trust level updated successfully
|
|
1188
|
+
* @throws ApiError
|
|
1189
|
+
*/
|
|
1190
|
+
updateGpgKeyTrustLevel(id: string, requestBody?: UpdateTrustLevelRequest): CancelablePromise<GpgKeyDetailResponse>;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
846
1193
|
type AcceptOrgInviteRequest = {
|
|
847
1194
|
org_data: {
|
|
848
1195
|
name: string;
|
|
@@ -994,11 +1341,10 @@ declare class OnboardingService {
|
|
|
994
1341
|
* Delete User Invite
|
|
995
1342
|
* Delete user invite
|
|
996
1343
|
* @param inviteId
|
|
997
|
-
* @param requestBody
|
|
998
1344
|
* @returns DeleteUserInviteResponse User invite deleted successfully
|
|
999
1345
|
* @throws ApiError
|
|
1000
1346
|
*/
|
|
1001
|
-
deleteUserInvite(inviteId: string
|
|
1347
|
+
deleteUserInvite(inviteId: string): CancelablePromise<DeleteUserInviteResponse>;
|
|
1002
1348
|
}
|
|
1003
1349
|
|
|
1004
1350
|
type CheckSlugResponse = {
|
|
@@ -1052,6 +1398,110 @@ declare class OrganizationsService {
|
|
|
1052
1398
|
checkIfSlugExists(slug: string): CancelablePromise<CheckSlugResponse>;
|
|
1053
1399
|
}
|
|
1054
1400
|
|
|
1401
|
+
type EffectivePermissionsResponse = {
|
|
1402
|
+
can_view: boolean;
|
|
1403
|
+
can_edit: boolean;
|
|
1404
|
+
have_api_access: boolean;
|
|
1405
|
+
have_billing_options: boolean;
|
|
1406
|
+
have_webhook_access: boolean;
|
|
1407
|
+
is_admin: boolean;
|
|
1408
|
+
is_master: boolean;
|
|
1409
|
+
can_manage_roles: boolean;
|
|
1410
|
+
can_manage_users: boolean;
|
|
1411
|
+
can_manage_apps: boolean;
|
|
1412
|
+
can_manage_api_keys: boolean;
|
|
1413
|
+
can_manage_webhooks: boolean;
|
|
1414
|
+
can_view_audit_logs: boolean;
|
|
1415
|
+
can_manage_org_settings: boolean;
|
|
1416
|
+
can_manage_invites: boolean;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
type GrantAccessRequest = {
|
|
1420
|
+
subject_id: string;
|
|
1421
|
+
subject_type: GrantAccessRequest.subject_type;
|
|
1422
|
+
relation: GrantAccessRequest.relation;
|
|
1423
|
+
};
|
|
1424
|
+
declare namespace GrantAccessRequest {
|
|
1425
|
+
enum subject_type {
|
|
1426
|
+
USER = "user",
|
|
1427
|
+
TEAM = "team"
|
|
1428
|
+
}
|
|
1429
|
+
enum relation {
|
|
1430
|
+
ADMIN = "admin",
|
|
1431
|
+
EDITOR = "editor",
|
|
1432
|
+
VIEWER = "viewer"
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
type PermissionMessageResponse = {
|
|
1437
|
+
message: string;
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
type RevokeAccessRequest = {
|
|
1441
|
+
subject_id: string;
|
|
1442
|
+
subject_type: RevokeAccessRequest.subject_type;
|
|
1443
|
+
relation: RevokeAccessRequest.relation;
|
|
1444
|
+
};
|
|
1445
|
+
declare namespace RevokeAccessRequest {
|
|
1446
|
+
enum subject_type {
|
|
1447
|
+
USER = "user",
|
|
1448
|
+
TEAM = "team"
|
|
1449
|
+
}
|
|
1450
|
+
enum relation {
|
|
1451
|
+
ADMIN = "admin",
|
|
1452
|
+
EDITOR = "editor",
|
|
1453
|
+
VIEWER = "viewer"
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
declare class PermissionsService {
|
|
1458
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1459
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1460
|
+
/**
|
|
1461
|
+
* Get My Permissions
|
|
1462
|
+
* Get the current user's effective permissions in the organization
|
|
1463
|
+
* @returns EffectivePermissionsResponse Permissions retrieved successfully
|
|
1464
|
+
* @throws ApiError
|
|
1465
|
+
*/
|
|
1466
|
+
getMyPermissions(): CancelablePromise<EffectivePermissionsResponse>;
|
|
1467
|
+
/**
|
|
1468
|
+
* Grant App Access
|
|
1469
|
+
* Grant a user or team access to an app
|
|
1470
|
+
* @param appId
|
|
1471
|
+
* @param requestBody
|
|
1472
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1473
|
+
* @throws ApiError
|
|
1474
|
+
*/
|
|
1475
|
+
grantAppAccess(appId: string, requestBody?: GrantAccessRequest): CancelablePromise<PermissionMessageResponse>;
|
|
1476
|
+
/**
|
|
1477
|
+
* Revoke App Access
|
|
1478
|
+
* Revoke a user or team's access to an app
|
|
1479
|
+
* @param appId
|
|
1480
|
+
* @param requestBody
|
|
1481
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1482
|
+
* @throws ApiError
|
|
1483
|
+
*/
|
|
1484
|
+
revokeAppAccess(appId: string, requestBody?: RevokeAccessRequest): CancelablePromise<PermissionMessageResponse>;
|
|
1485
|
+
/**
|
|
1486
|
+
* Grant Env Type Access
|
|
1487
|
+
* Grant a user or team access to an environment type
|
|
1488
|
+
* @param id
|
|
1489
|
+
* @param requestBody
|
|
1490
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1491
|
+
* @throws ApiError
|
|
1492
|
+
*/
|
|
1493
|
+
grantEnvTypeAccess(id: string, requestBody?: GrantAccessRequest): CancelablePromise<PermissionMessageResponse>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Revoke Env Type Access
|
|
1496
|
+
* Revoke a user or team's access to an environment type
|
|
1497
|
+
* @param id
|
|
1498
|
+
* @param requestBody
|
|
1499
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1500
|
+
* @throws ApiError
|
|
1501
|
+
*/
|
|
1502
|
+
revokeEnvTypeAccess(id: string, requestBody?: RevokeAccessRequest): CancelablePromise<PermissionMessageResponse>;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1055
1505
|
type CreateRoleRequest = {
|
|
1056
1506
|
name: string;
|
|
1057
1507
|
can_edit: boolean;
|
|
@@ -1501,6 +1951,127 @@ declare class SecretsRollbackService {
|
|
|
1501
1951
|
rollbackSecretVariableToTimestamp(key: string, requestBody?: SecretVariableRollbackToTimestampRequest): CancelablePromise<SecretVariableRollbackResponse>;
|
|
1502
1952
|
}
|
|
1503
1953
|
|
|
1954
|
+
type AddTeamMemberRequest = {
|
|
1955
|
+
user_id: string;
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
type CreateTeamRequest = {
|
|
1959
|
+
name: string;
|
|
1960
|
+
description?: string;
|
|
1961
|
+
color?: string;
|
|
1962
|
+
};
|
|
1963
|
+
|
|
1964
|
+
type CreateTeamResponse = {
|
|
1965
|
+
id: string;
|
|
1966
|
+
name: string;
|
|
1967
|
+
org_id: string;
|
|
1968
|
+
description: string | null;
|
|
1969
|
+
color: string;
|
|
1970
|
+
created_at: string;
|
|
1971
|
+
updated_at: string;
|
|
1972
|
+
};
|
|
1973
|
+
|
|
1974
|
+
type GetTeamResponse = {
|
|
1975
|
+
id: string;
|
|
1976
|
+
name: string;
|
|
1977
|
+
org_id: string;
|
|
1978
|
+
description: string | null;
|
|
1979
|
+
color: string;
|
|
1980
|
+
created_at: string;
|
|
1981
|
+
updated_at: string;
|
|
1982
|
+
members: Array<{
|
|
1983
|
+
id: string;
|
|
1984
|
+
user_id: string;
|
|
1985
|
+
created_at: string;
|
|
1986
|
+
full_name: string | null;
|
|
1987
|
+
email: string;
|
|
1988
|
+
profile_picture_url: string | null;
|
|
1989
|
+
}>;
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
type GetTeamsResponse = Array<{
|
|
1993
|
+
id: string;
|
|
1994
|
+
name: string;
|
|
1995
|
+
org_id: string;
|
|
1996
|
+
description: string | null;
|
|
1997
|
+
color: string;
|
|
1998
|
+
created_at: string;
|
|
1999
|
+
updated_at: string;
|
|
2000
|
+
}>;
|
|
2001
|
+
|
|
2002
|
+
type TeamMessageResponse = {
|
|
2003
|
+
message: string;
|
|
2004
|
+
};
|
|
2005
|
+
|
|
2006
|
+
type UpdateTeamRequest = {
|
|
2007
|
+
name?: string;
|
|
2008
|
+
description?: string;
|
|
2009
|
+
color?: string;
|
|
2010
|
+
};
|
|
2011
|
+
|
|
2012
|
+
declare class TeamsService {
|
|
2013
|
+
readonly httpRequest: BaseHttpRequest;
|
|
2014
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
2015
|
+
/**
|
|
2016
|
+
* Get All Teams
|
|
2017
|
+
* Retrieve all teams for the organization
|
|
2018
|
+
* @returns GetTeamsResponse Teams retrieved successfully
|
|
2019
|
+
* @throws ApiError
|
|
2020
|
+
*/
|
|
2021
|
+
getTeams(): CancelablePromise<GetTeamsResponse>;
|
|
2022
|
+
/**
|
|
2023
|
+
* Create Team
|
|
2024
|
+
* Create a new team in the organization
|
|
2025
|
+
* @param requestBody
|
|
2026
|
+
* @returns CreateTeamResponse Team created successfully
|
|
2027
|
+
* @throws ApiError
|
|
2028
|
+
*/
|
|
2029
|
+
createTeam(requestBody?: CreateTeamRequest): CancelablePromise<CreateTeamResponse>;
|
|
2030
|
+
/**
|
|
2031
|
+
* Get Team
|
|
2032
|
+
* Retrieve a specific team with its members
|
|
2033
|
+
* @param id
|
|
2034
|
+
* @returns GetTeamResponse Team retrieved successfully
|
|
2035
|
+
* @throws ApiError
|
|
2036
|
+
*/
|
|
2037
|
+
getTeam(id: string): CancelablePromise<GetTeamResponse>;
|
|
2038
|
+
/**
|
|
2039
|
+
* Update Team
|
|
2040
|
+
* Update an existing team
|
|
2041
|
+
* @param id
|
|
2042
|
+
* @param requestBody
|
|
2043
|
+
* @returns TeamMessageResponse Team updated successfully
|
|
2044
|
+
* @throws ApiError
|
|
2045
|
+
*/
|
|
2046
|
+
updateTeam(id: string, requestBody?: UpdateTeamRequest): CancelablePromise<TeamMessageResponse>;
|
|
2047
|
+
/**
|
|
2048
|
+
* Delete Team
|
|
2049
|
+
* Delete an existing team
|
|
2050
|
+
* @param id
|
|
2051
|
+
* @returns TeamMessageResponse Team deleted successfully
|
|
2052
|
+
* @throws ApiError
|
|
2053
|
+
*/
|
|
2054
|
+
deleteTeam(id: string): CancelablePromise<TeamMessageResponse>;
|
|
2055
|
+
/**
|
|
2056
|
+
* Add Team Member
|
|
2057
|
+
* Add a user to a team
|
|
2058
|
+
* @param id
|
|
2059
|
+
* @param requestBody
|
|
2060
|
+
* @returns TeamMessageResponse Team member added successfully
|
|
2061
|
+
* @throws ApiError
|
|
2062
|
+
*/
|
|
2063
|
+
addTeamMember(id: string, requestBody?: AddTeamMemberRequest): CancelablePromise<TeamMessageResponse>;
|
|
2064
|
+
/**
|
|
2065
|
+
* Remove Team Member
|
|
2066
|
+
* Remove a user from a team
|
|
2067
|
+
* @param id
|
|
2068
|
+
* @param userId
|
|
2069
|
+
* @returns TeamMessageResponse Team member removed successfully
|
|
2070
|
+
* @throws ApiError
|
|
2071
|
+
*/
|
|
2072
|
+
removeTeamMember(id: string, userId: string): CancelablePromise<TeamMessageResponse>;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
1504
2075
|
type UpdateUserRequest = {
|
|
1505
2076
|
full_name?: string;
|
|
1506
2077
|
profile_picture_url?: string;
|
|
@@ -1514,7 +2085,7 @@ type UserResponse = {
|
|
|
1514
2085
|
profile_picture_url: string | null;
|
|
1515
2086
|
org_id: string;
|
|
1516
2087
|
role_id: string;
|
|
1517
|
-
|
|
2088
|
+
auth_service_id: string | null;
|
|
1518
2089
|
is_active: boolean;
|
|
1519
2090
|
created_at: string;
|
|
1520
2091
|
updated_at: string;
|
|
@@ -1582,7 +2153,7 @@ type CreateWebhookRequest = {
|
|
|
1582
2153
|
event_types: Array<string>;
|
|
1583
2154
|
webhook_type: CreateWebhookRequest.webhook_type;
|
|
1584
2155
|
linked_to?: CreateWebhookRequest.linked_to;
|
|
1585
|
-
app_id?: string;
|
|
2156
|
+
app_id?: string | null;
|
|
1586
2157
|
};
|
|
1587
2158
|
declare namespace CreateWebhookRequest {
|
|
1588
2159
|
enum webhook_type {
|
|
@@ -1698,17 +2269,21 @@ declare class EnvSyncAPISDK {
|
|
|
1698
2269
|
readonly applications: ApplicationsService;
|
|
1699
2270
|
readonly auditLogs: AuditLogsService;
|
|
1700
2271
|
readonly authentication: AuthenticationService;
|
|
2272
|
+
readonly certificates: CertificatesService;
|
|
1701
2273
|
readonly environmentTypes: EnvironmentTypesService;
|
|
1702
2274
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
1703
2275
|
readonly environmentVariablesPointInTime: EnvironmentVariablesPointInTimeService;
|
|
1704
2276
|
readonly environmentVariablesRollback: EnvironmentVariablesRollbackService;
|
|
1705
2277
|
readonly fileUpload: FileUploadService;
|
|
2278
|
+
readonly gpgKeys: GpgKeysService;
|
|
1706
2279
|
readonly onboarding: OnboardingService;
|
|
1707
2280
|
readonly organizations: OrganizationsService;
|
|
2281
|
+
readonly permissions: PermissionsService;
|
|
1708
2282
|
readonly roles: RolesService;
|
|
1709
2283
|
readonly secrets: SecretsService;
|
|
1710
2284
|
readonly secretsPointInTime: SecretsPointInTimeService;
|
|
1711
2285
|
readonly secretsRollback: SecretsRollbackService;
|
|
2286
|
+
readonly teams: TeamsService;
|
|
1712
2287
|
readonly users: UsersService;
|
|
1713
2288
|
readonly webhooks: WebhooksService;
|
|
1714
2289
|
readonly request: BaseHttpRequest;
|
|
@@ -1734,10 +2309,11 @@ declare class ApiError extends Error {
|
|
|
1734
2309
|
|
|
1735
2310
|
type ErrorResponse = {
|
|
1736
2311
|
error: string;
|
|
2312
|
+
code?: string;
|
|
1737
2313
|
};
|
|
1738
2314
|
|
|
1739
2315
|
type UploadFileError = {
|
|
1740
2316
|
error: string;
|
|
1741
2317
|
};
|
|
1742
2318
|
|
|
1743
|
-
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteSecretRequest, type DeleteUserInviteResponse, 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, FileUploadService, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RevealSecretsRequest, type RevealSecretsResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, 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, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, 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, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse };
|
|
2319
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, type AddTeamMemberRequest, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, 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 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 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, type ExportKeyResponse, 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 ImportGpgKeyRequest, type InitOrgCARequest, type IssueMemberCertRequest, type LoginUrlResponse, type MemberCertResponse, type OCSPResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgCAResponse, type OrgResponse, OrganizationsService, type PermissionMessageResponse, PermissionsService, type RegenerateApiKeyResponse, 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 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 };
|