@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.
- package/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -16,11 +16,11 @@ const jsonContentHeaders = {
|
|
|
16
16
|
* Messaging and Queuing API.
|
|
17
17
|
*/
|
|
18
18
|
class API extends API$1 {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_this = this;
|
|
23
|
-
|
|
19
|
+
/** Lists the available regions of the API. */
|
|
20
|
+
static LOCALITIES = ['fr-par'];
|
|
21
|
+
pageOfListNamespaces = (() => {
|
|
22
|
+
var _this = this;
|
|
23
|
+
return function (request) {
|
|
24
24
|
if (request === void 0) {
|
|
25
25
|
request = {};
|
|
26
26
|
}
|
|
@@ -30,152 +30,169 @@ class API extends API$1 {
|
|
|
30
30
|
urlParams: urlParams(['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])
|
|
31
31
|
}, unmarshalListNamespacesResponse);
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
})();
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* List namespaces. List all Messaging and Queuing namespaces in the specified
|
|
37
|
+
* region, for a Scaleway Organization or Project. By default, the namespaces
|
|
38
|
+
* returned in the list are ordered by creation date in ascending order,
|
|
39
|
+
* though this can be modified via the `order_by` field.
|
|
40
|
+
*
|
|
41
|
+
* @param request - The request {@link ListNamespacesRequest}
|
|
42
|
+
* @returns A Promise of ListNamespacesResponse
|
|
43
|
+
*/
|
|
44
|
+
listNamespaces = (() => {
|
|
45
|
+
var _this2 = this;
|
|
46
|
+
return function (request) {
|
|
43
47
|
if (request === void 0) {
|
|
44
48
|
request = {};
|
|
45
49
|
}
|
|
46
|
-
return enrichForPagination('namespaces',
|
|
50
|
+
return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
|
|
47
51
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
52
|
+
})();
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Create a namespace. Create a Messaging and Queuing namespace, set to the
|
|
56
|
+
* desired protocol.
|
|
57
|
+
*
|
|
58
|
+
* @param request - The request {@link CreateNamespaceRequest}
|
|
59
|
+
* @returns A Promise of Namespace
|
|
60
|
+
*/
|
|
61
|
+
createNamespace = request => this.client.fetch({
|
|
62
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
63
|
+
headers: jsonContentHeaders,
|
|
64
|
+
method: 'POST',
|
|
65
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
66
|
+
}, unmarshalNamespace);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Update the name of a namespace. Update the name of a Messaging and Queuing
|
|
70
|
+
* namespace, specified by its namespace ID.
|
|
71
|
+
*
|
|
72
|
+
* @param request - The request {@link UpdateNamespaceRequest}
|
|
73
|
+
* @returns A Promise of Namespace
|
|
74
|
+
*/
|
|
75
|
+
updateNamespace = request => this.client.fetch({
|
|
76
|
+
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
77
|
+
headers: jsonContentHeaders,
|
|
78
|
+
method: 'PATCH',
|
|
79
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
80
|
+
}, unmarshalNamespace);
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get a namespace. Retrieve information about an existing Messaging and
|
|
84
|
+
* Queuing namespace, identified by its namespace ID. Its full details,
|
|
85
|
+
* including name, endpoint and protocol, are returned in the response.
|
|
86
|
+
*
|
|
87
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
88
|
+
* @returns A Promise of Namespace
|
|
89
|
+
*/
|
|
90
|
+
getNamespace = request => this.client.fetch({
|
|
91
|
+
method: 'GET',
|
|
92
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
93
|
+
}, unmarshalNamespace);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Delete a namespace. Delete a Messaging and Queuing namespace, specified by
|
|
97
|
+
* its namespace ID. Note that deleting a namespace is irreversible, and any
|
|
98
|
+
* URLs, credentials and queued messages belonging to this namespace will also
|
|
99
|
+
* be deleted.
|
|
100
|
+
*
|
|
101
|
+
* @param request - The request {@link DeleteNamespaceRequest}
|
|
102
|
+
*/
|
|
103
|
+
deleteNamespace = request => this.client.fetch({
|
|
104
|
+
method: 'DELETE',
|
|
105
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Create credentials. Create a set of credentials for a Messaging and Queuing
|
|
110
|
+
* namespace, specified by its namespace ID. If creating credentials for a
|
|
111
|
+
* NATS namespace, the `permissions` object must not be included in the
|
|
112
|
+
* request. If creating credentials for an SQS/SNS namespace, the
|
|
113
|
+
* `permissions` object is required, with all three of its child attributes.
|
|
114
|
+
*
|
|
115
|
+
* @param request - The request {@link CreateCredentialRequest}
|
|
116
|
+
* @returns A Promise of Credential
|
|
117
|
+
*/
|
|
118
|
+
createCredential = request => this.client.fetch({
|
|
119
|
+
body: JSON.stringify(marshalCreateCredentialRequest(request, this.client.settings)),
|
|
120
|
+
headers: jsonContentHeaders,
|
|
121
|
+
method: 'POST',
|
|
122
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
|
|
123
|
+
}, unmarshalCredential);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Delete credentials. Delete a set of credentials, specified by their
|
|
127
|
+
* credential ID. Deleting credentials is irreversible and cannot be undone.
|
|
128
|
+
* The credentials can no longer be used to access the namespace.
|
|
129
|
+
*
|
|
130
|
+
* @param request - The request {@link DeleteCredentialRequest}
|
|
131
|
+
*/
|
|
132
|
+
deleteCredential = request => this.client.fetch({
|
|
133
|
+
method: 'DELETE',
|
|
134
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
135
|
+
});
|
|
136
|
+
pageOfListCredentials = (() => {
|
|
137
|
+
var _this3 = this;
|
|
138
|
+
return function (request) {
|
|
126
139
|
if (request === void 0) {
|
|
127
140
|
request = {};
|
|
128
141
|
}
|
|
129
|
-
return
|
|
142
|
+
return _this3.client.fetch({
|
|
130
143
|
method: 'GET',
|
|
131
|
-
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ??
|
|
132
|
-
urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'id_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
144
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/credentials`,
|
|
145
|
+
urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'id_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
|
|
133
146
|
}, unmarshalListCredentialsResponse);
|
|
134
147
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
148
|
+
})();
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* List credentials. List existing credentials in the specified region. The
|
|
152
|
+
* response contains only the metadata for the credentials, not the
|
|
153
|
+
* credentials themselves (for this, use **Get Credentials**).
|
|
154
|
+
*
|
|
155
|
+
* @param request - The request {@link ListCredentialsRequest}
|
|
156
|
+
* @returns A Promise of ListCredentialsResponse
|
|
157
|
+
*/
|
|
158
|
+
listCredentials = (() => {
|
|
159
|
+
var _this4 = this;
|
|
160
|
+
return function (request) {
|
|
144
161
|
if (request === void 0) {
|
|
145
162
|
request = {};
|
|
146
163
|
}
|
|
147
|
-
return enrichForPagination('credentials',
|
|
164
|
+
return enrichForPagination('credentials', _this4.pageOfListCredentials, request);
|
|
148
165
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
166
|
+
})();
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Update credentials. Update a set of credentials. You can update the
|
|
170
|
+
* credentials' name, or (in the case of SQS/SNS credentials only) their
|
|
171
|
+
* permissions. To update the name of NATS credentials, do not include the
|
|
172
|
+
* `permissions` object in your request.
|
|
173
|
+
*
|
|
174
|
+
* @param request - The request {@link UpdateCredentialRequest}
|
|
175
|
+
* @returns A Promise of Credential
|
|
176
|
+
*/
|
|
177
|
+
updateCredential = request => this.client.fetch({
|
|
178
|
+
body: JSON.stringify(marshalUpdateCredentialRequest(request, this.client.settings)),
|
|
179
|
+
headers: jsonContentHeaders,
|
|
180
|
+
method: 'PATCH',
|
|
181
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
182
|
+
}, unmarshalCredential);
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Get credentials. Retrieve an existing set of credentials, identified by the
|
|
186
|
+
* `credential_id`. The credentials themselves, as well as their metadata
|
|
187
|
+
* (protocol, namespace ID etc), are returned in the response.
|
|
188
|
+
*
|
|
189
|
+
* @param request - The request {@link GetCredentialRequest}
|
|
190
|
+
* @returns A Promise of Credential
|
|
191
|
+
*/
|
|
192
|
+
getCredential = request => this.client.fetch({
|
|
193
|
+
method: 'GET',
|
|
194
|
+
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
195
|
+
}, unmarshalCredential);
|
|
177
196
|
}
|
|
178
|
-
/** Lists the available regions of the API. */
|
|
179
|
-
API.LOCALITIES = ['fr-par'];
|
|
180
197
|
|
|
181
198
|
export { API };
|