@@ -10,10 +10,12 @@ import {
1010import {
1111 marshalAddGroupMemberRequest ,
1212 marshalAddGroupMembersRequest ,
13+ marshalAddSamlCertificateRequest ,
1314 marshalCreateAPIKeyRequest ,
1415 marshalCreateApplicationRequest ,
1516 marshalCreateGroupRequest ,
1617 marshalCreateJWTRequest ,
18+ marshalCreateOrganizationSamlRequest ,
1719 marshalCreatePolicyRequest ,
1820 marshalCreateSSHKeyRequest ,
1921 marshalCreateUserRequest ,
@@ -26,6 +28,7 @@ import {
2628 marshalUpdateAPIKeyRequest ,
2729 marshalUpdateApplicationRequest ,
2830 marshalUpdateGroupRequest ,
31+ marshalUpdateOrganizationSamlRequest ,
2932 marshalUpdateOrganizationSecuritySettingsRequest ,
3033 marshalUpdatePolicyRequest ,
3134 marshalUpdateSSHKeyRequest ,
@@ -51,6 +54,7 @@ import {
5154 unmarshalListQuotaResponse ,
5255 unmarshalListRulesResponse ,
5356 unmarshalListSSHKeysResponse ,
57+ unmarshalListSamlCertificatesResponse ,
5458 unmarshalListUsersResponse ,
5559 unmarshalLog ,
5660 unmarshalMFAOTP ,
@@ -59,6 +63,8 @@ import {
5963 unmarshalPolicy ,
6064 unmarshalQuotum ,
6165 unmarshalSSHKey ,
66+ unmarshalSaml ,
67+ unmarshalSamlCertificate ,
6268 unmarshalSetRulesResponse ,
6369 unmarshalUser ,
6470 unmarshalValidateUserMFAOTPResponse ,
@@ -67,12 +73,14 @@ import type {
6773 APIKey ,
6874 AddGroupMemberRequest ,
6975 AddGroupMembersRequest ,
76+ AddSamlCertificateRequest ,
7077 Application ,
7178 ClonePolicyRequest ,
7279 CreateAPIKeyRequest ,
7380 CreateApplicationRequest ,
7481 CreateGroupRequest ,
7582 CreateJWTRequest ,
83+ CreateOrganizationSamlRequest ,
7684 CreatePolicyRequest ,
7785 CreateSSHKeyRequest ,
7886 CreateUserMFAOTPRequest ,
@@ -81,8 +89,10 @@ import type {
8189 DeleteApplicationRequest ,
8290 DeleteGroupRequest ,
8391 DeleteJWTRequest ,
92+ DeleteOrganizationSamlRequest ,
8493 DeletePolicyRequest ,
8594 DeleteSSHKeyRequest ,
95+ DeleteSamlCertificateRequest ,
8696 DeleteUserMFAOTPRequest ,
8797 DeleteUserRequest ,
8898 EncodedJWT ,
@@ -92,6 +102,7 @@ import type {
92102 GetJWTRequest ,
93103 GetLogRequest ,
94104 GetOrganizationRequest ,
105+ GetOrganizationSamlRequest ,
95106 GetOrganizationSecuritySettingsRequest ,
96107 GetPolicyRequest ,
97108 GetQuotumRequest ,
@@ -126,6 +137,8 @@ import type {
126137 ListRulesResponse ,
127138 ListSSHKeysRequest ,
128139 ListSSHKeysResponse ,
140+ ListSamlCertificatesRequest ,
141+ ListSamlCertificatesResponse ,
129142 ListUsersRequest ,
130143 ListUsersResponse ,
131144 LockUserRequest ,
@@ -139,6 +152,8 @@ import type {
139152 RemoveGroupMemberRequest ,
140153 RemoveUserConnectionRequest ,
141154 SSHKey ,
155+ Saml ,
156+ SamlCertificate ,
142157 SetGroupMembersRequest ,
143158 SetOrganizationAliasRequest ,
144159 SetRulesRequest ,
@@ -147,6 +162,7 @@ import type {
147162 UpdateAPIKeyRequest ,
148163 UpdateApplicationRequest ,
149164 UpdateGroupRequest ,
165+ UpdateOrganizationSamlRequest ,
150166 UpdateOrganizationSecuritySettingsRequest ,
151167 UpdatePolicyRequest ,
152168 UpdateSSHKeyRequest ,
@@ -1389,4 +1405,117 @@ export class API extends ParentAPI {
13891405 method : 'POST' ,
13901406 path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /migrate-guests` ,
13911407 } )
1408+
1409+ /**
1410+ * Get SAML Identity Provider configuration of an Organization.
1411+ *
1412+ * @param request - The request {@link GetOrganizationSamlRequest}
1413+ * @returns A Promise of Saml
1414+ */
1415+ getOrganizationSaml = ( request : Readonly < GetOrganizationSamlRequest > = { } ) =>
1416+ this . client . fetch < Saml > (
1417+ {
1418+ method : 'GET' ,
1419+ path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /saml` ,
1420+ } ,
1421+ unmarshalSaml ,
1422+ )
1423+
1424+ /**
1425+ * Create a SAML Identity Provider configuration for an Organization.
1426+ *
1427+ * @param request - The request {@link CreateOrganizationSamlRequest}
1428+ * @returns A Promise of Saml
1429+ */
1430+ createOrganizationSaml = ( request : Readonly < CreateOrganizationSamlRequest > ) =>
1431+ this . client . fetch < Saml > (
1432+ {
1433+ body : JSON . stringify (
1434+ marshalCreateOrganizationSamlRequest ( request , this . client . settings ) ,
1435+ ) ,
1436+ headers : jsonContentHeaders ,
1437+ method : 'POST' ,
1438+ path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /saml` ,
1439+ } ,
1440+ unmarshalSaml ,
1441+ )
1442+
1443+ /**
1444+ * Update a SAML Identity Provider configuration for an Organization.
1445+ *
1446+ * @param request - The request {@link UpdateOrganizationSamlRequest}
1447+ * @returns A Promise of Saml
1448+ */
1449+ updateOrganizationSaml = (
1450+ request : Readonly < UpdateOrganizationSamlRequest > = { } ,
1451+ ) =>
1452+ this . client . fetch < Saml > (
1453+ {
1454+ body : JSON . stringify (
1455+ marshalUpdateOrganizationSamlRequest ( request , this . client . settings ) ,
1456+ ) ,
1457+ headers : jsonContentHeaders ,
1458+ method : 'PATCH' ,
1459+ path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /saml` ,
1460+ } ,
1461+ unmarshalSaml ,
1462+ )
1463+
1464+ /**
1465+ * Delete a SAML Identity Provider configuration for an Organization.
1466+ *
1467+ * @param request - The request {@link DeleteOrganizationSamlRequest}
1468+ */
1469+ deleteOrganizationSaml = (
1470+ request : Readonly < DeleteOrganizationSamlRequest > = { } ,
1471+ ) =>
1472+ this . client . fetch < void > ( {
1473+ method : 'DELETE' ,
1474+ path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /saml` ,
1475+ } )
1476+
1477+ /**
1478+ * List SAML certificates.
1479+ *
1480+ * @param request - The request {@link ListSamlCertificatesRequest}
1481+ * @returns A Promise of ListSamlCertificatesResponse
1482+ */
1483+ listSamlCertificates = ( request : Readonly < ListSamlCertificatesRequest > ) =>
1484+ this . client . fetch < ListSamlCertificatesResponse > (
1485+ {
1486+ method : 'GET' ,
1487+ path : `/iam/v1alpha1/saml/${ validatePathParam ( 'samlId' , request . samlId ) } /certificates` ,
1488+ } ,
1489+ unmarshalListSamlCertificatesResponse ,
1490+ )
1491+
1492+ /**
1493+ * Add a SAML certificate.
1494+ *
1495+ * @param request - The request {@link AddSamlCertificateRequest}
1496+ * @returns A Promise of SamlCertificate
1497+ */
1498+ addSamlCertificate = ( request : Readonly < AddSamlCertificateRequest > ) =>
1499+ this . client . fetch < SamlCertificate > (
1500+ {
1501+ body : JSON . stringify (
1502+ marshalAddSamlCertificateRequest ( request , this . client . settings ) ,
1503+ ) ,
1504+ headers : jsonContentHeaders ,
1505+ method : 'POST' ,
1506+ path : `/iam/v1alpha1/saml/${ validatePathParam ( 'samlId' , request . samlId ) } /certificates` ,
1507+ } ,
1508+ unmarshalSamlCertificate ,
1509+ )
1510+
1511+ /**
1512+ * Delete a SAML certificate.
1513+ *
1514+ * @param request - The request {@link DeleteSamlCertificateRequest}
1515+ */
1516+ deleteSamlCertificate = ( request : Readonly < DeleteSamlCertificateRequest > ) =>
1517+ this . client . fetch < void > ( {
1518+ method : 'DELETE' ,
1519+ path : `/iam/v1alpha1/saml-certificates/${ validatePathParam ( 'certificateId' , request . certificateId ) } ` ,
1520+ } )
13921521}
0 commit comments