@scaleway/sdk 1.34.0 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/api/account/v2/api.gen.js +1 -1
  2. package/dist/api/account/v3/api.gen.js +1 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  4. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
  5. package/dist/api/baremetal/v1/api.gen.js +6 -6
  6. package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
  7. package/dist/api/billing/v2alpha1/api.gen.js +3 -3
  8. package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
  9. package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
  10. package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
  11. package/dist/api/container/v1beta1/api.gen.js +11 -11
  12. package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
  13. package/dist/api/document_db/v1beta1/api.gen.js +6 -6
  14. package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
  15. package/dist/api/domain/v2beta1/api.gen.js +45 -38
  16. package/dist/api/domain/v2beta1/index.gen.js +2 -0
  17. package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
  18. package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
  19. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  20. package/dist/api/function/v1beta1/api.gen.js +11 -11
  21. package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
  22. package/dist/api/iam/v1alpha1/api.gen.js +64 -32
  23. package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
  24. package/dist/api/instance/v1/api.gen.js +1 -1
  25. package/dist/api/instance/v1/marshalling.gen.js +397 -602
  26. package/dist/api/iot/v1/api.gen.js +35 -27
  27. package/dist/api/iot/v1/marshalling.gen.js +111 -162
  28. package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
  29. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
  30. package/dist/api/k8s/v1/api.gen.js +3 -3
  31. package/dist/api/k8s/v1/marshalling.gen.js +109 -194
  32. package/dist/api/lb/v1/api.gen.js +583 -552
  33. package/dist/api/lb/v1/marshalling.gen.js +245 -361
  34. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  35. package/dist/api/marketplace/v2/api.gen.js +6 -6
  36. package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
  37. package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
  38. package/dist/api/rdb/v1/api.gen.js +7 -7
  39. package/dist/api/rdb/v1/marshalling.gen.js +184 -240
  40. package/dist/api/redis/v1/api.gen.js +1 -1
  41. package/dist/api/redis/v1/marshalling.gen.js +73 -97
  42. package/dist/api/registry/v1/api.gen.js +3 -3
  43. package/dist/api/registry/v1/marshalling.gen.js +5 -7
  44. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  45. package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
  46. package/dist/api/tem/v1alpha1/api.gen.js +1 -1
  47. package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
  48. package/dist/api/test/v1/api.gen.js +8 -25
  49. package/dist/api/test/v1/marshalling.gen.js +5 -7
  50. package/dist/api/vpc/v1/api.gen.js +1 -1
  51. package/dist/api/vpc/v2/api.gen.js +2 -2
  52. package/dist/api/vpc/v2/marshalling.gen.js +3 -5
  53. package/dist/api/vpcgw/v1/api.gen.js +6 -6
  54. package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
  55. package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
  56. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  57. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
  59. package/dist/index.cjs +3127 -3989
  60. package/dist/index.d.ts +9658 -12221
  61. package/package.json +2 -2
@@ -16,7 +16,7 @@ const jsonContentHeaders = {
16
16
  *
17
17
  * Cockpit's API allows you to activate your Cockpit on your Projects.
18
18
  * Scaleway's Cockpit stores metrics and logs and provides a dedicated Grafana
19
- * for dashboarding to visualize them. Cockpit API.
19
+ * for dashboarding to visualize them.
20
20
  */
21
21
  class API extends API$1 {
22
22
  /**
@@ -158,30 +158,22 @@ class API extends API$1 {
158
158
  * @param request - The request {@link CreateTokenRequest}
159
159
  * @returns A Promise of Token
160
160
  */
161
- createToken = (() => {
161
+ createToken = request => this.client.fetch({
162
+ body: JSON.stringify(marshalCreateTokenRequest(request, this.client.settings)),
163
+ headers: jsonContentHeaders,
164
+ method: 'POST',
165
+ path: `/cockpit/v1beta1/tokens`
166
+ }, unmarshalToken);
167
+ pageOfListTokens = (() => {
162
168
  var _this7 = this;
163
169
  return function (request) {
164
170
  if (request === void 0) {
165
171
  request = {};
166
172
  }
167
173
  return _this7.client.fetch({
168
- body: JSON.stringify(marshalCreateTokenRequest(request, _this7.client.settings)),
169
- headers: jsonContentHeaders,
170
- method: 'POST',
171
- path: `/cockpit/v1beta1/tokens`
172
- }, unmarshalToken);
173
- };
174
- })();
175
- pageOfListTokens = (() => {
176
- var _this8 = this;
177
- return function (request) {
178
- if (request === void 0) {
179
- request = {};
180
- }
181
- return _this8.client.fetch({
182
174
  method: 'GET',
183
175
  path: `/cockpit/v1beta1/tokens`,
184
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this8.client.settings.defaultProjectId])
176
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this7.client.settings.defaultProjectId])
185
177
  }, unmarshalListTokensResponse);
186
178
  };
187
179
  })();
@@ -193,12 +185,12 @@ class API extends API$1 {
193
185
  * @returns A Promise of ListTokensResponse
194
186
  */
195
187
  listTokens = (() => {
196
- var _this9 = this;
188
+ var _this8 = this;
197
189
  return function (request) {
198
190
  if (request === void 0) {
199
191
  request = {};
200
192
  }
201
- return enrichForPagination('tokens', _this9.pageOfListTokens, request);
193
+ return enrichForPagination('tokens', _this8.pageOfListTokens, request);
202
194
  };
203
195
  })();
204
196
 
@@ -229,30 +221,22 @@ class API extends API$1 {
229
221
  * @param request - The request {@link CreateContactPointRequest}
230
222
  * @returns A Promise of ContactPoint
231
223
  */
232
- createContactPoint = (() => {
233
- var _this10 = this;
234
- return function (request) {
235
- if (request === void 0) {
236
- request = {};
237
- }
238
- return _this10.client.fetch({
239
- body: JSON.stringify(marshalCreateContactPointRequest(request, _this10.client.settings)),
240
- headers: jsonContentHeaders,
241
- method: 'POST',
242
- path: `/cockpit/v1beta1/contact-points`
243
- }, unmarshalContactPoint);
244
- };
245
- })();
224
+ createContactPoint = request => this.client.fetch({
225
+ body: JSON.stringify(marshalCreateContactPointRequest(request, this.client.settings)),
226
+ headers: jsonContentHeaders,
227
+ method: 'POST',
228
+ path: `/cockpit/v1beta1/contact-points`
229
+ }, unmarshalContactPoint);
246
230
  pageOfListContactPoints = (() => {
247
- var _this11 = this;
231
+ var _this9 = this;
248
232
  return function (request) {
249
233
  if (request === void 0) {
250
234
  request = {};
251
235
  }
252
- return _this11.client.fetch({
236
+ return _this9.client.fetch({
253
237
  method: 'GET',
254
238
  path: `/cockpit/v1beta1/contact-points`,
255
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this11.client.settings.defaultProjectId])
239
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this9.client.settings.defaultProjectId])
256
240
  }, unmarshalListContactPointsResponse);
257
241
  };
258
242
  })();
@@ -265,12 +249,12 @@ class API extends API$1 {
265
249
  * @returns A Promise of ListContactPointsResponse
266
250
  */
267
251
  listContactPoints = (() => {
268
- var _this12 = this;
252
+ var _this10 = this;
269
253
  return function (request) {
270
254
  if (request === void 0) {
271
255
  request = {};
272
256
  }
273
- return enrichForPagination('contactPoints', _this12.pageOfListContactPoints, request);
257
+ return enrichForPagination('contactPoints', _this10.pageOfListContactPoints, request);
274
258
  };
275
259
  })();
276
260
 
@@ -279,20 +263,12 @@ class API extends API$1 {
279
263
  *
280
264
  * @param request - The request {@link DeleteContactPointRequest}
281
265
  */
282
- deleteContactPoint = (() => {
283
- var _this13 = this;
284
- return function (request) {
285
- if (request === void 0) {
286
- request = {};
287
- }
288
- return _this13.client.fetch({
289
- body: JSON.stringify(marshalDeleteContactPointRequest(request, _this13.client.settings)),
290
- headers: jsonContentHeaders,
291
- method: 'POST',
292
- path: `/cockpit/v1beta1/delete-contact-point`
293
- });
294
- };
295
- })();
266
+ deleteContactPoint = request => this.client.fetch({
267
+ body: JSON.stringify(marshalDeleteContactPointRequest(request, this.client.settings)),
268
+ headers: jsonContentHeaders,
269
+ method: 'POST',
270
+ path: `/cockpit/v1beta1/delete-contact-point`
271
+ });
296
272
 
297
273
  /**
298
274
  * Enable the sending of managed alerts for the specified Project's Cockpit.
@@ -300,13 +276,13 @@ class API extends API$1 {
300
276
  * @param request - The request {@link EnableManagedAlertsRequest}
301
277
  */
302
278
  enableManagedAlerts = (() => {
303
- var _this14 = this;
279
+ var _this11 = this;
304
280
  return function (request) {
305
281
  if (request === void 0) {
306
282
  request = {};
307
283
  }
308
- return _this14.client.fetch({
309
- body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this14.client.settings)),
284
+ return _this11.client.fetch({
285
+ body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this11.client.settings)),
310
286
  headers: jsonContentHeaders,
311
287
  method: 'POST',
312
288
  path: `/cockpit/v1beta1/enable-managed-alerts`
@@ -320,13 +296,13 @@ class API extends API$1 {
320
296
  * @param request - The request {@link DisableManagedAlertsRequest}
321
297
  */
322
298
  disableManagedAlerts = (() => {
323
- var _this15 = this;
299
+ var _this12 = this;
324
300
  return function (request) {
325
301
  if (request === void 0) {
326
302
  request = {};
327
303
  }
328
- return _this15.client.fetch({
329
- body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this15.client.settings)),
304
+ return _this12.client.fetch({
305
+ body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this12.client.settings)),
330
306
  headers: jsonContentHeaders,
331
307
  method: 'POST',
332
308
  path: `/cockpit/v1beta1/disable-managed-alerts`
@@ -340,13 +316,13 @@ class API extends API$1 {
340
316
  * @param request - The request {@link TriggerTestAlertRequest}
341
317
  */
342
318
  triggerTestAlert = (() => {
343
- var _this16 = this;
319
+ var _this13 = this;
344
320
  return function (request) {
345
321
  if (request === void 0) {
346
322
  request = {};
347
323
  }
348
- return _this16.client.fetch({
349
- body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this16.client.settings)),
324
+ return _this13.client.fetch({
325
+ body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this13.client.settings)),
350
326
  headers: jsonContentHeaders,
351
327
  method: 'POST',
352
328
  path: `/cockpit/v1beta1/trigger-test-alert`
@@ -368,15 +344,15 @@ class API extends API$1 {
368
344
  path: `/cockpit/v1beta1/grafana-users`
369
345
  }, unmarshalGrafanaUser);
370
346
  pageOfListGrafanaUsers = (() => {
371
- var _this17 = this;
347
+ var _this14 = this;
372
348
  return function (request) {
373
349
  if (request === void 0) {
374
350
  request = {};
375
351
  }
376
- return _this17.client.fetch({
352
+ return _this14.client.fetch({
377
353
  method: 'GET',
378
354
  path: `/cockpit/v1beta1/grafana-users`,
379
- urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this17.client.settings.defaultProjectId])
355
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this14.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this14.client.settings.defaultProjectId])
380
356
  }, unmarshalListGrafanaUsersResponse);
381
357
  };
382
358
  })();
@@ -389,12 +365,12 @@ class API extends API$1 {
389
365
  * @returns A Promise of ListGrafanaUsersResponse
390
366
  */
391
367
  listGrafanaUsers = (() => {
392
- var _this18 = this;
368
+ var _this15 = this;
393
369
  return function (request) {
394
370
  if (request === void 0) {
395
371
  request = {};
396
372
  }
397
- return enrichForPagination('grafanaUsers', _this18.pageOfListGrafanaUsers, request);
373
+ return enrichForPagination('grafanaUsers', _this15.pageOfListGrafanaUsers, request);
398
374
  };
399
375
  })();
400
376
 
@@ -425,15 +401,15 @@ class API extends API$1 {
425
401
  path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
426
402
  }, unmarshalGrafanaUser);
427
403
  pageOfListPlans = (() => {
428
- var _this19 = this;
404
+ var _this16 = this;
429
405
  return function (request) {
430
406
  if (request === void 0) {
431
407
  request = {};
432
408
  }
433
- return _this19.client.fetch({
409
+ return _this16.client.fetch({
434
410
  method: 'GET',
435
411
  path: `/cockpit/v1beta1/plans`,
436
- urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
412
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this16.client.settings.defaultPageSize])
437
413
  }, unmarshalListPlansResponse);
438
414
  };
439
415
  })();
@@ -445,12 +421,12 @@ class API extends API$1 {
445
421
  * @returns A Promise of ListPlansResponse
446
422
  */
447
423
  listPlans = (() => {
448
- var _this20 = this;
424
+ var _this17 = this;
449
425
  return function (request) {
450
426
  if (request === void 0) {
451
427
  request = {};
452
428
  }
453
- return enrichForPagination('plans', _this20.pageOfListPlans, request);
429
+ return enrichForPagination('plans', _this17.pageOfListPlans, request);
454
430
  };
455
431
  })();
456
432
 
@@ -1,7 +1,7 @@
1
1
  import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
2
2
  import { isJSONObject } from '../../../helpers/json.js';
3
3
  import { unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
4
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
+ import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.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.
@@ -13,6 +13,25 @@ const unmarshalContactPointEmail = data => {
13
13
  to: data.to
14
14
  };
15
15
  };
16
+ const unmarshalContactPoint = data => {
17
+ if (!isJSONObject(data)) {
18
+ throw new TypeError(`Unmarshalling the type 'ContactPoint' failed as data isn't a dictionary.`);
19
+ }
20
+ return {
21
+ email: data.email ? unmarshalContactPointEmail(data.email) : undefined
22
+ };
23
+ };
24
+ const unmarshalGrafanaUser = data => {
25
+ if (!isJSONObject(data)) {
26
+ throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
27
+ }
28
+ return {
29
+ id: data.id,
30
+ login: data.login,
31
+ password: data.password ? data.password : undefined,
32
+ role: data.role
33
+ };
34
+ };
16
35
  const unmarshalTokenScopes = data => {
17
36
  if (!isJSONObject(data)) {
18
37
  throw new TypeError(`Unmarshalling the type 'TokenScopes' failed as data isn't a dictionary.`);
@@ -29,34 +48,18 @@ const unmarshalTokenScopes = data => {
29
48
  writeTraces: data.write_traces
30
49
  };
31
50
  };
32
- const unmarshalCockpitEndpoints = data => {
33
- if (!isJSONObject(data)) {
34
- throw new TypeError(`Unmarshalling the type 'CockpitEndpoints' failed as data isn't a dictionary.`);
35
- }
36
- return {
37
- alertmanagerUrl: data.alertmanager_url,
38
- grafanaUrl: data.grafana_url,
39
- logsUrl: data.logs_url,
40
- metricsUrl: data.metrics_url
41
- };
42
- };
43
- const unmarshalContactPoint = data => {
44
- if (!isJSONObject(data)) {
45
- throw new TypeError(`Unmarshalling the type 'ContactPoint' failed as data isn't a dictionary.`);
46
- }
47
- return {
48
- email: data.email ? unmarshalContactPointEmail(data.email) : undefined
49
- };
50
- };
51
- const unmarshalGrafanaUser = data => {
51
+ const unmarshalToken = data => {
52
52
  if (!isJSONObject(data)) {
53
- throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
53
+ throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
54
54
  }
55
55
  return {
56
+ createdAt: unmarshalDate(data.created_at),
56
57
  id: data.id,
57
- login: data.login,
58
- password: data.password,
59
- role: data.role
58
+ name: data.name,
59
+ projectId: data.project_id,
60
+ scopes: unmarshalTokenScopes(data.scopes),
61
+ secretKey: data.secret_key ? data.secret_key : undefined,
62
+ updatedAt: unmarshalDate(data.updated_at)
60
63
  };
61
64
  };
62
65
  const unmarshalPlan = data => {
@@ -67,24 +70,21 @@ const unmarshalPlan = data => {
67
70
  id: data.id,
68
71
  logsIngestionPrice: data.logs_ingestion_price,
69
72
  name: data.name,
70
- retentionLogsInterval: data.retention_logs_interval,
71
- retentionMetricsInterval: data.retention_metrics_interval,
73
+ retentionLogsInterval: data.retention_logs_interval ? data.retention_logs_interval : undefined,
74
+ retentionMetricsInterval: data.retention_metrics_interval ? data.retention_metrics_interval : undefined,
72
75
  retentionPrice: data.retention_price,
73
76
  sampleIngestionPrice: data.sample_ingestion_price
74
77
  };
75
78
  };
76
- const unmarshalToken = data => {
79
+ const unmarshalCockpitEndpoints = data => {
77
80
  if (!isJSONObject(data)) {
78
- throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
81
+ throw new TypeError(`Unmarshalling the type 'CockpitEndpoints' failed as data isn't a dictionary.`);
79
82
  }
80
83
  return {
81
- createdAt: unmarshalDate(data.created_at),
82
- id: data.id,
83
- name: data.name,
84
- projectId: data.project_id,
85
- scopes: data.scopes ? unmarshalTokenScopes(data.scopes) : undefined,
86
- secretKey: data.secret_key,
87
- updatedAt: unmarshalDate(data.updated_at)
84
+ alertmanagerUrl: data.alertmanager_url,
85
+ grafanaUrl: data.grafana_url,
86
+ logsUrl: data.logs_url,
87
+ metricsUrl: data.metrics_url
88
88
  };
89
89
  };
90
90
  const unmarshalCockpit = data => {
@@ -93,9 +93,9 @@ const unmarshalCockpit = data => {
93
93
  }
94
94
  return {
95
95
  createdAt: unmarshalDate(data.created_at),
96
- endpoints: data.endpoints ? unmarshalCockpitEndpoints(data.endpoints) : undefined,
96
+ endpoints: unmarshalCockpitEndpoints(data.endpoints),
97
97
  managedAlertsEnabled: data.managed_alerts_enabled,
98
- plan: data.plan ? unmarshalPlan(data.plan) : undefined,
98
+ plan: unmarshalPlan(data.plan),
99
99
  projectId: data.project_id,
100
100
  status: data.status,
101
101
  updatedAt: unmarshalDate(data.updated_at)
@@ -165,53 +165,33 @@ const unmarshalSelectPlanResponse = data => {
165
165
  }
166
166
  return {};
167
167
  };
168
- const marshalContactPointEmail = (request, defaults) => ({
169
- to: request.to
170
- });
171
- const marshalContactPoint = (request, defaults) => ({
172
- ...resolveOneOf([{
173
- param: 'email',
174
- value: request.email ? marshalContactPointEmail(request.email) : undefined
175
- }])
176
- });
177
- const marshalTokenScopes = (request, defaults) => ({
178
- query_logs: request.queryLogs,
179
- query_metrics: request.queryMetrics,
180
- query_traces: request.queryTraces,
181
- setup_alerts: request.setupAlerts,
182
- setup_logs_rules: request.setupLogsRules,
183
- setup_metrics_rules: request.setupMetricsRules,
184
- write_logs: request.writeLogs,
185
- write_metrics: request.writeMetrics,
186
- write_traces: request.writeTraces
187
- });
188
168
  const marshalActivateCockpitRequest = (request, defaults) => ({
189
169
  project_id: request.projectId ?? defaults.defaultProjectId
190
170
  });
191
171
  const marshalCreateContactPointRequest = (request, defaults) => ({
192
- contact_point: request.contactPoint ? marshalContactPoint(request.contactPoint) : undefined,
172
+ contact_point: request.contactPoint,
193
173
  project_id: request.projectId ?? defaults.defaultProjectId
194
174
  });
195
175
  const marshalCreateDatasourceRequest = (request, defaults) => ({
196
176
  name: request.name,
197
177
  project_id: request.projectId ?? defaults.defaultProjectId,
198
- type: request.type ?? 'unknown_datasource_type'
178
+ type: request.type
199
179
  });
200
180
  const marshalCreateGrafanaUserRequest = (request, defaults) => ({
201
181
  login: request.login,
202
182
  project_id: request.projectId ?? defaults.defaultProjectId,
203
- role: request.role ?? 'unknown_role'
183
+ role: request.role
204
184
  });
205
185
  const marshalCreateTokenRequest = (request, defaults) => ({
206
186
  name: request.name || randomName('token'),
207
187
  project_id: request.projectId ?? defaults.defaultProjectId,
208
- scopes: request.scopes ? marshalTokenScopes(request.scopes) : undefined
188
+ scopes: request.scopes
209
189
  });
210
190
  const marshalDeactivateCockpitRequest = (request, defaults) => ({
211
191
  project_id: request.projectId ?? defaults.defaultProjectId
212
192
  });
213
193
  const marshalDeleteContactPointRequest = (request, defaults) => ({
214
- contact_point: request.contactPoint ? marshalContactPoint(request.contactPoint) : undefined,
194
+ contact_point: request.contactPoint,
215
195
  project_id: request.projectId ?? defaults.defaultProjectId
216
196
  });
217
197
  const marshalDeleteGrafanaUserRequest = (request, defaults) => ({
@@ -24,7 +24,7 @@ class API extends API$1 {
24
24
  return _this.client.fetch({
25
25
  method: 'GET',
26
26
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
27
- urlParams: urlParams(['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])
27
+ urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
28
28
  }, unmarshalListNamespacesResponse);
29
29
  };
30
30
  })();
@@ -114,7 +114,7 @@ class API extends API$1 {
114
114
  pageOfListContainers = request => this.client.fetch({
115
115
  method: 'GET',
116
116
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`,
117
- urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['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])
117
+ urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
118
118
  }, unmarshalListContainersResponse);
119
119
 
120
120
  /**
@@ -198,7 +198,7 @@ class API extends API$1 {
198
198
  pageOfListCrons = request => this.client.fetch({
199
199
  method: 'GET',
200
200
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
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])
201
+ urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
202
202
  }, unmarshalListCronsResponse);
203
203
 
204
204
  /**
@@ -268,7 +268,7 @@ class API extends API$1 {
268
268
  pageOfListLogs = request => this.client.fetch({
269
269
  method: 'GET',
270
270
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/logs`,
271
- urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
271
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
272
272
  }, unmarshalListLogsResponse);
273
273
 
274
274
  /**
@@ -282,7 +282,7 @@ class API extends API$1 {
282
282
  pageOfListDomains = request => this.client.fetch({
283
283
  method: 'GET',
284
284
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
285
- urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
285
+ urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
286
286
  }, unmarshalListDomainsResponse);
287
287
 
288
288
  /**
@@ -415,7 +415,7 @@ class API extends API$1 {
415
415
  return _this6.client.fetch({
416
416
  method: 'GET',
417
417
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/tokens`,
418
- urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
418
+ urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
419
419
  }, unmarshalListTokensResponse);
420
420
  };
421
421
  })();
@@ -489,16 +489,16 @@ class API extends API$1 {
489
489
  return _this8.client.fetch({
490
490
  method: 'GET',
491
491
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/triggers`,
492
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
493
- default: _this8.client.settings.defaultProjectId,
494
- param: 'project_id',
495
- value: request.projectId
496
- }, {
492
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
497
493
  param: 'container_id',
498
494
  value: request.containerId
499
495
  }, {
500
496
  param: 'namespace_id',
501
497
  value: request.namespaceId
498
+ }, {
499
+ default: _this8.client.settings.defaultProjectId,
500
+ param: 'project_id',
501
+ value: request.projectId
502
502
  }])))
503
503
  }, unmarshalListTriggersResponse);
504
504
  };