@scaleway/sdk 2.72.0 → 2.74.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 (209) hide show
  1. package/dist/api/account/v3/api.gen.cjs +13 -32
  2. package/dist/api/account/v3/api.gen.d.ts +17 -36
  3. package/dist/api/account/v3/api.gen.js +13 -32
  4. package/dist/api/account/v3/index.gen.d.ts +1 -1
  5. package/dist/api/account/v3/marshalling.gen.cjs +94 -65
  6. package/dist/api/account/v3/marshalling.gen.js +94 -65
  7. package/dist/api/account/v3/types.gen.d.ts +224 -104
  8. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +19 -46
  9. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +24 -49
  10. package/dist/api/applesilicon/v1alpha1/api.gen.js +19 -46
  11. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +310 -135
  12. package/dist/api/audit_trail/v1alpha1/api.gen.cjs +2 -5
  13. package/dist/api/audit_trail/v1alpha1/api.gen.d.ts +4 -8
  14. package/dist/api/audit_trail/v1alpha1/api.gen.js +2 -5
  15. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +110 -82
  16. package/dist/api/baremetal/v1/api.gen.cjs +28 -61
  17. package/dist/api/baremetal/v1/api.gen.d.ts +29 -60
  18. package/dist/api/baremetal/v1/api.gen.js +28 -61
  19. package/dist/api/baremetal/v1/types.gen.d.ts +802 -315
  20. package/dist/api/baremetal/v3/api.gen.cjs +7 -14
  21. package/dist/api/baremetal/v3/api.gen.d.ts +10 -15
  22. package/dist/api/baremetal/v3/api.gen.js +7 -14
  23. package/dist/api/baremetal/v3/types.gen.d.ts +82 -32
  24. package/dist/api/billing/v2beta1/api.gen.cjs +11 -20
  25. package/dist/api/billing/v2beta1/api.gen.d.ts +9 -19
  26. package/dist/api/billing/v2beta1/api.gen.js +11 -20
  27. package/dist/api/billing/v2beta1/types.gen.d.ts +231 -102
  28. package/dist/api/block/v1/api.gen.cjs +37 -55
  29. package/dist/api/block/v1/api.gen.d.ts +19 -37
  30. package/dist/api/block/v1/api.gen.js +37 -55
  31. package/dist/api/block/v1/types.gen.d.ts +306 -125
  32. package/dist/api/block/v1alpha1/api.gen.cjs +45 -64
  33. package/dist/api/block/v1alpha1/api.gen.d.ts +22 -41
  34. package/dist/api/block/v1alpha1/api.gen.js +45 -64
  35. package/dist/api/block/v1alpha1/types.gen.d.ts +327 -132
  36. package/dist/api/cockpit/v1/api.gen.cjs +132 -156
  37. package/dist/api/cockpit/v1/api.gen.d.ts +66 -113
  38. package/dist/api/cockpit/v1/api.gen.js +133 -157
  39. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  40. package/dist/api/cockpit/v1/marshalling.gen.cjs +23 -0
  41. package/dist/api/cockpit/v1/marshalling.gen.d.ts +3 -1
  42. package/dist/api/cockpit/v1/marshalling.gen.js +23 -0
  43. package/dist/api/cockpit/v1/types.gen.d.ts +628 -246
  44. package/dist/api/container/v1beta1/api.gen.cjs +7 -14
  45. package/dist/api/container/v1beta1/api.gen.d.ts +9 -16
  46. package/dist/api/container/v1beta1/api.gen.js +7 -14
  47. package/dist/api/container/v1beta1/types.gen.d.ts +648 -322
  48. package/dist/api/dedibox/v1/api.gen.cjs +45 -69
  49. package/dist/api/dedibox/v1/api.gen.d.ts +52 -62
  50. package/dist/api/dedibox/v1/api.gen.js +45 -69
  51. package/dist/api/dedibox/v1/types.gen.d.ts +1765 -645
  52. package/dist/api/domain/v2beta1/api.gen.cjs +119 -178
  53. package/dist/api/domain/v2beta1/api.gen.d.ts +71 -130
  54. package/dist/api/domain/v2beta1/api.gen.js +119 -178
  55. package/dist/api/domain/v2beta1/content.gen.d.ts +1 -4
  56. package/dist/api/domain/v2beta1/types.gen.d.ts +411 -199
  57. package/dist/api/edge_services/v1beta1/api.gen.cjs +41 -22
  58. package/dist/api/edge_services/v1beta1/api.gen.d.ts +3 -2
  59. package/dist/api/edge_services/v1beta1/api.gen.js +41 -22
  60. package/dist/api/edge_services/v1beta1/index.gen.d.ts +1 -1
  61. package/dist/api/edge_services/v1beta1/types.gen.d.ts +7 -0
  62. package/dist/api/file/index.gen.cjs +4 -0
  63. package/dist/api/file/index.gen.d.ts +5 -0
  64. package/dist/api/file/index.gen.js +4 -0
  65. package/dist/api/file/v1alpha1/api.gen.cjs +142 -0
  66. package/dist/api/file/v1alpha1/api.gen.d.ts +73 -0
  67. package/dist/api/file/v1alpha1/api.gen.js +142 -0
  68. package/dist/api/file/v1alpha1/content.gen.cjs +7 -0
  69. package/dist/api/file/v1alpha1/content.gen.d.ts +3 -0
  70. package/dist/api/file/v1alpha1/content.gen.js +7 -0
  71. package/dist/api/file/v1alpha1/index.gen.cjs +8 -0
  72. package/dist/api/file/v1alpha1/index.gen.d.ts +4 -0
  73. package/dist/api/file/v1alpha1/index.gen.js +8 -0
  74. package/dist/api/file/v1alpha1/marshalling.gen.cjs +77 -0
  75. package/dist/api/file/v1alpha1/marshalling.gen.d.ts +7 -0
  76. package/dist/api/file/v1alpha1/marshalling.gen.js +77 -0
  77. package/dist/api/file/v1alpha1/types.gen.d.ts +239 -0
  78. package/dist/api/file/v1alpha1/validation-rules.gen.cjs +40 -0
  79. package/dist/api/file/v1alpha1/validation-rules.gen.d.ts +34 -0
  80. package/dist/api/file/v1alpha1/validation-rules.gen.js +40 -0
  81. package/dist/api/flexibleip/v1alpha1/api.gen.cjs +10 -25
  82. package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +12 -28
  83. package/dist/api/flexibleip/v1alpha1/api.gen.js +10 -25
  84. package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +186 -78
  85. package/dist/api/function/v1beta1/types.gen.d.ts +6 -6
  86. package/dist/api/iam/v1alpha1/api.gen.cjs +4 -4
  87. package/dist/api/iam/v1alpha1/api.gen.d.ts +4 -4
  88. package/dist/api/iam/v1alpha1/api.gen.js +4 -4
  89. package/dist/api/iam/v1alpha1/types.gen.d.ts +1 -1
  90. package/dist/api/index.gen.d.ts +3 -1
  91. package/dist/api/inference/v1/api.gen.cjs +8 -11
  92. package/dist/api/inference/v1/api.gen.d.ts +6 -9
  93. package/dist/api/inference/v1/api.gen.js +8 -11
  94. package/dist/api/inference/v1/types.gen.d.ts +330 -150
  95. package/dist/api/inference/v1beta1/api.gen.cjs +9 -12
  96. package/dist/api/inference/v1beta1/api.gen.d.ts +7 -10
  97. package/dist/api/inference/v1beta1/api.gen.js +9 -12
  98. package/dist/api/inference/v1beta1/types.gen.d.ts +341 -154
  99. package/dist/api/instance/v1/api.gen.cjs +64 -113
  100. package/dist/api/instance/v1/api.gen.d.ts +54 -103
  101. package/dist/api/instance/v1/api.gen.js +64 -113
  102. package/dist/api/instance/v1/marshalling.gen.cjs +4 -1
  103. package/dist/api/instance/v1/marshalling.gen.js +4 -1
  104. package/dist/api/instance/v1/types.gen.d.ts +1368 -600
  105. package/dist/api/instance/v1/types.private.gen.d.ts +131 -59
  106. package/dist/api/interlink/v1beta1/api.gen.cjs +21 -67
  107. package/dist/api/interlink/v1beta1/api.gen.d.ts +23 -70
  108. package/dist/api/interlink/v1beta1/api.gen.js +21 -67
  109. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +2 -0
  110. package/dist/api/interlink/v1beta1/marshalling.gen.js +2 -0
  111. package/dist/api/interlink/v1beta1/types.gen.d.ts +464 -216
  112. package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +8 -0
  113. package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +8 -0
  114. package/dist/api/interlink/v1beta1/validation-rules.gen.js +8 -0
  115. package/dist/api/iot/v1/api.gen.cjs +37 -70
  116. package/dist/api/iot/v1/api.gen.d.ts +34 -67
  117. package/dist/api/iot/v1/api.gen.js +37 -70
  118. package/dist/api/iot/v1/types.gen.d.ts +566 -321
  119. package/dist/api/ipam/v1/api.gen.cjs +6 -26
  120. package/dist/api/ipam/v1/api.gen.d.ts +8 -29
  121. package/dist/api/ipam/v1/api.gen.js +6 -26
  122. package/dist/api/ipam/v1/types.gen.d.ts +146 -105
  123. package/dist/api/jobs/v1alpha1/api.gen.cjs +2 -4
  124. package/dist/api/jobs/v1alpha1/api.gen.d.ts +4 -6
  125. package/dist/api/jobs/v1alpha1/api.gen.js +2 -4
  126. package/dist/api/jobs/v1alpha1/types.gen.d.ts +165 -91
  127. package/dist/api/k8s/v1/api.gen.cjs +33 -78
  128. package/dist/api/k8s/v1/api.gen.d.ts +27 -72
  129. package/dist/api/k8s/v1/api.gen.js +33 -78
  130. package/dist/api/k8s/v1/types.gen.d.ts +743 -506
  131. package/dist/api/key_manager/v1alpha1/api.gen.cjs +21 -57
  132. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +19 -56
  133. package/dist/api/key_manager/v1alpha1/api.gen.js +21 -57
  134. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +196 -114
  135. package/dist/api/lb/v1/marshalling.gen.cjs +4 -2
  136. package/dist/api/lb/v1/marshalling.gen.js +4 -2
  137. package/dist/api/lb/v1/types.gen.d.ts +4 -0
  138. package/dist/api/marketplace/v2/api.gen.cjs +8 -21
  139. package/dist/api/marketplace/v2/api.gen.d.ts +10 -24
  140. package/dist/api/marketplace/v2/api.gen.js +8 -21
  141. package/dist/api/marketplace/v2/types.gen.d.ts +94 -41
  142. package/dist/api/mnq/v1beta1/api.gen.cjs +24 -76
  143. package/dist/api/mnq/v1beta1/api.gen.d.ts +30 -82
  144. package/dist/api/mnq/v1beta1/api.gen.js +24 -76
  145. package/dist/api/mnq/v1beta1/types.gen.d.ts +342 -169
  146. package/dist/api/mongodb/v1alpha1/api.gen.cjs +19 -62
  147. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +21 -64
  148. package/dist/api/mongodb/v1alpha1/api.gen.js +19 -62
  149. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +443 -189
  150. package/dist/api/product_catalog/index.gen.cjs +4 -0
  151. package/dist/api/product_catalog/index.gen.d.ts +5 -0
  152. package/dist/api/product_catalog/index.gen.js +4 -0
  153. package/dist/api/product_catalog/v2alpha1/api.gen.cjs +36 -0
  154. package/dist/api/product_catalog/v2alpha1/api.gen.d.ts +18 -0
  155. package/dist/api/product_catalog/v2alpha1/api.gen.js +36 -0
  156. package/dist/api/product_catalog/v2alpha1/index.gen.cjs +6 -0
  157. package/dist/api/product_catalog/v2alpha1/index.gen.d.ts +3 -0
  158. package/dist/api/product_catalog/v2alpha1/index.gen.js +6 -0
  159. package/dist/api/product_catalog/v2alpha1/marshalling.gen.cjs +230 -0
  160. package/dist/api/product_catalog/v2alpha1/marshalling.gen.d.ts +2 -0
  161. package/dist/api/product_catalog/v2alpha1/marshalling.gen.js +230 -0
  162. package/dist/api/product_catalog/v2alpha1/types.gen.d.ts +293 -0
  163. package/dist/api/product_catalog/v2alpha1/validation-rules.gen.cjs +11 -0
  164. package/dist/api/product_catalog/v2alpha1/validation-rules.gen.d.ts +8 -0
  165. package/dist/api/product_catalog/v2alpha1/validation-rules.gen.js +11 -0
  166. package/dist/api/qaas/v1alpha1/api.gen.cjs +17 -34
  167. package/dist/api/qaas/v1alpha1/api.gen.d.ts +19 -36
  168. package/dist/api/qaas/v1alpha1/api.gen.js +17 -34
  169. package/dist/api/qaas/v1alpha1/types.gen.d.ts +502 -174
  170. package/dist/api/rdb/v1/api.gen.cjs +62 -202
  171. package/dist/api/rdb/v1/api.gen.d.ts +60 -201
  172. package/dist/api/rdb/v1/api.gen.js +62 -202
  173. package/dist/api/rdb/v1/types.gen.d.ts +1005 -524
  174. package/dist/api/redis/v1/api.gen.cjs +23 -83
  175. package/dist/api/redis/v1/api.gen.d.ts +25 -85
  176. package/dist/api/redis/v1/api.gen.js +23 -83
  177. package/dist/api/redis/v1/types.gen.d.ts +447 -170
  178. package/dist/api/registry/v1/api.gen.cjs +12 -40
  179. package/dist/api/registry/v1/api.gen.d.ts +14 -42
  180. package/dist/api/registry/v1/api.gen.js +12 -40
  181. package/dist/api/registry/v1/types.gen.d.ts +200 -116
  182. package/dist/api/secret/v1beta1/api.gen.cjs +19 -47
  183. package/dist/api/secret/v1beta1/api.gen.d.ts +21 -51
  184. package/dist/api/secret/v1beta1/api.gen.js +19 -47
  185. package/dist/api/secret/v1beta1/types.gen.d.ts +359 -224
  186. package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +9 -27
  187. package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +11 -29
  188. package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +9 -27
  189. package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +168 -76
  190. package/dist/api/tem/v1alpha1/api.gen.cjs +22 -58
  191. package/dist/api/tem/v1alpha1/api.gen.d.ts +24 -60
  192. package/dist/api/tem/v1alpha1/api.gen.js +22 -58
  193. package/dist/api/tem/v1alpha1/types.gen.d.ts +761 -338
  194. package/dist/api/test/v1/api.gen.cjs +8 -11
  195. package/dist/api/test/v1/api.gen.d.ts +6 -9
  196. package/dist/api/test/v1/api.gen.js +8 -11
  197. package/dist/api/test/v1/types.gen.d.ts +21 -10
  198. package/dist/api/vpcgw/v1/api.gen.cjs +37 -0
  199. package/dist/api/vpcgw/v1/api.gen.d.ts +37 -0
  200. package/dist/api/vpcgw/v1/api.gen.js +37 -0
  201. package/dist/client/dist/package.json.cjs +1 -1
  202. package/dist/client/dist/package.json.js +1 -1
  203. package/dist/index.cjs +36 -32
  204. package/dist/index.js +36 -32
  205. package/node_modules/@scaleway/sdk-client/dist/package.json.cjs +1 -1
  206. package/node_modules/@scaleway/sdk-client/dist/package.json.js +1 -1
  207. package/node_modules/@scaleway/sdk-client/package.json +1 -2
  208. package/package.json +2 -2
  209. package/node_modules/@scaleway/sdk-client/LICENSE +0 -191
@@ -3,19 +3,18 @@ import { API as API$1 } from "../../../client/dist/scw/api.js";
3
3
  import { urlParams, validatePathParam } from "../../../client/dist/helpers/marshalling.js";
4
4
  import "../../../client/dist/vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../client/dist/scw/fetch/resource-paginator.js";
6
- 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
+ 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, marshalRegionalApiEnableAlertRulesRequest, marshalRegionalApiDisableAlertRulesRequest, marshalRegionalApiTriggerTestAlertRequest } from "./marshalling.gen.js";
7
7
  const jsonContentHeaders = {
8
8
  "Content-Type": "application/json; charset=utf-8"
9
9
  };
10
10
  class GlobalAPI extends API$1 {
11
11
  /**
12
- * Get your Cockpit's Grafana. Retrieve information on your Cockpit's Grafana,
13
- * specified by the ID of the Project the Cockpit belongs to. The output
14
- * returned displays the URL to access your Cockpit's Grafana.
15
- *
16
- * @param request - The request {@link GlobalApiGetGrafanaRequest}
17
- * @returns A Promise of Grafana
18
- */
12
+ * Get your Cockpit's Grafana. Retrieve information on your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to.
13
+ The output returned displays the URL to access your Cockpit's Grafana.
14
+ *
15
+ * @param request - The request {@link GlobalApiGetGrafanaRequest}
16
+ * @returns A Promise of Grafana
17
+ */
19
18
  getGrafana = (request = {}) => this.client.fetch(
20
19
  {
21
20
  method: "GET",
@@ -28,9 +27,7 @@ class GlobalAPI extends API$1 {
28
27
  unmarshalGrafana
29
28
  );
30
29
  /**
31
- * Synchronize Grafana data sources. Trigger the synchronization of all your
32
- * data sources and the alert manager in the relevant regions. The alert
33
- * manager will only be synchronized if you have enabled it.
30
+ * Synchronize Grafana data sources. Trigger the synchronization of all your data sources and the alert manager in the relevant regions. The alert manager will only be synchronized if you have enabled it.
34
31
  *
35
32
  * @param request - The request {@link GlobalApiSyncGrafanaDataSourcesRequest}
36
33
  */
@@ -46,16 +43,12 @@ class GlobalAPI extends API$1 {
46
43
  path: `/cockpit/v1/grafana/sync-data-sources`
47
44
  });
48
45
  /**
49
- * Create a Grafana user. Create a Grafana user to connect to your Cockpit's
50
- * Grafana. Upon creation, your user password displays only once, so make sure
51
- * that you save it. Each Grafana user is associated with a role: viewer or
52
- * editor. A viewer can only view dashboards, whereas an editor can create and
53
- * edit dashboards. Note that the `admin` username is not available for
54
- * creation.
55
- *
56
- * @param request - The request {@link GlobalApiCreateGrafanaUserRequest}
57
- * @returns A Promise of GrafanaUser
58
- */
46
+ * Create a Grafana user. 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.
47
+ Each Grafana user is associated with a role: viewer or editor. A viewer can only view dashboards, whereas an editor can create and edit dashboards. Note that the `admin` username is not available for creation.
48
+ *
49
+ * @param request - The request {@link GlobalApiCreateGrafanaUserRequest}
50
+ * @returns A Promise of GrafanaUser
51
+ */
59
52
  createGrafanaUser = (request) => this.client.fetch(
60
53
  {
61
54
  body: JSON.stringify(
@@ -90,18 +83,14 @@ class GlobalAPI extends API$1 {
90
83
  unmarshalListGrafanaUsersResponse
91
84
  );
92
85
  /**
93
- * List Grafana users. List all Grafana users created in your Cockpit's
94
- * Grafana. By default, the Grafana users returned in the list are ordered in
95
- * ascending order.
86
+ * List Grafana users. List all Grafana users created in your Cockpit's Grafana. By default, the Grafana users returned in the list are ordered in ascending order.
96
87
  *
97
88
  * @param request - The request {@link GlobalApiListGrafanaUsersRequest}
98
89
  * @returns A Promise of ListGrafanaUsersResponse
99
90
  */
100
91
  listGrafanaUsers = (request = {}) => enrichForPagination("grafanaUsers", this.pageOfListGrafanaUsers, request);
101
92
  /**
102
- * Delete a Grafana user. Delete a Grafana user from your Cockpit's Grafana,
103
- * specified by the ID of the Project the Cockpit belongs to, and the ID of
104
- * the Grafana user.
93
+ * Delete a Grafana user. Delete a Grafana user from your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user.
105
94
  *
106
95
  * @param request - The request {@link GlobalApiDeleteGrafanaUserRequest}
107
96
  */
@@ -114,15 +103,12 @@ class GlobalAPI extends API$1 {
114
103
  ])
115
104
  });
116
105
  /**
117
- * Reset a Grafana user password. Reset the password of a Grafana user,
118
- * specified by the ID of the Project the Cockpit belongs to, and the ID of
119
- * the Grafana user. A new password regenerates and only displays once. Make
120
- * sure that you save it.
121
- *
122
- * @param request - The request
123
- * {@link GlobalApiResetGrafanaUserPasswordRequest}
124
- * @returns A Promise of GrafanaUser
125
- */
106
+ * Reset a Grafana user password. 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.
107
+ A new password regenerates and only displays once. Make sure that you save it.
108
+ *
109
+ * @param request - The request {@link GlobalApiResetGrafanaUserPasswordRequest}
110
+ * @returns A Promise of GrafanaUser
111
+ */
126
112
  resetGrafanaUserPassword = (request) => this.client.fetch(
127
113
  {
128
114
  body: JSON.stringify(
@@ -157,11 +143,9 @@ class GlobalAPI extends API$1 {
157
143
  unmarshalListGrafanaProductDashboardsResponse
158
144
  );
159
145
  /**
160
- * List Scaleway resources dashboards. Retrieve a list of available dashboards
161
- * in Grafana, for all Scaleway resources which are integrated with Cockpit.
146
+ * List Scaleway resources dashboards. Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit.
162
147
  *
163
- * @param request - The request
164
- * {@link GlobalApiListGrafanaProductDashboardsRequest}
148
+ * @param request - The request {@link GlobalApiListGrafanaProductDashboardsRequest}
165
149
  * @returns A Promise of ListGrafanaProductDashboardsResponse
166
150
  */
167
151
  listGrafanaProductDashboards = (request = {}) => enrichForPagination(
@@ -170,12 +154,9 @@ class GlobalAPI extends API$1 {
170
154
  request
171
155
  );
172
156
  /**
173
- * Get Scaleway resource dashboard. Retrieve information about the dashboard
174
- * of a Scaleway resource in Grafana, specified by the ID of the Project the
175
- * Cockpit belongs to, and the name of the dashboard.
157
+ * 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.
176
158
  *
177
- * @param request - The request
178
- * {@link GlobalApiGetGrafanaProductDashboardRequest}
159
+ * @param request - The request {@link GlobalApiGetGrafanaProductDashboardRequest}
179
160
  * @returns A Promise of GrafanaProductDashboard
180
161
  */
181
162
  getGrafanaProductDashboard = (request) => this.client.fetch(
@@ -205,24 +186,22 @@ class GlobalAPI extends API$1 {
205
186
  unmarshalListPlansResponse
206
187
  );
207
188
  /**
208
- * List plan types. Retrieve a list of available pricing plan types.
209
- * Deprecated, retention is now managed at the data source level.
210
- *
211
- * @deprecated
212
- * @param request - The request {@link GlobalApiListPlansRequest}
213
- * @returns A Promise of ListPlansResponse
214
- */
189
+ * List plan types. Retrieve a list of available pricing plan types.
190
+ Deprecated: retention is now managed at the data source level.
191
+ *
192
+ * @deprecated
193
+ * @param request - The request {@link GlobalApiListPlansRequest}
194
+ * @returns A Promise of ListPlansResponse
195
+ */
215
196
  listPlans = (request = {}) => enrichForPagination("plans", this.pageOfListPlans, request);
216
197
  /**
217
- * Apply a pricing plan. Apply a pricing plan on a given Project. You must
218
- * specify the ID of the pricing plan type. Note that you will be billed for
219
- * the plan you apply. Deprecated, retention is now managed at the data source
220
- * level.
221
- *
222
- * @deprecated
223
- * @param request - The request {@link GlobalApiSelectPlanRequest}
224
- * @returns A Promise of Plan
225
- */
198
+ * Apply a pricing plan. Apply a pricing plan on a given Project. You must specify the ID of the pricing plan type. Note that you will be billed for the plan you apply.
199
+ Deprecated: retention is now managed at the data source level.
200
+ *
201
+ * @deprecated
202
+ * @param request - The request {@link GlobalApiSelectPlanRequest}
203
+ * @returns A Promise of Plan
204
+ */
226
205
  selectPlan = (request = {}) => this.client.fetch(
227
206
  {
228
207
  body: JSON.stringify(
@@ -235,14 +214,13 @@ class GlobalAPI extends API$1 {
235
214
  unmarshalPlan
236
215
  );
237
216
  /**
238
- * Get current plan. Retrieve a pricing plan for the given Project, specified
239
- * by the ID of the Project. Deprecated, retention is now managed at the data
240
- * source level.
241
- *
242
- * @deprecated
243
- * @param request - The request {@link GlobalApiGetCurrentPlanRequest}
244
- * @returns A Promise of Plan
245
- */
217
+ * Get current plan. Retrieve a pricing plan for the given Project, specified by the ID of the Project.
218
+ Deprecated: retention is now managed at the data source level.
219
+ *
220
+ * @deprecated
221
+ * @param request - The request {@link GlobalApiGetCurrentPlanRequest}
222
+ * @returns A Promise of Plan
223
+ */
246
224
  getCurrentPlan = (request = {}) => this.client.fetch(
247
225
  {
248
226
  method: "GET",
@@ -276,17 +254,15 @@ class RegionalAPI extends API$1 {
276
254
  unmarshalGetConfigResponse
277
255
  );
278
256
  /**
279
- * Create a data source. You must specify the data source type upon creation.
280
- * Available data source types include:
281
- *
282
- * - Metrics
283
- * - Logs
284
- * - Traces The name of the data source will then be used as reference to name
285
- * the associated Grafana data source.
286
- *
287
- * @param request - The request {@link RegionalApiCreateDataSourceRequest}
288
- * @returns A Promise of DataSource
289
- */
257
+ * Create a data source. You must specify the data source type upon creation. Available data source types include:
258
+ - metrics
259
+ - logs
260
+ - traces
261
+ The name of the data source will then be used as reference to name the associated Grafana data source.
262
+ *
263
+ * @param request - The request {@link RegionalApiCreateDataSourceRequest}
264
+ * @returns A Promise of DataSource
265
+ */
290
266
  createDataSource = (request) => this.client.fetch(
291
267
  {
292
268
  body: JSON.stringify(
@@ -302,9 +278,7 @@ class RegionalAPI extends API$1 {
302
278
  unmarshalDataSource
303
279
  );
304
280
  /**
305
- * Get a data source. Retrieve information about a given data source,
306
- * specified by the data source ID. The data source's information such as its
307
- * name, type, URL, origin, and retention period, is returned.
281
+ * Get a data source. Retrieve information about a given data source, specified by the data source ID. The data source's information such as its name, type, URL, origin, and retention period, is returned.
308
282
  *
309
283
  * @param request - The request {@link RegionalApiGetDataSourceRequest}
310
284
  * @returns A Promise of DataSource
@@ -317,9 +291,7 @@ class RegionalAPI extends API$1 {
317
291
  unmarshalDataSource
318
292
  );
319
293
  /**
320
- * Delete a data source. Delete a given data source, specified by the data
321
- * source ID. Note that deleting a data source is irreversible, and cannot be
322
- * undone.
294
+ * Delete a data source. Delete a given data source, specified by the data source ID. Note that deleting a data source is irreversible, and cannot be undone.
323
295
  *
324
296
  * @param request - The request {@link RegionalApiDeleteDataSourceRequest}
325
297
  */
@@ -349,18 +321,15 @@ class RegionalAPI extends API$1 {
349
321
  unmarshalListDataSourcesResponse
350
322
  );
351
323
  /**
352
- * List data sources. Retrieve the list of data sources available in the
353
- * specified region. By default, the data sources returned in the list are
354
- * ordered by creation date, in ascending order. You can list data sources by
355
- * Project, type and origin.
356
- *
357
- * @param request - The request {@link RegionalApiListDataSourcesRequest}
358
- * @returns A Promise of ListDataSourcesResponse
359
- */
324
+ * List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order.
325
+ You can list data sources by Project, type and origin.
326
+ *
327
+ * @param request - The request {@link RegionalApiListDataSourcesRequest}
328
+ * @returns A Promise of ListDataSourcesResponse
329
+ */
360
330
  listDataSources = (request = {}) => enrichForPagination("dataSources", this.pageOfListDataSources, request);
361
331
  /**
362
- * Update a data source. Update a given data source name, specified by the
363
- * data source ID.
332
+ * Update a data source. Update a given data source name, specified by the data source ID.
364
333
  *
365
334
  * @param request - The request {@link RegionalApiUpdateDataSourceRequest}
366
335
  * @returns A Promise of DataSource
@@ -380,8 +349,7 @@ class RegionalAPI extends API$1 {
380
349
  unmarshalDataSource
381
350
  );
382
351
  /**
383
- * Get data source usage overview. Retrieve the data source usage overview per
384
- * type for the specified Project.
352
+ * Get data source usage overview. Retrieve the data source usage overview per type for the specified Project.
385
353
  *
386
354
  * @param request - The request {@link RegionalApiGetUsageOverviewRequest}
387
355
  * @returns A Promise of UsageOverview
@@ -401,15 +369,12 @@ class RegionalAPI extends API$1 {
401
369
  unmarshalUsageOverview
402
370
  );
403
371
  /**
404
- * Create a token. Give your token the relevant scopes to ensure it has the
405
- * right permissions to interact with your data sources and the Alert manager.
406
- * Make sure that you create your token in the same regions as the data
407
- * sources you want to use it for. Upon creation, your token's secret key
408
- * display only once. Make sure that you save it.
409
- *
410
- * @param request - The request {@link RegionalApiCreateTokenRequest}
411
- * @returns A Promise of Token
412
- */
372
+ * Create a token. Give your token the relevant scopes to ensure it has the right permissions to interact with your data sources and the Alert manager. Make sure that you create your token in the same regions as the data sources you want to use it for.
373
+ Upon creation, your token's secret key display only once. Make sure that you save it.
374
+ *
375
+ * @param request - The request {@link RegionalApiCreateTokenRequest}
376
+ * @returns A Promise of Token
377
+ */
413
378
  createToken = (request) => this.client.fetch(
414
379
  {
415
380
  body: JSON.stringify(
@@ -442,17 +407,15 @@ class RegionalAPI extends API$1 {
442
407
  unmarshalListTokensResponse
443
408
  );
444
409
  /**
445
- * List tokens. Retrieve a list of all tokens in the specified region. By
446
- * default, tokens returned in the list are ordered by creation date, in
447
- * ascending order. You can filter tokens by Project ID and token scopes.
448
- *
449
- * @param request - The request {@link RegionalApiListTokensRequest}
450
- * @returns A Promise of ListTokensResponse
451
- */
410
+ * List tokens. Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order.
411
+ You can filter tokens by Project ID and token scopes.
412
+ *
413
+ * @param request - The request {@link RegionalApiListTokensRequest}
414
+ * @returns A Promise of ListTokensResponse
415
+ */
452
416
  listTokens = (request = {}) => enrichForPagination("tokens", this.pageOfListTokens, request);
453
417
  /**
454
- * Get a token. Retrieve information about a given token, specified by the
455
- * token ID. The token's information such as its scopes, is returned.
418
+ * Get a token. Retrieve information about a given token, specified by the token ID. The token's information such as its scopes, is returned.
456
419
  *
457
420
  * @param request - The request {@link RegionalApiGetTokenRequest}
458
421
  * @returns A Promise of Token
@@ -465,8 +428,7 @@ class RegionalAPI extends API$1 {
465
428
  unmarshalToken
466
429
  );
467
430
  /**
468
- * Delete a token. Delete a given token, specified by the token ID. Deleting a
469
- * token is irreversible and cannot be undone.
431
+ * Delete a token. Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone.
470
432
  *
471
433
  * @param request - The request {@link RegionalApiDeleteTokenRequest}
472
434
  */
@@ -475,14 +437,12 @@ class RegionalAPI extends API$1 {
475
437
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
476
438
  });
477
439
  /**
478
- * Get the Alert manager. Retrieve information about the Alert manager which
479
- * is unique per Project and region. By default the Alert manager is disabled.
480
- * The output returned displays a URL to access the Alert manager, and whether
481
- * the Alert manager and managed alerts are enabled.
482
- *
483
- * @param request - The request {@link RegionalApiGetAlertManagerRequest}
484
- * @returns A Promise of AlertManager
485
- */
440
+ * Get the Alert manager. Retrieve information about the Alert manager which is unique per Project and region. By default the Alert manager is disabled.
441
+ The output returned displays a URL to access the Alert manager, and whether the Alert manager and managed alerts are enabled.
442
+ *
443
+ * @param request - The request {@link RegionalApiGetAlertManagerRequest}
444
+ * @returns A Promise of AlertManager
445
+ */
486
446
  getAlertManager = (request = {}) => this.client.fetch(
487
447
  {
488
448
  method: "GET",
@@ -495,10 +455,7 @@ class RegionalAPI extends API$1 {
495
455
  unmarshalAlertManager
496
456
  );
497
457
  /**
498
- * Enable the Alert manager. Enabling the Alert manager allows you to enable
499
- * managed alerts and create contact points in the specified Project and
500
- * region, to be notified when your Scaleway resources may require your
501
- * attention.
458
+ * Enable the Alert manager. Enabling the Alert manager allows you to enable managed alerts and create contact points in the specified Project and region, to be notified when your Scaleway resources may require your attention.
502
459
  *
503
460
  * @param request - The request {@link RegionalApiEnableAlertManagerRequest}
504
461
  * @returns A Promise of AlertManager
@@ -518,9 +475,7 @@ class RegionalAPI extends API$1 {
518
475
  unmarshalAlertManager
519
476
  );
520
477
  /**
521
- * Disable the Alert manager. Disabling the Alert manager deletes the contact
522
- * points you have created and disables managed alerts in the specified
523
- * Project and region.
478
+ * Disable the Alert manager. Disabling the Alert manager deletes the contact points you have created and disables managed alerts in the specified Project and region.
524
479
  *
525
480
  * @param request - The request {@link RegionalApiDisableAlertManagerRequest}
526
481
  * @returns A Promise of AlertManager
@@ -540,16 +495,13 @@ class RegionalAPI extends API$1 {
540
495
  unmarshalAlertManager
541
496
  );
542
497
  /**
543
- * Create a contact point. Contact points are email addresses associated with
544
- * the default receiver, that the Alert manager sends alerts to. The source of
545
- * the alerts are data sources within the same Project and region as the Alert
546
- * manager. If you need to receive alerts for other receivers, you can create
547
- * additional contact points and receivers in Grafana. Make sure that you
548
- * select the Scaleway Alert manager.
549
- *
550
- * @param request - The request {@link RegionalApiCreateContactPointRequest}
551
- * @returns A Promise of ContactPoint
552
- */
498
+ * Create a contact point. Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to.
499
+ The source of the alerts are data sources within the same Project and region as the Alert manager.
500
+ If you need to receive alerts for other receivers, you can create additional contact points and receivers in Grafana. Make sure that you select the Scaleway Alert manager.
501
+ *
502
+ * @param request - The request {@link RegionalApiCreateContactPointRequest}
503
+ * @returns A Promise of ContactPoint
504
+ */
553
505
  createContactPoint = (request = {}) => this.client.fetch(
554
506
  {
555
507
  body: JSON.stringify(
@@ -583,9 +535,7 @@ class RegionalAPI extends API$1 {
583
535
  unmarshalListContactPointsResponse
584
536
  );
585
537
  /**
586
- * List contact points. Retrieve a list of contact points for the specified
587
- * Project. The response lists all contact points and receivers created in
588
- * Grafana or via the API.
538
+ * List contact points. Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API.
589
539
  *
590
540
  * @param request - The request {@link RegionalApiListContactPointsRequest}
591
541
  * @returns A Promise of ListContactPointsResponse
@@ -606,8 +556,7 @@ class RegionalAPI extends API$1 {
606
556
  unmarshalContactPoint
607
557
  );
608
558
  /**
609
- * Delete a contact point. Delete a contact point associated with the default
610
- * receiver.
559
+ * Delete a contact point. Delete a contact point associated with the default receiver.
611
560
  *
612
561
  * @param request - The request {@link RegionalApiDeleteContactPointRequest}
613
562
  */
@@ -623,8 +572,7 @@ class RegionalAPI extends API$1 {
623
572
  path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
624
573
  });
625
574
  /**
626
- * List alerts. List preconfigured and/or custom alerts for the specified
627
- * Project.
575
+ * List alerts. List preconfigured and/or custom alerts for the specified Project.
628
576
  *
629
577
  * @param request - The request {@link RegionalApiListAlertsRequest}
630
578
  * @returns A Promise of ListAlertsResponse
@@ -646,9 +594,7 @@ class RegionalAPI extends API$1 {
646
594
  unmarshalListAlertsResponse
647
595
  );
648
596
  /**
649
- * Enable managed alerts. Enable the sending of managed alerts for the
650
- * specified Project. Managed alerts are predefined alerts that apply to
651
- * Scaleway recources integrated with Cockpit by default.
597
+ * Enable managed alerts. Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway recources integrated with Cockpit by default.
652
598
  *
653
599
  * @param request - The request {@link RegionalApiEnableManagedAlertsRequest}
654
600
  * @returns A Promise of AlertManager
@@ -668,8 +614,7 @@ class RegionalAPI extends API$1 {
668
614
  unmarshalAlertManager
669
615
  );
670
616
  /**
671
- * Disable managed alerts. Disable the sending of managed alerts for the
672
- * specified Project.
617
+ * Disable managed alerts. Disable the sending of managed alerts for the specified Project.
673
618
  *
674
619
  * @param request - The request {@link RegionalApiDisableManagedAlertsRequest}
675
620
  * @returns A Promise of AlertManager
@@ -689,8 +634,39 @@ class RegionalAPI extends API$1 {
689
634
  unmarshalAlertManager
690
635
  );
691
636
  /**
692
- * Trigger a test alert. Send a test alert to the Alert manager to make sure
693
- * your contact points get notified.
637
+ * Enable preconfigured alert rules. Enable alert rules from the list of available preconfigured rules.. Enable preconfigured alert rules. Enable alert rules from the list of available preconfigured rules.
638
+ *
639
+ * @param request - The request {@link RegionalApiEnableAlertRulesRequest}
640
+ */
641
+ enableAlertRules = (request = {}) => this.client.fetch({
642
+ body: JSON.stringify(
643
+ marshalRegionalApiEnableAlertRulesRequest(
644
+ request,
645
+ this.client.settings
646
+ )
647
+ ),
648
+ headers: jsonContentHeaders,
649
+ method: "POST",
650
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/enable-alert-rules`
651
+ });
652
+ /**
653
+ * Disable preconfigured alert rules. Disable alert rules from the list of available preconfigured rules.. Disable preconfigured alert rules. Disable alert rules from the list of available preconfigured rules.
654
+ *
655
+ * @param request - The request {@link RegionalApiDisableAlertRulesRequest}
656
+ */
657
+ disableAlertRules = (request = {}) => this.client.fetch({
658
+ body: JSON.stringify(
659
+ marshalRegionalApiDisableAlertRulesRequest(
660
+ request,
661
+ this.client.settings
662
+ )
663
+ ),
664
+ headers: jsonContentHeaders,
665
+ method: "POST",
666
+ path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/disable-alert-rules`
667
+ });
668
+ /**
669
+ * Trigger a test alert. Send a test alert to the Alert manager to make sure your contact points get notified.
694
670
  *
695
671
  * @param request - The request {@link RegionalApiTriggerTestAlertRequest}
696
672
  */
@@ -1,3 +1,3 @@
1
1
  export { GlobalAPI, RegionalAPI, } from './api.gen.js';
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';
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, PreconfiguredAlertData, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableAlertRulesRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableAlertRulesRequest, 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';
@@ -156,6 +156,18 @@ const unmarshalGrafana = (data) => {
156
156
  grafanaUrl: data.grafana_url
157
157
  };
158
158
  };
159
+ const unmarshalPreconfiguredAlertData = (data) => {
160
+ if (!json.isJSONObject(data)) {
161
+ throw new TypeError(
162
+ `Unmarshalling the type 'PreconfiguredAlertData' failed as data isn't a dictionary.`
163
+ );
164
+ }
165
+ return {
166
+ displayDescription: data.display_description,
167
+ displayName: data.display_name,
168
+ preconfiguredRuleId: data.preconfigured_rule_id
169
+ };
170
+ };
159
171
  const unmarshalAlert = (data) => {
160
172
  if (!json.isJSONObject(data)) {
161
173
  throw new TypeError(
@@ -168,6 +180,7 @@ const unmarshalAlert = (data) => {
168
180
  enabled: data.enabled,
169
181
  name: data.name,
170
182
  preconfigured: data.preconfigured,
183
+ preconfiguredData: data.preconfigured_data ? unmarshalPreconfiguredAlertData(data.preconfigured_data) : void 0,
171
184
  region: data.region,
172
185
  rule: data.rule,
173
186
  state: data.state ? data.state : void 0
@@ -343,12 +356,20 @@ const marshalRegionalApiDeleteContactPointRequest = (request, defaults) => ({
343
356
  const marshalRegionalApiDisableAlertManagerRequest = (request, defaults) => ({
344
357
  project_id: request.projectId ?? defaults.defaultProjectId
345
358
  });
359
+ const marshalRegionalApiDisableAlertRulesRequest = (request, defaults) => ({
360
+ project_id: request.projectId ?? defaults.defaultProjectId,
361
+ rule_ids: request.ruleIds
362
+ });
346
363
  const marshalRegionalApiDisableManagedAlertsRequest = (request, defaults) => ({
347
364
  project_id: request.projectId ?? defaults.defaultProjectId
348
365
  });
349
366
  const marshalRegionalApiEnableAlertManagerRequest = (request, defaults) => ({
350
367
  project_id: request.projectId ?? defaults.defaultProjectId
351
368
  });
369
+ const marshalRegionalApiEnableAlertRulesRequest = (request, defaults) => ({
370
+ project_id: request.projectId ?? defaults.defaultProjectId,
371
+ rule_ids: request.ruleIds
372
+ });
352
373
  const marshalRegionalApiEnableManagedAlertsRequest = (request, defaults) => ({
353
374
  project_id: request.projectId ?? defaults.defaultProjectId
354
375
  });
@@ -378,8 +399,10 @@ exports.marshalRegionalApiCreateDataSourceRequest = marshalRegionalApiCreateData
378
399
  exports.marshalRegionalApiCreateTokenRequest = marshalRegionalApiCreateTokenRequest;
379
400
  exports.marshalRegionalApiDeleteContactPointRequest = marshalRegionalApiDeleteContactPointRequest;
380
401
  exports.marshalRegionalApiDisableAlertManagerRequest = marshalRegionalApiDisableAlertManagerRequest;
402
+ exports.marshalRegionalApiDisableAlertRulesRequest = marshalRegionalApiDisableAlertRulesRequest;
381
403
  exports.marshalRegionalApiDisableManagedAlertsRequest = marshalRegionalApiDisableManagedAlertsRequest;
382
404
  exports.marshalRegionalApiEnableAlertManagerRequest = marshalRegionalApiEnableAlertManagerRequest;
405
+ exports.marshalRegionalApiEnableAlertRulesRequest = marshalRegionalApiEnableAlertRulesRequest;
383
406
  exports.marshalRegionalApiEnableManagedAlertsRequest = marshalRegionalApiEnableManagedAlertsRequest;
384
407
  exports.marshalRegionalApiTriggerTestAlertRequest = marshalRegionalApiTriggerTestAlertRequest;
385
408
  exports.marshalRegionalApiUpdateContactPointRequest = marshalRegionalApiUpdateContactPointRequest;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
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';
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, RegionalApiDisableAlertRulesRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableAlertRulesRequest, 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;
@@ -26,8 +26,10 @@ export declare const marshalRegionalApiCreateDataSourceRequest: (request: Region
26
26
  export declare const marshalRegionalApiCreateTokenRequest: (request: RegionalApiCreateTokenRequest, defaults: DefaultValues) => Record<string, unknown>;
27
27
  export declare const marshalRegionalApiDeleteContactPointRequest: (request: RegionalApiDeleteContactPointRequest, defaults: DefaultValues) => Record<string, unknown>;
28
28
  export declare const marshalRegionalApiDisableAlertManagerRequest: (request: RegionalApiDisableAlertManagerRequest, defaults: DefaultValues) => Record<string, unknown>;
29
+ export declare const marshalRegionalApiDisableAlertRulesRequest: (request: RegionalApiDisableAlertRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
29
30
  export declare const marshalRegionalApiDisableManagedAlertsRequest: (request: RegionalApiDisableManagedAlertsRequest, defaults: DefaultValues) => Record<string, unknown>;
30
31
  export declare const marshalRegionalApiEnableAlertManagerRequest: (request: RegionalApiEnableAlertManagerRequest, defaults: DefaultValues) => Record<string, unknown>;
32
+ export declare const marshalRegionalApiEnableAlertRulesRequest: (request: RegionalApiEnableAlertRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
31
33
  export declare const marshalRegionalApiEnableManagedAlertsRequest: (request: RegionalApiEnableManagedAlertsRequest, defaults: DefaultValues) => Record<string, unknown>;
32
34
  export declare const marshalRegionalApiTriggerTestAlertRequest: (request: RegionalApiTriggerTestAlertRequest, defaults: DefaultValues) => Record<string, unknown>;
33
35
  export declare const marshalRegionalApiUpdateContactPointRequest: (request: RegionalApiUpdateContactPointRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -154,6 +154,18 @@ const unmarshalGrafana = (data) => {
154
154
  grafanaUrl: data.grafana_url
155
155
  };
156
156
  };
157
+ const unmarshalPreconfiguredAlertData = (data) => {
158
+ if (!isJSONObject(data)) {
159
+ throw new TypeError(
160
+ `Unmarshalling the type 'PreconfiguredAlertData' failed as data isn't a dictionary.`
161
+ );
162
+ }
163
+ return {
164
+ displayDescription: data.display_description,
165
+ displayName: data.display_name,
166
+ preconfiguredRuleId: data.preconfigured_rule_id
167
+ };
168
+ };
157
169
  const unmarshalAlert = (data) => {
158
170
  if (!isJSONObject(data)) {
159
171
  throw new TypeError(
@@ -166,6 +178,7 @@ const unmarshalAlert = (data) => {
166
178
  enabled: data.enabled,
167
179
  name: data.name,
168
180
  preconfigured: data.preconfigured,
181
+ preconfiguredData: data.preconfigured_data ? unmarshalPreconfiguredAlertData(data.preconfigured_data) : void 0,
169
182
  region: data.region,
170
183
  rule: data.rule,
171
184
  state: data.state ? data.state : void 0
@@ -341,12 +354,20 @@ const marshalRegionalApiDeleteContactPointRequest = (request, defaults) => ({
341
354
  const marshalRegionalApiDisableAlertManagerRequest = (request, defaults) => ({
342
355
  project_id: request.projectId ?? defaults.defaultProjectId
343
356
  });
357
+ const marshalRegionalApiDisableAlertRulesRequest = (request, defaults) => ({
358
+ project_id: request.projectId ?? defaults.defaultProjectId,
359
+ rule_ids: request.ruleIds
360
+ });
344
361
  const marshalRegionalApiDisableManagedAlertsRequest = (request, defaults) => ({
345
362
  project_id: request.projectId ?? defaults.defaultProjectId
346
363
  });
347
364
  const marshalRegionalApiEnableAlertManagerRequest = (request, defaults) => ({
348
365
  project_id: request.projectId ?? defaults.defaultProjectId
349
366
  });
367
+ const marshalRegionalApiEnableAlertRulesRequest = (request, defaults) => ({
368
+ project_id: request.projectId ?? defaults.defaultProjectId,
369
+ rule_ids: request.ruleIds
370
+ });
350
371
  const marshalRegionalApiEnableManagedAlertsRequest = (request, defaults) => ({
351
372
  project_id: request.projectId ?? defaults.defaultProjectId
352
373
  });
@@ -377,8 +398,10 @@ export {
377
398
  marshalRegionalApiCreateTokenRequest,
378
399
  marshalRegionalApiDeleteContactPointRequest,
379
400
  marshalRegionalApiDisableAlertManagerRequest,
401
+ marshalRegionalApiDisableAlertRulesRequest,
380
402
  marshalRegionalApiDisableManagedAlertsRequest,
381
403
  marshalRegionalApiEnableAlertManagerRequest,
404
+ marshalRegionalApiEnableAlertRulesRequest,
382
405
  marshalRegionalApiEnableManagedAlertsRequest,
383
406
  marshalRegionalApiTriggerTestAlertRequest,
384
407
  marshalRegionalApiUpdateContactPointRequest,