@scaleway/sdk 2.66.0 → 2.67.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 (34) hide show
  1. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +1 -1
  2. package/dist/api/cockpit/v1/api.gen.cjs +14 -17
  3. package/dist/api/cockpit/v1/api.gen.d.ts +6 -9
  4. package/dist/api/cockpit/v1/api.gen.js +15 -18
  5. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  6. package/dist/api/cockpit/v1/marshalling.gen.cjs +29 -26
  7. package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -2
  8. package/dist/api/cockpit/v1/marshalling.gen.js +29 -26
  9. package/dist/api/cockpit/v1/types.gen.d.ts +49 -34
  10. package/dist/api/cockpit/v1/validation-rules.gen.cjs +0 -10
  11. package/dist/api/cockpit/v1/validation-rules.gen.d.ts +0 -9
  12. package/dist/api/cockpit/v1/validation-rules.gen.js +0 -10
  13. package/dist/api/lb/v1/marshalling.gen.cjs +5 -0
  14. package/dist/api/lb/v1/marshalling.gen.js +5 -0
  15. package/dist/api/lb/v1/types.gen.d.ts +25 -0
  16. package/dist/api/secret/v1beta1/api.gen.cjs +33 -0
  17. package/dist/api/secret/v1beta1/api.gen.d.ts +17 -1
  18. package/dist/api/secret/v1beta1/api.gen.js +33 -0
  19. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  20. package/dist/api/secret/v1beta1/marshalling.gen.cjs +2 -0
  21. package/dist/api/secret/v1beta1/marshalling.gen.js +2 -0
  22. package/dist/api/secret/v1beta1/types.gen.d.ts +30 -3
  23. package/dist/api/vpcgw/v1/api.gen.cjs +6 -0
  24. package/dist/api/vpcgw/v1/api.gen.d.ts +2 -1
  25. package/dist/api/vpcgw/v1/api.gen.js +6 -0
  26. package/dist/api/vpcgw/v1/index.gen.d.ts +1 -1
  27. package/dist/api/vpcgw/v1/types.gen.d.ts +5 -0
  28. package/dist/api/webhosting/v1/marshalling.gen.cjs +7 -3
  29. package/dist/api/webhosting/v1/marshalling.gen.js +7 -3
  30. package/dist/api/webhosting/v1/types.gen.d.ts +14 -6
  31. package/dist/scw/constants.cjs +1 -1
  32. package/dist/scw/constants.d.ts +2 -2
  33. package/dist/scw/constants.js +1 -1
  34. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import type { Region as ScwRegion } from '../../../bridge';
2
2
  export type ListEventsRequestOrderBy = 'recorded_at_desc' | 'recorded_at_asc';
3
- export type ResourceType = 'unknown_type' | 'secm_secret' | 'secm_secret_version' | 'kube_cluster' | 'kube_pool' | 'kube_node' | 'kube_acl' | 'keym_key';
3
+ export type ResourceType = 'unknown_type' | 'secm_secret' | 'secm_secret_version' | 'kube_cluster' | 'kube_pool' | 'kube_node' | 'kube_acl' | 'keym_key' | 'iamx_user' | 'iamx_application' | 'iamx_group' | 'iamx_policy' | 'iamx_api_key' | 'iamx_ssh_key';
4
4
  export interface KeyManagerKeyInfo {
5
5
  }
6
6
  export interface KubernetesACLInfo {
@@ -623,32 +623,29 @@ class RegionalAPI extends api.API {
623
623
  method: "POST",
624
624
  path: `/cockpit/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
625
625
  });
626
- pageOfListManagedAlerts = (request = {}) => this.client.fetch(
626
+ /**
627
+ * List alerts. List preconfigured and/or custom alerts for the specified
628
+ * Project.
629
+ *
630
+ * @param request - The request {@link RegionalApiListAlertsRequest}
631
+ * @returns A Promise of ListAlertsResponse
632
+ */
633
+ listAlerts = (request = {}) => this.client.fetch(
627
634
  {
628
635
  method: "GET",
629
- path: `/cockpit/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/managed-alerts`,
636
+ path: `/cockpit/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alerts`,
630
637
  urlParams: marshalling.urlParams(
631
- ["order_by", request.orderBy],
632
- ["page", request.page],
633
- [
634
- "page_size",
635
- request.pageSize ?? this.client.settings.defaultPageSize
636
- ],
638
+ ["is_enabled", request.isEnabled],
639
+ ["is_preconfigured", request.isPreconfigured],
637
640
  [
638
641
  "project_id",
639
642
  request.projectId ?? this.client.settings.defaultProjectId
640
- ]
643
+ ],
644
+ ["state", request.state]
641
645
  )
642
646
  },
643
- marshalling_gen.unmarshalListManagedAlertsResponse
647
+ marshalling_gen.unmarshalListAlertsResponse
644
648
  );
645
- /**
646
- * List managed alerts. List all managed alerts for the specified Project.
647
- *
648
- * @param request - The request {@link RegionalApiListManagedAlertsRequest}
649
- * @returns A Promise of ListManagedAlertsResponse
650
- */
651
- listManagedAlerts = (request = {}) => resourcePaginator.enrichForPagination("alerts", this.pageOfListManagedAlerts, request);
652
649
  /**
653
650
  * Enable managed alerts. Enable the sending of managed alerts for the
654
651
  * specified Project. Managed alerts are predefined alerts that apply to
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region as ScwRegion } from '../../../bridge';
3
- import type { AlertManager, ContactPoint, DataSource, GetConfigResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListManagedAlertsResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetConfigRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListManagedAlertsRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, UsageOverview } from './types.gen';
3
+ import type { AlertManager, ContactPoint, DataSource, GetConfigResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListAlertsResponse, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetConfigRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListAlertsRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, UsageOverview } from './types.gen';
4
4
  /**
5
5
  * Cockpit Global API.
6
6
  *
@@ -305,17 +305,14 @@ export declare class RegionalAPI extends ParentAPI {
305
305
  * @param request - The request {@link RegionalApiDeleteContactPointRequest}
306
306
  */
307
307
  deleteContactPoint: (request?: Readonly<RegionalApiDeleteContactPointRequest>) => Promise<void>;
308
- protected pageOfListManagedAlerts: (request?: Readonly<RegionalApiListManagedAlertsRequest>) => Promise<ListManagedAlertsResponse>;
309
308
  /**
310
- * List managed alerts. List all managed alerts for the specified Project.
309
+ * List alerts. List preconfigured and/or custom alerts for the specified
310
+ * Project.
311
311
  *
312
- * @param request - The request {@link RegionalApiListManagedAlertsRequest}
313
- * @returns A Promise of ListManagedAlertsResponse
312
+ * @param request - The request {@link RegionalApiListAlertsRequest}
313
+ * @returns A Promise of ListAlertsResponse
314
314
  */
315
- listManagedAlerts: (request?: Readonly<RegionalApiListManagedAlertsRequest>) => Promise<ListManagedAlertsResponse> & {
316
- all: () => Promise<import("./types.gen").Alert[]>;
317
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Alert[], void, void>;
318
- };
315
+ listAlerts: (request?: Readonly<RegionalApiListAlertsRequest>) => Promise<ListAlertsResponse>;
319
316
  /**
320
317
  * Enable managed alerts. Enable the sending of managed alerts for the
321
318
  * specified Project. Managed alerts are predefined alerts that apply to
@@ -2,7 +2,7 @@ import { API as API$1 } from "../../../scw/api.js";
2
2
  import { urlParams, validatePathParam } from "../../../helpers/marshalling.js";
3
3
  import "../../../vendor/base64/index.js";
4
4
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
5
- import { unmarshalGrafana, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalGlobalApiCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalGlobalApiResetGrafanaUserPasswordRequest, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard, unmarshalListPlansResponse, marshalGlobalApiSelectPlanRequest, unmarshalPlan, unmarshalGetConfigResponse, marshalRegionalApiCreateDataSourceRequest, unmarshalDataSource, unmarshalListDataSourcesResponse, marshalRegionalApiUpdateDataSourceRequest, unmarshalUsageOverview, marshalRegionalApiCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, unmarshalAlertManager, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalRegionalApiUpdateContactPointRequest, marshalRegionalApiDeleteContactPointRequest, unmarshalListManagedAlertsResponse, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest } from "./marshalling.gen.js";
5
+ import { unmarshalGrafana, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalGlobalApiCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalGlobalApiResetGrafanaUserPasswordRequest, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard, unmarshalListPlansResponse, marshalGlobalApiSelectPlanRequest, unmarshalPlan, unmarshalGetConfigResponse, marshalRegionalApiCreateDataSourceRequest, unmarshalDataSource, unmarshalListDataSourcesResponse, marshalRegionalApiUpdateDataSourceRequest, unmarshalUsageOverview, marshalRegionalApiCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, unmarshalAlertManager, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalRegionalApiUpdateContactPointRequest, marshalRegionalApiDeleteContactPointRequest, unmarshalListAlertsResponse, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest } from "./marshalling.gen.js";
6
6
  const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
@@ -621,32 +621,29 @@ class RegionalAPI extends API$1 {
621
621
  method: "POST",
622
622
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
623
623
  });
624
- pageOfListManagedAlerts = (request = {}) => this.client.fetch(
624
+ /**
625
+ * List alerts. List preconfigured and/or custom alerts for the specified
626
+ * Project.
627
+ *
628
+ * @param request - The request {@link RegionalApiListAlertsRequest}
629
+ * @returns A Promise of ListAlertsResponse
630
+ */
631
+ listAlerts = (request = {}) => this.client.fetch(
625
632
  {
626
633
  method: "GET",
627
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/managed-alerts`,
634
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alerts`,
628
635
  urlParams: urlParams(
629
- ["order_by", request.orderBy],
630
- ["page", request.page],
631
- [
632
- "page_size",
633
- request.pageSize ?? this.client.settings.defaultPageSize
634
- ],
636
+ ["is_enabled", request.isEnabled],
637
+ ["is_preconfigured", request.isPreconfigured],
635
638
  [
636
639
  "project_id",
637
640
  request.projectId ?? this.client.settings.defaultProjectId
638
- ]
641
+ ],
642
+ ["state", request.state]
639
643
  )
640
644
  },
641
- unmarshalListManagedAlertsResponse
645
+ unmarshalListAlertsResponse
642
646
  );
643
- /**
644
- * List managed alerts. List all managed alerts for the specified Project.
645
- *
646
- * @param request - The request {@link RegionalApiListManagedAlertsRequest}
647
- * @returns A Promise of ListManagedAlertsResponse
648
- */
649
- listManagedAlerts = (request = {}) => enrichForPagination("alerts", this.pageOfListManagedAlerts, request);
650
647
  /**
651
648
  * Enable managed alerts. Enable the sending of managed alerts for the
652
649
  * specified Project. Managed alerts are predefined alerts that apply to
@@ -1,3 +1,3 @@
1
1
  export { GlobalAPI, RegionalAPI } from './api.gen.js';
2
- export type { Alert, AlertManager, ContactPoint, ContactPointEmail, DataSource, DataSourceOrigin, DataSourceType, GetConfigResponse, GetConfigResponseRetention, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, GrafanaUserRole, ListContactPointsResponse, ListDataSourcesRequestOrderBy, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersRequestOrderBy, ListGrafanaUsersResponse, ListManagedAlertsRequestOrderBy, ListManagedAlertsResponse, ListPlansRequestOrderBy, ListPlansResponse, ListTokensRequestOrderBy, ListTokensResponse, Plan, PlanName, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetConfigRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListManagedAlertsRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, TokenScope, Usage, UsageOverview, UsageUnit, } from './types.gen';
2
+ export type { Alert, AlertManager, AlertState, ContactPoint, ContactPointEmail, DataSource, DataSourceOrigin, DataSourceType, GetConfigResponse, GetConfigResponseRetention, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, GrafanaUserRole, ListAlertsResponse, ListContactPointsResponse, ListDataSourcesRequestOrderBy, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersRequestOrderBy, ListGrafanaUsersResponse, ListPlansRequestOrderBy, ListPlansResponse, ListTokensRequestOrderBy, ListTokensResponse, Plan, PlanName, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetConfigRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListAlertsRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, TokenScope, Usage, UsageOverview, UsageUnit, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -155,6 +155,34 @@ const unmarshalGrafana = (data) => {
155
155
  grafanaUrl: data.grafana_url
156
156
  };
157
157
  };
158
+ const unmarshalAlert = (data) => {
159
+ if (!json.isJSONObject(data)) {
160
+ throw new TypeError(
161
+ `Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
162
+ );
163
+ }
164
+ return {
165
+ annotations: data.annotations,
166
+ duration: data.duration,
167
+ enabled: data.enabled,
168
+ name: data.name,
169
+ preconfigured: data.preconfigured,
170
+ region: data.region,
171
+ rule: data.rule,
172
+ state: data.state ? data.state : void 0
173
+ };
174
+ };
175
+ const unmarshalListAlertsResponse = (data) => {
176
+ if (!json.isJSONObject(data)) {
177
+ throw new TypeError(
178
+ `Unmarshalling the type 'ListAlertsResponse' failed as data isn't a dictionary.`
179
+ );
180
+ }
181
+ return {
182
+ alerts: marshalling.unmarshalArrayOfObject(data.alerts, unmarshalAlert),
183
+ totalCount: data.total_count
184
+ };
185
+ };
158
186
  const unmarshalListContactPointsResponse = (data) => {
159
187
  if (!json.isJSONObject(data)) {
160
188
  throw new TypeError(
@@ -210,31 +238,6 @@ const unmarshalListGrafanaUsersResponse = (data) => {
210
238
  totalCount: data.total_count
211
239
  };
212
240
  };
213
- const unmarshalAlert = (data) => {
214
- if (!json.isJSONObject(data)) {
215
- throw new TypeError(
216
- `Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
217
- );
218
- }
219
- return {
220
- description: data.description,
221
- name: data.name,
222
- product: data.product,
223
- productFamily: data.product_family,
224
- rule: data.rule
225
- };
226
- };
227
- const unmarshalListManagedAlertsResponse = (data) => {
228
- if (!json.isJSONObject(data)) {
229
- throw new TypeError(
230
- `Unmarshalling the type 'ListManagedAlertsResponse' failed as data isn't a dictionary.`
231
- );
232
- }
233
- return {
234
- alerts: marshalling.unmarshalArrayOfObject(data.alerts, unmarshalAlert),
235
- totalCount: data.total_count
236
- };
237
- };
238
241
  const unmarshalListPlansResponse = (data) => {
239
242
  if (!json.isJSONObject(data)) {
240
243
  throw new TypeError(
@@ -387,11 +390,11 @@ exports.unmarshalGetConfigResponse = unmarshalGetConfigResponse;
387
390
  exports.unmarshalGrafana = unmarshalGrafana;
388
391
  exports.unmarshalGrafanaProductDashboard = unmarshalGrafanaProductDashboard;
389
392
  exports.unmarshalGrafanaUser = unmarshalGrafanaUser;
393
+ exports.unmarshalListAlertsResponse = unmarshalListAlertsResponse;
390
394
  exports.unmarshalListContactPointsResponse = unmarshalListContactPointsResponse;
391
395
  exports.unmarshalListDataSourcesResponse = unmarshalListDataSourcesResponse;
392
396
  exports.unmarshalListGrafanaProductDashboardsResponse = unmarshalListGrafanaProductDashboardsResponse;
393
397
  exports.unmarshalListGrafanaUsersResponse = unmarshalListGrafanaUsersResponse;
394
- exports.unmarshalListManagedAlertsResponse = unmarshalListManagedAlertsResponse;
395
398
  exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
396
399
  exports.unmarshalListTokensResponse = unmarshalListTokensResponse;
397
400
  exports.unmarshalPlan = unmarshalPlan;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { AlertManager, ContactPoint, DataSource, GetConfigResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListManagedAlertsResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, UsageOverview } from './types.gen';
2
+ import type { AlertManager, ContactPoint, DataSource, GetConfigResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListAlertsResponse, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, UsageOverview } from './types.gen';
3
3
  export declare const unmarshalContactPoint: (data: unknown) => ContactPoint;
4
4
  export declare const unmarshalDataSource: (data: unknown) => DataSource;
5
5
  export declare const unmarshalGrafanaProductDashboard: (data: unknown) => GrafanaProductDashboard;
@@ -9,11 +9,11 @@ export declare const unmarshalToken: (data: unknown) => Token;
9
9
  export declare const unmarshalAlertManager: (data: unknown) => AlertManager;
10
10
  export declare const unmarshalGetConfigResponse: (data: unknown) => GetConfigResponse;
11
11
  export declare const unmarshalGrafana: (data: unknown) => Grafana;
12
+ export declare const unmarshalListAlertsResponse: (data: unknown) => ListAlertsResponse;
12
13
  export declare const unmarshalListContactPointsResponse: (data: unknown) => ListContactPointsResponse;
13
14
  export declare const unmarshalListDataSourcesResponse: (data: unknown) => ListDataSourcesResponse;
14
15
  export declare const unmarshalListGrafanaProductDashboardsResponse: (data: unknown) => ListGrafanaProductDashboardsResponse;
15
16
  export declare const unmarshalListGrafanaUsersResponse: (data: unknown) => ListGrafanaUsersResponse;
16
- export declare const unmarshalListManagedAlertsResponse: (data: unknown) => ListManagedAlertsResponse;
17
17
  export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
18
18
  export declare const unmarshalListTokensResponse: (data: unknown) => ListTokensResponse;
19
19
  export declare const unmarshalUsageOverview: (data: unknown) => UsageOverview;
@@ -153,6 +153,34 @@ const unmarshalGrafana = (data) => {
153
153
  grafanaUrl: data.grafana_url
154
154
  };
155
155
  };
156
+ const unmarshalAlert = (data) => {
157
+ if (!isJSONObject(data)) {
158
+ throw new TypeError(
159
+ `Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
160
+ );
161
+ }
162
+ return {
163
+ annotations: data.annotations,
164
+ duration: data.duration,
165
+ enabled: data.enabled,
166
+ name: data.name,
167
+ preconfigured: data.preconfigured,
168
+ region: data.region,
169
+ rule: data.rule,
170
+ state: data.state ? data.state : void 0
171
+ };
172
+ };
173
+ const unmarshalListAlertsResponse = (data) => {
174
+ if (!isJSONObject(data)) {
175
+ throw new TypeError(
176
+ `Unmarshalling the type 'ListAlertsResponse' failed as data isn't a dictionary.`
177
+ );
178
+ }
179
+ return {
180
+ alerts: unmarshalArrayOfObject(data.alerts, unmarshalAlert),
181
+ totalCount: data.total_count
182
+ };
183
+ };
156
184
  const unmarshalListContactPointsResponse = (data) => {
157
185
  if (!isJSONObject(data)) {
158
186
  throw new TypeError(
@@ -208,31 +236,6 @@ const unmarshalListGrafanaUsersResponse = (data) => {
208
236
  totalCount: data.total_count
209
237
  };
210
238
  };
211
- const unmarshalAlert = (data) => {
212
- if (!isJSONObject(data)) {
213
- throw new TypeError(
214
- `Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
215
- );
216
- }
217
- return {
218
- description: data.description,
219
- name: data.name,
220
- product: data.product,
221
- productFamily: data.product_family,
222
- rule: data.rule
223
- };
224
- };
225
- const unmarshalListManagedAlertsResponse = (data) => {
226
- if (!isJSONObject(data)) {
227
- throw new TypeError(
228
- `Unmarshalling the type 'ListManagedAlertsResponse' failed as data isn't a dictionary.`
229
- );
230
- }
231
- return {
232
- alerts: unmarshalArrayOfObject(data.alerts, unmarshalAlert),
233
- totalCount: data.total_count
234
- };
235
- };
236
239
  const unmarshalListPlansResponse = (data) => {
237
240
  if (!isJSONObject(data)) {
238
241
  throw new TypeError(
@@ -386,11 +389,11 @@ export {
386
389
  unmarshalGrafana,
387
390
  unmarshalGrafanaProductDashboard,
388
391
  unmarshalGrafanaUser,
392
+ unmarshalListAlertsResponse,
389
393
  unmarshalListContactPointsResponse,
390
394
  unmarshalListDataSourcesResponse,
391
395
  unmarshalListGrafanaProductDashboardsResponse,
392
396
  unmarshalListGrafanaUsersResponse,
393
- unmarshalListManagedAlertsResponse,
394
397
  unmarshalListPlansResponse,
395
398
  unmarshalListTokensResponse,
396
399
  unmarshalPlan,
@@ -1,10 +1,10 @@
1
1
  import type { Region as ScwRegion } from '../../../bridge';
2
+ export type AlertState = 'unknown_state' | 'inactive' | 'pending' | 'firing';
2
3
  export type DataSourceOrigin = 'unknown_origin' | 'scaleway' | 'external' | 'custom';
3
4
  export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces';
4
5
  export type GrafanaUserRole = 'unknown_role' | 'editor' | 'viewer';
5
6
  export type ListDataSourcesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
6
7
  export type ListGrafanaUsersRequestOrderBy = 'login_asc' | 'login_desc';
7
- export type ListManagedAlertsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
8
8
  export type ListPlansRequestOrderBy = 'name_asc' | 'name_desc';
9
9
  export type ListTokensRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
10
10
  export type PlanName = 'unknown_name' | 'free' | 'premium' | 'custom';
@@ -18,6 +18,20 @@ export interface GetConfigResponseRetention {
18
18
  maxDays: number;
19
19
  defaultDays: number;
20
20
  }
21
+ export interface Alert {
22
+ /**
23
+ * Region to target. If none is passed will use default region from the
24
+ * config.
25
+ */
26
+ region: ScwRegion;
27
+ preconfigured: boolean;
28
+ name: string;
29
+ rule: string;
30
+ duration: string;
31
+ enabled: boolean;
32
+ state?: AlertState;
33
+ annotations: Record<string, string>;
34
+ }
21
35
  /** Contact point. */
22
36
  export interface ContactPoint {
23
37
  /**
@@ -80,13 +94,6 @@ export interface GrafanaUser {
80
94
  /** Grafana user's password. */
81
95
  password?: string;
82
96
  }
83
- export interface Alert {
84
- productFamily: string;
85
- product: string;
86
- name: string;
87
- rule: string;
88
- description: string;
89
- }
90
97
  /** Type of pricing plan. */
91
98
  export interface Plan {
92
99
  /** Name of a given pricing plan. */
@@ -261,6 +268,13 @@ export interface Grafana {
261
268
  /** URL to access your Cockpit's Grafana. */
262
269
  grafanaUrl: string;
263
270
  }
271
+ /** Retrieve a list of alerts matching the request. */
272
+ export interface ListAlertsResponse {
273
+ /** Total count of alerts matching the request. */
274
+ totalCount: number;
275
+ /** List of alerts matching the applied filters. */
276
+ alerts: Alert[];
277
+ }
264
278
  /** Response returned when listing contact points. */
265
279
  export interface ListContactPointsResponse {
266
280
  /** Total count of contact points associated with the default receiver. */
@@ -299,13 +313,6 @@ export interface ListGrafanaUsersResponse {
299
313
  /** Grafana users information. */
300
314
  grafanaUsers: GrafanaUser[];
301
315
  }
302
- /** Response returned when listing data sources. */
303
- export interface ListManagedAlertsResponse {
304
- /** Total count of data sources matching the request. */
305
- totalCount: number;
306
- /** Alerts matching the request within the pagination. */
307
- alerts: Alert[];
308
- }
309
316
  /** Output returned when listing pricing plans. */
310
317
  export interface ListPlansResponse {
311
318
  /** Total count of available pricing plans. */
@@ -491,6 +498,33 @@ export type RegionalApiGetUsageOverviewRequest = {
491
498
  projectId?: string;
492
499
  interval?: string;
493
500
  };
501
+ /** Retrieve a list of alerts. */
502
+ export type RegionalApiListAlertsRequest = {
503
+ /**
504
+ * Region to target. If none is passed will use default region from the
505
+ * config.
506
+ */
507
+ region?: ScwRegion;
508
+ /** Project ID to filter for, only alerts from this Project will be returned. */
509
+ projectId?: string;
510
+ /**
511
+ * True returns only enabled alerts. False returns only disabled alerts. If
512
+ * omitted, no alert filtering is applied. Other filters may still apply.
513
+ */
514
+ isEnabled?: boolean;
515
+ /**
516
+ * True returns only preconfigured alerts. False returns only custom alerts.
517
+ * If omitted, no filtering is applied on alert types. Other filters may still
518
+ * apply.
519
+ */
520
+ isPreconfigured?: boolean;
521
+ /**
522
+ * Valid values to filter on are `disabled`, `enabled`, `pending` and
523
+ * `firing`. If omitted, no filtering is applied on alert states. Other
524
+ * filters may still apply.
525
+ */
526
+ state?: AlertState;
527
+ };
494
528
  /** List contact points. */
495
529
  export type RegionalApiListContactPointsRequest = {
496
530
  /**
@@ -534,25 +568,6 @@ export type RegionalApiListDataSourcesRequest = {
534
568
  */
535
569
  types?: DataSourceType[];
536
570
  };
537
- /** Enable the sending of managed alerts. */
538
- export type RegionalApiListManagedAlertsRequest = {
539
- /**
540
- * Region to target. If none is passed will use default region from the
541
- * config.
542
- */
543
- region?: ScwRegion;
544
- /** Page number to return, from the paginated results. */
545
- page?: number;
546
- /** Number of data sources to return per page. */
547
- pageSize?: number;
548
- /** Sort order for data sources in the response. */
549
- orderBy?: ListManagedAlertsRequestOrderBy;
550
- /**
551
- * Project ID to filter for, only data sources from this Project will be
552
- * returned.
553
- */
554
- projectId?: string;
555
- };
556
571
  /** List tokens. */
557
572
  export type RegionalApiListTokensRequest = {
558
573
  /**
@@ -37,15 +37,6 @@ const RegionalApiListDataSourcesRequest = {
37
37
  lessThanOrEqual: 1e3
38
38
  }
39
39
  };
40
- const RegionalApiListManagedAlertsRequest = {
41
- page: {
42
- greaterThanOrEqual: 1
43
- },
44
- pageSize: {
45
- greaterThanOrEqual: 1,
46
- lessThanOrEqual: 1e3
47
- }
48
- };
49
40
  const RegionalApiListTokensRequest = {
50
41
  page: {
51
42
  greaterThanOrEqual: 1
@@ -72,6 +63,5 @@ exports.RegionalApiCreateDataSourceRequest = RegionalApiCreateDataSourceRequest;
72
63
  exports.RegionalApiCreateTokenRequest = RegionalApiCreateTokenRequest;
73
64
  exports.RegionalApiListContactPointsRequest = RegionalApiListContactPointsRequest;
74
65
  exports.RegionalApiListDataSourcesRequest = RegionalApiListDataSourcesRequest;
75
- exports.RegionalApiListManagedAlertsRequest = RegionalApiListManagedAlertsRequest;
76
66
  exports.RegionalApiListTokensRequest = RegionalApiListTokensRequest;
77
67
  exports.RegionalApiUpdateDataSourceRequest = RegionalApiUpdateDataSourceRequest;
@@ -35,15 +35,6 @@ export declare const RegionalApiListDataSourcesRequest: {
35
35
  lessThanOrEqual: number;
36
36
  };
37
37
  };
38
- export declare const RegionalApiListManagedAlertsRequest: {
39
- page: {
40
- greaterThanOrEqual: number;
41
- };
42
- pageSize: {
43
- greaterThanOrEqual: number;
44
- lessThanOrEqual: number;
45
- };
46
- };
47
38
  export declare const RegionalApiListTokensRequest: {
48
39
  page: {
49
40
  greaterThanOrEqual: number;
@@ -35,15 +35,6 @@ const RegionalApiListDataSourcesRequest = {
35
35
  lessThanOrEqual: 1e3
36
36
  }
37
37
  };
38
- const RegionalApiListManagedAlertsRequest = {
39
- page: {
40
- greaterThanOrEqual: 1
41
- },
42
- pageSize: {
43
- greaterThanOrEqual: 1,
44
- lessThanOrEqual: 1e3
45
- }
46
- };
47
38
  const RegionalApiListTokensRequest = {
48
39
  page: {
49
40
  greaterThanOrEqual: 1
@@ -71,7 +62,6 @@ export {
71
62
  RegionalApiCreateTokenRequest,
72
63
  RegionalApiListContactPointsRequest,
73
64
  RegionalApiListDataSourcesRequest,
74
- RegionalApiListManagedAlertsRequest,
75
65
  RegionalApiListTokensRequest,
76
66
  RegionalApiUpdateDataSourceRequest
77
67
  };
@@ -259,6 +259,7 @@ const unmarshalFrontend = (data) => {
259
259
  backend: data.backend ? unmarshalBackend(data.backend) : void 0,
260
260
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : void 0,
261
261
  certificateIds: data.certificate_ids,
262
+ connectionRateLimit: data.connection_rate_limit,
262
263
  createdAt: marshalling.unmarshalDate(data.created_at),
263
264
  enableHttp3: data.enable_http3,
264
265
  id: data.id,
@@ -740,6 +741,7 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
740
741
  backend_id: request.backendId,
741
742
  certificate_id: request.certificateId,
742
743
  certificate_ids: request.certificateIds,
744
+ connection_rate_limit: request.connectionRateLimit,
743
745
  enable_http3: request.enableHttp3,
744
746
  inbound_port: request.inboundPort,
745
747
  name: request.name || randomName("lbf"),
@@ -874,6 +876,7 @@ const marshalUpdateFrontendRequest = (request, defaults) => ({
874
876
  backend_id: request.backendId,
875
877
  certificate_id: request.certificateId,
876
878
  certificate_ids: request.certificateIds,
879
+ connection_rate_limit: request.connectionRateLimit,
877
880
  enable_http3: request.enableHttp3,
878
881
  inbound_port: request.inboundPort,
879
882
  name: request.name,
@@ -1016,6 +1019,7 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
1016
1019
  backend_id: request.backendId,
1017
1020
  certificate_id: request.certificateId,
1018
1021
  certificate_ids: request.certificateIds,
1022
+ connection_rate_limit: request.connectionRateLimit,
1019
1023
  enable_http3: request.enableHttp3,
1020
1024
  inbound_port: request.inboundPort,
1021
1025
  name: request.name || randomName("lbf"),
@@ -1148,6 +1152,7 @@ const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
1148
1152
  backend_id: request.backendId,
1149
1153
  certificate_id: request.certificateId,
1150
1154
  certificate_ids: request.certificateIds,
1155
+ connection_rate_limit: request.connectionRateLimit,
1151
1156
  enable_http3: request.enableHttp3,
1152
1157
  inbound_port: request.inboundPort,
1153
1158
  name: request.name,
@@ -257,6 +257,7 @@ const unmarshalFrontend = (data) => {
257
257
  backend: data.backend ? unmarshalBackend(data.backend) : void 0,
258
258
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : void 0,
259
259
  certificateIds: data.certificate_ids,
260
+ connectionRateLimit: data.connection_rate_limit,
260
261
  createdAt: unmarshalDate(data.created_at),
261
262
  enableHttp3: data.enable_http3,
262
263
  id: data.id,
@@ -738,6 +739,7 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
738
739
  backend_id: request.backendId,
739
740
  certificate_id: request.certificateId,
740
741
  certificate_ids: request.certificateIds,
742
+ connection_rate_limit: request.connectionRateLimit,
741
743
  enable_http3: request.enableHttp3,
742
744
  inbound_port: request.inboundPort,
743
745
  name: request.name || randomName("lbf"),
@@ -872,6 +874,7 @@ const marshalUpdateFrontendRequest = (request, defaults) => ({
872
874
  backend_id: request.backendId,
873
875
  certificate_id: request.certificateId,
874
876
  certificate_ids: request.certificateIds,
877
+ connection_rate_limit: request.connectionRateLimit,
875
878
  enable_http3: request.enableHttp3,
876
879
  inbound_port: request.inboundPort,
877
880
  name: request.name,
@@ -1014,6 +1017,7 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
1014
1017
  backend_id: request.backendId,
1015
1018
  certificate_id: request.certificateId,
1016
1019
  certificate_ids: request.certificateIds,
1020
+ connection_rate_limit: request.connectionRateLimit,
1017
1021
  enable_http3: request.enableHttp3,
1018
1022
  inbound_port: request.inboundPort,
1019
1023
  name: request.name || randomName("lbf"),
@@ -1146,6 +1150,7 @@ const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
1146
1150
  backend_id: request.backendId,
1147
1151
  certificate_id: request.certificateId,
1148
1152
  certificate_ids: request.certificateIds,
1153
+ connection_rate_limit: request.connectionRateLimit,
1149
1154
  enable_http3: request.enableHttp3,
1150
1155
  inbound_port: request.inboundPort,
1151
1156
  name: request.name,
@@ -448,6 +448,11 @@ export interface Frontend {
448
448
  updatedAt?: Date;
449
449
  /** Defines whether to enable HTTP/3 protocol on the frontend. */
450
450
  enableHttp3: boolean;
451
+ /**
452
+ * Rate limit for new connections established on this frontend. Use 0 value to
453
+ * disable, else value is connections per second.
454
+ */
455
+ connectionRateLimit?: number;
451
456
  }
452
457
  export interface PrivateNetworkDHCPConfig {
453
458
  /** @deprecated */
@@ -835,6 +840,11 @@ export type CreateFrontendRequest = {
835
840
  certificateIds?: string[];
836
841
  /** Defines whether to enable HTTP/3 protocol on the frontend. */
837
842
  enableHttp3: boolean;
843
+ /**
844
+ * Rate limit for new connections established on this frontend. Use 0 value to
845
+ * disable, else value is connections per second.
846
+ */
847
+ connectionRateLimit?: number;
838
848
  };
839
849
  export type CreateIpRequest = {
840
850
  /**
@@ -1629,6 +1639,11 @@ export type UpdateFrontendRequest = {
1629
1639
  certificateIds?: string[];
1630
1640
  /** Defines whether to enable HTTP/3 protocol on the frontend. */
1631
1641
  enableHttp3: boolean;
1642
+ /**
1643
+ * Rate limit for new connections established on this frontend. Use 0 value to
1644
+ * disable, else value is connections per second.
1645
+ */
1646
+ connectionRateLimit?: number;
1632
1647
  };
1633
1648
  export type UpdateHealthCheckRequest = {
1634
1649
  /**
@@ -1991,6 +2006,11 @@ export type ZonedApiCreateFrontendRequest = {
1991
2006
  certificateIds?: string[];
1992
2007
  /** Defines whether to enable HTTP/3 protocol on the frontend. */
1993
2008
  enableHttp3: boolean;
2009
+ /**
2010
+ * Rate limit for new connections established on this frontend. Use 0 value to
2011
+ * disable, else value is connections per second.
2012
+ */
2013
+ connectionRateLimit?: number;
1994
2014
  };
1995
2015
  export type ZonedApiCreateIpRequest = {
1996
2016
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -2594,6 +2614,11 @@ export type ZonedApiUpdateFrontendRequest = {
2594
2614
  certificateIds?: string[];
2595
2615
  /** Defines whether to enable HTTP/3 protocol on the frontend. */
2596
2616
  enableHttp3: boolean;
2617
+ /**
2618
+ * Rate limit for new connections established on this frontend. Use 0 value to
2619
+ * disable, else value is connections per second.
2620
+ */
2621
+ connectionRateLimit?: number;
2597
2622
  };
2598
2623
  export type ZonedApiUpdateHealthCheckRequest = {
2599
2624
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -92,6 +92,7 @@ class API extends api.API {
92
92
  ],
93
93
  ["path", request.path],
94
94
  ["project_id", request.projectId],
95
+ ["scheduled_for_deletion", request.scheduledForDeletion],
95
96
  ["tags", request.tags],
96
97
  ["type", request.type]
97
98
  )
@@ -386,5 +387,37 @@ class API extends api.API {
386
387
  * @returns A Promise of ListSecretTypesResponse
387
388
  */
388
389
  listSecretTypes = (request = {}) => resourcePaginator.enrichForPagination("types", this.pageOfListSecretTypes, request);
390
+ /**
391
+ * Restore a version.. Restore a secret's version specified by the `region`,
392
+ * `secret_id` and `revision` parameters.
393
+ *
394
+ * @param request - The request {@link RestoreSecretVersionRequest}
395
+ * @returns A Promise of SecretVersion
396
+ */
397
+ restoreSecretVersion = (request) => this.client.fetch(
398
+ {
399
+ body: "{}",
400
+ headers: jsonContentHeaders,
401
+ method: "POST",
402
+ path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/versions/${marshalling.validatePathParam("revision", request.revision)}/restore`
403
+ },
404
+ marshalling_gen.unmarshalSecretVersion
405
+ );
406
+ /**
407
+ * Restore a secret.. Restore a secret and all its versions scheduled for
408
+ * deletion specified by the `region` and `secret_id` parameters.
409
+ *
410
+ * @param request - The request {@link RestoreSecretRequest}
411
+ * @returns A Promise of Secret
412
+ */
413
+ restoreSecret = (request) => this.client.fetch(
414
+ {
415
+ body: "{}",
416
+ headers: jsonContentHeaders,
417
+ method: "POST",
418
+ path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/restore`
419
+ },
420
+ marshalling_gen.unmarshalSecret
421
+ );
389
422
  }
390
423
  exports.API = API;
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region as ScwRegion } from '../../../bridge';
3
- import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest, Secret, SecretVersion, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest } from './types.gen';
3
+ import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest, RestoreSecretRequest, RestoreSecretVersionRequest, Secret, SecretVersion, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest } from './types.gen';
4
4
  /**
5
5
  * Secret Manager API.
6
6
  *
@@ -190,4 +190,20 @@ export declare class API extends ParentAPI {
190
190
  all: () => Promise<import("./types.gen").SecretType[]>;
191
191
  [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").SecretType[], void, void>;
192
192
  };
193
+ /**
194
+ * Restore a version.. Restore a secret's version specified by the `region`,
195
+ * `secret_id` and `revision` parameters.
196
+ *
197
+ * @param request - The request {@link RestoreSecretVersionRequest}
198
+ * @returns A Promise of SecretVersion
199
+ */
200
+ restoreSecretVersion: (request: Readonly<RestoreSecretVersionRequest>) => Promise<SecretVersion>;
201
+ /**
202
+ * Restore a secret.. Restore a secret and all its versions scheduled for
203
+ * deletion specified by the `region` and `secret_id` parameters.
204
+ *
205
+ * @param request - The request {@link RestoreSecretRequest}
206
+ * @returns A Promise of Secret
207
+ */
208
+ restoreSecret: (request: Readonly<RestoreSecretRequest>) => Promise<Secret>;
193
209
  }
@@ -90,6 +90,7 @@ class API extends API$1 {
90
90
  ],
91
91
  ["path", request.path],
92
92
  ["project_id", request.projectId],
93
+ ["scheduled_for_deletion", request.scheduledForDeletion],
93
94
  ["tags", request.tags],
94
95
  ["type", request.type]
95
96
  )
@@ -384,6 +385,38 @@ class API extends API$1 {
384
385
  * @returns A Promise of ListSecretTypesResponse
385
386
  */
386
387
  listSecretTypes = (request = {}) => enrichForPagination("types", this.pageOfListSecretTypes, request);
388
+ /**
389
+ * Restore a version.. Restore a secret's version specified by the `region`,
390
+ * `secret_id` and `revision` parameters.
391
+ *
392
+ * @param request - The request {@link RestoreSecretVersionRequest}
393
+ * @returns A Promise of SecretVersion
394
+ */
395
+ restoreSecretVersion = (request) => this.client.fetch(
396
+ {
397
+ body: "{}",
398
+ headers: jsonContentHeaders,
399
+ method: "POST",
400
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions/${validatePathParam("revision", request.revision)}/restore`
401
+ },
402
+ unmarshalSecretVersion
403
+ );
404
+ /**
405
+ * Restore a secret.. Restore a secret and all its versions scheduled for
406
+ * deletion specified by the `region` and `secret_id` parameters.
407
+ *
408
+ * @param request - The request {@link RestoreSecretRequest}
409
+ * @returns A Promise of Secret
410
+ */
411
+ restoreSecret = (request) => this.client.fetch(
412
+ {
413
+ body: "{}",
414
+ headers: jsonContentHeaders,
415
+ method: "POST",
416
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/restore`
417
+ },
418
+ unmarshalSecret
419
+ );
387
420
  }
388
421
  export {
389
422
  API
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen.js';
2
- export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, SSHKey, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen';
2
+ export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, RestoreSecretRequest, RestoreSecretVersionRequest, SSHKey, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -24,6 +24,7 @@ const unmarshalSecretVersion = (data) => {
24
24
  return {
25
25
  createdAt: marshalling.unmarshalDate(data.created_at),
26
26
  deletedAt: marshalling.unmarshalDate(data.deleted_at),
27
+ deletionRequestedAt: marshalling.unmarshalDate(data.deletion_requested_at),
27
28
  description: data.description,
28
29
  ephemeralProperties: data.ephemeral_properties ? unmarshalEphemeralProperties(data.ephemeral_properties) : void 0,
29
30
  latest: data.latest,
@@ -53,6 +54,7 @@ const unmarshalSecret = (data) => {
53
54
  }
54
55
  return {
55
56
  createdAt: marshalling.unmarshalDate(data.created_at),
57
+ deletionRequestedAt: marshalling.unmarshalDate(data.deletion_requested_at),
56
58
  description: data.description,
57
59
  ephemeralPolicy: data.ephemeral_policy ? unmarshalEphemeralPolicy(data.ephemeral_policy) : void 0,
58
60
  id: data.id,
@@ -22,6 +22,7 @@ const unmarshalSecretVersion = (data) => {
22
22
  return {
23
23
  createdAt: unmarshalDate(data.created_at),
24
24
  deletedAt: unmarshalDate(data.deleted_at),
25
+ deletionRequestedAt: unmarshalDate(data.deletion_requested_at),
25
26
  description: data.description,
26
27
  ephemeralProperties: data.ephemeral_properties ? unmarshalEphemeralProperties(data.ephemeral_properties) : void 0,
27
28
  latest: data.latest,
@@ -51,6 +52,7 @@ const unmarshalSecret = (data) => {
51
52
  }
52
53
  return {
53
54
  createdAt: unmarshalDate(data.created_at),
55
+ deletionRequestedAt: unmarshalDate(data.deletion_requested_at),
54
56
  description: data.description,
55
57
  ephemeralPolicy: data.ephemeral_policy ? unmarshalEphemeralPolicy(data.ephemeral_policy) : void 0,
56
58
  id: data.id,
@@ -5,7 +5,7 @@ export type ListSecretsRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_a
5
5
  export type Product = 'unknown_product' | 'edge_services';
6
6
  export type SecretStatus = 'unknown_status' | 'ready' | 'locked';
7
7
  export type SecretType = 'unknown_type' | 'opaque' | 'certificate' | 'key_value' | 'basic_credentials' | 'database_credentials' | 'ssh_key';
8
- export type SecretVersionStatus = 'unknown_status' | 'enabled' | 'disabled' | 'deleted';
8
+ export type SecretVersionStatus = 'unknown_status' | 'enabled' | 'disabled' | 'deleted' | 'scheduled_for_deletion';
9
9
  export interface EphemeralPolicy {
10
10
  /**
11
11
  * Time frame, from one second and up to one year, during which the secret's
@@ -58,8 +58,9 @@ export interface SecretVersion {
58
58
  /**
59
59
  * - `unknown_status`: the version is in an invalid state. `enabled`: the
60
60
  * version is accessible. `disabled`: the version is not accessible but can
61
- * be enabled. `deleted`: the version is permanently deleted. It is not
62
- * possible to recover it.
61
+ * be enabled. `scheduled_for_deletion`: the version is scheduled for
62
+ * deletion. It will be deleted in 7 days. `deleted`: the version is
63
+ * permanently deleted. It is not possible to recover it.
63
64
  */
64
65
  status: SecretVersionStatus;
65
66
  /** Date and time of the version's creation. */
@@ -78,6 +79,8 @@ export interface SecretVersion {
78
79
  * version expires.
79
80
  */
80
81
  ephemeralProperties?: EphemeralProperties;
82
+ /** Returns the time at which deletion was requested. */
83
+ deletionRequestedAt?: Date;
81
84
  }
82
85
  export interface Secret {
83
86
  /** ID of the secret. */
@@ -117,6 +120,8 @@ export interface Secret {
117
120
  ephemeralPolicy?: EphemeralPolicy;
118
121
  /** List of Scaleway resources that can access and manage the secret. */
119
122
  usedBy: Product[];
123
+ /** Returns the time at which deletion was requested. */
124
+ deletionRequestedAt?: Date;
120
125
  /** Region of the secret. */
121
126
  region: ScwRegion;
122
127
  }
@@ -441,6 +446,11 @@ export type ListSecretsRequest = {
441
446
  ephemeral?: boolean;
442
447
  /** Filter by secret type (optional). */
443
448
  type?: SecretType;
449
+ /**
450
+ * Filter by whether the secret was scheduled for deletion / not scheduled for
451
+ * deletion (optional).
452
+ */
453
+ scheduledForDeletion?: boolean;
444
454
  };
445
455
  export interface ListSecretsResponse {
446
456
  /** Single page of secrets matching the requested criteria. */
@@ -474,6 +484,23 @@ export type ProtectSecretRequest = {
474
484
  /** ID of the secret to enable secret protection for. */
475
485
  secretId: string;
476
486
  };
487
+ export type RestoreSecretRequest = {
488
+ /**
489
+ * Region to target. If none is passed will use default region from the
490
+ * config.
491
+ */
492
+ region?: ScwRegion;
493
+ secretId: string;
494
+ };
495
+ export type RestoreSecretVersionRequest = {
496
+ /**
497
+ * Region to target. If none is passed will use default region from the
498
+ * config.
499
+ */
500
+ region?: ScwRegion;
501
+ secretId: string;
502
+ revision: string;
503
+ };
477
504
  export interface SSHKey {
478
505
  /** The private SSH key. */
479
506
  sshPrivateKey: string;
@@ -740,5 +740,11 @@ class API extends api.API {
740
740
  },
741
741
  marshalling_gen.unmarshalGateway
742
742
  );
743
+ migrateToV2 = (request) => this.client.fetch({
744
+ body: "{}",
745
+ headers: jsonContentHeaders,
746
+ method: "POST",
747
+ path: `/vpc-gw/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/migrate-to-v2`
748
+ });
743
749
  }
744
750
  exports.API = API;
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Zone as ScwZone, WaitForOptions } from '../../../bridge';
3
- import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, ListDHCPEntriesRequest, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPATRulesRequest, ListPATRulesResponse, PATRule, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
3
+ import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, ListDHCPEntriesRequest, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPATRulesRequest, ListPATRulesResponse, MigrateToV2Request, PATRule, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
4
4
  /**
5
5
  * Public Gateways API.
6
6
  *
@@ -391,4 +391,5 @@ export declare class API extends ParentAPI {
391
391
  * @returns A Promise of Gateway
392
392
  */
393
393
  refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
394
+ migrateToV2: (request: Readonly<MigrateToV2Request>) => Promise<void>;
394
395
  }
@@ -738,6 +738,12 @@ class API extends API$1 {
738
738
  },
739
739
  unmarshalGateway
740
740
  );
741
+ migrateToV2 = (request) => this.client.fetch({
742
+ body: "{}",
743
+ headers: jsonContentHeaders,
744
+ method: "POST",
745
+ path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/migrate-to-v2`
746
+ });
741
747
  }
742
748
  export {
743
749
  API
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
- export type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayNetworkRequestIpamConfig, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DHCPEntryType, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, IpamConfig, ListDHCPEntriesRequest, ListDHCPEntriesRequestOrderBy, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsRequestOrderBy, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPATRulesRequest, ListPATRulesRequestOrderBy, ListPATRulesResponse, PATRule, PATRuleProtocol, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesRequestEntry, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesRequestRule, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayNetworkRequestIpamConfig, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest, } from './types.gen';
3
+ export type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayNetworkRequestIpamConfig, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DHCPEntryType, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, IpamConfig, ListDHCPEntriesRequest, ListDHCPEntriesRequestOrderBy, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsRequestOrderBy, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPATRulesRequest, ListPATRulesRequestOrderBy, ListPATRulesResponse, MigrateToV2Request, PATRule, PATRuleProtocol, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesRequestEntry, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesRequestRule, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayNetworkRequestIpamConfig, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest, } from './types.gen';
@@ -708,6 +708,11 @@ export interface ListPATRulesResponse {
708
708
  /** Total count of PAT rules matching the filter. */
709
709
  totalCount: number;
710
710
  }
711
+ export type MigrateToV2Request = {
712
+ /** Zone to target. If none is passed will use default zone from the config. */
713
+ zone?: ScwZone;
714
+ gatewayId: string;
715
+ };
711
716
  export type RefreshSSHKeysRequest = {
712
717
  /** Zone to target. If none is passed will use default zone from the config. */
713
718
  zone?: ScwZone;
@@ -92,6 +92,7 @@ const unmarshalDnsRecords = (data) => {
92
92
  );
93
93
  }
94
94
  return {
95
+ dnsConfig: data.dns_config,
95
96
  nameServers: marshalling.unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
96
97
  records: marshalling.unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
97
98
  status: data.status
@@ -203,8 +204,9 @@ const unmarshalHosting = (data) => {
203
204
  }
204
205
  return {
205
206
  createdAt: marshalling.unmarshalDate(data.created_at),
206
- dnsStatus: data.dns_status,
207
+ dnsStatus: data.dns_status ? data.dns_status : void 0,
207
208
  domain: data.domain,
209
+ domainStatus: data.domain_status,
208
210
  id: data.id,
209
211
  ipv4: data.ipv4,
210
212
  offer: data.offer ? unmarshalOffer(data.offer) : void 0,
@@ -286,14 +288,16 @@ const unmarshalHostingSummary = (data) => {
286
288
  }
287
289
  return {
288
290
  createdAt: marshalling.unmarshalDate(data.created_at),
289
- dnsStatus: data.dns_status,
291
+ dnsStatus: data.dns_status ? data.dns_status : void 0,
290
292
  domain: data.domain,
293
+ domainStatus: data.domain_status,
294
+ hostingStatus: data.hosting_status,
291
295
  id: data.id,
292
296
  offerName: data.offer_name,
293
297
  projectId: data.project_id,
294
298
  protected: data.protected,
295
299
  region: data.region,
296
- status: data.status,
300
+ status: data.status ? data.status : void 0,
297
301
  updatedAt: marshalling.unmarshalDate(data.updated_at)
298
302
  };
299
303
  };
@@ -90,6 +90,7 @@ const unmarshalDnsRecords = (data) => {
90
90
  );
91
91
  }
92
92
  return {
93
+ dnsConfig: data.dns_config,
93
94
  nameServers: unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
94
95
  records: unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
95
96
  status: data.status
@@ -201,8 +202,9 @@ const unmarshalHosting = (data) => {
201
202
  }
202
203
  return {
203
204
  createdAt: unmarshalDate(data.created_at),
204
- dnsStatus: data.dns_status,
205
+ dnsStatus: data.dns_status ? data.dns_status : void 0,
205
206
  domain: data.domain,
207
+ domainStatus: data.domain_status,
206
208
  id: data.id,
207
209
  ipv4: data.ipv4,
208
210
  offer: data.offer ? unmarshalOffer(data.offer) : void 0,
@@ -284,14 +286,16 @@ const unmarshalHostingSummary = (data) => {
284
286
  }
285
287
  return {
286
288
  createdAt: unmarshalDate(data.created_at),
287
- dnsStatus: data.dns_status,
289
+ dnsStatus: data.dns_status ? data.dns_status : void 0,
288
290
  domain: data.domain,
291
+ domainStatus: data.domain_status,
292
+ hostingStatus: data.hosting_status,
289
293
  id: data.id,
290
294
  offerName: data.offer_name,
291
295
  projectId: data.project_id,
292
296
  protected: data.protected,
293
297
  region: data.region,
294
- status: data.status,
298
+ status: data.status ? data.status : void 0,
295
299
  updatedAt: unmarshalDate(data.updated_at)
296
300
  };
297
301
  };
@@ -190,16 +190,20 @@ export interface HostingSummary {
190
190
  createdAt?: Date;
191
191
  /** Date on which the Web Hosting plan was last updated. */
192
192
  updatedAt?: Date;
193
- /** Status of the Web Hosting plan. */
194
- status: HostingSummaryStatus;
193
+ /** @deprecated Status of the Web Hosting plan. */
194
+ status?: HostingSummaryStatus;
195
195
  /** Main domain associated with the Web Hosting plan. */
196
196
  domain: string;
197
197
  /** Whether the hosting is protected or not. */
198
198
  protected: boolean;
199
- /** DNS status of the Web Hosting plan. */
200
- dnsStatus: DnsRecordsStatus;
199
+ /** @deprecated DNS status of the Web Hosting plan. */
200
+ dnsStatus?: DnsRecordsStatus;
201
201
  /** Name of the active offer for the Web Hosting plan. */
202
202
  offerName: string;
203
+ /** Status of the Web Hosting plan. */
204
+ hostingStatus: HostingStatus;
205
+ /** Main domain status of the Web Hosting plan. */
206
+ domainStatus: DomainStatus;
203
207
  /** Region where the Web Hosting plan is hosted. */
204
208
  region: ScwRegion;
205
209
  }
@@ -478,6 +482,8 @@ export interface DnsRecords {
478
482
  nameServers: Nameserver[];
479
483
  /** Status of the records. */
480
484
  status: DnsRecordsStatus;
485
+ /** Records dns auto configuration settings. */
486
+ dnsConfig: DomainDnsAction[];
481
487
  }
482
488
  export interface Domain {
483
489
  /** Name of the domain. */
@@ -569,14 +575,16 @@ export interface Hosting {
569
575
  platform?: Platform;
570
576
  /** List of tags associated with the Web Hosting plan. */
571
577
  tags: string[];
572
- /** DNS status of the Web Hosting plan. */
573
- dnsStatus: DnsRecordsStatus;
578
+ /** @deprecated DNS status of the Web Hosting plan. */
579
+ dnsStatus?: DnsRecordsStatus;
574
580
  /** Current IPv4 address of the hosting. */
575
581
  ipv4: string;
576
582
  /** Whether the hosting is protected or not. */
577
583
  protected: boolean;
578
584
  /** Details of the hosting user. */
579
585
  user?: HostingUser;
586
+ /** Main domain status of the Web Hosting plan. */
587
+ domainStatus: DomainStatus;
580
588
  /** Region where the Web Hosting plan is hosted. */
581
589
  region: ScwRegion;
582
590
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "v2.65.0";
3
+ const version = "v2.66.0";
4
4
  const userAgent = `scaleway-sdk-js/${version}`;
5
5
  exports.userAgent = userAgent;
6
6
  exports.version = version;
@@ -1,2 +1,2 @@
1
- export declare const version = "v2.65.0";
2
- export declare const userAgent = "scaleway-sdk-js/v2.65.0";
1
+ export declare const version = "v2.66.0";
2
+ export declare const userAgent = "scaleway-sdk-js/v2.66.0";
@@ -1,4 +1,4 @@
1
- const version = "v2.65.0";
1
+ const version = "v2.66.0";
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
  export {
4
4
  userAgent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "2.66.0",
3
+ "version": "2.67.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -39,5 +39,5 @@
39
39
  "bundledDependencies": [
40
40
  "@scaleway/random-name"
41
41
  ],
42
- "gitHead": "2fa209a59b671b24c1bcaf5af66aff8b247eccb0"
42
+ "gitHead": "dfaaaf081c7ebd7475f2bdb08c91a796179a0038"
43
43
  }