@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,799 +0,0 @@
|
|
|
1
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
-
import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, 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, unmarshalJWT } from './marshalling.gen.js';
|
|
5
|
-
|
|
6
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
|
-
const jsonContentHeaders = {
|
|
9
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/** IAM API. */
|
|
13
|
-
class API extends API$1 {
|
|
14
|
-
pageOfListSSHKeys = (() => {
|
|
15
|
-
var _this = this;
|
|
16
|
-
return function (request) {
|
|
17
|
-
if (request === void 0) {
|
|
18
|
-
request = {};
|
|
19
|
-
}
|
|
20
|
-
return _this.client.fetch({
|
|
21
|
-
method: 'GET',
|
|
22
|
-
path: `/iam/v1alpha1/ssh-keys`,
|
|
23
|
-
urlParams: urlParams(['disabled', request.disabled], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
24
|
-
}, unmarshalListSSHKeysResponse);
|
|
25
|
-
};
|
|
26
|
-
})();
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* List SSH keys. List SSH keys. By default, the SSH keys listed are ordered
|
|
30
|
-
* by creation date in ascending order. This can be modified via the
|
|
31
|
-
* `order_by` field. You can define additional parameters for your query such
|
|
32
|
-
* as `organization_id`, `name`, `project_id` and `disabled`.
|
|
33
|
-
*
|
|
34
|
-
* @param request - The request {@link ListSSHKeysRequest}
|
|
35
|
-
* @returns A Promise of ListSSHKeysResponse
|
|
36
|
-
*/
|
|
37
|
-
listSSHKeys = (() => {
|
|
38
|
-
var _this2 = this;
|
|
39
|
-
return function (request) {
|
|
40
|
-
if (request === void 0) {
|
|
41
|
-
request = {};
|
|
42
|
-
}
|
|
43
|
-
return enrichForPagination('sshKeys', _this2.pageOfListSSHKeys, request);
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Create an SSH key. Add a new SSH key to a Scaleway Project. You must
|
|
49
|
-
* specify the `name`, `public_key` and `project_id`.
|
|
50
|
-
*
|
|
51
|
-
* @param request - The request {@link CreateSSHKeyRequest}
|
|
52
|
-
* @returns A Promise of SSHKey
|
|
53
|
-
*/
|
|
54
|
-
createSSHKey = request => this.client.fetch({
|
|
55
|
-
body: JSON.stringify(marshalCreateSSHKeyRequest(request, this.client.settings)),
|
|
56
|
-
headers: jsonContentHeaders,
|
|
57
|
-
method: 'POST',
|
|
58
|
-
path: `/iam/v1alpha1/ssh-keys`
|
|
59
|
-
}, unmarshalSSHKey);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get an SSH key. Retrieve information about a given SSH key, specified by
|
|
63
|
-
* the `ssh_key_id` parameter. The SSH key's full details, including `id`,
|
|
64
|
-
* `name`, `public_key`, and `project_id` are returned in the response.
|
|
65
|
-
*
|
|
66
|
-
* @param request - The request {@link GetSSHKeyRequest}
|
|
67
|
-
* @returns A Promise of SSHKey
|
|
68
|
-
*/
|
|
69
|
-
getSSHKey = request => this.client.fetch({
|
|
70
|
-
method: 'GET',
|
|
71
|
-
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
72
|
-
}, unmarshalSSHKey);
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Update an SSH key. Update the parameters of an SSH key, including `name`
|
|
76
|
-
* and `disable`.
|
|
77
|
-
*
|
|
78
|
-
* @param request - The request {@link UpdateSSHKeyRequest}
|
|
79
|
-
* @returns A Promise of SSHKey
|
|
80
|
-
*/
|
|
81
|
-
updateSSHKey = request => this.client.fetch({
|
|
82
|
-
body: JSON.stringify(marshalUpdateSSHKeyRequest(request, this.client.settings)),
|
|
83
|
-
headers: jsonContentHeaders,
|
|
84
|
-
method: 'PATCH',
|
|
85
|
-
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
86
|
-
}, unmarshalSSHKey);
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Delete an SSH key. Delete a given SSH key, specified by the `ssh_key_id`.
|
|
90
|
-
* Deleting an SSH is permanent, and cannot be undone. Note that you might
|
|
91
|
-
* need to update any configurations that used the SSH key.
|
|
92
|
-
*
|
|
93
|
-
* @param request - The request {@link DeleteSSHKeyRequest}
|
|
94
|
-
*/
|
|
95
|
-
deleteSSHKey = request => this.client.fetch({
|
|
96
|
-
method: 'DELETE',
|
|
97
|
-
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
98
|
-
});
|
|
99
|
-
pageOfListUsers = (() => {
|
|
100
|
-
var _this3 = this;
|
|
101
|
-
return function (request) {
|
|
102
|
-
if (request === void 0) {
|
|
103
|
-
request = {};
|
|
104
|
-
}
|
|
105
|
-
return _this3.client.fetch({
|
|
106
|
-
method: 'GET',
|
|
107
|
-
path: `/iam/v1alpha1/users`,
|
|
108
|
-
urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this3.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
109
|
-
}, unmarshalListUsersResponse);
|
|
110
|
-
};
|
|
111
|
-
})();
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* List users of an Organization. List the users of an Organization. By
|
|
115
|
-
* default, the users listed are ordered by creation date in ascending order.
|
|
116
|
-
* This can be modified via the `order_by` field. You must define the
|
|
117
|
-
* `organization_id` in the query path of your request. You can also define
|
|
118
|
-
* additional parameters for your query such as `user_ids`.
|
|
119
|
-
*
|
|
120
|
-
* @param request - The request {@link ListUsersRequest}
|
|
121
|
-
* @returns A Promise of ListUsersResponse
|
|
122
|
-
*/
|
|
123
|
-
listUsers = (() => {
|
|
124
|
-
var _this4 = this;
|
|
125
|
-
return function (request) {
|
|
126
|
-
if (request === void 0) {
|
|
127
|
-
request = {};
|
|
128
|
-
}
|
|
129
|
-
return enrichForPagination('users', _this4.pageOfListUsers, request);
|
|
130
|
-
};
|
|
131
|
-
})();
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Get a given user. Retrieve information about a user, specified by the
|
|
135
|
-
* `user_id` parameter. The user's full details, including `id`, `email`,
|
|
136
|
-
* `organization_id`, `status` and `mfa` are returned in the response.
|
|
137
|
-
*
|
|
138
|
-
* @param request - The request {@link GetUserRequest}
|
|
139
|
-
* @returns A Promise of User
|
|
140
|
-
*/
|
|
141
|
-
getUser = request => this.client.fetch({
|
|
142
|
-
method: 'GET',
|
|
143
|
-
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
144
|
-
}, unmarshalUser);
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Delete a guest user from an Organization. Remove a user from an
|
|
148
|
-
* Organization in which they are a guest. You must define the `user_id` in
|
|
149
|
-
* your request. Note that removing a user from an Organization automatically
|
|
150
|
-
* deletes their API keys, and any policies directly attached to them become
|
|
151
|
-
* orphaned.
|
|
152
|
-
*
|
|
153
|
-
* @param request - The request {@link DeleteUserRequest}
|
|
154
|
-
*/
|
|
155
|
-
deleteUser = request => this.client.fetch({
|
|
156
|
-
method: 'DELETE',
|
|
157
|
-
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Create a new user. Create a new user. You must define the `organization_id`
|
|
162
|
-
* and the `email` in your request.
|
|
163
|
-
*
|
|
164
|
-
* @param request - The request {@link CreateUserRequest}
|
|
165
|
-
* @returns A Promise of User
|
|
166
|
-
*/
|
|
167
|
-
createUser = request => this.client.fetch({
|
|
168
|
-
body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
|
|
169
|
-
headers: jsonContentHeaders,
|
|
170
|
-
method: 'POST',
|
|
171
|
-
path: `/iam/v1alpha1/users`
|
|
172
|
-
}, unmarshalUser);
|
|
173
|
-
pageOfListApplications = (() => {
|
|
174
|
-
var _this5 = this;
|
|
175
|
-
return function (request) {
|
|
176
|
-
if (request === void 0) {
|
|
177
|
-
request = {};
|
|
178
|
-
}
|
|
179
|
-
return _this5.client.fetch({
|
|
180
|
-
method: 'GET',
|
|
181
|
-
path: `/iam/v1alpha1/applications`,
|
|
182
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this5.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize])
|
|
183
|
-
}, unmarshalListApplicationsResponse);
|
|
184
|
-
};
|
|
185
|
-
})();
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* List applications of an Organization. List the applications of an
|
|
189
|
-
* Organization. By default, the applications listed are ordered by creation
|
|
190
|
-
* date in ascending order. This can be modified via the `order_by` field. You
|
|
191
|
-
* must define the `organization_id` in the query path of your request. You
|
|
192
|
-
* can also define additional parameters for your query such as
|
|
193
|
-
* `application_ids`.
|
|
194
|
-
*
|
|
195
|
-
* @param request - The request {@link ListApplicationsRequest}
|
|
196
|
-
* @returns A Promise of ListApplicationsResponse
|
|
197
|
-
*/
|
|
198
|
-
listApplications = (() => {
|
|
199
|
-
var _this6 = this;
|
|
200
|
-
return function (request) {
|
|
201
|
-
if (request === void 0) {
|
|
202
|
-
request = {};
|
|
203
|
-
}
|
|
204
|
-
return enrichForPagination('applications', _this6.pageOfListApplications, request);
|
|
205
|
-
};
|
|
206
|
-
})();
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Create a new application. Create a new application. You must define the
|
|
210
|
-
* `name` parameter in the request.
|
|
211
|
-
*
|
|
212
|
-
* @param request - The request {@link CreateApplicationRequest}
|
|
213
|
-
* @returns A Promise of Application
|
|
214
|
-
*/
|
|
215
|
-
createApplication = request => this.client.fetch({
|
|
216
|
-
body: JSON.stringify(marshalCreateApplicationRequest(request, this.client.settings)),
|
|
217
|
-
headers: jsonContentHeaders,
|
|
218
|
-
method: 'POST',
|
|
219
|
-
path: `/iam/v1alpha1/applications`
|
|
220
|
-
}, unmarshalApplication);
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Get a given application. Retrieve information about an application,
|
|
224
|
-
* specified by the `application_id` parameter. The application's full
|
|
225
|
-
* details, including `id`, `email`, `organization_id`, `status` and
|
|
226
|
-
* `two_factor_enabled` are returned in the response.
|
|
227
|
-
*
|
|
228
|
-
* @param request - The request {@link GetApplicationRequest}
|
|
229
|
-
* @returns A Promise of Application
|
|
230
|
-
*/
|
|
231
|
-
getApplication = request => this.client.fetch({
|
|
232
|
-
method: 'GET',
|
|
233
|
-
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
234
|
-
}, unmarshalApplication);
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Update an application. Update the parameters of an application, including
|
|
238
|
-
* `name` and `description`.
|
|
239
|
-
*
|
|
240
|
-
* @param request - The request {@link UpdateApplicationRequest}
|
|
241
|
-
* @returns A Promise of Application
|
|
242
|
-
*/
|
|
243
|
-
updateApplication = request => this.client.fetch({
|
|
244
|
-
body: JSON.stringify(marshalUpdateApplicationRequest(request, this.client.settings)),
|
|
245
|
-
headers: jsonContentHeaders,
|
|
246
|
-
method: 'PATCH',
|
|
247
|
-
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
248
|
-
}, unmarshalApplication);
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Delete an application. Delete an application. Note that this action is
|
|
252
|
-
* irreversible and will automatically delete the application's API keys.
|
|
253
|
-
* Policies attached to users and applications via this group will no longer
|
|
254
|
-
* apply.
|
|
255
|
-
*
|
|
256
|
-
* @param request - The request {@link DeleteApplicationRequest}
|
|
257
|
-
*/
|
|
258
|
-
deleteApplication = request => this.client.fetch({
|
|
259
|
-
method: 'DELETE',
|
|
260
|
-
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
261
|
-
});
|
|
262
|
-
pageOfListGroups = (() => {
|
|
263
|
-
var _this7 = this;
|
|
264
|
-
return function (request) {
|
|
265
|
-
if (request === void 0) {
|
|
266
|
-
request = {};
|
|
267
|
-
}
|
|
268
|
-
return _this7.client.fetch({
|
|
269
|
-
method: 'GET',
|
|
270
|
-
path: `/iam/v1alpha1/groups`,
|
|
271
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
272
|
-
}, unmarshalListGroupsResponse);
|
|
273
|
-
};
|
|
274
|
-
})();
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* List groups. List groups. By default, the groups listed are ordered by
|
|
278
|
-
* creation date in ascending order. This can be modified via the `order_by`
|
|
279
|
-
* field. You can define additional parameters to filter your query. Use
|
|
280
|
-
* `user_ids` or `application_ids` to list all groups certain users or
|
|
281
|
-
* applications belong to.
|
|
282
|
-
*
|
|
283
|
-
* @param request - The request {@link ListGroupsRequest}
|
|
284
|
-
* @returns A Promise of ListGroupsResponse
|
|
285
|
-
*/
|
|
286
|
-
listGroups = (() => {
|
|
287
|
-
var _this8 = this;
|
|
288
|
-
return function (request) {
|
|
289
|
-
if (request === void 0) {
|
|
290
|
-
request = {};
|
|
291
|
-
}
|
|
292
|
-
return enrichForPagination('groups', _this8.pageOfListGroups, request);
|
|
293
|
-
};
|
|
294
|
-
})();
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Create a group. Create a new group. You must define the `name` and
|
|
298
|
-
* `organization_id` parameters in the request.
|
|
299
|
-
*
|
|
300
|
-
* @param request - The request {@link CreateGroupRequest}
|
|
301
|
-
* @returns A Promise of Group
|
|
302
|
-
*/
|
|
303
|
-
createGroup = request => this.client.fetch({
|
|
304
|
-
body: JSON.stringify(marshalCreateGroupRequest(request, this.client.settings)),
|
|
305
|
-
headers: jsonContentHeaders,
|
|
306
|
-
method: 'POST',
|
|
307
|
-
path: `/iam/v1alpha1/groups`
|
|
308
|
-
}, unmarshalGroup);
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Get a group. Retrive information about a given group, specified by the
|
|
312
|
-
* `group_id` parameter. The group's full details, including `user_ids` and
|
|
313
|
-
* `application_ids` are returned in the response.
|
|
314
|
-
*
|
|
315
|
-
* @param request - The request {@link GetGroupRequest}
|
|
316
|
-
* @returns A Promise of Group
|
|
317
|
-
*/
|
|
318
|
-
getGroup = request => this.client.fetch({
|
|
319
|
-
method: 'GET',
|
|
320
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
321
|
-
}, unmarshalGroup);
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Update a group. Update the parameters of group, including `name` and
|
|
325
|
-
* `description`.
|
|
326
|
-
*
|
|
327
|
-
* @param request - The request {@link UpdateGroupRequest}
|
|
328
|
-
* @returns A Promise of Group
|
|
329
|
-
*/
|
|
330
|
-
updateGroup = request => this.client.fetch({
|
|
331
|
-
body: JSON.stringify(marshalUpdateGroupRequest(request, this.client.settings)),
|
|
332
|
-
headers: jsonContentHeaders,
|
|
333
|
-
method: 'PATCH',
|
|
334
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
335
|
-
}, unmarshalGroup);
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Overwrite users and applications of a group. Overwrite users and
|
|
339
|
-
* applications configuration in a group. Any information that you add using
|
|
340
|
-
* this command will overwrite the previous configuration.
|
|
341
|
-
*
|
|
342
|
-
* @param request - The request {@link SetGroupMembersRequest}
|
|
343
|
-
* @returns A Promise of Group
|
|
344
|
-
*/
|
|
345
|
-
setGroupMembers = request => this.client.fetch({
|
|
346
|
-
body: JSON.stringify(marshalSetGroupMembersRequest(request, this.client.settings)),
|
|
347
|
-
headers: jsonContentHeaders,
|
|
348
|
-
method: 'PUT',
|
|
349
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
350
|
-
}, unmarshalGroup);
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Add a user or an application to a group. Add a user or an application to a
|
|
354
|
-
* group. You can specify a `user_id` and and `application_id` in the body of
|
|
355
|
-
* your request. Note that you can only add one of each per request.
|
|
356
|
-
*
|
|
357
|
-
* @param request - The request {@link AddGroupMemberRequest}
|
|
358
|
-
* @returns A Promise of Group
|
|
359
|
-
*/
|
|
360
|
-
addGroupMember = request => this.client.fetch({
|
|
361
|
-
body: JSON.stringify(marshalAddGroupMemberRequest(request, this.client.settings)),
|
|
362
|
-
headers: jsonContentHeaders,
|
|
363
|
-
method: 'POST',
|
|
364
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-member`
|
|
365
|
-
}, unmarshalGroup);
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Add multiple users and applications to a group. Add multiple users and
|
|
369
|
-
* applications to a group in a single call. You can specify an array of
|
|
370
|
-
* `user_id`s and `application_id`s. Note that any existing users and
|
|
371
|
-
* applications in the group will remain. To add new users/applications and
|
|
372
|
-
* delete pre-existing ones, use the [Overwrite users and applications of a
|
|
373
|
-
* group](#path-groups-overwrite-users-and-applications-of-a-group) method.
|
|
374
|
-
*
|
|
375
|
-
* @param request - The request {@link AddGroupMembersRequest}
|
|
376
|
-
* @returns A Promise of Group
|
|
377
|
-
*/
|
|
378
|
-
addGroupMembers = request => this.client.fetch({
|
|
379
|
-
body: JSON.stringify(marshalAddGroupMembersRequest(request, this.client.settings)),
|
|
380
|
-
headers: jsonContentHeaders,
|
|
381
|
-
method: 'POST',
|
|
382
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-members`
|
|
383
|
-
}, unmarshalGroup);
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Remove a user or an application from a group. Remove a user or an
|
|
387
|
-
* application from a group. You can specify a `user_id` and and
|
|
388
|
-
* `application_id` in the body of your request. Note that you can only remove
|
|
389
|
-
* one of each per request. Removing a user from a group means that any
|
|
390
|
-
* permissions given to them via the group (i.e. from an attached policy) will
|
|
391
|
-
* no longer apply. Be sure you want to remove these permissions from the user
|
|
392
|
-
* before proceeding.
|
|
393
|
-
*
|
|
394
|
-
* @param request - The request {@link RemoveGroupMemberRequest}
|
|
395
|
-
* @returns A Promise of Group
|
|
396
|
-
*/
|
|
397
|
-
removeGroupMember = request => this.client.fetch({
|
|
398
|
-
body: JSON.stringify(marshalRemoveGroupMemberRequest(request, this.client.settings)),
|
|
399
|
-
headers: jsonContentHeaders,
|
|
400
|
-
method: 'POST',
|
|
401
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/remove-member`
|
|
402
|
-
}, unmarshalGroup);
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Delete a group. Delete a group. Note that this action is irreversible and
|
|
406
|
-
* could delete permissions for group members. Policies attached to users and
|
|
407
|
-
* applications via this group will no longer apply.
|
|
408
|
-
*
|
|
409
|
-
* @param request - The request {@link DeleteGroupRequest}
|
|
410
|
-
*/
|
|
411
|
-
deleteGroup = request => this.client.fetch({
|
|
412
|
-
method: 'DELETE',
|
|
413
|
-
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
414
|
-
});
|
|
415
|
-
pageOfListPolicies = (() => {
|
|
416
|
-
var _this9 = this;
|
|
417
|
-
return function (request) {
|
|
418
|
-
if (request === void 0) {
|
|
419
|
-
request = {};
|
|
420
|
-
}
|
|
421
|
-
return _this9.client.fetch({
|
|
422
|
-
method: 'GET',
|
|
423
|
-
path: `/iam/v1alpha1/policies`,
|
|
424
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['group_ids', request.groupIds], ['no_principal', request.noPrincipal], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this9.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['policy_name', request.policyName], ['user_ids', request.userIds])
|
|
425
|
-
}, unmarshalListPoliciesResponse);
|
|
426
|
-
};
|
|
427
|
-
})();
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* List policies of an Organization. List the policies of an Organization. By
|
|
431
|
-
* default, the policies listed are ordered by creation date in ascending
|
|
432
|
-
* order. This can be modified via the `order_by` field. You must define the
|
|
433
|
-
* `organization_id` in the query path of your request. You can also define
|
|
434
|
-
* additional parameters to filter your query, such as `user_ids`,
|
|
435
|
-
* `groups_ids`, `application_ids`, and `policy_name`.
|
|
436
|
-
*
|
|
437
|
-
* @param request - The request {@link ListPoliciesRequest}
|
|
438
|
-
* @returns A Promise of ListPoliciesResponse
|
|
439
|
-
*/
|
|
440
|
-
listPolicies = (() => {
|
|
441
|
-
var _this10 = this;
|
|
442
|
-
return function (request) {
|
|
443
|
-
if (request === void 0) {
|
|
444
|
-
request = {};
|
|
445
|
-
}
|
|
446
|
-
return enrichForPagination('policies', _this10.pageOfListPolicies, request);
|
|
447
|
-
};
|
|
448
|
-
})();
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Create a new policy. Create a new application. You must define the `name`
|
|
452
|
-
* parameter in the request. You can specify parameters such as `user_id`,
|
|
453
|
-
* `groups_id`, `application_id`, `no_principal`, `rules` and its child
|
|
454
|
-
* attributes.
|
|
455
|
-
*
|
|
456
|
-
* @param request - The request {@link CreatePolicyRequest}
|
|
457
|
-
* @returns A Promise of Policy
|
|
458
|
-
*/
|
|
459
|
-
createPolicy = request => this.client.fetch({
|
|
460
|
-
body: JSON.stringify(marshalCreatePolicyRequest(request, this.client.settings)),
|
|
461
|
-
headers: jsonContentHeaders,
|
|
462
|
-
method: 'POST',
|
|
463
|
-
path: `/iam/v1alpha1/policies`
|
|
464
|
-
}, unmarshalPolicy);
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Get an existing policy. Retrieve information about a policy, speficified by
|
|
468
|
-
* the `policy_id` parameter. The policy's full details, including `id`,
|
|
469
|
-
* `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets`
|
|
470
|
-
* are returned in the response.
|
|
471
|
-
*
|
|
472
|
-
* @param request - The request {@link GetPolicyRequest}
|
|
473
|
-
* @returns A Promise of Policy
|
|
474
|
-
*/
|
|
475
|
-
getPolicy = request => this.client.fetch({
|
|
476
|
-
method: 'GET',
|
|
477
|
-
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
478
|
-
}, unmarshalPolicy);
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Update an existing policy. Update the parameters of a policy, including
|
|
482
|
-
* `name`, `description`, `user_id`, `group_id`, `application_id` and
|
|
483
|
-
* `no_principal`.
|
|
484
|
-
*
|
|
485
|
-
* @param request - The request {@link UpdatePolicyRequest}
|
|
486
|
-
* @returns A Promise of Policy
|
|
487
|
-
*/
|
|
488
|
-
updatePolicy = request => this.client.fetch({
|
|
489
|
-
body: JSON.stringify(marshalUpdatePolicyRequest(request, this.client.settings)),
|
|
490
|
-
headers: jsonContentHeaders,
|
|
491
|
-
method: 'PATCH',
|
|
492
|
-
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
493
|
-
}, unmarshalPolicy);
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Delete a policy. Delete a policy. You must define specify the `policy_id`
|
|
497
|
-
* parameter in your request. Note that when deleting a policy, all
|
|
498
|
-
* permissions it gives to its principal (user, group or application) will be
|
|
499
|
-
* revoked.
|
|
500
|
-
*
|
|
501
|
-
* @param request - The request {@link DeletePolicyRequest}
|
|
502
|
-
*/
|
|
503
|
-
deletePolicy = request => this.client.fetch({
|
|
504
|
-
method: 'DELETE',
|
|
505
|
-
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Clone a policy. Clone a policy. You must define specify the `policy_id`
|
|
510
|
-
* parameter in your request.
|
|
511
|
-
*
|
|
512
|
-
* @param request - The request {@link ClonePolicyRequest}
|
|
513
|
-
* @returns A Promise of Policy
|
|
514
|
-
*/
|
|
515
|
-
clonePolicy = request => this.client.fetch({
|
|
516
|
-
body: '{}',
|
|
517
|
-
headers: jsonContentHeaders,
|
|
518
|
-
method: 'POST',
|
|
519
|
-
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}/clone`
|
|
520
|
-
}, unmarshalPolicy);
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Set rules of a given policy. Overwrite the rules of a given policy. Any
|
|
524
|
-
* information that you add using this command will overwrite the previous
|
|
525
|
-
* configuration. If you include some of the rules you already had in your
|
|
526
|
-
* previous configuration in your new one, but you change their order, the new
|
|
527
|
-
* order of display will apply. While policy rules are ordered, they have no
|
|
528
|
-
* impact on the access logic of IAM because rules are allow-only.
|
|
529
|
-
*
|
|
530
|
-
* @param request - The request {@link SetRulesRequest}
|
|
531
|
-
* @returns A Promise of SetRulesResponse
|
|
532
|
-
*/
|
|
533
|
-
setRules = request => this.client.fetch({
|
|
534
|
-
body: JSON.stringify(marshalSetRulesRequest(request, this.client.settings)),
|
|
535
|
-
headers: jsonContentHeaders,
|
|
536
|
-
method: 'PUT',
|
|
537
|
-
path: `/iam/v1alpha1/rules`
|
|
538
|
-
}, unmarshalSetRulesResponse);
|
|
539
|
-
pageOfListRules = (() => {
|
|
540
|
-
var _this11 = this;
|
|
541
|
-
return function (request) {
|
|
542
|
-
if (request === void 0) {
|
|
543
|
-
request = {};
|
|
544
|
-
}
|
|
545
|
-
return _this11.client.fetch({
|
|
546
|
-
method: 'GET',
|
|
547
|
-
path: `/iam/v1alpha1/rules`,
|
|
548
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['policy_id', request.policyId])
|
|
549
|
-
}, unmarshalListRulesResponse);
|
|
550
|
-
};
|
|
551
|
-
})();
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* List rules of a given policy. List the rules of a given policy. By default,
|
|
555
|
-
* the rules listed are ordered by creation date in ascending order. This can
|
|
556
|
-
* be modified via the `order_by` field. You must define the `policy_id` in
|
|
557
|
-
* the query path of your request.
|
|
558
|
-
*
|
|
559
|
-
* @param request - The request {@link ListRulesRequest}
|
|
560
|
-
* @returns A Promise of ListRulesResponse
|
|
561
|
-
*/
|
|
562
|
-
listRules = (() => {
|
|
563
|
-
var _this12 = this;
|
|
564
|
-
return function (request) {
|
|
565
|
-
if (request === void 0) {
|
|
566
|
-
request = {};
|
|
567
|
-
}
|
|
568
|
-
return enrichForPagination('rules', _this12.pageOfListRules, request);
|
|
569
|
-
};
|
|
570
|
-
})();
|
|
571
|
-
pageOfListPermissionSets = (() => {
|
|
572
|
-
var _this13 = this;
|
|
573
|
-
return function (request) {
|
|
574
|
-
if (request === void 0) {
|
|
575
|
-
request = {};
|
|
576
|
-
}
|
|
577
|
-
return _this13.client.fetch({
|
|
578
|
-
method: 'GET',
|
|
579
|
-
path: `/iam/v1alpha1/permission-sets`,
|
|
580
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this13.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize])
|
|
581
|
-
}, unmarshalListPermissionSetsResponse);
|
|
582
|
-
};
|
|
583
|
-
})();
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* List permission sets. List permission sets available for given
|
|
587
|
-
* Organization. You must define the `organization_id` in the query path of
|
|
588
|
-
* your request.
|
|
589
|
-
*
|
|
590
|
-
* @param request - The request {@link ListPermissionSetsRequest}
|
|
591
|
-
* @returns A Promise of ListPermissionSetsResponse
|
|
592
|
-
*/
|
|
593
|
-
listPermissionSets = (() => {
|
|
594
|
-
var _this14 = this;
|
|
595
|
-
return function (request) {
|
|
596
|
-
if (request === void 0) {
|
|
597
|
-
request = {};
|
|
598
|
-
}
|
|
599
|
-
return enrichForPagination('permissionSets', _this14.pageOfListPermissionSets, request);
|
|
600
|
-
};
|
|
601
|
-
})();
|
|
602
|
-
pageOfListAPIKeys = (() => {
|
|
603
|
-
var _this15 = this;
|
|
604
|
-
return function (request) {
|
|
605
|
-
if (request === void 0) {
|
|
606
|
-
request = {};
|
|
607
|
-
}
|
|
608
|
-
return _this15.client.fetch({
|
|
609
|
-
method: 'GET',
|
|
610
|
-
path: `/iam/v1alpha1/api-keys`,
|
|
611
|
-
urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this15.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
612
|
-
param: 'application_id',
|
|
613
|
-
value: request.applicationId
|
|
614
|
-
}, {
|
|
615
|
-
param: 'user_id',
|
|
616
|
-
value: request.userId
|
|
617
|
-
}])))
|
|
618
|
-
}, unmarshalListAPIKeysResponse);
|
|
619
|
-
};
|
|
620
|
-
})();
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* List API keys. List API keys. By default, the API keys listed are ordered
|
|
624
|
-
* by creation date in ascending order. This can be modified via the
|
|
625
|
-
* `order_by` field. You can define additional parameters for your query such
|
|
626
|
-
* as `editable`, `expired`, `access_key` and `bearer_id`.
|
|
627
|
-
*
|
|
628
|
-
* @param request - The request {@link ListAPIKeysRequest}
|
|
629
|
-
* @returns A Promise of ListAPIKeysResponse
|
|
630
|
-
*/
|
|
631
|
-
listAPIKeys = (() => {
|
|
632
|
-
var _this16 = this;
|
|
633
|
-
return function (request) {
|
|
634
|
-
if (request === void 0) {
|
|
635
|
-
request = {};
|
|
636
|
-
}
|
|
637
|
-
return enrichForPagination('apiKeys', _this16.pageOfListAPIKeys, request);
|
|
638
|
-
};
|
|
639
|
-
})();
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* Create an API key. Create an API key. You must specify the `application_id`
|
|
643
|
-
* or the `user_id` and the description. You can also specify the
|
|
644
|
-
* `default_project_id` which is the Project ID of your preferred Project, to
|
|
645
|
-
* use with Object Storage. The `access_key` and `secret_key` values are
|
|
646
|
-
* returned in the response. Note that he secret key is only showed once. Make
|
|
647
|
-
* sure that you copy and store both keys somewhere safe.
|
|
648
|
-
*
|
|
649
|
-
* @param request - The request {@link CreateAPIKeyRequest}
|
|
650
|
-
* @returns A Promise of APIKey
|
|
651
|
-
*/
|
|
652
|
-
createAPIKey = request => this.client.fetch({
|
|
653
|
-
body: JSON.stringify(marshalCreateAPIKeyRequest(request, this.client.settings)),
|
|
654
|
-
headers: jsonContentHeaders,
|
|
655
|
-
method: 'POST',
|
|
656
|
-
path: `/iam/v1alpha1/api-keys`
|
|
657
|
-
}, unmarshalAPIKey);
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Get an API key. Retrive information about an API key, specified by the
|
|
661
|
-
* `access_key` parameter. The API key's details, including either the
|
|
662
|
-
* `user_id` or `application_id` of its bearer are returned in the response.
|
|
663
|
-
* Note that the string value for the `secret_key` is nullable, and therefore
|
|
664
|
-
* is not displayed in the response. The `secret_key` value is only displayed
|
|
665
|
-
* upon API key creation.
|
|
666
|
-
*
|
|
667
|
-
* @param request - The request {@link GetAPIKeyRequest}
|
|
668
|
-
* @returns A Promise of APIKey
|
|
669
|
-
*/
|
|
670
|
-
getAPIKey = request => this.client.fetch({
|
|
671
|
-
method: 'GET',
|
|
672
|
-
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
673
|
-
}, unmarshalAPIKey);
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Update an API key. Update the parameters of an API key, including
|
|
677
|
-
* `default_project_id` and `description`.
|
|
678
|
-
*
|
|
679
|
-
* @param request - The request {@link UpdateAPIKeyRequest}
|
|
680
|
-
* @returns A Promise of APIKey
|
|
681
|
-
*/
|
|
682
|
-
updateAPIKey = request => this.client.fetch({
|
|
683
|
-
body: JSON.stringify(marshalUpdateAPIKeyRequest(request, this.client.settings)),
|
|
684
|
-
headers: jsonContentHeaders,
|
|
685
|
-
method: 'PATCH',
|
|
686
|
-
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
687
|
-
}, unmarshalAPIKey);
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Delete an API key. Delete an API key. Note that this action is irreversible
|
|
691
|
-
* and cannot be undone. Make sure you update any configurations using the API
|
|
692
|
-
* keys you delete.
|
|
693
|
-
*
|
|
694
|
-
* @param request - The request {@link DeleteAPIKeyRequest}
|
|
695
|
-
*/
|
|
696
|
-
deleteAPIKey = request => this.client.fetch({
|
|
697
|
-
method: 'DELETE',
|
|
698
|
-
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
699
|
-
});
|
|
700
|
-
pageOfListQuota = (() => {
|
|
701
|
-
var _this17 = this;
|
|
702
|
-
return function (request) {
|
|
703
|
-
if (request === void 0) {
|
|
704
|
-
request = {};
|
|
705
|
-
}
|
|
706
|
-
return _this17.client.fetch({
|
|
707
|
-
method: 'GET',
|
|
708
|
-
path: `/iam/v1alpha1/quota`,
|
|
709
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this17.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
|
|
710
|
-
}, unmarshalListQuotaResponse);
|
|
711
|
-
};
|
|
712
|
-
})();
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* List all quotas in the Organization. List all product and features quota
|
|
716
|
-
* for an Organization, with their associated limits. By default, the quota
|
|
717
|
-
* listed are ordered by creation date in ascending order. This can be
|
|
718
|
-
* modified via the `order_by` field. You must define the `organization_id` in
|
|
719
|
-
* the query path of your request.
|
|
720
|
-
*
|
|
721
|
-
* @param request - The request {@link ListQuotaRequest}
|
|
722
|
-
* @returns A Promise of ListQuotaResponse
|
|
723
|
-
*/
|
|
724
|
-
listQuota = (() => {
|
|
725
|
-
var _this18 = this;
|
|
726
|
-
return function (request) {
|
|
727
|
-
if (request === void 0) {
|
|
728
|
-
request = {};
|
|
729
|
-
}
|
|
730
|
-
return enrichForPagination('quota', _this18.pageOfListQuota, request);
|
|
731
|
-
};
|
|
732
|
-
})();
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Get a quota in the Organization. Retrieve information about a resource
|
|
736
|
-
* quota, speficified by the `quotum_name` parameter. The quota's `limit`, or
|
|
737
|
-
* whether it is unlimited, is returned in the response.
|
|
738
|
-
*
|
|
739
|
-
* @param request - The request {@link GetQuotumRequest}
|
|
740
|
-
* @returns A Promise of Quotum
|
|
741
|
-
*/
|
|
742
|
-
getQuotum = request => this.client.fetch({
|
|
743
|
-
method: 'GET',
|
|
744
|
-
path: `/iam/v1alpha1/quota/${validatePathParam('quotumName', request.quotumName)}`,
|
|
745
|
-
urlParams: urlParams(['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId])
|
|
746
|
-
}, unmarshalQuotum);
|
|
747
|
-
pageOfListJWTs = (() => {
|
|
748
|
-
var _this19 = this;
|
|
749
|
-
return function (request) {
|
|
750
|
-
if (request === void 0) {
|
|
751
|
-
request = {};
|
|
752
|
-
}
|
|
753
|
-
return _this19.client.fetch({
|
|
754
|
-
method: 'GET',
|
|
755
|
-
path: `/iam/v1alpha1/jwts`,
|
|
756
|
-
urlParams: urlParams(['audience_id', request.audienceId], ['expired', request.expired], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
|
|
757
|
-
}, unmarshalListJWTsResponse);
|
|
758
|
-
};
|
|
759
|
-
})();
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* List JWTs.
|
|
763
|
-
*
|
|
764
|
-
* @param request - The request {@link ListJWTsRequest}
|
|
765
|
-
* @returns A Promise of ListJWTsResponse
|
|
766
|
-
*/
|
|
767
|
-
listJWTs = (() => {
|
|
768
|
-
var _this20 = this;
|
|
769
|
-
return function (request) {
|
|
770
|
-
if (request === void 0) {
|
|
771
|
-
request = {};
|
|
772
|
-
}
|
|
773
|
-
return enrichForPagination('jwts', _this20.pageOfListJWTs, request);
|
|
774
|
-
};
|
|
775
|
-
})();
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Get a JWT.
|
|
779
|
-
*
|
|
780
|
-
* @param request - The request {@link GetJWTRequest}
|
|
781
|
-
* @returns A Promise of JWT
|
|
782
|
-
*/
|
|
783
|
-
getJWT = request => this.client.fetch({
|
|
784
|
-
method: 'GET',
|
|
785
|
-
path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
|
|
786
|
-
}, unmarshalJWT);
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* Delete a JWT.
|
|
790
|
-
*
|
|
791
|
-
* @param request - The request {@link DeleteJWTRequest}
|
|
792
|
-
*/
|
|
793
|
-
deleteJWT = request => this.client.fetch({
|
|
794
|
-
method: 'DELETE',
|
|
795
|
-
path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
export { API };
|