@scaleway/sdk-cockpit 2.2.1 → 2.2.2

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.
@@ -168,13 +168,13 @@ export declare class RegionalAPI extends ParentAPI {
168
168
  waitForExporter: (request: Readonly<RegionalApiGetExporterRequest>, options?: Readonly<WaitForOptions<Exporter>>) => Promise<Exporter>;
169
169
  /**
170
170
  * Delete a data export. Delete a given data export, specified by its ID.
171
- Note that this action will immediatly and permanently delete this data exports.
171
+ Note that this action will immediately and permanently delete this data exports.
172
172
  *
173
173
  * @param request - The request {@link RegionalApiDeleteExporterRequest}
174
174
  */
175
175
  deleteExporter: (request: Readonly<RegionalApiDeleteExporterRequest>) => Promise<void>;
176
176
  /**
177
- * Update a data export. Update a data export attributes. Changes are effective immediatly even during Beta phase.
177
+ * Update a data export. Update a data export attributes. Changes are effective immediately even during Beta phase.
178
178
  Note that you can not change the data source linked to the export. If you need to do so, you will need to re-create the export.
179
179
  *
180
180
  * @param request - The request {@link RegionalApiUpdateExporterRequest}
@@ -16,10 +16,9 @@ class GlobalAPI extends API {
16
16
  {
17
17
  method: "GET",
18
18
  path: `/cockpit/v1/grafana`,
19
- urlParams: urlParams([
20
- "project_id",
21
- request.projectId ?? this.client.settings.defaultProjectId
22
- ])
19
+ urlParams: urlParams(
20
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
21
+ )
23
22
  },
24
23
  unmarshalGrafana
25
24
  );
@@ -28,17 +27,16 @@ class GlobalAPI extends API {
28
27
  *
29
28
  * @param request - The request {@link GlobalApiSyncGrafanaDataSourcesRequest}
30
29
  */
31
- syncGrafanaDataSources = (request = {}) => this.client.fetch({
32
- body: JSON.stringify(
33
- marshalGlobalApiSyncGrafanaDataSourcesRequest(
34
- request,
35
- this.client.settings
36
- )
37
- ),
38
- headers: jsonContentHeaders,
39
- method: "POST",
40
- path: `/cockpit/v1/grafana/sync-data-sources`
41
- });
30
+ syncGrafanaDataSources = (request = {}) => this.client.fetch(
31
+ {
32
+ body: JSON.stringify(
33
+ marshalGlobalApiSyncGrafanaDataSourcesRequest(request, this.client.settings)
34
+ ),
35
+ headers: jsonContentHeaders,
36
+ method: "POST",
37
+ path: `/cockpit/v1/grafana/sync-data-sources`
38
+ }
39
+ );
42
40
  /**
43
41
  * (Deprecated) EOL 2026-01-20. Create a Grafana user
44
42
  Create a Grafana user to connect to your Cockpit's Grafana. Upon creation, your user password displays only once, so make sure that you save it.
@@ -51,10 +49,7 @@ class GlobalAPI extends API {
51
49
  createGrafanaUser = (request) => this.client.fetch(
52
50
  {
53
51
  body: JSON.stringify(
54
- marshalGlobalApiCreateGrafanaUserRequest(
55
- request,
56
- this.client.settings
57
- )
52
+ marshalGlobalApiCreateGrafanaUserRequest(request, this.client.settings)
58
53
  ),
59
54
  headers: jsonContentHeaders,
60
55
  method: "POST",
@@ -69,14 +64,8 @@ class GlobalAPI extends API {
69
64
  urlParams: urlParams(
70
65
  ["order_by", request.orderBy],
71
66
  ["page", request.page],
72
- [
73
- "page_size",
74
- request.pageSize ?? this.client.settings.defaultPageSize
75
- ],
76
- [
77
- "project_id",
78
- request.projectId ?? this.client.settings.defaultProjectId
79
- ]
67
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
68
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
80
69
  )
81
70
  },
82
71
  unmarshalListGrafanaUsersResponse
@@ -97,14 +86,15 @@ class GlobalAPI extends API {
97
86
  * @deprecated
98
87
  * @param request - The request {@link GlobalApiDeleteGrafanaUserRequest}
99
88
  */
100
- deleteGrafanaUser = (request) => this.client.fetch({
101
- method: "DELETE",
102
- path: `/cockpit/v1/grafana/users/${validatePathParam("grafanaUserId", request.grafanaUserId)}`,
103
- urlParams: urlParams([
104
- "project_id",
105
- request.projectId ?? this.client.settings.defaultProjectId
106
- ])
107
- });
89
+ deleteGrafanaUser = (request) => this.client.fetch(
90
+ {
91
+ method: "DELETE",
92
+ path: `/cockpit/v1/grafana/users/${validatePathParam("grafanaUserId", request.grafanaUserId)}`,
93
+ urlParams: urlParams(
94
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
95
+ )
96
+ }
97
+ );
108
98
  /**
109
99
  * (Deprecated) EOL 2026-01-20. Reset a Grafana user password
110
100
  Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user.
@@ -117,10 +107,7 @@ class GlobalAPI extends API {
117
107
  resetGrafanaUserPassword = (request) => this.client.fetch(
118
108
  {
119
109
  body: JSON.stringify(
120
- marshalGlobalApiResetGrafanaUserPasswordRequest(
121
- request,
122
- this.client.settings
123
- )
110
+ marshalGlobalApiResetGrafanaUserPasswordRequest(request, this.client.settings)
124
111
  ),
125
112
  headers: jsonContentHeaders,
126
113
  method: "POST",
@@ -134,14 +121,8 @@ class GlobalAPI extends API {
134
121
  path: `/cockpit/v1/grafana/product-dashboards`,
135
122
  urlParams: urlParams(
136
123
  ["page", request.page],
137
- [
138
- "page_size",
139
- request.pageSize ?? this.client.settings.defaultPageSize
140
- ],
141
- [
142
- "project_id",
143
- request.projectId ?? this.client.settings.defaultProjectId
144
- ],
124
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
125
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
145
126
  ["tags", request.tags]
146
127
  )
147
128
  },
@@ -153,11 +134,7 @@ class GlobalAPI extends API {
153
134
  * @param request - The request {@link GlobalApiListGrafanaProductDashboardsRequest}
154
135
  * @returns A Promise of ListGrafanaProductDashboardsResponse
155
136
  */
156
- listGrafanaProductDashboards = (request = {}) => enrichForPagination(
157
- "dashboards",
158
- this.pageOfListGrafanaProductDashboards,
159
- request
160
- );
137
+ listGrafanaProductDashboards = (request = {}) => enrichForPagination("dashboards", this.pageOfListGrafanaProductDashboards, request);
161
138
  /**
162
139
  * Get Scaleway resource dashboard. Retrieve information about the dashboard of a Scaleway resource in Grafana, specified by the ID of the Project the Cockpit belongs to, and the name of the dashboard.
163
140
  *
@@ -168,10 +145,9 @@ class GlobalAPI extends API {
168
145
  {
169
146
  method: "GET",
170
147
  path: `/cockpit/v1/grafana/product-dashboards/${validatePathParam("dashboardName", request.dashboardName)}`,
171
- urlParams: urlParams([
172
- "project_id",
173
- request.projectId ?? this.client.settings.defaultProjectId
174
- ])
148
+ urlParams: urlParams(
149
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
150
+ )
175
151
  },
176
152
  unmarshalGrafanaProductDashboard
177
153
  );
@@ -182,10 +158,7 @@ class GlobalAPI extends API {
182
158
  urlParams: urlParams(
183
159
  ["order_by", request.orderBy],
184
160
  ["page", request.page],
185
- [
186
- "page_size",
187
- request.pageSize ?? this.client.settings.defaultPageSize
188
- ]
161
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
189
162
  )
190
163
  },
191
164
  unmarshalListPlansResponse
@@ -230,10 +203,9 @@ class GlobalAPI extends API {
230
203
  {
231
204
  method: "GET",
232
205
  path: `/cockpit/v1/current-plan`,
233
- urlParams: urlParams([
234
- "project_id",
235
- request.projectId ?? this.client.settings.defaultProjectId
236
- ])
206
+ urlParams: urlParams(
207
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
208
+ )
237
209
  },
238
210
  unmarshalPlan
239
211
  );
@@ -244,7 +216,11 @@ class RegionalAPI extends API {
244
216
  * type ∈ {'zone','region','global','unspecified'}
245
217
  */
246
218
  static LOCALITY = toApiLocality({
247
- regions: ["fr-par", "nl-ams", "pl-waw"]
219
+ regions: [
220
+ "fr-par",
221
+ "nl-ams",
222
+ "pl-waw"
223
+ ]
248
224
  });
249
225
  /**
250
226
  * Get the Cockpit configuration.
@@ -270,10 +246,7 @@ class RegionalAPI extends API {
270
246
  createExporter = (request) => this.client.fetch(
271
247
  {
272
248
  body: JSON.stringify(
273
- marshalRegionalApiCreateExporterRequest(
274
- request,
275
- this.client.settings
276
- )
249
+ marshalRegionalApiCreateExporterRequest(request, this.client.settings)
277
250
  ),
278
251
  headers: jsonContentHeaders,
279
252
  method: "POST",
@@ -289,14 +262,8 @@ class RegionalAPI extends API {
289
262
  ["datasource_id", request.datasourceId],
290
263
  ["order_by", request.orderBy],
291
264
  ["page", request.page],
292
- [
293
- "page_size",
294
- request.pageSize ?? this.client.settings.defaultPageSize
295
- ],
296
- [
297
- "project_id",
298
- request.projectId ?? this.client.settings.defaultProjectId
299
- ]
265
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
266
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
300
267
  )
301
268
  },
302
269
  unmarshalListExportersResponse
@@ -330,25 +297,25 @@ class RegionalAPI extends API {
330
297
  * @returns A Promise of Exporter
331
298
  */
332
299
  waitForExporter = (request, options) => waitForResource(
333
- options?.stop ?? ((res) => Promise.resolve(
334
- !EXPORTER_TRANSIENT_STATUSES.includes(res.status)
335
- )),
300
+ options?.stop ?? ((res) => Promise.resolve(!EXPORTER_TRANSIENT_STATUSES.includes(res.status))),
336
301
  this.getExporter,
337
302
  request,
338
303
  options
339
304
  );
340
305
  /**
341
306
  * Delete a data export. Delete a given data export, specified by its ID.
342
- Note that this action will immediatly and permanently delete this data exports.
307
+ Note that this action will immediately and permanently delete this data exports.
343
308
  *
344
309
  * @param request - The request {@link RegionalApiDeleteExporterRequest}
345
310
  */
346
- deleteExporter = (request) => this.client.fetch({
347
- method: "DELETE",
348
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/exporters/${validatePathParam("exporterId", request.exporterId)}`
349
- });
311
+ deleteExporter = (request) => this.client.fetch(
312
+ {
313
+ method: "DELETE",
314
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/exporters/${validatePathParam("exporterId", request.exporterId)}`
315
+ }
316
+ );
350
317
  /**
351
- * Update a data export. Update a data export attributes. Changes are effective immediatly even during Beta phase.
318
+ * Update a data export. Update a data export attributes. Changes are effective immediately even during Beta phase.
352
319
  Note that you can not change the data source linked to the export. If you need to do so, you will need to re-create the export.
353
320
  *
354
321
  * @param request - The request {@link RegionalApiUpdateExporterRequest}
@@ -357,10 +324,7 @@ class RegionalAPI extends API {
357
324
  updateExporter = (request) => this.client.fetch(
358
325
  {
359
326
  body: JSON.stringify(
360
- marshalRegionalApiUpdateExporterRequest(
361
- request,
362
- this.client.settings
363
- )
327
+ marshalRegionalApiUpdateExporterRequest(request, this.client.settings)
364
328
  ),
365
329
  headers: jsonContentHeaders,
366
330
  method: "PATCH",
@@ -378,10 +342,7 @@ class RegionalAPI extends API {
378
342
  createDataSource = (request) => this.client.fetch(
379
343
  {
380
344
  body: JSON.stringify(
381
- marshalRegionalApiCreateDataSourceRequest(
382
- request,
383
- this.client.settings
384
- )
345
+ marshalRegionalApiCreateDataSourceRequest(request, this.client.settings)
385
346
  ),
386
347
  headers: jsonContentHeaders,
387
348
  method: "POST",
@@ -407,10 +368,12 @@ class RegionalAPI extends API {
407
368
  *
408
369
  * @param request - The request {@link RegionalApiDeleteDataSourceRequest}
409
370
  */
410
- deleteDataSource = (request) => this.client.fetch({
411
- method: "DELETE",
412
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam("dataSourceId", request.dataSourceId)}`
413
- });
371
+ deleteDataSource = (request) => this.client.fetch(
372
+ {
373
+ method: "DELETE",
374
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam("dataSourceId", request.dataSourceId)}`
375
+ }
376
+ );
414
377
  pageOfListDataSources = (request = {}) => this.client.fetch(
415
378
  {
416
379
  method: "GET",
@@ -419,14 +382,8 @@ class RegionalAPI extends API {
419
382
  ["order_by", request.orderBy],
420
383
  ["origin", request.origin],
421
384
  ["page", request.page],
422
- [
423
- "page_size",
424
- request.pageSize ?? this.client.settings.defaultPageSize
425
- ],
426
- [
427
- "project_id",
428
- request.projectId ?? this.client.settings.defaultProjectId
429
- ],
385
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
386
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
430
387
  ["types", request.types]
431
388
  )
432
389
  },
@@ -448,10 +405,7 @@ class RegionalAPI extends API {
448
405
  updateDataSource = (request) => this.client.fetch(
449
406
  {
450
407
  body: JSON.stringify(
451
- marshalRegionalApiUpdateDataSourceRequest(
452
- request,
453
- this.client.settings
454
- )
408
+ marshalRegionalApiUpdateDataSourceRequest(request, this.client.settings)
455
409
  ),
456
410
  headers: jsonContentHeaders,
457
411
  method: "PATCH",
@@ -471,10 +425,7 @@ class RegionalAPI extends API {
471
425
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/usage-overview`,
472
426
  urlParams: urlParams(
473
427
  ["interval", request.interval],
474
- [
475
- "project_id",
476
- request.projectId ?? this.client.settings.defaultProjectId
477
- ]
428
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
478
429
  )
479
430
  },
480
431
  unmarshalUsageOverview
@@ -504,14 +455,8 @@ class RegionalAPI extends API {
504
455
  urlParams: urlParams(
505
456
  ["order_by", request.orderBy],
506
457
  ["page", request.page],
507
- [
508
- "page_size",
509
- request.pageSize ?? this.client.settings.defaultPageSize
510
- ],
511
- [
512
- "project_id",
513
- request.projectId ?? this.client.settings.defaultProjectId
514
- ],
458
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
459
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
515
460
  ["token_scopes", request.tokenScopes]
516
461
  )
517
462
  },
@@ -543,10 +488,12 @@ class RegionalAPI extends API {
543
488
  *
544
489
  * @param request - The request {@link RegionalApiDeleteTokenRequest}
545
490
  */
546
- deleteToken = (request) => this.client.fetch({
547
- method: "DELETE",
548
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
549
- });
491
+ deleteToken = (request) => this.client.fetch(
492
+ {
493
+ method: "DELETE",
494
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
495
+ }
496
+ );
550
497
  pageOfListProducts = (request = {}) => this.client.fetch(
551
498
  {
552
499
  method: "GET",
@@ -554,10 +501,7 @@ class RegionalAPI extends API {
554
501
  urlParams: urlParams(
555
502
  ["order_by", request.orderBy],
556
503
  ["page", request.page],
557
- [
558
- "page_size",
559
- request.pageSize ?? this.client.settings.defaultPageSize
560
- ]
504
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
561
505
  )
562
506
  },
563
507
  unmarshalListProductsResponse
@@ -582,10 +526,9 @@ class RegionalAPI extends API {
582
526
  {
583
527
  method: "GET",
584
528
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager`,
585
- urlParams: urlParams([
586
- "project_id",
587
- request.projectId ?? this.client.settings.defaultProjectId
588
- ])
529
+ urlParams: urlParams(
530
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
531
+ )
589
532
  },
590
533
  unmarshalAlertManager
591
534
  );
@@ -598,10 +541,7 @@ class RegionalAPI extends API {
598
541
  enableAlertManager = (request = {}) => this.client.fetch(
599
542
  {
600
543
  body: JSON.stringify(
601
- marshalRegionalApiEnableAlertManagerRequest(
602
- request,
603
- this.client.settings
604
- )
544
+ marshalRegionalApiEnableAlertManagerRequest(request, this.client.settings)
605
545
  ),
606
546
  headers: jsonContentHeaders,
607
547
  method: "POST",
@@ -618,10 +558,7 @@ class RegionalAPI extends API {
618
558
  disableAlertManager = (request = {}) => this.client.fetch(
619
559
  {
620
560
  body: JSON.stringify(
621
- marshalRegionalApiDisableAlertManagerRequest(
622
- request,
623
- this.client.settings
624
- )
561
+ marshalRegionalApiDisableAlertManagerRequest(request, this.client.settings)
625
562
  ),
626
563
  headers: jsonContentHeaders,
627
564
  method: "POST",
@@ -639,10 +576,9 @@ class RegionalAPI extends API {
639
576
  {
640
577
  method: "GET",
641
578
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/rules/count`,
642
- urlParams: urlParams([
643
- "project_id",
644
- request.projectId ?? this.client.settings.defaultProjectId
645
- ])
579
+ urlParams: urlParams(
580
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
581
+ )
646
582
  },
647
583
  unmarshalGetRulesCountResponse
648
584
  );
@@ -657,10 +593,7 @@ class RegionalAPI extends API {
657
593
  createContactPoint = (request = {}) => this.client.fetch(
658
594
  {
659
595
  body: JSON.stringify(
660
- marshalRegionalApiCreateContactPointRequest(
661
- request,
662
- this.client.settings
663
- )
596
+ marshalRegionalApiCreateContactPointRequest(request, this.client.settings)
664
597
  ),
665
598
  headers: jsonContentHeaders,
666
599
  method: "POST",
@@ -674,14 +607,8 @@ class RegionalAPI extends API {
674
607
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points`,
675
608
  urlParams: urlParams(
676
609
  ["page", request.page],
677
- [
678
- "page_size",
679
- request.pageSize ?? this.client.settings.defaultPageSize
680
- ],
681
- [
682
- "project_id",
683
- request.projectId ?? this.client.settings.defaultProjectId
684
- ]
610
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
611
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
685
612
  )
686
613
  },
687
614
  unmarshalListContactPointsResponse
@@ -696,10 +623,7 @@ class RegionalAPI extends API {
696
623
  updateContactPoint = (request = {}) => this.client.fetch(
697
624
  {
698
625
  body: JSON.stringify(
699
- marshalRegionalApiUpdateContactPointRequest(
700
- request,
701
- this.client.settings
702
- )
626
+ marshalRegionalApiUpdateContactPointRequest(request, this.client.settings)
703
627
  ),
704
628
  headers: jsonContentHeaders,
705
629
  method: "PATCH",
@@ -712,17 +636,16 @@ class RegionalAPI extends API {
712
636
  *
713
637
  * @param request - The request {@link RegionalApiDeleteContactPointRequest}
714
638
  */
715
- deleteContactPoint = (request = {}) => this.client.fetch({
716
- body: JSON.stringify(
717
- marshalRegionalApiDeleteContactPointRequest(
718
- request,
719
- this.client.settings
720
- )
721
- ),
722
- headers: jsonContentHeaders,
723
- method: "POST",
724
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
725
- });
639
+ deleteContactPoint = (request = {}) => this.client.fetch(
640
+ {
641
+ body: JSON.stringify(
642
+ marshalRegionalApiDeleteContactPointRequest(request, this.client.settings)
643
+ ),
644
+ headers: jsonContentHeaders,
645
+ method: "POST",
646
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
647
+ }
648
+ );
726
649
  /**
727
650
  * List alerts. List preconfigured and/or custom alerts for the specified Project and data source.
728
651
  *
@@ -736,10 +659,7 @@ class RegionalAPI extends API {
736
659
  urlParams: urlParams(
737
660
  ["data_source_id", request.dataSourceId],
738
661
  ["is_preconfigured", request.isPreconfigured],
739
- [
740
- "project_id",
741
- request.projectId ?? this.client.settings.defaultProjectId
742
- ],
662
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
743
663
  ["rule_status", request.ruleStatus],
744
664
  ["state", request.state]
745
665
  )
@@ -756,10 +676,7 @@ class RegionalAPI extends API {
756
676
  enableManagedAlerts = (request = {}) => this.client.fetch(
757
677
  {
758
678
  body: JSON.stringify(
759
- marshalRegionalApiEnableManagedAlertsRequest(
760
- request,
761
- this.client.settings
762
- )
679
+ marshalRegionalApiEnableManagedAlertsRequest(request, this.client.settings)
763
680
  ),
764
681
  headers: jsonContentHeaders,
765
682
  method: "POST",
@@ -777,10 +694,7 @@ class RegionalAPI extends API {
777
694
  disableManagedAlerts = (request = {}) => this.client.fetch(
778
695
  {
779
696
  body: JSON.stringify(
780
- marshalRegionalApiDisableManagedAlertsRequest(
781
- request,
782
- this.client.settings
783
- )
697
+ marshalRegionalApiDisableManagedAlertsRequest(request, this.client.settings)
784
698
  ),
785
699
  headers: jsonContentHeaders,
786
700
  method: "POST",
@@ -797,10 +711,7 @@ class RegionalAPI extends API {
797
711
  enableAlertRules = (request = {}) => this.client.fetch(
798
712
  {
799
713
  body: JSON.stringify(
800
- marshalRegionalApiEnableAlertRulesRequest(
801
- request,
802
- this.client.settings
803
- )
714
+ marshalRegionalApiEnableAlertRulesRequest(request, this.client.settings)
804
715
  ),
805
716
  headers: jsonContentHeaders,
806
717
  method: "POST",
@@ -817,10 +728,7 @@ class RegionalAPI extends API {
817
728
  disableAlertRules = (request = {}) => this.client.fetch(
818
729
  {
819
730
  body: JSON.stringify(
820
- marshalRegionalApiDisableAlertRulesRequest(
821
- request,
822
- this.client.settings
823
- )
731
+ marshalRegionalApiDisableAlertRulesRequest(request, this.client.settings)
824
732
  ),
825
733
  headers: jsonContentHeaders,
826
734
  method: "POST",
@@ -833,17 +741,16 @@ class RegionalAPI extends API {
833
741
  *
834
742
  * @param request - The request {@link RegionalApiTriggerTestAlertRequest}
835
743
  */
836
- triggerTestAlert = (request = {}) => this.client.fetch({
837
- body: JSON.stringify(
838
- marshalRegionalApiTriggerTestAlertRequest(
839
- request,
840
- this.client.settings
841
- )
842
- ),
843
- headers: jsonContentHeaders,
844
- method: "POST",
845
- path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/trigger-test-alert`
846
- });
744
+ triggerTestAlert = (request = {}) => this.client.fetch(
745
+ {
746
+ body: JSON.stringify(
747
+ marshalRegionalApiTriggerTestAlertRequest(request, this.client.settings)
748
+ ),
749
+ headers: jsonContentHeaders,
750
+ method: "POST",
751
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/trigger-test-alert`
752
+ }
753
+ );
847
754
  }
848
755
  export {
849
756
  GlobalAPI,
@@ -1,4 +1,6 @@
1
- const EXPORTER_TRANSIENT_STATUSES = ["creating"];
1
+ const EXPORTER_TRANSIENT_STATUSES = [
2
+ "creating"
3
+ ];
2
4
  export {
3
5
  EXPORTER_TRANSIENT_STATUSES
4
6
  };
@@ -224,10 +224,7 @@ const unmarshalGetRulesCountResponse = (data) => {
224
224
  return {
225
225
  customRulesCount: data.custom_rules_count,
226
226
  preconfiguredRulesCount: data.preconfigured_rules_count,
227
- rulesCountByDatasource: unmarshalArrayOfObject(
228
- data.rules_count_by_datasource,
229
- unmarshalRulesCount
230
- )
227
+ rulesCountByDatasource: unmarshalArrayOfObject(data.rules_count_by_datasource, unmarshalRulesCount)
231
228
  };
232
229
  };
233
230
  const unmarshalGrafana = (data) => {
@@ -291,10 +288,7 @@ const unmarshalListContactPointsResponse = (data) => {
291
288
  );
292
289
  }
293
290
  return {
294
- contactPoints: unmarshalArrayOfObject(
295
- data.contact_points,
296
- unmarshalContactPoint
297
- ),
291
+ contactPoints: unmarshalArrayOfObject(data.contact_points, unmarshalContactPoint),
298
292
  hasAdditionalContactPoints: data.has_additional_contact_points,
299
293
  hasAdditionalReceivers: data.has_additional_receivers,
300
294
  totalCount: data.total_count
@@ -329,10 +323,7 @@ const unmarshalListGrafanaProductDashboardsResponse = (data) => {
329
323
  );
330
324
  }
331
325
  return {
332
- dashboards: unmarshalArrayOfObject(
333
- data.dashboards,
334
- unmarshalGrafanaProductDashboard
335
- ),
326
+ dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard),
336
327
  totalCount: data.total_count
337
328
  };
338
329
  };
@@ -343,10 +334,7 @@ const unmarshalListGrafanaUsersResponse = (data) => {
343
334
  );
344
335
  }
345
336
  return {
346
- grafanaUsers: unmarshalArrayOfObject(
347
- data.grafana_users,
348
- unmarshalGrafanaUser
349
- ),
337
+ grafanaUsers: unmarshalArrayOfObject(data.grafana_users, unmarshalGrafanaUser),
350
338
  totalCount: data.total_count
351
339
  };
352
340
  };
@@ -477,9 +465,7 @@ const marshalRegionalApiCreateExporterRequest = (request, defaults) => ({
477
465
  ...resolveOneOf([
478
466
  {
479
467
  param: "datadog_destination",
480
- value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(
481
- request.datadogDestination
482
- ) : void 0
468
+ value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(request.datadogDestination) : void 0
483
469
  },
484
470
  {
485
471
  param: "otlp_destination",
@@ -545,9 +531,7 @@ const marshalRegionalApiUpdateExporterRequest = (request, defaults) => ({
545
531
  ...resolveOneOf([
546
532
  {
547
533
  param: "datadog_destination",
548
- value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(
549
- request.datadogDestination
550
- ) : void 0
534
+ value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(request.datadogDestination) : void 0
551
535
  },
552
536
  {
553
537
  param: "otlp_destination",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-cockpit",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Scaleway SDK cockpit",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"