@scaleway/sdk 2.65.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 (100) hide show
  1. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +17 -0
  3. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +17 -0
  4. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +21 -0
  5. package/dist/api/audit_trail/v1alpha1/api.gen.d.ts +2 -2
  6. package/dist/api/audit_trail/v1alpha1/index.gen.d.ts +1 -1
  7. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +9 -0
  8. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +9 -0
  9. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +24 -16
  10. package/dist/api/baremetal/v1/api.gen.d.ts +3 -3
  11. package/dist/api/baremetal/v1/types.gen.d.ts +33 -33
  12. package/dist/api/baremetal/v3/api.gen.d.ts +2 -2
  13. package/dist/api/baremetal/v3/types.gen.d.ts +5 -5
  14. package/dist/api/block/v1alpha1/api.gen.d.ts +2 -2
  15. package/dist/api/block/v1alpha1/types.gen.d.ts +17 -17
  16. package/dist/api/cockpit/v1/api.gen.cjs +14 -17
  17. package/dist/api/cockpit/v1/api.gen.d.ts +6 -9
  18. package/dist/api/cockpit/v1/api.gen.js +15 -18
  19. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  20. package/dist/api/cockpit/v1/marshalling.gen.cjs +29 -26
  21. package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -2
  22. package/dist/api/cockpit/v1/marshalling.gen.js +29 -26
  23. package/dist/api/cockpit/v1/types.gen.d.ts +49 -34
  24. package/dist/api/cockpit/v1/validation-rules.gen.cjs +0 -10
  25. package/dist/api/cockpit/v1/validation-rules.gen.d.ts +0 -9
  26. package/dist/api/cockpit/v1/validation-rules.gen.js +0 -10
  27. package/dist/api/container/v1beta1/api.gen.cjs +5 -1
  28. package/dist/api/container/v1beta1/api.gen.d.ts +2 -2
  29. package/dist/api/container/v1beta1/api.gen.js +5 -1
  30. package/dist/api/container/v1beta1/types.gen.d.ts +32 -32
  31. package/dist/api/dedibox/v1/api.gen.d.ts +2 -2
  32. package/dist/api/dedibox/v1/types.gen.d.ts +51 -51
  33. package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
  34. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +21 -2
  35. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +22 -3
  36. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +34 -0
  37. package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +2 -2
  38. package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +14 -14
  39. package/dist/api/function/v1beta1/api.gen.cjs +5 -1
  40. package/dist/api/function/v1beta1/api.gen.d.ts +2 -2
  41. package/dist/api/function/v1beta1/api.gen.js +5 -1
  42. package/dist/api/function/v1beta1/types.gen.d.ts +35 -35
  43. package/dist/api/iot/v1/api.gen.d.ts +2 -2
  44. package/dist/api/iot/v1/types.gen.d.ts +38 -38
  45. package/dist/api/jobs/v1alpha1/api.gen.cjs +5 -1
  46. package/dist/api/jobs/v1alpha1/api.gen.d.ts +2 -2
  47. package/dist/api/jobs/v1alpha1/api.gen.js +5 -1
  48. package/dist/api/jobs/v1alpha1/types.gen.d.ts +19 -19
  49. package/dist/api/k8s/v1/api.gen.cjs +5 -1
  50. package/dist/api/k8s/v1/api.gen.d.ts +2 -2
  51. package/dist/api/k8s/v1/api.gen.js +5 -1
  52. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  53. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  54. package/dist/api/k8s/v1/types.gen.d.ts +42 -41
  55. package/dist/api/lb/v1/marshalling.gen.cjs +5 -0
  56. package/dist/api/lb/v1/marshalling.gen.js +5 -0
  57. package/dist/api/lb/v1/types.gen.d.ts +25 -0
  58. package/dist/api/marketplace/v2/types.gen.d.ts +3 -3
  59. package/dist/api/mnq/v1beta1/api.gen.d.ts +4 -4
  60. package/dist/api/mnq/v1beta1/types.gen.d.ts +31 -31
  61. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +3 -3
  62. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +24 -24
  63. package/dist/api/rdb/v1/api.gen.cjs +5 -1
  64. package/dist/api/rdb/v1/api.gen.d.ts +2 -2
  65. package/dist/api/rdb/v1/api.gen.js +5 -1
  66. package/dist/api/rdb/v1/types.gen.d.ts +67 -67
  67. package/dist/api/redis/v1/api.gen.d.ts +2 -2
  68. package/dist/api/redis/v1/types.gen.d.ts +28 -28
  69. package/dist/api/registry/v1/api.gen.cjs +5 -1
  70. package/dist/api/registry/v1/api.gen.d.ts +2 -2
  71. package/dist/api/registry/v1/api.gen.js +5 -1
  72. package/dist/api/registry/v1/types.gen.d.ts +14 -14
  73. package/dist/api/secret/v1beta1/api.gen.cjs +38 -1
  74. package/dist/api/secret/v1beta1/api.gen.d.ts +19 -3
  75. package/dist/api/secret/v1beta1/api.gen.js +38 -1
  76. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  77. package/dist/api/secret/v1beta1/marshalling.gen.cjs +2 -0
  78. package/dist/api/secret/v1beta1/marshalling.gen.js +2 -0
  79. package/dist/api/secret/v1beta1/types.gen.d.ts +52 -25
  80. package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +2 -2
  81. package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +12 -12
  82. package/dist/api/tem/v1alpha1/api.gen.d.ts +2 -2
  83. package/dist/api/tem/v1alpha1/types.gen.d.ts +25 -25
  84. package/dist/api/vpcgw/v1/api.gen.cjs +6 -0
  85. package/dist/api/vpcgw/v1/api.gen.d.ts +4 -3
  86. package/dist/api/vpcgw/v1/api.gen.js +6 -0
  87. package/dist/api/vpcgw/v1/index.gen.d.ts +1 -1
  88. package/dist/api/vpcgw/v1/types.gen.d.ts +49 -44
  89. package/dist/api/vpcgw/v2/api.gen.d.ts +2 -2
  90. package/dist/api/vpcgw/v2/types.gen.d.ts +33 -33
  91. package/dist/api/webhosting/v1/marshalling.gen.cjs +7 -3
  92. package/dist/api/webhosting/v1/marshalling.gen.js +7 -3
  93. package/dist/api/webhosting/v1/types.gen.d.ts +14 -6
  94. package/dist/scw/client-settings.cjs +2 -2
  95. package/dist/scw/client-settings.d.ts +2 -2
  96. package/dist/scw/client-settings.js +2 -2
  97. package/dist/scw/constants.cjs +1 -1
  98. package/dist/scw/constants.d.ts +2 -2
  99. package/dist/scw/constants.js +1 -1
  100. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
- import type { WaitForOptions, Zone } from '../../../bridge';
2
+ import type { Zone as ScwZone, WaitForOptions } from '../../../bridge';
3
3
  import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
4
4
  /**
5
5
  * Block Storage API.
@@ -8,7 +8,7 @@ import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest,
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
10
  /** Lists the available zones of the API. */
11
- static readonly LOCALITIES: Zone[];
11
+ static readonly LOCALITIES: ScwZone[];
12
12
  protected pageOfListVolumeTypes: (request?: Readonly<ListVolumeTypesRequest>) => Promise<ListVolumeTypesResponse>;
13
13
  /**
14
14
  * List volume types. List all available volume types in a specified zone. The
@@ -1,4 +1,4 @@
1
- import type { Money, Zone } from '../../../bridge';
1
+ import type { Money, Zone as ScwZone } from '../../../bridge';
2
2
  export type ListSnapshotsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
3
3
  export type ListVolumesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
4
4
  export type ReferenceStatus = 'unknown_status' | 'attaching' | 'attached' | 'detaching' | 'detached' | 'creating' | 'error';
@@ -81,7 +81,7 @@ export interface Snapshot {
81
81
  /** List of tags assigned to the volume. */
82
82
  tags: string[];
83
83
  /** Snapshot zone. */
84
- zone: Zone;
84
+ zone: ScwZone;
85
85
  /** Storage class of the snapshot. */
86
86
  class: StorageClass;
87
87
  }
@@ -122,7 +122,7 @@ export interface Volume {
122
122
  /** List of tags assigned to the volume. */
123
123
  tags: string[];
124
124
  /** Volume zone. */
125
- zone: Zone;
125
+ zone: ScwZone;
126
126
  /** Specifications of the volume. */
127
127
  specs?: VolumeSpecifications;
128
128
  /** Last time the volume was detached. */
@@ -130,7 +130,7 @@ export interface Volume {
130
130
  }
131
131
  export type CreateSnapshotRequest = {
132
132
  /** Zone to target. If none is passed will use default zone from the config. */
133
- zone?: Zone;
133
+ zone?: ScwZone;
134
134
  /** UUID of the volume to snapshot. */
135
135
  volumeId: string;
136
136
  /** Name of the snapshot. */
@@ -142,7 +142,7 @@ export type CreateSnapshotRequest = {
142
142
  };
143
143
  export type CreateVolumeRequest = {
144
144
  /** Zone to target. If none is passed will use default zone from the config. */
145
- zone?: Zone;
145
+ zone?: ScwZone;
146
146
  /** Name of the volume. */
147
147
  name?: string;
148
148
  /**
@@ -171,19 +171,19 @@ export type CreateVolumeRequest = {
171
171
  };
172
172
  export type DeleteSnapshotRequest = {
173
173
  /** Zone to target. If none is passed will use default zone from the config. */
174
- zone?: Zone;
174
+ zone?: ScwZone;
175
175
  /** UUID of the snapshot. */
176
176
  snapshotId: string;
177
177
  };
178
178
  export type DeleteVolumeRequest = {
179
179
  /** Zone to target. If none is passed will use default zone from the config. */
180
- zone?: Zone;
180
+ zone?: ScwZone;
181
181
  /** UUID of the volume. */
182
182
  volumeId: string;
183
183
  };
184
184
  export type ExportSnapshotToObjectStorageRequest = {
185
185
  /** Zone to target. If none is passed will use default zone from the config. */
186
- zone?: Zone;
186
+ zone?: ScwZone;
187
187
  /** UUID of the snapshot. */
188
188
  snapshotId: string;
189
189
  /** Scaleway Object Storage bucket where the object is stored. */
@@ -193,19 +193,19 @@ export type ExportSnapshotToObjectStorageRequest = {
193
193
  };
194
194
  export type GetSnapshotRequest = {
195
195
  /** Zone to target. If none is passed will use default zone from the config. */
196
- zone?: Zone;
196
+ zone?: ScwZone;
197
197
  /** UUID of the snapshot. */
198
198
  snapshotId: string;
199
199
  };
200
200
  export type GetVolumeRequest = {
201
201
  /** Zone to target. If none is passed will use default zone from the config. */
202
- zone?: Zone;
202
+ zone?: ScwZone;
203
203
  /** UUID of the volume. */
204
204
  volumeId: string;
205
205
  };
206
206
  export type ImportSnapshotFromObjectStorageRequest = {
207
207
  /** Zone to target. If none is passed will use default zone from the config. */
208
- zone?: Zone;
208
+ zone?: ScwZone;
209
209
  /** Scaleway Object Storage bucket where the object is stored. */
210
210
  bucket: string;
211
211
  /** The object key inside the given bucket. */
@@ -221,7 +221,7 @@ export type ImportSnapshotFromObjectStorageRequest = {
221
221
  };
222
222
  export type ImportSnapshotFromS3Request = {
223
223
  /** Zone to target. If none is passed will use default zone from the config. */
224
- zone?: Zone;
224
+ zone?: ScwZone;
225
225
  /** Scaleway Object Storage bucket where the object is stored. */
226
226
  bucket: string;
227
227
  /** The object key inside the given bucket. */
@@ -237,7 +237,7 @@ export type ImportSnapshotFromS3Request = {
237
237
  };
238
238
  export type ListSnapshotsRequest = {
239
239
  /** Zone to target. If none is passed will use default zone from the config. */
240
- zone?: Zone;
240
+ zone?: ScwZone;
241
241
  /** Criteria to use when ordering the list. */
242
242
  orderBy?: ListSnapshotsRequestOrderBy;
243
243
  /** Filter by Project ID. */
@@ -264,7 +264,7 @@ export interface ListSnapshotsResponse {
264
264
  }
265
265
  export type ListVolumeTypesRequest = {
266
266
  /** Zone to target. If none is passed will use default zone from the config. */
267
- zone?: Zone;
267
+ zone?: ScwZone;
268
268
  /** Page number. */
269
269
  page?: number;
270
270
  /**
@@ -281,7 +281,7 @@ export interface ListVolumeTypesResponse {
281
281
  }
282
282
  export type ListVolumesRequest = {
283
283
  /** Zone to target. If none is passed will use default zone from the config. */
284
- zone?: Zone;
284
+ zone?: ScwZone;
285
285
  /** Criteria to use when ordering the list. */
286
286
  orderBy?: ListVolumesRequestOrderBy;
287
287
  /** Filter by Project ID. */
@@ -316,7 +316,7 @@ export interface ListVolumesResponse {
316
316
  }
317
317
  export type UpdateSnapshotRequest = {
318
318
  /** Zone to target. If none is passed will use default zone from the config. */
319
- zone?: Zone;
319
+ zone?: ScwZone;
320
320
  /** UUID of the snapshot. */
321
321
  snapshotId: string;
322
322
  /** When defined, is the name of the snapshot. */
@@ -326,7 +326,7 @@ export type UpdateSnapshotRequest = {
326
326
  };
327
327
  export type UpdateVolumeRequest = {
328
328
  /** Zone to target. If none is passed will use default zone from the config. */
329
- zone?: Zone;
329
+ zone?: ScwZone;
330
330
  /** UUID of the volume. */
331
331
  volumeId: string;
332
332
  /** When defined, is the new name of the volume. */
@@ -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;