@scaleway/sdk 1.13.0 → 1.15.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 (50) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +802 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/marshalling.gen.js +2 -1
  15. package/dist/api/iot/v1/api.gen.js +508 -452
  16. package/dist/api/ipfs/index.js +2 -0
  17. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  18. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  19. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  20. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  21. package/dist/api/k8s/v1/api.gen.js +403 -342
  22. package/dist/api/k8s/v1/api.utils.js +7 -10
  23. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  24. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  25. package/dist/api/lb/v1/api.gen.js +1501 -1363
  26. package/dist/api/lb/v1/api.utils.js +71 -75
  27. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  28. package/dist/api/marketplace/v1/api.gen.js +35 -32
  29. package/dist/api/marketplace/v2/api.gen.js +117 -102
  30. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  31. package/dist/api/rdb/v1/api.gen.js +897 -819
  32. package/dist/api/redis/v1/api.gen.js +358 -333
  33. package/dist/api/registry/v1/api.gen.js +211 -189
  34. package/dist/api/secret/v1alpha1/api.gen.js +265 -245
  35. package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
  36. package/dist/api/tem/v1alpha1/api.gen.js +183 -156
  37. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  38. package/dist/api/test/v1/api.gen.js +116 -104
  39. package/dist/api/vpc/v1/api.gen.js +74 -65
  40. package/dist/api/vpc/v2/api.gen.js +200 -178
  41. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  42. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  43. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  44. package/dist/index.cjs +738 -343
  45. package/dist/index.d.ts +2067 -1592
  46. package/dist/index.js +28 -26
  47. package/dist/internal/logger/console-logger.js +4 -5
  48. package/dist/scw/constants.js +1 -1
  49. package/dist/scw/errors/scw-error.js +0 -1
  50. package/package.json +2 -2
@@ -19,17 +19,15 @@ const jsonContentHeaders = {
19
19
  * Grafana for dashboarding to visualize them.
20
20
  */
21
21
  class API extends API$1 {
22
- constructor() {
23
- var _this;
24
- super(...arguments);
25
- _this = this;
26
- /**
27
- * Activate a Cockpit. Activate the Cockpit of the specified Project ID.
28
- *
29
- * @param request - The request {@link ActivateCockpitRequest}
30
- * @returns A Promise of Cockpit
31
- */
32
- this.activateCockpit = function (request) {
22
+ /**
23
+ * Activate a Cockpit. Activate the Cockpit of the specified Project ID.
24
+ *
25
+ * @param request - The request {@link ActivateCockpitRequest}
26
+ * @returns A Promise of Cockpit
27
+ */
28
+ activateCockpit = (() => {
29
+ var _this = this;
30
+ return function (request) {
33
31
  if (request === void 0) {
34
32
  request = {};
35
33
  }
@@ -40,353 +38,431 @@ class API extends API$1 {
40
38
  path: `/cockpit/v1beta1/activate`
41
39
  }, unmarshalCockpit);
42
40
  };
43
- /**
44
- * Get a Cockpit. Retrieve the Cockpit of the specified Project ID.
45
- *
46
- * @param request - The request {@link GetCockpitRequest}
47
- * @returns A Promise of Cockpit
48
- */
49
- this.getCockpit = function (request) {
41
+ })();
42
+
43
+ /**
44
+ * Get a Cockpit. Retrieve the Cockpit of the specified Project ID.
45
+ *
46
+ * @param request - The request {@link GetCockpitRequest}
47
+ * @returns A Promise of Cockpit
48
+ */
49
+ getCockpit = (() => {
50
+ var _this2 = this;
51
+ return function (request) {
50
52
  if (request === void 0) {
51
53
  request = {};
52
54
  }
53
- return _this.client.fetch({
55
+ return _this2.client.fetch({
54
56
  method: 'GET',
55
57
  path: `/cockpit/v1beta1/cockpit`,
56
- urlParams: urlParams(['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
58
+ urlParams: urlParams(['project_id', request.projectId ?? _this2.client.settings.defaultProjectId])
57
59
  }, unmarshalCockpit);
58
60
  };
59
- /**
60
- * Waits for {@link Cockpit} to be in a final state.
61
- *
62
- * @param request - The request {@link GetCockpitRequest}
63
- * @param options - The waiting options
64
- * @returns A Promise of Cockpit
65
- */
66
- this.waitForCockpit = function (request, options) {
61
+ })();
62
+
63
+ /**
64
+ * Waits for {@link Cockpit} to be in a final state.
65
+ *
66
+ * @param request - The request {@link GetCockpitRequest}
67
+ * @param options - The waiting options
68
+ * @returns A Promise of Cockpit
69
+ */
70
+ waitForCockpit = (() => {
71
+ var _this3 = this;
72
+ return function (request, options) {
67
73
  if (request === void 0) {
68
74
  request = {};
69
75
  }
70
- return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this.getCockpit, request, options);
76
+ return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this3.getCockpit, request, options);
71
77
  };
72
- /**
73
- * Get Cockpit metrics. Get metrics from your Cockpit with the specified
74
- * Project ID.
75
- *
76
- * @param request - The request {@link GetCockpitMetricsRequest}
77
- * @returns A Promise of CockpitMetrics
78
- */
79
- this.getCockpitMetrics = function (request) {
78
+ })();
79
+
80
+ /**
81
+ * Get Cockpit metrics. Get metrics from your Cockpit with the specified
82
+ * Project ID.
83
+ *
84
+ * @param request - The request {@link GetCockpitMetricsRequest}
85
+ * @returns A Promise of CockpitMetrics
86
+ */
87
+ getCockpitMetrics = (() => {
88
+ var _this4 = this;
89
+ return function (request) {
80
90
  if (request === void 0) {
81
91
  request = {};
82
92
  }
83
- return _this.client.fetch({
93
+ return _this4.client.fetch({
84
94
  method: 'GET',
85
95
  path: `/cockpit/v1beta1/cockpit/metrics`,
86
- urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId], ['start_date', request.startDate])
96
+ urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['project_id', request.projectId ?? _this4.client.settings.defaultProjectId], ['start_date', request.startDate])
87
97
  }, unmarshalCockpitMetrics);
88
98
  };
89
- /**
90
- * Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID.
91
- *
92
- * @param request - The request {@link DeactivateCockpitRequest}
93
- * @returns A Promise of Cockpit
94
- */
95
- this.deactivateCockpit = function (request) {
99
+ })();
100
+
101
+ /**
102
+ * Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID.
103
+ *
104
+ * @param request - The request {@link DeactivateCockpitRequest}
105
+ * @returns A Promise of Cockpit
106
+ */
107
+ deactivateCockpit = (() => {
108
+ var _this5 = this;
109
+ return function (request) {
96
110
  if (request === void 0) {
97
111
  request = {};
98
112
  }
99
- return _this.client.fetch({
100
- body: JSON.stringify(marshalDeactivateCockpitRequest(request, _this.client.settings)),
113
+ return _this5.client.fetch({
114
+ body: JSON.stringify(marshalDeactivateCockpitRequest(request, _this5.client.settings)),
101
115
  headers: jsonContentHeaders,
102
116
  method: 'POST',
103
117
  path: `/cockpit/v1beta1/deactivate`
104
118
  }, unmarshalCockpit);
105
119
  };
106
- /**
107
- * Reset a Grafana. Reset your Cockpit's Grafana associated with the specified
108
- * Project ID.
109
- *
110
- * @param request - The request {@link ResetCockpitGrafanaRequest}
111
- * @returns A Promise of Cockpit
112
- */
113
- this.resetCockpitGrafana = function (request) {
120
+ })();
121
+
122
+ /**
123
+ * Reset a Grafana. Reset your Cockpit's Grafana associated with the specified
124
+ * Project ID.
125
+ *
126
+ * @param request - The request {@link ResetCockpitGrafanaRequest}
127
+ * @returns A Promise of Cockpit
128
+ */
129
+ resetCockpitGrafana = (() => {
130
+ var _this6 = this;
131
+ return function (request) {
114
132
  if (request === void 0) {
115
133
  request = {};
116
134
  }
117
- return _this.client.fetch({
118
- body: JSON.stringify(marshalResetCockpitGrafanaRequest(request, _this.client.settings)),
135
+ return _this6.client.fetch({
136
+ body: JSON.stringify(marshalResetCockpitGrafanaRequest(request, _this6.client.settings)),
119
137
  headers: jsonContentHeaders,
120
138
  method: 'POST',
121
139
  path: `/cockpit/v1beta1/reset-grafana`
122
140
  }, unmarshalCockpit);
123
141
  };
124
- /**
125
- * Create a token. Create a token associated with the specified Project ID.
126
- *
127
- * @param request - The request {@link CreateTokenRequest}
128
- * @returns A Promise of Token
129
- */
130
- this.createToken = function (request) {
142
+ })();
143
+
144
+ /**
145
+ * Create a token. Create a token associated with the specified Project ID.
146
+ *
147
+ * @param request - The request {@link CreateTokenRequest}
148
+ * @returns A Promise of Token
149
+ */
150
+ createToken = (() => {
151
+ var _this7 = this;
152
+ return function (request) {
131
153
  if (request === void 0) {
132
154
  request = {};
133
155
  }
134
- return _this.client.fetch({
135
- body: JSON.stringify(marshalCreateTokenRequest(request, _this.client.settings)),
156
+ return _this7.client.fetch({
157
+ body: JSON.stringify(marshalCreateTokenRequest(request, _this7.client.settings)),
136
158
  headers: jsonContentHeaders,
137
159
  method: 'POST',
138
160
  path: `/cockpit/v1beta1/tokens`
139
161
  }, unmarshalToken);
140
162
  };
141
- this.pageOfListTokens = function (request) {
163
+ })();
164
+ pageOfListTokens = (() => {
165
+ var _this8 = this;
166
+ return function (request) {
142
167
  if (request === void 0) {
143
168
  request = {};
144
169
  }
145
- return _this.client.fetch({
170
+ return _this8.client.fetch({
146
171
  method: 'GET',
147
172
  path: `/cockpit/v1beta1/tokens`,
148
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
173
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this8.client.settings.defaultProjectId])
149
174
  }, unmarshalListTokensResponse);
150
175
  };
151
- /**
152
- * List tokens. Get a list of tokens associated with the specified Project ID.
153
- *
154
- * @param request - The request {@link ListTokensRequest}
155
- * @returns A Promise of ListTokensResponse
156
- */
157
- this.listTokens = function (request) {
176
+ })();
177
+
178
+ /**
179
+ * List tokens. Get a list of tokens associated with the specified Project ID.
180
+ *
181
+ * @param request - The request {@link ListTokensRequest}
182
+ * @returns A Promise of ListTokensResponse
183
+ */
184
+ listTokens = (() => {
185
+ var _this9 = this;
186
+ return function (request) {
158
187
  if (request === void 0) {
159
188
  request = {};
160
189
  }
161
- return enrichForPagination('tokens', _this.pageOfListTokens, request);
190
+ return enrichForPagination('tokens', _this9.pageOfListTokens, request);
162
191
  };
163
- /**
164
- * Get a token. Retrieve the token associated with the specified token ID.
165
- *
166
- * @param request - The request {@link GetTokenRequest}
167
- * @returns A Promise of Token
168
- */
169
- this.getToken = request => this.client.fetch({
170
- method: 'GET',
171
- path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
172
- }, unmarshalToken);
173
- /**
174
- * Delete a token. Delete the token associated with the specified token ID.
175
- *
176
- * @param request - The request {@link DeleteTokenRequest}
177
- */
178
- this.deleteToken = request => this.client.fetch({
179
- method: 'DELETE',
180
- path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
181
- });
182
- /**
183
- * Create a contact point. Create a contact point to receive alerts for the
184
- * default receiver.
185
- *
186
- * @param request - The request {@link CreateContactPointRequest}
187
- * @returns A Promise of ContactPoint
188
- */
189
- this.createContactPoint = function (request) {
192
+ })();
193
+
194
+ /**
195
+ * Get a token. Retrieve the token associated with the specified token ID.
196
+ *
197
+ * @param request - The request {@link GetTokenRequest}
198
+ * @returns A Promise of Token
199
+ */
200
+ getToken = request => this.client.fetch({
201
+ method: 'GET',
202
+ path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
203
+ }, unmarshalToken);
204
+
205
+ /**
206
+ * Delete a token. Delete the token associated with the specified token ID.
207
+ *
208
+ * @param request - The request {@link DeleteTokenRequest}
209
+ */
210
+ deleteToken = request => this.client.fetch({
211
+ method: 'DELETE',
212
+ path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
213
+ });
214
+
215
+ /**
216
+ * Create a contact point. Create a contact point to receive alerts for the
217
+ * default receiver.
218
+ *
219
+ * @param request - The request {@link CreateContactPointRequest}
220
+ * @returns A Promise of ContactPoint
221
+ */
222
+ createContactPoint = (() => {
223
+ var _this10 = this;
224
+ return function (request) {
190
225
  if (request === void 0) {
191
226
  request = {};
192
227
  }
193
- return _this.client.fetch({
194
- body: JSON.stringify(marshalCreateContactPointRequest(request, _this.client.settings)),
228
+ return _this10.client.fetch({
229
+ body: JSON.stringify(marshalCreateContactPointRequest(request, _this10.client.settings)),
195
230
  headers: jsonContentHeaders,
196
231
  method: 'POST',
197
232
  path: `/cockpit/v1beta1/contact-points`
198
233
  }, unmarshalContactPoint);
199
234
  };
200
- this.pageOfListContactPoints = function (request) {
235
+ })();
236
+ pageOfListContactPoints = (() => {
237
+ var _this11 = this;
238
+ return function (request) {
201
239
  if (request === void 0) {
202
240
  request = {};
203
241
  }
204
- return _this.client.fetch({
242
+ return _this11.client.fetch({
205
243
  method: 'GET',
206
244
  path: `/cockpit/v1beta1/contact-points`,
207
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
245
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this11.client.settings.defaultProjectId])
208
246
  }, unmarshalListContactPointsResponse);
209
247
  };
210
- /**
211
- * List contact points. Get a list of contact points for the Cockpit
212
- * associated with the specified Project ID.
213
- *
214
- * @param request - The request {@link ListContactPointsRequest}
215
- * @returns A Promise of ListContactPointsResponse
216
- */
217
- this.listContactPoints = function (request) {
248
+ })();
249
+
250
+ /**
251
+ * List contact points. Get a list of contact points for the Cockpit
252
+ * associated with the specified Project ID.
253
+ *
254
+ * @param request - The request {@link ListContactPointsRequest}
255
+ * @returns A Promise of ListContactPointsResponse
256
+ */
257
+ listContactPoints = (() => {
258
+ var _this12 = this;
259
+ return function (request) {
218
260
  if (request === void 0) {
219
261
  request = {};
220
262
  }
221
- return enrichForPagination('contactPoints', _this.pageOfListContactPoints, request);
263
+ return enrichForPagination('contactPoints', _this12.pageOfListContactPoints, request);
222
264
  };
223
- /**
224
- * Delete an alert contact point. Delete a contact point for the default
225
- * receiver.
226
- *
227
- * @param request - The request {@link DeleteContactPointRequest}
228
- */
229
- this.deleteContactPoint = function (request) {
265
+ })();
266
+
267
+ /**
268
+ * Delete an alert contact point. Delete a contact point for the default
269
+ * receiver.
270
+ *
271
+ * @param request - The request {@link DeleteContactPointRequest}
272
+ */
273
+ deleteContactPoint = (() => {
274
+ var _this13 = this;
275
+ return function (request) {
230
276
  if (request === void 0) {
231
277
  request = {};
232
278
  }
233
- return _this.client.fetch({
234
- body: JSON.stringify(marshalDeleteContactPointRequest(request, _this.client.settings)),
279
+ return _this13.client.fetch({
280
+ body: JSON.stringify(marshalDeleteContactPointRequest(request, _this13.client.settings)),
235
281
  headers: jsonContentHeaders,
236
282
  method: 'POST',
237
283
  path: `/cockpit/v1beta1/delete-contact-point`
238
284
  });
239
285
  };
240
- /**
241
- * Enable managed alerts. Enable the sending of managed alerts for the
242
- * specified Project's Cockpit.
243
- *
244
- * @param request - The request {@link EnableManagedAlertsRequest}
245
- */
246
- this.enableManagedAlerts = function (request) {
286
+ })();
287
+
288
+ /**
289
+ * Enable managed alerts. Enable the sending of managed alerts for the
290
+ * specified Project's Cockpit.
291
+ *
292
+ * @param request - The request {@link EnableManagedAlertsRequest}
293
+ */
294
+ enableManagedAlerts = (() => {
295
+ var _this14 = this;
296
+ return function (request) {
247
297
  if (request === void 0) {
248
298
  request = {};
249
299
  }
250
- return _this.client.fetch({
251
- body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this.client.settings)),
300
+ return _this14.client.fetch({
301
+ body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this14.client.settings)),
252
302
  headers: jsonContentHeaders,
253
303
  method: 'POST',
254
304
  path: `/cockpit/v1beta1/enable-managed-alerts`
255
305
  });
256
306
  };
257
- /**
258
- * Disable managed alerts. Disable the sending of managed alerts for the
259
- * specified Project's Cockpit.
260
- *
261
- * @param request - The request {@link DisableManagedAlertsRequest}
262
- */
263
- this.disableManagedAlerts = function (request) {
307
+ })();
308
+
309
+ /**
310
+ * Disable managed alerts. Disable the sending of managed alerts for the
311
+ * specified Project's Cockpit.
312
+ *
313
+ * @param request - The request {@link DisableManagedAlertsRequest}
314
+ */
315
+ disableManagedAlerts = (() => {
316
+ var _this15 = this;
317
+ return function (request) {
264
318
  if (request === void 0) {
265
319
  request = {};
266
320
  }
267
- return _this.client.fetch({
268
- body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this.client.settings)),
321
+ return _this15.client.fetch({
322
+ body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this15.client.settings)),
269
323
  headers: jsonContentHeaders,
270
324
  method: 'POST',
271
325
  path: `/cockpit/v1beta1/disable-managed-alerts`
272
326
  });
273
327
  };
274
- /**
275
- * Trigger a test alert. Trigger a test alert to all of the Cockpit's
276
- * receivers.
277
- *
278
- * @param request - The request {@link TriggerTestAlertRequest}
279
- */
280
- this.triggerTestAlert = function (request) {
328
+ })();
329
+
330
+ /**
331
+ * Trigger a test alert. Trigger a test alert to all of the Cockpit's
332
+ * receivers.
333
+ *
334
+ * @param request - The request {@link TriggerTestAlertRequest}
335
+ */
336
+ triggerTestAlert = (() => {
337
+ var _this16 = this;
338
+ return function (request) {
281
339
  if (request === void 0) {
282
340
  request = {};
283
341
  }
284
- return _this.client.fetch({
285
- body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this.client.settings)),
342
+ return _this16.client.fetch({
343
+ body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this16.client.settings)),
286
344
  headers: jsonContentHeaders,
287
345
  method: 'POST',
288
346
  path: `/cockpit/v1beta1/trigger-test-alert`
289
347
  });
290
348
  };
291
- /**
292
- * Create a Grafana user. Create a Grafana user for your Cockpit's Grafana
293
- * instance. Make sure you save the automatically-generated password and the
294
- * Grafana user ID.
295
- *
296
- * @param request - The request {@link CreateGrafanaUserRequest}
297
- * @returns A Promise of GrafanaUser
298
- */
299
- this.createGrafanaUser = request => this.client.fetch({
300
- body: JSON.stringify(marshalCreateGrafanaUserRequest(request, this.client.settings)),
301
- headers: jsonContentHeaders,
302
- method: 'POST',
303
- path: `/cockpit/v1beta1/grafana-users`
304
- }, unmarshalGrafanaUser);
305
- this.pageOfListGrafanaUsers = function (request) {
349
+ })();
350
+
351
+ /**
352
+ * Create a Grafana user. Create a Grafana user for your Cockpit's Grafana
353
+ * instance. Make sure you save the automatically-generated password and the
354
+ * Grafana user ID.
355
+ *
356
+ * @param request - The request {@link CreateGrafanaUserRequest}
357
+ * @returns A Promise of GrafanaUser
358
+ */
359
+ createGrafanaUser = request => this.client.fetch({
360
+ body: JSON.stringify(marshalCreateGrafanaUserRequest(request, this.client.settings)),
361
+ headers: jsonContentHeaders,
362
+ method: 'POST',
363
+ path: `/cockpit/v1beta1/grafana-users`
364
+ }, unmarshalGrafanaUser);
365
+ pageOfListGrafanaUsers = (() => {
366
+ var _this17 = this;
367
+ return function (request) {
306
368
  if (request === void 0) {
307
369
  request = {};
308
370
  }
309
- return _this.client.fetch({
371
+ return _this17.client.fetch({
310
372
  method: 'GET',
311
373
  path: `/cockpit/v1beta1/grafana-users`,
312
- urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
374
+ urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this17.client.settings.defaultProjectId])
313
375
  }, unmarshalListGrafanaUsersResponse);
314
376
  };
315
- /**
316
- * List Grafana users. Get a list of Grafana users who are able to connect to
317
- * the Cockpit's Grafana instance.
318
- *
319
- * @param request - The request {@link ListGrafanaUsersRequest}
320
- * @returns A Promise of ListGrafanaUsersResponse
321
- */
322
- this.listGrafanaUsers = function (request) {
377
+ })();
378
+
379
+ /**
380
+ * List Grafana users. Get a list of Grafana users who are able to connect to
381
+ * the Cockpit's Grafana instance.
382
+ *
383
+ * @param request - The request {@link ListGrafanaUsersRequest}
384
+ * @returns A Promise of ListGrafanaUsersResponse
385
+ */
386
+ listGrafanaUsers = (() => {
387
+ var _this18 = this;
388
+ return function (request) {
323
389
  if (request === void 0) {
324
390
  request = {};
325
391
  }
326
- return enrichForPagination('grafanaUsers', _this.pageOfListGrafanaUsers, request);
392
+ return enrichForPagination('grafanaUsers', _this18.pageOfListGrafanaUsers, request);
327
393
  };
328
- /**
329
- * Delete a Grafana user. Delete a Grafana user from a Grafana instance,
330
- * specified by the Cockpit's Project ID and the Grafana user ID.
331
- *
332
- * @param request - The request {@link DeleteGrafanaUserRequest}
333
- */
334
- this.deleteGrafanaUser = request => this.client.fetch({
335
- body: JSON.stringify(marshalDeleteGrafanaUserRequest(request, this.client.settings)),
336
- headers: jsonContentHeaders,
337
- method: 'POST',
338
- path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/delete`
339
- });
340
- /**
341
- * Reset a Grafana user's password. Reset a Grafana user's password specified
342
- * by the Cockpit's Project ID and the Grafana user ID.
343
- *
344
- * @param request - The request {@link ResetGrafanaUserPasswordRequest}
345
- * @returns A Promise of GrafanaUser
346
- */
347
- this.resetGrafanaUserPassword = request => this.client.fetch({
348
- body: JSON.stringify(marshalResetGrafanaUserPasswordRequest(request, this.client.settings)),
349
- headers: jsonContentHeaders,
350
- method: 'POST',
351
- path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
352
- }, unmarshalGrafanaUser);
353
- this.pageOfListPlans = function (request) {
394
+ })();
395
+
396
+ /**
397
+ * Delete a Grafana user. Delete a Grafana user from a Grafana instance,
398
+ * specified by the Cockpit's Project ID and the Grafana user ID.
399
+ *
400
+ * @param request - The request {@link DeleteGrafanaUserRequest}
401
+ */
402
+ deleteGrafanaUser = request => this.client.fetch({
403
+ body: JSON.stringify(marshalDeleteGrafanaUserRequest(request, this.client.settings)),
404
+ headers: jsonContentHeaders,
405
+ method: 'POST',
406
+ path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/delete`
407
+ });
408
+
409
+ /**
410
+ * Reset a Grafana user's password. Reset a Grafana user's password specified
411
+ * by the Cockpit's Project ID and the Grafana user ID.
412
+ *
413
+ * @param request - The request {@link ResetGrafanaUserPasswordRequest}
414
+ * @returns A Promise of GrafanaUser
415
+ */
416
+ resetGrafanaUserPassword = request => this.client.fetch({
417
+ body: JSON.stringify(marshalResetGrafanaUserPasswordRequest(request, this.client.settings)),
418
+ headers: jsonContentHeaders,
419
+ method: 'POST',
420
+ path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
421
+ }, unmarshalGrafanaUser);
422
+ pageOfListPlans = (() => {
423
+ var _this19 = this;
424
+ return function (request) {
354
425
  if (request === void 0) {
355
426
  request = {};
356
427
  }
357
- return _this.client.fetch({
428
+ return _this19.client.fetch({
358
429
  method: 'GET',
359
430
  path: `/cockpit/v1beta1/plans`,
360
- urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
431
+ urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
361
432
  }, unmarshalListPlansResponse);
362
433
  };
363
- /**
364
- * List pricing plans. Get a list of all pricing plans available.
365
- *
366
- * @param request - The request {@link ListPlansRequest}
367
- * @returns A Promise of ListPlansResponse
368
- */
369
- this.listPlans = function (request) {
434
+ })();
435
+
436
+ /**
437
+ * List pricing plans. Get a list of all pricing plans available.
438
+ *
439
+ * @param request - The request {@link ListPlansRequest}
440
+ * @returns A Promise of ListPlansResponse
441
+ */
442
+ listPlans = (() => {
443
+ var _this20 = this;
444
+ return function (request) {
370
445
  if (request === void 0) {
371
446
  request = {};
372
447
  }
373
- return enrichForPagination('plans', _this.pageOfListPlans, request);
448
+ return enrichForPagination('plans', _this20.pageOfListPlans, request);
374
449
  };
375
- /**
376
- * Select pricing plan. Select your chosen pricing plan for your Cockpit,
377
- * specifying the Cockpit's Project ID and the pricing plan's ID in the
378
- * request.
379
- *
380
- * @param request - The request {@link SelectPlanRequest}
381
- * @returns A Promise of SelectPlanResponse
382
- */
383
- this.selectPlan = request => this.client.fetch({
384
- body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
385
- headers: jsonContentHeaders,
386
- method: 'POST',
387
- path: `/cockpit/v1beta1/select-plan`
388
- }, unmarshalSelectPlanResponse);
389
- }
450
+ })();
451
+
452
+ /**
453
+ * Select pricing plan. Select your chosen pricing plan for your Cockpit,
454
+ * specifying the Cockpit's Project ID and the pricing plan's ID in the
455
+ * request.
456
+ *
457
+ * @param request - The request {@link SelectPlanRequest}
458
+ * @returns A Promise of SelectPlanResponse
459
+ */
460
+ selectPlan = request => this.client.fetch({
461
+ body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
462
+ headers: jsonContentHeaders,
463
+ method: 'POST',
464
+ path: `/cockpit/v1beta1/select-plan`
465
+ }, unmarshalSelectPlanResponse);
390
466
  }
391
467
 
392
468
  export { API };