@scaleway/sdk 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/api/account/index.js +0 -2
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  3. package/dist/api/baremetal/index.js +2 -2
  4. package/dist/api/baremetal/v1/api.gen.js +2 -2
  5. package/dist/api/billing/index.js +2 -0
  6. package/dist/api/billing/v2alpha1/api.gen.js +52 -0
  7. package/dist/api/billing/v2alpha1/index.gen.js +3 -0
  8. package/dist/api/billing/v2alpha1/marshalling.gen.js +52 -0
  9. package/dist/api/cockpit/v1beta1/api.gen.js +62 -7
  10. package/dist/api/cockpit/v1beta1/marshalling.gen.js +46 -2
  11. package/dist/api/container/v1beta1/api.gen.js +1 -1
  12. package/dist/api/flexibleip/v1alpha1/api.gen.js +8 -1
  13. package/dist/api/function/v1beta1/api.gen.js +1 -1
  14. package/dist/api/function/v1beta1/marshalling.gen.js +3 -20
  15. package/dist/api/iam/v1alpha1/api.gen.js +7 -0
  16. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -10
  17. package/dist/api/instance/index.js +2 -2
  18. package/dist/api/instance/v1/api.gen.js +86 -67
  19. package/dist/api/iot/v1/api.gen.js +1 -1
  20. package/dist/api/k8s/index.js +2 -2
  21. package/dist/api/k8s/v1/api.gen.js +14 -2
  22. package/dist/api/k8s/v1/marshalling.gen.js +6 -1
  23. package/dist/api/lb/index.js +2 -2
  24. package/dist/api/lb/v1/api.gen.js +2 -2
  25. package/dist/api/lb/v1/marshalling.gen.js +33 -19
  26. package/dist/api/mnq/v1alpha1/api.gen.js +1 -1
  27. package/dist/api/rdb/v1/api.gen.js +11 -11
  28. package/dist/api/redis/v1/api.gen.js +89 -27
  29. package/dist/api/redis/v1/marshalling.gen.js +2 -0
  30. package/dist/api/registry/v1/api.gen.js +1 -1
  31. package/dist/api/secret/v1alpha1/api.gen.js +44 -20
  32. package/dist/api/secret/v1alpha1/marshalling.gen.js +14 -2
  33. package/dist/api/tem/v1alpha1/api.gen.js +26 -14
  34. package/dist/api/vpc/v1/api.gen.js +2 -2
  35. package/dist/api/vpcgw/v1/api.gen.js +1 -1
  36. package/dist/api/webhosting/v1alpha1/api.gen.js +4 -3
  37. package/dist/helpers/is-response.js +10 -0
  38. package/dist/index.cjs +625 -366
  39. package/dist/index.d.ts +1444 -1106
  40. package/dist/index.js +44 -42
  41. package/dist/internal/async/interval-retrier.js +6 -0
  42. package/dist/internal/logger/level-resolver.js +3 -3
  43. package/dist/scw/client-ini-factory.js +6 -0
  44. package/dist/scw/client-ini-profile.js +18 -0
  45. package/dist/scw/client-settings.js +12 -0
  46. package/dist/scw/constants.js +1 -1
  47. package/dist/scw/errors/standard/quotas-exceeded-error.js +6 -0
  48. package/dist/scw/fetch/response-parser.js +2 -1
  49. package/package.json +2 -2
  50. package/dist/api/account/v2alpha1/api.gen.js +0 -85
  51. package/dist/api/account/v2alpha1/index.js +0 -1
  52. package/dist/api/account/v2alpha1/marshalling.gen.js +0 -57
@@ -1,4 +1,2 @@
1
- import * as index$1 from './v2alpha1/index.js';
2
- export { index$1 as v2alpha1 };
3
1
  import * as index_gen from './v2/index.gen.js';
4
2
  export { index_gen as v2 };
@@ -209,8 +209,8 @@ class API extends API$1 {
209
209
  path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reinstall`
210
210
  }, unmarshalServer);
211
211
  }
212
+ /** Lists the available zones of the API. */
212
213
  }
213
- /** Lists the available zones of the API. */
214
214
  API.LOCALITIES = ['fr-par-3'];
215
215
 
216
216
  export { API };
@@ -1,2 +1,2 @@
1
- import * as index$1 from './v1/index.js';
2
- export { index$1 as v1 };
1
+ import * as index from './v1/index.js';
2
+ export { index as v1 };
@@ -389,10 +389,10 @@ class API extends API$1 {
389
389
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/os/${validatePathParam('osId', request.osId)}`
390
390
  }, unmarshalOS);
391
391
  }
392
+ /** Lists the available zones of the API. */
392
393
  }
393
394
 
394
395
  /** Elastic Metal Private Network API. */
395
- /** Lists the available zones of the API. */
396
396
  API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
397
397
  class PrivateNetworkAPI extends API$1 {
398
398
  constructor() {
@@ -459,8 +459,8 @@ class PrivateNetworkAPI extends API$1 {
459
459
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
460
460
  });
461
461
  }
462
+ /** Lists the available zones of the API. */
462
463
  }
463
- /** Lists the available zones of the API. */
464
464
  PrivateNetworkAPI.LOCALITIES = ['fr-par-2'];
465
465
 
466
466
  export { API, PrivateNetworkAPI };
@@ -0,0 +1,2 @@
1
+ import * as index_gen from './v2alpha1/index.gen.js';
2
+ export { index_gen as v2alpha1 };
@@ -0,0 +1,52 @@
1
+ import { API as API$1 } from '../../../scw/api.js';
2
+ import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
3
+ import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
+ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from './marshalling.gen.js';
5
+
6
+ // This file was automatically generated. DO NOT EDIT.
7
+ /**
8
+ * Billing API.
9
+ *
10
+ * This API allows you to query your consumption. Billing API.
11
+ */
12
+ class API extends API$1 {
13
+ constructor() {
14
+ var _this;
15
+ super(...arguments);
16
+ _this = this;
17
+ this.getConsumption = function (request) {
18
+ if (request === void 0) {
19
+ request = {};
20
+ }
21
+ return _this.client.fetch({
22
+ method: 'GET',
23
+ path: `/billing/v2alpha1/consumption`,
24
+ urlParams: urlParams(['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId])
25
+ }, unmarshalGetConsumptionResponse);
26
+ };
27
+ this.pageOfListInvoices = function (request) {
28
+ if (request === void 0) {
29
+ request = {};
30
+ }
31
+ return _this.client.fetch({
32
+ method: 'GET',
33
+ path: `/billing/v2alpha1/invoices`,
34
+ urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['started_after', request.startedAfter], ['started_before', request.startedBefore])
35
+ }, unmarshalListInvoicesResponse);
36
+ };
37
+ this.listInvoices = function (request) {
38
+ if (request === void 0) {
39
+ request = {};
40
+ }
41
+ return enrichForPagination('invoices', _this.pageOfListInvoices, request);
42
+ };
43
+ this.downloadInvoice = request => this.client.fetch({
44
+ method: 'GET',
45
+ path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
46
+ urlParams: urlParams(['dl', 1], ['file_type', request.fileType ?? 'pdf']),
47
+ responseType: 'blob'
48
+ });
49
+ }
50
+ }
51
+
52
+ export { API };
@@ -0,0 +1,3 @@
1
+ export { API } from './api.gen.js';
2
+
3
+ // This file was automatically generated. DO NOT EDIT.
@@ -0,0 +1,52 @@
1
+ import { isJSONObject } from '../../../helpers/json.js';
2
+ import { unmarshalMoney } from '../../../scw/custom-marshalling.js';
3
+ import { unmarshalArrayOfObject, unmarshalDate } from '../../../helpers/marshalling.js';
4
+
5
+ // This file was automatically generated. DO NOT EDIT.
6
+ const unmarshalGetConsumptionResponseConsumption = data => {
7
+ if (!isJSONObject(data)) {
8
+ throw new TypeError(`Unmarshalling the type 'GetConsumptionResponseConsumption' failed as data isn't a dictionary.`);
9
+ }
10
+ return {
11
+ category: data.category,
12
+ description: data.description,
13
+ operationPath: data.operation_path,
14
+ projectId: data.project_id,
15
+ value: data.value ? unmarshalMoney(data.value) : undefined
16
+ };
17
+ };
18
+ const unmarshalInvoice = data => {
19
+ if (!isJSONObject(data)) {
20
+ throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
21
+ }
22
+ return {
23
+ dueDate: unmarshalDate(data.due_date),
24
+ id: data.id,
25
+ invoiceType: data.invoice_type,
26
+ issuedDate: unmarshalDate(data.issued_date),
27
+ number: data.number,
28
+ startDate: unmarshalDate(data.start_date),
29
+ totalTaxed: data.total_taxed ? unmarshalMoney(data.total_taxed) : undefined,
30
+ totalUntaxed: data.total_untaxed ? unmarshalMoney(data.total_untaxed) : undefined
31
+ };
32
+ };
33
+ const unmarshalGetConsumptionResponse = data => {
34
+ if (!isJSONObject(data)) {
35
+ throw new TypeError(`Unmarshalling the type 'GetConsumptionResponse' failed as data isn't a dictionary.`);
36
+ }
37
+ return {
38
+ consumptions: unmarshalArrayOfObject(data.consumptions, unmarshalGetConsumptionResponseConsumption),
39
+ updatedAt: unmarshalDate(data.updated_at)
40
+ };
41
+ };
42
+ const unmarshalListInvoicesResponse = data => {
43
+ if (!isJSONObject(data)) {
44
+ throw new TypeError(`Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`);
45
+ }
46
+ return {
47
+ invoices: unmarshalArrayOfObject(data.invoices, unmarshalInvoice),
48
+ totalCount: data.total_count
49
+ };
50
+ };
51
+
52
+ export { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse };
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
3
3
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { COCKPIT_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { marshalActivateCockpitRequest, unmarshalCockpit, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest } from './marshalling.gen.js';
6
+ import { marshalActivateCockpitRequest, unmarshalCockpit, unmarshalCockpitMetrics, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalSelectPlanResponse } from './marshalling.gen.js';
7
7
 
8
8
  // This file was automatically generated. DO NOT EDIT.
9
9
  const jsonContentHeaders = {
@@ -67,6 +67,22 @@ class API extends API$1 {
67
67
  }
68
68
  return waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this.getCockpit, request, options);
69
69
  };
70
+ /**
71
+ * Get cockpit metrics. Get the cockpit metrics with the given project ID.
72
+ *
73
+ * @param request - The request {@link GetCockpitMetricsRequest}
74
+ * @returns A Promise of CockpitMetrics
75
+ */
76
+ this.getCockpitMetrics = function (request) {
77
+ if (request === void 0) {
78
+ request = {};
79
+ }
80
+ return _this.client.fetch({
81
+ method: 'GET',
82
+ path: `/cockpit/v1beta1/cockpit/metrics`,
83
+ urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId], ['start_date', request.startDate])
84
+ }, unmarshalCockpitMetrics);
85
+ };
70
86
  /**
71
87
  * Deactivate a cockpit. Deactivate a cockpit associated with the given
72
88
  * project ID.
@@ -109,12 +125,17 @@ class API extends API$1 {
109
125
  * @param request - The request {@link CreateTokenRequest}
110
126
  * @returns A Promise of Token
111
127
  */
112
- this.createToken = request => this.client.fetch({
113
- body: JSON.stringify(marshalCreateTokenRequest(request, this.client.settings)),
114
- headers: jsonContentHeaders,
115
- method: 'POST',
116
- path: `/cockpit/v1beta1/tokens`
117
- }, unmarshalToken);
128
+ this.createToken = function (request) {
129
+ if (request === void 0) {
130
+ request = {};
131
+ }
132
+ return _this.client.fetch({
133
+ body: JSON.stringify(marshalCreateTokenRequest(request, _this.client.settings)),
134
+ headers: jsonContentHeaders,
135
+ method: 'POST',
136
+ path: `/cockpit/v1beta1/tokens`
137
+ }, unmarshalToken);
138
+ };
118
139
  this.pageOfListTokens = function (request) {
119
140
  if (request === void 0) {
120
141
  request = {};
@@ -321,6 +342,40 @@ class API extends API$1 {
321
342
  method: 'POST',
322
343
  path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
323
344
  }, unmarshalGrafanaUser);
345
+ this.pageOfListPlans = function (request) {
346
+ if (request === void 0) {
347
+ request = {};
348
+ }
349
+ return _this.client.fetch({
350
+ method: 'GET',
351
+ path: `/cockpit/v1beta1/plans`,
352
+ urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
353
+ }, unmarshalListPlansResponse);
354
+ };
355
+ /**
356
+ * List plans. List all pricing plans.
357
+ *
358
+ * @param request - The request {@link ListPlansRequest}
359
+ * @returns A Promise of ListPlansResponse
360
+ */
361
+ this.listPlans = function (request) {
362
+ if (request === void 0) {
363
+ request = {};
364
+ }
365
+ return enrichForPagination('plans', _this.pageOfListPlans, request);
366
+ };
367
+ /**
368
+ * Select pricing plan. Select the wanted pricing plan.
369
+ *
370
+ * @param request - The request {@link SelectPlanRequest}
371
+ * @returns A Promise of SelectPlanResponse
372
+ */
373
+ this.selectPlan = request => this.client.fetch({
374
+ body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
375
+ headers: jsonContentHeaders,
376
+ method: 'POST',
377
+ path: `/cockpit/v1beta1/select-plan`
378
+ }, unmarshalSelectPlanResponse);
324
379
  }
325
380
  }
326
381
 
@@ -1,4 +1,6 @@
1
+ import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
1
2
  import { isJSONObject } from '../../../helpers/json.js';
3
+ import { unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
2
4
  import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
3
5
 
4
6
  // This file was automatically generated. DO NOT EDIT.
@@ -54,6 +56,20 @@ const unmarshalGrafanaUser = data => {
54
56
  role: data.role
55
57
  };
56
58
  };
59
+ const unmarshalPlan = data => {
60
+ if (!isJSONObject(data)) {
61
+ throw new TypeError(`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`);
62
+ }
63
+ return {
64
+ id: data.id,
65
+ logsIngestionPrice: data.logs_ingestion_price,
66
+ name: data.name,
67
+ retentionLogsInterval: data.retention_logs_interval,
68
+ retentionMetricsInterval: data.retention_metrics_interval,
69
+ retentionPrice: data.retention_price,
70
+ sampleIngestionPrice: data.sample_ingestion_price
71
+ };
72
+ };
57
73
  const unmarshalToken = data => {
58
74
  if (!isJSONObject(data)) {
59
75
  throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
@@ -76,11 +92,20 @@ const unmarshalCockpit = data => {
76
92
  createdAt: unmarshalDate(data.created_at),
77
93
  endpoints: data.endpoints ? unmarshalCockpitEndpoints(data.endpoints) : undefined,
78
94
  managedAlertsEnabled: data.managed_alerts_enabled,
95
+ plan: data.plan ? unmarshalPlan(data.plan) : undefined,
79
96
  projectId: data.project_id,
80
97
  status: data.status,
81
98
  updatedAt: unmarshalDate(data.updated_at)
82
99
  };
83
100
  };
101
+ const unmarshalCockpitMetrics = data => {
102
+ if (!isJSONObject(data)) {
103
+ throw new TypeError(`Unmarshalling the type 'CockpitMetrics' failed as data isn't a dictionary.`);
104
+ }
105
+ return {
106
+ timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
107
+ };
108
+ };
84
109
  const unmarshalListContactPointsResponse = data => {
85
110
  if (!isJSONObject(data)) {
86
111
  throw new TypeError(`Unmarshalling the type 'ListContactPointsResponse' failed as data isn't a dictionary.`);
@@ -101,6 +126,15 @@ const unmarshalListGrafanaUsersResponse = data => {
101
126
  totalCount: data.total_count
102
127
  };
103
128
  };
129
+ const unmarshalListPlansResponse = data => {
130
+ if (!isJSONObject(data)) {
131
+ throw new TypeError(`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`);
132
+ }
133
+ return {
134
+ plans: unmarshalArrayOfObject(data.plans, unmarshalPlan),
135
+ totalCount: data.total_count
136
+ };
137
+ };
104
138
  const unmarshalListTokensResponse = data => {
105
139
  if (!isJSONObject(data)) {
106
140
  throw new TypeError(`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`);
@@ -110,6 +144,12 @@ const unmarshalListTokensResponse = data => {
110
144
  totalCount: data.total_count
111
145
  };
112
146
  };
147
+ const unmarshalSelectPlanResponse = data => {
148
+ if (!isJSONObject(data)) {
149
+ throw new TypeError(`Unmarshalling the type 'SelectPlanResponse' failed as data isn't a dictionary.`);
150
+ }
151
+ return {};
152
+ };
113
153
  const marshalContactPointEmail = (request, defaults) => ({
114
154
  to: request.to
115
155
  });
@@ -141,7 +181,7 @@ const marshalCreateGrafanaUserRequest = (request, defaults) => ({
141
181
  role: request.role ?? 'unknown_role'
142
182
  });
143
183
  const marshalCreateTokenRequest = (request, defaults) => ({
144
- name: request.name,
184
+ name: request.name || randomName('token'),
145
185
  project_id: request.projectId ?? defaults.defaultProjectId,
146
186
  scopes: request.scopes ? marshalTokenScopes(request.scopes) : undefined
147
187
  });
@@ -167,8 +207,12 @@ const marshalResetCockpitGrafanaRequest = (request, defaults) => ({
167
207
  const marshalResetGrafanaUserPasswordRequest = (request, defaults) => ({
168
208
  project_id: request.projectId ?? defaults.defaultProjectId
169
209
  });
210
+ const marshalSelectPlanRequest = (request, defaults) => ({
211
+ plan_id: request.planId,
212
+ project_id: request.projectId ?? defaults.defaultProjectId
213
+ });
170
214
  const marshalTriggerTestAlertRequest = (request, defaults) => ({
171
215
  project_id: request.projectId ?? defaults.defaultProjectId
172
216
  });
173
217
 
174
- export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalContactPoint, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListGrafanaUsersResponse, unmarshalListTokensResponse, unmarshalToken };
218
+ export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalSelectPlanRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalCockpitMetrics, unmarshalContactPoint, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListTokensResponse, unmarshalSelectPlanResponse, unmarshalToken };
@@ -395,8 +395,8 @@ class API extends API$1 {
395
395
  path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
396
396
  }, unmarshalToken);
397
397
  }
398
+ /** Lists the available regions of the API. */
398
399
  }
399
- /** Lists the available regions of the API. */
400
400
  API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
401
401
 
402
402
  export { API };
@@ -138,6 +138,13 @@ class API extends API$1 {
138
138
  method: 'POST',
139
139
  path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac/duplicate`
140
140
  }, unmarshalFlexibleIP);
141
+ /**
142
+ * Move a virtual MAC. Move a Virtual MAC from a given Flexible IP onto
143
+ * another Flexible IP.
144
+ *
145
+ * @param request - The request {@link MoveMACAddrRequest}
146
+ * @returns A Promise of FlexibleIP
147
+ */
141
148
  this.moveMACAddr = request => this.client.fetch({
142
149
  body: JSON.stringify(marshalMoveMACAddrRequest(request, this.client.settings)),
143
150
  headers: jsonContentHeaders,
@@ -154,8 +161,8 @@ class API extends API$1 {
154
161
  path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
155
162
  });
156
163
  }
164
+ /** Lists the available zones of the API. */
157
165
  }
158
- /** Lists the available zones of the API. */
159
166
  API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
160
167
 
161
168
  export { API };
@@ -487,8 +487,8 @@ class API extends API$1 {
487
487
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
488
488
  }, unmarshalTrigger);
489
489
  }
490
+ /** Lists the available regions of the API. */
490
491
  }
491
- /** Lists the available regions of the API. */
492
492
  API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
493
493
 
494
494
  export { API };
@@ -17,6 +17,7 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
17
17
  throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
18
18
  }
19
19
  return {
20
+ mnqCredentialId: data.mnq_credential_id,
20
21
  mnqNamespaceId: data.mnq_namespace_id,
21
22
  mnqProjectId: data.mnq_project_id,
22
23
  mnqRegion: data.mnq_region,
@@ -28,6 +29,7 @@ const unmarshalTriggerMnqSqsClientConfig = data => {
28
29
  throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
29
30
  }
30
31
  return {
32
+ mnqCredentialId: data.mnq_credential_id,
31
33
  mnqNamespaceId: data.mnq_namespace_id,
32
34
  mnqProjectId: data.mnq_project_id,
33
35
  mnqRegion: data.mnq_region,
@@ -140,6 +142,7 @@ const unmarshalRuntime = data => {
140
142
  extension: data.extension,
141
143
  implementation: data.implementation,
142
144
  language: data.language,
145
+ logoUrl: data.logo_url,
143
146
  name: data.name,
144
147
  status: data.status,
145
148
  statusMessage: data.status_message,
@@ -290,22 +293,8 @@ const marshalSecret = (request, defaults) => ({
290
293
  key: request.key,
291
294
  value: request.value
292
295
  });
293
- const marshalUpdateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
294
- mnq_namespace_id: request.mnqNamespaceId,
295
- mnq_project_id: request.mnqProjectId,
296
- mnq_region: request.mnqRegion,
297
- subject: request.subject
298
- });
299
- const marshalUpdateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
300
- mnq_namespace_id: request.mnqNamespaceId,
301
- mnq_project_id: request.mnqProjectId,
302
- mnq_region: request.mnqRegion,
303
- queue: request.queue
304
- });
305
296
  const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
306
297
  access_key: request.accessKey,
307
- endpoint: request.endpoint,
308
- queue_url: request.queueUrl,
309
298
  secret_key: request.secretKey
310
299
  });
311
300
  const marshalCreateCronRequest = (request, defaults) => ({
@@ -395,14 +384,8 @@ const marshalUpdateTriggerRequest = (request, defaults) => ({
395
384
  description: request.description,
396
385
  name: request.name,
397
386
  ...resolveOneOf([{
398
- param: 'scw_sqs_config',
399
- value: request.scwSqsConfig ? marshalUpdateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
400
- }, {
401
387
  param: 'sqs_config',
402
388
  value: request.sqsConfig ? marshalUpdateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
403
- }, {
404
- param: 'scw_nats_config',
405
- value: request.scwNatsConfig ? marshalUpdateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
406
389
  }])
407
390
  });
408
391
 
@@ -420,6 +420,13 @@ class API extends API$1 {
420
420
  method: 'DELETE',
421
421
  path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
422
422
  });
423
+ /**
424
+ * Clone a policy. Clone a policy. You must define specify the `policy_id`
425
+ * parameter in your request.
426
+ *
427
+ * @param request - The request {@link ClonePolicyRequest}
428
+ * @returns A Promise of Policy
429
+ */
423
430
  this.clonePolicy = request => this.client.fetch({
424
431
  body: '{}',
425
432
  headers: jsonContentHeaders,
@@ -60,7 +60,7 @@ const ListAPIKeysRequest = {
60
60
  maxLength: 200
61
61
  },
62
62
  page: {
63
- greaterThanOrEqual: 1
63
+ greaterThan: 0
64
64
  },
65
65
  pageSize: {
66
66
  greaterThanOrEqual: 1,
@@ -74,7 +74,7 @@ const ListApplicationsRequest = {
74
74
  pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
75
75
  },
76
76
  page: {
77
- greaterThanOrEqual: 1
77
+ greaterThan: 0
78
78
  },
79
79
  pageSize: {
80
80
  greaterThanOrEqual: 1,
@@ -86,7 +86,7 @@ const ListGroupsRequest = {
86
86
  minLength: 1
87
87
  },
88
88
  page: {
89
- greaterThanOrEqual: 1
89
+ greaterThan: 0
90
90
  },
91
91
  pageSize: {
92
92
  greaterThanOrEqual: 1,
@@ -95,7 +95,7 @@ const ListGroupsRequest = {
95
95
  };
96
96
  const ListJWTsRequest = {
97
97
  page: {
98
- greaterThanOrEqual: 1
98
+ greaterThan: 0
99
99
  },
100
100
  pageSize: {
101
101
  greaterThanOrEqual: 1,
@@ -104,7 +104,7 @@ const ListJWTsRequest = {
104
104
  };
105
105
  const ListPermissionSetsRequest = {
106
106
  page: {
107
- greaterThanOrEqual: 1
107
+ greaterThan: 0
108
108
  },
109
109
  pageSize: {
110
110
  greaterThanOrEqual: 1,
@@ -113,7 +113,7 @@ const ListPermissionSetsRequest = {
113
113
  };
114
114
  const ListPoliciesRequest = {
115
115
  page: {
116
- greaterThanOrEqual: 1
116
+ greaterThan: 0
117
117
  },
118
118
  pageSize: {
119
119
  greaterThanOrEqual: 1,
@@ -125,7 +125,7 @@ const ListPoliciesRequest = {
125
125
  };
126
126
  const ListQuotaRequest = {
127
127
  page: {
128
- greaterThanOrEqual: 1
128
+ greaterThan: 0
129
129
  },
130
130
  pageSize: {
131
131
  greaterThanOrEqual: 1,
@@ -134,7 +134,7 @@ const ListQuotaRequest = {
134
134
  };
135
135
  const ListRulesRequest = {
136
136
  page: {
137
- greaterThanOrEqual: 1
137
+ greaterThan: 0
138
138
  },
139
139
  pageSize: {
140
140
  greaterThanOrEqual: 1,
@@ -147,7 +147,7 @@ const ListSSHKeysRequest = {
147
147
  minLength: 1
148
148
  },
149
149
  page: {
150
- greaterThanOrEqual: 1
150
+ greaterThan: 0
151
151
  },
152
152
  pageSize: {
153
153
  greaterThanOrEqual: 1,
@@ -156,7 +156,7 @@ const ListSSHKeysRequest = {
156
156
  };
157
157
  const ListUsersRequest = {
158
158
  page: {
159
- greaterThanOrEqual: 1
159
+ greaterThan: 0
160
160
  },
161
161
  pageSize: {
162
162
  greaterThanOrEqual: 1,
@@ -1,2 +1,2 @@
1
- import * as index$1 from './v1/index.js';
2
- export { index$1 as v1 };
1
+ import * as index from './v1/index.js';
2
+ export { index as v1 };