@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.mjs
CHANGED
|
@@ -409,7 +409,7 @@ var AccessService = class {
|
|
|
409
409
|
}
|
|
410
410
|
/**
|
|
411
411
|
* Web Login Callback
|
|
412
|
-
* Handle web login callback from
|
|
412
|
+
* Handle web login callback from Zitadel
|
|
413
413
|
* @param code
|
|
414
414
|
* @returns void
|
|
415
415
|
* @throws ApiError
|
|
@@ -444,7 +444,7 @@ var AccessService = class {
|
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
446
|
* API Login Callback
|
|
447
|
-
* Handle API login callback from
|
|
447
|
+
* Handle API login callback from Zitadel
|
|
448
448
|
* @param code
|
|
449
449
|
* @returns CallbackResponse API login callback successful
|
|
450
450
|
* @throws ApiError
|
|
@@ -738,6 +738,169 @@ var AuthenticationService = class {
|
|
|
738
738
|
}
|
|
739
739
|
};
|
|
740
740
|
|
|
741
|
+
// src/services/CertificatesService.ts
|
|
742
|
+
var CertificatesService = class {
|
|
743
|
+
constructor(httpRequest) {
|
|
744
|
+
this.httpRequest = httpRequest;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Initialize Organization CA
|
|
748
|
+
* Create an intermediate CA for the organization via miniKMS
|
|
749
|
+
* @param requestBody
|
|
750
|
+
* @returns OrgCAResponse Organization CA initialized successfully
|
|
751
|
+
* @throws ApiError
|
|
752
|
+
*/
|
|
753
|
+
initOrgCa(requestBody) {
|
|
754
|
+
return this.httpRequest.request({
|
|
755
|
+
method: "POST",
|
|
756
|
+
url: "/api/certificate/ca/init",
|
|
757
|
+
body: requestBody,
|
|
758
|
+
mediaType: "application/json",
|
|
759
|
+
errors: {
|
|
760
|
+
500: `Internal server error`
|
|
761
|
+
}
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Get Organization CA
|
|
766
|
+
* Retrieve the organization's intermediate CA certificate
|
|
767
|
+
* @returns OrgCAResponse Organization CA retrieved successfully
|
|
768
|
+
* @throws ApiError
|
|
769
|
+
*/
|
|
770
|
+
getOrgCa() {
|
|
771
|
+
return this.httpRequest.request({
|
|
772
|
+
method: "GET",
|
|
773
|
+
url: "/api/certificate/ca",
|
|
774
|
+
errors: {
|
|
775
|
+
404: `Organization CA not initialized`
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Get Root CA
|
|
781
|
+
* Retrieve the root CA certificate
|
|
782
|
+
* @returns RootCAResponse Root CA retrieved successfully
|
|
783
|
+
* @throws ApiError
|
|
784
|
+
*/
|
|
785
|
+
getRootCa() {
|
|
786
|
+
return this.httpRequest.request({
|
|
787
|
+
method: "GET",
|
|
788
|
+
url: "/api/certificate/root-ca",
|
|
789
|
+
errors: {
|
|
790
|
+
500: `Internal server error`
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Issue Member Certificate
|
|
796
|
+
* Issue a new member certificate signed by the organization CA
|
|
797
|
+
* @param requestBody
|
|
798
|
+
* @returns MemberCertResponse Member certificate issued successfully
|
|
799
|
+
* @throws ApiError
|
|
800
|
+
*/
|
|
801
|
+
issueMemberCert(requestBody) {
|
|
802
|
+
return this.httpRequest.request({
|
|
803
|
+
method: "POST",
|
|
804
|
+
url: "/api/certificate/issue",
|
|
805
|
+
body: requestBody,
|
|
806
|
+
mediaType: "application/json",
|
|
807
|
+
errors: {
|
|
808
|
+
500: `Internal server error`
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Get CRL
|
|
814
|
+
* Retrieve the Certificate Revocation List for the organization
|
|
815
|
+
* @returns CRLResponse CRL retrieved successfully
|
|
816
|
+
* @throws ApiError
|
|
817
|
+
*/
|
|
818
|
+
getCrl() {
|
|
819
|
+
return this.httpRequest.request({
|
|
820
|
+
method: "GET",
|
|
821
|
+
url: "/api/certificate/crl",
|
|
822
|
+
errors: {
|
|
823
|
+
500: `Internal server error`
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* List Certificates
|
|
829
|
+
* List all certificates for the organization
|
|
830
|
+
* @returns CertificateListResponse Certificates retrieved successfully
|
|
831
|
+
* @throws ApiError
|
|
832
|
+
*/
|
|
833
|
+
listCertificates() {
|
|
834
|
+
return this.httpRequest.request({
|
|
835
|
+
method: "GET",
|
|
836
|
+
url: "/api/certificate",
|
|
837
|
+
errors: {
|
|
838
|
+
500: `Internal server error`
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Get Certificate
|
|
844
|
+
* Retrieve a specific certificate by ID
|
|
845
|
+
* @param id
|
|
846
|
+
* @returns CertificateListResponse Certificate retrieved successfully
|
|
847
|
+
* @throws ApiError
|
|
848
|
+
*/
|
|
849
|
+
getCertificate(id) {
|
|
850
|
+
return this.httpRequest.request({
|
|
851
|
+
method: "GET",
|
|
852
|
+
url: "/api/certificate/{id}",
|
|
853
|
+
path: {
|
|
854
|
+
"id": id
|
|
855
|
+
},
|
|
856
|
+
errors: {
|
|
857
|
+
500: `Internal server error`
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Revoke Certificate
|
|
863
|
+
* Revoke a certificate by its serial number
|
|
864
|
+
* @param serialHex
|
|
865
|
+
* @param requestBody
|
|
866
|
+
* @returns RevokeCertResponse Certificate revoked successfully
|
|
867
|
+
* @throws ApiError
|
|
868
|
+
*/
|
|
869
|
+
revokeCert(serialHex, requestBody) {
|
|
870
|
+
return this.httpRequest.request({
|
|
871
|
+
method: "POST",
|
|
872
|
+
url: "/api/certificate/{serial_hex}/revoke",
|
|
873
|
+
path: {
|
|
874
|
+
"serial_hex": serialHex
|
|
875
|
+
},
|
|
876
|
+
body: requestBody,
|
|
877
|
+
mediaType: "application/json",
|
|
878
|
+
errors: {
|
|
879
|
+
500: `Internal server error`
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Check OCSP Status
|
|
885
|
+
* Check the OCSP status of a certificate
|
|
886
|
+
* @param serialHex
|
|
887
|
+
* @returns OCSPResponse OCSP status retrieved successfully
|
|
888
|
+
* @throws ApiError
|
|
889
|
+
*/
|
|
890
|
+
checkOcsp(serialHex) {
|
|
891
|
+
return this.httpRequest.request({
|
|
892
|
+
method: "GET",
|
|
893
|
+
url: "/api/certificate/{serial_hex}/ocsp",
|
|
894
|
+
path: {
|
|
895
|
+
"serial_hex": serialHex
|
|
896
|
+
},
|
|
897
|
+
errors: {
|
|
898
|
+
500: `Internal server error`
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
|
|
741
904
|
// src/services/EnvironmentTypesService.ts
|
|
742
905
|
var EnvironmentTypesService = class {
|
|
743
906
|
constructor(httpRequest) {
|
|
@@ -1210,6 +1373,201 @@ var FileUploadService = class {
|
|
|
1210
1373
|
}
|
|
1211
1374
|
};
|
|
1212
1375
|
|
|
1376
|
+
// src/services/GpgKeysService.ts
|
|
1377
|
+
var GpgKeysService = class {
|
|
1378
|
+
constructor(httpRequest) {
|
|
1379
|
+
this.httpRequest = httpRequest;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Generate GPG Key
|
|
1383
|
+
* Generate a new GPG key pair for the organization
|
|
1384
|
+
* @param requestBody
|
|
1385
|
+
* @returns GpgKeyResponse GPG key generated successfully
|
|
1386
|
+
* @throws ApiError
|
|
1387
|
+
*/
|
|
1388
|
+
generateGpgKey(requestBody) {
|
|
1389
|
+
return this.httpRequest.request({
|
|
1390
|
+
method: "PUT",
|
|
1391
|
+
url: "/api/gpg_key/generate",
|
|
1392
|
+
body: requestBody,
|
|
1393
|
+
mediaType: "application/json",
|
|
1394
|
+
errors: {
|
|
1395
|
+
500: `Internal server error`
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Import GPG Key
|
|
1401
|
+
* Import an existing GPG key into the organization
|
|
1402
|
+
* @param requestBody
|
|
1403
|
+
* @returns GpgKeyResponse GPG key imported successfully
|
|
1404
|
+
* @throws ApiError
|
|
1405
|
+
*/
|
|
1406
|
+
importGpgKey(requestBody) {
|
|
1407
|
+
return this.httpRequest.request({
|
|
1408
|
+
method: "PUT",
|
|
1409
|
+
url: "/api/gpg_key/import",
|
|
1410
|
+
body: requestBody,
|
|
1411
|
+
mediaType: "application/json",
|
|
1412
|
+
errors: {
|
|
1413
|
+
500: `Internal server error`
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Sign Data
|
|
1419
|
+
* Sign data using a GPG key
|
|
1420
|
+
* @param requestBody
|
|
1421
|
+
* @returns SignatureResponse Data signed successfully
|
|
1422
|
+
* @throws ApiError
|
|
1423
|
+
*/
|
|
1424
|
+
signDataWithGpgKey(requestBody) {
|
|
1425
|
+
return this.httpRequest.request({
|
|
1426
|
+
method: "POST",
|
|
1427
|
+
url: "/api/gpg_key/sign",
|
|
1428
|
+
body: requestBody,
|
|
1429
|
+
mediaType: "application/json",
|
|
1430
|
+
errors: {
|
|
1431
|
+
500: `Internal server error`
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Verify Signature
|
|
1437
|
+
* Verify a GPG signature
|
|
1438
|
+
* @param requestBody
|
|
1439
|
+
* @returns VerifyResponse Verification result
|
|
1440
|
+
* @throws ApiError
|
|
1441
|
+
*/
|
|
1442
|
+
verifyGpgSignature(requestBody) {
|
|
1443
|
+
return this.httpRequest.request({
|
|
1444
|
+
method: "POST",
|
|
1445
|
+
url: "/api/gpg_key/verify",
|
|
1446
|
+
body: requestBody,
|
|
1447
|
+
mediaType: "application/json",
|
|
1448
|
+
errors: {
|
|
1449
|
+
500: `Internal server error`
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* List GPG Keys
|
|
1455
|
+
* List all GPG keys for the organization
|
|
1456
|
+
* @returns GpgKeysResponse GPG keys retrieved successfully
|
|
1457
|
+
* @throws ApiError
|
|
1458
|
+
*/
|
|
1459
|
+
listGpgKeys() {
|
|
1460
|
+
return this.httpRequest.request({
|
|
1461
|
+
method: "GET",
|
|
1462
|
+
url: "/api/gpg_key",
|
|
1463
|
+
errors: {
|
|
1464
|
+
500: `Internal server error`
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Get GPG Key
|
|
1470
|
+
* Retrieve a specific GPG key
|
|
1471
|
+
* @param id
|
|
1472
|
+
* @returns GpgKeyDetailResponse GPG key retrieved successfully
|
|
1473
|
+
* @throws ApiError
|
|
1474
|
+
*/
|
|
1475
|
+
getGpgKey(id) {
|
|
1476
|
+
return this.httpRequest.request({
|
|
1477
|
+
method: "GET",
|
|
1478
|
+
url: "/api/gpg_key/{id}",
|
|
1479
|
+
path: {
|
|
1480
|
+
"id": id
|
|
1481
|
+
},
|
|
1482
|
+
errors: {
|
|
1483
|
+
500: `Internal server error`
|
|
1484
|
+
}
|
|
1485
|
+
});
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Delete GPG Key
|
|
1489
|
+
* Delete a GPG key from the organization
|
|
1490
|
+
* @param id
|
|
1491
|
+
* @returns GpgKeyResponse GPG key deleted successfully
|
|
1492
|
+
* @throws ApiError
|
|
1493
|
+
*/
|
|
1494
|
+
deleteGpgKey(id) {
|
|
1495
|
+
return this.httpRequest.request({
|
|
1496
|
+
method: "DELETE",
|
|
1497
|
+
url: "/api/gpg_key/{id}",
|
|
1498
|
+
path: {
|
|
1499
|
+
"id": id
|
|
1500
|
+
},
|
|
1501
|
+
errors: {
|
|
1502
|
+
500: `Internal server error`
|
|
1503
|
+
}
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* Export GPG Public Key
|
|
1508
|
+
* Export the ASCII-armored public key
|
|
1509
|
+
* @param id
|
|
1510
|
+
* @returns ExportKeyResponse Public key exported successfully
|
|
1511
|
+
* @throws ApiError
|
|
1512
|
+
*/
|
|
1513
|
+
exportGpgPublicKey(id) {
|
|
1514
|
+
return this.httpRequest.request({
|
|
1515
|
+
method: "GET",
|
|
1516
|
+
url: "/api/gpg_key/{id}/export",
|
|
1517
|
+
path: {
|
|
1518
|
+
"id": id
|
|
1519
|
+
},
|
|
1520
|
+
errors: {
|
|
1521
|
+
500: `Internal server error`
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
/**
|
|
1526
|
+
* Revoke GPG Key
|
|
1527
|
+
* Revoke a GPG key (keeps data but marks as revoked)
|
|
1528
|
+
* @param id
|
|
1529
|
+
* @param requestBody
|
|
1530
|
+
* @returns GpgKeyDetailResponse GPG key revoked successfully
|
|
1531
|
+
* @throws ApiError
|
|
1532
|
+
*/
|
|
1533
|
+
revokeGpgKey(id, requestBody) {
|
|
1534
|
+
return this.httpRequest.request({
|
|
1535
|
+
method: "POST",
|
|
1536
|
+
url: "/api/gpg_key/{id}/revoke",
|
|
1537
|
+
path: {
|
|
1538
|
+
"id": id
|
|
1539
|
+
},
|
|
1540
|
+
body: requestBody,
|
|
1541
|
+
mediaType: "application/json",
|
|
1542
|
+
errors: {
|
|
1543
|
+
500: `Internal server error`
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Update Trust Level
|
|
1549
|
+
* Update the trust level of a GPG key
|
|
1550
|
+
* @param id
|
|
1551
|
+
* @param requestBody
|
|
1552
|
+
* @returns GpgKeyDetailResponse Trust level updated successfully
|
|
1553
|
+
* @throws ApiError
|
|
1554
|
+
*/
|
|
1555
|
+
updateGpgKeyTrustLevel(id, requestBody) {
|
|
1556
|
+
return this.httpRequest.request({
|
|
1557
|
+
method: "PATCH",
|
|
1558
|
+
url: "/api/gpg_key/{id}/trust",
|
|
1559
|
+
path: {
|
|
1560
|
+
"id": id
|
|
1561
|
+
},
|
|
1562
|
+
body: requestBody,
|
|
1563
|
+
mediaType: "application/json",
|
|
1564
|
+
errors: {
|
|
1565
|
+
500: `Internal server error`
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1213
1571
|
// src/services/OnboardingService.ts
|
|
1214
1572
|
var OnboardingService = class {
|
|
1215
1573
|
constructor(httpRequest) {
|
|
@@ -1374,19 +1732,16 @@ var OnboardingService = class {
|
|
|
1374
1732
|
* Delete User Invite
|
|
1375
1733
|
* Delete user invite
|
|
1376
1734
|
* @param inviteId
|
|
1377
|
-
* @param requestBody
|
|
1378
1735
|
* @returns DeleteUserInviteResponse User invite deleted successfully
|
|
1379
1736
|
* @throws ApiError
|
|
1380
1737
|
*/
|
|
1381
|
-
deleteUserInvite(inviteId
|
|
1738
|
+
deleteUserInvite(inviteId) {
|
|
1382
1739
|
return this.httpRequest.request({
|
|
1383
1740
|
method: "DELETE",
|
|
1384
1741
|
url: "/api/onboarding/user/{invite_id}",
|
|
1385
1742
|
path: {
|
|
1386
1743
|
"invite_id": inviteId
|
|
1387
1744
|
},
|
|
1388
|
-
body: requestBody,
|
|
1389
|
-
mediaType: "application/json",
|
|
1390
1745
|
errors: {
|
|
1391
1746
|
500: `Internal server error`
|
|
1392
1747
|
}
|
|
@@ -1453,6 +1808,116 @@ var OrganizationsService = class {
|
|
|
1453
1808
|
}
|
|
1454
1809
|
};
|
|
1455
1810
|
|
|
1811
|
+
// src/services/PermissionsService.ts
|
|
1812
|
+
var PermissionsService = class {
|
|
1813
|
+
constructor(httpRequest) {
|
|
1814
|
+
this.httpRequest = httpRequest;
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Get My Permissions
|
|
1818
|
+
* Get the current user's effective permissions in the organization
|
|
1819
|
+
* @returns EffectivePermissionsResponse Permissions retrieved successfully
|
|
1820
|
+
* @throws ApiError
|
|
1821
|
+
*/
|
|
1822
|
+
getMyPermissions() {
|
|
1823
|
+
return this.httpRequest.request({
|
|
1824
|
+
method: "GET",
|
|
1825
|
+
url: "/api/permission/me",
|
|
1826
|
+
errors: {
|
|
1827
|
+
500: `Internal server error`
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* Grant App Access
|
|
1833
|
+
* Grant a user or team access to an app
|
|
1834
|
+
* @param appId
|
|
1835
|
+
* @param requestBody
|
|
1836
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1837
|
+
* @throws ApiError
|
|
1838
|
+
*/
|
|
1839
|
+
grantAppAccess(appId, requestBody) {
|
|
1840
|
+
return this.httpRequest.request({
|
|
1841
|
+
method: "POST",
|
|
1842
|
+
url: "/api/permission/app/{app_id}/grant",
|
|
1843
|
+
path: {
|
|
1844
|
+
"app_id": appId
|
|
1845
|
+
},
|
|
1846
|
+
body: requestBody,
|
|
1847
|
+
mediaType: "application/json",
|
|
1848
|
+
errors: {
|
|
1849
|
+
500: `Internal server error`
|
|
1850
|
+
}
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
/**
|
|
1854
|
+
* Revoke App Access
|
|
1855
|
+
* Revoke a user or team's access to an app
|
|
1856
|
+
* @param appId
|
|
1857
|
+
* @param requestBody
|
|
1858
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1859
|
+
* @throws ApiError
|
|
1860
|
+
*/
|
|
1861
|
+
revokeAppAccess(appId, requestBody) {
|
|
1862
|
+
return this.httpRequest.request({
|
|
1863
|
+
method: "POST",
|
|
1864
|
+
url: "/api/permission/app/{app_id}/revoke",
|
|
1865
|
+
path: {
|
|
1866
|
+
"app_id": appId
|
|
1867
|
+
},
|
|
1868
|
+
body: requestBody,
|
|
1869
|
+
mediaType: "application/json",
|
|
1870
|
+
errors: {
|
|
1871
|
+
500: `Internal server error`
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Grant Env Type Access
|
|
1877
|
+
* Grant a user or team access to an environment type
|
|
1878
|
+
* @param id
|
|
1879
|
+
* @param requestBody
|
|
1880
|
+
* @returns PermissionMessageResponse Access granted successfully
|
|
1881
|
+
* @throws ApiError
|
|
1882
|
+
*/
|
|
1883
|
+
grantEnvTypeAccess(id, requestBody) {
|
|
1884
|
+
return this.httpRequest.request({
|
|
1885
|
+
method: "POST",
|
|
1886
|
+
url: "/api/permission/env_type/{id}/grant",
|
|
1887
|
+
path: {
|
|
1888
|
+
"id": id
|
|
1889
|
+
},
|
|
1890
|
+
body: requestBody,
|
|
1891
|
+
mediaType: "application/json",
|
|
1892
|
+
errors: {
|
|
1893
|
+
500: `Internal server error`
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* Revoke Env Type Access
|
|
1899
|
+
* Revoke a user or team's access to an environment type
|
|
1900
|
+
* @param id
|
|
1901
|
+
* @param requestBody
|
|
1902
|
+
* @returns PermissionMessageResponse Access revoked successfully
|
|
1903
|
+
* @throws ApiError
|
|
1904
|
+
*/
|
|
1905
|
+
revokeEnvTypeAccess(id, requestBody) {
|
|
1906
|
+
return this.httpRequest.request({
|
|
1907
|
+
method: "POST",
|
|
1908
|
+
url: "/api/permission/env_type/{id}/revoke",
|
|
1909
|
+
path: {
|
|
1910
|
+
"id": id
|
|
1911
|
+
},
|
|
1912
|
+
body: requestBody,
|
|
1913
|
+
mediaType: "application/json",
|
|
1914
|
+
errors: {
|
|
1915
|
+
500: `Internal server error`
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1920
|
+
|
|
1456
1921
|
// src/services/RolesService.ts
|
|
1457
1922
|
var RolesService = class {
|
|
1458
1923
|
constructor(httpRequest) {
|
|
@@ -1933,6 +2398,149 @@ var SecretsRollbackService = class {
|
|
|
1933
2398
|
}
|
|
1934
2399
|
};
|
|
1935
2400
|
|
|
2401
|
+
// src/services/TeamsService.ts
|
|
2402
|
+
var TeamsService = class {
|
|
2403
|
+
constructor(httpRequest) {
|
|
2404
|
+
this.httpRequest = httpRequest;
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Get All Teams
|
|
2408
|
+
* Retrieve all teams for the organization
|
|
2409
|
+
* @returns GetTeamsResponse Teams retrieved successfully
|
|
2410
|
+
* @throws ApiError
|
|
2411
|
+
*/
|
|
2412
|
+
getTeams() {
|
|
2413
|
+
return this.httpRequest.request({
|
|
2414
|
+
method: "GET",
|
|
2415
|
+
url: "/api/team",
|
|
2416
|
+
errors: {
|
|
2417
|
+
500: `Internal server error`
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
/**
|
|
2422
|
+
* Create Team
|
|
2423
|
+
* Create a new team in the organization
|
|
2424
|
+
* @param requestBody
|
|
2425
|
+
* @returns CreateTeamResponse Team created successfully
|
|
2426
|
+
* @throws ApiError
|
|
2427
|
+
*/
|
|
2428
|
+
createTeam(requestBody) {
|
|
2429
|
+
return this.httpRequest.request({
|
|
2430
|
+
method: "POST",
|
|
2431
|
+
url: "/api/team",
|
|
2432
|
+
body: requestBody,
|
|
2433
|
+
mediaType: "application/json",
|
|
2434
|
+
errors: {
|
|
2435
|
+
500: `Internal server error`
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* Get Team
|
|
2441
|
+
* Retrieve a specific team with its members
|
|
2442
|
+
* @param id
|
|
2443
|
+
* @returns GetTeamResponse Team retrieved successfully
|
|
2444
|
+
* @throws ApiError
|
|
2445
|
+
*/
|
|
2446
|
+
getTeam(id) {
|
|
2447
|
+
return this.httpRequest.request({
|
|
2448
|
+
method: "GET",
|
|
2449
|
+
url: "/api/team/{id}",
|
|
2450
|
+
path: {
|
|
2451
|
+
"id": id
|
|
2452
|
+
},
|
|
2453
|
+
errors: {
|
|
2454
|
+
500: `Internal server error`
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2457
|
+
}
|
|
2458
|
+
/**
|
|
2459
|
+
* Update Team
|
|
2460
|
+
* Update an existing team
|
|
2461
|
+
* @param id
|
|
2462
|
+
* @param requestBody
|
|
2463
|
+
* @returns TeamMessageResponse Team updated successfully
|
|
2464
|
+
* @throws ApiError
|
|
2465
|
+
*/
|
|
2466
|
+
updateTeam(id, requestBody) {
|
|
2467
|
+
return this.httpRequest.request({
|
|
2468
|
+
method: "PATCH",
|
|
2469
|
+
url: "/api/team/{id}",
|
|
2470
|
+
path: {
|
|
2471
|
+
"id": id
|
|
2472
|
+
},
|
|
2473
|
+
body: requestBody,
|
|
2474
|
+
mediaType: "application/json",
|
|
2475
|
+
errors: {
|
|
2476
|
+
500: `Internal server error`
|
|
2477
|
+
}
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
/**
|
|
2481
|
+
* Delete Team
|
|
2482
|
+
* Delete an existing team
|
|
2483
|
+
* @param id
|
|
2484
|
+
* @returns TeamMessageResponse Team deleted successfully
|
|
2485
|
+
* @throws ApiError
|
|
2486
|
+
*/
|
|
2487
|
+
deleteTeam(id) {
|
|
2488
|
+
return this.httpRequest.request({
|
|
2489
|
+
method: "DELETE",
|
|
2490
|
+
url: "/api/team/{id}",
|
|
2491
|
+
path: {
|
|
2492
|
+
"id": id
|
|
2493
|
+
},
|
|
2494
|
+
errors: {
|
|
2495
|
+
500: `Internal server error`
|
|
2496
|
+
}
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
/**
|
|
2500
|
+
* Add Team Member
|
|
2501
|
+
* Add a user to a team
|
|
2502
|
+
* @param id
|
|
2503
|
+
* @param requestBody
|
|
2504
|
+
* @returns TeamMessageResponse Team member added successfully
|
|
2505
|
+
* @throws ApiError
|
|
2506
|
+
*/
|
|
2507
|
+
addTeamMember(id, requestBody) {
|
|
2508
|
+
return this.httpRequest.request({
|
|
2509
|
+
method: "POST",
|
|
2510
|
+
url: "/api/team/{id}/members",
|
|
2511
|
+
path: {
|
|
2512
|
+
"id": id
|
|
2513
|
+
},
|
|
2514
|
+
body: requestBody,
|
|
2515
|
+
mediaType: "application/json",
|
|
2516
|
+
errors: {
|
|
2517
|
+
500: `Internal server error`
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Remove Team Member
|
|
2523
|
+
* Remove a user from a team
|
|
2524
|
+
* @param id
|
|
2525
|
+
* @param userId
|
|
2526
|
+
* @returns TeamMessageResponse Team member removed successfully
|
|
2527
|
+
* @throws ApiError
|
|
2528
|
+
*/
|
|
2529
|
+
removeTeamMember(id, userId) {
|
|
2530
|
+
return this.httpRequest.request({
|
|
2531
|
+
method: "DELETE",
|
|
2532
|
+
url: "/api/team/{id}/members/{user_id}",
|
|
2533
|
+
path: {
|
|
2534
|
+
"id": id,
|
|
2535
|
+
"user_id": userId
|
|
2536
|
+
},
|
|
2537
|
+
errors: {
|
|
2538
|
+
500: `Internal server error`
|
|
2539
|
+
}
|
|
2540
|
+
});
|
|
2541
|
+
}
|
|
2542
|
+
};
|
|
2543
|
+
|
|
1936
2544
|
// src/services/UsersService.ts
|
|
1937
2545
|
var UsersService = class {
|
|
1938
2546
|
constructor(httpRequest) {
|
|
@@ -2163,24 +2771,28 @@ var EnvSyncAPISDK = class {
|
|
|
2163
2771
|
applications;
|
|
2164
2772
|
auditLogs;
|
|
2165
2773
|
authentication;
|
|
2774
|
+
certificates;
|
|
2166
2775
|
environmentTypes;
|
|
2167
2776
|
environmentVariables;
|
|
2168
2777
|
environmentVariablesPointInTime;
|
|
2169
2778
|
environmentVariablesRollback;
|
|
2170
2779
|
fileUpload;
|
|
2780
|
+
gpgKeys;
|
|
2171
2781
|
onboarding;
|
|
2172
2782
|
organizations;
|
|
2783
|
+
permissions;
|
|
2173
2784
|
roles;
|
|
2174
2785
|
secrets;
|
|
2175
2786
|
secretsPointInTime;
|
|
2176
2787
|
secretsRollback;
|
|
2788
|
+
teams;
|
|
2177
2789
|
users;
|
|
2178
2790
|
webhooks;
|
|
2179
2791
|
request;
|
|
2180
2792
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2181
2793
|
this.request = new HttpRequest({
|
|
2182
|
-
BASE: config?.BASE ?? "http://localhost:
|
|
2183
|
-
VERSION: config?.VERSION ?? "0.
|
|
2794
|
+
BASE: config?.BASE ?? "http://localhost:4000",
|
|
2795
|
+
VERSION: config?.VERSION ?? "0.6.1",
|
|
2184
2796
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2185
2797
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2186
2798
|
TOKEN: config?.TOKEN,
|
|
@@ -2194,17 +2806,21 @@ var EnvSyncAPISDK = class {
|
|
|
2194
2806
|
this.applications = new ApplicationsService(this.request);
|
|
2195
2807
|
this.auditLogs = new AuditLogsService(this.request);
|
|
2196
2808
|
this.authentication = new AuthenticationService(this.request);
|
|
2809
|
+
this.certificates = new CertificatesService(this.request);
|
|
2197
2810
|
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
2198
2811
|
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
2199
2812
|
this.environmentVariablesPointInTime = new EnvironmentVariablesPointInTimeService(this.request);
|
|
2200
2813
|
this.environmentVariablesRollback = new EnvironmentVariablesRollbackService(this.request);
|
|
2201
2814
|
this.fileUpload = new FileUploadService(this.request);
|
|
2815
|
+
this.gpgKeys = new GpgKeysService(this.request);
|
|
2202
2816
|
this.onboarding = new OnboardingService(this.request);
|
|
2203
2817
|
this.organizations = new OrganizationsService(this.request);
|
|
2818
|
+
this.permissions = new PermissionsService(this.request);
|
|
2204
2819
|
this.roles = new RolesService(this.request);
|
|
2205
2820
|
this.secrets = new SecretsService(this.request);
|
|
2206
2821
|
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2207
2822
|
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2823
|
+
this.teams = new TeamsService(this.request);
|
|
2208
2824
|
this.users = new UsersService(this.request);
|
|
2209
2825
|
this.webhooks = new WebhooksService(this.request);
|
|
2210
2826
|
}
|
|
@@ -2212,8 +2828,8 @@ var EnvSyncAPISDK = class {
|
|
|
2212
2828
|
|
|
2213
2829
|
// src/core/OpenAPI.ts
|
|
2214
2830
|
var OpenAPI = {
|
|
2215
|
-
BASE: "http://localhost:
|
|
2216
|
-
VERSION: "0.
|
|
2831
|
+
BASE: "http://localhost:4000",
|
|
2832
|
+
VERSION: "0.6.1",
|
|
2217
2833
|
WITH_CREDENTIALS: false,
|
|
2218
2834
|
CREDENTIALS: "include",
|
|
2219
2835
|
TOKEN: void 0,
|
|
@@ -2239,6 +2855,50 @@ var CreateWebhookRequest;
|
|
|
2239
2855
|
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2240
2856
|
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2241
2857
|
|
|
2858
|
+
// src/models/GenerateGpgKeyRequest.ts
|
|
2859
|
+
var GenerateGpgKeyRequest;
|
|
2860
|
+
((GenerateGpgKeyRequest2) => {
|
|
2861
|
+
let algorithm;
|
|
2862
|
+
((algorithm2) => {
|
|
2863
|
+
algorithm2["RSA"] = "rsa";
|
|
2864
|
+
algorithm2["ECC_CURVE25519"] = "ecc-curve25519";
|
|
2865
|
+
algorithm2["ECC_P256"] = "ecc-p256";
|
|
2866
|
+
algorithm2["ECC_P384"] = "ecc-p384";
|
|
2867
|
+
})(algorithm = GenerateGpgKeyRequest2.algorithm || (GenerateGpgKeyRequest2.algorithm = {}));
|
|
2868
|
+
})(GenerateGpgKeyRequest || (GenerateGpgKeyRequest = {}));
|
|
2869
|
+
|
|
2870
|
+
// src/models/GrantAccessRequest.ts
|
|
2871
|
+
var GrantAccessRequest;
|
|
2872
|
+
((GrantAccessRequest2) => {
|
|
2873
|
+
let subject_type;
|
|
2874
|
+
((subject_type2) => {
|
|
2875
|
+
subject_type2["USER"] = "user";
|
|
2876
|
+
subject_type2["TEAM"] = "team";
|
|
2877
|
+
})(subject_type = GrantAccessRequest2.subject_type || (GrantAccessRequest2.subject_type = {}));
|
|
2878
|
+
let relation;
|
|
2879
|
+
((relation2) => {
|
|
2880
|
+
relation2["ADMIN"] = "admin";
|
|
2881
|
+
relation2["EDITOR"] = "editor";
|
|
2882
|
+
relation2["VIEWER"] = "viewer";
|
|
2883
|
+
})(relation = GrantAccessRequest2.relation || (GrantAccessRequest2.relation = {}));
|
|
2884
|
+
})(GrantAccessRequest || (GrantAccessRequest = {}));
|
|
2885
|
+
|
|
2886
|
+
// src/models/RevokeAccessRequest.ts
|
|
2887
|
+
var RevokeAccessRequest;
|
|
2888
|
+
((RevokeAccessRequest2) => {
|
|
2889
|
+
let subject_type;
|
|
2890
|
+
((subject_type2) => {
|
|
2891
|
+
subject_type2["USER"] = "user";
|
|
2892
|
+
subject_type2["TEAM"] = "team";
|
|
2893
|
+
})(subject_type = RevokeAccessRequest2.subject_type || (RevokeAccessRequest2.subject_type = {}));
|
|
2894
|
+
let relation;
|
|
2895
|
+
((relation2) => {
|
|
2896
|
+
relation2["ADMIN"] = "admin";
|
|
2897
|
+
relation2["EDITOR"] = "editor";
|
|
2898
|
+
relation2["VIEWER"] = "viewer";
|
|
2899
|
+
})(relation = RevokeAccessRequest2.relation || (RevokeAccessRequest2.relation = {}));
|
|
2900
|
+
})(RevokeAccessRequest || (RevokeAccessRequest = {}));
|
|
2901
|
+
|
|
2242
2902
|
// src/models/SecretVariableRollbackResponse.ts
|
|
2243
2903
|
var SecretVariableRollbackResponse;
|
|
2244
2904
|
((SecretVariableRollbackResponse2) => {
|
|
@@ -2250,6 +2910,30 @@ var SecretVariableRollbackResponse;
|
|
|
2250
2910
|
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2251
2911
|
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2252
2912
|
|
|
2913
|
+
// src/models/SignDataRequest.ts
|
|
2914
|
+
var SignDataRequest;
|
|
2915
|
+
((SignDataRequest2) => {
|
|
2916
|
+
let mode;
|
|
2917
|
+
((mode2) => {
|
|
2918
|
+
mode2["BINARY"] = "binary";
|
|
2919
|
+
mode2["TEXT"] = "text";
|
|
2920
|
+
mode2["CLEARSIGN"] = "clearsign";
|
|
2921
|
+
})(mode = SignDataRequest2.mode || (SignDataRequest2.mode = {}));
|
|
2922
|
+
})(SignDataRequest || (SignDataRequest = {}));
|
|
2923
|
+
|
|
2924
|
+
// src/models/UpdateTrustLevelRequest.ts
|
|
2925
|
+
var UpdateTrustLevelRequest;
|
|
2926
|
+
((UpdateTrustLevelRequest2) => {
|
|
2927
|
+
let trust_level;
|
|
2928
|
+
((trust_level2) => {
|
|
2929
|
+
trust_level2["UNKNOWN"] = "unknown";
|
|
2930
|
+
trust_level2["NEVER"] = "never";
|
|
2931
|
+
trust_level2["MARGINAL"] = "marginal";
|
|
2932
|
+
trust_level2["FULL"] = "full";
|
|
2933
|
+
trust_level2["ULTIMATE"] = "ultimate";
|
|
2934
|
+
})(trust_level = UpdateTrustLevelRequest2.trust_level || (UpdateTrustLevelRequest2.trust_level = {}));
|
|
2935
|
+
})(UpdateTrustLevelRequest || (UpdateTrustLevelRequest = {}));
|
|
2936
|
+
|
|
2253
2937
|
// src/models/UpdateWebhookRequest.ts
|
|
2254
2938
|
var UpdateWebhookRequest;
|
|
2255
2939
|
((UpdateWebhookRequest2) => {
|
|
@@ -2302,6 +2986,7 @@ export {
|
|
|
2302
2986
|
BaseHttpRequest,
|
|
2303
2987
|
CancelError,
|
|
2304
2988
|
CancelablePromise,
|
|
2989
|
+
CertificatesService,
|
|
2305
2990
|
CreateWebhookRequest,
|
|
2306
2991
|
EnvSyncAPISDK,
|
|
2307
2992
|
EnvironmentTypesService,
|
|
@@ -2309,17 +2994,26 @@ export {
|
|
|
2309
2994
|
EnvironmentVariablesRollbackService,
|
|
2310
2995
|
EnvironmentVariablesService,
|
|
2311
2996
|
FileUploadService,
|
|
2997
|
+
GenerateGpgKeyRequest,
|
|
2998
|
+
GpgKeysService,
|
|
2999
|
+
GrantAccessRequest,
|
|
2312
3000
|
OnboardingService,
|
|
2313
3001
|
OpenAPI,
|
|
2314
3002
|
OrganizationsService,
|
|
3003
|
+
PermissionsService,
|
|
3004
|
+
RevokeAccessRequest,
|
|
2315
3005
|
RolesService,
|
|
2316
3006
|
SecretVariableRollbackResponse,
|
|
2317
3007
|
SecretsPointInTimeService,
|
|
2318
3008
|
SecretsRollbackService,
|
|
2319
3009
|
SecretsService,
|
|
3010
|
+
SignDataRequest,
|
|
3011
|
+
TeamsService,
|
|
3012
|
+
UpdateTrustLevelRequest,
|
|
2320
3013
|
UpdateWebhookRequest,
|
|
2321
3014
|
UsersService,
|
|
2322
3015
|
VariableRollbackResponse,
|
|
2323
3016
|
WebhookResponse,
|
|
2324
3017
|
WebhooksService
|
|
2325
3018
|
};
|
|
3019
|
+
//# sourceMappingURL=index.mjs.map
|