@cloudfleet/sdk 0.0.1-017af9f → 0.0.1-019156c

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 (46) hide show
  1. package/README.md +56 -2
  2. package/dist/@tanstack/react-query.gen.d.ts +432 -614
  3. package/dist/@tanstack/react-query.gen.d.ts.map +1 -1
  4. package/dist/@tanstack/react-query.gen.js +431 -404
  5. package/dist/@tanstack/react-query.gen.js.map +1 -1
  6. package/dist/client/client.gen.d.ts.map +1 -1
  7. package/dist/client/client.gen.js +1 -4
  8. package/dist/client/client.gen.js.map +1 -1
  9. package/dist/client/types.gen.d.ts +1 -1
  10. package/dist/client/types.gen.d.ts.map +1 -1
  11. package/dist/client/utils.gen.d.ts +2 -2
  12. package/dist/client/utils.gen.d.ts.map +1 -1
  13. package/dist/client/utils.gen.js +3 -3
  14. package/dist/client/utils.gen.js.map +1 -1
  15. package/dist/core/params.gen.js +4 -4
  16. package/dist/core/params.gen.js.map +1 -1
  17. package/dist/errors.d.ts +42 -0
  18. package/dist/errors.d.ts.map +1 -0
  19. package/dist/errors.js +83 -0
  20. package/dist/errors.js.map +1 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/schemas.gen.d.ts +832 -515
  26. package/dist/schemas.gen.d.ts.map +1 -1
  27. package/dist/schemas.gen.js +1126 -661
  28. package/dist/schemas.gen.js.map +1 -1
  29. package/dist/sdk.gen.d.ts +226 -221
  30. package/dist/sdk.gen.d.ts.map +1 -1
  31. package/dist/sdk.gen.js +340 -324
  32. package/dist/sdk.gen.js.map +1 -1
  33. package/dist/services/kubernetes/api.d.ts +18 -55
  34. package/dist/services/kubernetes/api.d.ts.map +1 -1
  35. package/dist/services/kubernetes/api.js +36 -75
  36. package/dist/services/kubernetes/api.js.map +1 -1
  37. package/dist/services/kubernetes/index.d.ts.map +1 -1
  38. package/dist/services/kubernetes/index.js +36 -37
  39. package/dist/services/kubernetes/index.js.map +1 -1
  40. package/dist/types.gen.d.ts +1281 -1017
  41. package/dist/types.gen.d.ts.map +1 -1
  42. package/dist/zod.gen.d.ts +1937 -1588
  43. package/dist/zod.gen.d.ts.map +1 -1
  44. package/dist/zod.gen.js +609 -416
  45. package/dist/zod.gen.js.map +1 -1
  46. package/package.json +10 -15
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { queryOptions } from '@tanstack/react-query';
3
3
  import { client } from '../client.gen';
4
- import { BillingService, ChartsMarketplaceService, ClustersService, InvitesService, McpService, OrganizationService, RegistryService, TicketsService, TokensService, UsersService } from '../sdk.gen';
4
+ import { BillingService, ClustersService, FeedbackService, InvitesService, McpService, OrganizationService, RegistryService, RoadmapService, TicketsService, TokensService, UsersService } from '../sdk.gen';
5
5
  const createQueryKey = (id, options, infinite, tags) => {
6
6
  const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
7
7
  if (infinite) {
@@ -24,16 +24,13 @@ const createQueryKey = (id, options, infinite, tags) => {
24
24
  }
25
25
  return [params];
26
26
  };
27
- export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
27
+ export const listUserOrganizationsQueryKey = (options) => createQueryKey('listUserOrganizations', options);
28
28
  /**
29
- * Get billing usage information.
30
- *
31
- * 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.
32
- *
29
+ * Get a list of organizations the user belongs to. Used during authentication process.
33
30
  */
34
- export const getUsageOptions = (options) => queryOptions({
31
+ export const listUserOrganizationsOptions = (options) => queryOptions({
35
32
  queryFn: async ({ queryKey, signal }) => {
36
- const { data } = await BillingService.getUsage({
33
+ const { data } = await UsersService.listUserOrganizations({
37
34
  ...options,
38
35
  ...queryKey[0],
39
36
  signal,
@@ -41,18 +38,20 @@ export const getUsageOptions = (options) => queryOptions({
41
38
  });
42
39
  return data;
43
40
  },
44
- queryKey: getUsageQueryKey(options)
41
+ queryKey: listUserOrganizationsQueryKey(options)
45
42
  });
46
- export const getPaymentMethodQueryKey = (options) => createQueryKey('getPaymentMethod', options);
43
+ export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
47
44
  /**
48
- * Get organization payment method information.
45
+ * List users in organization.
46
+ *
47
+ * 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.
49
48
  *
50
- * 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.
49
+ * This endpoint is available to all users in the organization.
51
50
  *
52
51
  */
53
- export const getPaymentMethodOptions = (options) => queryOptions({
52
+ export const listUsersOptions = (options) => queryOptions({
54
53
  queryFn: async ({ queryKey, signal }) => {
55
- const { data } = await BillingService.getPaymentMethod({
54
+ const { data } = await UsersService.listUsers({
56
55
  ...options,
57
56
  ...queryKey[0],
58
57
  signal,
@@ -60,18 +59,18 @@ export const getPaymentMethodOptions = (options) => queryOptions({
60
59
  });
61
60
  return data;
62
61
  },
63
- queryKey: getPaymentMethodQueryKey(options)
62
+ queryKey: listUsersQueryKey(options)
64
63
  });
65
64
  /**
66
- * Get Stripe client secret.
65
+ * Create a new user.
67
66
  *
68
- * 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.
67
+ * 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.
69
68
  *
70
69
  */
71
- export const getPaymentMethodSecretMutation = (options) => {
70
+ export const createUserMutation = (options) => {
72
71
  const mutationOptions = {
73
72
  mutationFn: async (fnOptions) => {
74
- const { data } = await BillingService.getPaymentMethodSecret({
73
+ const { data } = await UsersService.createUser({
75
74
  ...options,
76
75
  ...fnOptions,
77
76
  throwOnError: true
@@ -81,54 +80,16 @@ export const getPaymentMethodSecretMutation = (options) => {
81
80
  };
82
81
  return mutationOptions;
83
82
  };
84
- export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
85
- /**
86
- * List issued invoices.
87
- *
88
- * 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.
89
- *
90
- */
91
- export const listInvoicesOptions = (options) => queryOptions({
92
- queryFn: async ({ queryKey, signal }) => {
93
- const { data } = await BillingService.listInvoices({
94
- ...options,
95
- ...queryKey[0],
96
- signal,
97
- throwOnError: true
98
- });
99
- return data;
100
- },
101
- queryKey: listInvoicesQueryKey(options)
102
- });
103
- export const getContactQueryKey = (options) => createQueryKey('getContact', options);
104
- /**
105
- * Get organization contact and billing address information.
106
- *
107
- * Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
108
- *
109
- */
110
- export const getContactOptions = (options) => queryOptions({
111
- queryFn: async ({ queryKey, signal }) => {
112
- const { data } = await BillingService.getContact({
113
- ...options,
114
- ...queryKey[0],
115
- signal,
116
- throwOnError: true
117
- });
118
- return data;
119
- },
120
- queryKey: getContactQueryKey(options)
121
- });
122
83
  /**
123
- * Update organization contact information and billing address.
84
+ * Delete user by id.
124
85
  *
125
- * This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
86
+ * Sets user status to `inactive`. Inactive users cannot log in and manage organization resources. This endpoint is available to administrators of the organization only.
126
87
  *
127
88
  */
128
- export const updateContactMutation = (options) => {
89
+ export const deleteUserMutation = (options) => {
129
90
  const mutationOptions = {
130
91
  mutationFn: async (fnOptions) => {
131
- const { data } = await BillingService.updateContact({
92
+ const { data } = await UsersService.deleteUser({
132
93
  ...options,
133
94
  ...fnOptions,
134
95
  throwOnError: true
@@ -138,16 +99,18 @@ export const updateContactMutation = (options) => {
138
99
  };
139
100
  return mutationOptions;
140
101
  };
141
- export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
102
+ export const getUserQueryKey = (options) => createQueryKey('getUser', options);
142
103
  /**
143
- * Get applied promotional credits
104
+ * Get user profile information by id.
144
105
  *
145
- * 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.
106
+ * Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
107
+ *
108
+ * This endpoint is available to all users in the organization.
146
109
  *
147
110
  */
148
- export const getCreditsOptions = (options) => queryOptions({
111
+ export const getUserOptions = (options) => queryOptions({
149
112
  queryFn: async ({ queryKey, signal }) => {
150
- const { data } = await BillingService.getCredits({
113
+ const { data } = await UsersService.getUser({
151
114
  ...options,
152
115
  ...queryKey[0],
153
116
  signal,
@@ -155,18 +118,18 @@ export const getCreditsOptions = (options) => queryOptions({
155
118
  });
156
119
  return data;
157
120
  },
158
- queryKey: getCreditsQueryKey(options)
121
+ queryKey: getUserQueryKey(options)
159
122
  });
160
123
  /**
161
- * Redeem promotional credits code.
124
+ * Update user profile information.
162
125
  *
163
- * 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.
126
+ * 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.
164
127
  *
165
128
  */
166
- export const redeemCreditsMutation = (options) => {
129
+ export const updateUserMutation = (options) => {
167
130
  const mutationOptions = {
168
131
  mutationFn: async (fnOptions) => {
169
- const { data } = await BillingService.redeemCredits({
132
+ const { data } = await UsersService.updateUser({
170
133
  ...options,
171
134
  ...fnOptions,
172
135
  throwOnError: true
@@ -176,18 +139,16 @@ export const redeemCreditsMutation = (options) => {
176
139
  };
177
140
  return mutationOptions;
178
141
  };
179
- export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
142
+ export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
180
143
  /**
181
- * List charts.
182
- *
183
- * Returns a list of charts in the cluster.
144
+ * List access tokens in organization.
184
145
  *
185
- * This endpoint is available to all users in the organization.
146
+ * 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.
186
147
  *
187
148
  */
188
- export const listChartsOptions = (options) => queryOptions({
149
+ export const listTokensOptions = (options) => queryOptions({
189
150
  queryFn: async ({ queryKey, signal }) => {
190
- const { data } = await ClustersService.listCharts({
151
+ const { data } = await TokensService.listTokens({
191
152
  ...options,
192
153
  ...queryKey[0],
193
154
  signal,
@@ -195,20 +156,20 @@ export const listChartsOptions = (options) => queryOptions({
195
156
  });
196
157
  return data;
197
158
  },
198
- queryKey: listChartsQueryKey(options)
159
+ queryKey: listTokensQueryKey(options)
199
160
  });
200
161
  /**
201
- * Create a new chart.
162
+ * Create a new access token.
202
163
  *
203
- * Create a new chart deployment.
164
+ * 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.
204
165
  *
205
166
  * This endpoint is available to administrators of the organization only.
206
167
  *
207
168
  */
208
- export const createChartMutation = (options) => {
169
+ export const createTokenMutation = (options) => {
209
170
  const mutationOptions = {
210
171
  mutationFn: async (fnOptions) => {
211
- const { data } = await ClustersService.createChart({
172
+ const { data } = await TokensService.createToken({
212
173
  ...options,
213
174
  ...fnOptions,
214
175
  throwOnError: true
@@ -219,17 +180,15 @@ export const createChartMutation = (options) => {
219
180
  return mutationOptions;
220
181
  };
221
182
  /**
222
- * Permanently delete the chart deployment from the cluster.
223
- *
224
- * This endpoint will permanently delete chart. This operation cannot be undone.
183
+ * Permanently delete access token.
225
184
  *
226
- * This endpoint is available to administrators of the organization only.
185
+ * 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.
227
186
  *
228
187
  */
229
- export const deleteChartMutation = (options) => {
188
+ export const deleteTokenMutation = (options) => {
230
189
  const mutationOptions = {
231
190
  mutationFn: async (fnOptions) => {
232
- const { data } = await ClustersService.deleteChart({
191
+ const { data } = await TokensService.deleteToken({
233
192
  ...options,
234
193
  ...fnOptions,
235
194
  throwOnError: true
@@ -239,18 +198,16 @@ export const deleteChartMutation = (options) => {
239
198
  };
240
199
  return mutationOptions;
241
200
  };
242
- export const getChartQueryKey = (options) => createQueryKey('getChart', options);
201
+ export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
243
202
  /**
244
- * Get chart information.
245
- *
246
- * Returns the details of the chart deployment.
203
+ * Get access token information.
247
204
  *
248
- * This endpoint is available to all users in the organization.
205
+ * 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.
249
206
  *
250
207
  */
251
- export const getChartOptions = (options) => queryOptions({
208
+ export const getTokenOptions = (options) => queryOptions({
252
209
  queryFn: async ({ queryKey, signal }) => {
253
- const { data } = await ClustersService.getChart({
210
+ const { data } = await TokensService.getToken({
254
211
  ...options,
255
212
  ...queryKey[0],
256
213
  signal,
@@ -258,20 +215,20 @@ export const getChartOptions = (options) => queryOptions({
258
215
  });
259
216
  return data;
260
217
  },
261
- queryKey: getChartQueryKey(options)
218
+ queryKey: getTokenQueryKey(options)
262
219
  });
263
220
  /**
264
- * Update chart information.
221
+ * Update access token information.
265
222
  *
266
- * This endpoint allows you to update the values of a chart deployment.
223
+ * 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.
267
224
  *
268
225
  * This endpoint is available to administrators of the organization only.
269
226
  *
270
227
  */
271
- export const updateChartMutation = (options) => {
228
+ export const updateTokenMutation = (options) => {
272
229
  const mutationOptions = {
273
230
  mutationFn: async (fnOptions) => {
274
- const { data } = await ClustersService.updateChart({
231
+ const { data } = await TokensService.updateToken({
275
232
  ...options,
276
233
  ...fnOptions,
277
234
  throwOnError: true
@@ -281,18 +238,34 @@ export const updateChartMutation = (options) => {
281
238
  };
282
239
  return mutationOptions;
283
240
  };
284
- export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
285
241
  /**
286
- * List fleets.
242
+ * Regenerate access token secret key.
287
243
  *
288
- * Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
244
+ * Generates a new access token secret. Old secret will not be valid anymore.
245
+ */
246
+ export const regenerateTokenMutation = (options) => {
247
+ const mutationOptions = {
248
+ mutationFn: async (fnOptions) => {
249
+ const { data } = await TokensService.regenerateToken({
250
+ ...options,
251
+ ...fnOptions,
252
+ throwOnError: true
253
+ });
254
+ return data;
255
+ }
256
+ };
257
+ return mutationOptions;
258
+ };
259
+ export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
260
+ /**
261
+ * List tickets for the current organization.
289
262
  *
290
- * This endpoint is available to all users in the organization.
263
+ * Returns all tickets belonging to the caller's organization, newest first.
291
264
  *
292
265
  */
293
- export const listFleetsOptions = (options) => queryOptions({
266
+ export const listTicketsOptions = (options) => queryOptions({
294
267
  queryFn: async ({ queryKey, signal }) => {
295
- const { data } = await ClustersService.listFleets({
268
+ const { data } = await TicketsService.listTickets({
296
269
  ...options,
297
270
  ...queryKey[0],
298
271
  signal,
@@ -300,20 +273,18 @@ export const listFleetsOptions = (options) => queryOptions({
300
273
  });
301
274
  return data;
302
275
  },
303
- queryKey: listFleetsQueryKey(options)
276
+ queryKey: listTicketsQueryKey(options)
304
277
  });
305
278
  /**
306
- * Create a new fleet.
307
- *
308
- * 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.
279
+ * Create a new support ticket.
309
280
  *
310
- * This endpoint is available to administrators of the organization only.
281
+ * 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).
311
282
  *
312
283
  */
313
- export const createFleetMutation = (options) => {
284
+ export const createTicketMutation = (options) => {
314
285
  const mutationOptions = {
315
286
  mutationFn: async (fnOptions) => {
316
- const { data } = await ClustersService.createFleet({
287
+ const { data } = await TicketsService.createTicket({
317
288
  ...options,
318
289
  ...fnOptions,
319
290
  throwOnError: true
@@ -324,17 +295,15 @@ export const createFleetMutation = (options) => {
324
295
  return mutationOptions;
325
296
  };
326
297
  /**
327
- * Permanently delete fleet.
328
- *
329
- * 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.
298
+ * Close a ticket (soft close).
330
299
  *
331
- * This endpoint is available to administrators of the organization only.
300
+ * Marks the ticket as closed. Closed is a terminal state — users cannot reply to a closed ticket; a new ticket must be opened instead.
332
301
  *
333
302
  */
334
- export const deleteFleetMutation = (options) => {
303
+ export const closeTicketMutation = (options) => {
335
304
  const mutationOptions = {
336
305
  mutationFn: async (fnOptions) => {
337
- const { data } = await ClustersService.deleteFleet({
306
+ const { data } = await TicketsService.closeTicket({
338
307
  ...options,
339
308
  ...fnOptions,
340
309
  throwOnError: true
@@ -344,18 +313,13 @@ export const deleteFleetMutation = (options) => {
344
313
  };
345
314
  return mutationOptions;
346
315
  };
347
- export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
316
+ export const getTicketQueryKey = (options) => createQueryKey('getTicket', options);
348
317
  /**
349
- * Get fleet information.
350
- *
351
- * Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
352
- *
353
- * This endpoint is available to all users in the organization.
354
- *
318
+ * Get a ticket and its messages.
355
319
  */
356
- export const getFleetOptions = (options) => queryOptions({
320
+ export const getTicketOptions = (options) => queryOptions({
357
321
  queryFn: async ({ queryKey, signal }) => {
358
- const { data } = await ClustersService.getFleet({
322
+ const { data } = await TicketsService.getTicket({
359
323
  ...options,
360
324
  ...queryKey[0],
361
325
  signal,
@@ -363,24 +327,37 @@ export const getFleetOptions = (options) => queryOptions({
363
327
  });
364
328
  return data;
365
329
  },
366
- queryKey: getFleetQueryKey(options)
330
+ queryKey: getTicketQueryKey(options)
367
331
  });
368
332
  /**
369
- * Update fleet information.
370
- *
371
- * This endpoint allows you to update fleet details.
333
+ * Grant Cloudfleet support access for a ticket.
372
334
  *
373
- * 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`.
335
+ * 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.
374
336
  *
375
- * For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
337
+ */
338
+ export const grantTicketSupportAccessMutation = (options) => {
339
+ const mutationOptions = {
340
+ mutationFn: async (fnOptions) => {
341
+ const { data } = await TicketsService.grantTicketSupportAccess({
342
+ ...options,
343
+ ...fnOptions,
344
+ throwOnError: true
345
+ });
346
+ return data;
347
+ }
348
+ };
349
+ return mutationOptions;
350
+ };
351
+ /**
352
+ * Append a customer reply to a ticket.
376
353
  *
377
- * This endpoint is available to administrators of the organization only.
354
+ * Multipart form-data with a JSON-encoded `payload` field carrying `body`, plus up to 3 `attachments` files. Returns 409 if the ticket is closed.
378
355
  *
379
356
  */
380
- export const updateFleetMutation = (options) => {
357
+ export const replyTicketMutation = (options) => {
381
358
  const mutationOptions = {
382
359
  mutationFn: async (fnOptions) => {
383
- const { data } = await ClustersService.updateFleet({
360
+ const { data } = await TicketsService.replyTicket({
384
361
  ...options,
385
362
  ...fnOptions,
386
363
  throwOnError: true
@@ -390,15 +367,13 @@ export const updateFleetMutation = (options) => {
390
367
  };
391
368
  return mutationOptions;
392
369
  };
393
- export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
370
+ export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
394
371
  /**
395
- * Query Kubernetes cluster API
396
- *
397
- * 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.
372
+ * Download a ticket attachment.
398
373
  */
399
- export const queryClusterOptions = (options) => queryOptions({
374
+ export const getTicketAttachmentOptions = (options) => queryOptions({
400
375
  queryFn: async ({ queryKey, signal }) => {
401
- const { data } = await ClustersService.queryCluster({
376
+ const { data } = await TicketsService.getTicketAttachment({
402
377
  ...options,
403
378
  ...queryKey[0],
404
379
  signal,
@@ -406,20 +381,18 @@ export const queryClusterOptions = (options) => queryOptions({
406
381
  });
407
382
  return data;
408
383
  },
409
- queryKey: queryClusterQueryKey(options)
384
+ queryKey: getTicketAttachmentQueryKey(options)
410
385
  });
411
- export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
386
+ export const listRoadmapQueryKey = (options) => createQueryKey('listRoadmap', options);
412
387
  /**
413
- * List clusters.
388
+ * List roadmap items.
414
389
  *
415
- * 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.
416
- *
417
- * This endpoint is available to all users in the organization.
390
+ * Returns the published roadmap items, newest first, each with your own vote. Votes of other users are not returned.
418
391
  *
419
392
  */
420
- export const listClustersOptions = (options) => queryOptions({
393
+ export const listRoadmapOptions = (options) => queryOptions({
421
394
  queryFn: async ({ queryKey, signal }) => {
422
- const { data } = await ClustersService.listClusters({
395
+ const { data } = await RoadmapService.listRoadmap({
423
396
  ...options,
424
397
  ...queryKey[0],
425
398
  signal,
@@ -427,20 +400,18 @@ export const listClustersOptions = (options) => queryOptions({
427
400
  });
428
401
  return data;
429
402
  },
430
- queryKey: listClustersQueryKey(options)
403
+ queryKey: listRoadmapQueryKey(options)
431
404
  });
432
405
  /**
433
- * Create a new cluster.
434
- *
435
- * 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.
406
+ * Suggest a new roadmap item.
436
407
  *
437
- * This endpoint is available to administrators of the organization only.
408
+ * 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.
438
409
  *
439
410
  */
440
- export const createClusterMutation = (options) => {
411
+ export const suggestRoadmapMutation = (options) => {
441
412
  const mutationOptions = {
442
413
  mutationFn: async (fnOptions) => {
443
- const { data } = await ClustersService.createCluster({
414
+ const { data } = await RoadmapService.suggestRoadmap({
444
415
  ...options,
445
416
  ...fnOptions,
446
417
  throwOnError: true
@@ -451,17 +422,12 @@ export const createClusterMutation = (options) => {
451
422
  return mutationOptions;
452
423
  };
453
424
  /**
454
- * Permanently delete cluster.
455
- *
456
- * This endpoint will permanently delete the cluster. This operation cannot be undone.
457
- *
458
- * This endpoint is available to administrators of the organization only.
459
- *
425
+ * Remove your vote from a roadmap item.
460
426
  */
461
- export const deleteClusterMutation = (options) => {
427
+ export const unvoteRoadmapMutation = (options) => {
462
428
  const mutationOptions = {
463
429
  mutationFn: async (fnOptions) => {
464
- const { data } = await ClustersService.deleteCluster({
430
+ const { data } = await RoadmapService.unvoteRoadmap({
465
431
  ...options,
466
432
  ...fnOptions,
467
433
  throwOnError: true
@@ -471,39 +437,73 @@ export const deleteClusterMutation = (options) => {
471
437
  };
472
438
  return mutationOptions;
473
439
  };
474
- export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
475
440
  /**
476
- * Get cluster information.
477
- *
478
- * 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.
441
+ * Vote on a roadmap item.
479
442
  *
480
- * This endpoint is available to all users in the organization.
443
+ * Sets your vote on a roadmap item: -1 (down), 1 (up), or 2 (double up). Replaces any previous vote you cast on the item.
481
444
  *
482
445
  */
483
- export const getClusterOptions = (options) => queryOptions({
484
- queryFn: async ({ queryKey, signal }) => {
485
- const { data } = await ClustersService.getCluster({
486
- ...options,
487
- ...queryKey[0],
446
+ export const voteRoadmapMutation = (options) => {
447
+ const mutationOptions = {
448
+ mutationFn: async (fnOptions) => {
449
+ const { data } = await RoadmapService.voteRoadmap({
450
+ ...options,
451
+ ...fnOptions,
452
+ throwOnError: true
453
+ });
454
+ return data;
455
+ }
456
+ };
457
+ return mutationOptions;
458
+ };
459
+ export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
460
+ /**
461
+ * List repositories
462
+ *
463
+ * Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
464
+ *
465
+ */
466
+ export const listRepositoriesOptions = (options) => queryOptions({
467
+ queryFn: async ({ queryKey, signal }) => {
468
+ const { data } = await RegistryService.listRepositories({
469
+ ...options,
470
+ ...queryKey[0],
488
471
  signal,
489
472
  throwOnError: true
490
473
  });
491
474
  return data;
492
475
  },
493
- queryKey: getClusterQueryKey(options)
476
+ queryKey: listRepositoriesQueryKey(options)
494
477
  });
478
+ export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
495
479
  /**
496
- * Update cluster information.
480
+ * List tags for a repository
497
481
  *
498
- * 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.
482
+ * 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.
499
483
  *
500
- * This endpoint is available to administrators of the organization only.
484
+ */
485
+ export const listTagsOptions = (options) => queryOptions({
486
+ queryFn: async ({ queryKey, signal }) => {
487
+ const { data } = await RegistryService.listTags({
488
+ ...options,
489
+ ...queryKey[0],
490
+ signal,
491
+ throwOnError: true
492
+ });
493
+ return data;
494
+ },
495
+ queryKey: listTagsQueryKey(options)
496
+ });
497
+ /**
498
+ * Delete tag
499
+ *
500
+ * Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
501
501
  *
502
502
  */
503
- export const updateClusterMutation = (options) => {
503
+ export const deleteTagMutation = (options) => {
504
504
  const mutationOptions = {
505
505
  mutationFn: async (fnOptions) => {
506
- const { data } = await ClustersService.updateCluster({
506
+ const { data } = await RegistryService.deleteTag({
507
507
  ...options,
508
508
  ...fnOptions,
509
509
  throwOnError: true
@@ -513,16 +513,74 @@ export const updateClusterMutation = (options) => {
513
513
  };
514
514
  return mutationOptions;
515
515
  };
516
+ export const getTagQueryKey = (options) => createQueryKey('getTag', options);
516
517
  /**
517
- * Node join information for the cluster
518
+ * Get tag details
518
519
  *
519
- * 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.
520
+ * 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.
520
521
  *
521
522
  */
522
- export const getJoinInformationMutation = (options) => {
523
+ export const getTagOptions = (options) => queryOptions({
524
+ queryFn: async ({ queryKey, signal }) => {
525
+ const { data } = await RegistryService.getTag({
526
+ ...options,
527
+ ...queryKey[0],
528
+ signal,
529
+ throwOnError: true
530
+ });
531
+ return data;
532
+ },
533
+ queryKey: getTagQueryKey(options)
534
+ });
535
+ export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
536
+ /**
537
+ * Get organization information.
538
+ *
539
+ * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
540
+ *
541
+ * This endpoint is available to all users in the organization.
542
+ *
543
+ */
544
+ export const getOrganizationOptions = (options) => queryOptions({
545
+ queryFn: async ({ queryKey, signal }) => {
546
+ const { data } = await OrganizationService.getOrganization({
547
+ ...options,
548
+ ...queryKey[0],
549
+ signal,
550
+ throwOnError: true
551
+ });
552
+ return data;
553
+ },
554
+ queryKey: getOrganizationQueryKey(options)
555
+ });
556
+ /**
557
+ * Create a new organization / Cloudfleet account signup.
558
+ *
559
+ * This endpoint allows you to create a new Cloudfleet organization and an administrator user.
560
+ *
561
+ */
562
+ export const createOrganizationMutation = (options) => {
523
563
  const mutationOptions = {
524
564
  mutationFn: async (fnOptions) => {
525
- const { data } = await ClustersService.getJoinInformation({
565
+ const { data } = await OrganizationService.createOrganization({
566
+ ...options,
567
+ ...fnOptions,
568
+ throwOnError: true
569
+ });
570
+ return data;
571
+ }
572
+ };
573
+ return mutationOptions;
574
+ };
575
+ /**
576
+ * MCP endpoint
577
+ *
578
+ * MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
579
+ */
580
+ export const postMcpMutation = (options) => {
581
+ const mutationOptions = {
582
+ mutationFn: async (fnOptions) => {
583
+ const { data } = await McpService.postMcp({
526
584
  ...options,
527
585
  ...fnOptions,
528
586
  throwOnError: true
@@ -536,7 +594,7 @@ export const listInvitesQueryKey = (options) => createQueryKey('listInvites', op
536
594
  /**
537
595
  * List invites.
538
596
  *
539
- * Returns a list of invites under the current organization. This endpoint is available to all users in the organization.
597
+ * Returns a list of pending (non-expired) invites under the current organization. This endpoint is available to administrators of the organization only.
540
598
  *
541
599
  */
542
600
  export const listInvitesOptions = (options) => queryOptions({
@@ -574,7 +632,7 @@ export const getInviteQueryKey = (options) => createQueryKey('getInvite', option
574
632
  /**
575
633
  * Get invite information.
576
634
  *
577
- * Returns invite details.
635
+ * 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.
578
636
  *
579
637
  */
580
638
  export const getInviteOptions = (options) => queryOptions({
@@ -608,18 +666,34 @@ export const deleteInviteMutation = (options) => {
608
666
  };
609
667
  return mutationOptions;
610
668
  };
611
- export const listMarketplaceChartsQueryKey = (options) => createQueryKey('listMarketplaceCharts', options);
612
669
  /**
613
- * List chart listings available in the marketplace.
670
+ * Send feedback to the Cloudfleet team
614
671
  *
615
- * Returns a list of available charts in the marketplace.
672
+ * Sends feedback straight to the Cloudfleet team: papercuts the team can act on from the note alone, such as what was useful, confusing, wrong or missing. This is not a support channel: for a problem that needs back-and-forth or debugging, open a support ticket with `POST /tickets` instead.
616
673
  *
617
- * This endpoint is available to all users in the organization.
674
+ */
675
+ export const sendFeedbackMutation = (options) => {
676
+ const mutationOptions = {
677
+ mutationFn: async (fnOptions) => {
678
+ const { data } = await FeedbackService.sendFeedback({
679
+ ...options,
680
+ ...fnOptions,
681
+ throwOnError: true
682
+ });
683
+ return data;
684
+ }
685
+ };
686
+ return mutationOptions;
687
+ };
688
+ export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
689
+ /**
690
+ * Query Kubernetes cluster API
618
691
  *
692
+ * 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.
619
693
  */
620
- export const listMarketplaceChartsOptions = (options) => queryOptions({
694
+ export const queryClusterOptions = (options) => queryOptions({
621
695
  queryFn: async ({ queryKey, signal }) => {
622
- const { data } = await ChartsMarketplaceService.listMarketplaceCharts({
696
+ const { data } = await ClustersService.queryCluster({
623
697
  ...options,
624
698
  ...queryKey[0],
625
699
  signal,
@@ -627,22 +701,20 @@ export const listMarketplaceChartsOptions = (options) => queryOptions({
627
701
  });
628
702
  return data;
629
703
  },
630
- queryKey: listMarketplaceChartsQueryKey(options)
704
+ queryKey: queryClusterQueryKey(options)
631
705
  });
632
- export const getMarketplaceChartFilesQueryKey = (options) => createQueryKey('getMarketplaceChartFiles', options);
706
+ export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
633
707
  /**
634
- * Get chart files for a specific version channel.
635
- *
636
- * Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
708
+ * List fleets.
637
709
  *
638
- * 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.
710
+ * Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
639
711
  *
640
712
  * This endpoint is available to all users in the organization.
641
713
  *
642
714
  */
643
- export const getMarketplaceChartFilesOptions = (options) => queryOptions({
715
+ export const listFleetsOptions = (options) => queryOptions({
644
716
  queryFn: async ({ queryKey, signal }) => {
645
- const { data } = await ChartsMarketplaceService.getMarketplaceChartFiles({
717
+ const { data } = await ClustersService.listFleets({
646
718
  ...options,
647
719
  ...queryKey[0],
648
720
  signal,
@@ -650,17 +722,22 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
650
722
  });
651
723
  return data;
652
724
  },
653
- queryKey: getMarketplaceChartFilesQueryKey(options)
725
+ queryKey: listFleetsQueryKey(options)
654
726
  });
655
727
  /**
656
- * MCP endpoint
728
+ * Create a new fleet.
729
+ *
730
+ * 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.
731
+ *
732
+ * The cluster must be ready (status `deployed`) before a fleet can be added. Adding a fleet while the cluster is still provisioning returns `409`.
733
+ *
734
+ * This endpoint is available to administrators of the organization only.
657
735
  *
658
- * MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
659
736
  */
660
- export const postMcpMutation = (options) => {
737
+ export const createFleetMutation = (options) => {
661
738
  const mutationOptions = {
662
739
  mutationFn: async (fnOptions) => {
663
- const { data } = await McpService.postMcp({
740
+ const { data } = await ClustersService.createFleet({
664
741
  ...options,
665
742
  ...fnOptions,
666
743
  throwOnError: true
@@ -670,37 +747,20 @@ export const postMcpMutation = (options) => {
670
747
  };
671
748
  return mutationOptions;
672
749
  };
673
- export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
674
750
  /**
675
- * Get organization information.
676
- *
677
- * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
751
+ * Permanently delete fleet.
678
752
  *
679
- * This endpoint is available to all users in the organization.
753
+ * 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.
680
754
  *
681
- */
682
- export const getOrganizationOptions = (options) => queryOptions({
683
- queryFn: async ({ queryKey, signal }) => {
684
- const { data } = await OrganizationService.getOrganization({
685
- ...options,
686
- ...queryKey[0],
687
- signal,
688
- throwOnError: true
689
- });
690
- return data;
691
- },
692
- queryKey: getOrganizationQueryKey(options)
693
- });
694
- /**
695
- * Create a new organization / Cloudfleet account signup.
755
+ * 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.
696
756
  *
697
- * This endpoint allows you to create a new Cloudfleet organization and an administrator user.
757
+ * This endpoint is available to administrators of the organization only.
698
758
  *
699
759
  */
700
- export const createOrganizationMutation = (options) => {
760
+ export const deleteFleetMutation = (options) => {
701
761
  const mutationOptions = {
702
762
  mutationFn: async (fnOptions) => {
703
- const { data } = await OrganizationService.createOrganization({
763
+ const { data } = await ClustersService.deleteFleet({
704
764
  ...options,
705
765
  ...fnOptions,
706
766
  throwOnError: true
@@ -710,16 +770,18 @@ export const createOrganizationMutation = (options) => {
710
770
  };
711
771
  return mutationOptions;
712
772
  };
713
- export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
773
+ export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
714
774
  /**
715
- * List repositories
775
+ * Get fleet information.
716
776
  *
717
- * Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
777
+ * Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
778
+ *
779
+ * This endpoint is available to all users in the organization.
718
780
  *
719
781
  */
720
- export const listRepositoriesOptions = (options) => queryOptions({
782
+ export const getFleetOptions = (options) => queryOptions({
721
783
  queryFn: async ({ queryKey, signal }) => {
722
- const { data } = await RegistryService.listRepositories({
784
+ const { data } = await ClustersService.getFleet({
723
785
  ...options,
724
786
  ...queryKey[0],
725
787
  signal,
@@ -727,37 +789,24 @@ export const listRepositoriesOptions = (options) => queryOptions({
727
789
  });
728
790
  return data;
729
791
  },
730
- queryKey: listRepositoriesQueryKey(options)
792
+ queryKey: getFleetQueryKey(options)
731
793
  });
732
- export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
733
794
  /**
734
- * List tags for a repository
795
+ * Update fleet information.
735
796
  *
736
- * 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.
797
+ * This endpoint allows you to update fleet details.
737
798
  *
738
- */
739
- export const listTagsOptions = (options) => queryOptions({
740
- queryFn: async ({ queryKey, signal }) => {
741
- const { data } = await RegistryService.listTags({
742
- ...options,
743
- ...queryKey[0],
744
- signal,
745
- throwOnError: true
746
- });
747
- return data;
748
- },
749
- queryKey: listTagsQueryKey(options)
750
- });
751
- /**
752
- * Delete tag
799
+ * For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
753
800
  *
754
- * Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
801
+ * 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).
802
+ *
803
+ * This endpoint is available to administrators of the organization only.
755
804
  *
756
805
  */
757
- export const deleteTagMutation = (options) => {
806
+ export const updateFleetMutation = (options) => {
758
807
  const mutationOptions = {
759
808
  mutationFn: async (fnOptions) => {
760
- const { data } = await RegistryService.deleteTag({
809
+ const { data } = await ClustersService.updateFleet({
761
810
  ...options,
762
811
  ...fnOptions,
763
812
  throwOnError: true
@@ -767,35 +816,18 @@ export const deleteTagMutation = (options) => {
767
816
  };
768
817
  return mutationOptions;
769
818
  };
770
- export const getTagQueryKey = (options) => createQueryKey('getTag', options);
819
+ export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
771
820
  /**
772
- * Get tag details
821
+ * List clusters.
773
822
  *
774
- * 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.
823
+ * Returns a list of clusters under the current organization.
775
824
  *
776
- */
777
- export const getTagOptions = (options) => queryOptions({
778
- queryFn: async ({ queryKey, signal }) => {
779
- const { data } = await RegistryService.getTag({
780
- ...options,
781
- ...queryKey[0],
782
- signal,
783
- throwOnError: true
784
- });
785
- return data;
786
- },
787
- queryKey: getTagQueryKey(options)
788
- });
789
- export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
790
- /**
791
- * List tickets for the current organization.
792
- *
793
- * Returns all tickets belonging to the caller's organization, newest first.
825
+ * This endpoint is available to all users in the organization.
794
826
  *
795
827
  */
796
- export const listTicketsOptions = (options) => queryOptions({
828
+ export const listClustersOptions = (options) => queryOptions({
797
829
  queryFn: async ({ queryKey, signal }) => {
798
- const { data } = await TicketsService.listTickets({
830
+ const { data } = await ClustersService.listClusters({
799
831
  ...options,
800
832
  ...queryKey[0],
801
833
  signal,
@@ -803,18 +835,20 @@ export const listTicketsOptions = (options) => queryOptions({
803
835
  });
804
836
  return data;
805
837
  },
806
- queryKey: listTicketsQueryKey(options)
838
+ queryKey: listClustersQueryKey(options)
807
839
  });
808
840
  /**
809
- * Create a new support ticket.
841
+ * Create a new cluster.
810
842
  *
811
- * 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`, plus up to 3 `attachments` files (10 MB max each).
843
+ * 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.
844
+ *
845
+ * This endpoint is available to administrators of the organization only.
812
846
  *
813
847
  */
814
- export const createTicketMutation = (options) => {
848
+ export const createClusterMutation = (options) => {
815
849
  const mutationOptions = {
816
850
  mutationFn: async (fnOptions) => {
817
- const { data } = await TicketsService.createTicket({
851
+ const { data } = await ClustersService.createCluster({
818
852
  ...options,
819
853
  ...fnOptions,
820
854
  throwOnError: true
@@ -825,15 +859,19 @@ export const createTicketMutation = (options) => {
825
859
  return mutationOptions;
826
860
  };
827
861
  /**
828
- * Close a ticket (soft close).
862
+ * Permanently delete cluster.
829
863
  *
830
- * Marks the ticket as closed. Closed is a terminal state — users cannot reply to a closed ticket; a new ticket must be opened instead.
864
+ * This endpoint will permanently delete the cluster. This operation cannot be undone.
865
+ *
866
+ * 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.
867
+ *
868
+ * This endpoint is available to administrators of the organization only.
831
869
  *
832
870
  */
833
- export const closeTicketMutation = (options) => {
871
+ export const deleteClusterMutation = (options) => {
834
872
  const mutationOptions = {
835
873
  mutationFn: async (fnOptions) => {
836
- const { data } = await TicketsService.closeTicket({
874
+ const { data } = await ClustersService.deleteCluster({
837
875
  ...options,
838
876
  ...fnOptions,
839
877
  throwOnError: true
@@ -843,13 +881,18 @@ export const closeTicketMutation = (options) => {
843
881
  };
844
882
  return mutationOptions;
845
883
  };
846
- export const getTicketQueryKey = (options) => createQueryKey('getTicket', options);
884
+ export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
847
885
  /**
848
- * Get a ticket and its messages.
886
+ * Get cluster information.
887
+ *
888
+ * Returns cluster details.
889
+ *
890
+ * This endpoint is available to all users in the organization.
891
+ *
849
892
  */
850
- export const getTicketOptions = (options) => queryOptions({
893
+ export const getClusterOptions = (options) => queryOptions({
851
894
  queryFn: async ({ queryKey, signal }) => {
852
- const { data } = await TicketsService.getTicket({
895
+ const { data } = await ClustersService.getCluster({
853
896
  ...options,
854
897
  ...queryKey[0],
855
898
  signal,
@@ -857,18 +900,22 @@ export const getTicketOptions = (options) => queryOptions({
857
900
  });
858
901
  return data;
859
902
  },
860
- queryKey: getTicketQueryKey(options)
903
+ queryKey: getClusterQueryKey(options)
861
904
  });
862
905
  /**
863
- * Append a customer reply to a ticket.
906
+ * Update cluster information.
864
907
  *
865
- * Multipart form-data with a JSON-encoded `payload` field carrying `body`, plus up to 3 `attachments` files. Returns 409 if the ticket is closed.
908
+ * 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.
909
+ *
910
+ * This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged.
911
+ *
912
+ * This endpoint is available to administrators of the organization only.
866
913
  *
867
914
  */
868
- export const replyTicketMutation = (options) => {
915
+ export const updateClusterMutation = (options) => {
869
916
  const mutationOptions = {
870
917
  mutationFn: async (fnOptions) => {
871
- const { data } = await TicketsService.replyTicket({
918
+ const { data } = await ClustersService.updateCluster({
872
919
  ...options,
873
920
  ...fnOptions,
874
921
  throwOnError: true
@@ -878,53 +925,16 @@ export const replyTicketMutation = (options) => {
878
925
  };
879
926
  return mutationOptions;
880
927
  };
881
- export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
882
- /**
883
- * Download a ticket attachment.
884
- */
885
- export const getTicketAttachmentOptions = (options) => queryOptions({
886
- queryFn: async ({ queryKey, signal }) => {
887
- const { data } = await TicketsService.getTicketAttachment({
888
- ...options,
889
- ...queryKey[0],
890
- signal,
891
- throwOnError: true
892
- });
893
- return data;
894
- },
895
- queryKey: getTicketAttachmentQueryKey(options)
896
- });
897
- export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
898
928
  /**
899
- * List access tokens in organization.
900
- *
901
- * 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.
902
- *
903
- */
904
- export const listTokensOptions = (options) => queryOptions({
905
- queryFn: async ({ queryKey, signal }) => {
906
- const { data } = await TokensService.listTokens({
907
- ...options,
908
- ...queryKey[0],
909
- signal,
910
- throwOnError: true
911
- });
912
- return data;
913
- },
914
- queryKey: listTokensQueryKey(options)
915
- });
916
- /**
917
- * Create a new access token.
918
- *
919
- * 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.
929
+ * Node join information for the cluster
920
930
  *
921
- * This endpoint is available to administrators of the organization only.
931
+ * 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.
922
932
  *
923
933
  */
924
- export const createTokenMutation = (options) => {
934
+ export const getJoinInformationMutation = (options) => {
925
935
  const mutationOptions = {
926
936
  mutationFn: async (fnOptions) => {
927
- const { data } = await TokensService.createToken({
937
+ const { data } = await ClustersService.getJoinInformation({
928
938
  ...options,
929
939
  ...fnOptions,
930
940
  throwOnError: true
@@ -934,16 +944,35 @@ export const createTokenMutation = (options) => {
934
944
  };
935
945
  return mutationOptions;
936
946
  };
947
+ export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
937
948
  /**
938
- * Permanently delete access token.
949
+ * Get billing usage information.
939
950
  *
940
- * 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.
951
+ * 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.
941
952
  *
942
953
  */
943
- export const deleteTokenMutation = (options) => {
954
+ export const getUsageOptions = (options) => queryOptions({
955
+ queryFn: async ({ queryKey, signal }) => {
956
+ const { data } = await BillingService.getUsage({
957
+ ...options,
958
+ ...queryKey[0],
959
+ signal,
960
+ throwOnError: true
961
+ });
962
+ return data;
963
+ },
964
+ queryKey: getUsageQueryKey(options)
965
+ });
966
+ /**
967
+ * Get Stripe client secret.
968
+ *
969
+ * 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.
970
+ *
971
+ */
972
+ export const getPaymentMethodSecretMutation = (options) => {
944
973
  const mutationOptions = {
945
974
  mutationFn: async (fnOptions) => {
946
- const { data } = await TokensService.deleteToken({
975
+ const { data } = await BillingService.getPaymentMethodSecret({
947
976
  ...options,
948
977
  ...fnOptions,
949
978
  throwOnError: true
@@ -953,16 +982,16 @@ export const deleteTokenMutation = (options) => {
953
982
  };
954
983
  return mutationOptions;
955
984
  };
956
- export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
985
+ export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
957
986
  /**
958
- * Get access token information.
987
+ * List organization payment methods.
959
988
  *
960
- * 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.
989
+ * 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.
961
990
  *
962
991
  */
963
- export const getTokenOptions = (options) => queryOptions({
992
+ export const listPaymentMethodsOptions = (options) => queryOptions({
964
993
  queryFn: async ({ queryKey, signal }) => {
965
- const { data } = await TokensService.getToken({
994
+ const { data } = await BillingService.listPaymentMethods({
966
995
  ...options,
967
996
  ...queryKey[0],
968
997
  signal,
@@ -970,20 +999,18 @@ export const getTokenOptions = (options) => queryOptions({
970
999
  });
971
1000
  return data;
972
1001
  },
973
- queryKey: getTokenQueryKey(options)
1002
+ queryKey: listPaymentMethodsQueryKey(options)
974
1003
  });
975
1004
  /**
976
- * Update access token information.
977
- *
978
- * 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.
1005
+ * Set the default payment method.
979
1006
  *
980
- * This endpoint is available to administrators of the organization only.
1007
+ * Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
981
1008
  *
982
1009
  */
983
- export const updateTokenMutation = (options) => {
1010
+ export const setDefaultPaymentMethodMutation = (options) => {
984
1011
  const mutationOptions = {
985
1012
  mutationFn: async (fnOptions) => {
986
- const { data } = await TokensService.updateToken({
1013
+ const { data } = await BillingService.setDefaultPaymentMethod({
987
1014
  ...options,
988
1015
  ...fnOptions,
989
1016
  throwOnError: true
@@ -994,14 +1021,15 @@ export const updateTokenMutation = (options) => {
994
1021
  return mutationOptions;
995
1022
  };
996
1023
  /**
997
- * Regenerate access token secret key.
1024
+ * Delete a payment method.
1025
+ *
1026
+ * 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.
998
1027
  *
999
- * Generates a new access token secret. Old secret will not be valid anymore.
1000
1028
  */
1001
- export const regenerateTokenMutation = (options) => {
1029
+ export const deletePaymentMethodMutation = (options) => {
1002
1030
  const mutationOptions = {
1003
1031
  mutationFn: async (fnOptions) => {
1004
- const { data } = await TokensService.regenerateToken({
1032
+ const { data } = await BillingService.deletePaymentMethod({
1005
1033
  ...options,
1006
1034
  ...fnOptions,
1007
1035
  throwOnError: true
@@ -1011,34 +1039,16 @@ export const regenerateTokenMutation = (options) => {
1011
1039
  };
1012
1040
  return mutationOptions;
1013
1041
  };
1014
- export const listUserOrganizationsQueryKey = (options) => createQueryKey('listUserOrganizations', options);
1015
- /**
1016
- * Get a list of organizations the user belongs to. Used during authentication process.
1017
- */
1018
- export const listUserOrganizationsOptions = (options) => queryOptions({
1019
- queryFn: async ({ queryKey, signal }) => {
1020
- const { data } = await UsersService.listUserOrganizations({
1021
- ...options,
1022
- ...queryKey[0],
1023
- signal,
1024
- throwOnError: true
1025
- });
1026
- return data;
1027
- },
1028
- queryKey: listUserOrganizationsQueryKey(options)
1029
- });
1030
- export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
1042
+ export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
1031
1043
  /**
1032
- * List users in organization.
1033
- *
1034
- * 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.
1044
+ * List issued invoices.
1035
1045
  *
1036
- * This endpoint is available to all users in the organization.
1046
+ * 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.
1037
1047
  *
1038
1048
  */
1039
- export const listUsersOptions = (options) => queryOptions({
1049
+ export const listInvoicesOptions = (options) => queryOptions({
1040
1050
  queryFn: async ({ queryKey, signal }) => {
1041
- const { data } = await UsersService.listUsers({
1051
+ const { data } = await BillingService.listInvoices({
1042
1052
  ...options,
1043
1053
  ...queryKey[0],
1044
1054
  signal,
@@ -1046,18 +1056,18 @@ export const listUsersOptions = (options) => queryOptions({
1046
1056
  });
1047
1057
  return data;
1048
1058
  },
1049
- queryKey: listUsersQueryKey(options)
1059
+ queryKey: listInvoicesQueryKey(options)
1050
1060
  });
1051
1061
  /**
1052
- * Create a new user.
1062
+ * Pay the organization's open invoices.
1053
1063
  *
1054
- * 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.
1064
+ * Charges all open invoices of the organization against its default payment method. This endpoint is available to administrators of the organization only.
1055
1065
  *
1056
1066
  */
1057
- export const createUserMutation = (options) => {
1067
+ export const payOpenInvoicesMutation = (options) => {
1058
1068
  const mutationOptions = {
1059
1069
  mutationFn: async (fnOptions) => {
1060
- const { data } = await UsersService.createUser({
1070
+ const { data } = await BillingService.payOpenInvoices({
1061
1071
  ...options,
1062
1072
  ...fnOptions,
1063
1073
  throwOnError: true
@@ -1067,16 +1077,35 @@ export const createUserMutation = (options) => {
1067
1077
  };
1068
1078
  return mutationOptions;
1069
1079
  };
1080
+ export const getContactQueryKey = (options) => createQueryKey('getContact', options);
1070
1081
  /**
1071
- * Delete user by id.
1082
+ * Get organization contact and billing address information.
1072
1083
  *
1073
- * Sets user status to `inactive`. Inactive users cannot log in and manage organization resources. This endpoint is available to administrators of the organization only.
1084
+ * Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
1074
1085
  *
1075
1086
  */
1076
- export const deleteUserMutation = (options) => {
1087
+ export const getContactOptions = (options) => queryOptions({
1088
+ queryFn: async ({ queryKey, signal }) => {
1089
+ const { data } = await BillingService.getContact({
1090
+ ...options,
1091
+ ...queryKey[0],
1092
+ signal,
1093
+ throwOnError: true
1094
+ });
1095
+ return data;
1096
+ },
1097
+ queryKey: getContactQueryKey(options)
1098
+ });
1099
+ /**
1100
+ * Update organization contact information and billing address.
1101
+ *
1102
+ * This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
1103
+ *
1104
+ */
1105
+ export const updateContactMutation = (options) => {
1077
1106
  const mutationOptions = {
1078
1107
  mutationFn: async (fnOptions) => {
1079
- const { data } = await UsersService.deleteUser({
1108
+ const { data } = await BillingService.updateContact({
1080
1109
  ...options,
1081
1110
  ...fnOptions,
1082
1111
  throwOnError: true
@@ -1086,18 +1115,16 @@ export const deleteUserMutation = (options) => {
1086
1115
  };
1087
1116
  return mutationOptions;
1088
1117
  };
1089
- export const getUserQueryKey = (options) => createQueryKey('getUser', options);
1118
+ export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
1090
1119
  /**
1091
- * Get user profile information by id.
1092
- *
1093
- * Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
1120
+ * Get applied promotional credits
1094
1121
  *
1095
- * This endpoint is available to all users in the organization.
1122
+ * 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.
1096
1123
  *
1097
1124
  */
1098
- export const getUserOptions = (options) => queryOptions({
1125
+ export const getCreditsOptions = (options) => queryOptions({
1099
1126
  queryFn: async ({ queryKey, signal }) => {
1100
- const { data } = await UsersService.getUser({
1127
+ const { data } = await BillingService.getCredits({
1101
1128
  ...options,
1102
1129
  ...queryKey[0],
1103
1130
  signal,
@@ -1105,18 +1132,18 @@ export const getUserOptions = (options) => queryOptions({
1105
1132
  });
1106
1133
  return data;
1107
1134
  },
1108
- queryKey: getUserQueryKey(options)
1135
+ queryKey: getCreditsQueryKey(options)
1109
1136
  });
1110
1137
  /**
1111
- * Update user profile information.
1138
+ * Redeem promotional credits code.
1112
1139
  *
1113
- * 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.
1140
+ * 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.
1114
1141
  *
1115
1142
  */
1116
- export const updateUserMutation = (options) => {
1143
+ export const redeemCreditsMutation = (options) => {
1117
1144
  const mutationOptions = {
1118
1145
  mutationFn: async (fnOptions) => {
1119
- const { data } = await UsersService.updateUser({
1146
+ const { data } = await BillingService.redeemCredits({
1120
1147
  ...options,
1121
1148
  ...fnOptions,
1122
1149
  throwOnError: true