@cloudfleet/sdk 0.0.1-f1d40ff → 0.0.1-f231d8a

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