@cloudfleet/sdk 0.0.1-0ac9bf0 → 0.0.1-0b7b21b

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 (61) hide show
  1. package/README.md +26 -2
  2. package/dist/@tanstack/react-query.gen.d.ts +1077 -0
  3. package/dist/@tanstack/react-query.gen.d.ts.map +1 -0
  4. package/dist/@tanstack/react-query.gen.js +1286 -0
  5. package/dist/@tanstack/react-query.gen.js.map +1 -0
  6. package/dist/client/client.gen.d.ts.map +1 -1
  7. package/dist/client/client.gen.js +114 -102
  8. package/dist/client/client.gen.js.map +1 -1
  9. package/dist/client/index.d.ts +1 -1
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/index.js.map +1 -1
  12. package/dist/client/types.gen.d.ts +9 -13
  13. package/dist/client/types.gen.d.ts.map +1 -1
  14. package/dist/client/utils.gen.d.ts +8 -4
  15. package/dist/client/utils.gen.d.ts.map +1 -1
  16. package/dist/client/utils.gen.js +13 -15
  17. package/dist/client/utils.gen.js.map +1 -1
  18. package/dist/client.gen.d.ts.map +1 -1
  19. package/dist/client.gen.js +1 -3
  20. package/dist/client.gen.js.map +1 -1
  21. package/dist/core/auth.gen.d.ts.map +1 -1
  22. package/dist/core/auth.gen.js.map +1 -1
  23. package/dist/core/bodySerializer.gen.d.ts +16 -8
  24. package/dist/core/bodySerializer.gen.d.ts.map +1 -1
  25. package/dist/core/bodySerializer.gen.js +1 -1
  26. package/dist/core/bodySerializer.gen.js.map +1 -1
  27. package/dist/core/params.gen.d.ts +10 -0
  28. package/dist/core/params.gen.d.ts.map +1 -1
  29. package/dist/core/params.gen.js +22 -10
  30. package/dist/core/params.gen.js.map +1 -1
  31. package/dist/core/pathSerializer.gen.d.ts.map +1 -1
  32. package/dist/core/pathSerializer.gen.js +3 -11
  33. package/dist/core/pathSerializer.gen.js.map +1 -1
  34. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
  35. package/dist/core/queryKeySerializer.gen.js +4 -11
  36. package/dist/core/queryKeySerializer.gen.js.map +1 -1
  37. package/dist/core/serverSentEvents.gen.d.ts +1 -1
  38. package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
  39. package/dist/core/serverSentEvents.gen.js +6 -9
  40. package/dist/core/serverSentEvents.gen.js.map +1 -1
  41. package/dist/core/types.gen.d.ts +1 -1
  42. package/dist/core/types.gen.d.ts.map +1 -1
  43. package/dist/core/utils.gen.d.ts.map +1 -1
  44. package/dist/core/utils.gen.js +1 -1
  45. package/dist/core/utils.gen.js.map +1 -1
  46. package/dist/schemas.gen.d.ts +1770 -273
  47. package/dist/schemas.gen.d.ts.map +1 -1
  48. package/dist/schemas.gen.js +3181 -308
  49. package/dist/schemas.gen.js.map +1 -1
  50. package/dist/sdk.gen.d.ts +305 -164
  51. package/dist/sdk.gen.d.ts.map +1 -1
  52. package/dist/sdk.gen.js +447 -323
  53. package/dist/sdk.gen.js.map +1 -1
  54. package/dist/services/kubernetes/api.d.ts +8 -8
  55. package/dist/types.gen.d.ts +2054 -579
  56. package/dist/types.gen.d.ts.map +1 -1
  57. package/dist/zod.gen.d.ts +3692 -1312
  58. package/dist/zod.gen.d.ts.map +1 -1
  59. package/dist/zod.gen.js +1559 -570
  60. package/dist/zod.gen.js.map +1 -1
  61. package/package.json +28 -8
package/dist/sdk.gen.js CHANGED
@@ -1,75 +1,134 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
+ import { formDataBodySerializer } from './client';
2
3
  import { client } from './client.gen';
3
- export class BillingService {
4
+ export class UsersService {
4
5
  /**
5
- * Get billing usage information.
6
+ * Get a list of organizations the user belongs to. Used during authentication process.
7
+ */
8
+ static listUserOrganizations(options) {
9
+ return (options.client ?? client).get({ url: '/users/organizations/{email}', ...options });
10
+ }
11
+ /**
12
+ * List users in organization.
6
13
  *
7
- * Returns aggregated usage information for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
14
+ * Returns a list of user details and their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
15
+ *
16
+ * This endpoint is available to all users in the organization.
8
17
  *
9
18
  */
10
- static getUsage(options) {
11
- return (options?.client ?? client).get({
12
- url: '/billing/usage',
13
- ...options
14
- });
19
+ static listUsers(options) {
20
+ return (options?.client ?? client).get({ url: '/users', ...options });
15
21
  }
16
22
  /**
17
- * Get organization payment method information.
23
+ * Create a new user.
18
24
  *
19
- * Returns the information about the payment card associated with the organization with sensitive information redacted. Payment details can be updated in the Cloudfleet console only, please visit https://console.cloudfleet.ai. This endpoint is available to all users in the organization.
25
+ * Create a new user in your Cloudfleet organization. Requires a valid invite code generated by the `invites create` command. The invite code is a unique string that can be used only once to create a new user. The invite code is generated by the `POST /invites` endpoint.
20
26
  *
21
27
  */
22
- static getPaymentMethod(options) {
23
- return (options?.client ?? client).get({
24
- url: '/billing/payment-method',
25
- ...options
28
+ static createUser(options) {
29
+ return (options.client ?? client).post({
30
+ url: '/users',
31
+ ...options,
32
+ headers: {
33
+ 'Content-Type': 'application/json',
34
+ ...options.headers
35
+ }
26
36
  });
27
37
  }
28
38
  /**
29
- * Get Stripe client secret.
39
+ * Delete user by id.
30
40
  *
31
- * Endpoint returns the Stripe secret key for the organization. This key is used to securely update the payment method in the Cloudfleet console only, please visit https://console.cloudfleet.ai. This endpoint is available to administrators of the organization only.
41
+ * Sets user status to `inactive`. Inactive users cannot log in and manage organization resources. This endpoint is available to administrators of the organization only.
32
42
  *
33
43
  */
34
- static getPaymentMethodSecret(options) {
35
- return (options?.client ?? client).put({
36
- url: '/billing/payment-method',
37
- ...options
38
- });
44
+ static deleteUser(options) {
45
+ return (options.client ?? client).delete({ url: '/users/{user_id}', ...options });
39
46
  }
40
47
  /**
41
- * List issued invoices.
48
+ * Get user profile information by id.
42
49
  *
43
- * Returns a list of invoices for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
50
+ * Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
51
+ *
52
+ * This endpoint is available to all users in the organization.
44
53
  *
45
54
  */
46
- static listInvoices(options) {
47
- return (options?.client ?? client).get({
48
- url: '/billing/invoices',
49
- ...options
55
+ static getUser(options) {
56
+ return (options.client ?? client).get({ url: '/users/{user_id}', ...options });
57
+ }
58
+ /**
59
+ * Update user profile information.
60
+ *
61
+ * Update user profile information: email, first name, last name, role. This endpoint can be accessed by administrators and the user itself. Role and status can be changed by administrators only.
62
+ *
63
+ */
64
+ static updateUser(options) {
65
+ return (options.client ?? client).put({
66
+ url: '/users/{user_id}',
67
+ ...options,
68
+ headers: {
69
+ 'Content-Type': 'application/json',
70
+ ...options.headers
71
+ }
50
72
  });
51
73
  }
74
+ }
75
+ export class TokensService {
52
76
  /**
53
- * Get organization contact and billing address information.
77
+ * List access tokens in organization.
54
78
  *
55
- * Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
79
+ * This endpoint allows you to get a list of all access tokens details in organization. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
56
80
  *
57
81
  */
58
- static getContact(options) {
59
- return (options?.client ?? client).get({
60
- url: '/billing/contact',
61
- ...options
82
+ static listTokens(options) {
83
+ return (options?.client ?? client).get({ url: '/tokens', ...options });
84
+ }
85
+ /**
86
+ * Create a new access token.
87
+ *
88
+ * This endpoint allows you to create a new access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
89
+ *
90
+ * This endpoint is available to administrators of the organization only.
91
+ *
92
+ */
93
+ static createToken(options) {
94
+ return (options.client ?? client).post({
95
+ url: '/tokens',
96
+ ...options,
97
+ headers: {
98
+ 'Content-Type': 'application/json',
99
+ ...options.headers
100
+ }
62
101
  });
63
102
  }
64
103
  /**
65
- * Update organization contact information and billing address.
104
+ * Permanently delete access token.
66
105
  *
67
- * This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
106
+ * This endpoint allows you to delete an access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to administrators of the organization only.
68
107
  *
69
108
  */
70
- static updateContact(options) {
109
+ static deleteToken(options) {
110
+ return (options.client ?? client).delete({ url: '/tokens/{token_id}', ...options });
111
+ }
112
+ /**
113
+ * Get access token information.
114
+ *
115
+ * This endpoint allows you to get access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
116
+ *
117
+ */
118
+ static getToken(options) {
119
+ return (options.client ?? client).get({ url: '/tokens/{token_id}', ...options });
120
+ }
121
+ /**
122
+ * Update access token information.
123
+ *
124
+ * This endpoint allows you to update access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
125
+ *
126
+ * This endpoint is available to administrators of the organization only.
127
+ *
128
+ */
129
+ static updateToken(options) {
71
130
  return (options.client ?? client).put({
72
- url: '/billing/contact',
131
+ url: '/tokens/{token_id}',
73
132
  ...options,
74
133
  headers: {
75
134
  'Content-Type': 'application/json',
@@ -78,26 +137,130 @@ export class BillingService {
78
137
  });
79
138
  }
80
139
  /**
81
- * Get applied promotional credits
140
+ * Regenerate access token secret key.
82
141
  *
83
- * Returns applied promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
142
+ * Generates a new access token secret. Old secret will not be valid anymore.
143
+ */
144
+ static regenerateToken(options) {
145
+ return (options.client ?? client).put({ url: '/tokens/{token_id}/secret', ...options });
146
+ }
147
+ }
148
+ export class TicketsService {
149
+ /**
150
+ * List tickets for the current organization.
151
+ *
152
+ * Returns all tickets belonging to the caller's organization, newest first.
84
153
  *
85
154
  */
86
- static getCredits(options) {
87
- return (options?.client ?? client).get({
88
- url: '/billing/credits',
89
- ...options
155
+ static listTickets(options) {
156
+ return (options?.client ?? client).get({ url: '/tickets', ...options });
157
+ }
158
+ /**
159
+ * Create a new support ticket.
160
+ *
161
+ * Creates a new support ticket with an initial customer message. The request is `multipart/form-data` with a JSON-encoded `payload` field carrying `category`, `body`, and optional `properties` and `grant_support_access`, plus up to 3 `attachments` files (10 MB max each).
162
+ *
163
+ */
164
+ static createTicket(options) {
165
+ return (options.client ?? client).post({
166
+ ...formDataBodySerializer,
167
+ url: '/tickets',
168
+ ...options,
169
+ headers: {
170
+ 'Content-Type': null,
171
+ ...options.headers
172
+ }
90
173
  });
91
174
  }
92
175
  /**
93
- * Redeem promotional credits code.
176
+ * Close a ticket (soft close).
94
177
  *
95
- * Applies promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
178
+ * Marks the ticket as closed. Closed is a terminal state — users cannot reply to a closed ticket; a new ticket must be opened instead.
96
179
  *
97
180
  */
98
- static redeemCredits(options) {
181
+ static closeTicket(options) {
182
+ return (options.client ?? client).delete({ url: '/tickets/{ticket_id}', ...options });
183
+ }
184
+ /**
185
+ * Get a ticket and its messages.
186
+ */
187
+ static getTicket(options) {
188
+ return (options.client ?? client).get({ url: '/tickets/{ticket_id}', ...options });
189
+ }
190
+ /**
191
+ * Grant Cloudfleet support access for a ticket.
192
+ *
193
+ * Grants Cloudfleet support staff access to the organization's resources while the ticket is open. Access cannot be revoked; it ends when the ticket is closed. Idempotent: granting again keeps the original grant. Returns 409 if the ticket is closed.
194
+ *
195
+ */
196
+ static grantTicketSupportAccess(options) {
197
+ return (options.client ?? client).put({ url: '/tickets/{ticket_id}/support-access', ...options });
198
+ }
199
+ /**
200
+ * Append a customer reply to a ticket.
201
+ *
202
+ * Multipart form-data with a JSON-encoded `payload` field carrying `body`, plus up to 3 `attachments` files. Returns 409 if the ticket is closed.
203
+ *
204
+ */
205
+ static replyTicket(options) {
99
206
  return (options.client ?? client).post({
100
- url: '/billing/credits',
207
+ ...formDataBodySerializer,
208
+ url: '/tickets/{ticket_id}/messages',
209
+ ...options,
210
+ headers: {
211
+ 'Content-Type': null,
212
+ ...options.headers
213
+ }
214
+ });
215
+ }
216
+ /**
217
+ * Download a ticket attachment.
218
+ */
219
+ static getTicketAttachment(options) {
220
+ return (options.client ?? client).get({ url: '/tickets/{ticket_id}/attachments/{attachment_id}', ...options });
221
+ }
222
+ }
223
+ export class RoadmapService {
224
+ /**
225
+ * List roadmap items.
226
+ *
227
+ * Returns the published roadmap items, newest first, each with your own vote. Votes of other users are not returned.
228
+ *
229
+ */
230
+ static listRoadmap(options) {
231
+ return (options?.client ?? client).get({ url: '/roadmap', ...options });
232
+ }
233
+ /**
234
+ * Suggest a new roadmap item.
235
+ *
236
+ * Submits a suggestion in one or two sentences, with your up vote on it. Suggestions are reviewed by the Cloudfleet team before they appear on the roadmap.
237
+ *
238
+ */
239
+ static suggestRoadmap(options) {
240
+ return (options.client ?? client).post({
241
+ url: '/roadmap',
242
+ ...options,
243
+ headers: {
244
+ 'Content-Type': 'application/json',
245
+ ...options.headers
246
+ }
247
+ });
248
+ }
249
+ /**
250
+ * Remove your vote from a roadmap item.
251
+ */
252
+ static unvoteRoadmap(options) {
253
+ return (options.client ?? client).delete({ url: '/roadmap/{item_id}/vote', ...options });
254
+ }
255
+ /**
256
+ * Vote on a roadmap item.
257
+ *
258
+ * Sets your vote on a roadmap item: -1 (down), 1 (up), or 2 (double up). Replaces any previous vote you cast on the item.
259
+ *
260
+ */
261
+ static voteRoadmap(options) {
262
+ return (options.client ?? client).put({
263
+ url: '/roadmap/{item_id}/vote',
101
264
  ...options,
102
265
  headers: {
103
266
  'Content-Type': 'application/json',
@@ -106,32 +269,82 @@ export class BillingService {
106
269
  });
107
270
  }
108
271
  }
109
- export class ClustersService {
272
+ export class RegistryService {
110
273
  /**
111
- * List charts.
274
+ * List repositories
112
275
  *
113
- * Returns a list of charts in the cluster.
276
+ * Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
277
+ *
278
+ */
279
+ static listRepositories(options) {
280
+ return (options?.client ?? client).get({ url: '/registry', ...options });
281
+ }
282
+ /**
283
+ * List tags for a repository
284
+ *
285
+ * Returns a list of tags for a specific repository, including size and metadata for each tag. This endpoint is available to all users in the organization.
286
+ *
287
+ */
288
+ static listTags(options) {
289
+ return (options.client ?? client).get({ url: '/registry/{region}/{repository}', ...options });
290
+ }
291
+ /**
292
+ * Delete tag
293
+ *
294
+ * Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
295
+ *
296
+ */
297
+ static deleteTag(options) {
298
+ return (options.client ?? client).delete({ url: '/registry/{region}/{repository}/{tag}', ...options });
299
+ }
300
+ /**
301
+ * Get tag details
302
+ *
303
+ * Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
304
+ *
305
+ */
306
+ static getTag(options) {
307
+ return (options.client ?? client).get({ url: '/registry/{region}/{repository}/{tag}', ...options });
308
+ }
309
+ }
310
+ export class OrganizationService {
311
+ /**
312
+ * Get organization information.
313
+ *
314
+ * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
114
315
  *
115
316
  * This endpoint is available to all users in the organization.
116
317
  *
117
318
  */
118
- static listCharts(options) {
119
- return (options.client ?? client).get({
120
- url: '/clusters/{cluster_id}/charts',
121
- ...options
122
- });
319
+ static getOrganization(options) {
320
+ return (options?.client ?? client).get({ url: '/organization', ...options });
123
321
  }
124
322
  /**
125
- * Create a new chart.
323
+ * Create a new organization / Cloudfleet account signup.
126
324
  *
127
- * Create a new chart deployment.
325
+ * This endpoint allows you to create a new Cloudfleet organization and an administrator user.
128
326
  *
129
- * This endpoint is available to administrators of the organization only.
327
+ */
328
+ static createOrganization(options) {
329
+ return (options.client ?? client).post({
330
+ url: '/organization',
331
+ ...options,
332
+ headers: {
333
+ 'Content-Type': 'application/json',
334
+ ...options.headers
335
+ }
336
+ });
337
+ }
338
+ }
339
+ export class McpService {
340
+ /**
341
+ * MCP endpoint
130
342
  *
343
+ * MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
131
344
  */
132
- static createChart(options) {
345
+ static postMcp(options) {
133
346
  return (options.client ?? client).post({
134
- url: '/clusters/{cluster_id}/charts',
347
+ url: '/mcp',
135
348
  ...options,
136
349
  headers: {
137
350
  'Content-Type': 'application/json',
@@ -139,45 +352,52 @@ export class ClustersService {
139
352
  }
140
353
  });
141
354
  }
355
+ }
356
+ export class ChartsMarketplaceService {
142
357
  /**
143
- * Permanently delete the chart deployment from the cluster.
358
+ * List chart listings available in the marketplace.
144
359
  *
145
- * This endpoint will permanently delete chart. This operation cannot be undone.
360
+ * Returns a list of available charts in the marketplace.
146
361
  *
147
- * This endpoint is available to administrators of the organization only.
362
+ * This endpoint is available to all users in the organization.
148
363
  *
149
364
  */
150
- static deleteChart(options) {
151
- return (options.client ?? client).delete({
152
- url: '/clusters/{cluster_id}/charts/{chart_name}',
153
- ...options
154
- });
365
+ static listMarketplaceCharts(options) {
366
+ return (options?.client ?? client).get({ url: '/marketplace', ...options });
155
367
  }
156
368
  /**
157
- * Get chart information.
369
+ * Get chart files for a specific version channel.
158
370
  *
159
- * Returns the details of the chart deployment.
371
+ * Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
372
+ *
373
+ * Version channels use patterns like "1.31.x-cfke.x" to match the latest patch version, or "1.x.x-cfke.x" to match the latest minor version.
160
374
  *
161
375
  * This endpoint is available to all users in the organization.
162
376
  *
163
377
  */
164
- static getChart(options) {
165
- return (options.client ?? client).get({
166
- url: '/clusters/{cluster_id}/charts/{chart_name}',
167
- ...options
168
- });
378
+ static getMarketplaceChartFiles(options) {
379
+ return (options.client ?? client).get({ url: '/marketplace/{chart_name}/files/{version_channel}', ...options });
169
380
  }
381
+ }
382
+ export class InvitesService {
170
383
  /**
171
- * Update chart information.
384
+ * List invites.
172
385
  *
173
- * This endpoint allows you to update the values of a chart deployment.
386
+ * Returns a list of pending (non-expired) invites under the current organization. This endpoint is available to administrators of the organization only.
174
387
  *
175
- * This endpoint is available to administrators of the organization only.
388
+ */
389
+ static listInvites(options) {
390
+ return (options?.client ?? client).get({ url: '/invites', ...options });
391
+ }
392
+ /**
393
+ * Create a new invite.
394
+ *
395
+ * Invite a new user to your Cloudfleet organization. The user will receive an email with a link to create a new account. This endpoint is available to administrators of the organization only.
176
396
  *
177
397
  */
178
- static updateChart(options) {
179
- return (options.client ?? client).put({
180
- url: '/clusters/{cluster_id}/charts/{chart_name}',
398
+ static createInvite(options) {
399
+ return (options.client ?? client).post({
400
+ url: '/invites',
181
401
  ...options,
182
402
  headers: {
183
403
  'Content-Type': 'application/json',
@@ -185,6 +405,34 @@ export class ClustersService {
185
405
  }
186
406
  });
187
407
  }
408
+ /**
409
+ * Get invite information.
410
+ *
411
+ * Validates an invitation code and returns the email address it was issued to (to pre-fill the signup form) and the organization it grants access to. This endpoint is unauthenticated, so no other invite details (such as the invited role) are disclosed.
412
+ *
413
+ */
414
+ static getInvite(options) {
415
+ return (options.client ?? client).get({ url: '/invites/{code}', ...options });
416
+ }
417
+ /**
418
+ * Permanently delete invite.
419
+ *
420
+ * Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
421
+ *
422
+ */
423
+ static deleteInvite(options) {
424
+ return (options.client ?? client).delete({ url: '/invites/{email}', ...options });
425
+ }
426
+ }
427
+ export class ClustersService {
428
+ /**
429
+ * Query Kubernetes cluster API
430
+ *
431
+ * An API endpoint for directly querying a Kubernetes cluster API without requiring kubectl or other tools. This endpoint is ideal for automation and scripting, as well as for internal use in fetching data for the Cloudfleet Console. It acts as a passthrough to the Kubernetes API, allowing access to any valid Kubernetes API endpoint, including those not exposed in the Cloudfleet Console. The endpoint is strictly read-only, ensuring no modifications to the cluster state. It is accessible to all users within the organization and uses the same authentication mechanisms as other Cloudfleet API endpoints.
432
+ */
433
+ static queryCluster(options) {
434
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}/query', ...options });
435
+ }
188
436
  /**
189
437
  * List fleets.
190
438
  *
@@ -193,17 +441,16 @@ export class ClustersService {
193
441
  * This endpoint is available to all users in the organization.
194
442
  *
195
443
  */
196
- static listFleets(options) {
197
- return (options.client ?? client).get({
198
- url: '/clusters/{cluster_id}/fleets',
199
- ...options
200
- });
444
+ static listFleets(options) {
445
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}/fleets', ...options });
201
446
  }
202
447
  /**
203
448
  * Create a new fleet.
204
449
  *
205
450
  * Create a new fleet under the current organization. fleets allow you to to schedule workloads in cloud service provider accounts owned by you. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
206
451
  *
452
+ * The cluster must be ready (status `deployed`) before a fleet can be added. Adding a fleet while the cluster is still provisioning returns `409`.
453
+ *
207
454
  * This endpoint is available to administrators of the organization only.
208
455
  *
209
456
  */
@@ -220,16 +467,15 @@ export class ClustersService {
220
467
  /**
221
468
  * Permanently delete fleet.
222
469
  *
223
- * This endpoint will permanently delete fleet. This operation cannot be undone. Your subscription will end by the end of the current billing period and you will not be able to receive credit for unused time. If you want to keep using the Fleet until the end of the billing period, set the status to `cancelling`. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
470
+ * This endpoint will permanently delete fleet. This operation cannot be undone. Your subscription will end by the end of the current billing period and you will not be able to receive credit for unused time. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
471
+ *
472
+ * Deleting a fleet does not deprovision the cloud infrastructure it provisioned: nodes and other resources keep running. Scale the cluster down first, or remove the infrastructure manually, to avoid orphaned resources.
224
473
  *
225
474
  * This endpoint is available to administrators of the organization only.
226
475
  *
227
476
  */
228
477
  static deleteFleet(options) {
229
- return (options.client ?? client).delete({
230
- url: '/clusters/{cluster_id}/fleets/{fleet_name}',
231
- ...options
232
- });
478
+ return (options.client ?? client).delete({ url: '/clusters/{cluster_id}/fleets/{fleet_name}', ...options });
233
479
  }
234
480
  /**
235
481
  * Get fleet information.
@@ -240,20 +486,17 @@ export class ClustersService {
240
486
  *
241
487
  */
242
488
  static getFleet(options) {
243
- return (options.client ?? client).get({
244
- url: '/clusters/{cluster_id}/fleets/{fleet_name}',
245
- ...options
246
- });
489
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}/fleets/{fleet_name}', ...options });
247
490
  }
248
491
  /**
249
492
  * Update fleet information.
250
493
  *
251
494
  * This endpoint allows you to update fleet details.
252
495
  *
253
- * Setting status to `deleted` will permanently delete fleet. This operation cannot be undone. Your subscription will end by the end of the current billing period and you will not be able to receive credit for unused time. If you want to keep using the Fleet until the end of the billing period, set the status to `cancelling`.
254
- *
255
496
  * For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
256
497
  *
498
+ * This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged. The Hetzner API key is the exception: it is kept when omitted (send a new value to rotate it).
499
+ *
257
500
  * This endpoint is available to administrators of the organization only.
258
501
  *
259
502
  */
@@ -268,41 +511,27 @@ export class ClustersService {
268
511
  });
269
512
  }
270
513
  /**
271
- * Query Kubernetes cluster API
272
- *
273
- * An API endpoint for directly querying a Kubernetes cluster API without requiring kubectl or other tools. This endpoint is ideal for automation and scripting, as well as for internal use in fetching data for the Cloudfleet Console. It acts as a passthrough to the Kubernetes API, allowing access to any valid Kubernetes API endpoint, including those not exposed in the Cloudfleet Console. The endpoint is strictly read-only, ensuring no modifications to the cluster state. It is accessible to all users within the organization and uses the same authentication mechanisms as other Cloudfleet API endpoints.
274
- */
275
- static queryCluster(options) {
276
- return (options.client ?? client).get({
277
- url: '/clusters/{cluster_id}/query',
278
- ...options
279
- });
280
- }
281
- /**
282
- * List clusters.
514
+ * List charts.
283
515
  *
284
- * Returns a list of clusters under the current organization, including quota. Quota is a set of filters defined by the admin of the organization that will be applied to all resources created in the cluster. Quota information returned here does not take into account quota set on organization or platform level. For calculated quota applied to this account, use /clusters/{cluster_id}/quota endpoint. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
516
+ * Returns a list of charts in the cluster.
285
517
  *
286
518
  * This endpoint is available to all users in the organization.
287
519
  *
288
520
  */
289
- static listClusters(options) {
290
- return (options?.client ?? client).get({
291
- url: '/clusters',
292
- ...options
293
- });
521
+ static listCharts(options) {
522
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}/charts', ...options });
294
523
  }
295
524
  /**
296
- * Create a new cluster.
525
+ * Create a new chart.
297
526
  *
298
- * Create a new cluster under the current organization. Clusters allow you to group resources and you can create multiple clusters under the same organization, with billing delegated to the parent organization.
527
+ * Create a new chart deployment.
299
528
  *
300
529
  * This endpoint is available to administrators of the organization only.
301
530
  *
302
531
  */
303
- static createCluster(options) {
532
+ static createChart(options) {
304
533
  return (options.client ?? client).post({
305
- url: '/clusters',
534
+ url: '/clusters/{cluster_id}/charts',
306
535
  ...options,
307
536
  headers: {
308
537
  'Content-Type': 'application/json',
@@ -311,44 +540,38 @@ export class ClustersService {
311
540
  });
312
541
  }
313
542
  /**
314
- * Permanently delete cluster.
543
+ * Permanently delete the chart deployment from the cluster.
315
544
  *
316
- * This endpoint will permanently delete the cluster. This operation cannot be undone.
545
+ * This endpoint will permanently delete chart. This operation cannot be undone.
317
546
  *
318
547
  * This endpoint is available to administrators of the organization only.
319
548
  *
320
549
  */
321
- static deleteCluster(options) {
322
- return (options.client ?? client).delete({
323
- url: '/clusters/{cluster_id}',
324
- ...options
325
- });
550
+ static deleteChart(options) {
551
+ return (options.client ?? client).delete({ url: '/clusters/{cluster_id}/charts/{chart_name}', ...options });
326
552
  }
327
553
  /**
328
- * Get cluster information.
554
+ * Get chart information.
329
555
  *
330
- * Returns cluster details including quota. Quota is a set of filters defined by the admin of the organization that will be applied to all resources created in the cluster. Quota information returned here does not take into account quota set on organization or platform level. For calculated quota applied to this account, use /clusters/{cluster_id}/quota endpoint. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
556
+ * Returns the details of the chart deployment.
331
557
  *
332
558
  * This endpoint is available to all users in the organization.
333
559
  *
334
560
  */
335
- static getCluster(options) {
336
- return (options.client ?? client).get({
337
- url: '/clusters/{cluster_id}',
338
- ...options
339
- });
561
+ static getChart(options) {
562
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}/charts/{chart_name}', ...options });
340
563
  }
341
564
  /**
342
- * Update cluster information.
565
+ * Update chart information.
343
566
  *
344
- * This endpoint allows you to update cluster details, including quota and cluster status. For more information about clusters, see [Clusters](https://cloudfleet.ai/docs/cluster-management/cluster-types/) section of documentaiton.
567
+ * This endpoint allows you to update the values of a chart deployment.
345
568
  *
346
569
  * This endpoint is available to administrators of the organization only.
347
570
  *
348
571
  */
349
- static updateCluster(options) {
572
+ static updateChart(options) {
350
573
  return (options.client ?? client).put({
351
- url: '/clusters/{cluster_id}',
574
+ url: '/clusters/{cluster_id}/charts/{chart_name}',
352
575
  ...options,
353
576
  headers: {
354
577
  'Content-Type': 'application/json',
@@ -357,40 +580,27 @@ export class ClustersService {
357
580
  });
358
581
  }
359
582
  /**
360
- * Node join information for the cluster
361
- *
362
- * Returns the join information for the cluster. This information is used to add a self-managed nodes to the CFKE cluster. This endpoint is available to only admins of the organization.
583
+ * List clusters.
363
584
  *
364
- */
365
- static getJoinInformation(options) {
366
- return (options.client ?? client).post({
367
- url: '/clusters/{cluster_id}/join_information',
368
- ...options
369
- });
370
- }
371
- }
372
- export class InvitesService {
373
- /**
374
- * List invites.
585
+ * Returns a list of clusters under the current organization.
375
586
  *
376
- * Returns a list of invites under the current organization. This endpoint is available to all users in the organization.
587
+ * This endpoint is available to all users in the organization.
377
588
  *
378
589
  */
379
- static listInvites(options) {
380
- return (options?.client ?? client).get({
381
- url: '/invites',
382
- ...options
383
- });
590
+ static listClusters(options) {
591
+ return (options?.client ?? client).get({ url: '/clusters', ...options });
384
592
  }
385
593
  /**
386
- * Create a new invite.
594
+ * Create a new cluster.
387
595
  *
388
- * Invite a new user to your Cloudfleet organization. The user will receive an email with a link to create a new account. This endpoint is available to administrators of the organization only.
596
+ * Create a new cluster under the current organization. Clusters allow you to group resources and you can create multiple clusters under the same organization, with billing delegated to the parent organization.
597
+ *
598
+ * This endpoint is available to administrators of the organization only.
389
599
  *
390
600
  */
391
- static createInvite(options) {
601
+ static createCluster(options) {
392
602
  return (options.client ?? client).post({
393
- url: '/invites',
603
+ url: '/clusters',
394
604
  ...options,
395
605
  headers: {
396
606
  'Content-Type': 'application/json',
@@ -399,84 +609,42 @@ export class InvitesService {
399
609
  });
400
610
  }
401
611
  /**
402
- * Get invite information.
403
- *
404
- * Returns invite details.
405
- *
406
- */
407
- static getInvite(options) {
408
- return (options.client ?? client).get({
409
- url: '/invites/{code}',
410
- ...options
411
- });
412
- }
413
- /**
414
- * Permanently delete invite.
415
- *
416
- * Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
612
+ * Permanently delete cluster.
417
613
  *
418
- */
419
- static deleteInvite(options) {
420
- return (options.client ?? client).delete({
421
- url: '/invites/{email}',
422
- ...options
423
- });
424
- }
425
- }
426
- export class ChartsMarketplaceService {
427
- /**
428
- * List chart listings available in the marketplace.
614
+ * This endpoint will permanently delete the cluster. This operation cannot be undone.
429
615
  *
430
- * Returns a list of available charts in the marketplace.
616
+ * Deleting a cluster also deletes its fleets. This does not deprovision the cloud infrastructure those fleets provisioned: nodes and other resources keep running. Scale the cluster down first, or remove the infrastructure manually, to avoid orphaned resources.
431
617
  *
432
- * This endpoint is available to all users in the organization.
618
+ * This endpoint is available to administrators of the organization only.
433
619
  *
434
620
  */
435
- static listMarketplaceCharts(options) {
436
- return (options?.client ?? client).get({
437
- url: '/marketplace',
438
- ...options
439
- });
621
+ static deleteCluster(options) {
622
+ return (options.client ?? client).delete({ url: '/clusters/{cluster_id}', ...options });
440
623
  }
441
624
  /**
442
- * Get chart listing details.
625
+ * Get cluster information.
443
626
  *
444
- * Returns details of the chart listing.
627
+ * Returns cluster details.
445
628
  *
446
629
  * This endpoint is available to all users in the organization.
447
630
  *
448
631
  */
449
- static getMarketplaceChart(options) {
450
- return (options.client ?? client).get({
451
- url: '/marketplace/{listing_id}',
452
- ...options
453
- });
632
+ static getCluster(options) {
633
+ return (options.client ?? client).get({ url: '/clusters/{cluster_id}', ...options });
454
634
  }
455
- }
456
- export class OrganizationService {
457
635
  /**
458
- * Get organization information.
459
- *
460
- * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
636
+ * Update cluster information.
461
637
  *
462
- * This endpoint is available to all users in the organization.
638
+ * This endpoint allows you to update cluster details. For more information about clusters, see [Clusters](https://cloudfleet.ai/docs/cluster-management/cluster-types/) section of documentation.
463
639
  *
464
- */
465
- static getOrganization(options) {
466
- return (options?.client ?? client).get({
467
- url: '/organization',
468
- ...options
469
- });
470
- }
471
- /**
472
- * Create a new organization / Cloudfleet account signup.
640
+ * This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged.
473
641
  *
474
- * This endpoint allows you to create a new Cloudfleet organization and an administrator user.
642
+ * This endpoint is available to administrators of the organization only.
475
643
  *
476
644
  */
477
- static createOrganization(options) {
478
- return (options.client ?? client).post({
479
- url: '/organization',
645
+ static updateCluster(options) {
646
+ return (options.client ?? client).put({
647
+ url: '/clusters/{cluster_id}',
480
648
  ...options,
481
649
  headers: {
482
650
  'Content-Type': 'application/json',
@@ -484,125 +652,98 @@ export class OrganizationService {
484
652
  }
485
653
  });
486
654
  }
487
- }
488
- export class TokensService {
489
655
  /**
490
- * List access tokens in organization.
656
+ * Node join information for the cluster
491
657
  *
492
- * This endpoint allows you to get a list of all access tokens details in organization. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
658
+ * Returns the join information for the cluster. This information is used to add a self-managed nodes to the CFKE cluster. This endpoint is available to only admins of the organization.
493
659
  *
494
660
  */
495
- static listTokens(options) {
496
- return (options?.client ?? client).get({
497
- url: '/tokens',
498
- ...options
499
- });
661
+ static getJoinInformation(options) {
662
+ return (options.client ?? client).post({ url: '/clusters/{cluster_id}/join_information', ...options });
500
663
  }
664
+ }
665
+ export class BillingService {
501
666
  /**
502
- * Create a new access token.
503
- *
504
- * This endpoint allows you to create a new access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
667
+ * Get billing usage information.
505
668
  *
506
- * This endpoint is available to administrators of the organization only.
669
+ * Returns aggregated usage information for the organization with facets for filtering. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
507
670
  *
508
671
  */
509
- static createToken(options) {
510
- return (options.client ?? client).post({
511
- url: '/tokens',
512
- ...options,
513
- headers: {
514
- 'Content-Type': 'application/json',
515
- ...options.headers
516
- }
517
- });
672
+ static getUsage(options) {
673
+ return (options?.client ?? client).get({ url: '/billing/usage', ...options });
518
674
  }
519
675
  /**
520
- * Permanently delete access token.
676
+ * Get Stripe client secret.
521
677
  *
522
- * This endpoint allows you to delete an access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to administrators of the organization only.
678
+ * Endpoint returns the Stripe secret key for the organization. This key is used to securely update the payment method in the Cloudfleet console only, please visit https://console.cloudfleet.ai. This endpoint is available to administrators of the organization only.
523
679
  *
524
680
  */
525
- static deleteToken(options) {
526
- return (options.client ?? client).delete({
527
- url: '/tokens/{token_id}',
528
- ...options
529
- });
681
+ static getPaymentMethodSecret(options) {
682
+ return (options?.client ?? client).put({ url: '/billing/payment-method', ...options });
530
683
  }
531
684
  /**
532
- * Get access token information.
685
+ * List organization payment methods.
533
686
  *
534
- * This endpoint allows you to get access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
687
+ * Returns all payment methods (cards and SEPA Direct Debit) attached to the organization, most recently added first, with the default flagged. This endpoint is available to all users in the organization.
535
688
  *
536
689
  */
537
- static getToken(options) {
538
- return (options.client ?? client).get({
539
- url: '/tokens/{token_id}',
540
- ...options
541
- });
690
+ static listPaymentMethods(options) {
691
+ return (options?.client ?? client).get({ url: '/billing/payment-methods', ...options });
542
692
  }
543
693
  /**
544
- * Update access token information.
545
- *
546
- * This endpoint allows you to update access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
694
+ * Set the default payment method.
547
695
  *
548
- * This endpoint is available to administrators of the organization only.
696
+ * Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
549
697
  *
550
698
  */
551
- static updateToken(options) {
552
- return (options.client ?? client).put({
553
- url: '/tokens/{token_id}',
554
- ...options,
555
- headers: {
556
- 'Content-Type': 'application/json',
557
- ...options.headers
558
- }
559
- });
699
+ static setDefaultPaymentMethod(options) {
700
+ return (options.client ?? client).put({ url: '/billing/payment-methods/{paymentMethodId}/default', ...options });
560
701
  }
561
702
  /**
562
- * Regenerate access token secret key.
703
+ * Delete a payment method.
704
+ *
705
+ * Detaches the given payment method from the organization. Requires the Administrator role. An organization must keep at least one payment method, so deleting the only remaining method is rejected.
563
706
  *
564
- * Generates a new access token secret. Old secret will not be valid anymore.
565
707
  */
566
- static regenerateToken(options) {
567
- return (options.client ?? client).put({
568
- url: '/tokens/{token_id}/secret',
569
- ...options
570
- });
708
+ static deletePaymentMethod(options) {
709
+ return (options.client ?? client).delete({ url: '/billing/payment-methods/{paymentMethodId}', ...options });
571
710
  }
572
- }
573
- export class UsersService {
574
711
  /**
575
- * Get a list of organizations the user belongs to. Used during authentication process.
712
+ * List issued invoices.
713
+ *
714
+ * Returns a list of invoices for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
715
+ *
576
716
  */
577
- static listUserOrganizations(options) {
578
- return (options.client ?? client).get({
579
- url: '/users/organizations/{email}',
580
- ...options
581
- });
717
+ static listInvoices(options) {
718
+ return (options?.client ?? client).get({ url: '/billing/invoices', ...options });
582
719
  }
583
720
  /**
584
- * List users in organization.
721
+ * Pay the organization's open invoices.
585
722
  *
586
- * Returns a list of user details and their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
723
+ * Charges all open invoices of the organization against its default payment method. This endpoint is available to administrators of the organization only.
587
724
  *
588
- * This endpoint is available to all users in the organization.
725
+ */
726
+ static payOpenInvoices(options) {
727
+ return (options?.client ?? client).post({ url: '/billing/invoices/pay', ...options });
728
+ }
729
+ /**
730
+ * Get organization contact and billing address information.
731
+ *
732
+ * Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
589
733
  *
590
734
  */
591
- static listUsers(options) {
592
- return (options?.client ?? client).get({
593
- url: '/users',
594
- ...options
595
- });
735
+ static getContact(options) {
736
+ return (options?.client ?? client).get({ url: '/billing/contact', ...options });
596
737
  }
597
738
  /**
598
- * Create a new user.
739
+ * Update organization contact information and billing address.
599
740
  *
600
- * Create a new user in your Cloudfleet organization. Requires a valid invite code generated by the `invites create` command. The invite code is a unique string that can be used only once to create a new user. The invite code is generated by the `POST /invites` endpoint.
741
+ * This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
601
742
  *
602
743
  */
603
- static createUser(options) {
604
- return (options.client ?? client).post({
605
- url: '/users',
744
+ static updateContact(options) {
745
+ return (options.client ?? client).put({
746
+ url: '/billing/contact',
606
747
  ...options,
607
748
  headers: {
608
749
  'Content-Type': 'application/json',
@@ -611,40 +752,23 @@ export class UsersService {
611
752
  });
612
753
  }
613
754
  /**
614
- * Delete user by id.
615
- *
616
- * Sets user status to `inactive`. Inactive users cannot log in and manage organization resources. This endpoint is available to administrators of the organization only.
617
- *
618
- */
619
- static deleteUser(options) {
620
- return (options.client ?? client).delete({
621
- url: '/users/{user_id}',
622
- ...options
623
- });
624
- }
625
- /**
626
- * Get user profile information by id.
627
- *
628
- * Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
755
+ * Get applied promotional credits
629
756
  *
630
- * This endpoint is available to all users in the organization.
757
+ * Returns applied promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
631
758
  *
632
759
  */
633
- static getUser(options) {
634
- return (options.client ?? client).get({
635
- url: '/users/{user_id}',
636
- ...options
637
- });
760
+ static getCredits(options) {
761
+ return (options?.client ?? client).get({ url: '/billing/credits', ...options });
638
762
  }
639
763
  /**
640
- * Update user profile information.
764
+ * Redeem promotional credits code.
641
765
  *
642
- * Update user profile information: email, first name, last name, role. This endpoint can be accessed by administrators and the user itself. Role and status can be changed by administrators only.
766
+ * Applies promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
643
767
  *
644
768
  */
645
- static updateUser(options) {
646
- return (options.client ?? client).put({
647
- url: '/users/{user_id}',
769
+ static redeemCredits(options) {
770
+ return (options.client ?? client).post({
771
+ url: '/billing/credits',
648
772
  ...options,
649
773
  headers: {
650
774
  'Content-Type': 'application/json',