@scaleway/sdk-iam 1.1.1 → 1.3.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/v1alpha1/api.gen.cjs +55 -0
- package/dist/v1alpha1/api.gen.d.ts +18 -1
- package/dist/v1alpha1/api.gen.js +56 -1
- package/dist/v1alpha1/index.gen.cjs +5 -0
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +6 -1
- package/dist/v1alpha1/marshalling.gen.cjs +36 -0
- package/dist/v1alpha1/marshalling.gen.d.ts +6 -1
- package/dist/v1alpha1/marshalling.gen.js +36 -0
- package/dist/v1alpha1/types.gen.d.ts +62 -0
- package/dist/v1alpha1/validation-rules.gen.cjs +17 -3
- package/dist/v1alpha1/validation-rules.gen.d.ts +12 -0
- package/dist/v1alpha1/validation-rules.gen.js +17 -3
- package/package.json +4 -4
|
@@ -302,6 +302,31 @@ class API extends sdkClient.API {
|
|
|
302
302
|
},
|
|
303
303
|
marshalling_gen.unmarshalGetUserConnectionsResponse
|
|
304
304
|
);
|
|
305
|
+
initiateUserConnection = (request) => this.client.fetch(
|
|
306
|
+
{
|
|
307
|
+
body: "{}",
|
|
308
|
+
headers: jsonContentHeaders,
|
|
309
|
+
method: "POST",
|
|
310
|
+
path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/initiate-connection`
|
|
311
|
+
},
|
|
312
|
+
marshalling_gen.unmarshalInitiateUserConnectionResponse
|
|
313
|
+
);
|
|
314
|
+
joinUserConnection = (request) => this.client.fetch({
|
|
315
|
+
body: JSON.stringify(
|
|
316
|
+
marshalling_gen.marshalJoinUserConnectionRequest(request, this.client.settings)
|
|
317
|
+
),
|
|
318
|
+
headers: jsonContentHeaders,
|
|
319
|
+
method: "POST",
|
|
320
|
+
path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/join-connection`
|
|
321
|
+
});
|
|
322
|
+
removeUserConnection = (request) => this.client.fetch({
|
|
323
|
+
body: JSON.stringify(
|
|
324
|
+
marshalling_gen.marshalRemoveUserConnectionRequest(request, this.client.settings)
|
|
325
|
+
),
|
|
326
|
+
headers: jsonContentHeaders,
|
|
327
|
+
method: "POST",
|
|
328
|
+
path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/remove-connection`
|
|
329
|
+
});
|
|
305
330
|
pageOfListApplications = (request = {}) => this.client.fetch(
|
|
306
331
|
{
|
|
307
332
|
method: "GET",
|
|
@@ -996,6 +1021,36 @@ class API extends sdkClient.API {
|
|
|
996
1021
|
},
|
|
997
1022
|
marshalling_gen.unmarshalOrganizationSecuritySettings
|
|
998
1023
|
);
|
|
1024
|
+
/**
|
|
1025
|
+
* Set your Organization's alias.. This will fail if an alias has already been defined. Please contact support if you need to change your Organization's alias.
|
|
1026
|
+
*
|
|
1027
|
+
* @param request - The request {@link SetOrganizationAliasRequest}
|
|
1028
|
+
* @returns A Promise of Organization
|
|
1029
|
+
*/
|
|
1030
|
+
setOrganizationAlias = (request) => this.client.fetch(
|
|
1031
|
+
{
|
|
1032
|
+
body: JSON.stringify(
|
|
1033
|
+
marshalling_gen.marshalSetOrganizationAliasRequest(request, this.client.settings)
|
|
1034
|
+
),
|
|
1035
|
+
headers: jsonContentHeaders,
|
|
1036
|
+
method: "PUT",
|
|
1037
|
+
path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/alias`
|
|
1038
|
+
},
|
|
1039
|
+
marshalling_gen.unmarshalOrganization
|
|
1040
|
+
);
|
|
1041
|
+
/**
|
|
1042
|
+
* Get your Organization's IAM information.
|
|
1043
|
+
*
|
|
1044
|
+
* @param request - The request {@link GetOrganizationRequest}
|
|
1045
|
+
* @returns A Promise of Organization
|
|
1046
|
+
*/
|
|
1047
|
+
getOrganization = (request = {}) => this.client.fetch(
|
|
1048
|
+
{
|
|
1049
|
+
method: "GET",
|
|
1050
|
+
path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}`
|
|
1051
|
+
},
|
|
1052
|
+
marshalling_gen.unmarshalOrganization
|
|
1053
|
+
);
|
|
999
1054
|
/**
|
|
1000
1055
|
* Migrate the organization's guests to IAM members.
|
|
1001
1056
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
|
-
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserConnectionsRequest, GetUserConnectionsResponse, GetUserRequest, Group, JWT, ListAPIKeysRequest, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsResponse, ListGracePeriodsRequest, ListGracePeriodsResponse, ListGroupsRequest, ListGroupsResponse, ListJWTsRequest, ListJWTsResponse, ListLogsRequest, ListLogsResponse, ListPermissionSetsRequest, ListPermissionSetsResponse, ListPoliciesRequest, ListPoliciesResponse, ListQuotaRequest, ListQuotaResponse, ListRulesRequest, ListRulesResponse, ListSSHKeysRequest, ListSSHKeysResponse, ListUsersRequest, ListUsersResponse, LockUserRequest, Log, MFAOTP, MigrateOrganizationGuestsRequest, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
2
|
+
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationRequest, 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, ListUsersRequest, ListUsersResponse, LockUserRequest, Log, MFAOTP, MigrateOrganizationGuestsRequest, Organization, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, RemoveUserConnectionRequest, SSHKey, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
3
3
|
/**
|
|
4
4
|
* IAM API.
|
|
5
5
|
|
|
@@ -138,6 +138,9 @@ export declare class API extends ParentAPI {
|
|
|
138
138
|
*/
|
|
139
139
|
listGracePeriods: (request?: Readonly<ListGracePeriodsRequest>) => Promise<ListGracePeriodsResponse>;
|
|
140
140
|
getUserConnections: (request: Readonly<GetUserConnectionsRequest>) => Promise<GetUserConnectionsResponse>;
|
|
141
|
+
initiateUserConnection: (request: Readonly<InitiateUserConnectionRequest>) => Promise<InitiateUserConnectionResponse>;
|
|
142
|
+
joinUserConnection: (request: Readonly<JoinUserConnectionRequest>) => Promise<void>;
|
|
143
|
+
removeUserConnection: (request: Readonly<RemoveUserConnectionRequest>) => Promise<void>;
|
|
141
144
|
protected pageOfListApplications: (request?: Readonly<ListApplicationsRequest>) => Promise<ListApplicationsResponse>;
|
|
142
145
|
/**
|
|
143
146
|
* List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters for your query such as `application_ids`.
|
|
@@ -435,6 +438,20 @@ export declare class API extends ParentAPI {
|
|
|
435
438
|
* @returns A Promise of OrganizationSecuritySettings
|
|
436
439
|
*/
|
|
437
440
|
updateOrganizationSecuritySettings: (request?: Readonly<UpdateOrganizationSecuritySettingsRequest>) => Promise<OrganizationSecuritySettings>;
|
|
441
|
+
/**
|
|
442
|
+
* Set your Organization's alias.. This will fail if an alias has already been defined. Please contact support if you need to change your Organization's alias.
|
|
443
|
+
*
|
|
444
|
+
* @param request - The request {@link SetOrganizationAliasRequest}
|
|
445
|
+
* @returns A Promise of Organization
|
|
446
|
+
*/
|
|
447
|
+
setOrganizationAlias: (request: Readonly<SetOrganizationAliasRequest>) => Promise<Organization>;
|
|
448
|
+
/**
|
|
449
|
+
* Get your Organization's IAM information.
|
|
450
|
+
*
|
|
451
|
+
* @param request - The request {@link GetOrganizationRequest}
|
|
452
|
+
* @returns A Promise of Organization
|
|
453
|
+
*/
|
|
454
|
+
getOrganization: (request?: Readonly<GetOrganizationRequest>) => Promise<Organization>;
|
|
438
455
|
/**
|
|
439
456
|
* Migrate the organization's guests to IAM members.
|
|
440
457
|
*
|
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, 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 } 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 } from "./marshalling.gen.js";
|
|
3
3
|
const jsonContentHeaders = {
|
|
4
4
|
"Content-Type": "application/json; charset=utf-8"
|
|
5
5
|
};
|
|
@@ -300,6 +300,31 @@ class API extends API$1 {
|
|
|
300
300
|
},
|
|
301
301
|
unmarshalGetUserConnectionsResponse
|
|
302
302
|
);
|
|
303
|
+
initiateUserConnection = (request) => this.client.fetch(
|
|
304
|
+
{
|
|
305
|
+
body: "{}",
|
|
306
|
+
headers: jsonContentHeaders,
|
|
307
|
+
method: "POST",
|
|
308
|
+
path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/initiate-connection`
|
|
309
|
+
},
|
|
310
|
+
unmarshalInitiateUserConnectionResponse
|
|
311
|
+
);
|
|
312
|
+
joinUserConnection = (request) => this.client.fetch({
|
|
313
|
+
body: JSON.stringify(
|
|
314
|
+
marshalJoinUserConnectionRequest(request, this.client.settings)
|
|
315
|
+
),
|
|
316
|
+
headers: jsonContentHeaders,
|
|
317
|
+
method: "POST",
|
|
318
|
+
path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/join-connection`
|
|
319
|
+
});
|
|
320
|
+
removeUserConnection = (request) => this.client.fetch({
|
|
321
|
+
body: JSON.stringify(
|
|
322
|
+
marshalRemoveUserConnectionRequest(request, this.client.settings)
|
|
323
|
+
),
|
|
324
|
+
headers: jsonContentHeaders,
|
|
325
|
+
method: "POST",
|
|
326
|
+
path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/remove-connection`
|
|
327
|
+
});
|
|
303
328
|
pageOfListApplications = (request = {}) => this.client.fetch(
|
|
304
329
|
{
|
|
305
330
|
method: "GET",
|
|
@@ -994,6 +1019,36 @@ class API extends API$1 {
|
|
|
994
1019
|
},
|
|
995
1020
|
unmarshalOrganizationSecuritySettings
|
|
996
1021
|
);
|
|
1022
|
+
/**
|
|
1023
|
+
* Set your Organization's alias.. This will fail if an alias has already been defined. Please contact support if you need to change your Organization's alias.
|
|
1024
|
+
*
|
|
1025
|
+
* @param request - The request {@link SetOrganizationAliasRequest}
|
|
1026
|
+
* @returns A Promise of Organization
|
|
1027
|
+
*/
|
|
1028
|
+
setOrganizationAlias = (request) => this.client.fetch(
|
|
1029
|
+
{
|
|
1030
|
+
body: JSON.stringify(
|
|
1031
|
+
marshalSetOrganizationAliasRequest(request, this.client.settings)
|
|
1032
|
+
),
|
|
1033
|
+
headers: jsonContentHeaders,
|
|
1034
|
+
method: "PUT",
|
|
1035
|
+
path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/alias`
|
|
1036
|
+
},
|
|
1037
|
+
unmarshalOrganization
|
|
1038
|
+
);
|
|
1039
|
+
/**
|
|
1040
|
+
* Get your Organization's IAM information.
|
|
1041
|
+
*
|
|
1042
|
+
* @param request - The request {@link GetOrganizationRequest}
|
|
1043
|
+
* @returns A Promise of Organization
|
|
1044
|
+
*/
|
|
1045
|
+
getOrganization = (request = {}) => this.client.fetch(
|
|
1046
|
+
{
|
|
1047
|
+
method: "GET",
|
|
1048
|
+
path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}`
|
|
1049
|
+
},
|
|
1050
|
+
unmarshalOrganization
|
|
1051
|
+
);
|
|
997
1052
|
/**
|
|
998
1053
|
* Migrate the organization's guests to IAM members.
|
|
999
1054
|
*
|
|
@@ -13,8 +13,11 @@ exports.marshalCreateJWTRequest = marshalling_gen.marshalCreateJWTRequest;
|
|
|
13
13
|
exports.marshalCreatePolicyRequest = marshalling_gen.marshalCreatePolicyRequest;
|
|
14
14
|
exports.marshalCreateSSHKeyRequest = marshalling_gen.marshalCreateSSHKeyRequest;
|
|
15
15
|
exports.marshalCreateUserRequest = marshalling_gen.marshalCreateUserRequest;
|
|
16
|
+
exports.marshalJoinUserConnectionRequest = marshalling_gen.marshalJoinUserConnectionRequest;
|
|
16
17
|
exports.marshalRemoveGroupMemberRequest = marshalling_gen.marshalRemoveGroupMemberRequest;
|
|
18
|
+
exports.marshalRemoveUserConnectionRequest = marshalling_gen.marshalRemoveUserConnectionRequest;
|
|
17
19
|
exports.marshalSetGroupMembersRequest = marshalling_gen.marshalSetGroupMembersRequest;
|
|
20
|
+
exports.marshalSetOrganizationAliasRequest = marshalling_gen.marshalSetOrganizationAliasRequest;
|
|
18
21
|
exports.marshalSetRulesRequest = marshalling_gen.marshalSetRulesRequest;
|
|
19
22
|
exports.marshalUpdateAPIKeyRequest = marshalling_gen.marshalUpdateAPIKeyRequest;
|
|
20
23
|
exports.marshalUpdateApplicationRequest = marshalling_gen.marshalUpdateApplicationRequest;
|
|
@@ -31,6 +34,7 @@ exports.unmarshalApplication = marshalling_gen.unmarshalApplication;
|
|
|
31
34
|
exports.unmarshalEncodedJWT = marshalling_gen.unmarshalEncodedJWT;
|
|
32
35
|
exports.unmarshalGetUserConnectionsResponse = marshalling_gen.unmarshalGetUserConnectionsResponse;
|
|
33
36
|
exports.unmarshalGroup = marshalling_gen.unmarshalGroup;
|
|
37
|
+
exports.unmarshalInitiateUserConnectionResponse = marshalling_gen.unmarshalInitiateUserConnectionResponse;
|
|
34
38
|
exports.unmarshalJWT = marshalling_gen.unmarshalJWT;
|
|
35
39
|
exports.unmarshalListAPIKeysResponse = marshalling_gen.unmarshalListAPIKeysResponse;
|
|
36
40
|
exports.unmarshalListApplicationsResponse = marshalling_gen.unmarshalListApplicationsResponse;
|
|
@@ -46,6 +50,7 @@ exports.unmarshalListSSHKeysResponse = marshalling_gen.unmarshalListSSHKeysRespo
|
|
|
46
50
|
exports.unmarshalListUsersResponse = marshalling_gen.unmarshalListUsersResponse;
|
|
47
51
|
exports.unmarshalLog = marshalling_gen.unmarshalLog;
|
|
48
52
|
exports.unmarshalMFAOTP = marshalling_gen.unmarshalMFAOTP;
|
|
53
|
+
exports.unmarshalOrganization = marshalling_gen.unmarshalOrganization;
|
|
49
54
|
exports.unmarshalOrganizationSecuritySettings = marshalling_gen.unmarshalOrganizationSecuritySettings;
|
|
50
55
|
exports.unmarshalPolicy = marshalling_gen.unmarshalPolicy;
|
|
51
56
|
exports.unmarshalQuotum = marshalling_gen.unmarshalQuotum;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './marshalling.gen';
|
|
3
|
-
export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, Connection, ConnectionConnectedOrganization, ConnectionConnectedUser, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserConnectionsRequest, GetUserConnectionsResponse, GetUserRequest, GracePeriod, GracePeriodType, Group, JWT, 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, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LocalityType, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, MigrateOrganizationGuestsRequest, OrganizationSecuritySettings, PermissionSet, PermissionSetScopeType, Policy, Quotum, QuotumLimit, RemoveGroupMemberRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, } from './types.gen';
|
|
3
|
+
export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, Connection, ConnectionConnectedOrganization, ConnectionConnectedUser, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationRequest, 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, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LocalityType, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, MigrateOrganizationGuestsRequest, Organization, OrganizationSecuritySettings, PermissionSet, PermissionSetScopeType, Policy, Quotum, QuotumLimit, RemoveGroupMemberRequest, RemoveUserConnectionRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API } from "./api.gen.js";
|
|
2
|
-
import { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreateJWTRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdateOrganizationSecuritySettingsRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, marshalUpdateUserPasswordRequest, marshalUpdateUserRequest, marshalUpdateUserUsernameRequest, marshalValidateUserMFAOTPRequest, unmarshalAPIKey, unmarshalApplication, unmarshalEncodedJWT, unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGracePeriodsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, unmarshalOrganizationSecuritySettings, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser, unmarshalValidateUserMFAOTPResponse } from "./marshalling.gen.js";
|
|
2
|
+
import { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreateJWTRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalJoinUserConnectionRequest, marshalRemoveGroupMemberRequest, marshalRemoveUserConnectionRequest, marshalSetGroupMembersRequest, marshalSetOrganizationAliasRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdateOrganizationSecuritySettingsRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, marshalUpdateUserPasswordRequest, marshalUpdateUserRequest, marshalUpdateUserUsernameRequest, marshalValidateUserMFAOTPRequest, unmarshalAPIKey, unmarshalApplication, unmarshalEncodedJWT, unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalInitiateUserConnectionResponse, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGracePeriodsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, unmarshalOrganization, unmarshalOrganizationSecuritySettings, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser, unmarshalValidateUserMFAOTPResponse } from "./marshalling.gen.js";
|
|
3
3
|
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
4
4
|
export {
|
|
5
5
|
API,
|
|
@@ -13,8 +13,11 @@ export {
|
|
|
13
13
|
marshalCreatePolicyRequest,
|
|
14
14
|
marshalCreateSSHKeyRequest,
|
|
15
15
|
marshalCreateUserRequest,
|
|
16
|
+
marshalJoinUserConnectionRequest,
|
|
16
17
|
marshalRemoveGroupMemberRequest,
|
|
18
|
+
marshalRemoveUserConnectionRequest,
|
|
17
19
|
marshalSetGroupMembersRequest,
|
|
20
|
+
marshalSetOrganizationAliasRequest,
|
|
18
21
|
marshalSetRulesRequest,
|
|
19
22
|
marshalUpdateAPIKeyRequest,
|
|
20
23
|
marshalUpdateApplicationRequest,
|
|
@@ -31,6 +34,7 @@ export {
|
|
|
31
34
|
unmarshalEncodedJWT,
|
|
32
35
|
unmarshalGetUserConnectionsResponse,
|
|
33
36
|
unmarshalGroup,
|
|
37
|
+
unmarshalInitiateUserConnectionResponse,
|
|
34
38
|
unmarshalJWT,
|
|
35
39
|
unmarshalListAPIKeysResponse,
|
|
36
40
|
unmarshalListApplicationsResponse,
|
|
@@ -46,6 +50,7 @@ export {
|
|
|
46
50
|
unmarshalListUsersResponse,
|
|
47
51
|
unmarshalLog,
|
|
48
52
|
unmarshalMFAOTP,
|
|
53
|
+
unmarshalOrganization,
|
|
49
54
|
unmarshalOrganizationSecuritySettings,
|
|
50
55
|
unmarshalPolicy,
|
|
51
56
|
unmarshalQuotum,
|
|
@@ -260,6 +260,16 @@ const unmarshalGetUserConnectionsResponse = (data) => {
|
|
|
260
260
|
connections: sdkClient.unmarshalArrayOfObject(data.connections, unmarshalConnection)
|
|
261
261
|
};
|
|
262
262
|
};
|
|
263
|
+
const unmarshalInitiateUserConnectionResponse = (data) => {
|
|
264
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
265
|
+
throw new TypeError(
|
|
266
|
+
`Unmarshalling the type 'InitiateUserConnectionResponse' failed as data isn't a dictionary.`
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
return {
|
|
270
|
+
token: data.token
|
|
271
|
+
};
|
|
272
|
+
};
|
|
263
273
|
const unmarshalListAPIKeysResponse = (data) => {
|
|
264
274
|
if (!sdkClient.isJSONObject(data)) {
|
|
265
275
|
throw new TypeError(
|
|
@@ -452,6 +462,18 @@ const unmarshalMFAOTP = (data) => {
|
|
|
452
462
|
secret: data.secret
|
|
453
463
|
};
|
|
454
464
|
};
|
|
465
|
+
const unmarshalOrganization = (data) => {
|
|
466
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
467
|
+
throw new TypeError(
|
|
468
|
+
`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
alias: data.alias,
|
|
473
|
+
id: data.id,
|
|
474
|
+
name: data.name
|
|
475
|
+
};
|
|
476
|
+
};
|
|
455
477
|
const unmarshalOrganizationSecuritySettings = (data) => {
|
|
456
478
|
if (!sdkClient.isJSONObject(data)) {
|
|
457
479
|
throw new TypeError(
|
|
@@ -567,16 +589,25 @@ const marshalCreateUserRequest = (request, defaults) => ({
|
|
|
567
589
|
}
|
|
568
590
|
])
|
|
569
591
|
});
|
|
592
|
+
const marshalJoinUserConnectionRequest = (request, defaults) => ({
|
|
593
|
+
token: request.token
|
|
594
|
+
});
|
|
570
595
|
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
571
596
|
...sdkClient.resolveOneOf([
|
|
572
597
|
{ param: "user_id", value: request.userId },
|
|
573
598
|
{ param: "application_id", value: request.applicationId }
|
|
574
599
|
])
|
|
575
600
|
});
|
|
601
|
+
const marshalRemoveUserConnectionRequest = (request, defaults) => ({
|
|
602
|
+
target_user_id: request.targetUserId
|
|
603
|
+
});
|
|
576
604
|
const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
577
605
|
application_ids: request.applicationIds,
|
|
578
606
|
user_ids: request.userIds
|
|
579
607
|
});
|
|
608
|
+
const marshalSetOrganizationAliasRequest = (request, defaults) => ({
|
|
609
|
+
alias: request.alias
|
|
610
|
+
});
|
|
580
611
|
const marshalSetRulesRequest = (request, defaults) => ({
|
|
581
612
|
policy_id: request.policyId,
|
|
582
613
|
rules: request.rules.map((elt) => marshalRuleSpecs(elt))
|
|
@@ -641,8 +672,11 @@ exports.marshalCreateJWTRequest = marshalCreateJWTRequest;
|
|
|
641
672
|
exports.marshalCreatePolicyRequest = marshalCreatePolicyRequest;
|
|
642
673
|
exports.marshalCreateSSHKeyRequest = marshalCreateSSHKeyRequest;
|
|
643
674
|
exports.marshalCreateUserRequest = marshalCreateUserRequest;
|
|
675
|
+
exports.marshalJoinUserConnectionRequest = marshalJoinUserConnectionRequest;
|
|
644
676
|
exports.marshalRemoveGroupMemberRequest = marshalRemoveGroupMemberRequest;
|
|
677
|
+
exports.marshalRemoveUserConnectionRequest = marshalRemoveUserConnectionRequest;
|
|
645
678
|
exports.marshalSetGroupMembersRequest = marshalSetGroupMembersRequest;
|
|
679
|
+
exports.marshalSetOrganizationAliasRequest = marshalSetOrganizationAliasRequest;
|
|
646
680
|
exports.marshalSetRulesRequest = marshalSetRulesRequest;
|
|
647
681
|
exports.marshalUpdateAPIKeyRequest = marshalUpdateAPIKeyRequest;
|
|
648
682
|
exports.marshalUpdateApplicationRequest = marshalUpdateApplicationRequest;
|
|
@@ -659,6 +693,7 @@ exports.unmarshalApplication = unmarshalApplication;
|
|
|
659
693
|
exports.unmarshalEncodedJWT = unmarshalEncodedJWT;
|
|
660
694
|
exports.unmarshalGetUserConnectionsResponse = unmarshalGetUserConnectionsResponse;
|
|
661
695
|
exports.unmarshalGroup = unmarshalGroup;
|
|
696
|
+
exports.unmarshalInitiateUserConnectionResponse = unmarshalInitiateUserConnectionResponse;
|
|
662
697
|
exports.unmarshalJWT = unmarshalJWT;
|
|
663
698
|
exports.unmarshalListAPIKeysResponse = unmarshalListAPIKeysResponse;
|
|
664
699
|
exports.unmarshalListApplicationsResponse = unmarshalListApplicationsResponse;
|
|
@@ -674,6 +709,7 @@ exports.unmarshalListSSHKeysResponse = unmarshalListSSHKeysResponse;
|
|
|
674
709
|
exports.unmarshalListUsersResponse = unmarshalListUsersResponse;
|
|
675
710
|
exports.unmarshalLog = unmarshalLog;
|
|
676
711
|
exports.unmarshalMFAOTP = unmarshalMFAOTP;
|
|
712
|
+
exports.unmarshalOrganization = unmarshalOrganization;
|
|
677
713
|
exports.unmarshalOrganizationSecuritySettings = unmarshalOrganizationSecuritySettings;
|
|
678
714
|
exports.unmarshalPolicy = unmarshalPolicy;
|
|
679
715
|
exports.unmarshalQuotum = unmarshalQuotum;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, EncodedJWT, GetUserConnectionsResponse, Group, JWT, ListAPIKeysResponse, ListApplicationsResponse, ListGracePeriodsResponse, ListGroupsResponse, ListJWTsResponse, ListLogsResponse, ListPermissionSetsResponse, ListPoliciesResponse, ListQuotaResponse, ListRulesResponse, ListSSHKeysResponse, ListUsersResponse, Log, MFAOTP, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
2
|
+
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, 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, ListUsersResponse, Log, MFAOTP, Organization, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, RemoveUserConnectionRequest, SSHKey, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
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;
|
|
@@ -11,6 +11,7 @@ export declare const unmarshalSSHKey: (data: unknown) => SSHKey;
|
|
|
11
11
|
export declare const unmarshalUser: (data: unknown) => User;
|
|
12
12
|
export declare const unmarshalEncodedJWT: (data: unknown) => EncodedJWT;
|
|
13
13
|
export declare const unmarshalGetUserConnectionsResponse: (data: unknown) => GetUserConnectionsResponse;
|
|
14
|
+
export declare const unmarshalInitiateUserConnectionResponse: (data: unknown) => InitiateUserConnectionResponse;
|
|
14
15
|
export declare const unmarshalListAPIKeysResponse: (data: unknown) => ListAPIKeysResponse;
|
|
15
16
|
export declare const unmarshalListApplicationsResponse: (data: unknown) => ListApplicationsResponse;
|
|
16
17
|
export declare const unmarshalListGracePeriodsResponse: (data: unknown) => ListGracePeriodsResponse;
|
|
@@ -24,6 +25,7 @@ export declare const unmarshalListRulesResponse: (data: unknown) => ListRulesRes
|
|
|
24
25
|
export declare const unmarshalListSSHKeysResponse: (data: unknown) => ListSSHKeysResponse;
|
|
25
26
|
export declare const unmarshalListUsersResponse: (data: unknown) => ListUsersResponse;
|
|
26
27
|
export declare const unmarshalMFAOTP: (data: unknown) => MFAOTP;
|
|
28
|
+
export declare const unmarshalOrganization: (data: unknown) => Organization;
|
|
27
29
|
export declare const unmarshalOrganizationSecuritySettings: (data: unknown) => OrganizationSecuritySettings;
|
|
28
30
|
export declare const unmarshalSetRulesResponse: (data: unknown) => SetRulesResponse;
|
|
29
31
|
export declare const unmarshalValidateUserMFAOTPResponse: (data: unknown) => ValidateUserMFAOTPResponse;
|
|
@@ -36,8 +38,11 @@ export declare const marshalCreateJWTRequest: (request: CreateJWTRequest, defaul
|
|
|
36
38
|
export declare const marshalCreatePolicyRequest: (request: CreatePolicyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
37
39
|
export declare const marshalCreateSSHKeyRequest: (request: CreateSSHKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
38
40
|
export declare const marshalCreateUserRequest: (request: CreateUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
41
|
+
export declare const marshalJoinUserConnectionRequest: (request: JoinUserConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
39
42
|
export declare const marshalRemoveGroupMemberRequest: (request: RemoveGroupMemberRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
43
|
+
export declare const marshalRemoveUserConnectionRequest: (request: RemoveUserConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
40
44
|
export declare const marshalSetGroupMembersRequest: (request: SetGroupMembersRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
45
|
+
export declare const marshalSetOrganizationAliasRequest: (request: SetOrganizationAliasRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
41
46
|
export declare const marshalSetRulesRequest: (request: SetRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
42
47
|
export declare const marshalUpdateAPIKeyRequest: (request: UpdateAPIKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
43
48
|
export declare const marshalUpdateApplicationRequest: (request: UpdateApplicationRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -258,6 +258,16 @@ const unmarshalGetUserConnectionsResponse = (data) => {
|
|
|
258
258
|
connections: unmarshalArrayOfObject(data.connections, unmarshalConnection)
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
|
+
const unmarshalInitiateUserConnectionResponse = (data) => {
|
|
262
|
+
if (!isJSONObject(data)) {
|
|
263
|
+
throw new TypeError(
|
|
264
|
+
`Unmarshalling the type 'InitiateUserConnectionResponse' failed as data isn't a dictionary.`
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
token: data.token
|
|
269
|
+
};
|
|
270
|
+
};
|
|
261
271
|
const unmarshalListAPIKeysResponse = (data) => {
|
|
262
272
|
if (!isJSONObject(data)) {
|
|
263
273
|
throw new TypeError(
|
|
@@ -450,6 +460,18 @@ const unmarshalMFAOTP = (data) => {
|
|
|
450
460
|
secret: data.secret
|
|
451
461
|
};
|
|
452
462
|
};
|
|
463
|
+
const unmarshalOrganization = (data) => {
|
|
464
|
+
if (!isJSONObject(data)) {
|
|
465
|
+
throw new TypeError(
|
|
466
|
+
`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
470
|
+
alias: data.alias,
|
|
471
|
+
id: data.id,
|
|
472
|
+
name: data.name
|
|
473
|
+
};
|
|
474
|
+
};
|
|
453
475
|
const unmarshalOrganizationSecuritySettings = (data) => {
|
|
454
476
|
if (!isJSONObject(data)) {
|
|
455
477
|
throw new TypeError(
|
|
@@ -565,16 +587,25 @@ const marshalCreateUserRequest = (request, defaults) => ({
|
|
|
565
587
|
}
|
|
566
588
|
])
|
|
567
589
|
});
|
|
590
|
+
const marshalJoinUserConnectionRequest = (request, defaults) => ({
|
|
591
|
+
token: request.token
|
|
592
|
+
});
|
|
568
593
|
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
569
594
|
...resolveOneOf([
|
|
570
595
|
{ param: "user_id", value: request.userId },
|
|
571
596
|
{ param: "application_id", value: request.applicationId }
|
|
572
597
|
])
|
|
573
598
|
});
|
|
599
|
+
const marshalRemoveUserConnectionRequest = (request, defaults) => ({
|
|
600
|
+
target_user_id: request.targetUserId
|
|
601
|
+
});
|
|
574
602
|
const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
575
603
|
application_ids: request.applicationIds,
|
|
576
604
|
user_ids: request.userIds
|
|
577
605
|
});
|
|
606
|
+
const marshalSetOrganizationAliasRequest = (request, defaults) => ({
|
|
607
|
+
alias: request.alias
|
|
608
|
+
});
|
|
578
609
|
const marshalSetRulesRequest = (request, defaults) => ({
|
|
579
610
|
policy_id: request.policyId,
|
|
580
611
|
rules: request.rules.map((elt) => marshalRuleSpecs(elt))
|
|
@@ -640,8 +671,11 @@ export {
|
|
|
640
671
|
marshalCreatePolicyRequest,
|
|
641
672
|
marshalCreateSSHKeyRequest,
|
|
642
673
|
marshalCreateUserRequest,
|
|
674
|
+
marshalJoinUserConnectionRequest,
|
|
643
675
|
marshalRemoveGroupMemberRequest,
|
|
676
|
+
marshalRemoveUserConnectionRequest,
|
|
644
677
|
marshalSetGroupMembersRequest,
|
|
678
|
+
marshalSetOrganizationAliasRequest,
|
|
645
679
|
marshalSetRulesRequest,
|
|
646
680
|
marshalUpdateAPIKeyRequest,
|
|
647
681
|
marshalUpdateApplicationRequest,
|
|
@@ -658,6 +692,7 @@ export {
|
|
|
658
692
|
unmarshalEncodedJWT,
|
|
659
693
|
unmarshalGetUserConnectionsResponse,
|
|
660
694
|
unmarshalGroup,
|
|
695
|
+
unmarshalInitiateUserConnectionResponse,
|
|
661
696
|
unmarshalJWT,
|
|
662
697
|
unmarshalListAPIKeysResponse,
|
|
663
698
|
unmarshalListApplicationsResponse,
|
|
@@ -673,6 +708,7 @@ export {
|
|
|
673
708
|
unmarshalListUsersResponse,
|
|
674
709
|
unmarshalLog,
|
|
675
710
|
unmarshalMFAOTP,
|
|
711
|
+
unmarshalOrganization,
|
|
676
712
|
unmarshalOrganizationSecuritySettings,
|
|
677
713
|
unmarshalPolicy,
|
|
678
714
|
unmarshalQuotum,
|
|
@@ -943,6 +943,12 @@ export type GetLogRequest = {
|
|
|
943
943
|
*/
|
|
944
944
|
logId: string;
|
|
945
945
|
};
|
|
946
|
+
export type GetOrganizationRequest = {
|
|
947
|
+
/**
|
|
948
|
+
* ID of the Organization.
|
|
949
|
+
*/
|
|
950
|
+
organizationId?: string;
|
|
951
|
+
};
|
|
946
952
|
export type GetOrganizationSecuritySettingsRequest = {
|
|
947
953
|
/**
|
|
948
954
|
* ID of the Organization.
|
|
@@ -989,6 +995,28 @@ export type GetUserRequest = {
|
|
|
989
995
|
*/
|
|
990
996
|
userId: string;
|
|
991
997
|
};
|
|
998
|
+
export type InitiateUserConnectionRequest = {
|
|
999
|
+
/**
|
|
1000
|
+
* ID of the user that will be added to your connection.
|
|
1001
|
+
*/
|
|
1002
|
+
userId: string;
|
|
1003
|
+
};
|
|
1004
|
+
export interface InitiateUserConnectionResponse {
|
|
1005
|
+
/**
|
|
1006
|
+
* Token to be used in JoinUserConnection.
|
|
1007
|
+
*/
|
|
1008
|
+
token: string;
|
|
1009
|
+
}
|
|
1010
|
+
export type JoinUserConnectionRequest = {
|
|
1011
|
+
/**
|
|
1012
|
+
* User ID.
|
|
1013
|
+
*/
|
|
1014
|
+
userId: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* A token returned by InitiateUserConnection.
|
|
1017
|
+
*/
|
|
1018
|
+
token: string;
|
|
1019
|
+
};
|
|
992
1020
|
export type ListAPIKeysRequest = {
|
|
993
1021
|
/**
|
|
994
1022
|
* Criteria for sorting results.
|
|
@@ -1478,6 +1506,20 @@ export type MigrateOrganizationGuestsRequest = {
|
|
|
1478
1506
|
*/
|
|
1479
1507
|
organizationId?: string;
|
|
1480
1508
|
};
|
|
1509
|
+
export interface Organization {
|
|
1510
|
+
/**
|
|
1511
|
+
* ID of the Organization.
|
|
1512
|
+
*/
|
|
1513
|
+
id: string;
|
|
1514
|
+
/**
|
|
1515
|
+
* Name of the Organization.
|
|
1516
|
+
*/
|
|
1517
|
+
name: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Alias of the Organization.
|
|
1520
|
+
*/
|
|
1521
|
+
alias: string;
|
|
1522
|
+
}
|
|
1481
1523
|
export interface OrganizationSecuritySettings {
|
|
1482
1524
|
/**
|
|
1483
1525
|
* Defines whether password renewal is enforced during first login.
|
|
@@ -1510,11 +1552,31 @@ export type RemoveGroupMemberRequest = {
|
|
|
1510
1552
|
*/
|
|
1511
1553
|
applicationId?: string;
|
|
1512
1554
|
};
|
|
1555
|
+
export type RemoveUserConnectionRequest = {
|
|
1556
|
+
/**
|
|
1557
|
+
* ID of the user you want to manage the connection for.
|
|
1558
|
+
*/
|
|
1559
|
+
userId: string;
|
|
1560
|
+
/**
|
|
1561
|
+
* ID of the user you want to remove from your connection.
|
|
1562
|
+
*/
|
|
1563
|
+
targetUserId: string;
|
|
1564
|
+
};
|
|
1513
1565
|
export type SetGroupMembersRequest = {
|
|
1514
1566
|
groupId: string;
|
|
1515
1567
|
userIds: string[];
|
|
1516
1568
|
applicationIds: string[];
|
|
1517
1569
|
};
|
|
1570
|
+
export type SetOrganizationAliasRequest = {
|
|
1571
|
+
/**
|
|
1572
|
+
* ID of the Organization.
|
|
1573
|
+
*/
|
|
1574
|
+
organizationId?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Alias of the Organization.
|
|
1577
|
+
*/
|
|
1578
|
+
alias: string;
|
|
1579
|
+
};
|
|
1518
1580
|
export type SetRulesRequest = {
|
|
1519
1581
|
/**
|
|
1520
1582
|
* Id of policy to update.
|
|
@@ -63,7 +63,7 @@ const CreateUserRequestMember = {
|
|
|
63
63
|
username: {
|
|
64
64
|
maxLength: 64,
|
|
65
65
|
minLength: 2,
|
|
66
|
-
pattern: /^[a-zA-Z0-9
|
|
66
|
+
pattern: /^[a-zA-Z0-9@._-]+$/
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
const GetQuotumRequest = {
|
|
@@ -71,6 +71,11 @@ const GetQuotumRequest = {
|
|
|
71
71
|
minLength: 1
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
+
const JoinUserConnectionRequest = {
|
|
75
|
+
token: {
|
|
76
|
+
minLength: 1
|
|
77
|
+
}
|
|
78
|
+
};
|
|
74
79
|
const ListAPIKeysRequest = {
|
|
75
80
|
description: {
|
|
76
81
|
maxLength: 200
|
|
@@ -201,7 +206,14 @@ const ListUsersRequest = {
|
|
|
201
206
|
};
|
|
202
207
|
const RuleSpecs = {
|
|
203
208
|
condition: {
|
|
204
|
-
maxLength:
|
|
209
|
+
maxLength: 2048
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
const SetOrganizationAliasRequest = {
|
|
213
|
+
alias: {
|
|
214
|
+
maxLength: 32,
|
|
215
|
+
minLength: 2,
|
|
216
|
+
pattern: /^[a-z0-9]+$/
|
|
205
217
|
}
|
|
206
218
|
};
|
|
207
219
|
const UpdateAPIKeyRequest = {
|
|
@@ -268,7 +280,7 @@ const UpdateUserUsernameRequest = {
|
|
|
268
280
|
username: {
|
|
269
281
|
maxLength: 64,
|
|
270
282
|
minLength: 2,
|
|
271
|
-
pattern: /^[a-zA-Z0-9
|
|
283
|
+
pattern: /^[a-zA-Z0-9@._-]+$/
|
|
272
284
|
}
|
|
273
285
|
};
|
|
274
286
|
const ValidateUserMFAOTPRequest = {
|
|
@@ -283,6 +295,7 @@ exports.CreatePolicyRequest = CreatePolicyRequest;
|
|
|
283
295
|
exports.CreateSSHKeyRequest = CreateSSHKeyRequest;
|
|
284
296
|
exports.CreateUserRequestMember = CreateUserRequestMember;
|
|
285
297
|
exports.GetQuotumRequest = GetQuotumRequest;
|
|
298
|
+
exports.JoinUserConnectionRequest = JoinUserConnectionRequest;
|
|
286
299
|
exports.ListAPIKeysRequest = ListAPIKeysRequest;
|
|
287
300
|
exports.ListApplicationsRequest = ListApplicationsRequest;
|
|
288
301
|
exports.ListGroupsRequest = ListGroupsRequest;
|
|
@@ -295,6 +308,7 @@ exports.ListRulesRequest = ListRulesRequest;
|
|
|
295
308
|
exports.ListSSHKeysRequest = ListSSHKeysRequest;
|
|
296
309
|
exports.ListUsersRequest = ListUsersRequest;
|
|
297
310
|
exports.RuleSpecs = RuleSpecs;
|
|
311
|
+
exports.SetOrganizationAliasRequest = SetOrganizationAliasRequest;
|
|
298
312
|
exports.UpdateAPIKeyRequest = UpdateAPIKeyRequest;
|
|
299
313
|
exports.UpdateApplicationRequest = UpdateApplicationRequest;
|
|
300
314
|
exports.UpdateGroupRequest = UpdateGroupRequest;
|
|
@@ -69,6 +69,11 @@ export declare const GetQuotumRequest: {
|
|
|
69
69
|
minLength: number;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
+
export declare const JoinUserConnectionRequest: {
|
|
73
|
+
token: {
|
|
74
|
+
minLength: number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
72
77
|
export declare const ListAPIKeysRequest: {
|
|
73
78
|
description: {
|
|
74
79
|
maxLength: number;
|
|
@@ -202,6 +207,13 @@ export declare const RuleSpecs: {
|
|
|
202
207
|
maxLength: number;
|
|
203
208
|
};
|
|
204
209
|
};
|
|
210
|
+
export declare const SetOrganizationAliasRequest: {
|
|
211
|
+
alias: {
|
|
212
|
+
maxLength: number;
|
|
213
|
+
minLength: number;
|
|
214
|
+
pattern: RegExp;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
205
217
|
export declare const UpdateAPIKeyRequest: {
|
|
206
218
|
description: {
|
|
207
219
|
maxLength: number;
|
|
@@ -61,7 +61,7 @@ const CreateUserRequestMember = {
|
|
|
61
61
|
username: {
|
|
62
62
|
maxLength: 64,
|
|
63
63
|
minLength: 2,
|
|
64
|
-
pattern: /^[a-zA-Z0-9
|
|
64
|
+
pattern: /^[a-zA-Z0-9@._-]+$/
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
const GetQuotumRequest = {
|
|
@@ -69,6 +69,11 @@ const GetQuotumRequest = {
|
|
|
69
69
|
minLength: 1
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
+
const JoinUserConnectionRequest = {
|
|
73
|
+
token: {
|
|
74
|
+
minLength: 1
|
|
75
|
+
}
|
|
76
|
+
};
|
|
72
77
|
const ListAPIKeysRequest = {
|
|
73
78
|
description: {
|
|
74
79
|
maxLength: 200
|
|
@@ -199,7 +204,14 @@ const ListUsersRequest = {
|
|
|
199
204
|
};
|
|
200
205
|
const RuleSpecs = {
|
|
201
206
|
condition: {
|
|
202
|
-
maxLength:
|
|
207
|
+
maxLength: 2048
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const SetOrganizationAliasRequest = {
|
|
211
|
+
alias: {
|
|
212
|
+
maxLength: 32,
|
|
213
|
+
minLength: 2,
|
|
214
|
+
pattern: /^[a-z0-9]+$/
|
|
203
215
|
}
|
|
204
216
|
};
|
|
205
217
|
const UpdateAPIKeyRequest = {
|
|
@@ -266,7 +278,7 @@ const UpdateUserUsernameRequest = {
|
|
|
266
278
|
username: {
|
|
267
279
|
maxLength: 64,
|
|
268
280
|
minLength: 2,
|
|
269
|
-
pattern: /^[a-zA-Z0-9
|
|
281
|
+
pattern: /^[a-zA-Z0-9@._-]+$/
|
|
270
282
|
}
|
|
271
283
|
};
|
|
272
284
|
const ValidateUserMFAOTPRequest = {
|
|
@@ -282,6 +294,7 @@ export {
|
|
|
282
294
|
CreateSSHKeyRequest,
|
|
283
295
|
CreateUserRequestMember,
|
|
284
296
|
GetQuotumRequest,
|
|
297
|
+
JoinUserConnectionRequest,
|
|
285
298
|
ListAPIKeysRequest,
|
|
286
299
|
ListApplicationsRequest,
|
|
287
300
|
ListGroupsRequest,
|
|
@@ -294,6 +307,7 @@ export {
|
|
|
294
307
|
ListSSHKeysRequest,
|
|
295
308
|
ListUsersRequest,
|
|
296
309
|
RuleSpecs,
|
|
310
|
+
SetOrganizationAliasRequest,
|
|
297
311
|
UpdateAPIKeyRequest,
|
|
298
312
|
UpdateApplicationRequest,
|
|
299
313
|
UpdateGroupRequest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-iam",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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.1",
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
33
|
+
"@scaleway/sdk-std": "1.0.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|