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