@scaleway/sdk 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/iam/v1alpha1/api.gen.js +18 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +5 -1
- package/dist/api/k8s/v1/marshalling.gen.js +3 -2
- package/dist/api/tem/v1alpha1/api.gen.js +10 -2
- package/dist/api/tem/v1alpha1/marshalling.gen.js +1 -0
- package/dist/index.cjs +42 -10
- package/dist/index.d.ts +75 -22
- package/dist/scw/client-ini-profile.js +3 -3
- package/dist/scw/client.js +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ This SDK enables you to interact with Scaleway APIs.
|
|
|
9
9
|
|
|
10
10
|
## Getting Started
|
|
11
11
|
|
|
12
|
-
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/
|
|
12
|
+
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) on how to retrieve them.
|
|
13
13
|
|
|
14
14
|
**A minimal setup** would look like this:
|
|
15
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT } from './marshalling.gen.js';
|
|
4
|
+
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, 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
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -310,6 +310,23 @@ class API extends API$1 {
|
|
|
310
310
|
method: 'POST',
|
|
311
311
|
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-member`
|
|
312
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);
|
|
313
330
|
/**
|
|
314
331
|
* Remove a user or an application from a group. Remove a user or an
|
|
315
332
|
* application from a group. You can specify a `user_id` and and
|
|
@@ -275,6 +275,10 @@ const marshalAddGroupMemberRequest = (request, defaults) => ({
|
|
|
275
275
|
value: request.applicationId
|
|
276
276
|
}])
|
|
277
277
|
});
|
|
278
|
+
const marshalAddGroupMembersRequest = (request, defaults) => ({
|
|
279
|
+
application_ids: request.applicationIds,
|
|
280
|
+
user_ids: request.userIds
|
|
281
|
+
});
|
|
278
282
|
const marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
279
283
|
default_project_id: request.defaultProjectId,
|
|
280
284
|
description: request.description,
|
|
@@ -372,4 +376,4 @@ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
|
372
376
|
name: request.name
|
|
373
377
|
});
|
|
374
378
|
|
|
375
|
-
export { marshalAddGroupMemberRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
|
|
379
|
+
export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
|
|
@@ -166,11 +166,12 @@ const unmarshalExternalNode = data => {
|
|
|
166
166
|
return {
|
|
167
167
|
clusterCa: data.cluster_ca,
|
|
168
168
|
clusterUrl: data.cluster_url,
|
|
169
|
-
|
|
169
|
+
externalIp: data.external_ip,
|
|
170
170
|
id: data.id,
|
|
171
171
|
kubeletConfig: data.kubelet_config,
|
|
172
172
|
kubeToken: data.kube_token,
|
|
173
|
-
name: data.name
|
|
173
|
+
name: data.name,
|
|
174
|
+
poolVersion: data.pool_version
|
|
174
175
|
};
|
|
175
176
|
};
|
|
176
177
|
const unmarshalListClusterAvailableVersionsResponse = data => {
|
|
@@ -58,12 +58,20 @@ class API extends API$1 {
|
|
|
58
58
|
return _this.client.fetch({
|
|
59
59
|
method: 'GET',
|
|
60
60
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/emails`,
|
|
61
|
-
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_to', request.mailTo], ['message_id', request.messageId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
61
|
+
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
62
62
|
}, unmarshalListEmailsResponse);
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
65
|
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
66
|
-
* a specific Project or Organization. You must specify the `region`.
|
|
66
|
+
* a specific Project or Organization. You must specify the `region`. You can
|
|
67
|
+
* filter your emails in ascending or descending order using:
|
|
68
|
+
*
|
|
69
|
+
* - Created_at
|
|
70
|
+
* - Updated_at
|
|
71
|
+
* - Status
|
|
72
|
+
* - Mail_from
|
|
73
|
+
* - Mail_rcpt
|
|
74
|
+
* - Subject
|
|
67
75
|
*
|
|
68
76
|
* @param request - The request {@link ListEmailsRequest}
|
|
69
77
|
* @returns A Promise of ListEmailsResponse
|
|
@@ -55,6 +55,7 @@ const unmarshalEmail = data => {
|
|
|
55
55
|
id: data.id,
|
|
56
56
|
lastTries: unmarshalArrayOfObject(data.last_tries, unmarshalEmailTry),
|
|
57
57
|
mailFrom: data.mail_from,
|
|
58
|
+
mailRcpt: data.mail_rcpt,
|
|
58
59
|
messageId: data.message_id,
|
|
59
60
|
projectId: data.project_id,
|
|
60
61
|
rcptTo: data.rcpt_to,
|
package/dist/index.cjs
CHANGED
|
@@ -179,13 +179,13 @@ const hasAuthenticationSecrets = obj => typeof obj.accessKey === 'string' && obj
|
|
|
179
179
|
*/
|
|
180
180
|
function assertValidAuthenticationSecrets(obj) {
|
|
181
181
|
if (!(obj.accessKey && obj.secretKey)) {
|
|
182
|
-
throw new Error(`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/
|
|
182
|
+
throw new Error(`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
183
183
|
}
|
|
184
184
|
if (!isAccessKey(obj.accessKey)) {
|
|
185
|
-
throw new Error(`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/
|
|
185
|
+
throw new Error(`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
186
186
|
}
|
|
187
187
|
if (!isSecretKey(obj.secretKey)) {
|
|
188
|
-
throw new Error(`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/
|
|
188
|
+
throw new Error(`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v1.
|
|
500
|
+
const version = 'v1.11.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -1544,7 +1544,7 @@ const createAdvancedClient = (...configs) => {
|
|
|
1544
1544
|
* Creates a Scaleway client with a profile.
|
|
1545
1545
|
*
|
|
1546
1546
|
* @example
|
|
1547
|
-
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/
|
|
1547
|
+
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/):
|
|
1548
1548
|
* ```
|
|
1549
1549
|
* import { createClient } from '@scaleway/sdk'
|
|
1550
1550
|
*
|
|
@@ -1558,7 +1558,7 @@ const createAdvancedClient = (...configs) => {
|
|
|
1558
1558
|
* ```
|
|
1559
1559
|
*
|
|
1560
1560
|
* @example
|
|
1561
|
-
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/
|
|
1561
|
+
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
|
|
1562
1562
|
* or the config file created by CLI `scw init` (see https://www.scaleway.com/en/cli/):
|
|
1563
1563
|
* ```
|
|
1564
1564
|
* import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
|
|
@@ -8214,6 +8214,10 @@ const marshalAddGroupMemberRequest = (request, defaults) => ({
|
|
|
8214
8214
|
value: request.applicationId
|
|
8215
8215
|
}])
|
|
8216
8216
|
});
|
|
8217
|
+
const marshalAddGroupMembersRequest = (request, defaults) => ({
|
|
8218
|
+
application_ids: request.applicationIds,
|
|
8219
|
+
user_ids: request.userIds
|
|
8220
|
+
});
|
|
8217
8221
|
const marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
8218
8222
|
default_project_id: request.defaultProjectId,
|
|
8219
8223
|
description: request.description,
|
|
@@ -8594,6 +8598,24 @@ let API$g = class API extends API$q {
|
|
|
8594
8598
|
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-member`
|
|
8595
8599
|
}, unmarshalGroup);
|
|
8596
8600
|
|
|
8601
|
+
/**
|
|
8602
|
+
* Add multiple users and applications to a group. Add multiple users and
|
|
8603
|
+
* applications to a group in a single call. You can specify an array of
|
|
8604
|
+
* `user_id`s and `application_id`s. Note that any existing users and
|
|
8605
|
+
* applications in the group will remain. To add new users/applications and
|
|
8606
|
+
* delete pre-existing ones, use the [Overwrite users and applications of a
|
|
8607
|
+
* group](#path-groups-overwrite-users-and-applications-of-a-group) method.
|
|
8608
|
+
*
|
|
8609
|
+
* @param request - The request {@link AddGroupMembersRequest}
|
|
8610
|
+
* @returns A Promise of Group
|
|
8611
|
+
*/
|
|
8612
|
+
addGroupMembers = request => this.client.fetch({
|
|
8613
|
+
body: JSON.stringify(marshalAddGroupMembersRequest(request, this.client.settings)),
|
|
8614
|
+
headers: jsonContentHeaders$e,
|
|
8615
|
+
method: 'POST',
|
|
8616
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-members`
|
|
8617
|
+
}, unmarshalGroup);
|
|
8618
|
+
|
|
8597
8619
|
/**
|
|
8598
8620
|
* Remove a user or an application from a group. Remove a user or an
|
|
8599
8621
|
* application from a group. You can specify a `user_id` and and
|
|
@@ -12836,11 +12858,12 @@ const unmarshalExternalNode = data => {
|
|
|
12836
12858
|
return {
|
|
12837
12859
|
clusterCa: data.cluster_ca,
|
|
12838
12860
|
clusterUrl: data.cluster_url,
|
|
12839
|
-
|
|
12861
|
+
externalIp: data.external_ip,
|
|
12840
12862
|
id: data.id,
|
|
12841
12863
|
kubeletConfig: data.kubelet_config,
|
|
12842
12864
|
kubeToken: data.kube_token,
|
|
12843
|
-
name: data.name
|
|
12865
|
+
name: data.name,
|
|
12866
|
+
poolVersion: data.pool_version
|
|
12844
12867
|
};
|
|
12845
12868
|
};
|
|
12846
12869
|
const unmarshalListClusterAvailableVersionsResponse = data => {
|
|
@@ -20084,6 +20107,7 @@ const unmarshalEmail = data => {
|
|
|
20084
20107
|
id: data.id,
|
|
20085
20108
|
lastTries: unmarshalArrayOfObject(data.last_tries, unmarshalEmailTry),
|
|
20086
20109
|
mailFrom: data.mail_from,
|
|
20110
|
+
mailRcpt: data.mail_rcpt,
|
|
20087
20111
|
messageId: data.message_id,
|
|
20088
20112
|
projectId: data.project_id,
|
|
20089
20113
|
rcptTo: data.rcpt_to,
|
|
@@ -20211,12 +20235,20 @@ let API$3 = class API extends API$q {
|
|
|
20211
20235
|
pageOfListEmails = (request = {}) => this.client.fetch({
|
|
20212
20236
|
method: 'GET',
|
|
20213
20237
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/emails`,
|
|
20214
|
-
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_to', request.mailTo], ['message_id', request.messageId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
20238
|
+
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
20215
20239
|
}, unmarshalListEmailsResponse);
|
|
20216
20240
|
|
|
20217
20241
|
/**
|
|
20218
20242
|
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
20219
|
-
* a specific Project or Organization. You must specify the `region`.
|
|
20243
|
+
* a specific Project or Organization. You must specify the `region`. You can
|
|
20244
|
+
* filter your emails in ascending or descending order using:
|
|
20245
|
+
*
|
|
20246
|
+
* - Created_at
|
|
20247
|
+
* - Updated_at
|
|
20248
|
+
* - Status
|
|
20249
|
+
* - Mail_from
|
|
20250
|
+
* - Mail_rcpt
|
|
20251
|
+
* - Subject
|
|
20220
20252
|
*
|
|
20221
20253
|
* @param request - The request {@link ListEmailsRequest}
|
|
20222
20254
|
* @returns A Promise of ListEmailsResponse
|
package/dist/index.d.ts
CHANGED
|
@@ -460,7 +460,7 @@ declare const createAdvancedClient: (...configs: ClientConfig[]) => Client;
|
|
|
460
460
|
* Creates a Scaleway client with a profile.
|
|
461
461
|
*
|
|
462
462
|
* @example
|
|
463
|
-
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/
|
|
463
|
+
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/):
|
|
464
464
|
* ```
|
|
465
465
|
* import { createClient } from '@scaleway/sdk'
|
|
466
466
|
*
|
|
@@ -474,7 +474,7 @@ declare const createAdvancedClient: (...configs: ClientConfig[]) => Client;
|
|
|
474
474
|
* ```
|
|
475
475
|
*
|
|
476
476
|
* @example
|
|
477
|
-
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/
|
|
477
|
+
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
|
|
478
478
|
* or the config file created by CLI `scw init` (see https://www.scaleway.com/en/cli/):
|
|
479
479
|
* ```
|
|
480
480
|
* import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
|
|
@@ -8617,6 +8617,14 @@ type AddGroupMemberRequest = {
|
|
|
8617
8617
|
*/
|
|
8618
8618
|
applicationId?: string;
|
|
8619
8619
|
};
|
|
8620
|
+
type AddGroupMembersRequest = {
|
|
8621
|
+
/** ID of the group. */
|
|
8622
|
+
groupId: string;
|
|
8623
|
+
/** IDs of the users to add. */
|
|
8624
|
+
userIds?: string[];
|
|
8625
|
+
/** IDs of the applications to add. */
|
|
8626
|
+
applicationIds?: string[];
|
|
8627
|
+
};
|
|
8620
8628
|
type RemoveGroupMemberRequest = {
|
|
8621
8629
|
/** ID of the group. */
|
|
8622
8630
|
groupId: string;
|
|
@@ -9067,6 +9075,18 @@ declare class API$g extends API$q {
|
|
|
9067
9075
|
* @returns A Promise of Group
|
|
9068
9076
|
*/
|
|
9069
9077
|
addGroupMember: (request: Readonly<AddGroupMemberRequest>) => Promise<Group>;
|
|
9078
|
+
/**
|
|
9079
|
+
* Add multiple users and applications to a group. Add multiple users and
|
|
9080
|
+
* applications to a group in a single call. You can specify an array of
|
|
9081
|
+
* `user_id`s and `application_id`s. Note that any existing users and
|
|
9082
|
+
* applications in the group will remain. To add new users/applications and
|
|
9083
|
+
* delete pre-existing ones, use the [Overwrite users and applications of a
|
|
9084
|
+
* group](#path-groups-overwrite-users-and-applications-of-a-group) method.
|
|
9085
|
+
*
|
|
9086
|
+
* @param request - The request {@link AddGroupMembersRequest}
|
|
9087
|
+
* @returns A Promise of Group
|
|
9088
|
+
*/
|
|
9089
|
+
addGroupMembers: (request: Readonly<AddGroupMembersRequest>) => Promise<Group>;
|
|
9070
9090
|
/**
|
|
9071
9091
|
* Remove a user or an application from a group. Remove a user or an
|
|
9072
9092
|
* application from a group. You can specify a `user_id` and and
|
|
@@ -9544,6 +9564,7 @@ declare namespace validationRules_gen$2 {
|
|
|
9544
9564
|
|
|
9545
9565
|
type index_gen$d_APIKey = APIKey;
|
|
9546
9566
|
type index_gen$d_AddGroupMemberRequest = AddGroupMemberRequest;
|
|
9567
|
+
type index_gen$d_AddGroupMembersRequest = AddGroupMembersRequest;
|
|
9547
9568
|
type index_gen$d_Application = Application;
|
|
9548
9569
|
type index_gen$d_BearerType = BearerType;
|
|
9549
9570
|
type index_gen$d_ClonePolicyRequest = ClonePolicyRequest;
|
|
@@ -9597,6 +9618,7 @@ declare namespace index_gen$d {
|
|
|
9597
9618
|
API$g as API,
|
|
9598
9619
|
index_gen$d_APIKey as APIKey,
|
|
9599
9620
|
index_gen$d_AddGroupMemberRequest as AddGroupMemberRequest,
|
|
9621
|
+
index_gen$d_AddGroupMembersRequest as AddGroupMembersRequest,
|
|
9600
9622
|
index_gen$d_Application as Application,
|
|
9601
9623
|
index_gen$d_BearerType as BearerType,
|
|
9602
9624
|
index_gen$d_ClonePolicyRequest as ClonePolicyRequest,
|
|
@@ -14239,10 +14261,11 @@ interface ExternalNode {
|
|
|
14239
14261
|
id: string;
|
|
14240
14262
|
name: string;
|
|
14241
14263
|
clusterUrl: string;
|
|
14242
|
-
|
|
14264
|
+
poolVersion: string;
|
|
14243
14265
|
clusterCa: string;
|
|
14244
14266
|
kubeToken: string;
|
|
14245
14267
|
kubeletConfig: string;
|
|
14268
|
+
externalIp: string;
|
|
14246
14269
|
}
|
|
14247
14270
|
/** List cluster available versions response. */
|
|
14248
14271
|
interface ListClusterAvailableVersionsResponse {
|
|
@@ -24861,6 +24884,7 @@ declare namespace index$4 {
|
|
|
24861
24884
|
type DomainStatus = 'unknown' | 'checked' | 'unchecked' | 'invalid' | 'locked' | 'revoked' | 'pending';
|
|
24862
24885
|
type EmailRcptType = 'unknown_rcpt_type' | 'to' | 'cc' | 'bcc';
|
|
24863
24886
|
type EmailStatus = 'unknown' | 'new' | 'sending' | 'sent' | 'failed' | 'canceled';
|
|
24887
|
+
type ListEmailsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'status_desc' | 'status_asc' | 'mail_from_desc' | 'mail_from_asc' | 'mail_rcpt_desc' | 'mail_rcpt_asc' | 'subject_desc' | 'subject_asc';
|
|
24864
24888
|
/** Create email request. address. */
|
|
24865
24889
|
interface CreateEmailRequestAddress {
|
|
24866
24890
|
/** Email address. */
|
|
@@ -24928,8 +24952,10 @@ interface Email {
|
|
|
24928
24952
|
projectId: string;
|
|
24929
24953
|
/** Email address of the sender. */
|
|
24930
24954
|
mailFrom: string;
|
|
24955
|
+
/** @deprecated (Deprecated) Email address of the recipient. */
|
|
24956
|
+
rcptTo?: string;
|
|
24931
24957
|
/** Email address of the recipient. */
|
|
24932
|
-
|
|
24958
|
+
mailRcpt: string;
|
|
24933
24959
|
/** Type of recipient. */
|
|
24934
24960
|
rcptType: EmailRcptType;
|
|
24935
24961
|
/** Subject of the email. */
|
|
@@ -24972,7 +24998,7 @@ interface ListDomainsResponse {
|
|
|
24972
24998
|
}
|
|
24973
24999
|
/** List emails response. */
|
|
24974
25000
|
interface ListEmailsResponse {
|
|
24975
|
-
/**
|
|
25001
|
+
/** Number of emails matching the requested criteria. */
|
|
24976
25002
|
totalCount: number;
|
|
24977
25003
|
/** Single page of emails matching the requested criteria. */
|
|
24978
25004
|
emails: Email[];
|
|
@@ -25051,24 +25077,41 @@ type ListEmailsRequest = {
|
|
|
25051
25077
|
region?: Region;
|
|
25052
25078
|
page?: number;
|
|
25053
25079
|
pageSize?: number;
|
|
25054
|
-
/** ID of the Project in which to list the emails
|
|
25080
|
+
/** (Optional) ID of the Project in which to list the emails. */
|
|
25055
25081
|
projectId?: string;
|
|
25056
|
-
/** ID of the domain for which to list the emails
|
|
25082
|
+
/** (Optional) ID of the domain for which to list the emails. */
|
|
25057
25083
|
domainId?: string;
|
|
25058
|
-
/** ID of the message for which to list the emails
|
|
25084
|
+
/** (Optional) ID of the message for which to list the emails. */
|
|
25059
25085
|
messageId?: string;
|
|
25060
|
-
/**
|
|
25061
|
-
subject?: string;
|
|
25062
|
-
/** List emails created after this date (optional). */
|
|
25086
|
+
/** (Optional) List emails created after this date. */
|
|
25063
25087
|
since?: Date;
|
|
25064
|
-
/** List emails created before this date
|
|
25088
|
+
/** (Optional) List emails created before this date. */
|
|
25065
25089
|
until?: Date;
|
|
25066
|
-
/** List emails sent with this
|
|
25090
|
+
/** (Optional) List emails sent with this sender's email address. */
|
|
25067
25091
|
mailFrom?: string;
|
|
25068
|
-
/**
|
|
25092
|
+
/**
|
|
25093
|
+
* @deprecated (Deprecated) List emails sent to this recipient's email
|
|
25094
|
+
* address.
|
|
25095
|
+
*/
|
|
25069
25096
|
mailTo?: string;
|
|
25070
|
-
/** List emails
|
|
25097
|
+
/** (Optional) List emails sent to this recipient's email address. */
|
|
25098
|
+
mailRcpt?: string;
|
|
25099
|
+
/** (Optional) List emails with any of these statuses. */
|
|
25071
25100
|
statuses?: EmailStatus[];
|
|
25101
|
+
/** (Optional) List emails with this subject. */
|
|
25102
|
+
subject?: string;
|
|
25103
|
+
/**
|
|
25104
|
+
* (Optional) List emails corresponding to specific criteria. You can filter
|
|
25105
|
+
* your emails in ascending or descending order using:
|
|
25106
|
+
*
|
|
25107
|
+
* - Created_at
|
|
25108
|
+
* - Updated_at
|
|
25109
|
+
* - Status
|
|
25110
|
+
* - Mail_from
|
|
25111
|
+
* - Mail_rcpt
|
|
25112
|
+
* - Subject.
|
|
25113
|
+
*/
|
|
25114
|
+
orderBy?: ListEmailsRequestOrderBy;
|
|
25072
25115
|
};
|
|
25073
25116
|
type GetStatisticsRequest = {
|
|
25074
25117
|
/**
|
|
@@ -25076,18 +25119,18 @@ type GetStatisticsRequest = {
|
|
|
25076
25119
|
* config.
|
|
25077
25120
|
*/
|
|
25078
25121
|
region?: Region;
|
|
25079
|
-
/** Number of emails for this Project
|
|
25122
|
+
/** (Optional) Number of emails for this Project. */
|
|
25080
25123
|
projectId?: string;
|
|
25081
25124
|
/**
|
|
25082
|
-
* Number of emails sent from this domain (must be coherent with
|
|
25083
|
-
* `project_id` and the `organization_id`)
|
|
25125
|
+
* (Optional) Number of emails sent from this domain (must be coherent with
|
|
25126
|
+
* the `project_id` and the `organization_id`).
|
|
25084
25127
|
*/
|
|
25085
25128
|
domainId?: string;
|
|
25086
|
-
/** Number of emails created after this date
|
|
25129
|
+
/** (Optional) Number of emails created after this date. */
|
|
25087
25130
|
since?: Date;
|
|
25088
|
-
/** Number of emails created before this date
|
|
25131
|
+
/** (Optional) Number of emails created before this date. */
|
|
25089
25132
|
until?: Date;
|
|
25090
|
-
/** Number of emails sent with this
|
|
25133
|
+
/** (Optional) Number of emails sent with this sender's email address. */
|
|
25091
25134
|
mailFrom?: string;
|
|
25092
25135
|
};
|
|
25093
25136
|
type CancelEmailRequest = {
|
|
@@ -25188,7 +25231,15 @@ declare class API$3 extends API$q {
|
|
|
25188
25231
|
protected pageOfListEmails: (request?: Readonly<ListEmailsRequest>) => Promise<ListEmailsResponse>;
|
|
25189
25232
|
/**
|
|
25190
25233
|
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
25191
|
-
* a specific Project or Organization. You must specify the `region`.
|
|
25234
|
+
* a specific Project or Organization. You must specify the `region`. You can
|
|
25235
|
+
* filter your emails in ascending or descending order using:
|
|
25236
|
+
*
|
|
25237
|
+
* - Created_at
|
|
25238
|
+
* - Updated_at
|
|
25239
|
+
* - Status
|
|
25240
|
+
* - Mail_from
|
|
25241
|
+
* - Mail_rcpt
|
|
25242
|
+
* - Subject
|
|
25192
25243
|
*
|
|
25193
25244
|
* @param request - The request {@link ListEmailsRequest}
|
|
25194
25245
|
* @returns A Promise of ListEmailsResponse
|
|
@@ -25295,6 +25346,7 @@ type index_gen$3_GetStatisticsRequest = GetStatisticsRequest;
|
|
|
25295
25346
|
type index_gen$3_ListDomainsRequest = ListDomainsRequest;
|
|
25296
25347
|
type index_gen$3_ListDomainsResponse = ListDomainsResponse;
|
|
25297
25348
|
type index_gen$3_ListEmailsRequest = ListEmailsRequest;
|
|
25349
|
+
type index_gen$3_ListEmailsRequestOrderBy = ListEmailsRequestOrderBy;
|
|
25298
25350
|
type index_gen$3_ListEmailsResponse = ListEmailsResponse;
|
|
25299
25351
|
type index_gen$3_RevokeDomainRequest = RevokeDomainRequest;
|
|
25300
25352
|
type index_gen$3_Statistics = Statistics;
|
|
@@ -25323,6 +25375,7 @@ declare namespace index_gen$3 {
|
|
|
25323
25375
|
index_gen$3_ListDomainsRequest as ListDomainsRequest,
|
|
25324
25376
|
index_gen$3_ListDomainsResponse as ListDomainsResponse,
|
|
25325
25377
|
index_gen$3_ListEmailsRequest as ListEmailsRequest,
|
|
25378
|
+
index_gen$3_ListEmailsRequestOrderBy as ListEmailsRequestOrderBy,
|
|
25326
25379
|
index_gen$3_ListEmailsResponse as ListEmailsResponse,
|
|
25327
25380
|
index_gen$3_RevokeDomainRequest as RevokeDomainRequest,
|
|
25328
25381
|
index_gen$3_Statistics as Statistics,
|
|
@@ -41,13 +41,13 @@ const hasAuthenticationSecrets = obj => typeof obj.accessKey === 'string' && obj
|
|
|
41
41
|
*/
|
|
42
42
|
function assertValidAuthenticationSecrets(obj) {
|
|
43
43
|
if (!(obj.accessKey && obj.secretKey)) {
|
|
44
|
-
throw new Error(`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/
|
|
44
|
+
throw new Error(`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
45
45
|
}
|
|
46
46
|
if (!isAccessKey(obj.accessKey)) {
|
|
47
|
-
throw new Error(`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/
|
|
47
|
+
throw new Error(`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
48
48
|
}
|
|
49
49
|
if (!isSecretKey(obj.secretKey)) {
|
|
50
|
-
throw new Error(`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/
|
|
50
|
+
throw new Error(`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
package/dist/scw/client.js
CHANGED
|
@@ -57,7 +57,7 @@ const createAdvancedClient = function () {
|
|
|
57
57
|
* Creates a Scaleway client with a profile.
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
|
-
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/
|
|
60
|
+
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/):
|
|
61
61
|
* ```
|
|
62
62
|
* import { createClient } from '@scaleway/sdk'
|
|
63
63
|
*
|
|
@@ -71,7 +71,7 @@ const createAdvancedClient = function () {
|
|
|
71
71
|
* ```
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/
|
|
74
|
+
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
|
|
75
75
|
* or the config file created by CLI `scw init` (see https://www.scaleway.com/en/cli/):
|
|
76
76
|
* ```
|
|
77
77
|
* import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bundledDependencies": [
|
|
36
36
|
"@scaleway/random-name"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d73bd97e644728370d395d39504bc533f12bf7ba"
|
|
39
39
|
}
|