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