@scaleway/sdk-iam 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +36 -3
- package/dist/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/v1alpha1/marshalling.gen.js +37 -4
- package/dist/v1alpha1/types.gen.d.ts +67 -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 },
|
|
@@ -670,7 +691,8 @@ const marshalSetRulesRequest = (request, defaults) => ({
|
|
|
670
691
|
});
|
|
671
692
|
const marshalUpdateAPIKeyRequest = (request, defaults) => ({
|
|
672
693
|
default_project_id: request.defaultProjectId,
|
|
673
|
-
description: request.description
|
|
694
|
+
description: request.description,
|
|
695
|
+
expires_at: request.expiresAt
|
|
674
696
|
});
|
|
675
697
|
const marshalUpdateApplicationRequest = (request, defaults) => ({
|
|
676
698
|
description: request.description,
|
|
@@ -682,10 +704,18 @@ const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
|
682
704
|
name: request.name,
|
|
683
705
|
tags: request.tags
|
|
684
706
|
});
|
|
707
|
+
const marshalUpdateOrganizationLoginMethodsRequest = (request, defaults) => ({
|
|
708
|
+
login_magic_code_enabled: request.loginMagicCodeEnabled,
|
|
709
|
+
login_oauth2_enabled: request.loginOauth2Enabled,
|
|
710
|
+
login_password_enabled: request.loginPasswordEnabled,
|
|
711
|
+
login_saml_enabled: request.loginSamlEnabled
|
|
712
|
+
});
|
|
685
713
|
const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
|
|
686
714
|
enforce_password_renewal: request.enforcePasswordRenewal,
|
|
687
715
|
grace_period_duration: request.gracePeriodDuration,
|
|
688
|
-
login_attempts_before_locked: request.loginAttemptsBeforeLocked
|
|
716
|
+
login_attempts_before_locked: request.loginAttemptsBeforeLocked,
|
|
717
|
+
max_api_key_expiration_duration: request.maxApiKeyExpirationDuration,
|
|
718
|
+
max_login_session_duration: request.maxLoginSessionDuration
|
|
689
719
|
});
|
|
690
720
|
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
691
721
|
description: request.description,
|
|
@@ -734,6 +764,7 @@ exports.marshalCreatePolicyRequest = marshalCreatePolicyRequest;
|
|
|
734
764
|
exports.marshalCreateSSHKeyRequest = marshalCreateSSHKeyRequest;
|
|
735
765
|
exports.marshalCreateUserRequest = marshalCreateUserRequest;
|
|
736
766
|
exports.marshalJoinUserConnectionRequest = marshalJoinUserConnectionRequest;
|
|
767
|
+
exports.marshalParseSamlMetadataRequest = marshalParseSamlMetadataRequest;
|
|
737
768
|
exports.marshalRemoveGroupMemberRequest = marshalRemoveGroupMemberRequest;
|
|
738
769
|
exports.marshalRemoveUserConnectionRequest = marshalRemoveUserConnectionRequest;
|
|
739
770
|
exports.marshalSetGroupMembersRequest = marshalSetGroupMembersRequest;
|
|
@@ -742,6 +773,7 @@ exports.marshalSetRulesRequest = marshalSetRulesRequest;
|
|
|
742
773
|
exports.marshalUpdateAPIKeyRequest = marshalUpdateAPIKeyRequest;
|
|
743
774
|
exports.marshalUpdateApplicationRequest = marshalUpdateApplicationRequest;
|
|
744
775
|
exports.marshalUpdateGroupRequest = marshalUpdateGroupRequest;
|
|
776
|
+
exports.marshalUpdateOrganizationLoginMethodsRequest = marshalUpdateOrganizationLoginMethodsRequest;
|
|
745
777
|
exports.marshalUpdateOrganizationSecuritySettingsRequest = marshalUpdateOrganizationSecuritySettingsRequest;
|
|
746
778
|
exports.marshalUpdatePolicyRequest = marshalUpdatePolicyRequest;
|
|
747
779
|
exports.marshalUpdateSSHKeyRequest = marshalUpdateSSHKeyRequest;
|
|
@@ -774,6 +806,7 @@ exports.unmarshalLog = unmarshalLog;
|
|
|
774
806
|
exports.unmarshalMFAOTP = unmarshalMFAOTP;
|
|
775
807
|
exports.unmarshalOrganization = unmarshalOrganization;
|
|
776
808
|
exports.unmarshalOrganizationSecuritySettings = unmarshalOrganizationSecuritySettings;
|
|
809
|
+
exports.unmarshalParseSamlMetadataResponse = unmarshalParseSamlMetadataResponse;
|
|
777
810
|
exports.unmarshalPolicy = unmarshalPolicy;
|
|
778
811
|
exports.unmarshalQuotum = unmarshalQuotum;
|
|
779
812
|
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 },
|
|
@@ -668,7 +689,8 @@ const marshalSetRulesRequest = (request, defaults) => ({
|
|
|
668
689
|
});
|
|
669
690
|
const marshalUpdateAPIKeyRequest = (request, defaults) => ({
|
|
670
691
|
default_project_id: request.defaultProjectId,
|
|
671
|
-
description: request.description
|
|
692
|
+
description: request.description,
|
|
693
|
+
expires_at: request.expiresAt
|
|
672
694
|
});
|
|
673
695
|
const marshalUpdateApplicationRequest = (request, defaults) => ({
|
|
674
696
|
description: request.description,
|
|
@@ -680,10 +702,18 @@ const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
|
680
702
|
name: request.name,
|
|
681
703
|
tags: request.tags
|
|
682
704
|
});
|
|
705
|
+
const marshalUpdateOrganizationLoginMethodsRequest = (request, defaults) => ({
|
|
706
|
+
login_magic_code_enabled: request.loginMagicCodeEnabled,
|
|
707
|
+
login_oauth2_enabled: request.loginOauth2Enabled,
|
|
708
|
+
login_password_enabled: request.loginPasswordEnabled,
|
|
709
|
+
login_saml_enabled: request.loginSamlEnabled
|
|
710
|
+
});
|
|
683
711
|
const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
|
|
684
712
|
enforce_password_renewal: request.enforcePasswordRenewal,
|
|
685
713
|
grace_period_duration: request.gracePeriodDuration,
|
|
686
|
-
login_attempts_before_locked: request.loginAttemptsBeforeLocked
|
|
714
|
+
login_attempts_before_locked: request.loginAttemptsBeforeLocked,
|
|
715
|
+
max_api_key_expiration_duration: request.maxApiKeyExpirationDuration,
|
|
716
|
+
max_login_session_duration: request.maxLoginSessionDuration
|
|
687
717
|
});
|
|
688
718
|
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
689
719
|
description: request.description,
|
|
@@ -733,6 +763,7 @@ export {
|
|
|
733
763
|
marshalCreateSSHKeyRequest,
|
|
734
764
|
marshalCreateUserRequest,
|
|
735
765
|
marshalJoinUserConnectionRequest,
|
|
766
|
+
marshalParseSamlMetadataRequest,
|
|
736
767
|
marshalRemoveGroupMemberRequest,
|
|
737
768
|
marshalRemoveUserConnectionRequest,
|
|
738
769
|
marshalSetGroupMembersRequest,
|
|
@@ -741,6 +772,7 @@ export {
|
|
|
741
772
|
marshalUpdateAPIKeyRequest,
|
|
742
773
|
marshalUpdateApplicationRequest,
|
|
743
774
|
marshalUpdateGroupRequest,
|
|
775
|
+
marshalUpdateOrganizationLoginMethodsRequest,
|
|
744
776
|
marshalUpdateOrganizationSecuritySettingsRequest,
|
|
745
777
|
marshalUpdatePolicyRequest,
|
|
746
778
|
marshalUpdateSSHKeyRequest,
|
|
@@ -773,6 +805,7 @@ export {
|
|
|
773
805
|
unmarshalMFAOTP,
|
|
774
806
|
unmarshalOrganization,
|
|
775
807
|
unmarshalOrganizationSecuritySettings,
|
|
808
|
+
unmarshalParseSamlMetadataResponse,
|
|
776
809
|
unmarshalPolicy,
|
|
777
810
|
unmarshalQuotum,
|
|
778
811
|
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
|
/**
|
|
@@ -1713,6 +1739,10 @@ export type UpdateAPIKeyRequest = {
|
|
|
1713
1739
|
* New description to update.
|
|
1714
1740
|
*/
|
|
1715
1741
|
description?: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* New expiration date of the API key.
|
|
1744
|
+
*/
|
|
1745
|
+
expiresAt?: Date;
|
|
1716
1746
|
};
|
|
1717
1747
|
export type UpdateApplicationRequest = {
|
|
1718
1748
|
/**
|
|
@@ -1750,6 +1780,28 @@ export type UpdateGroupRequest = {
|
|
|
1750
1780
|
*/
|
|
1751
1781
|
tags?: string[];
|
|
1752
1782
|
};
|
|
1783
|
+
export type UpdateOrganizationLoginMethodsRequest = {
|
|
1784
|
+
/**
|
|
1785
|
+
* ID of the Organization.
|
|
1786
|
+
*/
|
|
1787
|
+
organizationId?: string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Defines whether login with a password is enabled for the Organization.
|
|
1790
|
+
*/
|
|
1791
|
+
loginPasswordEnabled?: boolean;
|
|
1792
|
+
/**
|
|
1793
|
+
* Defines whether login through OAuth2 is enabled for the Organization.
|
|
1794
|
+
*/
|
|
1795
|
+
loginOauth2Enabled?: boolean;
|
|
1796
|
+
/**
|
|
1797
|
+
* Defines whether login with an authentication code is enabled for the Organization.
|
|
1798
|
+
*/
|
|
1799
|
+
loginMagicCodeEnabled?: boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* Defines whether login through SAML is enabled for the Organization.
|
|
1802
|
+
*/
|
|
1803
|
+
loginSamlEnabled?: boolean;
|
|
1804
|
+
};
|
|
1753
1805
|
export type UpdateOrganizationSecuritySettingsRequest = {
|
|
1754
1806
|
/**
|
|
1755
1807
|
* ID of the Organization.
|
|
@@ -1767,6 +1819,14 @@ export type UpdateOrganizationSecuritySettingsRequest = {
|
|
|
1767
1819
|
* Number of login attempts before the account is locked.
|
|
1768
1820
|
*/
|
|
1769
1821
|
loginAttemptsBeforeLocked?: number;
|
|
1822
|
+
/**
|
|
1823
|
+
* Maximum duration a login session will stay active before needing to relogin.
|
|
1824
|
+
*/
|
|
1825
|
+
maxLoginSessionDuration?: string;
|
|
1826
|
+
/**
|
|
1827
|
+
* Maximum duration the `expires_at` field of an API key can represent. A value of 0 means there is no maximum duration.
|
|
1828
|
+
*/
|
|
1829
|
+
maxApiKeyExpirationDuration?: string;
|
|
1770
1830
|
};
|
|
1771
1831
|
export type UpdatePolicyRequest = {
|
|
1772
1832
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-iam",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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.2.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|