@cloudfleet/sdk 0.0.1-c144916 → 0.0.1-c3098ca

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