@cloudfleet/sdk 0.0.1-2791829 → 0.0.1-28564af
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.
- package/dist/@tanstack/react-query.gen.d.ts +1125 -0
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/@tanstack/react-query.gen.js +1129 -0
- package/dist/@tanstack/react-query.gen.js.map +1 -0
- package/dist/client/client.gen.d.ts.map +1 -1
- package/dist/client/client.gen.js +113 -98
- package/dist/client/client.gen.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/types.gen.d.ts +9 -13
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.d.ts +6 -2
- package/dist/client/utils.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.js +10 -12
- package/dist/client/utils.gen.js.map +1 -1
- package/dist/client.gen.d.ts.map +1 -1
- package/dist/client.gen.js +1 -3
- package/dist/client.gen.js.map +1 -1
- package/dist/core/auth.gen.d.ts.map +1 -1
- package/dist/core/auth.gen.js.map +1 -1
- package/dist/core/bodySerializer.gen.d.ts +16 -8
- package/dist/core/bodySerializer.gen.d.ts.map +1 -1
- package/dist/core/bodySerializer.gen.js +1 -1
- package/dist/core/bodySerializer.gen.js.map +1 -1
- package/dist/core/params.gen.d.ts +10 -0
- package/dist/core/params.gen.d.ts.map +1 -1
- package/dist/core/params.gen.js +18 -6
- package/dist/core/params.gen.js.map +1 -1
- package/dist/core/pathSerializer.gen.d.ts.map +1 -1
- package/dist/core/pathSerializer.gen.js +3 -11
- package/dist/core/pathSerializer.gen.js.map +1 -1
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
- package/dist/core/queryKeySerializer.gen.js +4 -11
- package/dist/core/queryKeySerializer.gen.js.map +1 -1
- package/dist/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/core/serverSentEvents.gen.js +6 -9
- package/dist/core/serverSentEvents.gen.js.map +1 -1
- package/dist/core/types.gen.d.ts +1 -1
- package/dist/core/types.gen.d.ts.map +1 -1
- package/dist/core/utils.gen.d.ts.map +1 -1
- package/dist/core/utils.gen.js +1 -1
- package/dist/core/utils.gen.js.map +1 -1
- package/dist/schemas.gen.d.ts +960 -131
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +1618 -263
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +85 -7
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +158 -127
- package/dist/sdk.gen.js.map +1 -1
- package/dist/services/kubernetes/api.d.ts +8 -8
- package/dist/types.gen.d.ts +903 -57
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +887 -617
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +491 -457
- package/dist/zod.gen.js.map +1 -1
- package/package.json +28 -5
|
@@ -0,0 +1,1129 @@
|
|
|
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 getUsageQueryKey = (options) => createQueryKey('getUsage', options);
|
|
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
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export const getUsageOptions = (options) => queryOptions({
|
|
35
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
36
|
+
const { data } = await BillingService.getUsage({
|
|
37
|
+
...options,
|
|
38
|
+
...queryKey[0],
|
|
39
|
+
signal,
|
|
40
|
+
throwOnError: true
|
|
41
|
+
});
|
|
42
|
+
return data;
|
|
43
|
+
},
|
|
44
|
+
queryKey: getUsageQueryKey(options)
|
|
45
|
+
});
|
|
46
|
+
export const getPaymentMethodQueryKey = (options) => createQueryKey('getPaymentMethod', options);
|
|
47
|
+
/**
|
|
48
|
+
* Get organization payment method information.
|
|
49
|
+
*
|
|
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.
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export const getPaymentMethodOptions = (options) => queryOptions({
|
|
54
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
55
|
+
const { data } = await BillingService.getPaymentMethod({
|
|
56
|
+
...options,
|
|
57
|
+
...queryKey[0],
|
|
58
|
+
signal,
|
|
59
|
+
throwOnError: true
|
|
60
|
+
});
|
|
61
|
+
return data;
|
|
62
|
+
},
|
|
63
|
+
queryKey: getPaymentMethodQueryKey(options)
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Get Stripe client secret.
|
|
67
|
+
*
|
|
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.
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
export const getPaymentMethodSecretMutation = (options) => {
|
|
72
|
+
const mutationOptions = {
|
|
73
|
+
mutationFn: async (fnOptions) => {
|
|
74
|
+
const { data } = await BillingService.getPaymentMethodSecret({
|
|
75
|
+
...options,
|
|
76
|
+
...fnOptions,
|
|
77
|
+
throwOnError: true
|
|
78
|
+
});
|
|
79
|
+
return data;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return mutationOptions;
|
|
83
|
+
};
|
|
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
|
+
/**
|
|
123
|
+
* Update organization contact information and billing address.
|
|
124
|
+
*
|
|
125
|
+
* This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
export const updateContactMutation = (options) => {
|
|
129
|
+
const mutationOptions = {
|
|
130
|
+
mutationFn: async (fnOptions) => {
|
|
131
|
+
const { data } = await BillingService.updateContact({
|
|
132
|
+
...options,
|
|
133
|
+
...fnOptions,
|
|
134
|
+
throwOnError: true
|
|
135
|
+
});
|
|
136
|
+
return data;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
return mutationOptions;
|
|
140
|
+
};
|
|
141
|
+
export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
|
|
142
|
+
/**
|
|
143
|
+
* Get applied promotional credits
|
|
144
|
+
*
|
|
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.
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
export const getCreditsOptions = (options) => queryOptions({
|
|
149
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
150
|
+
const { data } = await BillingService.getCredits({
|
|
151
|
+
...options,
|
|
152
|
+
...queryKey[0],
|
|
153
|
+
signal,
|
|
154
|
+
throwOnError: true
|
|
155
|
+
});
|
|
156
|
+
return data;
|
|
157
|
+
},
|
|
158
|
+
queryKey: getCreditsQueryKey(options)
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* Redeem promotional credits code.
|
|
162
|
+
*
|
|
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.
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
export const redeemCreditsMutation = (options) => {
|
|
167
|
+
const mutationOptions = {
|
|
168
|
+
mutationFn: async (fnOptions) => {
|
|
169
|
+
const { data } = await BillingService.redeemCredits({
|
|
170
|
+
...options,
|
|
171
|
+
...fnOptions,
|
|
172
|
+
throwOnError: true
|
|
173
|
+
});
|
|
174
|
+
return data;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
return mutationOptions;
|
|
178
|
+
};
|
|
179
|
+
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
180
|
+
/**
|
|
181
|
+
* List charts.
|
|
182
|
+
*
|
|
183
|
+
* Returns a list of charts in the cluster.
|
|
184
|
+
*
|
|
185
|
+
* This endpoint is available to all users in the organization.
|
|
186
|
+
*
|
|
187
|
+
*/
|
|
188
|
+
export const listChartsOptions = (options) => queryOptions({
|
|
189
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
190
|
+
const { data } = await ClustersService.listCharts({
|
|
191
|
+
...options,
|
|
192
|
+
...queryKey[0],
|
|
193
|
+
signal,
|
|
194
|
+
throwOnError: true
|
|
195
|
+
});
|
|
196
|
+
return data;
|
|
197
|
+
},
|
|
198
|
+
queryKey: listChartsQueryKey(options)
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* Create a new chart.
|
|
202
|
+
*
|
|
203
|
+
* Create a new chart deployment.
|
|
204
|
+
*
|
|
205
|
+
* This endpoint is available to administrators of the organization only.
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
export const createChartMutation = (options) => {
|
|
209
|
+
const mutationOptions = {
|
|
210
|
+
mutationFn: async (fnOptions) => {
|
|
211
|
+
const { data } = await ClustersService.createChart({
|
|
212
|
+
...options,
|
|
213
|
+
...fnOptions,
|
|
214
|
+
throwOnError: true
|
|
215
|
+
});
|
|
216
|
+
return data;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
return mutationOptions;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Permanently delete the chart deployment from the cluster.
|
|
223
|
+
*
|
|
224
|
+
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
225
|
+
*
|
|
226
|
+
* This endpoint is available to administrators of the organization only.
|
|
227
|
+
*
|
|
228
|
+
*/
|
|
229
|
+
export const deleteChartMutation = (options) => {
|
|
230
|
+
const mutationOptions = {
|
|
231
|
+
mutationFn: async (fnOptions) => {
|
|
232
|
+
const { data } = await ClustersService.deleteChart({
|
|
233
|
+
...options,
|
|
234
|
+
...fnOptions,
|
|
235
|
+
throwOnError: true
|
|
236
|
+
});
|
|
237
|
+
return data;
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
return mutationOptions;
|
|
241
|
+
};
|
|
242
|
+
export const getChartQueryKey = (options) => createQueryKey('getChart', options);
|
|
243
|
+
/**
|
|
244
|
+
* Get chart information.
|
|
245
|
+
*
|
|
246
|
+
* Returns the details of the chart deployment.
|
|
247
|
+
*
|
|
248
|
+
* This endpoint is available to all users in the organization.
|
|
249
|
+
*
|
|
250
|
+
*/
|
|
251
|
+
export const getChartOptions = (options) => queryOptions({
|
|
252
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
253
|
+
const { data } = await ClustersService.getChart({
|
|
254
|
+
...options,
|
|
255
|
+
...queryKey[0],
|
|
256
|
+
signal,
|
|
257
|
+
throwOnError: true
|
|
258
|
+
});
|
|
259
|
+
return data;
|
|
260
|
+
},
|
|
261
|
+
queryKey: getChartQueryKey(options)
|
|
262
|
+
});
|
|
263
|
+
/**
|
|
264
|
+
* Update chart information.
|
|
265
|
+
*
|
|
266
|
+
* This endpoint allows you to update the values of a chart deployment.
|
|
267
|
+
*
|
|
268
|
+
* This endpoint is available to administrators of the organization only.
|
|
269
|
+
*
|
|
270
|
+
*/
|
|
271
|
+
export const updateChartMutation = (options) => {
|
|
272
|
+
const mutationOptions = {
|
|
273
|
+
mutationFn: async (fnOptions) => {
|
|
274
|
+
const { data } = await ClustersService.updateChart({
|
|
275
|
+
...options,
|
|
276
|
+
...fnOptions,
|
|
277
|
+
throwOnError: true
|
|
278
|
+
});
|
|
279
|
+
return data;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
return mutationOptions;
|
|
283
|
+
};
|
|
284
|
+
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
285
|
+
/**
|
|
286
|
+
* List fleets.
|
|
287
|
+
*
|
|
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.
|
|
289
|
+
*
|
|
290
|
+
* This endpoint is available to all users in the organization.
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
293
|
+
export const listFleetsOptions = (options) => queryOptions({
|
|
294
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
295
|
+
const { data } = await ClustersService.listFleets({
|
|
296
|
+
...options,
|
|
297
|
+
...queryKey[0],
|
|
298
|
+
signal,
|
|
299
|
+
throwOnError: true
|
|
300
|
+
});
|
|
301
|
+
return data;
|
|
302
|
+
},
|
|
303
|
+
queryKey: listFleetsQueryKey(options)
|
|
304
|
+
});
|
|
305
|
+
/**
|
|
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.
|
|
309
|
+
*
|
|
310
|
+
* This endpoint is available to administrators of the organization only.
|
|
311
|
+
*
|
|
312
|
+
*/
|
|
313
|
+
export const createFleetMutation = (options) => {
|
|
314
|
+
const mutationOptions = {
|
|
315
|
+
mutationFn: async (fnOptions) => {
|
|
316
|
+
const { data } = await ClustersService.createFleet({
|
|
317
|
+
...options,
|
|
318
|
+
...fnOptions,
|
|
319
|
+
throwOnError: true
|
|
320
|
+
});
|
|
321
|
+
return data;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
return mutationOptions;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
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.
|
|
330
|
+
*
|
|
331
|
+
* This endpoint is available to administrators of the organization only.
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
export const deleteFleetMutation = (options) => {
|
|
335
|
+
const mutationOptions = {
|
|
336
|
+
mutationFn: async (fnOptions) => {
|
|
337
|
+
const { data } = await ClustersService.deleteFleet({
|
|
338
|
+
...options,
|
|
339
|
+
...fnOptions,
|
|
340
|
+
throwOnError: true
|
|
341
|
+
});
|
|
342
|
+
return data;
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
return mutationOptions;
|
|
346
|
+
};
|
|
347
|
+
export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
|
|
348
|
+
/**
|
|
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
|
+
*
|
|
355
|
+
*/
|
|
356
|
+
export const getFleetOptions = (options) => queryOptions({
|
|
357
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
358
|
+
const { data } = await ClustersService.getFleet({
|
|
359
|
+
...options,
|
|
360
|
+
...queryKey[0],
|
|
361
|
+
signal,
|
|
362
|
+
throwOnError: true
|
|
363
|
+
});
|
|
364
|
+
return data;
|
|
365
|
+
},
|
|
366
|
+
queryKey: getFleetQueryKey(options)
|
|
367
|
+
});
|
|
368
|
+
/**
|
|
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.
|
|
376
|
+
*
|
|
377
|
+
* This endpoint is available to administrators of the organization only.
|
|
378
|
+
*
|
|
379
|
+
*/
|
|
380
|
+
export const updateFleetMutation = (options) => {
|
|
381
|
+
const mutationOptions = {
|
|
382
|
+
mutationFn: async (fnOptions) => {
|
|
383
|
+
const { data } = await ClustersService.updateFleet({
|
|
384
|
+
...options,
|
|
385
|
+
...fnOptions,
|
|
386
|
+
throwOnError: true
|
|
387
|
+
});
|
|
388
|
+
return data;
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
return mutationOptions;
|
|
392
|
+
};
|
|
393
|
+
export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
|
|
394
|
+
/**
|
|
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.
|
|
398
|
+
*/
|
|
399
|
+
export const queryClusterOptions = (options) => queryOptions({
|
|
400
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
401
|
+
const { data } = await ClustersService.queryCluster({
|
|
402
|
+
...options,
|
|
403
|
+
...queryKey[0],
|
|
404
|
+
signal,
|
|
405
|
+
throwOnError: true
|
|
406
|
+
});
|
|
407
|
+
return data;
|
|
408
|
+
},
|
|
409
|
+
queryKey: queryClusterQueryKey(options)
|
|
410
|
+
});
|
|
411
|
+
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
412
|
+
/**
|
|
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.
|
|
416
|
+
*
|
|
417
|
+
* This endpoint is available to all users in the organization.
|
|
418
|
+
*
|
|
419
|
+
*/
|
|
420
|
+
export const listClustersOptions = (options) => queryOptions({
|
|
421
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
422
|
+
const { data } = await ClustersService.listClusters({
|
|
423
|
+
...options,
|
|
424
|
+
...queryKey[0],
|
|
425
|
+
signal,
|
|
426
|
+
throwOnError: true
|
|
427
|
+
});
|
|
428
|
+
return data;
|
|
429
|
+
},
|
|
430
|
+
queryKey: listClustersQueryKey(options)
|
|
431
|
+
});
|
|
432
|
+
/**
|
|
433
|
+
* Create a new cluster.
|
|
434
|
+
*
|
|
435
|
+
* Create a new cluster under the current organization. Clusters allow you to group resources and you can create multiple clusters under the same organization, with billing delegated to the parent organization.
|
|
436
|
+
*
|
|
437
|
+
* This endpoint is available to administrators of the organization only.
|
|
438
|
+
*
|
|
439
|
+
*/
|
|
440
|
+
export const createClusterMutation = (options) => {
|
|
441
|
+
const mutationOptions = {
|
|
442
|
+
mutationFn: async (fnOptions) => {
|
|
443
|
+
const { data } = await ClustersService.createCluster({
|
|
444
|
+
...options,
|
|
445
|
+
...fnOptions,
|
|
446
|
+
throwOnError: true
|
|
447
|
+
});
|
|
448
|
+
return data;
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
return mutationOptions;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* Permanently delete cluster.
|
|
455
|
+
*
|
|
456
|
+
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
457
|
+
*
|
|
458
|
+
* This endpoint is available to administrators of the organization only.
|
|
459
|
+
*
|
|
460
|
+
*/
|
|
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);
|
|
475
|
+
/**
|
|
476
|
+
* Get cluster information.
|
|
477
|
+
*
|
|
478
|
+
* Returns cluster details including quota. Quota is a set of filters defined by the admin of the organization that will be applied to all resources created in the cluster. Quota information returned here does not take into account quota set on organization or platform level. For calculated quota applied to this account, use /clusters/{cluster_id}/quota endpoint. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
479
|
+
*
|
|
480
|
+
* This endpoint is available to all users in the organization.
|
|
481
|
+
*
|
|
482
|
+
*/
|
|
483
|
+
export const getClusterOptions = (options) => queryOptions({
|
|
484
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
485
|
+
const { data } = await ClustersService.getCluster({
|
|
486
|
+
...options,
|
|
487
|
+
...queryKey[0],
|
|
488
|
+
signal,
|
|
489
|
+
throwOnError: true
|
|
490
|
+
});
|
|
491
|
+
return data;
|
|
492
|
+
},
|
|
493
|
+
queryKey: getClusterQueryKey(options)
|
|
494
|
+
});
|
|
495
|
+
/**
|
|
496
|
+
* Update cluster information.
|
|
497
|
+
*
|
|
498
|
+
* This endpoint allows you to update cluster details, including quota and cluster status. For more information about clusters, see [Clusters](https://cloudfleet.ai/docs/cluster-management/cluster-types/) section of documentaiton.
|
|
499
|
+
*
|
|
500
|
+
* This endpoint is available to administrators of the organization only.
|
|
501
|
+
*
|
|
502
|
+
*/
|
|
503
|
+
export const updateClusterMutation = (options) => {
|
|
504
|
+
const mutationOptions = {
|
|
505
|
+
mutationFn: async (fnOptions) => {
|
|
506
|
+
const { data } = await ClustersService.updateCluster({
|
|
507
|
+
...options,
|
|
508
|
+
...fnOptions,
|
|
509
|
+
throwOnError: true
|
|
510
|
+
});
|
|
511
|
+
return data;
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
return mutationOptions;
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
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.
|
|
520
|
+
*
|
|
521
|
+
*/
|
|
522
|
+
export const getJoinInformationMutation = (options) => {
|
|
523
|
+
const mutationOptions = {
|
|
524
|
+
mutationFn: async (fnOptions) => {
|
|
525
|
+
const { data } = await ClustersService.getJoinInformation({
|
|
526
|
+
...options,
|
|
527
|
+
...fnOptions,
|
|
528
|
+
throwOnError: true
|
|
529
|
+
});
|
|
530
|
+
return data;
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
return mutationOptions;
|
|
534
|
+
};
|
|
535
|
+
export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
|
|
536
|
+
/**
|
|
537
|
+
* List invites.
|
|
538
|
+
*
|
|
539
|
+
* Returns a list of invites under the current organization. This endpoint is available to all users in the organization.
|
|
540
|
+
*
|
|
541
|
+
*/
|
|
542
|
+
export const listInvitesOptions = (options) => queryOptions({
|
|
543
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
544
|
+
const { data } = await InvitesService.listInvites({
|
|
545
|
+
...options,
|
|
546
|
+
...queryKey[0],
|
|
547
|
+
signal,
|
|
548
|
+
throwOnError: true
|
|
549
|
+
});
|
|
550
|
+
return data;
|
|
551
|
+
},
|
|
552
|
+
queryKey: listInvitesQueryKey(options)
|
|
553
|
+
});
|
|
554
|
+
/**
|
|
555
|
+
* Create a new invite.
|
|
556
|
+
*
|
|
557
|
+
* 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.
|
|
558
|
+
*
|
|
559
|
+
*/
|
|
560
|
+
export const createInviteMutation = (options) => {
|
|
561
|
+
const mutationOptions = {
|
|
562
|
+
mutationFn: async (fnOptions) => {
|
|
563
|
+
const { data } = await InvitesService.createInvite({
|
|
564
|
+
...options,
|
|
565
|
+
...fnOptions,
|
|
566
|
+
throwOnError: true
|
|
567
|
+
});
|
|
568
|
+
return data;
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
return mutationOptions;
|
|
572
|
+
};
|
|
573
|
+
export const getInviteQueryKey = (options) => createQueryKey('getInvite', options);
|
|
574
|
+
/**
|
|
575
|
+
* Get invite information.
|
|
576
|
+
*
|
|
577
|
+
* Returns invite details.
|
|
578
|
+
*
|
|
579
|
+
*/
|
|
580
|
+
export const getInviteOptions = (options) => queryOptions({
|
|
581
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
582
|
+
const { data } = await InvitesService.getInvite({
|
|
583
|
+
...options,
|
|
584
|
+
...queryKey[0],
|
|
585
|
+
signal,
|
|
586
|
+
throwOnError: true
|
|
587
|
+
});
|
|
588
|
+
return data;
|
|
589
|
+
},
|
|
590
|
+
queryKey: getInviteQueryKey(options)
|
|
591
|
+
});
|
|
592
|
+
/**
|
|
593
|
+
* Permanently delete invite.
|
|
594
|
+
*
|
|
595
|
+
* Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
|
|
596
|
+
*
|
|
597
|
+
*/
|
|
598
|
+
export const deleteInviteMutation = (options) => {
|
|
599
|
+
const mutationOptions = {
|
|
600
|
+
mutationFn: async (fnOptions) => {
|
|
601
|
+
const { data } = await InvitesService.deleteInvite({
|
|
602
|
+
...options,
|
|
603
|
+
...fnOptions,
|
|
604
|
+
throwOnError: true
|
|
605
|
+
});
|
|
606
|
+
return data;
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
return mutationOptions;
|
|
610
|
+
};
|
|
611
|
+
export const listMarketplaceChartsQueryKey = (options) => createQueryKey('listMarketplaceCharts', options);
|
|
612
|
+
/**
|
|
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.
|
|
618
|
+
*
|
|
619
|
+
*/
|
|
620
|
+
export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
621
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
622
|
+
const { data } = await ChartsMarketplaceService.listMarketplaceCharts({
|
|
623
|
+
...options,
|
|
624
|
+
...queryKey[0],
|
|
625
|
+
signal,
|
|
626
|
+
throwOnError: true
|
|
627
|
+
});
|
|
628
|
+
return data;
|
|
629
|
+
},
|
|
630
|
+
queryKey: listMarketplaceChartsQueryKey(options)
|
|
631
|
+
});
|
|
632
|
+
export const getMarketplaceChartFilesQueryKey = (options) => createQueryKey('getMarketplaceChartFiles', options);
|
|
633
|
+
/**
|
|
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.
|
|
637
|
+
*
|
|
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.
|
|
639
|
+
*
|
|
640
|
+
* This endpoint is available to all users in the organization.
|
|
641
|
+
*
|
|
642
|
+
*/
|
|
643
|
+
export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
644
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
645
|
+
const { data } = await ChartsMarketplaceService.getMarketplaceChartFiles({
|
|
646
|
+
...options,
|
|
647
|
+
...queryKey[0],
|
|
648
|
+
signal,
|
|
649
|
+
throwOnError: true
|
|
650
|
+
});
|
|
651
|
+
return data;
|
|
652
|
+
},
|
|
653
|
+
queryKey: getMarketplaceChartFilesQueryKey(options)
|
|
654
|
+
});
|
|
655
|
+
/**
|
|
656
|
+
* MCP endpoint
|
|
657
|
+
*
|
|
658
|
+
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
659
|
+
*/
|
|
660
|
+
export const postMcpMutation = (options) => {
|
|
661
|
+
const mutationOptions = {
|
|
662
|
+
mutationFn: async (fnOptions) => {
|
|
663
|
+
const { data } = await McpService.postMcp({
|
|
664
|
+
...options,
|
|
665
|
+
...fnOptions,
|
|
666
|
+
throwOnError: true
|
|
667
|
+
});
|
|
668
|
+
return data;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
return mutationOptions;
|
|
672
|
+
};
|
|
673
|
+
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
674
|
+
/**
|
|
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.
|
|
680
|
+
*
|
|
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.
|
|
696
|
+
*
|
|
697
|
+
* This endpoint allows you to create a new Cloudfleet organization and an administrator user.
|
|
698
|
+
*
|
|
699
|
+
*/
|
|
700
|
+
export const createOrganizationMutation = (options) => {
|
|
701
|
+
const mutationOptions = {
|
|
702
|
+
mutationFn: async (fnOptions) => {
|
|
703
|
+
const { data } = await OrganizationService.createOrganization({
|
|
704
|
+
...options,
|
|
705
|
+
...fnOptions,
|
|
706
|
+
throwOnError: true
|
|
707
|
+
});
|
|
708
|
+
return data;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
return mutationOptions;
|
|
712
|
+
};
|
|
713
|
+
export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
|
|
714
|
+
/**
|
|
715
|
+
* List repositories
|
|
716
|
+
*
|
|
717
|
+
* Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
|
|
718
|
+
*
|
|
719
|
+
*/
|
|
720
|
+
export const listRepositoriesOptions = (options) => queryOptions({
|
|
721
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
722
|
+
const { data } = await RegistryService.listRepositories({
|
|
723
|
+
...options,
|
|
724
|
+
...queryKey[0],
|
|
725
|
+
signal,
|
|
726
|
+
throwOnError: true
|
|
727
|
+
});
|
|
728
|
+
return data;
|
|
729
|
+
},
|
|
730
|
+
queryKey: listRepositoriesQueryKey(options)
|
|
731
|
+
});
|
|
732
|
+
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
733
|
+
/**
|
|
734
|
+
* List tags for a repository
|
|
735
|
+
*
|
|
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.
|
|
737
|
+
*
|
|
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
|
|
753
|
+
*
|
|
754
|
+
* Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
|
|
755
|
+
*
|
|
756
|
+
*/
|
|
757
|
+
export const deleteTagMutation = (options) => {
|
|
758
|
+
const mutationOptions = {
|
|
759
|
+
mutationFn: async (fnOptions) => {
|
|
760
|
+
const { data } = await RegistryService.deleteTag({
|
|
761
|
+
...options,
|
|
762
|
+
...fnOptions,
|
|
763
|
+
throwOnError: true
|
|
764
|
+
});
|
|
765
|
+
return data;
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
return mutationOptions;
|
|
769
|
+
};
|
|
770
|
+
export const getTagQueryKey = (options) => createQueryKey('getTag', options);
|
|
771
|
+
/**
|
|
772
|
+
* Get tag details
|
|
773
|
+
*
|
|
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.
|
|
775
|
+
*
|
|
776
|
+
*/
|
|
777
|
+
export const getTagOptions = (options) => queryOptions({
|
|
778
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
779
|
+
const { data } = await RegistryService.getTag({
|
|
780
|
+
...options,
|
|
781
|
+
...queryKey[0],
|
|
782
|
+
signal,
|
|
783
|
+
throwOnError: true
|
|
784
|
+
});
|
|
785
|
+
return data;
|
|
786
|
+
},
|
|
787
|
+
queryKey: getTagQueryKey(options)
|
|
788
|
+
});
|
|
789
|
+
export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
|
|
790
|
+
/**
|
|
791
|
+
* List tickets for the current organization.
|
|
792
|
+
*
|
|
793
|
+
* Returns all tickets belonging to the caller's organization, newest first.
|
|
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.
|
|
810
|
+
*
|
|
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).
|
|
812
|
+
*
|
|
813
|
+
*/
|
|
814
|
+
export const createTicketMutation = (options) => {
|
|
815
|
+
const mutationOptions = {
|
|
816
|
+
mutationFn: async (fnOptions) => {
|
|
817
|
+
const { data } = await TicketsService.createTicket({
|
|
818
|
+
...options,
|
|
819
|
+
...fnOptions,
|
|
820
|
+
throwOnError: true
|
|
821
|
+
});
|
|
822
|
+
return data;
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
return mutationOptions;
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* Close a ticket (soft close).
|
|
829
|
+
*
|
|
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.
|
|
831
|
+
*
|
|
832
|
+
*/
|
|
833
|
+
export const closeTicketMutation = (options) => {
|
|
834
|
+
const mutationOptions = {
|
|
835
|
+
mutationFn: async (fnOptions) => {
|
|
836
|
+
const { data } = await TicketsService.closeTicket({
|
|
837
|
+
...options,
|
|
838
|
+
...fnOptions,
|
|
839
|
+
throwOnError: true
|
|
840
|
+
});
|
|
841
|
+
return data;
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
return mutationOptions;
|
|
845
|
+
};
|
|
846
|
+
export const getTicketQueryKey = (options) => createQueryKey('getTicket', options);
|
|
847
|
+
/**
|
|
848
|
+
* Get a ticket and its messages.
|
|
849
|
+
*/
|
|
850
|
+
export const getTicketOptions = (options) => queryOptions({
|
|
851
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
852
|
+
const { data } = await TicketsService.getTicket({
|
|
853
|
+
...options,
|
|
854
|
+
...queryKey[0],
|
|
855
|
+
signal,
|
|
856
|
+
throwOnError: true
|
|
857
|
+
});
|
|
858
|
+
return data;
|
|
859
|
+
},
|
|
860
|
+
queryKey: getTicketQueryKey(options)
|
|
861
|
+
});
|
|
862
|
+
/**
|
|
863
|
+
* Append a customer reply to a ticket.
|
|
864
|
+
*
|
|
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.
|
|
866
|
+
*
|
|
867
|
+
*/
|
|
868
|
+
export const replyTicketMutation = (options) => {
|
|
869
|
+
const mutationOptions = {
|
|
870
|
+
mutationFn: async (fnOptions) => {
|
|
871
|
+
const { data } = await TicketsService.replyTicket({
|
|
872
|
+
...options,
|
|
873
|
+
...fnOptions,
|
|
874
|
+
throwOnError: true
|
|
875
|
+
});
|
|
876
|
+
return data;
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
return mutationOptions;
|
|
880
|
+
};
|
|
881
|
+
export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
|
|
882
|
+
/**
|
|
883
|
+
* Download a ticket attachment.
|
|
884
|
+
*/
|
|
885
|
+
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
886
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
887
|
+
const { data } = await TicketsService.getTicketAttachment({
|
|
888
|
+
...options,
|
|
889
|
+
...queryKey[0],
|
|
890
|
+
signal,
|
|
891
|
+
throwOnError: true
|
|
892
|
+
});
|
|
893
|
+
return data;
|
|
894
|
+
},
|
|
895
|
+
queryKey: getTicketAttachmentQueryKey(options)
|
|
896
|
+
});
|
|
897
|
+
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
898
|
+
/**
|
|
899
|
+
* List access tokens in organization.
|
|
900
|
+
*
|
|
901
|
+
* This endpoint allows you to get a list of all access tokens details in organization. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
902
|
+
*
|
|
903
|
+
*/
|
|
904
|
+
export const listTokensOptions = (options) => queryOptions({
|
|
905
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
906
|
+
const { data } = await TokensService.listTokens({
|
|
907
|
+
...options,
|
|
908
|
+
...queryKey[0],
|
|
909
|
+
signal,
|
|
910
|
+
throwOnError: true
|
|
911
|
+
});
|
|
912
|
+
return data;
|
|
913
|
+
},
|
|
914
|
+
queryKey: listTokensQueryKey(options)
|
|
915
|
+
});
|
|
916
|
+
/**
|
|
917
|
+
* Create a new access token.
|
|
918
|
+
*
|
|
919
|
+
* This endpoint allows you to create a new access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
|
|
920
|
+
*
|
|
921
|
+
* This endpoint is available to administrators of the organization only.
|
|
922
|
+
*
|
|
923
|
+
*/
|
|
924
|
+
export const createTokenMutation = (options) => {
|
|
925
|
+
const mutationOptions = {
|
|
926
|
+
mutationFn: async (fnOptions) => {
|
|
927
|
+
const { data } = await TokensService.createToken({
|
|
928
|
+
...options,
|
|
929
|
+
...fnOptions,
|
|
930
|
+
throwOnError: true
|
|
931
|
+
});
|
|
932
|
+
return data;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
return mutationOptions;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* Permanently delete access token.
|
|
939
|
+
*
|
|
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.
|
|
941
|
+
*
|
|
942
|
+
*/
|
|
943
|
+
export const deleteTokenMutation = (options) => {
|
|
944
|
+
const mutationOptions = {
|
|
945
|
+
mutationFn: async (fnOptions) => {
|
|
946
|
+
const { data } = await TokensService.deleteToken({
|
|
947
|
+
...options,
|
|
948
|
+
...fnOptions,
|
|
949
|
+
throwOnError: true
|
|
950
|
+
});
|
|
951
|
+
return data;
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
return mutationOptions;
|
|
955
|
+
};
|
|
956
|
+
export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
|
|
957
|
+
/**
|
|
958
|
+
* Get access token information.
|
|
959
|
+
*
|
|
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.
|
|
961
|
+
*
|
|
962
|
+
*/
|
|
963
|
+
export const getTokenOptions = (options) => queryOptions({
|
|
964
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
965
|
+
const { data } = await TokensService.getToken({
|
|
966
|
+
...options,
|
|
967
|
+
...queryKey[0],
|
|
968
|
+
signal,
|
|
969
|
+
throwOnError: true
|
|
970
|
+
});
|
|
971
|
+
return data;
|
|
972
|
+
},
|
|
973
|
+
queryKey: getTokenQueryKey(options)
|
|
974
|
+
});
|
|
975
|
+
/**
|
|
976
|
+
* Update access token information.
|
|
977
|
+
*
|
|
978
|
+
* This endpoint allows you to update access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
|
|
979
|
+
*
|
|
980
|
+
* This endpoint is available to administrators of the organization only.
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
export const updateTokenMutation = (options) => {
|
|
984
|
+
const mutationOptions = {
|
|
985
|
+
mutationFn: async (fnOptions) => {
|
|
986
|
+
const { data } = await TokensService.updateToken({
|
|
987
|
+
...options,
|
|
988
|
+
...fnOptions,
|
|
989
|
+
throwOnError: true
|
|
990
|
+
});
|
|
991
|
+
return data;
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
return mutationOptions;
|
|
995
|
+
};
|
|
996
|
+
/**
|
|
997
|
+
* Regenerate access token secret key.
|
|
998
|
+
*
|
|
999
|
+
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
1000
|
+
*/
|
|
1001
|
+
export const regenerateTokenMutation = (options) => {
|
|
1002
|
+
const mutationOptions = {
|
|
1003
|
+
mutationFn: async (fnOptions) => {
|
|
1004
|
+
const { data } = await TokensService.regenerateToken({
|
|
1005
|
+
...options,
|
|
1006
|
+
...fnOptions,
|
|
1007
|
+
throwOnError: true
|
|
1008
|
+
});
|
|
1009
|
+
return data;
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
return mutationOptions;
|
|
1013
|
+
};
|
|
1014
|
+
export const listUserOrganizationsQueryKey = (options) => createQueryKey('listUserOrganizations', options);
|
|
1015
|
+
/**
|
|
1016
|
+
* Get a list of organizations the user belongs to. Used during authentication process.
|
|
1017
|
+
*/
|
|
1018
|
+
export const listUserOrganizationsOptions = (options) => queryOptions({
|
|
1019
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1020
|
+
const { data } = await UsersService.listUserOrganizations({
|
|
1021
|
+
...options,
|
|
1022
|
+
...queryKey[0],
|
|
1023
|
+
signal,
|
|
1024
|
+
throwOnError: true
|
|
1025
|
+
});
|
|
1026
|
+
return data;
|
|
1027
|
+
},
|
|
1028
|
+
queryKey: listUserOrganizationsQueryKey(options)
|
|
1029
|
+
});
|
|
1030
|
+
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
1031
|
+
/**
|
|
1032
|
+
* List users in organization.
|
|
1033
|
+
*
|
|
1034
|
+
* Returns a list of user details and their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
|
|
1035
|
+
*
|
|
1036
|
+
* This endpoint is available to all users in the organization.
|
|
1037
|
+
*
|
|
1038
|
+
*/
|
|
1039
|
+
export const listUsersOptions = (options) => queryOptions({
|
|
1040
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1041
|
+
const { data } = await UsersService.listUsers({
|
|
1042
|
+
...options,
|
|
1043
|
+
...queryKey[0],
|
|
1044
|
+
signal,
|
|
1045
|
+
throwOnError: true
|
|
1046
|
+
});
|
|
1047
|
+
return data;
|
|
1048
|
+
},
|
|
1049
|
+
queryKey: listUsersQueryKey(options)
|
|
1050
|
+
});
|
|
1051
|
+
/**
|
|
1052
|
+
* Create a new user.
|
|
1053
|
+
*
|
|
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.
|
|
1055
|
+
*
|
|
1056
|
+
*/
|
|
1057
|
+
export const createUserMutation = (options) => {
|
|
1058
|
+
const mutationOptions = {
|
|
1059
|
+
mutationFn: async (fnOptions) => {
|
|
1060
|
+
const { data } = await UsersService.createUser({
|
|
1061
|
+
...options,
|
|
1062
|
+
...fnOptions,
|
|
1063
|
+
throwOnError: true
|
|
1064
|
+
});
|
|
1065
|
+
return data;
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
return mutationOptions;
|
|
1069
|
+
};
|
|
1070
|
+
/**
|
|
1071
|
+
* Delete user by id.
|
|
1072
|
+
*
|
|
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.
|
|
1074
|
+
*
|
|
1075
|
+
*/
|
|
1076
|
+
export const deleteUserMutation = (options) => {
|
|
1077
|
+
const mutationOptions = {
|
|
1078
|
+
mutationFn: async (fnOptions) => {
|
|
1079
|
+
const { data } = await UsersService.deleteUser({
|
|
1080
|
+
...options,
|
|
1081
|
+
...fnOptions,
|
|
1082
|
+
throwOnError: true
|
|
1083
|
+
});
|
|
1084
|
+
return data;
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
return mutationOptions;
|
|
1088
|
+
};
|
|
1089
|
+
export const getUserQueryKey = (options) => createQueryKey('getUser', options);
|
|
1090
|
+
/**
|
|
1091
|
+
* Get user profile information by id.
|
|
1092
|
+
*
|
|
1093
|
+
* Returns user details including their roles. For more information on identity access management, see [Users](https://cloudfleet.ai/docs/organization/users/) section of documentaiton.
|
|
1094
|
+
*
|
|
1095
|
+
* This endpoint is available to all users in the organization.
|
|
1096
|
+
*
|
|
1097
|
+
*/
|
|
1098
|
+
export const getUserOptions = (options) => queryOptions({
|
|
1099
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1100
|
+
const { data } = await UsersService.getUser({
|
|
1101
|
+
...options,
|
|
1102
|
+
...queryKey[0],
|
|
1103
|
+
signal,
|
|
1104
|
+
throwOnError: true
|
|
1105
|
+
});
|
|
1106
|
+
return data;
|
|
1107
|
+
},
|
|
1108
|
+
queryKey: getUserQueryKey(options)
|
|
1109
|
+
});
|
|
1110
|
+
/**
|
|
1111
|
+
* Update user profile information.
|
|
1112
|
+
*
|
|
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.
|
|
1114
|
+
*
|
|
1115
|
+
*/
|
|
1116
|
+
export const updateUserMutation = (options) => {
|
|
1117
|
+
const mutationOptions = {
|
|
1118
|
+
mutationFn: async (fnOptions) => {
|
|
1119
|
+
const { data } = await UsersService.updateUser({
|
|
1120
|
+
...options,
|
|
1121
|
+
...fnOptions,
|
|
1122
|
+
throwOnError: true
|
|
1123
|
+
});
|
|
1124
|
+
return data;
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
return mutationOptions;
|
|
1128
|
+
};
|
|
1129
|
+
//# sourceMappingURL=react-query.gen.js.map
|