@cloudfleet/sdk 0.0.1-4a07f21 → 0.0.1-4b464e3
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 +497 -599
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/@tanstack/react-query.gen.js +472 -405
- 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 +672 -252
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +1559 -357
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +247 -216
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +352 -308
- package/dist/sdk.gen.js.map +1 -1
- package/dist/types.gen.d.ts +1204 -828
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +3351 -1443
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +1204 -360
- package/dist/zod.gen.js.map +1 -1
- package/package.json +10 -13
|
@@ -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`, 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,18 @@ 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.
|
|
372
|
-
*
|
|
373
|
-
* Setting status to `deleted` will permanently delete fleet. This operation cannot be undone. Your subscription will end by the end of the current billing period and you will not be able to receive credit for unused time. If you want to keep using the Fleet until the end of the billing period, set the status to `cancelling`.
|
|
374
|
-
*
|
|
375
|
-
* For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
333
|
+
* Append a customer reply to a ticket.
|
|
376
334
|
*
|
|
377
|
-
*
|
|
335
|
+
* Multipart form-data with a JSON-encoded `payload` field carrying `body`, plus up to 3 `attachments` files. Returns 409 if the ticket is closed.
|
|
378
336
|
*
|
|
379
337
|
*/
|
|
380
|
-
export const
|
|
338
|
+
export const replyTicketMutation = (options) => {
|
|
381
339
|
const mutationOptions = {
|
|
382
340
|
mutationFn: async (fnOptions) => {
|
|
383
|
-
const { data } = await
|
|
341
|
+
const { data } = await TicketsService.replyTicket({
|
|
384
342
|
...options,
|
|
385
343
|
...fnOptions,
|
|
386
344
|
throwOnError: true
|
|
@@ -390,15 +348,13 @@ export const updateFleetMutation = (options) => {
|
|
|
390
348
|
};
|
|
391
349
|
return mutationOptions;
|
|
392
350
|
};
|
|
393
|
-
export const
|
|
351
|
+
export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
|
|
394
352
|
/**
|
|
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.
|
|
353
|
+
* Download a ticket attachment.
|
|
398
354
|
*/
|
|
399
|
-
export const
|
|
355
|
+
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
400
356
|
queryFn: async ({ queryKey, signal }) => {
|
|
401
|
-
const { data } = await
|
|
357
|
+
const { data } = await TicketsService.getTicketAttachment({
|
|
402
358
|
...options,
|
|
403
359
|
...queryKey[0],
|
|
404
360
|
signal,
|
|
@@ -406,20 +362,18 @@ export const queryClusterOptions = (options) => queryOptions({
|
|
|
406
362
|
});
|
|
407
363
|
return data;
|
|
408
364
|
},
|
|
409
|
-
queryKey:
|
|
365
|
+
queryKey: getTicketAttachmentQueryKey(options)
|
|
410
366
|
});
|
|
411
|
-
export const
|
|
367
|
+
export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
|
|
412
368
|
/**
|
|
413
|
-
* List
|
|
414
|
-
*
|
|
415
|
-
* Returns a list of clusters under the current organization, including quota. Quota is a set of filters defined by the admin of the organization that will be applied to all resources created in the cluster. Quota information returned here does not take into account quota set on organization or platform level. For calculated quota applied to this account, use /clusters/{cluster_id}/quota endpoint. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
369
|
+
* List repositories
|
|
416
370
|
*
|
|
417
|
-
* This endpoint is available to all users in the organization.
|
|
371
|
+
* Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
|
|
418
372
|
*
|
|
419
373
|
*/
|
|
420
|
-
export const
|
|
374
|
+
export const listRepositoriesOptions = (options) => queryOptions({
|
|
421
375
|
queryFn: async ({ queryKey, signal }) => {
|
|
422
|
-
const { data } = await
|
|
376
|
+
const { data } = await RegistryService.listRepositories({
|
|
423
377
|
...options,
|
|
424
378
|
...queryKey[0],
|
|
425
379
|
signal,
|
|
@@ -427,41 +381,37 @@ export const listClustersOptions = (options) => queryOptions({
|
|
|
427
381
|
});
|
|
428
382
|
return data;
|
|
429
383
|
},
|
|
430
|
-
queryKey:
|
|
384
|
+
queryKey: listRepositoriesQueryKey(options)
|
|
431
385
|
});
|
|
386
|
+
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
432
387
|
/**
|
|
433
|
-
*
|
|
388
|
+
* List tags for a repository
|
|
434
389
|
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* This endpoint is available to administrators of the organization only.
|
|
390
|
+
* Returns a list of tags for a specific repository, including size and metadata for each tag. This endpoint is available to all users in the organization.
|
|
438
391
|
*
|
|
439
392
|
*/
|
|
440
|
-
export const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
};
|
|
393
|
+
export const listTagsOptions = (options) => queryOptions({
|
|
394
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
395
|
+
const { data } = await RegistryService.listTags({
|
|
396
|
+
...options,
|
|
397
|
+
...queryKey[0],
|
|
398
|
+
signal,
|
|
399
|
+
throwOnError: true
|
|
400
|
+
});
|
|
401
|
+
return data;
|
|
402
|
+
},
|
|
403
|
+
queryKey: listTagsQueryKey(options)
|
|
404
|
+
});
|
|
453
405
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
406
|
+
* Delete tag
|
|
457
407
|
*
|
|
458
|
-
* This endpoint is available to administrators of the organization only.
|
|
408
|
+
* Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
|
|
459
409
|
*
|
|
460
410
|
*/
|
|
461
|
-
export const
|
|
411
|
+
export const deleteTagMutation = (options) => {
|
|
462
412
|
const mutationOptions = {
|
|
463
413
|
mutationFn: async (fnOptions) => {
|
|
464
|
-
const { data } = await
|
|
414
|
+
const { data } = await RegistryService.deleteTag({
|
|
465
415
|
...options,
|
|
466
416
|
...fnOptions,
|
|
467
417
|
throwOnError: true
|
|
@@ -471,18 +421,16 @@ export const deleteClusterMutation = (options) => {
|
|
|
471
421
|
};
|
|
472
422
|
return mutationOptions;
|
|
473
423
|
};
|
|
474
|
-
export const
|
|
424
|
+
export const getTagQueryKey = (options) => createQueryKey('getTag', options);
|
|
475
425
|
/**
|
|
476
|
-
* Get
|
|
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.
|
|
426
|
+
* Get tag details
|
|
479
427
|
*
|
|
480
|
-
* This endpoint is available to all users in the organization.
|
|
428
|
+
* Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
|
|
481
429
|
*
|
|
482
430
|
*/
|
|
483
|
-
export const
|
|
431
|
+
export const getTagOptions = (options) => queryOptions({
|
|
484
432
|
queryFn: async ({ queryKey, signal }) => {
|
|
485
|
-
const { data } = await
|
|
433
|
+
const { data } = await RegistryService.getTag({
|
|
486
434
|
...options,
|
|
487
435
|
...queryKey[0],
|
|
488
436
|
signal,
|
|
@@ -490,39 +438,20 @@ export const getClusterOptions = (options) => queryOptions({
|
|
|
490
438
|
});
|
|
491
439
|
return data;
|
|
492
440
|
},
|
|
493
|
-
queryKey:
|
|
441
|
+
queryKey: getTagQueryKey(options)
|
|
494
442
|
});
|
|
443
|
+
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
495
444
|
/**
|
|
496
|
-
*
|
|
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.
|
|
445
|
+
* Get organization information.
|
|
501
446
|
*
|
|
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
|
-
export const getClusterCaQueryKey = (options) => createQueryKey('getClusterCa', options);
|
|
517
|
-
/**
|
|
518
|
-
* Get the cluster's certificate authority in PEM format.
|
|
447
|
+
* Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
519
448
|
*
|
|
520
|
-
*
|
|
449
|
+
* This endpoint is available to all users in the organization.
|
|
521
450
|
*
|
|
522
451
|
*/
|
|
523
|
-
export const
|
|
452
|
+
export const getOrganizationOptions = (options) => queryOptions({
|
|
524
453
|
queryFn: async ({ queryKey, signal }) => {
|
|
525
|
-
const { data } = await
|
|
454
|
+
const { data } = await OrganizationService.getOrganization({
|
|
526
455
|
...options,
|
|
527
456
|
...queryKey[0],
|
|
528
457
|
signal,
|
|
@@ -530,18 +459,18 @@ export const getClusterCaOptions = (options) => queryOptions({
|
|
|
530
459
|
});
|
|
531
460
|
return data;
|
|
532
461
|
},
|
|
533
|
-
queryKey:
|
|
462
|
+
queryKey: getOrganizationQueryKey(options)
|
|
534
463
|
});
|
|
535
464
|
/**
|
|
536
|
-
*
|
|
465
|
+
* Create a new organization / Cloudfleet account signup.
|
|
537
466
|
*
|
|
538
|
-
*
|
|
467
|
+
* This endpoint allows you to create a new Cloudfleet organization and an administrator user.
|
|
539
468
|
*
|
|
540
469
|
*/
|
|
541
|
-
export const
|
|
470
|
+
export const createOrganizationMutation = (options) => {
|
|
542
471
|
const mutationOptions = {
|
|
543
472
|
mutationFn: async (fnOptions) => {
|
|
544
|
-
const { data } = await
|
|
473
|
+
const { data } = await OrganizationService.createOrganization({
|
|
545
474
|
...options,
|
|
546
475
|
...fnOptions,
|
|
547
476
|
throwOnError: true
|
|
@@ -551,16 +480,18 @@ export const getJoinInformationMutation = (options) => {
|
|
|
551
480
|
};
|
|
552
481
|
return mutationOptions;
|
|
553
482
|
};
|
|
554
|
-
export const
|
|
483
|
+
export const getBasicPriceConsentQueryKey = (options) => createQueryKey('getBasicPriceConsent', options);
|
|
555
484
|
/**
|
|
556
|
-
*
|
|
485
|
+
* Get the organization's consent status for the new Basic price.
|
|
557
486
|
*
|
|
558
|
-
* Returns
|
|
487
|
+
* Returns the organization's consent status for the migration from the free tier to the paid Basic plan. `pending` means an administrator must opt in; `not_applicable` means the organization is not in scope for the migration; `accepted` / `rejected` reflect a recorded decision.
|
|
488
|
+
*
|
|
489
|
+
* This endpoint is available to all users in the organization and drives the consent dialog in the console.
|
|
559
490
|
*
|
|
560
491
|
*/
|
|
561
|
-
export const
|
|
492
|
+
export const getBasicPriceConsentOptions = (options) => queryOptions({
|
|
562
493
|
queryFn: async ({ queryKey, signal }) => {
|
|
563
|
-
const { data } = await
|
|
494
|
+
const { data } = await OrganizationService.getBasicPriceConsent({
|
|
564
495
|
...options,
|
|
565
496
|
...queryKey[0],
|
|
566
497
|
signal,
|
|
@@ -568,18 +499,18 @@ export const listInvitesOptions = (options) => queryOptions({
|
|
|
568
499
|
});
|
|
569
500
|
return data;
|
|
570
501
|
},
|
|
571
|
-
queryKey:
|
|
502
|
+
queryKey: getBasicPriceConsentQueryKey(options)
|
|
572
503
|
});
|
|
573
504
|
/**
|
|
574
|
-
*
|
|
505
|
+
* Record an administrator's decision on the new Basic price.
|
|
575
506
|
*
|
|
576
|
-
*
|
|
507
|
+
* Records an affirmative decision to continue on the paid Basic plan (`accepted`) or to opt out (`rejected`). This is an organization-binding financial decision, so it is restricted to administrators. Each call appends an immutable audit entry (who and when) and sends a confirmation email to the acting administrator.
|
|
577
508
|
*
|
|
578
509
|
*/
|
|
579
|
-
export const
|
|
510
|
+
export const setBasicPriceConsentMutation = (options) => {
|
|
580
511
|
const mutationOptions = {
|
|
581
512
|
mutationFn: async (fnOptions) => {
|
|
582
|
-
const { data } = await
|
|
513
|
+
const { data } = await OrganizationService.setBasicPriceConsent({
|
|
583
514
|
...options,
|
|
584
515
|
...fnOptions,
|
|
585
516
|
throwOnError: true
|
|
@@ -589,35 +520,15 @@ export const createInviteMutation = (options) => {
|
|
|
589
520
|
};
|
|
590
521
|
return mutationOptions;
|
|
591
522
|
};
|
|
592
|
-
export const getInviteQueryKey = (options) => createQueryKey('getInvite', options);
|
|
593
|
-
/**
|
|
594
|
-
* Get invite information.
|
|
595
|
-
*
|
|
596
|
-
* Returns invite details.
|
|
597
|
-
*
|
|
598
|
-
*/
|
|
599
|
-
export const getInviteOptions = (options) => queryOptions({
|
|
600
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
601
|
-
const { data } = await InvitesService.getInvite({
|
|
602
|
-
...options,
|
|
603
|
-
...queryKey[0],
|
|
604
|
-
signal,
|
|
605
|
-
throwOnError: true
|
|
606
|
-
});
|
|
607
|
-
return data;
|
|
608
|
-
},
|
|
609
|
-
queryKey: getInviteQueryKey(options)
|
|
610
|
-
});
|
|
611
523
|
/**
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
* Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
|
|
524
|
+
* MCP endpoint
|
|
615
525
|
*
|
|
526
|
+
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
616
527
|
*/
|
|
617
|
-
export const
|
|
528
|
+
export const postMcpMutation = (options) => {
|
|
618
529
|
const mutationOptions = {
|
|
619
530
|
mutationFn: async (fnOptions) => {
|
|
620
|
-
const { data } = await
|
|
531
|
+
const { data } = await McpService.postMcp({
|
|
621
532
|
...options,
|
|
622
533
|
...fnOptions,
|
|
623
534
|
throwOnError: true
|
|
@@ -671,36 +582,16 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
|
671
582
|
},
|
|
672
583
|
queryKey: getMarketplaceChartFilesQueryKey(options)
|
|
673
584
|
});
|
|
585
|
+
export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
|
|
674
586
|
/**
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
678
|
-
*/
|
|
679
|
-
export const postMcpMutation = (options) => {
|
|
680
|
-
const mutationOptions = {
|
|
681
|
-
mutationFn: async (fnOptions) => {
|
|
682
|
-
const { data } = await McpService.postMcp({
|
|
683
|
-
...options,
|
|
684
|
-
...fnOptions,
|
|
685
|
-
throwOnError: true
|
|
686
|
-
});
|
|
687
|
-
return data;
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
return mutationOptions;
|
|
691
|
-
};
|
|
692
|
-
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
693
|
-
/**
|
|
694
|
-
* Get organization information.
|
|
695
|
-
*
|
|
696
|
-
* Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
587
|
+
* List invites.
|
|
697
588
|
*
|
|
698
|
-
* This endpoint is available to
|
|
589
|
+
* Returns a list of pending (non-expired) invites under the current organization. This endpoint is available to administrators of the organization only.
|
|
699
590
|
*
|
|
700
591
|
*/
|
|
701
|
-
export const
|
|
592
|
+
export const listInvitesOptions = (options) => queryOptions({
|
|
702
593
|
queryFn: async ({ queryKey, signal }) => {
|
|
703
|
-
const { data } = await
|
|
594
|
+
const { data } = await InvitesService.listInvites({
|
|
704
595
|
...options,
|
|
705
596
|
...queryKey[0],
|
|
706
597
|
signal,
|
|
@@ -708,18 +599,18 @@ export const getOrganizationOptions = (options) => queryOptions({
|
|
|
708
599
|
});
|
|
709
600
|
return data;
|
|
710
601
|
},
|
|
711
|
-
queryKey:
|
|
602
|
+
queryKey: listInvitesQueryKey(options)
|
|
712
603
|
});
|
|
713
604
|
/**
|
|
714
|
-
* Create a new
|
|
605
|
+
* Create a new invite.
|
|
715
606
|
*
|
|
716
|
-
*
|
|
607
|
+
* Invite a new user to your Cloudfleet organization. The user will receive an email with a link to create a new account. This endpoint is available to administrators of the organization only.
|
|
717
608
|
*
|
|
718
609
|
*/
|
|
719
|
-
export const
|
|
610
|
+
export const createInviteMutation = (options) => {
|
|
720
611
|
const mutationOptions = {
|
|
721
612
|
mutationFn: async (fnOptions) => {
|
|
722
|
-
const { data } = await
|
|
613
|
+
const { data } = await InvitesService.createInvite({
|
|
723
614
|
...options,
|
|
724
615
|
...fnOptions,
|
|
725
616
|
throwOnError: true
|
|
@@ -729,35 +620,16 @@ export const createOrganizationMutation = (options) => {
|
|
|
729
620
|
};
|
|
730
621
|
return mutationOptions;
|
|
731
622
|
};
|
|
732
|
-
export const
|
|
733
|
-
/**
|
|
734
|
-
* List repositories
|
|
735
|
-
*
|
|
736
|
-
* Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
|
|
737
|
-
*
|
|
738
|
-
*/
|
|
739
|
-
export const listRepositoriesOptions = (options) => queryOptions({
|
|
740
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
741
|
-
const { data } = await RegistryService.listRepositories({
|
|
742
|
-
...options,
|
|
743
|
-
...queryKey[0],
|
|
744
|
-
signal,
|
|
745
|
-
throwOnError: true
|
|
746
|
-
});
|
|
747
|
-
return data;
|
|
748
|
-
},
|
|
749
|
-
queryKey: listRepositoriesQueryKey(options)
|
|
750
|
-
});
|
|
751
|
-
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
623
|
+
export const getInviteQueryKey = (options) => createQueryKey('getInvite', options);
|
|
752
624
|
/**
|
|
753
|
-
*
|
|
625
|
+
* Get invite information.
|
|
754
626
|
*
|
|
755
|
-
*
|
|
627
|
+
* 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.
|
|
756
628
|
*
|
|
757
629
|
*/
|
|
758
|
-
export const
|
|
630
|
+
export const getInviteOptions = (options) => queryOptions({
|
|
759
631
|
queryFn: async ({ queryKey, signal }) => {
|
|
760
|
-
const { data } = await
|
|
632
|
+
const { data } = await InvitesService.getInvite({
|
|
761
633
|
...options,
|
|
762
634
|
...queryKey[0],
|
|
763
635
|
signal,
|
|
@@ -765,18 +637,18 @@ export const listTagsOptions = (options) => queryOptions({
|
|
|
765
637
|
});
|
|
766
638
|
return data;
|
|
767
639
|
},
|
|
768
|
-
queryKey:
|
|
640
|
+
queryKey: getInviteQueryKey(options)
|
|
769
641
|
});
|
|
770
642
|
/**
|
|
771
|
-
*
|
|
643
|
+
* Permanently delete invite.
|
|
772
644
|
*
|
|
773
|
-
* Permanently deletes
|
|
645
|
+
* Permanently deletes invite from the organization. This endpoint is available to administrators of the organization only.
|
|
774
646
|
*
|
|
775
647
|
*/
|
|
776
|
-
export const
|
|
648
|
+
export const deleteInviteMutation = (options) => {
|
|
777
649
|
const mutationOptions = {
|
|
778
650
|
mutationFn: async (fnOptions) => {
|
|
779
|
-
const { data } = await
|
|
651
|
+
const { data } = await InvitesService.deleteInvite({
|
|
780
652
|
...options,
|
|
781
653
|
...fnOptions,
|
|
782
654
|
throwOnError: true
|
|
@@ -786,16 +658,15 @@ export const deleteTagMutation = (options) => {
|
|
|
786
658
|
};
|
|
787
659
|
return mutationOptions;
|
|
788
660
|
};
|
|
789
|
-
export const
|
|
661
|
+
export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
|
|
790
662
|
/**
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
* Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
|
|
663
|
+
* Query Kubernetes cluster API
|
|
794
664
|
*
|
|
665
|
+
* An API endpoint for directly querying a Kubernetes cluster API without requiring kubectl or other tools. This endpoint is ideal for automation and scripting, as well as for internal use in fetching data for the Cloudfleet Console. It acts as a passthrough to the Kubernetes API, allowing access to any valid Kubernetes API endpoint, including those not exposed in the Cloudfleet Console. The endpoint is strictly read-only, ensuring no modifications to the cluster state. It is accessible to all users within the organization and uses the same authentication mechanisms as other Cloudfleet API endpoints.
|
|
795
666
|
*/
|
|
796
|
-
export const
|
|
667
|
+
export const queryClusterOptions = (options) => queryOptions({
|
|
797
668
|
queryFn: async ({ queryKey, signal }) => {
|
|
798
|
-
const { data } = await
|
|
669
|
+
const { data } = await ClustersService.queryCluster({
|
|
799
670
|
...options,
|
|
800
671
|
...queryKey[0],
|
|
801
672
|
signal,
|
|
@@ -803,18 +674,20 @@ export const getTagOptions = (options) => queryOptions({
|
|
|
803
674
|
});
|
|
804
675
|
return data;
|
|
805
676
|
},
|
|
806
|
-
queryKey:
|
|
677
|
+
queryKey: queryClusterQueryKey(options)
|
|
807
678
|
});
|
|
808
|
-
export const
|
|
679
|
+
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
809
680
|
/**
|
|
810
|
-
* List
|
|
681
|
+
* List fleets.
|
|
811
682
|
*
|
|
812
|
-
* Returns
|
|
683
|
+
* Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
684
|
+
*
|
|
685
|
+
* This endpoint is available to all users in the organization.
|
|
813
686
|
*
|
|
814
687
|
*/
|
|
815
|
-
export const
|
|
688
|
+
export const listFleetsOptions = (options) => queryOptions({
|
|
816
689
|
queryFn: async ({ queryKey, signal }) => {
|
|
817
|
-
const { data } = await
|
|
690
|
+
const { data } = await ClustersService.listFleets({
|
|
818
691
|
...options,
|
|
819
692
|
...queryKey[0],
|
|
820
693
|
signal,
|
|
@@ -822,18 +695,22 @@ export const listTicketsOptions = (options) => queryOptions({
|
|
|
822
695
|
});
|
|
823
696
|
return data;
|
|
824
697
|
},
|
|
825
|
-
queryKey:
|
|
698
|
+
queryKey: listFleetsQueryKey(options)
|
|
826
699
|
});
|
|
827
700
|
/**
|
|
828
|
-
* Create a new
|
|
701
|
+
* Create a new fleet.
|
|
829
702
|
*
|
|
830
|
-
*
|
|
703
|
+
* 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.
|
|
704
|
+
*
|
|
705
|
+
* The cluster must be ready (status `deployed`) before a fleet can be added. Adding a fleet while the cluster is still provisioning returns `409`.
|
|
706
|
+
*
|
|
707
|
+
* This endpoint is available to administrators of the organization only.
|
|
831
708
|
*
|
|
832
709
|
*/
|
|
833
|
-
export const
|
|
710
|
+
export const createFleetMutation = (options) => {
|
|
834
711
|
const mutationOptions = {
|
|
835
712
|
mutationFn: async (fnOptions) => {
|
|
836
|
-
const { data } = await
|
|
713
|
+
const { data } = await ClustersService.createFleet({
|
|
837
714
|
...options,
|
|
838
715
|
...fnOptions,
|
|
839
716
|
throwOnError: true
|
|
@@ -844,15 +721,19 @@ export const createTicketMutation = (options) => {
|
|
|
844
721
|
return mutationOptions;
|
|
845
722
|
};
|
|
846
723
|
/**
|
|
847
|
-
*
|
|
724
|
+
* Permanently delete fleet.
|
|
848
725
|
*
|
|
849
|
-
*
|
|
726
|
+
* 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.
|
|
727
|
+
*
|
|
728
|
+
* 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.
|
|
729
|
+
*
|
|
730
|
+
* This endpoint is available to administrators of the organization only.
|
|
850
731
|
*
|
|
851
732
|
*/
|
|
852
|
-
export const
|
|
733
|
+
export const deleteFleetMutation = (options) => {
|
|
853
734
|
const mutationOptions = {
|
|
854
735
|
mutationFn: async (fnOptions) => {
|
|
855
|
-
const { data } = await
|
|
736
|
+
const { data } = await ClustersService.deleteFleet({
|
|
856
737
|
...options,
|
|
857
738
|
...fnOptions,
|
|
858
739
|
throwOnError: true
|
|
@@ -862,32 +743,43 @@ export const closeTicketMutation = (options) => {
|
|
|
862
743
|
};
|
|
863
744
|
return mutationOptions;
|
|
864
745
|
};
|
|
865
|
-
export const
|
|
746
|
+
export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
|
|
866
747
|
/**
|
|
867
|
-
* Get
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
748
|
+
* Get fleet information.
|
|
749
|
+
*
|
|
750
|
+
* Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
751
|
+
*
|
|
752
|
+
* This endpoint is available to all users in the organization.
|
|
753
|
+
*
|
|
754
|
+
*/
|
|
755
|
+
export const getFleetOptions = (options) => queryOptions({
|
|
756
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
757
|
+
const { data } = await ClustersService.getFleet({
|
|
758
|
+
...options,
|
|
873
759
|
...queryKey[0],
|
|
874
760
|
signal,
|
|
875
761
|
throwOnError: true
|
|
876
762
|
});
|
|
877
763
|
return data;
|
|
878
764
|
},
|
|
879
|
-
queryKey:
|
|
765
|
+
queryKey: getFleetQueryKey(options)
|
|
880
766
|
});
|
|
881
767
|
/**
|
|
882
|
-
*
|
|
768
|
+
* Update fleet information.
|
|
883
769
|
*
|
|
884
|
-
*
|
|
770
|
+
* This endpoint allows you to update fleet details.
|
|
771
|
+
*
|
|
772
|
+
* For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
773
|
+
*
|
|
774
|
+
* 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).
|
|
775
|
+
*
|
|
776
|
+
* This endpoint is available to administrators of the organization only.
|
|
885
777
|
*
|
|
886
778
|
*/
|
|
887
|
-
export const
|
|
779
|
+
export const updateFleetMutation = (options) => {
|
|
888
780
|
const mutationOptions = {
|
|
889
781
|
mutationFn: async (fnOptions) => {
|
|
890
|
-
const { data } = await
|
|
782
|
+
const { data } = await ClustersService.updateFleet({
|
|
891
783
|
...options,
|
|
892
784
|
...fnOptions,
|
|
893
785
|
throwOnError: true
|
|
@@ -897,13 +789,18 @@ export const replyTicketMutation = (options) => {
|
|
|
897
789
|
};
|
|
898
790
|
return mutationOptions;
|
|
899
791
|
};
|
|
900
|
-
export const
|
|
792
|
+
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
901
793
|
/**
|
|
902
|
-
*
|
|
794
|
+
* List charts.
|
|
795
|
+
*
|
|
796
|
+
* Returns a list of charts in the cluster.
|
|
797
|
+
*
|
|
798
|
+
* This endpoint is available to all users in the organization.
|
|
799
|
+
*
|
|
903
800
|
*/
|
|
904
|
-
export const
|
|
801
|
+
export const listChartsOptions = (options) => queryOptions({
|
|
905
802
|
queryFn: async ({ queryKey, signal }) => {
|
|
906
|
-
const { data } = await
|
|
803
|
+
const { data } = await ClustersService.listCharts({
|
|
907
804
|
...options,
|
|
908
805
|
...queryKey[0],
|
|
909
806
|
signal,
|
|
@@ -911,18 +808,62 @@ export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
|
911
808
|
});
|
|
912
809
|
return data;
|
|
913
810
|
},
|
|
914
|
-
queryKey:
|
|
811
|
+
queryKey: listChartsQueryKey(options)
|
|
915
812
|
});
|
|
916
|
-
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
917
813
|
/**
|
|
918
|
-
*
|
|
814
|
+
* Create a new chart.
|
|
919
815
|
*
|
|
920
|
-
*
|
|
816
|
+
* Create a new chart deployment.
|
|
817
|
+
*
|
|
818
|
+
* This endpoint is available to administrators of the organization only.
|
|
921
819
|
*
|
|
922
820
|
*/
|
|
923
|
-
export const
|
|
821
|
+
export const createChartMutation = (options) => {
|
|
822
|
+
const mutationOptions = {
|
|
823
|
+
mutationFn: async (fnOptions) => {
|
|
824
|
+
const { data } = await ClustersService.createChart({
|
|
825
|
+
...options,
|
|
826
|
+
...fnOptions,
|
|
827
|
+
throwOnError: true
|
|
828
|
+
});
|
|
829
|
+
return data;
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
return mutationOptions;
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* Permanently delete the chart deployment from the cluster.
|
|
836
|
+
*
|
|
837
|
+
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
838
|
+
*
|
|
839
|
+
* This endpoint is available to administrators of the organization only.
|
|
840
|
+
*
|
|
841
|
+
*/
|
|
842
|
+
export const deleteChartMutation = (options) => {
|
|
843
|
+
const mutationOptions = {
|
|
844
|
+
mutationFn: async (fnOptions) => {
|
|
845
|
+
const { data } = await ClustersService.deleteChart({
|
|
846
|
+
...options,
|
|
847
|
+
...fnOptions,
|
|
848
|
+
throwOnError: true
|
|
849
|
+
});
|
|
850
|
+
return data;
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
return mutationOptions;
|
|
854
|
+
};
|
|
855
|
+
export const getChartQueryKey = (options) => createQueryKey('getChart', options);
|
|
856
|
+
/**
|
|
857
|
+
* Get chart information.
|
|
858
|
+
*
|
|
859
|
+
* Returns the details of the chart deployment.
|
|
860
|
+
*
|
|
861
|
+
* This endpoint is available to all users in the organization.
|
|
862
|
+
*
|
|
863
|
+
*/
|
|
864
|
+
export const getChartOptions = (options) => queryOptions({
|
|
924
865
|
queryFn: async ({ queryKey, signal }) => {
|
|
925
|
-
const { data } = await
|
|
866
|
+
const { data } = await ClustersService.getChart({
|
|
926
867
|
...options,
|
|
927
868
|
...queryKey[0],
|
|
928
869
|
signal,
|
|
@@ -930,20 +871,20 @@ export const listTokensOptions = (options) => queryOptions({
|
|
|
930
871
|
});
|
|
931
872
|
return data;
|
|
932
873
|
},
|
|
933
|
-
queryKey:
|
|
874
|
+
queryKey: getChartQueryKey(options)
|
|
934
875
|
});
|
|
935
876
|
/**
|
|
936
|
-
*
|
|
877
|
+
* Update chart information.
|
|
937
878
|
*
|
|
938
|
-
* This endpoint allows you to
|
|
879
|
+
* This endpoint allows you to update the values of a chart deployment.
|
|
939
880
|
*
|
|
940
881
|
* This endpoint is available to administrators of the organization only.
|
|
941
882
|
*
|
|
942
883
|
*/
|
|
943
|
-
export const
|
|
884
|
+
export const updateChartMutation = (options) => {
|
|
944
885
|
const mutationOptions = {
|
|
945
886
|
mutationFn: async (fnOptions) => {
|
|
946
|
-
const { data } = await
|
|
887
|
+
const { data } = await ClustersService.updateChart({
|
|
947
888
|
...options,
|
|
948
889
|
...fnOptions,
|
|
949
890
|
throwOnError: true
|
|
@@ -953,16 +894,39 @@ export const createTokenMutation = (options) => {
|
|
|
953
894
|
};
|
|
954
895
|
return mutationOptions;
|
|
955
896
|
};
|
|
897
|
+
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
956
898
|
/**
|
|
957
|
-
*
|
|
899
|
+
* List clusters.
|
|
958
900
|
*
|
|
959
|
-
*
|
|
901
|
+
* Returns a list of clusters under the current organization.
|
|
902
|
+
*
|
|
903
|
+
* This endpoint is available to all users in the organization.
|
|
960
904
|
*
|
|
961
905
|
*/
|
|
962
|
-
export const
|
|
906
|
+
export const listClustersOptions = (options) => queryOptions({
|
|
907
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
908
|
+
const { data } = await ClustersService.listClusters({
|
|
909
|
+
...options,
|
|
910
|
+
...queryKey[0],
|
|
911
|
+
signal,
|
|
912
|
+
throwOnError: true
|
|
913
|
+
});
|
|
914
|
+
return data;
|
|
915
|
+
},
|
|
916
|
+
queryKey: listClustersQueryKey(options)
|
|
917
|
+
});
|
|
918
|
+
/**
|
|
919
|
+
* Create a new cluster.
|
|
920
|
+
*
|
|
921
|
+
* 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.
|
|
922
|
+
*
|
|
923
|
+
* This endpoint is available to administrators of the organization only.
|
|
924
|
+
*
|
|
925
|
+
*/
|
|
926
|
+
export const createClusterMutation = (options) => {
|
|
963
927
|
const mutationOptions = {
|
|
964
928
|
mutationFn: async (fnOptions) => {
|
|
965
|
-
const { data } = await
|
|
929
|
+
const { data } = await ClustersService.createCluster({
|
|
966
930
|
...options,
|
|
967
931
|
...fnOptions,
|
|
968
932
|
throwOnError: true
|
|
@@ -972,16 +936,41 @@ export const deleteTokenMutation = (options) => {
|
|
|
972
936
|
};
|
|
973
937
|
return mutationOptions;
|
|
974
938
|
};
|
|
975
|
-
export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
|
|
976
939
|
/**
|
|
977
|
-
*
|
|
940
|
+
* Permanently delete cluster.
|
|
978
941
|
*
|
|
979
|
-
* This endpoint
|
|
942
|
+
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
943
|
+
*
|
|
944
|
+
* 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.
|
|
945
|
+
*
|
|
946
|
+
* This endpoint is available to administrators of the organization only.
|
|
980
947
|
*
|
|
981
948
|
*/
|
|
982
|
-
export const
|
|
949
|
+
export const deleteClusterMutation = (options) => {
|
|
950
|
+
const mutationOptions = {
|
|
951
|
+
mutationFn: async (fnOptions) => {
|
|
952
|
+
const { data } = await ClustersService.deleteCluster({
|
|
953
|
+
...options,
|
|
954
|
+
...fnOptions,
|
|
955
|
+
throwOnError: true
|
|
956
|
+
});
|
|
957
|
+
return data;
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
return mutationOptions;
|
|
961
|
+
};
|
|
962
|
+
export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
|
|
963
|
+
/**
|
|
964
|
+
* Get cluster information.
|
|
965
|
+
*
|
|
966
|
+
* Returns cluster details.
|
|
967
|
+
*
|
|
968
|
+
* This endpoint is available to all users in the organization.
|
|
969
|
+
*
|
|
970
|
+
*/
|
|
971
|
+
export const getClusterOptions = (options) => queryOptions({
|
|
983
972
|
queryFn: async ({ queryKey, signal }) => {
|
|
984
|
-
const { data } = await
|
|
973
|
+
const { data } = await ClustersService.getCluster({
|
|
985
974
|
...options,
|
|
986
975
|
...queryKey[0],
|
|
987
976
|
signal,
|
|
@@ -989,20 +978,22 @@ export const getTokenOptions = (options) => queryOptions({
|
|
|
989
978
|
});
|
|
990
979
|
return data;
|
|
991
980
|
},
|
|
992
|
-
queryKey:
|
|
981
|
+
queryKey: getClusterQueryKey(options)
|
|
993
982
|
});
|
|
994
983
|
/**
|
|
995
|
-
* Update
|
|
984
|
+
* Update cluster information.
|
|
996
985
|
*
|
|
997
|
-
* This endpoint allows you to update
|
|
986
|
+
* 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.
|
|
987
|
+
*
|
|
988
|
+
* This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged.
|
|
998
989
|
*
|
|
999
990
|
* This endpoint is available to administrators of the organization only.
|
|
1000
991
|
*
|
|
1001
992
|
*/
|
|
1002
|
-
export const
|
|
993
|
+
export const updateClusterMutation = (options) => {
|
|
1003
994
|
const mutationOptions = {
|
|
1004
995
|
mutationFn: async (fnOptions) => {
|
|
1005
|
-
const { data } = await
|
|
996
|
+
const { data } = await ClustersService.updateCluster({
|
|
1006
997
|
...options,
|
|
1007
998
|
...fnOptions,
|
|
1008
999
|
throwOnError: true
|
|
@@ -1013,14 +1004,15 @@ export const updateTokenMutation = (options) => {
|
|
|
1013
1004
|
return mutationOptions;
|
|
1014
1005
|
};
|
|
1015
1006
|
/**
|
|
1016
|
-
*
|
|
1007
|
+
* Node join information for the cluster
|
|
1008
|
+
*
|
|
1009
|
+
* 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.
|
|
1017
1010
|
*
|
|
1018
|
-
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
1019
1011
|
*/
|
|
1020
|
-
export const
|
|
1012
|
+
export const getJoinInformationMutation = (options) => {
|
|
1021
1013
|
const mutationOptions = {
|
|
1022
1014
|
mutationFn: async (fnOptions) => {
|
|
1023
|
-
const { data } = await
|
|
1015
|
+
const { data } = await ClustersService.getJoinInformation({
|
|
1024
1016
|
...options,
|
|
1025
1017
|
...fnOptions,
|
|
1026
1018
|
throwOnError: true
|
|
@@ -1030,13 +1022,16 @@ export const regenerateTokenMutation = (options) => {
|
|
|
1030
1022
|
};
|
|
1031
1023
|
return mutationOptions;
|
|
1032
1024
|
};
|
|
1033
|
-
export const
|
|
1025
|
+
export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
|
|
1034
1026
|
/**
|
|
1035
|
-
* Get
|
|
1027
|
+
* Get billing usage information.
|
|
1028
|
+
*
|
|
1029
|
+
* 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.
|
|
1030
|
+
*
|
|
1036
1031
|
*/
|
|
1037
|
-
export const
|
|
1032
|
+
export const getUsageOptions = (options) => queryOptions({
|
|
1038
1033
|
queryFn: async ({ queryKey, signal }) => {
|
|
1039
|
-
const { data } = await
|
|
1034
|
+
const { data } = await BillingService.getUsage({
|
|
1040
1035
|
...options,
|
|
1041
1036
|
...queryKey[0],
|
|
1042
1037
|
signal,
|
|
@@ -1044,20 +1039,37 @@ export const listUserOrganizationsOptions = (options) => queryOptions({
|
|
|
1044
1039
|
});
|
|
1045
1040
|
return data;
|
|
1046
1041
|
},
|
|
1047
|
-
queryKey:
|
|
1042
|
+
queryKey: getUsageQueryKey(options)
|
|
1048
1043
|
});
|
|
1049
|
-
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
1050
1044
|
/**
|
|
1051
|
-
*
|
|
1045
|
+
* Get Stripe client secret.
|
|
1052
1046
|
*
|
|
1053
|
-
*
|
|
1047
|
+
* 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.
|
|
1054
1048
|
*
|
|
1055
|
-
|
|
1049
|
+
*/
|
|
1050
|
+
export const getPaymentMethodSecretMutation = (options) => {
|
|
1051
|
+
const mutationOptions = {
|
|
1052
|
+
mutationFn: async (fnOptions) => {
|
|
1053
|
+
const { data } = await BillingService.getPaymentMethodSecret({
|
|
1054
|
+
...options,
|
|
1055
|
+
...fnOptions,
|
|
1056
|
+
throwOnError: true
|
|
1057
|
+
});
|
|
1058
|
+
return data;
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
return mutationOptions;
|
|
1062
|
+
};
|
|
1063
|
+
export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
|
|
1064
|
+
/**
|
|
1065
|
+
* List organization payment methods.
|
|
1066
|
+
*
|
|
1067
|
+
* 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.
|
|
1056
1068
|
*
|
|
1057
1069
|
*/
|
|
1058
|
-
export const
|
|
1070
|
+
export const listPaymentMethodsOptions = (options) => queryOptions({
|
|
1059
1071
|
queryFn: async ({ queryKey, signal }) => {
|
|
1060
|
-
const { data } = await
|
|
1072
|
+
const { data } = await BillingService.listPaymentMethods({
|
|
1061
1073
|
...options,
|
|
1062
1074
|
...queryKey[0],
|
|
1063
1075
|
signal,
|
|
@@ -1065,18 +1077,18 @@ export const listUsersOptions = (options) => queryOptions({
|
|
|
1065
1077
|
});
|
|
1066
1078
|
return data;
|
|
1067
1079
|
},
|
|
1068
|
-
queryKey:
|
|
1080
|
+
queryKey: listPaymentMethodsQueryKey(options)
|
|
1069
1081
|
});
|
|
1070
1082
|
/**
|
|
1071
|
-
*
|
|
1083
|
+
* Set the default payment method.
|
|
1072
1084
|
*
|
|
1073
|
-
*
|
|
1085
|
+
* Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
|
|
1074
1086
|
*
|
|
1075
1087
|
*/
|
|
1076
|
-
export const
|
|
1088
|
+
export const setDefaultPaymentMethodMutation = (options) => {
|
|
1077
1089
|
const mutationOptions = {
|
|
1078
1090
|
mutationFn: async (fnOptions) => {
|
|
1079
|
-
const { data } = await
|
|
1091
|
+
const { data } = await BillingService.setDefaultPaymentMethod({
|
|
1080
1092
|
...options,
|
|
1081
1093
|
...fnOptions,
|
|
1082
1094
|
throwOnError: true
|
|
@@ -1087,15 +1099,15 @@ export const createUserMutation = (options) => {
|
|
|
1087
1099
|
return mutationOptions;
|
|
1088
1100
|
};
|
|
1089
1101
|
/**
|
|
1090
|
-
* Delete
|
|
1102
|
+
* Delete a payment method.
|
|
1091
1103
|
*
|
|
1092
|
-
*
|
|
1104
|
+
* 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.
|
|
1093
1105
|
*
|
|
1094
1106
|
*/
|
|
1095
|
-
export const
|
|
1107
|
+
export const deletePaymentMethodMutation = (options) => {
|
|
1096
1108
|
const mutationOptions = {
|
|
1097
1109
|
mutationFn: async (fnOptions) => {
|
|
1098
|
-
const { data } = await
|
|
1110
|
+
const { data } = await BillingService.deletePaymentMethod({
|
|
1099
1111
|
...options,
|
|
1100
1112
|
...fnOptions,
|
|
1101
1113
|
throwOnError: true
|
|
@@ -1105,18 +1117,35 @@ export const deleteUserMutation = (options) => {
|
|
|
1105
1117
|
};
|
|
1106
1118
|
return mutationOptions;
|
|
1107
1119
|
};
|
|
1108
|
-
export const
|
|
1120
|
+
export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
|
|
1109
1121
|
/**
|
|
1110
|
-
*
|
|
1122
|
+
* List issued invoices.
|
|
1111
1123
|
*
|
|
1112
|
-
* Returns
|
|
1124
|
+
* 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.
|
|
1113
1125
|
*
|
|
1114
|
-
|
|
1126
|
+
*/
|
|
1127
|
+
export const listInvoicesOptions = (options) => queryOptions({
|
|
1128
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1129
|
+
const { data } = await BillingService.listInvoices({
|
|
1130
|
+
...options,
|
|
1131
|
+
...queryKey[0],
|
|
1132
|
+
signal,
|
|
1133
|
+
throwOnError: true
|
|
1134
|
+
});
|
|
1135
|
+
return data;
|
|
1136
|
+
},
|
|
1137
|
+
queryKey: listInvoicesQueryKey(options)
|
|
1138
|
+
});
|
|
1139
|
+
export const getContactQueryKey = (options) => createQueryKey('getContact', options);
|
|
1140
|
+
/**
|
|
1141
|
+
* Get organization contact and billing address information.
|
|
1142
|
+
*
|
|
1143
|
+
* Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
|
|
1115
1144
|
*
|
|
1116
1145
|
*/
|
|
1117
|
-
export const
|
|
1146
|
+
export const getContactOptions = (options) => queryOptions({
|
|
1118
1147
|
queryFn: async ({ queryKey, signal }) => {
|
|
1119
|
-
const { data } = await
|
|
1148
|
+
const { data } = await BillingService.getContact({
|
|
1120
1149
|
...options,
|
|
1121
1150
|
...queryKey[0],
|
|
1122
1151
|
signal,
|
|
@@ -1124,18 +1153,56 @@ export const getUserOptions = (options) => queryOptions({
|
|
|
1124
1153
|
});
|
|
1125
1154
|
return data;
|
|
1126
1155
|
},
|
|
1127
|
-
queryKey:
|
|
1156
|
+
queryKey: getContactQueryKey(options)
|
|
1128
1157
|
});
|
|
1129
1158
|
/**
|
|
1130
|
-
* Update
|
|
1159
|
+
* Update organization contact information and billing address.
|
|
1131
1160
|
*
|
|
1132
|
-
*
|
|
1161
|
+
* This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
|
|
1133
1162
|
*
|
|
1134
1163
|
*/
|
|
1135
|
-
export const
|
|
1164
|
+
export const updateContactMutation = (options) => {
|
|
1136
1165
|
const mutationOptions = {
|
|
1137
1166
|
mutationFn: async (fnOptions) => {
|
|
1138
|
-
const { data } = await
|
|
1167
|
+
const { data } = await BillingService.updateContact({
|
|
1168
|
+
...options,
|
|
1169
|
+
...fnOptions,
|
|
1170
|
+
throwOnError: true
|
|
1171
|
+
});
|
|
1172
|
+
return data;
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
return mutationOptions;
|
|
1176
|
+
};
|
|
1177
|
+
export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
|
|
1178
|
+
/**
|
|
1179
|
+
* Get applied promotional credits
|
|
1180
|
+
*
|
|
1181
|
+
* 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.
|
|
1182
|
+
*
|
|
1183
|
+
*/
|
|
1184
|
+
export const getCreditsOptions = (options) => queryOptions({
|
|
1185
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1186
|
+
const { data } = await BillingService.getCredits({
|
|
1187
|
+
...options,
|
|
1188
|
+
...queryKey[0],
|
|
1189
|
+
signal,
|
|
1190
|
+
throwOnError: true
|
|
1191
|
+
});
|
|
1192
|
+
return data;
|
|
1193
|
+
},
|
|
1194
|
+
queryKey: getCreditsQueryKey(options)
|
|
1195
|
+
});
|
|
1196
|
+
/**
|
|
1197
|
+
* Redeem promotional credits code.
|
|
1198
|
+
*
|
|
1199
|
+
* 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.
|
|
1200
|
+
*
|
|
1201
|
+
*/
|
|
1202
|
+
export const redeemCreditsMutation = (options) => {
|
|
1203
|
+
const mutationOptions = {
|
|
1204
|
+
mutationFn: async (fnOptions) => {
|
|
1205
|
+
const { data } = await BillingService.redeemCredits({
|
|
1139
1206
|
...options,
|
|
1140
1207
|
...fnOptions,
|
|
1141
1208
|
throwOnError: true
|