@cloudfleet/sdk 0.0.1-4a07f21 → 0.0.1-4adea55
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 +402 -399
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/@tanstack/react-query.gen.js +424 -397
- 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 +619 -112
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +1451 -177
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +236 -221
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +336 -319
- package/dist/sdk.gen.js.map +1 -1
- package/dist/types.gen.d.ts +1136 -740
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +3256 -1408
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +1148 -326
- package/dist/zod.gen.js.map +1 -1
- package/package.json +8 -11
|
@@ -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,20 +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
|
-
*
|
|
390
|
+
* Returns a list of tags for a specific repository, including size and metadata for each tag. This endpoint is available to all users in the organization.
|
|
436
391
|
*
|
|
437
|
-
|
|
392
|
+
*/
|
|
393
|
+
export const listTagsOptions = (options) => queryOptions({
|
|
394
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
395
|
+
const { data } = await RegistryService.listTags({
|
|
396
|
+
...options,
|
|
397
|
+
...queryKey[0],
|
|
398
|
+
signal,
|
|
399
|
+
throwOnError: true
|
|
400
|
+
});
|
|
401
|
+
return data;
|
|
402
|
+
},
|
|
403
|
+
queryKey: listTagsQueryKey(options)
|
|
404
|
+
});
|
|
405
|
+
/**
|
|
406
|
+
* Delete tag
|
|
407
|
+
*
|
|
408
|
+
* Permanently deletes a specific tag from a repository. This endpoint is available to administrators of the organization only.
|
|
438
409
|
*
|
|
439
410
|
*/
|
|
440
|
-
export const
|
|
411
|
+
export const deleteTagMutation = (options) => {
|
|
441
412
|
const mutationOptions = {
|
|
442
413
|
mutationFn: async (fnOptions) => {
|
|
443
|
-
const { data } = await
|
|
414
|
+
const { data } = await RegistryService.deleteTag({
|
|
444
415
|
...options,
|
|
445
416
|
...fnOptions,
|
|
446
417
|
throwOnError: true
|
|
@@ -450,39 +421,37 @@ export const createClusterMutation = (options) => {
|
|
|
450
421
|
};
|
|
451
422
|
return mutationOptions;
|
|
452
423
|
};
|
|
424
|
+
export const getTagQueryKey = (options) => createQueryKey('getTag', options);
|
|
453
425
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
426
|
+
* Get tag details
|
|
457
427
|
*
|
|
458
|
-
* This endpoint is available to
|
|
428
|
+
* Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
|
|
459
429
|
*
|
|
460
430
|
*/
|
|
461
|
-
export const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
|
|
431
|
+
export const getTagOptions = (options) => queryOptions({
|
|
432
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
433
|
+
const { data } = await RegistryService.getTag({
|
|
434
|
+
...options,
|
|
435
|
+
...queryKey[0],
|
|
436
|
+
signal,
|
|
437
|
+
throwOnError: true
|
|
438
|
+
});
|
|
439
|
+
return data;
|
|
440
|
+
},
|
|
441
|
+
queryKey: getTagQueryKey(options)
|
|
442
|
+
});
|
|
443
|
+
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
475
444
|
/**
|
|
476
|
-
* Get
|
|
445
|
+
* Get organization information.
|
|
477
446
|
*
|
|
478
|
-
* Returns
|
|
447
|
+
* Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
479
448
|
*
|
|
480
449
|
* This endpoint is available to all users in the organization.
|
|
481
450
|
*
|
|
482
451
|
*/
|
|
483
|
-
export const
|
|
452
|
+
export const getOrganizationOptions = (options) => queryOptions({
|
|
484
453
|
queryFn: async ({ queryKey, signal }) => {
|
|
485
|
-
const { data } = await
|
|
454
|
+
const { data } = await OrganizationService.getOrganization({
|
|
486
455
|
...options,
|
|
487
456
|
...queryKey[0],
|
|
488
457
|
signal,
|
|
@@ -490,20 +459,36 @@ export const getClusterOptions = (options) => queryOptions({
|
|
|
490
459
|
});
|
|
491
460
|
return data;
|
|
492
461
|
},
|
|
493
|
-
queryKey:
|
|
462
|
+
queryKey: getOrganizationQueryKey(options)
|
|
494
463
|
});
|
|
495
464
|
/**
|
|
496
|
-
*
|
|
465
|
+
* Create a new organization / Cloudfleet account signup.
|
|
497
466
|
*
|
|
498
|
-
* This endpoint allows you to
|
|
467
|
+
* This endpoint allows you to create a new Cloudfleet organization and an administrator user.
|
|
499
468
|
*
|
|
500
|
-
|
|
469
|
+
*/
|
|
470
|
+
export const createOrganizationMutation = (options) => {
|
|
471
|
+
const mutationOptions = {
|
|
472
|
+
mutationFn: async (fnOptions) => {
|
|
473
|
+
const { data } = await OrganizationService.createOrganization({
|
|
474
|
+
...options,
|
|
475
|
+
...fnOptions,
|
|
476
|
+
throwOnError: true
|
|
477
|
+
});
|
|
478
|
+
return data;
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
return mutationOptions;
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* MCP endpoint
|
|
501
485
|
*
|
|
486
|
+
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
502
487
|
*/
|
|
503
|
-
export const
|
|
488
|
+
export const postMcpMutation = (options) => {
|
|
504
489
|
const mutationOptions = {
|
|
505
490
|
mutationFn: async (fnOptions) => {
|
|
506
|
-
const { data } = await
|
|
491
|
+
const { data } = await McpService.postMcp({
|
|
507
492
|
...options,
|
|
508
493
|
...fnOptions,
|
|
509
494
|
throwOnError: true
|
|
@@ -513,16 +498,18 @@ export const updateClusterMutation = (options) => {
|
|
|
513
498
|
};
|
|
514
499
|
return mutationOptions;
|
|
515
500
|
};
|
|
516
|
-
export const
|
|
501
|
+
export const listMarketplaceChartsQueryKey = (options) => createQueryKey('listMarketplaceCharts', options);
|
|
517
502
|
/**
|
|
518
|
-
*
|
|
503
|
+
* List chart listings available in the marketplace.
|
|
504
|
+
*
|
|
505
|
+
* Returns a list of available charts in the marketplace.
|
|
519
506
|
*
|
|
520
|
-
*
|
|
507
|
+
* This endpoint is available to all users in the organization.
|
|
521
508
|
*
|
|
522
509
|
*/
|
|
523
|
-
export const
|
|
510
|
+
export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
524
511
|
queryFn: async ({ queryKey, signal }) => {
|
|
525
|
-
const { data } = await
|
|
512
|
+
const { data } = await ChartsMarketplaceService.listMarketplaceCharts({
|
|
526
513
|
...options,
|
|
527
514
|
...queryKey[0],
|
|
528
515
|
signal,
|
|
@@ -530,32 +517,36 @@ export const getClusterCaOptions = (options) => queryOptions({
|
|
|
530
517
|
});
|
|
531
518
|
return data;
|
|
532
519
|
},
|
|
533
|
-
queryKey:
|
|
520
|
+
queryKey: listMarketplaceChartsQueryKey(options)
|
|
534
521
|
});
|
|
522
|
+
export const getMarketplaceChartFilesQueryKey = (options) => createQueryKey('getMarketplaceChartFiles', options);
|
|
535
523
|
/**
|
|
536
|
-
*
|
|
524
|
+
* Get chart files for a specific version channel.
|
|
537
525
|
*
|
|
538
|
-
* Returns the
|
|
526
|
+
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
527
|
+
*
|
|
528
|
+
* Version channels use patterns like "1.31.x-cfke.x" to match the latest patch version, or "1.x.x-cfke.x" to match the latest minor version.
|
|
529
|
+
*
|
|
530
|
+
* This endpoint is available to all users in the organization.
|
|
539
531
|
*
|
|
540
532
|
*/
|
|
541
|
-
export const
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
};
|
|
533
|
+
export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
534
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
535
|
+
const { data } = await ChartsMarketplaceService.getMarketplaceChartFiles({
|
|
536
|
+
...options,
|
|
537
|
+
...queryKey[0],
|
|
538
|
+
signal,
|
|
539
|
+
throwOnError: true
|
|
540
|
+
});
|
|
541
|
+
return data;
|
|
542
|
+
},
|
|
543
|
+
queryKey: getMarketplaceChartFilesQueryKey(options)
|
|
544
|
+
});
|
|
554
545
|
export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
|
|
555
546
|
/**
|
|
556
547
|
* List invites.
|
|
557
548
|
*
|
|
558
|
-
* Returns a list of invites under the current organization. This endpoint is available to
|
|
549
|
+
* Returns a list of pending (non-expired) invites under the current organization. This endpoint is available to administrators of the organization only.
|
|
559
550
|
*
|
|
560
551
|
*/
|
|
561
552
|
export const listInvitesOptions = (options) => queryOptions({
|
|
@@ -593,7 +584,7 @@ export const getInviteQueryKey = (options) => createQueryKey('getInvite', option
|
|
|
593
584
|
/**
|
|
594
585
|
* Get invite information.
|
|
595
586
|
*
|
|
596
|
-
*
|
|
587
|
+
* Validates an invitation code and returns the email address it was issued to (to pre-fill the signup form) and the organization it grants access to. This endpoint is unauthenticated, so no other invite details (such as the invited role) are disclosed.
|
|
597
588
|
*
|
|
598
589
|
*/
|
|
599
590
|
export const getInviteOptions = (options) => queryOptions({
|
|
@@ -627,18 +618,15 @@ export const deleteInviteMutation = (options) => {
|
|
|
627
618
|
};
|
|
628
619
|
return mutationOptions;
|
|
629
620
|
};
|
|
630
|
-
export const
|
|
621
|
+
export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
|
|
631
622
|
/**
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
* Returns a list of available charts in the marketplace.
|
|
635
|
-
*
|
|
636
|
-
* This endpoint is available to all users in the organization.
|
|
623
|
+
* Query Kubernetes cluster API
|
|
637
624
|
*
|
|
625
|
+
* An API endpoint for directly querying a Kubernetes cluster API without requiring kubectl or other tools. This endpoint is ideal for automation and scripting, as well as for internal use in fetching data for the Cloudfleet Console. It acts as a passthrough to the Kubernetes API, allowing access to any valid Kubernetes API endpoint, including those not exposed in the Cloudfleet Console. The endpoint is strictly read-only, ensuring no modifications to the cluster state. It is accessible to all users within the organization and uses the same authentication mechanisms as other Cloudfleet API endpoints.
|
|
638
626
|
*/
|
|
639
|
-
export const
|
|
627
|
+
export const queryClusterOptions = (options) => queryOptions({
|
|
640
628
|
queryFn: async ({ queryKey, signal }) => {
|
|
641
|
-
const { data } = await
|
|
629
|
+
const { data } = await ClustersService.queryCluster({
|
|
642
630
|
...options,
|
|
643
631
|
...queryKey[0],
|
|
644
632
|
signal,
|
|
@@ -646,22 +634,20 @@ export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
|
646
634
|
});
|
|
647
635
|
return data;
|
|
648
636
|
},
|
|
649
|
-
queryKey:
|
|
637
|
+
queryKey: queryClusterQueryKey(options)
|
|
650
638
|
});
|
|
651
|
-
export const
|
|
639
|
+
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
652
640
|
/**
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
641
|
+
* List fleets.
|
|
656
642
|
*
|
|
657
|
-
*
|
|
643
|
+
* Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
658
644
|
*
|
|
659
645
|
* This endpoint is available to all users in the organization.
|
|
660
646
|
*
|
|
661
647
|
*/
|
|
662
|
-
export const
|
|
648
|
+
export const listFleetsOptions = (options) => queryOptions({
|
|
663
649
|
queryFn: async ({ queryKey, signal }) => {
|
|
664
|
-
const { data } = await
|
|
650
|
+
const { data } = await ClustersService.listFleets({
|
|
665
651
|
...options,
|
|
666
652
|
...queryKey[0],
|
|
667
653
|
signal,
|
|
@@ -669,17 +655,22 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
|
669
655
|
});
|
|
670
656
|
return data;
|
|
671
657
|
},
|
|
672
|
-
queryKey:
|
|
658
|
+
queryKey: listFleetsQueryKey(options)
|
|
673
659
|
});
|
|
674
660
|
/**
|
|
675
|
-
*
|
|
661
|
+
* Create a new fleet.
|
|
662
|
+
*
|
|
663
|
+
* Create a new fleet under the current organization. fleets allow you to to schedule workloads in cloud service provider accounts owned by you. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
664
|
+
*
|
|
665
|
+
* The cluster must be ready (status `deployed`) before a fleet can be added. Adding a fleet while the cluster is still provisioning returns `409`.
|
|
666
|
+
*
|
|
667
|
+
* This endpoint is available to administrators of the organization only.
|
|
676
668
|
*
|
|
677
|
-
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
678
669
|
*/
|
|
679
|
-
export const
|
|
670
|
+
export const createFleetMutation = (options) => {
|
|
680
671
|
const mutationOptions = {
|
|
681
672
|
mutationFn: async (fnOptions) => {
|
|
682
|
-
const { data } = await
|
|
673
|
+
const { data } = await ClustersService.createFleet({
|
|
683
674
|
...options,
|
|
684
675
|
...fnOptions,
|
|
685
676
|
throwOnError: true
|
|
@@ -689,37 +680,20 @@ export const postMcpMutation = (options) => {
|
|
|
689
680
|
};
|
|
690
681
|
return mutationOptions;
|
|
691
682
|
};
|
|
692
|
-
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
693
683
|
/**
|
|
694
|
-
*
|
|
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.
|
|
684
|
+
* Permanently delete fleet.
|
|
697
685
|
*
|
|
698
|
-
* This endpoint
|
|
686
|
+
* This endpoint will permanently delete fleet. This operation cannot be undone. Your subscription will end by the end of the current billing period and you will not be able to receive credit for unused time. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
699
687
|
*
|
|
700
|
-
|
|
701
|
-
export const getOrganizationOptions = (options) => queryOptions({
|
|
702
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
703
|
-
const { data } = await OrganizationService.getOrganization({
|
|
704
|
-
...options,
|
|
705
|
-
...queryKey[0],
|
|
706
|
-
signal,
|
|
707
|
-
throwOnError: true
|
|
708
|
-
});
|
|
709
|
-
return data;
|
|
710
|
-
},
|
|
711
|
-
queryKey: getOrganizationQueryKey(options)
|
|
712
|
-
});
|
|
713
|
-
/**
|
|
714
|
-
* Create a new organization / Cloudfleet account signup.
|
|
688
|
+
* Deleting a fleet does not deprovision the cloud infrastructure it provisioned: nodes and other resources keep running. Scale the cluster down first, or remove the infrastructure manually, to avoid orphaned resources.
|
|
715
689
|
*
|
|
716
|
-
* This endpoint
|
|
690
|
+
* This endpoint is available to administrators of the organization only.
|
|
717
691
|
*
|
|
718
692
|
*/
|
|
719
|
-
export const
|
|
693
|
+
export const deleteFleetMutation = (options) => {
|
|
720
694
|
const mutationOptions = {
|
|
721
695
|
mutationFn: async (fnOptions) => {
|
|
722
|
-
const { data } = await
|
|
696
|
+
const { data } = await ClustersService.deleteFleet({
|
|
723
697
|
...options,
|
|
724
698
|
...fnOptions,
|
|
725
699
|
throwOnError: true
|
|
@@ -729,16 +703,18 @@ export const createOrganizationMutation = (options) => {
|
|
|
729
703
|
};
|
|
730
704
|
return mutationOptions;
|
|
731
705
|
};
|
|
732
|
-
export const
|
|
706
|
+
export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
|
|
733
707
|
/**
|
|
734
|
-
*
|
|
708
|
+
* Get fleet information.
|
|
735
709
|
*
|
|
736
|
-
* Returns
|
|
710
|
+
* Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
711
|
+
*
|
|
712
|
+
* This endpoint is available to all users in the organization.
|
|
737
713
|
*
|
|
738
714
|
*/
|
|
739
|
-
export const
|
|
715
|
+
export const getFleetOptions = (options) => queryOptions({
|
|
740
716
|
queryFn: async ({ queryKey, signal }) => {
|
|
741
|
-
const { data } = await
|
|
717
|
+
const { data } = await ClustersService.getFleet({
|
|
742
718
|
...options,
|
|
743
719
|
...queryKey[0],
|
|
744
720
|
signal,
|
|
@@ -746,37 +722,24 @@ export const listRepositoriesOptions = (options) => queryOptions({
|
|
|
746
722
|
});
|
|
747
723
|
return data;
|
|
748
724
|
},
|
|
749
|
-
queryKey:
|
|
725
|
+
queryKey: getFleetQueryKey(options)
|
|
750
726
|
});
|
|
751
|
-
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
752
727
|
/**
|
|
753
|
-
*
|
|
728
|
+
* Update fleet information.
|
|
754
729
|
*
|
|
755
|
-
*
|
|
730
|
+
* This endpoint allows you to update fleet details.
|
|
756
731
|
*
|
|
757
|
-
|
|
758
|
-
export const listTagsOptions = (options) => queryOptions({
|
|
759
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
760
|
-
const { data } = await RegistryService.listTags({
|
|
761
|
-
...options,
|
|
762
|
-
...queryKey[0],
|
|
763
|
-
signal,
|
|
764
|
-
throwOnError: true
|
|
765
|
-
});
|
|
766
|
-
return data;
|
|
767
|
-
},
|
|
768
|
-
queryKey: listTagsQueryKey(options)
|
|
769
|
-
});
|
|
770
|
-
/**
|
|
771
|
-
* Delete tag
|
|
732
|
+
* For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
772
733
|
*
|
|
773
|
-
*
|
|
734
|
+
* This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged. The Hetzner API key is the exception: it is kept when omitted (send a new value to rotate it).
|
|
735
|
+
*
|
|
736
|
+
* This endpoint is available to administrators of the organization only.
|
|
774
737
|
*
|
|
775
738
|
*/
|
|
776
|
-
export const
|
|
739
|
+
export const updateFleetMutation = (options) => {
|
|
777
740
|
const mutationOptions = {
|
|
778
741
|
mutationFn: async (fnOptions) => {
|
|
779
|
-
const { data } = await
|
|
742
|
+
const { data } = await ClustersService.updateFleet({
|
|
780
743
|
...options,
|
|
781
744
|
...fnOptions,
|
|
782
745
|
throwOnError: true
|
|
@@ -786,16 +749,18 @@ export const deleteTagMutation = (options) => {
|
|
|
786
749
|
};
|
|
787
750
|
return mutationOptions;
|
|
788
751
|
};
|
|
789
|
-
export const
|
|
752
|
+
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
790
753
|
/**
|
|
791
|
-
*
|
|
754
|
+
* List charts.
|
|
792
755
|
*
|
|
793
|
-
* Returns
|
|
756
|
+
* Returns a list of charts in the cluster.
|
|
757
|
+
*
|
|
758
|
+
* This endpoint is available to all users in the organization.
|
|
794
759
|
*
|
|
795
760
|
*/
|
|
796
|
-
export const
|
|
761
|
+
export const listChartsOptions = (options) => queryOptions({
|
|
797
762
|
queryFn: async ({ queryKey, signal }) => {
|
|
798
|
-
const { data } = await
|
|
763
|
+
const { data } = await ClustersService.listCharts({
|
|
799
764
|
...options,
|
|
800
765
|
...queryKey[0],
|
|
801
766
|
signal,
|
|
@@ -803,37 +768,20 @@ export const getTagOptions = (options) => queryOptions({
|
|
|
803
768
|
});
|
|
804
769
|
return data;
|
|
805
770
|
},
|
|
806
|
-
queryKey:
|
|
771
|
+
queryKey: listChartsQueryKey(options)
|
|
807
772
|
});
|
|
808
|
-
export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
|
|
809
773
|
/**
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* Returns all tickets belonging to the caller's organization, newest first.
|
|
774
|
+
* Create a new chart.
|
|
813
775
|
*
|
|
814
|
-
|
|
815
|
-
export const listTicketsOptions = (options) => queryOptions({
|
|
816
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
817
|
-
const { data } = await TicketsService.listTickets({
|
|
818
|
-
...options,
|
|
819
|
-
...queryKey[0],
|
|
820
|
-
signal,
|
|
821
|
-
throwOnError: true
|
|
822
|
-
});
|
|
823
|
-
return data;
|
|
824
|
-
},
|
|
825
|
-
queryKey: listTicketsQueryKey(options)
|
|
826
|
-
});
|
|
827
|
-
/**
|
|
828
|
-
* Create a new support ticket.
|
|
776
|
+
* Create a new chart deployment.
|
|
829
777
|
*
|
|
830
|
-
*
|
|
778
|
+
* This endpoint is available to administrators of the organization only.
|
|
831
779
|
*
|
|
832
780
|
*/
|
|
833
|
-
export const
|
|
781
|
+
export const createChartMutation = (options) => {
|
|
834
782
|
const mutationOptions = {
|
|
835
783
|
mutationFn: async (fnOptions) => {
|
|
836
|
-
const { data } = await
|
|
784
|
+
const { data } = await ClustersService.createChart({
|
|
837
785
|
...options,
|
|
838
786
|
...fnOptions,
|
|
839
787
|
throwOnError: true
|
|
@@ -844,15 +792,17 @@ export const createTicketMutation = (options) => {
|
|
|
844
792
|
return mutationOptions;
|
|
845
793
|
};
|
|
846
794
|
/**
|
|
847
|
-
*
|
|
795
|
+
* Permanently delete the chart deployment from the cluster.
|
|
848
796
|
*
|
|
849
|
-
*
|
|
797
|
+
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
798
|
+
*
|
|
799
|
+
* This endpoint is available to administrators of the organization only.
|
|
850
800
|
*
|
|
851
801
|
*/
|
|
852
|
-
export const
|
|
802
|
+
export const deleteChartMutation = (options) => {
|
|
853
803
|
const mutationOptions = {
|
|
854
804
|
mutationFn: async (fnOptions) => {
|
|
855
|
-
const { data } = await
|
|
805
|
+
const { data } = await ClustersService.deleteChart({
|
|
856
806
|
...options,
|
|
857
807
|
...fnOptions,
|
|
858
808
|
throwOnError: true
|
|
@@ -862,13 +812,18 @@ export const closeTicketMutation = (options) => {
|
|
|
862
812
|
};
|
|
863
813
|
return mutationOptions;
|
|
864
814
|
};
|
|
865
|
-
export const
|
|
815
|
+
export const getChartQueryKey = (options) => createQueryKey('getChart', options);
|
|
866
816
|
/**
|
|
867
|
-
* Get
|
|
817
|
+
* Get chart information.
|
|
818
|
+
*
|
|
819
|
+
* Returns the details of the chart deployment.
|
|
820
|
+
*
|
|
821
|
+
* This endpoint is available to all users in the organization.
|
|
822
|
+
*
|
|
868
823
|
*/
|
|
869
|
-
export const
|
|
824
|
+
export const getChartOptions = (options) => queryOptions({
|
|
870
825
|
queryFn: async ({ queryKey, signal }) => {
|
|
871
|
-
const { data } = await
|
|
826
|
+
const { data } = await ClustersService.getChart({
|
|
872
827
|
...options,
|
|
873
828
|
...queryKey[0],
|
|
874
829
|
signal,
|
|
@@ -876,18 +831,20 @@ export const getTicketOptions = (options) => queryOptions({
|
|
|
876
831
|
});
|
|
877
832
|
return data;
|
|
878
833
|
},
|
|
879
|
-
queryKey:
|
|
834
|
+
queryKey: getChartQueryKey(options)
|
|
880
835
|
});
|
|
881
836
|
/**
|
|
882
|
-
*
|
|
837
|
+
* Update chart information.
|
|
883
838
|
*
|
|
884
|
-
*
|
|
839
|
+
* This endpoint allows you to update the values of a chart deployment.
|
|
840
|
+
*
|
|
841
|
+
* This endpoint is available to administrators of the organization only.
|
|
885
842
|
*
|
|
886
843
|
*/
|
|
887
|
-
export const
|
|
844
|
+
export const updateChartMutation = (options) => {
|
|
888
845
|
const mutationOptions = {
|
|
889
846
|
mutationFn: async (fnOptions) => {
|
|
890
|
-
const { data } = await
|
|
847
|
+
const { data } = await ClustersService.updateChart({
|
|
891
848
|
...options,
|
|
892
849
|
...fnOptions,
|
|
893
850
|
throwOnError: true
|
|
@@ -897,32 +854,18 @@ export const replyTicketMutation = (options) => {
|
|
|
897
854
|
};
|
|
898
855
|
return mutationOptions;
|
|
899
856
|
};
|
|
900
|
-
export const
|
|
901
|
-
/**
|
|
902
|
-
* Download a ticket attachment.
|
|
903
|
-
*/
|
|
904
|
-
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
905
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
906
|
-
const { data } = await TicketsService.getTicketAttachment({
|
|
907
|
-
...options,
|
|
908
|
-
...queryKey[0],
|
|
909
|
-
signal,
|
|
910
|
-
throwOnError: true
|
|
911
|
-
});
|
|
912
|
-
return data;
|
|
913
|
-
},
|
|
914
|
-
queryKey: getTicketAttachmentQueryKey(options)
|
|
915
|
-
});
|
|
916
|
-
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
857
|
+
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
917
858
|
/**
|
|
918
|
-
* List
|
|
859
|
+
* List clusters.
|
|
919
860
|
*
|
|
920
|
-
*
|
|
861
|
+
* Returns a list of clusters under the current organization.
|
|
862
|
+
*
|
|
863
|
+
* This endpoint is available to all users in the organization.
|
|
921
864
|
*
|
|
922
865
|
*/
|
|
923
|
-
export const
|
|
866
|
+
export const listClustersOptions = (options) => queryOptions({
|
|
924
867
|
queryFn: async ({ queryKey, signal }) => {
|
|
925
|
-
const { data } = await
|
|
868
|
+
const { data } = await ClustersService.listClusters({
|
|
926
869
|
...options,
|
|
927
870
|
...queryKey[0],
|
|
928
871
|
signal,
|
|
@@ -930,20 +873,20 @@ export const listTokensOptions = (options) => queryOptions({
|
|
|
930
873
|
});
|
|
931
874
|
return data;
|
|
932
875
|
},
|
|
933
|
-
queryKey:
|
|
876
|
+
queryKey: listClustersQueryKey(options)
|
|
934
877
|
});
|
|
935
878
|
/**
|
|
936
|
-
* Create a new
|
|
879
|
+
* Create a new cluster.
|
|
937
880
|
*
|
|
938
|
-
*
|
|
881
|
+
* Create a new cluster under the current organization. Clusters allow you to group resources and you can create multiple clusters under the same organization, with billing delegated to the parent organization.
|
|
939
882
|
*
|
|
940
883
|
* This endpoint is available to administrators of the organization only.
|
|
941
884
|
*
|
|
942
885
|
*/
|
|
943
|
-
export const
|
|
886
|
+
export const createClusterMutation = (options) => {
|
|
944
887
|
const mutationOptions = {
|
|
945
888
|
mutationFn: async (fnOptions) => {
|
|
946
|
-
const { data } = await
|
|
889
|
+
const { data } = await ClustersService.createCluster({
|
|
947
890
|
...options,
|
|
948
891
|
...fnOptions,
|
|
949
892
|
throwOnError: true
|
|
@@ -954,15 +897,19 @@ export const createTokenMutation = (options) => {
|
|
|
954
897
|
return mutationOptions;
|
|
955
898
|
};
|
|
956
899
|
/**
|
|
957
|
-
* Permanently delete
|
|
900
|
+
* Permanently delete cluster.
|
|
958
901
|
*
|
|
959
|
-
* This endpoint
|
|
902
|
+
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
903
|
+
*
|
|
904
|
+
* Deleting a cluster also deletes its fleets. This does not deprovision the cloud infrastructure those fleets provisioned: nodes and other resources keep running. Scale the cluster down first, or remove the infrastructure manually, to avoid orphaned resources.
|
|
905
|
+
*
|
|
906
|
+
* This endpoint is available to administrators of the organization only.
|
|
960
907
|
*
|
|
961
908
|
*/
|
|
962
|
-
export const
|
|
909
|
+
export const deleteClusterMutation = (options) => {
|
|
963
910
|
const mutationOptions = {
|
|
964
911
|
mutationFn: async (fnOptions) => {
|
|
965
|
-
const { data } = await
|
|
912
|
+
const { data } = await ClustersService.deleteCluster({
|
|
966
913
|
...options,
|
|
967
914
|
...fnOptions,
|
|
968
915
|
throwOnError: true
|
|
@@ -972,16 +919,18 @@ export const deleteTokenMutation = (options) => {
|
|
|
972
919
|
};
|
|
973
920
|
return mutationOptions;
|
|
974
921
|
};
|
|
975
|
-
export const
|
|
922
|
+
export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
|
|
976
923
|
/**
|
|
977
|
-
* Get
|
|
924
|
+
* Get cluster information.
|
|
978
925
|
*
|
|
979
|
-
*
|
|
926
|
+
* Returns cluster details.
|
|
927
|
+
*
|
|
928
|
+
* This endpoint is available to all users in the organization.
|
|
980
929
|
*
|
|
981
930
|
*/
|
|
982
|
-
export const
|
|
931
|
+
export const getClusterOptions = (options) => queryOptions({
|
|
983
932
|
queryFn: async ({ queryKey, signal }) => {
|
|
984
|
-
const { data } = await
|
|
933
|
+
const { data } = await ClustersService.getCluster({
|
|
985
934
|
...options,
|
|
986
935
|
...queryKey[0],
|
|
987
936
|
signal,
|
|
@@ -989,20 +938,22 @@ export const getTokenOptions = (options) => queryOptions({
|
|
|
989
938
|
});
|
|
990
939
|
return data;
|
|
991
940
|
},
|
|
992
|
-
queryKey:
|
|
941
|
+
queryKey: getClusterQueryKey(options)
|
|
993
942
|
});
|
|
994
943
|
/**
|
|
995
|
-
* Update
|
|
944
|
+
* Update cluster information.
|
|
996
945
|
*
|
|
997
|
-
* This endpoint allows you to update
|
|
946
|
+
* This endpoint allows you to update cluster details. For more information about clusters, see [Clusters](https://cloudfleet.ai/docs/cluster-management/cluster-types/) section of documentation.
|
|
947
|
+
*
|
|
948
|
+
* This is a full overwrite: any field omitted from the request is reset to its default rather than left unchanged.
|
|
998
949
|
*
|
|
999
950
|
* This endpoint is available to administrators of the organization only.
|
|
1000
951
|
*
|
|
1001
952
|
*/
|
|
1002
|
-
export const
|
|
953
|
+
export const updateClusterMutation = (options) => {
|
|
1003
954
|
const mutationOptions = {
|
|
1004
955
|
mutationFn: async (fnOptions) => {
|
|
1005
|
-
const { data } = await
|
|
956
|
+
const { data } = await ClustersService.updateCluster({
|
|
1006
957
|
...options,
|
|
1007
958
|
...fnOptions,
|
|
1008
959
|
throwOnError: true
|
|
@@ -1013,14 +964,15 @@ export const updateTokenMutation = (options) => {
|
|
|
1013
964
|
return mutationOptions;
|
|
1014
965
|
};
|
|
1015
966
|
/**
|
|
1016
|
-
*
|
|
967
|
+
* Node join information for the cluster
|
|
968
|
+
*
|
|
969
|
+
* Returns the join information for the cluster. This information is used to add a self-managed nodes to the CFKE cluster. This endpoint is available to only admins of the organization.
|
|
1017
970
|
*
|
|
1018
|
-
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
1019
971
|
*/
|
|
1020
|
-
export const
|
|
972
|
+
export const getJoinInformationMutation = (options) => {
|
|
1021
973
|
const mutationOptions = {
|
|
1022
974
|
mutationFn: async (fnOptions) => {
|
|
1023
|
-
const { data } = await
|
|
975
|
+
const { data } = await ClustersService.getJoinInformation({
|
|
1024
976
|
...options,
|
|
1025
977
|
...fnOptions,
|
|
1026
978
|
throwOnError: true
|
|
@@ -1030,13 +982,16 @@ export const regenerateTokenMutation = (options) => {
|
|
|
1030
982
|
};
|
|
1031
983
|
return mutationOptions;
|
|
1032
984
|
};
|
|
1033
|
-
export const
|
|
985
|
+
export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
|
|
1034
986
|
/**
|
|
1035
|
-
* Get
|
|
987
|
+
* Get billing usage information.
|
|
988
|
+
*
|
|
989
|
+
* Returns aggregated usage information for the organization with facets for filtering. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
990
|
+
*
|
|
1036
991
|
*/
|
|
1037
|
-
export const
|
|
992
|
+
export const getUsageOptions = (options) => queryOptions({
|
|
1038
993
|
queryFn: async ({ queryKey, signal }) => {
|
|
1039
|
-
const { data } = await
|
|
994
|
+
const { data } = await BillingService.getUsage({
|
|
1040
995
|
...options,
|
|
1041
996
|
...queryKey[0],
|
|
1042
997
|
signal,
|
|
@@ -1044,20 +999,37 @@ export const listUserOrganizationsOptions = (options) => queryOptions({
|
|
|
1044
999
|
});
|
|
1045
1000
|
return data;
|
|
1046
1001
|
},
|
|
1047
|
-
queryKey:
|
|
1002
|
+
queryKey: getUsageQueryKey(options)
|
|
1048
1003
|
});
|
|
1049
|
-
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
1050
1004
|
/**
|
|
1051
|
-
*
|
|
1005
|
+
* Get Stripe client secret.
|
|
1052
1006
|
*
|
|
1053
|
-
*
|
|
1007
|
+
* Endpoint returns the Stripe secret key for the organization. This key is used to securely update the payment method in the Cloudfleet console only, please visit https://console.cloudfleet.ai. This endpoint is available to administrators of the organization only.
|
|
1054
1008
|
*
|
|
1055
|
-
|
|
1009
|
+
*/
|
|
1010
|
+
export const getPaymentMethodSecretMutation = (options) => {
|
|
1011
|
+
const mutationOptions = {
|
|
1012
|
+
mutationFn: async (fnOptions) => {
|
|
1013
|
+
const { data } = await BillingService.getPaymentMethodSecret({
|
|
1014
|
+
...options,
|
|
1015
|
+
...fnOptions,
|
|
1016
|
+
throwOnError: true
|
|
1017
|
+
});
|
|
1018
|
+
return data;
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
return mutationOptions;
|
|
1022
|
+
};
|
|
1023
|
+
export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
|
|
1024
|
+
/**
|
|
1025
|
+
* List organization payment methods.
|
|
1026
|
+
*
|
|
1027
|
+
* Returns all payment methods (cards and SEPA Direct Debit) attached to the organization, most recently added first, with the default flagged. This endpoint is available to all users in the organization.
|
|
1056
1028
|
*
|
|
1057
1029
|
*/
|
|
1058
|
-
export const
|
|
1030
|
+
export const listPaymentMethodsOptions = (options) => queryOptions({
|
|
1059
1031
|
queryFn: async ({ queryKey, signal }) => {
|
|
1060
|
-
const { data } = await
|
|
1032
|
+
const { data } = await BillingService.listPaymentMethods({
|
|
1061
1033
|
...options,
|
|
1062
1034
|
...queryKey[0],
|
|
1063
1035
|
signal,
|
|
@@ -1065,18 +1037,18 @@ export const listUsersOptions = (options) => queryOptions({
|
|
|
1065
1037
|
});
|
|
1066
1038
|
return data;
|
|
1067
1039
|
},
|
|
1068
|
-
queryKey:
|
|
1040
|
+
queryKey: listPaymentMethodsQueryKey(options)
|
|
1069
1041
|
});
|
|
1070
1042
|
/**
|
|
1071
|
-
*
|
|
1043
|
+
* Set the default payment method.
|
|
1072
1044
|
*
|
|
1073
|
-
*
|
|
1045
|
+
* Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
|
|
1074
1046
|
*
|
|
1075
1047
|
*/
|
|
1076
|
-
export const
|
|
1048
|
+
export const setDefaultPaymentMethodMutation = (options) => {
|
|
1077
1049
|
const mutationOptions = {
|
|
1078
1050
|
mutationFn: async (fnOptions) => {
|
|
1079
|
-
const { data } = await
|
|
1051
|
+
const { data } = await BillingService.setDefaultPaymentMethod({
|
|
1080
1052
|
...options,
|
|
1081
1053
|
...fnOptions,
|
|
1082
1054
|
throwOnError: true
|
|
@@ -1087,15 +1059,15 @@ export const createUserMutation = (options) => {
|
|
|
1087
1059
|
return mutationOptions;
|
|
1088
1060
|
};
|
|
1089
1061
|
/**
|
|
1090
|
-
* Delete
|
|
1062
|
+
* Delete a payment method.
|
|
1091
1063
|
*
|
|
1092
|
-
*
|
|
1064
|
+
* Detaches the given payment method from the organization. Requires the Administrator role. An organization must keep at least one payment method, so deleting the only remaining method is rejected.
|
|
1093
1065
|
*
|
|
1094
1066
|
*/
|
|
1095
|
-
export const
|
|
1067
|
+
export const deletePaymentMethodMutation = (options) => {
|
|
1096
1068
|
const mutationOptions = {
|
|
1097
1069
|
mutationFn: async (fnOptions) => {
|
|
1098
|
-
const { data } = await
|
|
1070
|
+
const { data } = await BillingService.deletePaymentMethod({
|
|
1099
1071
|
...options,
|
|
1100
1072
|
...fnOptions,
|
|
1101
1073
|
throwOnError: true
|
|
@@ -1105,18 +1077,35 @@ export const deleteUserMutation = (options) => {
|
|
|
1105
1077
|
};
|
|
1106
1078
|
return mutationOptions;
|
|
1107
1079
|
};
|
|
1108
|
-
export const
|
|
1080
|
+
export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
|
|
1109
1081
|
/**
|
|
1110
|
-
*
|
|
1082
|
+
* List issued invoices.
|
|
1111
1083
|
*
|
|
1112
|
-
* Returns
|
|
1084
|
+
* Returns a list of invoices for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
1113
1085
|
*
|
|
1114
|
-
|
|
1086
|
+
*/
|
|
1087
|
+
export const listInvoicesOptions = (options) => queryOptions({
|
|
1088
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1089
|
+
const { data } = await BillingService.listInvoices({
|
|
1090
|
+
...options,
|
|
1091
|
+
...queryKey[0],
|
|
1092
|
+
signal,
|
|
1093
|
+
throwOnError: true
|
|
1094
|
+
});
|
|
1095
|
+
return data;
|
|
1096
|
+
},
|
|
1097
|
+
queryKey: listInvoicesQueryKey(options)
|
|
1098
|
+
});
|
|
1099
|
+
export const getContactQueryKey = (options) => createQueryKey('getContact', options);
|
|
1100
|
+
/**
|
|
1101
|
+
* Get organization contact and billing address information.
|
|
1102
|
+
*
|
|
1103
|
+
* Returns the organization contact and billing address information. This endpoint is available to all users in the organization.
|
|
1115
1104
|
*
|
|
1116
1105
|
*/
|
|
1117
|
-
export const
|
|
1106
|
+
export const getContactOptions = (options) => queryOptions({
|
|
1118
1107
|
queryFn: async ({ queryKey, signal }) => {
|
|
1119
|
-
const { data } = await
|
|
1108
|
+
const { data } = await BillingService.getContact({
|
|
1120
1109
|
...options,
|
|
1121
1110
|
...queryKey[0],
|
|
1122
1111
|
signal,
|
|
@@ -1124,18 +1113,56 @@ export const getUserOptions = (options) => queryOptions({
|
|
|
1124
1113
|
});
|
|
1125
1114
|
return data;
|
|
1126
1115
|
},
|
|
1127
|
-
queryKey:
|
|
1116
|
+
queryKey: getContactQueryKey(options)
|
|
1128
1117
|
});
|
|
1129
1118
|
/**
|
|
1130
|
-
* Update
|
|
1119
|
+
* Update organization contact information and billing address.
|
|
1131
1120
|
*
|
|
1132
|
-
*
|
|
1121
|
+
* This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
|
|
1133
1122
|
*
|
|
1134
1123
|
*/
|
|
1135
|
-
export const
|
|
1124
|
+
export const updateContactMutation = (options) => {
|
|
1136
1125
|
const mutationOptions = {
|
|
1137
1126
|
mutationFn: async (fnOptions) => {
|
|
1138
|
-
const { data } = await
|
|
1127
|
+
const { data } = await BillingService.updateContact({
|
|
1128
|
+
...options,
|
|
1129
|
+
...fnOptions,
|
|
1130
|
+
throwOnError: true
|
|
1131
|
+
});
|
|
1132
|
+
return data;
|
|
1133
|
+
}
|
|
1134
|
+
};
|
|
1135
|
+
return mutationOptions;
|
|
1136
|
+
};
|
|
1137
|
+
export const getCreditsQueryKey = (options) => createQueryKey('getCredits', options);
|
|
1138
|
+
/**
|
|
1139
|
+
* Get applied promotional credits
|
|
1140
|
+
*
|
|
1141
|
+
* Returns applied promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
1142
|
+
*
|
|
1143
|
+
*/
|
|
1144
|
+
export const getCreditsOptions = (options) => queryOptions({
|
|
1145
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1146
|
+
const { data } = await BillingService.getCredits({
|
|
1147
|
+
...options,
|
|
1148
|
+
...queryKey[0],
|
|
1149
|
+
signal,
|
|
1150
|
+
throwOnError: true
|
|
1151
|
+
});
|
|
1152
|
+
return data;
|
|
1153
|
+
},
|
|
1154
|
+
queryKey: getCreditsQueryKey(options)
|
|
1155
|
+
});
|
|
1156
|
+
/**
|
|
1157
|
+
* Redeem promotional credits code.
|
|
1158
|
+
*
|
|
1159
|
+
* Applies promotional credits for the organization. For more information on billing and payments, see [Billing and pricing](https://cloudfleet.ai/docs/organization/billing/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
1160
|
+
*
|
|
1161
|
+
*/
|
|
1162
|
+
export const redeemCreditsMutation = (options) => {
|
|
1163
|
+
const mutationOptions = {
|
|
1164
|
+
mutationFn: async (fnOptions) => {
|
|
1165
|
+
const { data } = await BillingService.redeemCredits({
|
|
1139
1166
|
...options,
|
|
1140
1167
|
...fnOptions,
|
|
1141
1168
|
throwOnError: true
|