@scaleway/sdk 0.1.0-alpha.7 → 0.1.0-alpha.8
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/v2alpha1/api.gen.js +2 -8
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -15
- package/dist/api/baremetal/v1/api.gen.js +11 -43
- package/dist/api/container/v1beta1/api.gen.js +8 -36
- package/dist/api/dedibox/v1/api.gen.js +757 -0
- package/dist/api/dedibox/v1/types.gen.js +1 -0
- package/dist/api/domain/v2beta1/api.gen.js +22 -64
- package/dist/api/flexibleip/v1alpha1/api.gen.js +2 -8
- package/dist/api/function/v1beta1/api.gen.js +8 -36
- package/dist/api/iam/v1alpha1/api.gen.js +24 -104
- package/dist/api/instance/v1/api.gen.js +10 -64
- package/dist/api/iot/v1/api.gen.js +15 -29
- package/dist/api/k8s/v1/api.gen.js +10 -22
- package/dist/api/lb/v1/api.gen.js +27 -155
- package/dist/api/marketplace/v1/api.gen.js +2 -8
- package/dist/api/mnq/v1alpha1/api.gen.js +3 -15
- package/dist/api/rdb/v1/api.gen.js +16 -64
- package/dist/api/redis/v1alpha1/api.gen.js +6 -22
- package/dist/api/registry/v1/api.gen.js +4 -22
- package/dist/api/vpc/v1/api.gen.js +2 -8
- package/dist/api/vpcgw/v1/api.gen.js +11 -43
- package/dist/index.cjs +1133 -811
- package/dist/index.d.ts +2765 -642
- package/dist/index.js +49 -45
- package/dist/internals.js +2 -1
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-unmarshallers.js +7 -0
- package/dist/scw/fetch/resource-paginator.js +34 -4
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { urlParams, resolveOneOf, validatePathParam, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
2
|
-
import {
|
|
2
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
3
3
|
import { API } from '../../../helpers/API.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -33,13 +33,7 @@ class AccountV2Alpha1GenAPI extends API {
|
|
|
33
33
|
request = {};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return
|
|
37
|
-
all: () => fetchAll('sshKeys', _this.pageOfListSSHKeys, request),
|
|
38
|
-
[Symbol.asyncIterator]: () => fetchPaginated('sshKeys', _this.pageOfListSSHKeys, request),
|
|
39
|
-
page: async num => (await _this.pageOfListSSHKeys({ ...request,
|
|
40
|
-
page: num
|
|
41
|
-
})).sshKeys
|
|
42
|
-
});
|
|
36
|
+
return enrichForPagination('sshKeys', _this.pageOfListSSHKeys, request);
|
|
43
37
|
};
|
|
44
38
|
|
|
45
39
|
this.createSSHKey = request => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { validatePathParam, unmarshalAnyRes, urlParams } from '../../../scw/marshalling.js';
|
|
3
|
-
import {
|
|
3
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
4
|
import { API } from '../../../helpers/API.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -61,13 +61,7 @@ class ApplesiliconV1Alpha1GenAPI extends API {
|
|
|
61
61
|
request = {};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return
|
|
65
|
-
all: () => fetchAll('servers', _this.pageOfListServers, request),
|
|
66
|
-
[Symbol.asyncIterator]: () => fetchPaginated('servers', _this.pageOfListServers, request),
|
|
67
|
-
page: async num => (await _this.pageOfListServers({ ...request,
|
|
68
|
-
page: num
|
|
69
|
-
})).servers
|
|
70
|
-
});
|
|
64
|
+
return enrichForPagination('servers', _this.pageOfListServers, request);
|
|
71
65
|
};
|
|
72
66
|
|
|
73
67
|
this.pageOfListOS = function (request) {
|
|
@@ -87,13 +81,7 @@ class ApplesiliconV1Alpha1GenAPI extends API {
|
|
|
87
81
|
request = {};
|
|
88
82
|
}
|
|
89
83
|
|
|
90
|
-
return
|
|
91
|
-
all: () => fetchAll('os', _this.pageOfListOS, request),
|
|
92
|
-
[Symbol.asyncIterator]: () => fetchPaginated('os', _this.pageOfListOS, request),
|
|
93
|
-
page: async num => (await _this.pageOfListOS({ ...request,
|
|
94
|
-
page: num
|
|
95
|
-
})).os
|
|
96
|
-
});
|
|
84
|
+
return enrichForPagination('os', _this.pageOfListOS, request);
|
|
97
85
|
};
|
|
98
86
|
|
|
99
87
|
this.getOS = request => this.client.fetch({
|
|
@@ -121,11 +109,15 @@ class ApplesiliconV1Alpha1GenAPI extends API {
|
|
|
121
109
|
});
|
|
122
110
|
|
|
123
111
|
this.rebootServer = request => this.client.fetch({
|
|
112
|
+
body: '{}',
|
|
113
|
+
headers: jsonContentHeaders,
|
|
124
114
|
method: 'POST',
|
|
125
115
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reboot`
|
|
126
116
|
}, unmarshalA4C1);
|
|
127
117
|
|
|
128
118
|
this.reinstallServer = request => this.client.fetch({
|
|
119
|
+
body: '{}',
|
|
120
|
+
headers: jsonContentHeaders,
|
|
129
121
|
method: 'POST',
|
|
130
122
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reinstall`
|
|
131
123
|
}, unmarshalA4C1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { validatePathParam, urlParams, resolveOneOf, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
2
|
-
import {
|
|
2
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
3
3
|
import { API } from '../../../helpers/API.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -24,13 +24,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
24
24
|
urlParams: urlParams(['name', request.name], ['option_id', request.optionId], ['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], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['status', request.status], ['tags', request.tags])
|
|
25
25
|
}, unmarshal0ECB);
|
|
26
26
|
|
|
27
|
-
this.listServers = request =>
|
|
28
|
-
all: () => fetchAll('servers', this.pageOfListServers, request),
|
|
29
|
-
[Symbol.asyncIterator]: () => fetchPaginated('servers', this.pageOfListServers, request),
|
|
30
|
-
page: async num => (await this.pageOfListServers({ ...request,
|
|
31
|
-
page: num
|
|
32
|
-
})).servers
|
|
33
|
-
});
|
|
27
|
+
this.listServers = request => enrichForPagination('servers', this.pageOfListServers, request);
|
|
34
28
|
|
|
35
29
|
this.getServer = request => this.client.fetch({
|
|
36
30
|
method: 'GET',
|
|
@@ -118,6 +112,8 @@ class BaremetalV1GenAPI extends API {
|
|
|
118
112
|
}, unmarshal0ECB);
|
|
119
113
|
|
|
120
114
|
this.stopServer = request => this.client.fetch({
|
|
115
|
+
body: '{}',
|
|
116
|
+
headers: jsonContentHeaders,
|
|
121
117
|
method: 'POST',
|
|
122
118
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/stop`
|
|
123
119
|
}, unmarshal0ECB);
|
|
@@ -128,13 +124,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
128
124
|
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
129
125
|
}, unmarshal0ECB);
|
|
130
126
|
|
|
131
|
-
this.listServerEvents = request =>
|
|
132
|
-
all: () => fetchAll('events', this.pageOfListServerEvents, request),
|
|
133
|
-
[Symbol.asyncIterator]: () => fetchPaginated('events', this.pageOfListServerEvents, request),
|
|
134
|
-
page: async num => (await this.pageOfListServerEvents({ ...request,
|
|
135
|
-
page: num
|
|
136
|
-
})).events
|
|
137
|
-
});
|
|
127
|
+
this.listServerEvents = request => enrichForPagination('events', this.pageOfListServerEvents, request);
|
|
138
128
|
|
|
139
129
|
this.startBMCAccess = request => this.client.fetch({
|
|
140
130
|
body: JSON.stringify({
|
|
@@ -165,6 +155,8 @@ class BaremetalV1GenAPI extends API {
|
|
|
165
155
|
}, unmarshalAnyRes);
|
|
166
156
|
|
|
167
157
|
this.addOptionServer = request => this.client.fetch({
|
|
158
|
+
body: '{}',
|
|
159
|
+
headers: jsonContentHeaders,
|
|
168
160
|
method: 'POST',
|
|
169
161
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/options/${validatePathParam('optionId', request.optionId)}`
|
|
170
162
|
}, unmarshal0ECB);
|
|
@@ -191,13 +183,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
191
183
|
request = {};
|
|
192
184
|
}
|
|
193
185
|
|
|
194
|
-
return
|
|
195
|
-
all: () => fetchAll('offers', _this.pageOfListOffers, request),
|
|
196
|
-
[Symbol.asyncIterator]: () => fetchPaginated('offers', _this.pageOfListOffers, request),
|
|
197
|
-
page: async num => (await _this.pageOfListOffers({ ...request,
|
|
198
|
-
page: num
|
|
199
|
-
})).offers
|
|
200
|
-
});
|
|
186
|
+
return enrichForPagination('offers', _this.pageOfListOffers, request);
|
|
201
187
|
};
|
|
202
188
|
|
|
203
189
|
this.getOffer = request => this.client.fetch({
|
|
@@ -227,13 +213,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
227
213
|
request = {};
|
|
228
214
|
}
|
|
229
215
|
|
|
230
|
-
return
|
|
231
|
-
all: () => fetchAll('options', _this.pageOfListOptions, request),
|
|
232
|
-
[Symbol.asyncIterator]: () => fetchPaginated('options', _this.pageOfListOptions, request),
|
|
233
|
-
page: async num => (await _this.pageOfListOptions({ ...request,
|
|
234
|
-
page: num
|
|
235
|
-
})).options
|
|
236
|
-
});
|
|
216
|
+
return enrichForPagination('options', _this.pageOfListOptions, request);
|
|
237
217
|
};
|
|
238
218
|
|
|
239
219
|
this.pageOfListSettings = function (request) {
|
|
@@ -253,13 +233,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
253
233
|
request = {};
|
|
254
234
|
}
|
|
255
235
|
|
|
256
|
-
return
|
|
257
|
-
all: () => fetchAll('settings', _this.pageOfListSettings, request),
|
|
258
|
-
[Symbol.asyncIterator]: () => fetchPaginated('settings', _this.pageOfListSettings, request),
|
|
259
|
-
page: async num => (await _this.pageOfListSettings({ ...request,
|
|
260
|
-
page: num
|
|
261
|
-
})).settings
|
|
262
|
-
});
|
|
236
|
+
return enrichForPagination('settings', _this.pageOfListSettings, request);
|
|
263
237
|
};
|
|
264
238
|
|
|
265
239
|
this.updateSetting = request => this.client.fetch({
|
|
@@ -288,13 +262,7 @@ class BaremetalV1GenAPI extends API {
|
|
|
288
262
|
request = {};
|
|
289
263
|
}
|
|
290
264
|
|
|
291
|
-
return
|
|
292
|
-
all: () => fetchAll('os', _this.pageOfListOS, request),
|
|
293
|
-
[Symbol.asyncIterator]: () => fetchPaginated('os', _this.pageOfListOS, request),
|
|
294
|
-
page: async num => (await _this.pageOfListOS({ ...request,
|
|
295
|
-
page: num
|
|
296
|
-
})).os
|
|
297
|
-
});
|
|
265
|
+
return enrichForPagination('os', _this.pageOfListOS, request);
|
|
298
266
|
};
|
|
299
267
|
|
|
300
268
|
this.getOS = request => this.client.fetch({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { validatePathParam, urlParams, unmarshalAnyRes, resolveOneOf } from '../../../scw/marshalling.js';
|
|
3
|
-
import {
|
|
3
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
4
|
import { API } from '../../../helpers/API.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -38,13 +38,7 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
38
38
|
request = {};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
return
|
|
42
|
-
all: () => fetchAll('namespaces', _this.pageOfListNamespaces, request),
|
|
43
|
-
[Symbol.asyncIterator]: () => fetchPaginated('namespaces', _this.pageOfListNamespaces, request),
|
|
44
|
-
page: async num => (await _this.pageOfListNamespaces({ ...request,
|
|
45
|
-
page: num
|
|
46
|
-
})).namespaces
|
|
47
|
-
});
|
|
41
|
+
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
48
42
|
};
|
|
49
43
|
|
|
50
44
|
this.getNamespace = request => this.client.fetch({
|
|
@@ -87,13 +81,7 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
87
81
|
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['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], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
88
82
|
}, unmarshal9544);
|
|
89
83
|
|
|
90
|
-
this.listContainers = request =>
|
|
91
|
-
all: () => fetchAll('containers', this.pageOfListContainers, request),
|
|
92
|
-
[Symbol.asyncIterator]: () => fetchPaginated('containers', this.pageOfListContainers, request),
|
|
93
|
-
page: async num => (await this.pageOfListContainers({ ...request,
|
|
94
|
-
page: num
|
|
95
|
-
})).containers
|
|
96
|
-
});
|
|
84
|
+
this.listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
|
|
97
85
|
|
|
98
86
|
this.getContainer = request => this.client.fetch({
|
|
99
87
|
method: 'GET',
|
|
@@ -153,6 +141,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
153
141
|
}, unmarshal9544);
|
|
154
142
|
|
|
155
143
|
this.deployContainer = request => this.client.fetch({
|
|
144
|
+
body: '{}',
|
|
145
|
+
headers: jsonContentHeaders,
|
|
156
146
|
method: 'POST',
|
|
157
147
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/deploy`
|
|
158
148
|
}, unmarshal9544);
|
|
@@ -163,13 +153,7 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
163
153
|
urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
164
154
|
}, unmarshal27A7);
|
|
165
155
|
|
|
166
|
-
this.listCrons = request =>
|
|
167
|
-
all: () => fetchAll('crons', this.pageOfListCrons, request),
|
|
168
|
-
[Symbol.asyncIterator]: () => fetchPaginated('crons', this.pageOfListCrons, request),
|
|
169
|
-
page: async num => (await this.pageOfListCrons({ ...request,
|
|
170
|
-
page: num
|
|
171
|
-
})).crons
|
|
172
|
-
});
|
|
156
|
+
this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
173
157
|
|
|
174
158
|
this.getCron = request => this.client.fetch({
|
|
175
159
|
method: 'GET',
|
|
@@ -209,13 +193,7 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
209
193
|
urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
210
194
|
}, unmarshalB3B3);
|
|
211
195
|
|
|
212
|
-
this.listLogs = request =>
|
|
213
|
-
all: () => fetchAll('logs', this.pageOfListLogs, request),
|
|
214
|
-
[Symbol.asyncIterator]: () => fetchPaginated('logs', this.pageOfListLogs, request),
|
|
215
|
-
page: async num => (await this.pageOfListLogs({ ...request,
|
|
216
|
-
page: num
|
|
217
|
-
})).logs
|
|
218
|
-
});
|
|
196
|
+
this.listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
219
197
|
|
|
220
198
|
this.pageOfListDomains = request => this.client.fetch({
|
|
221
199
|
method: 'GET',
|
|
@@ -223,13 +201,7 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
223
201
|
urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
224
202
|
}, unmarshalAnyRes);
|
|
225
203
|
|
|
226
|
-
this.listDomains = request =>
|
|
227
|
-
all: () => fetchAll('domains', this.pageOfListDomains, request),
|
|
228
|
-
[Symbol.asyncIterator]: () => fetchPaginated('domains', this.pageOfListDomains, request),
|
|
229
|
-
page: async num => (await this.pageOfListDomains({ ...request,
|
|
230
|
-
page: num
|
|
231
|
-
})).domains
|
|
232
|
-
});
|
|
204
|
+
this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
233
205
|
|
|
234
206
|
this.getDomain = request => this.client.fetch({
|
|
235
207
|
method: 'GET',
|