@cloudfleet/sdk 0.0.1-41d4ab0 → 0.0.1-43887de

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.
@@ -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, TokensService, UsersService } from '../sdk.gen';
4
+ import { BillingService, ChartsMarketplaceService, 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.
279
+ * Create a new support ticket.
307
280
  *
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.
309
- *
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.
298
+ * Close a ticket (soft close).
328
299
  *
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.
330
- *
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.
414
- *
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.
388
+ * List roadmap items.
416
389
  *
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,16 @@ 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.
441
+ * Vote on a roadmap item.
477
442
  *
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.
479
- *
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],
488
- signal,
489
- throwOnError: true
490
- });
491
- return data;
492
- },
493
- queryKey: getClusterQueryKey(options)
494
- });
495
- /**
496
- * Update cluster information.
497
- *
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.
499
- *
500
- * This endpoint is available to administrators of the organization only.
501
- *
502
- */
503
- export const updateClusterMutation = (options) => {
446
+ export const voteRoadmapMutation = (options) => {
504
447
  const mutationOptions = {
505
448
  mutationFn: async (fnOptions) => {
506
- const { data } = await ClustersService.updateCluster({
449
+ const { data } = await RoadmapService.voteRoadmap({
507
450
  ...options,
508
451
  ...fnOptions,
509
452
  throwOnError: true
@@ -513,16 +456,16 @@ export const updateClusterMutation = (options) => {
513
456
  };
514
457
  return mutationOptions;
515
458
  };
516
- export const getClusterCaQueryKey = (options) => createQueryKey('getClusterCa', options);
459
+ export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
517
460
  /**
518
- * Get the cluster's certificate authority in PEM format.
461
+ * List repositories
519
462
  *
520
- * Returns the root certificate authority of the Kubernetes cluster as a PEM-encoded document. This endpoint does not require authentication, similar to the cluster's JWKs endpoint, since the CA certificate is public information used by clients to establish trust with the cluster's control plane.
463
+ * Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
521
464
  *
522
465
  */
523
- export const getClusterCaOptions = (options) => queryOptions({
466
+ export const listRepositoriesOptions = (options) => queryOptions({
524
467
  queryFn: async ({ queryKey, signal }) => {
525
- const { data } = await ClustersService.getClusterCa({
468
+ const { data } = await RegistryService.listRepositories({
526
469
  ...options,
527
470
  ...queryKey[0],
528
471
  signal,
@@ -530,18 +473,37 @@ export const getClusterCaOptions = (options) => queryOptions({
530
473
  });
531
474
  return data;
532
475
  },
533
- queryKey: getClusterCaQueryKey(options)
476
+ queryKey: listRepositoriesQueryKey(options)
534
477
  });
478
+ export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
535
479
  /**
536
- * Node join information for the cluster
480
+ * List tags for a repository
537
481
  *
538
- * 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.
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.
539
483
  *
540
484
  */
541
- export const getJoinInformationMutation = (options) => {
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
+ *
502
+ */
503
+ export const deleteTagMutation = (options) => {
542
504
  const mutationOptions = {
543
505
  mutationFn: async (fnOptions) => {
544
- const { data } = await ClustersService.getJoinInformation({
506
+ const { data } = await RegistryService.deleteTag({
545
507
  ...options,
546
508
  ...fnOptions,
547
509
  throwOnError: true
@@ -551,16 +513,16 @@ export const getJoinInformationMutation = (options) => {
551
513
  };
552
514
  return mutationOptions;
553
515
  };
554
- export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
516
+ export const getTagQueryKey = (options) => createQueryKey('getTag', options);
555
517
  /**
556
- * List invites.
518
+ * Get tag details
557
519
  *
558
- * Returns a list of invites under the current organization. This endpoint is available to all users in 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.
559
521
  *
560
522
  */
561
- export const listInvitesOptions = (options) => queryOptions({
523
+ export const getTagOptions = (options) => queryOptions({
562
524
  queryFn: async ({ queryKey, signal }) => {
563
- const { data } = await InvitesService.listInvites({
525
+ const { data } = await RegistryService.getTag({
564
526
  ...options,
565
527
  ...queryKey[0],
566
528
  signal,
@@ -568,37 +530,20 @@ export const listInvitesOptions = (options) => queryOptions({
568
530
  });
569
531
  return data;
570
532
  },
571
- queryKey: listInvitesQueryKey(options)
533
+ queryKey: getTagQueryKey(options)
572
534
  });
535
+ export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
573
536
  /**
574
- * Create a new invite.
575
- *
576
- * Invite a new user to your Cloudfleet organization. The user will receive an email with a link to create a new account. This endpoint is available to administrators of the organization only.
537
+ * Get organization information.
577
538
  *
578
- */
579
- export const createInviteMutation = (options) => {
580
- const mutationOptions = {
581
- mutationFn: async (fnOptions) => {
582
- const { data } = await InvitesService.createInvite({
583
- ...options,
584
- ...fnOptions,
585
- throwOnError: true
586
- });
587
- return data;
588
- }
589
- };
590
- return mutationOptions;
591
- };
592
- export const getInviteQueryKey = (options) => createQueryKey('getInvite', options);
593
- /**
594
- * Get invite information.
539
+ * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
595
540
  *
596
- * Returns invite details.
541
+ * This endpoint is available to all users in the organization.
597
542
  *
598
543
  */
599
- export const getInviteOptions = (options) => queryOptions({
544
+ export const getOrganizationOptions = (options) => queryOptions({
600
545
  queryFn: async ({ queryKey, signal }) => {
601
- const { data } = await InvitesService.getInvite({
546
+ const { data } = await OrganizationService.getOrganization({
602
547
  ...options,
603
548
  ...queryKey[0],
604
549
  signal,
@@ -606,18 +551,36 @@ export const getInviteOptions = (options) => queryOptions({
606
551
  });
607
552
  return data;
608
553
  },
609
- queryKey: getInviteQueryKey(options)
554
+ queryKey: getOrganizationQueryKey(options)
610
555
  });
611
556
  /**
612
- * Permanently delete invite.
557
+ * Create a new organization / Cloudfleet account signup.
613
558
  *
614
- * Permanently deletes invite from the organization. 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.
615
560
  *
616
561
  */
617
- export const deleteInviteMutation = (options) => {
562
+ export const createOrganizationMutation = (options) => {
618
563
  const mutationOptions = {
619
564
  mutationFn: async (fnOptions) => {
620
- const { data } = await InvitesService.deleteInvite({
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({
621
584
  ...options,
622
585
  ...fnOptions,
623
586
  throwOnError: true
@@ -671,36 +634,16 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
671
634
  },
672
635
  queryKey: getMarketplaceChartFilesQueryKey(options)
673
636
  });
637
+ export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
674
638
  /**
675
- * MCP endpoint
676
- *
677
- * MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
678
- */
679
- export const postMcpMutation = (options) => {
680
- const mutationOptions = {
681
- mutationFn: async (fnOptions) => {
682
- const { data } = await McpService.postMcp({
683
- ...options,
684
- ...fnOptions,
685
- throwOnError: true
686
- });
687
- return data;
688
- }
689
- };
690
- return mutationOptions;
691
- };
692
- export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
693
- /**
694
- * Get organization information.
695
- *
696
- * Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
639
+ * List invites.
697
640
  *
698
- * This endpoint is available to all users in the organization.
641
+ * Returns a list of pending (non-expired) invites under the current organization. This endpoint is available to administrators of the organization only.
699
642
  *
700
643
  */
701
- export const getOrganizationOptions = (options) => queryOptions({
644
+ export const listInvitesOptions = (options) => queryOptions({
702
645
  queryFn: async ({ queryKey, signal }) => {
703
- const { data } = await OrganizationService.getOrganization({
646
+ const { data } = await InvitesService.listInvites({
704
647
  ...options,
705
648
  ...queryKey[0],
706
649
  signal,
@@ -708,18 +651,18 @@ export const getOrganizationOptions = (options) => queryOptions({
708
651
  });
709
652
  return data;
710
653
  },
711
- queryKey: getOrganizationQueryKey(options)
654
+ queryKey: listInvitesQueryKey(options)
712
655
  });
713
656
  /**
714
- * Create a new organization / Cloudfleet account signup.
657
+ * Create a new invite.
715
658
  *
716
- * This endpoint allows you to create a new Cloudfleet organization and an administrator user.
659
+ * Invite a new user to your Cloudfleet organization. The user will receive an email with a link to create a new account. This endpoint is available to administrators of the organization only.
717
660
  *
718
661
  */
719
- export const createOrganizationMutation = (options) => {
662
+ export const createInviteMutation = (options) => {
720
663
  const mutationOptions = {
721
664
  mutationFn: async (fnOptions) => {
722
- const { data } = await OrganizationService.createOrganization({
665
+ const { data } = await InvitesService.createInvite({
723
666
  ...options,
724
667
  ...fnOptions,
725
668
  throwOnError: true
@@ -729,16 +672,16 @@ export const createOrganizationMutation = (options) => {
729
672
  };
730
673
  return mutationOptions;
731
674
  };
732
- export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
675
+ export const getInviteQueryKey = (options) => createQueryKey('getInvite', options);
733
676
  /**
734
- * List repositories
677
+ * Get invite information.
735
678
  *
736
- * Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
679
+ * 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.
737
680
  *
738
681
  */
739
- export const listRepositoriesOptions = (options) => queryOptions({
682
+ export const getInviteOptions = (options) => queryOptions({
740
683
  queryFn: async ({ queryKey, signal }) => {
741
- const { data } = await RegistryService.listRepositories({
684
+ const { data } = await InvitesService.getInvite({
742
685
  ...options,
743
686
  ...queryKey[0],
744
687
  signal,
@@ -746,37 +689,37 @@ export const listRepositoriesOptions = (options) => queryOptions({
746
689
  });
747
690
  return data;
748
691
  },
749
- queryKey: listRepositoriesQueryKey(options)
692
+ queryKey: getInviteQueryKey(options)
750
693
  });
751
- export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
752
694
  /**
753
- * List tags for a repository
695
+ * Permanently delete invite.
754
696
  *
755
- * 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.
697
+ * Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
756
698
  *
757
699
  */
758
- export const listTagsOptions = (options) => queryOptions({
759
- queryFn: async ({ queryKey, signal }) => {
760
- const { data } = await RegistryService.listTags({
761
- ...options,
762
- ...queryKey[0],
763
- signal,
764
- throwOnError: true
765
- });
766
- return data;
767
- },
768
- queryKey: listTagsQueryKey(options)
769
- });
700
+ export const deleteInviteMutation = (options) => {
701
+ const mutationOptions = {
702
+ mutationFn: async (fnOptions) => {
703
+ const { data } = await InvitesService.deleteInvite({
704
+ ...options,
705
+ ...fnOptions,
706
+ throwOnError: true
707
+ });
708
+ return data;
709
+ }
710
+ };
711
+ return mutationOptions;
712
+ };
770
713
  /**
771
- * Delete tag
714
+ * Send feedback to the Cloudfleet team
772
715
  *
773
- * Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
716
+ * Sends feedback about Cloudfleet: what was useful, confusing, wrong or missing. Feedback is read by the Cloudfleet team but gets no reply and has no status. This is not a support channel: for anything that needs an answer, open a support ticket with `POST /tickets` instead.
774
717
  *
775
718
  */
776
- export const deleteTagMutation = (options) => {
719
+ export const sendFeedbackMutation = (options) => {
777
720
  const mutationOptions = {
778
721
  mutationFn: async (fnOptions) => {
779
- const { data } = await RegistryService.deleteTag({
722
+ const { data } = await FeedbackService.sendFeedback({
780
723
  ...options,
781
724
  ...fnOptions,
782
725
  throwOnError: true
@@ -786,16 +729,15 @@ export const deleteTagMutation = (options) => {
786
729
  };
787
730
  return mutationOptions;
788
731
  };
789
- export const getTagQueryKey = (options) => createQueryKey('getTag', options);
732
+ export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
790
733
  /**
791
- * Get tag details
792
- *
793
- * 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.
734
+ * Query Kubernetes cluster API
794
735
  *
736
+ * 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.
795
737
  */
796
- export const getTagOptions = (options) => queryOptions({
738
+ export const queryClusterOptions = (options) => queryOptions({
797
739
  queryFn: async ({ queryKey, signal }) => {
798
- const { data } = await RegistryService.getTag({
740
+ const { data } = await ClustersService.queryCluster({
799
741
  ...options,
800
742
  ...queryKey[0],
801
743
  signal,
@@ -803,18 +745,20 @@ export const getTagOptions = (options) => queryOptions({
803
745
  });
804
746
  return data;
805
747
  },
806
- queryKey: getTagQueryKey(options)
748
+ queryKey: queryClusterQueryKey(options)
807
749
  });
808
- export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
750
+ export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
809
751
  /**
810
- * List access tokens in organization.
752
+ * List fleets.
811
753
  *
812
- * 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.
754
+ * Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
755
+ *
756
+ * This endpoint is available to all users in the organization.
813
757
  *
814
758
  */
815
- export const listTokensOptions = (options) => queryOptions({
759
+ export const listFleetsOptions = (options) => queryOptions({
816
760
  queryFn: async ({ queryKey, signal }) => {
817
- const { data } = await TokensService.listTokens({
761
+ const { data } = await ClustersService.listFleets({
818
762
  ...options,
819
763
  ...queryKey[0],
820
764
  signal,
@@ -822,20 +766,22 @@ export const listTokensOptions = (options) => queryOptions({
822
766
  });
823
767
  return data;
824
768
  },
825
- queryKey: listTokensQueryKey(options)
769
+ queryKey: listFleetsQueryKey(options)
826
770
  });
827
771
  /**
828
- * Create a new access token.
772
+ * Create a new fleet.
829
773
  *
830
- * 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.
774
+ * 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.
775
+ *
776
+ * The cluster must be ready (status `deployed`) before a fleet can be added. Adding a fleet while the cluster is still provisioning returns `409`.
831
777
  *
832
778
  * This endpoint is available to administrators of the organization only.
833
779
  *
834
780
  */
835
- export const createTokenMutation = (options) => {
781
+ export const createFleetMutation = (options) => {
836
782
  const mutationOptions = {
837
783
  mutationFn: async (fnOptions) => {
838
- const { data } = await TokensService.createToken({
784
+ const { data } = await ClustersService.createFleet({
839
785
  ...options,
840
786
  ...fnOptions,
841
787
  throwOnError: true
@@ -846,15 +792,19 @@ export const createTokenMutation = (options) => {
846
792
  return mutationOptions;
847
793
  };
848
794
  /**
849
- * Permanently delete access token.
795
+ * Permanently delete fleet.
850
796
  *
851
- * 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.
797
+ * 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.
798
+ *
799
+ * 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.
800
+ *
801
+ * This endpoint is available to administrators of the organization only.
852
802
  *
853
803
  */
854
- export const deleteTokenMutation = (options) => {
804
+ export const deleteFleetMutation = (options) => {
855
805
  const mutationOptions = {
856
806
  mutationFn: async (fnOptions) => {
857
- const { data } = await TokensService.deleteToken({
807
+ const { data } = await ClustersService.deleteFleet({
858
808
  ...options,
859
809
  ...fnOptions,
860
810
  throwOnError: true
@@ -864,16 +814,18 @@ export const deleteTokenMutation = (options) => {
864
814
  };
865
815
  return mutationOptions;
866
816
  };
867
- export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
817
+ export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
868
818
  /**
869
- * Get access token information.
819
+ * Get fleet information.
870
820
  *
871
- * 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.
821
+ * Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
822
+ *
823
+ * This endpoint is available to all users in the organization.
872
824
  *
873
825
  */
874
- export const getTokenOptions = (options) => queryOptions({
826
+ export const getFleetOptions = (options) => queryOptions({
875
827
  queryFn: async ({ queryKey, signal }) => {
876
- const { data } = await TokensService.getToken({
828
+ const { data } = await ClustersService.getFleet({
877
829
  ...options,
878
830
  ...queryKey[0],
879
831
  signal,
@@ -881,20 +833,24 @@ export const getTokenOptions = (options) => queryOptions({
881
833
  });
882
834
  return data;
883
835
  },
884
- queryKey: getTokenQueryKey(options)
836
+ queryKey: getFleetQueryKey(options)
885
837
  });
886
838
  /**
887
- * Update access token information.
839
+ * Update fleet information.
888
840
  *
889
- * 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.
841
+ * This endpoint allows you to update fleet details.
842
+ *
843
+ * For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
844
+ *
845
+ * 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).
890
846
  *
891
847
  * This endpoint is available to administrators of the organization only.
892
848
  *
893
849
  */
894
- export const updateTokenMutation = (options) => {
850
+ export const updateFleetMutation = (options) => {
895
851
  const mutationOptions = {
896
852
  mutationFn: async (fnOptions) => {
897
- const { data } = await TokensService.updateToken({
853
+ const { data } = await ClustersService.updateFleet({
898
854
  ...options,
899
855
  ...fnOptions,
900
856
  throwOnError: true
@@ -904,15 +860,39 @@ export const updateTokenMutation = (options) => {
904
860
  };
905
861
  return mutationOptions;
906
862
  };
863
+ export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
907
864
  /**
908
- * Regenerate access token secret key.
865
+ * List charts.
866
+ *
867
+ * Returns a list of charts in the cluster.
868
+ *
869
+ * This endpoint is available to all users in the organization.
909
870
  *
910
- * Generates a new access token secret. Old secret will not be valid anymore.
911
871
  */
912
- export const regenerateTokenMutation = (options) => {
872
+ export const listChartsOptions = (options) => queryOptions({
873
+ queryFn: async ({ queryKey, signal }) => {
874
+ const { data } = await ClustersService.listCharts({
875
+ ...options,
876
+ ...queryKey[0],
877
+ signal,
878
+ throwOnError: true
879
+ });
880
+ return data;
881
+ },
882
+ queryKey: listChartsQueryKey(options)
883
+ });
884
+ /**
885
+ * Create a new chart.
886
+ *
887
+ * Create a new chart deployment.
888
+ *
889
+ * This endpoint is available to administrators of the organization only.
890
+ *
891
+ */
892
+ export const createChartMutation = (options) => {
913
893
  const mutationOptions = {
914
894
  mutationFn: async (fnOptions) => {
915
- const { data } = await TokensService.regenerateToken({
895
+ const { data } = await ClustersService.createChart({
916
896
  ...options,
917
897
  ...fnOptions,
918
898
  throwOnError: true
@@ -922,13 +902,39 @@ export const regenerateTokenMutation = (options) => {
922
902
  };
923
903
  return mutationOptions;
924
904
  };
925
- export const listUserOrganizationsQueryKey = (options) => createQueryKey('listUserOrganizations', options);
926
905
  /**
927
- * Get a list of organizations the user belongs to. Used during authentication process.
906
+ * Permanently delete the chart deployment from the cluster.
907
+ *
908
+ * This endpoint will permanently delete chart. This operation cannot be undone.
909
+ *
910
+ * This endpoint is available to administrators of the organization only.
911
+ *
928
912
  */
929
- export const listUserOrganizationsOptions = (options) => queryOptions({
913
+ export const deleteChartMutation = (options) => {
914
+ const mutationOptions = {
915
+ mutationFn: async (fnOptions) => {
916
+ const { data } = await ClustersService.deleteChart({
917
+ ...options,
918
+ ...fnOptions,
919
+ throwOnError: true
920
+ });
921
+ return data;
922
+ }
923
+ };
924
+ return mutationOptions;
925
+ };
926
+ export const getChartQueryKey = (options) => createQueryKey('getChart', options);
927
+ /**
928
+ * Get chart information.
929
+ *
930
+ * Returns the details of the chart deployment.
931
+ *
932
+ * This endpoint is available to all users in the organization.
933
+ *
934
+ */
935
+ export const getChartOptions = (options) => queryOptions({
930
936
  queryFn: async ({ queryKey, signal }) => {
931
- const { data } = await UsersService.listUserOrganizations({
937
+ const { data } = await ClustersService.getChart({
932
938
  ...options,
933
939
  ...queryKey[0],
934
940
  signal,
@@ -936,20 +942,41 @@ export const listUserOrganizationsOptions = (options) => queryOptions({
936
942
  });
937
943
  return data;
938
944
  },
939
- queryKey: listUserOrganizationsQueryKey(options)
945
+ queryKey: getChartQueryKey(options)
940
946
  });
941
- export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
942
947
  /**
943
- * List users in organization.
948
+ * Update chart information.
944
949
  *
945
- * 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.
950
+ * This endpoint allows you to update the values of a chart deployment.
951
+ *
952
+ * This endpoint is available to administrators of the organization only.
953
+ *
954
+ */
955
+ export const updateChartMutation = (options) => {
956
+ const mutationOptions = {
957
+ mutationFn: async (fnOptions) => {
958
+ const { data } = await ClustersService.updateChart({
959
+ ...options,
960
+ ...fnOptions,
961
+ throwOnError: true
962
+ });
963
+ return data;
964
+ }
965
+ };
966
+ return mutationOptions;
967
+ };
968
+ export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
969
+ /**
970
+ * List clusters.
971
+ *
972
+ * Returns a list of clusters under the current organization.
946
973
  *
947
974
  * This endpoint is available to all users in the organization.
948
975
  *
949
976
  */
950
- export const listUsersOptions = (options) => queryOptions({
977
+ export const listClustersOptions = (options) => queryOptions({
951
978
  queryFn: async ({ queryKey, signal }) => {
952
- const { data } = await UsersService.listUsers({
979
+ const { data } = await ClustersService.listClusters({
953
980
  ...options,
954
981
  ...queryKey[0],
955
982
  signal,
@@ -957,18 +984,20 @@ export const listUsersOptions = (options) => queryOptions({
957
984
  });
958
985
  return data;
959
986
  },
960
- queryKey: listUsersQueryKey(options)
987
+ queryKey: listClustersQueryKey(options)
961
988
  });
962
989
  /**
963
- * Create a new user.
990
+ * Create a new cluster.
964
991
  *
965
- * 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.
992
+ * 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.
993
+ *
994
+ * This endpoint is available to administrators of the organization only.
966
995
  *
967
996
  */
968
- export const createUserMutation = (options) => {
997
+ export const createClusterMutation = (options) => {
969
998
  const mutationOptions = {
970
999
  mutationFn: async (fnOptions) => {
971
- const { data } = await UsersService.createUser({
1000
+ const { data } = await ClustersService.createCluster({
972
1001
  ...options,
973
1002
  ...fnOptions,
974
1003
  throwOnError: true
@@ -979,15 +1008,19 @@ export const createUserMutation = (options) => {
979
1008
  return mutationOptions;
980
1009
  };
981
1010
  /**
982
- * Delete user by id.
1011
+ * Permanently delete cluster.
983
1012
  *
984
- * Sets user status to `inactive`. Inactive users cannot log in and manage organization resources. This endpoint is available to administrators of the organization only.
1013
+ * This endpoint will permanently delete the cluster. This operation cannot be undone.
1014
+ *
1015
+ * 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.
1016
+ *
1017
+ * This endpoint is available to administrators of the organization only.
985
1018
  *
986
1019
  */
987
- export const deleteUserMutation = (options) => {
1020
+ export const deleteClusterMutation = (options) => {
988
1021
  const mutationOptions = {
989
1022
  mutationFn: async (fnOptions) => {
990
- const { data } = await UsersService.deleteUser({
1023
+ const { data } = await ClustersService.deleteCluster({
991
1024
  ...options,
992
1025
  ...fnOptions,
993
1026
  throwOnError: true
@@ -997,18 +1030,18 @@ export const deleteUserMutation = (options) => {
997
1030
  };
998
1031
  return mutationOptions;
999
1032
  };
1000
- export const getUserQueryKey = (options) => createQueryKey('getUser', options);
1033
+ export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
1001
1034
  /**
1002
- * Get user profile information by id.
1035
+ * Get cluster information.
1003
1036
  *
1004
- * Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
1037
+ * Returns cluster details.
1005
1038
  *
1006
1039
  * This endpoint is available to all users in the organization.
1007
1040
  *
1008
1041
  */
1009
- export const getUserOptions = (options) => queryOptions({
1042
+ export const getClusterOptions = (options) => queryOptions({
1010
1043
  queryFn: async ({ queryKey, signal }) => {
1011
- const { data } = await UsersService.getUser({
1044
+ const { data } = await ClustersService.getCluster({
1012
1045
  ...options,
1013
1046
  ...queryKey[0],
1014
1047
  signal,
@@ -1016,18 +1049,250 @@ export const getUserOptions = (options) => queryOptions({
1016
1049
  });
1017
1050
  return data;
1018
1051
  },
1019
- queryKey: getUserQueryKey(options)
1052
+ queryKey: getClusterQueryKey(options)
1020
1053
  });
1021
1054
  /**
1022
- * Update user profile information.
1055
+ * Update cluster information.
1023
1056
  *
1024
- * 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.
1057
+ * 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.
1058
+ *
1059
+ * This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged.
1060
+ *
1061
+ * This endpoint is available to administrators of the organization only.
1025
1062
  *
1026
1063
  */
1027
- export const updateUserMutation = (options) => {
1064
+ export const updateClusterMutation = (options) => {
1028
1065
  const mutationOptions = {
1029
1066
  mutationFn: async (fnOptions) => {
1030
- const { data } = await UsersService.updateUser({
1067
+ const { data } = await ClustersService.updateCluster({
1068
+ ...options,
1069
+ ...fnOptions,
1070
+ throwOnError: true
1071
+ });
1072
+ return data;
1073
+ }
1074
+ };
1075
+ return mutationOptions;
1076
+ };
1077
+ /**
1078
+ * Node join information for the cluster
1079
+ *
1080
+ * 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.
1081
+ *
1082
+ */
1083
+ export const getJoinInformationMutation = (options) => {
1084
+ const mutationOptions = {
1085
+ mutationFn: async (fnOptions) => {
1086
+ const { data } = await ClustersService.getJoinInformation({
1087
+ ...options,
1088
+ ...fnOptions,
1089
+ throwOnError: true
1090
+ });
1091
+ return data;
1092
+ }
1093
+ };
1094
+ return mutationOptions;
1095
+ };
1096
+ export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
1097
+ /**
1098
+ * Get billing usage information.
1099
+ *
1100
+ * 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.
1101
+ *
1102
+ */
1103
+ export const getUsageOptions = (options) => queryOptions({
1104
+ queryFn: async ({ queryKey, signal }) => {
1105
+ const { data } = await BillingService.getUsage({
1106
+ ...options,
1107
+ ...queryKey[0],
1108
+ signal,
1109
+ throwOnError: true
1110
+ });
1111
+ return data;
1112
+ },
1113
+ queryKey: getUsageQueryKey(options)
1114
+ });
1115
+ /**
1116
+ * Get Stripe client secret.
1117
+ *
1118
+ * 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.
1119
+ *
1120
+ */
1121
+ export const getPaymentMethodSecretMutation = (options) => {
1122
+ const mutationOptions = {
1123
+ mutationFn: async (fnOptions) => {
1124
+ const { data } = await BillingService.getPaymentMethodSecret({
1125
+ ...options,
1126
+ ...fnOptions,
1127
+ throwOnError: true
1128
+ });
1129
+ return data;
1130
+ }
1131
+ };
1132
+ return mutationOptions;
1133
+ };
1134
+ export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
1135
+ /**
1136
+ * List organization payment methods.
1137
+ *
1138
+ * 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.
1139
+ *
1140
+ */
1141
+ export const listPaymentMethodsOptions = (options) => queryOptions({
1142
+ queryFn: async ({ queryKey, signal }) => {
1143
+ const { data } = await BillingService.listPaymentMethods({
1144
+ ...options,
1145
+ ...queryKey[0],
1146
+ signal,
1147
+ throwOnError: true
1148
+ });
1149
+ return data;
1150
+ },
1151
+ queryKey: listPaymentMethodsQueryKey(options)
1152
+ });
1153
+ /**
1154
+ * Set the default payment method.
1155
+ *
1156
+ * Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
1157
+ *
1158
+ */
1159
+ export const setDefaultPaymentMethodMutation = (options) => {
1160
+ const mutationOptions = {
1161
+ mutationFn: async (fnOptions) => {
1162
+ const { data } = await BillingService.setDefaultPaymentMethod({
1163
+ ...options,
1164
+ ...fnOptions,
1165
+ throwOnError: true
1166
+ });
1167
+ return data;
1168
+ }
1169
+ };
1170
+ return mutationOptions;
1171
+ };
1172
+ /**
1173
+ * Delete a payment method.
1174
+ *
1175
+ * 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.
1176
+ *
1177
+ */
1178
+ export const deletePaymentMethodMutation = (options) => {
1179
+ const mutationOptions = {
1180
+ mutationFn: async (fnOptions) => {
1181
+ const { data } = await BillingService.deletePaymentMethod({
1182
+ ...options,
1183
+ ...fnOptions,
1184
+ throwOnError: true
1185
+ });
1186
+ return data;
1187
+ }
1188
+ };
1189
+ return mutationOptions;
1190
+ };
1191
+ export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
1192
+ /**
1193
+ * List issued invoices.
1194
+ *
1195
+ * 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.
1196
+ *
1197
+ */
1198
+ export const listInvoicesOptions = (options) => queryOptions({
1199
+ queryFn: async ({ queryKey, signal }) => {
1200
+ const { data } = await BillingService.listInvoices({
1201
+ ...options,
1202
+ ...queryKey[0],
1203
+ signal,
1204
+ throwOnError: true
1205
+ });
1206
+ return data;
1207
+ },
1208
+ queryKey: listInvoicesQueryKey(options)
1209
+ });
1210
+ /**
1211
+ * Pay the organization's open invoices.
1212
+ *
1213
+ * Charges all open invoices of the organization against its default payment method. This endpoint is available to administrators of the organization only.
1214
+ *
1215
+ */
1216
+ export const payOpenInvoicesMutation = (options) => {
1217
+ const mutationOptions = {
1218
+ mutationFn: async (fnOptions) => {
1219
+ const { data } = await BillingService.payOpenInvoices({
1220
+ ...options,
1221
+ ...fnOptions,
1222
+ throwOnError: true
1223
+ });
1224
+ return data;
1225
+ }
1226
+ };
1227
+ return mutationOptions;
1228
+ };
1229
+ export const getContactQueryKey = (options) => createQueryKey('getContact', options);
1230
+ /**
1231
+ * Get organization contact and billing address information.
1232
+ *
1233
+ * Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
1234
+ *
1235
+ */
1236
+ export const getContactOptions = (options) => queryOptions({
1237
+ queryFn: async ({ queryKey, signal }) => {
1238
+ const { data } = await BillingService.getContact({
1239
+ ...options,
1240
+ ...queryKey[0],
1241
+ signal,
1242
+ throwOnError: true
1243
+ });
1244
+ return data;
1245
+ },
1246
+ queryKey: getContactQueryKey(options)
1247
+ });
1248
+ /**
1249
+ * Update organization contact information and billing address.
1250
+ *
1251
+ * This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
1252
+ *
1253
+ */
1254
+ export const updateContactMutation = (options) => {
1255
+ const mutationOptions = {
1256
+ mutationFn: async (fnOptions) => {
1257
+ const { data } = await BillingService.updateContact({
1258
+ ...options,
1259
+ ...fnOptions,
1260
+ throwOnError: true
1261
+ });
1262
+ return data;
1263
+ }
1264
+ };
1265
+ return mutationOptions;
1266
+ };
1267
+ export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
1268
+ /**
1269
+ * Get applied promotional credits
1270
+ *
1271
+ * 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.
1272
+ *
1273
+ */
1274
+ export const getCreditsOptions = (options) => queryOptions({
1275
+ queryFn: async ({ queryKey, signal }) => {
1276
+ const { data } = await BillingService.getCredits({
1277
+ ...options,
1278
+ ...queryKey[0],
1279
+ signal,
1280
+ throwOnError: true
1281
+ });
1282
+ return data;
1283
+ },
1284
+ queryKey: getCreditsQueryKey(options)
1285
+ });
1286
+ /**
1287
+ * Redeem promotional credits code.
1288
+ *
1289
+ * 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.
1290
+ *
1291
+ */
1292
+ export const redeemCreditsMutation = (options) => {
1293
+ const mutationOptions = {
1294
+ mutationFn: async (fnOptions) => {
1295
+ const { data } = await BillingService.redeemCredits({
1031
1296
  ...options,
1032
1297
  ...fnOptions,
1033
1298
  throwOnError: true