@scaleway/sdk-iam 1.4.0 → 1.5.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/dist/index.gen.d.ts +1 -1
- package/dist/v1alpha1/api.gen.cjs +34 -6
- package/dist/v1alpha1/api.gen.d.ts +16 -8
- package/dist/v1alpha1/api.gen.js +35 -7
- package/dist/v1alpha1/index.gen.cjs +3 -0
- package/dist/v1alpha1/index.gen.d.ts +4 -4
- package/dist/v1alpha1/index.gen.js +4 -1
- package/dist/v1alpha1/marshalling.gen.cjs +34 -2
- package/dist/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/v1alpha1/marshalling.gen.js +35 -3
- package/dist/v1alpha1/types.gen.d.ts +63 -7
- package/package.json +4 -4
package/dist/index.gen.d.ts
CHANGED
|
@@ -1052,14 +1052,25 @@ class API extends sdkClient.API {
|
|
|
1052
1052
|
marshalling_gen.unmarshalOrganization
|
|
1053
1053
|
);
|
|
1054
1054
|
/**
|
|
1055
|
-
*
|
|
1055
|
+
* Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
|
|
1056
1056
|
*
|
|
1057
|
-
* @param request - The request {@link
|
|
1057
|
+
* @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
|
|
1058
|
+
* @returns A Promise of Organization
|
|
1058
1059
|
*/
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1060
|
+
updateOrganizationLoginMethods = (request = {}) => this.client.fetch(
|
|
1061
|
+
{
|
|
1062
|
+
body: JSON.stringify(
|
|
1063
|
+
marshalling_gen.marshalUpdateOrganizationLoginMethodsRequest(
|
|
1064
|
+
request,
|
|
1065
|
+
this.client.settings
|
|
1066
|
+
)
|
|
1067
|
+
),
|
|
1068
|
+
headers: jsonContentHeaders,
|
|
1069
|
+
method: "PATCH",
|
|
1070
|
+
path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`
|
|
1071
|
+
},
|
|
1072
|
+
marshalling_gen.unmarshalOrganization
|
|
1073
|
+
);
|
|
1063
1074
|
/**
|
|
1064
1075
|
* Get SAML Identity Provider configuration of an Organization.
|
|
1065
1076
|
*
|
|
@@ -1114,6 +1125,23 @@ class API extends sdkClient.API {
|
|
|
1114
1125
|
method: "DELETE",
|
|
1115
1126
|
path: `/iam/v1alpha1/saml/${sdkClient.validatePathParam("samlId", request.samlId)}`
|
|
1116
1127
|
});
|
|
1128
|
+
/**
|
|
1129
|
+
* Parse SAML xml metadata file.
|
|
1130
|
+
*
|
|
1131
|
+
* @param request - The request {@link ParseSamlMetadataRequest}
|
|
1132
|
+
* @returns A Promise of ParseSamlMetadataResponse
|
|
1133
|
+
*/
|
|
1134
|
+
parseSamlMetadata = async (request) => this.client.fetch(
|
|
1135
|
+
{
|
|
1136
|
+
body: JSON.stringify(
|
|
1137
|
+
await marshalling_gen.marshalParseSamlMetadataRequest(request, this.client.settings)
|
|
1138
|
+
),
|
|
1139
|
+
headers: jsonContentHeaders,
|
|
1140
|
+
method: "POST",
|
|
1141
|
+
path: `/iam/v1alpha1/parse-saml-metadata`
|
|
1142
|
+
},
|
|
1143
|
+
marshalling_gen.unmarshalParseSamlMetadataResponse
|
|
1144
|
+
);
|
|
1117
1145
|
/**
|
|
1118
1146
|
* List SAML certificates.
|
|
1119
1147
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
|
-
import type { AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest,
|
|
2
|
+
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest, Application, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteSamlCertificateRequest, DeleteSamlRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EnableOrganizationSamlRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationRequest, GetOrganizationSamlRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserConnectionsRequest, GetUserConnectionsResponse, GetUserRequest, Group, InitiateUserConnectionRequest, InitiateUserConnectionResponse, JWT, JoinUserConnectionRequest, ListAPIKeysRequest, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsResponse, ListGracePeriodsRequest, ListGracePeriodsResponse, ListGroupsRequest, ListGroupsResponse, ListJWTsRequest, ListJWTsResponse, ListLogsRequest, ListLogsResponse, ListPermissionSetsRequest, ListPermissionSetsResponse, ListPoliciesRequest, ListPoliciesResponse, ListQuotaRequest, ListQuotaResponse, ListRulesRequest, ListRulesResponse, ListSSHKeysRequest, ListSSHKeysResponse, ListSamlCertificatesRequest, ListSamlCertificatesResponse, ListUsersRequest, ListUsersResponse, LockUserRequest, Log, MFAOTP, Organization, OrganizationSecuritySettings, ParseSamlMetadataRequest, ParseSamlMetadataResponse, Policy, Quotum, RemoveGroupMemberRequest, RemoveUserConnectionRequest, SSHKey, Saml, SamlCertificate, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateSamlRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen.js';
|
|
3
3
|
/**
|
|
4
4
|
* IAM API.
|
|
5
5
|
|
|
@@ -305,8 +305,8 @@ export declare class API extends ParentAPI {
|
|
|
305
305
|
* @returns A Promise of ListRulesResponse
|
|
306
306
|
*/
|
|
307
307
|
listRules: (request: Readonly<ListRulesRequest>) => Promise<ListRulesResponse> & {
|
|
308
|
-
all: () => Promise<import("./types.gen").Rule[]>;
|
|
309
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Rule[], void, void>;
|
|
308
|
+
all: () => Promise<import("./types.gen.js").Rule[]>;
|
|
309
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").Rule[], void, void>;
|
|
310
310
|
};
|
|
311
311
|
protected pageOfListPermissionSets: (request?: Readonly<ListPermissionSetsRequest>) => Promise<ListPermissionSetsResponse>;
|
|
312
312
|
/**
|
|
@@ -316,8 +316,8 @@ export declare class API extends ParentAPI {
|
|
|
316
316
|
* @returns A Promise of ListPermissionSetsResponse
|
|
317
317
|
*/
|
|
318
318
|
listPermissionSets: (request?: Readonly<ListPermissionSetsRequest>) => Promise<ListPermissionSetsResponse> & {
|
|
319
|
-
all: () => Promise<import("./types.gen").PermissionSet[]>;
|
|
320
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").PermissionSet[], void, void>;
|
|
319
|
+
all: () => Promise<import("./types.gen.js").PermissionSet[]>;
|
|
320
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").PermissionSet[], void, void>;
|
|
321
321
|
};
|
|
322
322
|
protected pageOfListAPIKeys: (request?: Readonly<ListAPIKeysRequest>) => Promise<ListAPIKeysResponse>;
|
|
323
323
|
/**
|
|
@@ -453,11 +453,12 @@ export declare class API extends ParentAPI {
|
|
|
453
453
|
*/
|
|
454
454
|
getOrganization: (request?: Readonly<GetOrganizationRequest>) => Promise<Organization>;
|
|
455
455
|
/**
|
|
456
|
-
*
|
|
456
|
+
* Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
|
|
457
457
|
*
|
|
458
|
-
* @param request - The request {@link
|
|
458
|
+
* @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
|
|
459
|
+
* @returns A Promise of Organization
|
|
459
460
|
*/
|
|
460
|
-
|
|
461
|
+
updateOrganizationLoginMethods: (request?: Readonly<UpdateOrganizationLoginMethodsRequest>) => Promise<Organization>;
|
|
461
462
|
/**
|
|
462
463
|
* Get SAML Identity Provider configuration of an Organization.
|
|
463
464
|
*
|
|
@@ -485,6 +486,13 @@ export declare class API extends ParentAPI {
|
|
|
485
486
|
* @param request - The request {@link DeleteSamlRequest}
|
|
486
487
|
*/
|
|
487
488
|
deleteSaml: (request: Readonly<DeleteSamlRequest>) => Promise<void>;
|
|
489
|
+
/**
|
|
490
|
+
* Parse SAML xml metadata file.
|
|
491
|
+
*
|
|
492
|
+
* @param request - The request {@link ParseSamlMetadataRequest}
|
|
493
|
+
* @returns A Promise of ParseSamlMetadataResponse
|
|
494
|
+
*/
|
|
495
|
+
parseSamlMetadata: (request: Readonly<ParseSamlMetadataRequest>) => Promise<ParseSamlMetadataResponse>;
|
|
488
496
|
/**
|
|
489
497
|
* List SAML certificates.
|
|
490
498
|
*
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API as API$1, urlParams, enrichForPagination, validatePathParam, resolveOneOf } from "@scaleway/sdk-client";
|
|
2
|
-
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalUpdateUserRequest, marshalCreateUserRequest, marshalUpdateUserUsernameRequest, marshalUpdateUserPasswordRequest, unmarshalMFAOTP, marshalValidateUserMFAOTPRequest, unmarshalValidateUserMFAOTPResponse, unmarshalListGracePeriodsResponse, unmarshalGetUserConnectionsResponse, unmarshalInitiateUserConnectionResponse, marshalJoinUserConnectionRequest, marshalRemoveUserConnectionRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, marshalCreateJWTRequest, unmarshalEncodedJWT, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog, unmarshalOrganizationSecuritySettings, marshalUpdateOrganizationSecuritySettingsRequest, marshalSetOrganizationAliasRequest, unmarshalOrganization, unmarshalSaml, marshalUpdateSamlRequest, unmarshalListSamlCertificatesResponse, marshalAddSamlCertificateRequest, unmarshalSamlCertificate } from "./marshalling.gen.js";
|
|
2
|
+
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalUpdateUserRequest, marshalCreateUserRequest, marshalUpdateUserUsernameRequest, marshalUpdateUserPasswordRequest, unmarshalMFAOTP, marshalValidateUserMFAOTPRequest, unmarshalValidateUserMFAOTPResponse, unmarshalListGracePeriodsResponse, unmarshalGetUserConnectionsResponse, unmarshalInitiateUserConnectionResponse, marshalJoinUserConnectionRequest, marshalRemoveUserConnectionRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, marshalCreateJWTRequest, unmarshalEncodedJWT, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog, unmarshalOrganizationSecuritySettings, marshalUpdateOrganizationSecuritySettingsRequest, marshalSetOrganizationAliasRequest, unmarshalOrganization, marshalUpdateOrganizationLoginMethodsRequest, unmarshalSaml, marshalUpdateSamlRequest, marshalParseSamlMetadataRequest, unmarshalParseSamlMetadataResponse, unmarshalListSamlCertificatesResponse, marshalAddSamlCertificateRequest, unmarshalSamlCertificate } from "./marshalling.gen.js";
|
|
3
3
|
const jsonContentHeaders = {
|
|
4
4
|
"Content-Type": "application/json; charset=utf-8"
|
|
5
5
|
};
|
|
@@ -1050,14 +1050,25 @@ class API extends API$1 {
|
|
|
1050
1050
|
unmarshalOrganization
|
|
1051
1051
|
);
|
|
1052
1052
|
/**
|
|
1053
|
-
*
|
|
1053
|
+
* Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
|
|
1054
1054
|
*
|
|
1055
|
-
* @param request - The request {@link
|
|
1055
|
+
* @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
|
|
1056
|
+
* @returns A Promise of Organization
|
|
1056
1057
|
*/
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1058
|
+
updateOrganizationLoginMethods = (request = {}) => this.client.fetch(
|
|
1059
|
+
{
|
|
1060
|
+
body: JSON.stringify(
|
|
1061
|
+
marshalUpdateOrganizationLoginMethodsRequest(
|
|
1062
|
+
request,
|
|
1063
|
+
this.client.settings
|
|
1064
|
+
)
|
|
1065
|
+
),
|
|
1066
|
+
headers: jsonContentHeaders,
|
|
1067
|
+
method: "PATCH",
|
|
1068
|
+
path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`
|
|
1069
|
+
},
|
|
1070
|
+
unmarshalOrganization
|
|
1071
|
+
);
|
|
1061
1072
|
/**
|
|
1062
1073
|
* Get SAML Identity Provider configuration of an Organization.
|
|
1063
1074
|
*
|
|
@@ -1112,6 +1123,23 @@ class API extends API$1 {
|
|
|
1112
1123
|
method: "DELETE",
|
|
1113
1124
|
path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
|
|
1114
1125
|
});
|
|
1126
|
+
/**
|
|
1127
|
+
* Parse SAML xml metadata file.
|
|
1128
|
+
*
|
|
1129
|
+
* @param request - The request {@link ParseSamlMetadataRequest}
|
|
1130
|
+
* @returns A Promise of ParseSamlMetadataResponse
|
|
1131
|
+
*/
|
|
1132
|
+
parseSamlMetadata = async (request) => this.client.fetch(
|
|
1133
|
+
{
|
|
1134
|
+
body: JSON.stringify(
|
|
1135
|
+
await marshalParseSamlMetadataRequest(request, this.client.settings)
|
|
1136
|
+
),
|
|
1137
|
+
headers: jsonContentHeaders,
|
|
1138
|
+
method: "POST",
|
|
1139
|
+
path: `/iam/v1alpha1/parse-saml-metadata`
|
|
1140
|
+
},
|
|
1141
|
+
unmarshalParseSamlMetadataResponse
|
|
1142
|
+
);
|
|
1115
1143
|
/**
|
|
1116
1144
|
* List SAML certificates.
|
|
1117
1145
|
*
|
|
@@ -15,6 +15,7 @@ exports.marshalCreatePolicyRequest = marshalling_gen.marshalCreatePolicyRequest;
|
|
|
15
15
|
exports.marshalCreateSSHKeyRequest = marshalling_gen.marshalCreateSSHKeyRequest;
|
|
16
16
|
exports.marshalCreateUserRequest = marshalling_gen.marshalCreateUserRequest;
|
|
17
17
|
exports.marshalJoinUserConnectionRequest = marshalling_gen.marshalJoinUserConnectionRequest;
|
|
18
|
+
exports.marshalParseSamlMetadataRequest = marshalling_gen.marshalParseSamlMetadataRequest;
|
|
18
19
|
exports.marshalRemoveGroupMemberRequest = marshalling_gen.marshalRemoveGroupMemberRequest;
|
|
19
20
|
exports.marshalRemoveUserConnectionRequest = marshalling_gen.marshalRemoveUserConnectionRequest;
|
|
20
21
|
exports.marshalSetGroupMembersRequest = marshalling_gen.marshalSetGroupMembersRequest;
|
|
@@ -23,6 +24,7 @@ exports.marshalSetRulesRequest = marshalling_gen.marshalSetRulesRequest;
|
|
|
23
24
|
exports.marshalUpdateAPIKeyRequest = marshalling_gen.marshalUpdateAPIKeyRequest;
|
|
24
25
|
exports.marshalUpdateApplicationRequest = marshalling_gen.marshalUpdateApplicationRequest;
|
|
25
26
|
exports.marshalUpdateGroupRequest = marshalling_gen.marshalUpdateGroupRequest;
|
|
27
|
+
exports.marshalUpdateOrganizationLoginMethodsRequest = marshalling_gen.marshalUpdateOrganizationLoginMethodsRequest;
|
|
26
28
|
exports.marshalUpdateOrganizationSecuritySettingsRequest = marshalling_gen.marshalUpdateOrganizationSecuritySettingsRequest;
|
|
27
29
|
exports.marshalUpdatePolicyRequest = marshalling_gen.marshalUpdatePolicyRequest;
|
|
28
30
|
exports.marshalUpdateSSHKeyRequest = marshalling_gen.marshalUpdateSSHKeyRequest;
|
|
@@ -55,6 +57,7 @@ exports.unmarshalLog = marshalling_gen.unmarshalLog;
|
|
|
55
57
|
exports.unmarshalMFAOTP = marshalling_gen.unmarshalMFAOTP;
|
|
56
58
|
exports.unmarshalOrganization = marshalling_gen.unmarshalOrganization;
|
|
57
59
|
exports.unmarshalOrganizationSecuritySettings = marshalling_gen.unmarshalOrganizationSecuritySettings;
|
|
60
|
+
exports.unmarshalParseSamlMetadataResponse = marshalling_gen.unmarshalParseSamlMetadataResponse;
|
|
58
61
|
exports.unmarshalPolicy = marshalling_gen.unmarshalPolicy;
|
|
59
62
|
exports.unmarshalQuotum = marshalling_gen.unmarshalQuotum;
|
|
60
63
|
exports.unmarshalSSHKey = marshalling_gen.unmarshalSSHKey;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
2
|
-
export * from './marshalling.gen';
|
|
3
|
-
export type { AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest,
|
|
4
|
-
export * as ValidationRules from './validation-rules.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export * from './marshalling.gen.js';
|
|
3
|
+
export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest, Application, BearerType, ClonePolicyRequest, Connection, ConnectionConnectedOrganization, ConnectionConnectedUser, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteSamlCertificateRequest, DeleteSamlRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EnableOrganizationSamlRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationRequest, GetOrganizationSamlRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserConnectionsRequest, GetUserConnectionsResponse, GetUserRequest, GracePeriod, GracePeriodType, Group, InitiateUserConnectionRequest, InitiateUserConnectionResponse, JWT, JoinUserConnectionRequest, ListAPIKeysRequest, ListAPIKeysRequestOrderBy, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, ListGracePeriodsRequest, ListGracePeriodsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListJWTsRequest, ListJWTsRequestOrderBy, ListJWTsResponse, ListLogsRequest, ListLogsRequestOrderBy, ListLogsResponse, ListPermissionSetsRequest, ListPermissionSetsRequestOrderBy, ListPermissionSetsResponse, ListPoliciesRequest, ListPoliciesRequestOrderBy, ListPoliciesResponse, ListQuotaRequest, ListQuotaRequestOrderBy, ListQuotaResponse, ListRulesRequest, ListRulesResponse, ListSSHKeysRequest, ListSSHKeysRequestOrderBy, ListSSHKeysResponse, ListSamlCertificatesRequest, ListSamlCertificatesResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LocalityType, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, Organization, OrganizationSecuritySettings, ParseSamlMetadataRequest, ParseSamlMetadataResponse, PermissionSet, PermissionSetScopeType, Policy, Quotum, QuotumLimit, RemoveGroupMemberRequest, RemoveUserConnectionRequest, Rule, RuleSpecs, SSHKey, Saml, SamlCertificate, SamlCertificateOrigin, SamlCertificateType, SamlServiceProvider, SamlStatus, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateSamlRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, } from './types.gen.js';
|
|
4
|
+
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API } from "./api.gen.js";
|
|
2
|
-
import { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalAddSamlCertificateRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreateJWTRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalJoinUserConnectionRequest, marshalRemoveGroupMemberRequest, marshalRemoveUserConnectionRequest, marshalSetGroupMembersRequest, marshalSetOrganizationAliasRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdateOrganizationSecuritySettingsRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, marshalUpdateSamlRequest, marshalUpdateUserPasswordRequest, marshalUpdateUserRequest, marshalUpdateUserUsernameRequest, marshalValidateUserMFAOTPRequest, unmarshalAPIKey, unmarshalApplication, unmarshalEncodedJWT, unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalInitiateUserConnectionResponse, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGracePeriodsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListSamlCertificatesResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, unmarshalOrganization, unmarshalOrganizationSecuritySettings, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSaml, unmarshalSamlCertificate, unmarshalSetRulesResponse, unmarshalUser, unmarshalValidateUserMFAOTPResponse } from "./marshalling.gen.js";
|
|
2
|
+
import { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalAddSamlCertificateRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreateJWTRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalJoinUserConnectionRequest, marshalParseSamlMetadataRequest, marshalRemoveGroupMemberRequest, marshalRemoveUserConnectionRequest, marshalSetGroupMembersRequest, marshalSetOrganizationAliasRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdateOrganizationLoginMethodsRequest, marshalUpdateOrganizationSecuritySettingsRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, marshalUpdateSamlRequest, marshalUpdateUserPasswordRequest, marshalUpdateUserRequest, marshalUpdateUserUsernameRequest, marshalValidateUserMFAOTPRequest, unmarshalAPIKey, unmarshalApplication, unmarshalEncodedJWT, unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalInitiateUserConnectionResponse, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGracePeriodsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListSamlCertificatesResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, unmarshalOrganization, unmarshalOrganizationSecuritySettings, unmarshalParseSamlMetadataResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSaml, unmarshalSamlCertificate, unmarshalSetRulesResponse, unmarshalUser, unmarshalValidateUserMFAOTPResponse } from "./marshalling.gen.js";
|
|
3
3
|
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
4
4
|
export {
|
|
5
5
|
API,
|
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
marshalCreateSSHKeyRequest,
|
|
16
16
|
marshalCreateUserRequest,
|
|
17
17
|
marshalJoinUserConnectionRequest,
|
|
18
|
+
marshalParseSamlMetadataRequest,
|
|
18
19
|
marshalRemoveGroupMemberRequest,
|
|
19
20
|
marshalRemoveUserConnectionRequest,
|
|
20
21
|
marshalSetGroupMembersRequest,
|
|
@@ -23,6 +24,7 @@ export {
|
|
|
23
24
|
marshalUpdateAPIKeyRequest,
|
|
24
25
|
marshalUpdateApplicationRequest,
|
|
25
26
|
marshalUpdateGroupRequest,
|
|
27
|
+
marshalUpdateOrganizationLoginMethodsRequest,
|
|
26
28
|
marshalUpdateOrganizationSecuritySettingsRequest,
|
|
27
29
|
marshalUpdatePolicyRequest,
|
|
28
30
|
marshalUpdateSSHKeyRequest,
|
|
@@ -55,6 +57,7 @@ export {
|
|
|
55
57
|
unmarshalMFAOTP,
|
|
56
58
|
unmarshalOrganization,
|
|
57
59
|
unmarshalOrganizationSecuritySettings,
|
|
60
|
+
unmarshalParseSamlMetadataResponse,
|
|
58
61
|
unmarshalPolicy,
|
|
59
62
|
unmarshalQuotum,
|
|
60
63
|
unmarshalSSHKey,
|
|
@@ -498,6 +498,10 @@ const unmarshalOrganization = (data) => {
|
|
|
498
498
|
return {
|
|
499
499
|
alias: data.alias,
|
|
500
500
|
id: data.id,
|
|
501
|
+
loginMagicCodeEnabled: data.login_magic_code_enabled,
|
|
502
|
+
loginOauth2Enabled: data.login_oauth2_enabled,
|
|
503
|
+
loginPasswordEnabled: data.login_password_enabled,
|
|
504
|
+
loginSamlEnabled: data.login_saml_enabled,
|
|
501
505
|
name: data.name
|
|
502
506
|
};
|
|
503
507
|
};
|
|
@@ -510,7 +514,21 @@ const unmarshalOrganizationSecuritySettings = (data) => {
|
|
|
510
514
|
return {
|
|
511
515
|
enforcePasswordRenewal: data.enforce_password_renewal,
|
|
512
516
|
gracePeriodDuration: data.grace_period_duration,
|
|
513
|
-
loginAttemptsBeforeLocked: data.login_attempts_before_locked
|
|
517
|
+
loginAttemptsBeforeLocked: data.login_attempts_before_locked,
|
|
518
|
+
maxApiKeyExpirationDuration: data.max_api_key_expiration_duration,
|
|
519
|
+
maxLoginSessionDuration: data.max_login_session_duration
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
const unmarshalParseSamlMetadataResponse = (data) => {
|
|
523
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
524
|
+
throw new TypeError(
|
|
525
|
+
`Unmarshalling the type 'ParseSamlMetadataResponse' failed as data isn't a dictionary.`
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
entityId: data.entity_id,
|
|
530
|
+
signingCertificates: data.signing_certificates,
|
|
531
|
+
singleSignOnUrl: data.single_sign_on_url
|
|
514
532
|
};
|
|
515
533
|
};
|
|
516
534
|
const unmarshalSamlServiceProvider = (data) => {
|
|
@@ -648,6 +666,9 @@ const marshalCreateUserRequest = (request, defaults) => ({
|
|
|
648
666
|
const marshalJoinUserConnectionRequest = (request, defaults) => ({
|
|
649
667
|
token: request.token
|
|
650
668
|
});
|
|
669
|
+
const marshalParseSamlMetadataRequest = async (request, defaults) => ({
|
|
670
|
+
file: await sdkClient.marshalBlobToScwFile(request.file)
|
|
671
|
+
});
|
|
651
672
|
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
652
673
|
...sdkClient.resolveOneOf([
|
|
653
674
|
{ param: "user_id", value: request.userId },
|
|
@@ -682,10 +703,18 @@ const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
|
682
703
|
name: request.name,
|
|
683
704
|
tags: request.tags
|
|
684
705
|
});
|
|
706
|
+
const marshalUpdateOrganizationLoginMethodsRequest = (request, defaults) => ({
|
|
707
|
+
login_magic_code_enabled: request.loginMagicCodeEnabled,
|
|
708
|
+
login_oauth2_enabled: request.loginOauth2Enabled,
|
|
709
|
+
login_password_enabled: request.loginPasswordEnabled,
|
|
710
|
+
login_saml_enabled: request.loginSamlEnabled
|
|
711
|
+
});
|
|
685
712
|
const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
|
|
686
713
|
enforce_password_renewal: request.enforcePasswordRenewal,
|
|
687
714
|
grace_period_duration: request.gracePeriodDuration,
|
|
688
|
-
login_attempts_before_locked: request.loginAttemptsBeforeLocked
|
|
715
|
+
login_attempts_before_locked: request.loginAttemptsBeforeLocked,
|
|
716
|
+
max_api_key_expiration_duration: request.maxApiKeyExpirationDuration,
|
|
717
|
+
max_login_session_duration: request.maxLoginSessionDuration
|
|
689
718
|
});
|
|
690
719
|
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
691
720
|
description: request.description,
|
|
@@ -734,6 +763,7 @@ exports.marshalCreatePolicyRequest = marshalCreatePolicyRequest;
|
|
|
734
763
|
exports.marshalCreateSSHKeyRequest = marshalCreateSSHKeyRequest;
|
|
735
764
|
exports.marshalCreateUserRequest = marshalCreateUserRequest;
|
|
736
765
|
exports.marshalJoinUserConnectionRequest = marshalJoinUserConnectionRequest;
|
|
766
|
+
exports.marshalParseSamlMetadataRequest = marshalParseSamlMetadataRequest;
|
|
737
767
|
exports.marshalRemoveGroupMemberRequest = marshalRemoveGroupMemberRequest;
|
|
738
768
|
exports.marshalRemoveUserConnectionRequest = marshalRemoveUserConnectionRequest;
|
|
739
769
|
exports.marshalSetGroupMembersRequest = marshalSetGroupMembersRequest;
|
|
@@ -742,6 +772,7 @@ exports.marshalSetRulesRequest = marshalSetRulesRequest;
|
|
|
742
772
|
exports.marshalUpdateAPIKeyRequest = marshalUpdateAPIKeyRequest;
|
|
743
773
|
exports.marshalUpdateApplicationRequest = marshalUpdateApplicationRequest;
|
|
744
774
|
exports.marshalUpdateGroupRequest = marshalUpdateGroupRequest;
|
|
775
|
+
exports.marshalUpdateOrganizationLoginMethodsRequest = marshalUpdateOrganizationLoginMethodsRequest;
|
|
745
776
|
exports.marshalUpdateOrganizationSecuritySettingsRequest = marshalUpdateOrganizationSecuritySettingsRequest;
|
|
746
777
|
exports.marshalUpdatePolicyRequest = marshalUpdatePolicyRequest;
|
|
747
778
|
exports.marshalUpdateSSHKeyRequest = marshalUpdateSSHKeyRequest;
|
|
@@ -774,6 +805,7 @@ exports.unmarshalLog = unmarshalLog;
|
|
|
774
805
|
exports.unmarshalMFAOTP = unmarshalMFAOTP;
|
|
775
806
|
exports.unmarshalOrganization = unmarshalOrganization;
|
|
776
807
|
exports.unmarshalOrganizationSecuritySettings = unmarshalOrganizationSecuritySettings;
|
|
808
|
+
exports.unmarshalParseSamlMetadataResponse = unmarshalParseSamlMetadataResponse;
|
|
777
809
|
exports.unmarshalPolicy = unmarshalPolicy;
|
|
778
810
|
exports.unmarshalQuotum = unmarshalQuotum;
|
|
779
811
|
exports.unmarshalSSHKey = unmarshalSSHKey;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest,
|
|
2
|
+
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest, Application, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, EncodedJWT, GetUserConnectionsResponse, Group, InitiateUserConnectionResponse, JWT, JoinUserConnectionRequest, ListAPIKeysResponse, ListApplicationsResponse, ListGracePeriodsResponse, ListGroupsResponse, ListJWTsResponse, ListLogsResponse, ListPermissionSetsResponse, ListPoliciesResponse, ListQuotaResponse, ListRulesResponse, ListSSHKeysResponse, ListSamlCertificatesResponse, ListUsersResponse, Log, MFAOTP, Organization, OrganizationSecuritySettings, ParseSamlMetadataRequest, ParseSamlMetadataResponse, Policy, Quotum, RemoveGroupMemberRequest, RemoveUserConnectionRequest, SSHKey, Saml, SamlCertificate, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateSamlRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalJWT: (data: unknown) => JWT;
|
|
4
4
|
export declare const unmarshalAPIKey: (data: unknown) => APIKey;
|
|
5
5
|
export declare const unmarshalApplication: (data: unknown) => Application;
|
|
@@ -29,6 +29,7 @@ export declare const unmarshalListUsersResponse: (data: unknown) => ListUsersRes
|
|
|
29
29
|
export declare const unmarshalMFAOTP: (data: unknown) => MFAOTP;
|
|
30
30
|
export declare const unmarshalOrganization: (data: unknown) => Organization;
|
|
31
31
|
export declare const unmarshalOrganizationSecuritySettings: (data: unknown) => OrganizationSecuritySettings;
|
|
32
|
+
export declare const unmarshalParseSamlMetadataResponse: (data: unknown) => ParseSamlMetadataResponse;
|
|
32
33
|
export declare const unmarshalSaml: (data: unknown) => Saml;
|
|
33
34
|
export declare const unmarshalSetRulesResponse: (data: unknown) => SetRulesResponse;
|
|
34
35
|
export declare const unmarshalValidateUserMFAOTPResponse: (data: unknown) => ValidateUserMFAOTPResponse;
|
|
@@ -43,6 +44,7 @@ export declare const marshalCreatePolicyRequest: (request: CreatePolicyRequest,
|
|
|
43
44
|
export declare const marshalCreateSSHKeyRequest: (request: CreateSSHKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
44
45
|
export declare const marshalCreateUserRequest: (request: CreateUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
45
46
|
export declare const marshalJoinUserConnectionRequest: (request: JoinUserConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
47
|
+
export declare const marshalParseSamlMetadataRequest: (request: ParseSamlMetadataRequest, defaults: DefaultValues) => Promise<Record<string, unknown>>;
|
|
46
48
|
export declare const marshalRemoveGroupMemberRequest: (request: RemoveGroupMemberRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
47
49
|
export declare const marshalRemoveUserConnectionRequest: (request: RemoveUserConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
48
50
|
export declare const marshalSetGroupMembersRequest: (request: SetGroupMembersRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -51,6 +53,7 @@ export declare const marshalSetRulesRequest: (request: SetRulesRequest, defaults
|
|
|
51
53
|
export declare const marshalUpdateAPIKeyRequest: (request: UpdateAPIKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
52
54
|
export declare const marshalUpdateApplicationRequest: (request: UpdateApplicationRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
53
55
|
export declare const marshalUpdateGroupRequest: (request: UpdateGroupRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
56
|
+
export declare const marshalUpdateOrganizationLoginMethodsRequest: (request: UpdateOrganizationLoginMethodsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
54
57
|
export declare const marshalUpdateOrganizationSecuritySettingsRequest: (request: UpdateOrganizationSecuritySettingsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
55
58
|
export declare const marshalUpdatePolicyRequest: (request: UpdatePolicyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
56
59
|
export declare const marshalUpdateSSHKeyRequest: (request: UpdateSSHKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import randomName from "@scaleway/random-name";
|
|
2
|
-
import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
|
|
2
|
+
import { resolveOneOf, marshalBlobToScwFile, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
|
|
3
3
|
const unmarshalJWT = (data) => {
|
|
4
4
|
if (!isJSONObject(data)) {
|
|
5
5
|
throw new TypeError(
|
|
@@ -496,6 +496,10 @@ const unmarshalOrganization = (data) => {
|
|
|
496
496
|
return {
|
|
497
497
|
alias: data.alias,
|
|
498
498
|
id: data.id,
|
|
499
|
+
loginMagicCodeEnabled: data.login_magic_code_enabled,
|
|
500
|
+
loginOauth2Enabled: data.login_oauth2_enabled,
|
|
501
|
+
loginPasswordEnabled: data.login_password_enabled,
|
|
502
|
+
loginSamlEnabled: data.login_saml_enabled,
|
|
499
503
|
name: data.name
|
|
500
504
|
};
|
|
501
505
|
};
|
|
@@ -508,7 +512,21 @@ const unmarshalOrganizationSecuritySettings = (data) => {
|
|
|
508
512
|
return {
|
|
509
513
|
enforcePasswordRenewal: data.enforce_password_renewal,
|
|
510
514
|
gracePeriodDuration: data.grace_period_duration,
|
|
511
|
-
loginAttemptsBeforeLocked: data.login_attempts_before_locked
|
|
515
|
+
loginAttemptsBeforeLocked: data.login_attempts_before_locked,
|
|
516
|
+
maxApiKeyExpirationDuration: data.max_api_key_expiration_duration,
|
|
517
|
+
maxLoginSessionDuration: data.max_login_session_duration
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
const unmarshalParseSamlMetadataResponse = (data) => {
|
|
521
|
+
if (!isJSONObject(data)) {
|
|
522
|
+
throw new TypeError(
|
|
523
|
+
`Unmarshalling the type 'ParseSamlMetadataResponse' failed as data isn't a dictionary.`
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
return {
|
|
527
|
+
entityId: data.entity_id,
|
|
528
|
+
signingCertificates: data.signing_certificates,
|
|
529
|
+
singleSignOnUrl: data.single_sign_on_url
|
|
512
530
|
};
|
|
513
531
|
};
|
|
514
532
|
const unmarshalSamlServiceProvider = (data) => {
|
|
@@ -646,6 +664,9 @@ const marshalCreateUserRequest = (request, defaults) => ({
|
|
|
646
664
|
const marshalJoinUserConnectionRequest = (request, defaults) => ({
|
|
647
665
|
token: request.token
|
|
648
666
|
});
|
|
667
|
+
const marshalParseSamlMetadataRequest = async (request, defaults) => ({
|
|
668
|
+
file: await marshalBlobToScwFile(request.file)
|
|
669
|
+
});
|
|
649
670
|
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
650
671
|
...resolveOneOf([
|
|
651
672
|
{ param: "user_id", value: request.userId },
|
|
@@ -680,10 +701,18 @@ const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
|
680
701
|
name: request.name,
|
|
681
702
|
tags: request.tags
|
|
682
703
|
});
|
|
704
|
+
const marshalUpdateOrganizationLoginMethodsRequest = (request, defaults) => ({
|
|
705
|
+
login_magic_code_enabled: request.loginMagicCodeEnabled,
|
|
706
|
+
login_oauth2_enabled: request.loginOauth2Enabled,
|
|
707
|
+
login_password_enabled: request.loginPasswordEnabled,
|
|
708
|
+
login_saml_enabled: request.loginSamlEnabled
|
|
709
|
+
});
|
|
683
710
|
const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
|
|
684
711
|
enforce_password_renewal: request.enforcePasswordRenewal,
|
|
685
712
|
grace_period_duration: request.gracePeriodDuration,
|
|
686
|
-
login_attempts_before_locked: request.loginAttemptsBeforeLocked
|
|
713
|
+
login_attempts_before_locked: request.loginAttemptsBeforeLocked,
|
|
714
|
+
max_api_key_expiration_duration: request.maxApiKeyExpirationDuration,
|
|
715
|
+
max_login_session_duration: request.maxLoginSessionDuration
|
|
687
716
|
});
|
|
688
717
|
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
689
718
|
description: request.description,
|
|
@@ -733,6 +762,7 @@ export {
|
|
|
733
762
|
marshalCreateSSHKeyRequest,
|
|
734
763
|
marshalCreateUserRequest,
|
|
735
764
|
marshalJoinUserConnectionRequest,
|
|
765
|
+
marshalParseSamlMetadataRequest,
|
|
736
766
|
marshalRemoveGroupMemberRequest,
|
|
737
767
|
marshalRemoveUserConnectionRequest,
|
|
738
768
|
marshalSetGroupMembersRequest,
|
|
@@ -741,6 +771,7 @@ export {
|
|
|
741
771
|
marshalUpdateAPIKeyRequest,
|
|
742
772
|
marshalUpdateApplicationRequest,
|
|
743
773
|
marshalUpdateGroupRequest,
|
|
774
|
+
marshalUpdateOrganizationLoginMethodsRequest,
|
|
744
775
|
marshalUpdateOrganizationSecuritySettingsRequest,
|
|
745
776
|
marshalUpdatePolicyRequest,
|
|
746
777
|
marshalUpdateSSHKeyRequest,
|
|
@@ -773,6 +804,7 @@ export {
|
|
|
773
804
|
unmarshalMFAOTP,
|
|
774
805
|
unmarshalOrganization,
|
|
775
806
|
unmarshalOrganizationSecuritySettings,
|
|
807
|
+
unmarshalParseSamlMetadataResponse,
|
|
776
808
|
unmarshalPolicy,
|
|
777
809
|
unmarshalQuotum,
|
|
778
810
|
unmarshalSSHKey,
|
|
@@ -19,7 +19,7 @@ export type SamlCertificateOrigin = 'unknown_certificate_origin' | 'scaleway' |
|
|
|
19
19
|
export type SamlCertificateType = 'unknown_certificate_type' | 'signing' | 'encryption';
|
|
20
20
|
export type SamlStatus = 'unknown_saml_status' | 'valid' | 'missing_certificate' | 'missing_entity_id' | 'missing_single_sign_on_url';
|
|
21
21
|
export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated';
|
|
22
|
-
export type UserType = 'unknown_type' | '
|
|
22
|
+
export type UserType = 'unknown_type' | 'owner' | 'member';
|
|
23
23
|
export interface ConnectionConnectedOrganization {
|
|
24
24
|
id: string;
|
|
25
25
|
name: string;
|
|
@@ -1579,12 +1579,6 @@ export type LockUserRequest = {
|
|
|
1579
1579
|
export interface MFAOTP {
|
|
1580
1580
|
secret: string;
|
|
1581
1581
|
}
|
|
1582
|
-
export type MigrateOrganizationGuestsRequest = {
|
|
1583
|
-
/**
|
|
1584
|
-
* ID of the Organization.
|
|
1585
|
-
*/
|
|
1586
|
-
organizationId?: string;
|
|
1587
|
-
};
|
|
1588
1582
|
export interface Organization {
|
|
1589
1583
|
/**
|
|
1590
1584
|
* ID of the Organization.
|
|
@@ -1598,6 +1592,22 @@ export interface Organization {
|
|
|
1598
1592
|
* Alias of the Organization.
|
|
1599
1593
|
*/
|
|
1600
1594
|
alias: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* Defines whether login with a password is enabled for the Organization.
|
|
1597
|
+
*/
|
|
1598
|
+
loginPasswordEnabled: boolean;
|
|
1599
|
+
/**
|
|
1600
|
+
* Defines whether login with an authentication code is enabled for the Organization.
|
|
1601
|
+
*/
|
|
1602
|
+
loginMagicCodeEnabled: boolean;
|
|
1603
|
+
/**
|
|
1604
|
+
* Defines whether login through OAuth2 is enabled for the Organization.
|
|
1605
|
+
*/
|
|
1606
|
+
loginOauth2Enabled: boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* Defines whether login through SAML is enabled for the Organization.
|
|
1609
|
+
*/
|
|
1610
|
+
loginSamlEnabled: boolean;
|
|
1601
1611
|
}
|
|
1602
1612
|
export interface OrganizationSecuritySettings {
|
|
1603
1613
|
/**
|
|
@@ -1612,6 +1622,22 @@ export interface OrganizationSecuritySettings {
|
|
|
1612
1622
|
* Number of login attempts before the account is locked.
|
|
1613
1623
|
*/
|
|
1614
1624
|
loginAttemptsBeforeLocked: number;
|
|
1625
|
+
/**
|
|
1626
|
+
* Maximum duration a login session will stay active before needing to relogin.
|
|
1627
|
+
*/
|
|
1628
|
+
maxLoginSessionDuration?: string;
|
|
1629
|
+
/**
|
|
1630
|
+
* Maximum duration the `expires_at` field of an API key can represent. A value of 0 means there is no maximum duration.
|
|
1631
|
+
*/
|
|
1632
|
+
maxApiKeyExpirationDuration?: string;
|
|
1633
|
+
}
|
|
1634
|
+
export type ParseSamlMetadataRequest = {
|
|
1635
|
+
file: Blob;
|
|
1636
|
+
};
|
|
1637
|
+
export interface ParseSamlMetadataResponse {
|
|
1638
|
+
singleSignOnUrl: string;
|
|
1639
|
+
entityId: string;
|
|
1640
|
+
signingCertificates: string[];
|
|
1615
1641
|
}
|
|
1616
1642
|
export type RemoveGroupMemberRequest = {
|
|
1617
1643
|
/**
|
|
@@ -1750,6 +1776,28 @@ export type UpdateGroupRequest = {
|
|
|
1750
1776
|
*/
|
|
1751
1777
|
tags?: string[];
|
|
1752
1778
|
};
|
|
1779
|
+
export type UpdateOrganizationLoginMethodsRequest = {
|
|
1780
|
+
/**
|
|
1781
|
+
* ID of the Organization.
|
|
1782
|
+
*/
|
|
1783
|
+
organizationId?: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Defines whether login with a password is enabled for the Organization.
|
|
1786
|
+
*/
|
|
1787
|
+
loginPasswordEnabled?: boolean;
|
|
1788
|
+
/**
|
|
1789
|
+
* Defines whether login through OAuth2 is enabled for the Organization.
|
|
1790
|
+
*/
|
|
1791
|
+
loginOauth2Enabled?: boolean;
|
|
1792
|
+
/**
|
|
1793
|
+
* Defines whether login with an authentication code is enabled for the Organization.
|
|
1794
|
+
*/
|
|
1795
|
+
loginMagicCodeEnabled?: boolean;
|
|
1796
|
+
/**
|
|
1797
|
+
* Defines whether login through SAML is enabled for the Organization.
|
|
1798
|
+
*/
|
|
1799
|
+
loginSamlEnabled?: boolean;
|
|
1800
|
+
};
|
|
1753
1801
|
export type UpdateOrganizationSecuritySettingsRequest = {
|
|
1754
1802
|
/**
|
|
1755
1803
|
* ID of the Organization.
|
|
@@ -1767,6 +1815,14 @@ export type UpdateOrganizationSecuritySettingsRequest = {
|
|
|
1767
1815
|
* Number of login attempts before the account is locked.
|
|
1768
1816
|
*/
|
|
1769
1817
|
loginAttemptsBeforeLocked?: number;
|
|
1818
|
+
/**
|
|
1819
|
+
* Maximum duration a login session will stay active before needing to relogin.
|
|
1820
|
+
*/
|
|
1821
|
+
maxLoginSessionDuration?: string;
|
|
1822
|
+
/**
|
|
1823
|
+
* Maximum duration the `expires_at` field of an API key can represent. A value of 0 means there is no maximum duration.
|
|
1824
|
+
*/
|
|
1825
|
+
maxApiKeyExpirationDuration?: string;
|
|
1770
1826
|
};
|
|
1771
1827
|
export type UpdatePolicyRequest = {
|
|
1772
1828
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-iam",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Scaleway SDK iam",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@scaleway/random-name": "5.1.2",
|
|
33
|
-
"@scaleway/sdk-std": "1.0
|
|
33
|
+
"@scaleway/sdk-std": "1.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|