@envsync-cloud/envsync-ts-sdk 0.3.7 → 0.6.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/LICENSE +21 -0
- package/README.md +67 -3
- package/dist/index.d.mts +580 -7
- package/dist/index.d.ts +580 -7
- package/dist/index.js +713 -10
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +704 -10
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -11
- package/dist/index.global.js +0 -2297
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __export(src_exports, {
|
|
|
29
29
|
BaseHttpRequest: () => BaseHttpRequest,
|
|
30
30
|
CancelError: () => CancelError,
|
|
31
31
|
CancelablePromise: () => CancelablePromise,
|
|
32
|
+
CertificatesService: () => CertificatesService,
|
|
32
33
|
CreateWebhookRequest: () => CreateWebhookRequest,
|
|
33
34
|
EnvSyncAPISDK: () => EnvSyncAPISDK,
|
|
34
35
|
EnvironmentTypesService: () => EnvironmentTypesService,
|
|
@@ -36,14 +37,22 @@ __export(src_exports, {
|
|
|
36
37
|
EnvironmentVariablesRollbackService: () => EnvironmentVariablesRollbackService,
|
|
37
38
|
EnvironmentVariablesService: () => EnvironmentVariablesService,
|
|
38
39
|
FileUploadService: () => FileUploadService,
|
|
40
|
+
GenerateGpgKeyRequest: () => GenerateGpgKeyRequest,
|
|
41
|
+
GpgKeysService: () => GpgKeysService,
|
|
42
|
+
GrantAccessRequest: () => GrantAccessRequest,
|
|
39
43
|
OnboardingService: () => OnboardingService,
|
|
40
44
|
OpenAPI: () => OpenAPI,
|
|
41
45
|
OrganizationsService: () => OrganizationsService,
|
|
46
|
+
PermissionsService: () => PermissionsService,
|
|
47
|
+
RevokeAccessRequest: () => RevokeAccessRequest,
|
|
42
48
|
RolesService: () => RolesService,
|
|
43
49
|
SecretVariableRollbackResponse: () => SecretVariableRollbackResponse,
|
|
44
50
|
SecretsPointInTimeService: () => SecretsPointInTimeService,
|
|
45
51
|
SecretsRollbackService: () => SecretsRollbackService,
|
|
46
52
|
SecretsService: () => SecretsService,
|
|
53
|
+
SignDataRequest: () => SignDataRequest,
|
|
54
|
+
TeamsService: () => TeamsService,
|
|
55
|
+
UpdateTrustLevelRequest: () => UpdateTrustLevelRequest,
|
|
47
56
|
UpdateWebhookRequest: () => UpdateWebhookRequest,
|
|
48
57
|
UsersService: () => UsersService,
|
|
49
58
|
VariableRollbackResponse: () => VariableRollbackResponse,
|
|
@@ -463,7 +472,7 @@ var AccessService = class {
|
|
|
463
472
|
}
|
|
464
473
|
/**
|
|
465
474
|
* Web Login Callback
|
|
466
|
-
* Handle web login callback from
|
|
475
|
+
* Handle web login callback from Zitadel
|
|
467
476
|
* @param code
|
|
468
477
|
* @returns void
|
|
469
478
|
* @throws ApiError
|
|
@@ -498,7 +507,7 @@ var AccessService = class {
|
|
|
498
507
|
}
|
|
499
508
|
/**
|
|
500
509
|
* API Login Callback
|
|
501
|
-
* Handle API login callback from
|
|
510
|
+
* Handle API login callback from Zitadel
|
|
502
511
|
* @param code
|
|
503
512
|
* @returns CallbackResponse API login callback successful
|
|
504
513
|
* @throws ApiError
|
|
@@ -792,6 +801,169 @@ var AuthenticationService = class {
|
|
|
792
801
|
}
|
|
793
802
|
};
|
|
794
803
|
|
|
804
|
+
// src/services/CertificatesService.ts
|
|
805
|
+
var CertificatesService = class {
|
|
806
|
+
constructor(httpRequest) {
|
|
807
|
+
this.httpRequest = httpRequest;
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Initialize Organization CA
|
|
811
|
+
* Create an intermediate CA for the organization via miniKMS
|
|
812
|
+
* @param requestBody
|
|
813
|
+
* @returns OrgCAResponse Organization CA initialized successfully
|
|
814
|
+
* @throws ApiError
|
|
815
|
+
*/
|
|
816
|
+
initOrgCa(requestBody) {
|
|
817
|
+
return this.httpRequest.request({
|
|
818
|
+
method: "POST",
|
|
819
|
+
url: "/api/certificate/ca/init",
|
|
820
|
+
body: requestBody,
|
|
821
|
+
mediaType: "application/json",
|
|
822
|
+
errors: {
|
|
823
|
+
500: `Internal server error`
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Get Organization CA
|
|
829
|
+
* Retrieve the organization's intermediate CA certificate
|
|
830
|
+
* @returns OrgCAResponse Organization CA retrieved successfully
|
|
831
|
+
* @throws ApiError
|
|
832
|
+
*/
|
|
833
|
+
getOrgCa() {
|
|
834
|
+
return this.httpRequest.request({
|
|
835
|
+
method: "GET",
|
|
836
|
+
url: "/api/certificate/ca",
|
|
837
|
+
errors: {
|
|
838
|
+
404: `Organization CA not initialized`
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Get Root CA
|
|
844
|
+
* Retrieve the root CA certificate
|
|
845
|
+
* @returns RootCAResponse Root CA retrieved successfully
|
|
846
|
+
* @throws ApiError
|
|
847
|
+
*/
|
|
848
|
+
getRootCa() {
|
|
849
|
+
return this.httpRequest.request({
|
|
850
|
+
method: "GET",
|
|
851
|
+
url: "/api/certificate/root-ca",
|
|
852
|
+
errors: {
|
|
853
|
+
500: `Internal server error`
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Issue Member Certificate
|
|
859
|
+
* Issue a new member certificate signed by the organization CA
|
|
860
|
+
* @param requestBody
|
|
861
|
+
* @returns MemberCertResponse Member certificate issued successfully
|
|
862
|
+
* @throws ApiError
|
|
863
|
+
*/
|
|
864
|
+
issueMemberCert(requestBody) {
|
|
865
|
+
return this.httpRequest.request({
|
|
866
|
+
method: "POST",
|
|
867
|
+
url: "/api/certificate/issue",
|
|
868
|
+
body: requestBody,
|
|
869
|
+
mediaType: "application/json",
|
|
870
|
+
errors: {
|
|
871
|
+
500: `Internal server error`
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Get CRL
|
|
877
|
+
* Retrieve the Certificate Revocation List for the organization
|
|
878
|
+
* @returns CRLResponse CRL retrieved successfully
|
|
879
|
+
* @throws ApiError
|
|
880
|
+
*/
|
|
881
|
+
getCrl() {
|
|
882
|
+
return this.httpRequest.request({
|
|
883
|
+
method: "GET",
|
|
884
|
+
url: "/api/certificate/crl",
|
|
885
|
+
errors: {
|
|
886
|
+
500: `Internal server error`
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* List Certificates
|
|
892
|
+
* List all certificates for the organization
|
|
893
|
+
* @returns CertificateListResponse Certificates retrieved successfully
|
|
894
|
+
* @throws ApiError
|
|
895
|
+
*/
|
|
896
|
+
listCertificates() {
|
|
897
|
+
return this.httpRequest.request({
|
|
898
|
+
method: "GET",
|
|
899
|
+
url: "/api/certificate",
|
|
900
|
+
errors: {
|
|
901
|
+
500: `Internal server error`
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Get Certificate
|
|
907
|
+
* Retrieve a specific certificate by ID
|
|
908
|
+
* @param id
|
|
909
|
+
* @returns CertificateListResponse Certificate retrieved successfully
|
|
910
|
+
* @throws ApiError
|
|
911
|
+
*/
|
|
912
|
+
getCertificate(id) {
|
|
913
|
+
return this.httpRequest.request({
|
|
914
|
+
method: "GET",
|
|
915
|
+
url: "/api/certificate/{id}",
|
|
916
|
+
path: {
|
|
917
|
+
"id": id
|
|
918
|
+
},
|
|
919
|
+
errors: {
|
|
920
|
+
500: `Internal server error`
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Revoke Certificate
|
|
926
|
+
* Revoke a certificate by its serial number
|
|
927
|
+
* @param serialHex
|
|
928
|
+
* @param requestBody
|
|
929
|
+
* @returns RevokeCertResponse Certificate revoked successfully
|
|
930
|
+
* @throws ApiError
|
|
931
|
+
*/
|
|
932
|
+
revokeCert(serialHex, requestBody) {
|
|
933
|
+
return this.httpRequest.request({
|
|
934
|
+
method: "POST",
|
|
935
|
+
url: "/api/certificate/{serial_hex}/revoke",
|
|
936
|
+
path: {
|
|
937
|
+
"serial_hex": serialHex
|
|
938
|
+
},
|
|
939
|
+
body: requestBody,
|
|
940
|
+
mediaType: "application/json",
|
|
941
|
+
errors: {
|
|
942
|
+
500: `Internal server error`
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Check OCSP Status
|
|
948
|
+
* Check the OCSP status of a certificate
|
|
949
|
+
* @param serialHex
|
|
950
|
+
* @returns OCSPResponse OCSP status retrieved successfully
|
|
951
|
+
* @throws ApiError
|
|
952
|
+
*/
|
|
953
|
+
checkOcsp(serialHex) {
|
|
954
|
+
return this.httpRequest.request({
|
|
955
|
+
method: "GET",
|
|
956
|
+
url: "/api/certificate/{serial_hex}/ocsp",
|
|
957
|
+
path: {
|
|
958
|
+
"serial_hex": serialHex
|
|
959
|
+
},
|
|
960
|
+
errors: {
|
|
961
|
+
500: `Internal server error`
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
|
|
795
967
|
// src/services/EnvironmentTypesService.ts
|
|
796
968
|
var EnvironmentTypesService = class {
|
|
797
969
|
constructor(httpRequest) {
|
|
@@ -1264,6 +1436,201 @@ var FileUploadService = class {
|
|
|
1264
1436
|
}
|
|
1265
1437
|
};
|
|
1266
1438
|
|
|
1439
|
+
// src/services/GpgKeysService.ts
|
|
1440
|
+
var GpgKeysService = class {
|
|
1441
|
+
constructor(httpRequest) {
|
|
1442
|
+
this.httpRequest = httpRequest;
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Generate GPG Key
|
|
1446
|
+
* Generate a new GPG key pair for the organization
|
|
1447
|
+
* @param requestBody
|
|
1448
|
+
* @returns GpgKeyResponse GPG key generated successfully
|
|
1449
|
+
* @throws ApiError
|
|
1450
|
+
*/
|
|
1451
|
+
generateGpgKey(requestBody) {
|
|
1452
|
+
return this.httpRequest.request({
|
|
1453
|
+
method: "PUT",
|
|
1454
|
+
url: "/api/gpg_key/generate",
|
|
1455
|
+
body: requestBody,
|
|
1456
|
+
mediaType: "application/json",
|
|
1457
|
+
errors: {
|
|
1458
|
+
500: `Internal server error`
|
|
1459
|
+
}
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Import GPG Key
|
|
1464
|
+
* Import an existing GPG key into the organization
|
|
1465
|
+
* @param requestBody
|
|
1466
|
+
* @returns GpgKeyResponse GPG key imported successfully
|
|
1467
|
+
* @throws ApiError
|
|
1468
|
+
*/
|
|
1469
|
+
importGpgKey(requestBody) {
|
|
1470
|
+
return this.httpRequest.request({
|
|
1471
|
+
method: "PUT",
|
|
1472
|
+
url: "/api/gpg_key/import",
|
|
1473
|
+
body: requestBody,
|
|
1474
|
+
mediaType: "application/json",
|
|
1475
|
+
errors: {
|
|
1476
|
+
500: `Internal server error`
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Sign Data
|
|
1482
|
+
* Sign data using a GPG key
|
|
1483
|
+
* @param requestBody
|
|
1484
|
+
* @returns SignatureResponse Data signed successfully
|
|
1485
|
+
* @throws ApiError
|
|
1486
|
+
*/
|
|
1487
|
+
signDataWithGpgKey(requestBody) {
|
|
1488
|
+
return this.httpRequest.request({
|
|
1489
|
+
method: "POST",
|
|
1490
|
+
url: "/api/gpg_key/sign",
|
|
1491
|
+
body: requestBody,
|
|
1492
|
+
mediaType: "application/json",
|
|
1493
|
+
errors: {
|
|
1494
|
+
500: `Internal server error`
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Verify Signature
|
|
1500
|
+
* Verify a GPG signature
|
|
1501
|
+
* @param requestBody
|
|
1502
|
+
* @returns VerifyResponse Verification result
|
|
1503
|
+
* @throws ApiError
|
|
1504
|
+
*/
|
|
1505
|
+
verifyGpgSignature(requestBody) {
|
|
1506
|
+
return this.httpRequest.request({
|
|
1507
|
+
method: "POST",
|
|
1508
|
+
url: "/api/gpg_key/verify",
|
|
1509
|
+
body: requestBody,
|
|
1510
|
+
mediaType: "application/json",
|
|
1511
|
+
errors: {
|
|
1512
|
+
500: `Internal server error`
|
|
1513
|
+
}
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* List GPG Keys
|
|
1518
|
+
* List all GPG keys for the organization
|
|
1519
|
+
* @returns GpgKeysResponse GPG keys retrieved successfully
|
|
1520
|
+
* @throws ApiError
|
|
1521
|
+
*/
|
|
1522
|
+
listGpgKeys() {
|
|
1523
|
+
return this.httpRequest.request({
|
|
1524
|
+
method: "GET",
|
|
1525
|
+
url: "/api/gpg_key",
|
|
1526
|
+
errors: {
|
|
1527
|
+
500: `Internal server error`
|
|
1528
|
+
}
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* Get GPG Key
|
|
1533
|
+
* Retrieve a specific GPG key
|
|
1534
|
+
* @param id
|
|
1535
|
+
* @returns GpgKeyDetailResponse GPG key retrieved successfully
|
|
1536
|
+
* @throws ApiError
|
|
1537
|
+
*/
|
|
1538
|
+
getGpgKey(id) {
|
|
1539
|
+
return this.httpRequest.request({
|
|
1540
|
+
method: "GET",
|
|
1541
|
+
url: "/api/gpg_key/{id}",
|
|
1542
|
+
path: {
|
|
1543
|
+
"id": id
|
|
1544
|
+
},
|
|
1545
|
+
errors: {
|
|
1546
|
+
500: `Internal server error`
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Delete GPG Key
|
|
1552
|
+
* Delete a GPG key from the organization
|
|
1553
|
+
* @param id
|
|
1554
|
+
* @returns GpgKeyResponse GPG key deleted successfully
|
|
1555
|
+
* @throws ApiError
|
|
1556
|
+
*/
|
|
1557
|
+
deleteGpgKey(id) {
|
|
1558
|
+
return this.httpRequest.request({
|
|
1559
|
+
method: "DELETE",
|
|
1560
|
+
url: "/api/gpg_key/{id}",
|
|
1561
|
+
path: {
|
|
1562
|
+
"id": id
|
|
1563
|
+
},
|
|
1564
|
+
errors: {
|
|
1565
|
+
500: `Internal server error`
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Export GPG Public Key
|
|
1571
|
+
* Export the ASCII-armored public key
|
|
1572
|
+
* @param id
|
|
1573
|
+
* @returns ExportKeyResponse Public key exported successfully
|
|
1574
|
+
* @throws ApiError
|
|
1575
|
+
*/
|
|
1576
|
+
exportGpgPublicKey(id) {
|
|
1577
|
+
return this.httpRequest.request({
|
|
1578
|
+
method: "GET",
|
|
1579
|
+
url: "/api/gpg_key/{id}/export",
|
|
1580
|
+
path: {
|
|
1581
|
+
"id": id
|
|
1582
|
+
},
|
|
1583
|
+
errors: {
|
|
1584
|
+
500: `Internal server error`
|
|
1585
|
+
}
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* Revoke GPG Key
|
|
1590
|
+
* Revoke a GPG key (keeps data but marks as revoked)
|
|
1591
|
+
* @param id
|
|
1592
|
+
* @param requestBody
|
|
1593
|
+
* @returns GpgKeyDetailResponse GPG key revoked successfully
|
|
1594
|
+
* @throws ApiError
|
|
1595
|
+
*/
|
|
1596
|
+
revokeGpgKey(id, requestBody) {
|
|
1597
|
+
return this.httpRequest.request({
|
|
1598
|
+
method: "POST",
|
|
1599
|
+
url: "/api/gpg_key/{id}/revoke",
|
|
1600
|
+
path: {
|
|
1601
|
+
"id": id
|
|
1602
|
+
},
|
|
1603
|
+
body: requestBody,
|
|
1604
|
+
mediaType: "application/json",
|
|
1605
|
+
errors: {
|
|
1606
|
+
500: `Internal server error`
|
|
1607
|
+
}
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Update Trust Level
|
|
1612
|
+
* Update the trust level of a GPG key
|
|
1613
|
+
* @param id
|
|
1614
|
+
* @param requestBody
|
|
1615
|
+
* @returns GpgKeyDetailResponse Trust level updated successfully
|
|
1616
|
+
* @throws ApiError
|
|
1617
|
+
*/
|
|
1618
|
+
updateGpgKeyTrustLevel(id, requestBody) {
|
|
1619
|
+
return this.httpRequest.request({
|
|
1620
|
+
method: "PATCH",
|
|
1621
|
+
url: "/api/gpg_key/{id}/trust",
|
|
1622
|
+
path: {
|
|
1623
|
+
"id": id
|
|
1624
|
+
},
|
|
1625
|
+
body: requestBody,
|
|
1626
|
+
mediaType: "application/json",
|
|
1627
|
+
errors: {
|
|
1628
|
+
500: `Internal server error`
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1267
1634
|
// src/services/OnboardingService.ts
|
|
1268
1635
|
var OnboardingService = class {
|
|
1269
1636
|
constructor(httpRequest) {
|
|
@@ -1428,19 +1795,16 @@ var OnboardingService = class {
|
|
|
1428
1795
|
* Delete User Invite
|
|
1429
1796
|
* Delete user invite
|
|
1430
1797
|
* @param inviteId
|
|
1431
|
-
* @param requestBody
|
|
1432
1798
|
* @returns DeleteUserInviteResponse User invite deleted successfully
|
|
1433
1799
|
* @throws ApiError
|
|
1434
1800
|
*/
|
|
1435
|
-
deleteUserInvite(inviteId
|
|
1801
|
+
deleteUserInvite(inviteId) {
|
|
1436
1802
|
return this.httpRequest.request({
|
|
1437
1803
|
method: "DELETE",
|
|
1438
1804
|
url: "/api/onboarding/user/{invite_id}",
|
|
1439
1805
|
path: {
|
|
1440
1806
|
"invite_id": inviteId
|
|
1441
1807
|
},
|
|
1442
|
-
body: requestBody,
|
|
1443
|
-
mediaType: "application/json",
|
|
1444
1808
|
errors: {
|
|
1445
1809
|
500: `Internal server error`
|
|
1446
1810
|
}
|
|
@@ -1507,6 +1871,116 @@ var OrganizationsService = class {
|
|
|
1507
1871
|
}
|
|
1508
1872
|
};
|
|
1509
1873
|
|
|
1874
|
+
// src/services/PermissionsService.ts
|
|
1875
|
+
var PermissionsService = class {
|
|
1876
|
+
constructor(httpRequest) {
|
|
1877
|
+
this.httpRequest = httpRequest;
|
|
1878
|
+
}
|
|
1879
|
+
/**
|
|
1880
|
+
* Get My Permissions
|
|
1881
|
+
* Get the current user's effective permissions in the organization
|
|
1882
|
+
* @returns EffectivePermissionsResponse Permissions retrieved successfully
|
|
1883
|
+
* @throws ApiError
|
|
1884
|
+
*/
|
|
1885
|
+
getMyPermissions() {
|
|
1886
|
+
return this.httpRequest.request({
|
|
1887
|
+
method: "GET",
|
|
1888
|
+
url: "/api/permission/me",
|
|
1889
|
+
errors: {
|
|
1890
|
+
500: `Internal server error`
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Grant App Access
|
|
1896
|
+
* Grant a user or team access to an app
|
|
1897
|
+
* @param appId
|
|
1898
|
+
* @param requestBody
|
|
1899
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1900
|
+
* @throws ApiError
|
|
1901
|
+
*/
|
|
1902
|
+
grantAppAccess(appId, requestBody) {
|
|
1903
|
+
return this.httpRequest.request({
|
|
1904
|
+
method: "POST",
|
|
1905
|
+
url: "/api/permission/app/{app_id}/grant",
|
|
1906
|
+
path: {
|
|
1907
|
+
"app_id": appId
|
|
1908
|
+
},
|
|
1909
|
+
body: requestBody,
|
|
1910
|
+
mediaType: "application/json",
|
|
1911
|
+
errors: {
|
|
1912
|
+
500: `Internal server error`
|
|
1913
|
+
}
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Revoke App Access
|
|
1918
|
+
* Revoke a user or team's access to an app
|
|
1919
|
+
* @param appId
|
|
1920
|
+
* @param requestBody
|
|
1921
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1922
|
+
* @throws ApiError
|
|
1923
|
+
*/
|
|
1924
|
+
revokeAppAccess(appId, requestBody) {
|
|
1925
|
+
return this.httpRequest.request({
|
|
1926
|
+
method: "POST",
|
|
1927
|
+
url: "/api/permission/app/{app_id}/revoke",
|
|
1928
|
+
path: {
|
|
1929
|
+
"app_id": appId
|
|
1930
|
+
},
|
|
1931
|
+
body: requestBody,
|
|
1932
|
+
mediaType: "application/json",
|
|
1933
|
+
errors: {
|
|
1934
|
+
500: `Internal server error`
|
|
1935
|
+
}
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Grant Env Type Access
|
|
1940
|
+
* Grant a user or team access to an environment type
|
|
1941
|
+
* @param id
|
|
1942
|
+
* @param requestBody
|
|
1943
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1944
|
+
* @throws ApiError
|
|
1945
|
+
*/
|
|
1946
|
+
grantEnvTypeAccess(id, requestBody) {
|
|
1947
|
+
return this.httpRequest.request({
|
|
1948
|
+
method: "POST",
|
|
1949
|
+
url: "/api/permission/env_type/{id}/grant",
|
|
1950
|
+
path: {
|
|
1951
|
+
"id": id
|
|
1952
|
+
},
|
|
1953
|
+
body: requestBody,
|
|
1954
|
+
mediaType: "application/json",
|
|
1955
|
+
errors: {
|
|
1956
|
+
500: `Internal server error`
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Revoke Env Type Access
|
|
1962
|
+
* Revoke a user or team's access to an environment type
|
|
1963
|
+
* @param id
|
|
1964
|
+
* @param requestBody
|
|
1965
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1966
|
+
* @throws ApiError
|
|
1967
|
+
*/
|
|
1968
|
+
revokeEnvTypeAccess(id, requestBody) {
|
|
1969
|
+
return this.httpRequest.request({
|
|
1970
|
+
method: "POST",
|
|
1971
|
+
url: "/api/permission/env_type/{id}/revoke",
|
|
1972
|
+
path: {
|
|
1973
|
+
"id": id
|
|
1974
|
+
},
|
|
1975
|
+
body: requestBody,
|
|
1976
|
+
mediaType: "application/json",
|
|
1977
|
+
errors: {
|
|
1978
|
+
500: `Internal server error`
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1510
1984
|
// src/services/RolesService.ts
|
|
1511
1985
|
var RolesService = class {
|
|
1512
1986
|
constructor(httpRequest) {
|
|
@@ -1987,6 +2461,149 @@ var SecretsRollbackService = class {
|
|
|
1987
2461
|
}
|
|
1988
2462
|
};
|
|
1989
2463
|
|
|
2464
|
+
// src/services/TeamsService.ts
|
|
2465
|
+
var TeamsService = class {
|
|
2466
|
+
constructor(httpRequest) {
|
|
2467
|
+
this.httpRequest = httpRequest;
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
* Get All Teams
|
|
2471
|
+
* Retrieve all teams for the organization
|
|
2472
|
+
* @returns GetTeamsResponse Teams retrieved successfully
|
|
2473
|
+
* @throws ApiError
|
|
2474
|
+
*/
|
|
2475
|
+
getTeams() {
|
|
2476
|
+
return this.httpRequest.request({
|
|
2477
|
+
method: "GET",
|
|
2478
|
+
url: "/api/team",
|
|
2479
|
+
errors: {
|
|
2480
|
+
500: `Internal server error`
|
|
2481
|
+
}
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Create Team
|
|
2486
|
+
* Create a new team in the organization
|
|
2487
|
+
* @param requestBody
|
|
2488
|
+
* @returns CreateTeamResponse Team created successfully
|
|
2489
|
+
* @throws ApiError
|
|
2490
|
+
*/
|
|
2491
|
+
createTeam(requestBody) {
|
|
2492
|
+
return this.httpRequest.request({
|
|
2493
|
+
method: "POST",
|
|
2494
|
+
url: "/api/team",
|
|
2495
|
+
body: requestBody,
|
|
2496
|
+
mediaType: "application/json",
|
|
2497
|
+
errors: {
|
|
2498
|
+
500: `Internal server error`
|
|
2499
|
+
}
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
/**
|
|
2503
|
+
* Get Team
|
|
2504
|
+
* Retrieve a specific team with its members
|
|
2505
|
+
* @param id
|
|
2506
|
+
* @returns GetTeamResponse Team retrieved successfully
|
|
2507
|
+
* @throws ApiError
|
|
2508
|
+
*/
|
|
2509
|
+
getTeam(id) {
|
|
2510
|
+
return this.httpRequest.request({
|
|
2511
|
+
method: "GET",
|
|
2512
|
+
url: "/api/team/{id}",
|
|
2513
|
+
path: {
|
|
2514
|
+
"id": id
|
|
2515
|
+
},
|
|
2516
|
+
errors: {
|
|
2517
|
+
500: `Internal server error`
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Update Team
|
|
2523
|
+
* Update an existing team
|
|
2524
|
+
* @param id
|
|
2525
|
+
* @param requestBody
|
|
2526
|
+
* @returns TeamMessageResponse Team updated successfully
|
|
2527
|
+
* @throws ApiError
|
|
2528
|
+
*/
|
|
2529
|
+
updateTeam(id, requestBody) {
|
|
2530
|
+
return this.httpRequest.request({
|
|
2531
|
+
method: "PATCH",
|
|
2532
|
+
url: "/api/team/{id}",
|
|
2533
|
+
path: {
|
|
2534
|
+
"id": id
|
|
2535
|
+
},
|
|
2536
|
+
body: requestBody,
|
|
2537
|
+
mediaType: "application/json",
|
|
2538
|
+
errors: {
|
|
2539
|
+
500: `Internal server error`
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
/**
|
|
2544
|
+
* Delete Team
|
|
2545
|
+
* Delete an existing team
|
|
2546
|
+
* @param id
|
|
2547
|
+
* @returns TeamMessageResponse Team deleted successfully
|
|
2548
|
+
* @throws ApiError
|
|
2549
|
+
*/
|
|
2550
|
+
deleteTeam(id) {
|
|
2551
|
+
return this.httpRequest.request({
|
|
2552
|
+
method: "DELETE",
|
|
2553
|
+
url: "/api/team/{id}",
|
|
2554
|
+
path: {
|
|
2555
|
+
"id": id
|
|
2556
|
+
},
|
|
2557
|
+
errors: {
|
|
2558
|
+
500: `Internal server error`
|
|
2559
|
+
}
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Add Team Member
|
|
2564
|
+
* Add a user to a team
|
|
2565
|
+
* @param id
|
|
2566
|
+
* @param requestBody
|
|
2567
|
+
* @returns TeamMessageResponse Team member added successfully
|
|
2568
|
+
* @throws ApiError
|
|
2569
|
+
*/
|
|
2570
|
+
addTeamMember(id, requestBody) {
|
|
2571
|
+
return this.httpRequest.request({
|
|
2572
|
+
method: "POST",
|
|
2573
|
+
url: "/api/team/{id}/members",
|
|
2574
|
+
path: {
|
|
2575
|
+
"id": id
|
|
2576
|
+
},
|
|
2577
|
+
body: requestBody,
|
|
2578
|
+
mediaType: "application/json",
|
|
2579
|
+
errors: {
|
|
2580
|
+
500: `Internal server error`
|
|
2581
|
+
}
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Remove Team Member
|
|
2586
|
+
* Remove a user from a team
|
|
2587
|
+
* @param id
|
|
2588
|
+
* @param userId
|
|
2589
|
+
* @returns TeamMessageResponse Team member removed successfully
|
|
2590
|
+
* @throws ApiError
|
|
2591
|
+
*/
|
|
2592
|
+
removeTeamMember(id, userId) {
|
|
2593
|
+
return this.httpRequest.request({
|
|
2594
|
+
method: "DELETE",
|
|
2595
|
+
url: "/api/team/{id}/members/{user_id}",
|
|
2596
|
+
path: {
|
|
2597
|
+
"id": id,
|
|
2598
|
+
"user_id": userId
|
|
2599
|
+
},
|
|
2600
|
+
errors: {
|
|
2601
|
+
500: `Internal server error`
|
|
2602
|
+
}
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
|
|
1990
2607
|
// src/services/UsersService.ts
|
|
1991
2608
|
var UsersService = class {
|
|
1992
2609
|
constructor(httpRequest) {
|
|
@@ -2217,24 +2834,28 @@ var EnvSyncAPISDK = class {
|
|
|
2217
2834
|
applications;
|
|
2218
2835
|
auditLogs;
|
|
2219
2836
|
authentication;
|
|
2837
|
+
certificates;
|
|
2220
2838
|
environmentTypes;
|
|
2221
2839
|
environmentVariables;
|
|
2222
2840
|
environmentVariablesPointInTime;
|
|
2223
2841
|
environmentVariablesRollback;
|
|
2224
2842
|
fileUpload;
|
|
2843
|
+
gpgKeys;
|
|
2225
2844
|
onboarding;
|
|
2226
2845
|
organizations;
|
|
2846
|
+
permissions;
|
|
2227
2847
|
roles;
|
|
2228
2848
|
secrets;
|
|
2229
2849
|
secretsPointInTime;
|
|
2230
2850
|
secretsRollback;
|
|
2851
|
+
teams;
|
|
2231
2852
|
users;
|
|
2232
2853
|
webhooks;
|
|
2233
2854
|
request;
|
|
2234
2855
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2235
2856
|
this.request = new HttpRequest({
|
|
2236
|
-
BASE: config?.BASE ?? "http://localhost:
|
|
2237
|
-
VERSION: config?.VERSION ?? "0.
|
|
2857
|
+
BASE: config?.BASE ?? "http://localhost:4000",
|
|
2858
|
+
VERSION: config?.VERSION ?? "0.6.1",
|
|
2238
2859
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2239
2860
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2240
2861
|
TOKEN: config?.TOKEN,
|
|
@@ -2248,17 +2869,21 @@ var EnvSyncAPISDK = class {
|
|
|
2248
2869
|
this.applications = new ApplicationsService(this.request);
|
|
2249
2870
|
this.auditLogs = new AuditLogsService(this.request);
|
|
2250
2871
|
this.authentication = new AuthenticationService(this.request);
|
|
2872
|
+
this.certificates = new CertificatesService(this.request);
|
|
2251
2873
|
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
2252
2874
|
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
2253
2875
|
this.environmentVariablesPointInTime = new EnvironmentVariablesPointInTimeService(this.request);
|
|
2254
2876
|
this.environmentVariablesRollback = new EnvironmentVariablesRollbackService(this.request);
|
|
2255
2877
|
this.fileUpload = new FileUploadService(this.request);
|
|
2878
|
+
this.gpgKeys = new GpgKeysService(this.request);
|
|
2256
2879
|
this.onboarding = new OnboardingService(this.request);
|
|
2257
2880
|
this.organizations = new OrganizationsService(this.request);
|
|
2881
|
+
this.permissions = new PermissionsService(this.request);
|
|
2258
2882
|
this.roles = new RolesService(this.request);
|
|
2259
2883
|
this.secrets = new SecretsService(this.request);
|
|
2260
2884
|
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2261
2885
|
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2886
|
+
this.teams = new TeamsService(this.request);
|
|
2262
2887
|
this.users = new UsersService(this.request);
|
|
2263
2888
|
this.webhooks = new WebhooksService(this.request);
|
|
2264
2889
|
}
|
|
@@ -2266,8 +2891,8 @@ var EnvSyncAPISDK = class {
|
|
|
2266
2891
|
|
|
2267
2892
|
// src/core/OpenAPI.ts
|
|
2268
2893
|
var OpenAPI = {
|
|
2269
|
-
BASE: "http://localhost:
|
|
2270
|
-
VERSION: "0.
|
|
2894
|
+
BASE: "http://localhost:4000",
|
|
2895
|
+
VERSION: "0.6.1",
|
|
2271
2896
|
WITH_CREDENTIALS: false,
|
|
2272
2897
|
CREDENTIALS: "include",
|
|
2273
2898
|
TOKEN: void 0,
|
|
@@ -2293,6 +2918,50 @@ var CreateWebhookRequest;
|
|
|
2293
2918
|
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2294
2919
|
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2295
2920
|
|
|
2921
|
+
// src/models/GenerateGpgKeyRequest.ts
|
|
2922
|
+
var GenerateGpgKeyRequest;
|
|
2923
|
+
((GenerateGpgKeyRequest2) => {
|
|
2924
|
+
let algorithm;
|
|
2925
|
+
((algorithm2) => {
|
|
2926
|
+
algorithm2["RSA"] = "rsa";
|
|
2927
|
+
algorithm2["ECC_CURVE25519"] = "ecc-curve25519";
|
|
2928
|
+
algorithm2["ECC_P256"] = "ecc-p256";
|
|
2929
|
+
algorithm2["ECC_P384"] = "ecc-p384";
|
|
2930
|
+
})(algorithm = GenerateGpgKeyRequest2.algorithm || (GenerateGpgKeyRequest2.algorithm = {}));
|
|
2931
|
+
})(GenerateGpgKeyRequest || (GenerateGpgKeyRequest = {}));
|
|
2932
|
+
|
|
2933
|
+
// src/models/GrantAccessRequest.ts
|
|
2934
|
+
var GrantAccessRequest;
|
|
2935
|
+
((GrantAccessRequest2) => {
|
|
2936
|
+
let subject_type;
|
|
2937
|
+
((subject_type2) => {
|
|
2938
|
+
subject_type2["USER"] = "user";
|
|
2939
|
+
subject_type2["TEAM"] = "team";
|
|
2940
|
+
})(subject_type = GrantAccessRequest2.subject_type || (GrantAccessRequest2.subject_type = {}));
|
|
2941
|
+
let relation;
|
|
2942
|
+
((relation2) => {
|
|
2943
|
+
relation2["ADMIN"] = "admin";
|
|
2944
|
+
relation2["EDITOR"] = "editor";
|
|
2945
|
+
relation2["VIEWER"] = "viewer";
|
|
2946
|
+
})(relation = GrantAccessRequest2.relation || (GrantAccessRequest2.relation = {}));
|
|
2947
|
+
})(GrantAccessRequest || (GrantAccessRequest = {}));
|
|
2948
|
+
|
|
2949
|
+
// src/models/RevokeAccessRequest.ts
|
|
2950
|
+
var RevokeAccessRequest;
|
|
2951
|
+
((RevokeAccessRequest2) => {
|
|
2952
|
+
let subject_type;
|
|
2953
|
+
((subject_type2) => {
|
|
2954
|
+
subject_type2["USER"] = "user";
|
|
2955
|
+
subject_type2["TEAM"] = "team";
|
|
2956
|
+
})(subject_type = RevokeAccessRequest2.subject_type || (RevokeAccessRequest2.subject_type = {}));
|
|
2957
|
+
let relation;
|
|
2958
|
+
((relation2) => {
|
|
2959
|
+
relation2["ADMIN"] = "admin";
|
|
2960
|
+
relation2["EDITOR"] = "editor";
|
|
2961
|
+
relation2["VIEWER"] = "viewer";
|
|
2962
|
+
})(relation = RevokeAccessRequest2.relation || (RevokeAccessRequest2.relation = {}));
|
|
2963
|
+
})(RevokeAccessRequest || (RevokeAccessRequest = {}));
|
|
2964
|
+
|
|
2296
2965
|
// src/models/SecretVariableRollbackResponse.ts
|
|
2297
2966
|
var SecretVariableRollbackResponse;
|
|
2298
2967
|
((SecretVariableRollbackResponse2) => {
|
|
@@ -2304,6 +2973,30 @@ var SecretVariableRollbackResponse;
|
|
|
2304
2973
|
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2305
2974
|
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2306
2975
|
|
|
2976
|
+
// src/models/SignDataRequest.ts
|
|
2977
|
+
var SignDataRequest;
|
|
2978
|
+
((SignDataRequest2) => {
|
|
2979
|
+
let mode;
|
|
2980
|
+
((mode2) => {
|
|
2981
|
+
mode2["BINARY"] = "binary";
|
|
2982
|
+
mode2["TEXT"] = "text";
|
|
2983
|
+
mode2["CLEARSIGN"] = "clearsign";
|
|
2984
|
+
})(mode = SignDataRequest2.mode || (SignDataRequest2.mode = {}));
|
|
2985
|
+
})(SignDataRequest || (SignDataRequest = {}));
|
|
2986
|
+
|
|
2987
|
+
// src/models/UpdateTrustLevelRequest.ts
|
|
2988
|
+
var UpdateTrustLevelRequest;
|
|
2989
|
+
((UpdateTrustLevelRequest2) => {
|
|
2990
|
+
let trust_level;
|
|
2991
|
+
((trust_level2) => {
|
|
2992
|
+
trust_level2["UNKNOWN"] = "unknown";
|
|
2993
|
+
trust_level2["NEVER"] = "never";
|
|
2994
|
+
trust_level2["MARGINAL"] = "marginal";
|
|
2995
|
+
trust_level2["FULL"] = "full";
|
|
2996
|
+
trust_level2["ULTIMATE"] = "ultimate";
|
|
2997
|
+
})(trust_level = UpdateTrustLevelRequest2.trust_level || (UpdateTrustLevelRequest2.trust_level = {}));
|
|
2998
|
+
})(UpdateTrustLevelRequest || (UpdateTrustLevelRequest = {}));
|
|
2999
|
+
|
|
2307
3000
|
// src/models/UpdateWebhookRequest.ts
|
|
2308
3001
|
var UpdateWebhookRequest;
|
|
2309
3002
|
((UpdateWebhookRequest2) => {
|
|
@@ -2357,6 +3050,7 @@ var WebhookResponse;
|
|
|
2357
3050
|
BaseHttpRequest,
|
|
2358
3051
|
CancelError,
|
|
2359
3052
|
CancelablePromise,
|
|
3053
|
+
CertificatesService,
|
|
2360
3054
|
CreateWebhookRequest,
|
|
2361
3055
|
EnvSyncAPISDK,
|
|
2362
3056
|
EnvironmentTypesService,
|
|
@@ -2364,17 +3058,26 @@ var WebhookResponse;
|
|
|
2364
3058
|
EnvironmentVariablesRollbackService,
|
|
2365
3059
|
EnvironmentVariablesService,
|
|
2366
3060
|
FileUploadService,
|
|
3061
|
+
GenerateGpgKeyRequest,
|
|
3062
|
+
GpgKeysService,
|
|
3063
|
+
GrantAccessRequest,
|
|
2367
3064
|
OnboardingService,
|
|
2368
3065
|
OpenAPI,
|
|
2369
3066
|
OrganizationsService,
|
|
3067
|
+
PermissionsService,
|
|
3068
|
+
RevokeAccessRequest,
|
|
2370
3069
|
RolesService,
|
|
2371
3070
|
SecretVariableRollbackResponse,
|
|
2372
3071
|
SecretsPointInTimeService,
|
|
2373
3072
|
SecretsRollbackService,
|
|
2374
3073
|
SecretsService,
|
|
3074
|
+
SignDataRequest,
|
|
3075
|
+
TeamsService,
|
|
3076
|
+
UpdateTrustLevelRequest,
|
|
2375
3077
|
UpdateWebhookRequest,
|
|
2376
3078
|
UsersService,
|
|
2377
3079
|
VariableRollbackResponse,
|
|
2378
3080
|
WebhookResponse,
|
|
2379
3081
|
WebhooksService
|
|
2380
3082
|
});
|
|
3083
|
+
//# sourceMappingURL=index.js.map
|