@cloudfleet/sdk 0.0.1-d940b00 → 0.0.1-da466c0

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