@cloudfleet/sdk 0.0.1-8e907c6 → 0.0.1-9095a30
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 +498 -595
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/@tanstack/react-query.gen.js +451 -403
- 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 +377 -190
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +511 -269
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +244 -220
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +355 -320
- package/dist/sdk.gen.js.map +1 -1
- package/dist/types.gen.d.ts +1012 -802
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +1698 -1535
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +469 -346
- 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,37 +38,20 @@ export const getUsageOptions = (options) => queryOptions({
|
|
|
41
38
|
});
|
|
42
39
|
return data;
|
|
43
40
|
},
|
|
44
|
-
queryKey:
|
|
41
|
+
queryKey: listUserOrganizationsQueryKey(options)
|
|
45
42
|
});
|
|
43
|
+
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
46
44
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* 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.
|
|
45
|
+
* List users in organization.
|
|
50
46
|
*
|
|
51
|
-
|
|
52
|
-
export const getPaymentMethodSecretMutation = (options) => {
|
|
53
|
-
const mutationOptions = {
|
|
54
|
-
mutationFn: async (fnOptions) => {
|
|
55
|
-
const { data } = await BillingService.getPaymentMethodSecret({
|
|
56
|
-
...options,
|
|
57
|
-
...fnOptions,
|
|
58
|
-
throwOnError: true
|
|
59
|
-
});
|
|
60
|
-
return data;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return mutationOptions;
|
|
64
|
-
};
|
|
65
|
-
export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
|
|
66
|
-
/**
|
|
67
|
-
* List organization payment methods.
|
|
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.
|
|
68
48
|
*
|
|
69
|
-
*
|
|
49
|
+
* This endpoint is available to all users in the organization.
|
|
70
50
|
*
|
|
71
51
|
*/
|
|
72
|
-
export const
|
|
52
|
+
export const listUsersOptions = (options) => queryOptions({
|
|
73
53
|
queryFn: async ({ queryKey, signal }) => {
|
|
74
|
-
const { data } = await
|
|
54
|
+
const { data } = await UsersService.listUsers({
|
|
75
55
|
...options,
|
|
76
56
|
...queryKey[0],
|
|
77
57
|
signal,
|
|
@@ -79,18 +59,18 @@ export const listPaymentMethodsOptions = (options) => queryOptions({
|
|
|
79
59
|
});
|
|
80
60
|
return data;
|
|
81
61
|
},
|
|
82
|
-
queryKey:
|
|
62
|
+
queryKey: listUsersQueryKey(options)
|
|
83
63
|
});
|
|
84
64
|
/**
|
|
85
|
-
*
|
|
65
|
+
* Create a new user.
|
|
86
66
|
*
|
|
87
|
-
*
|
|
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.
|
|
88
68
|
*
|
|
89
69
|
*/
|
|
90
|
-
export const
|
|
70
|
+
export const createUserMutation = (options) => {
|
|
91
71
|
const mutationOptions = {
|
|
92
72
|
mutationFn: async (fnOptions) => {
|
|
93
|
-
const { data } = await
|
|
73
|
+
const { data } = await UsersService.createUser({
|
|
94
74
|
...options,
|
|
95
75
|
...fnOptions,
|
|
96
76
|
throwOnError: true
|
|
@@ -101,15 +81,15 @@ export const setDefaultPaymentMethodMutation = (options) => {
|
|
|
101
81
|
return mutationOptions;
|
|
102
82
|
};
|
|
103
83
|
/**
|
|
104
|
-
* Delete
|
|
84
|
+
* Delete user by id.
|
|
105
85
|
*
|
|
106
|
-
*
|
|
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.
|
|
107
87
|
*
|
|
108
88
|
*/
|
|
109
|
-
export const
|
|
89
|
+
export const deleteUserMutation = (options) => {
|
|
110
90
|
const mutationOptions = {
|
|
111
91
|
mutationFn: async (fnOptions) => {
|
|
112
|
-
const { data } = await
|
|
92
|
+
const { data } = await UsersService.deleteUser({
|
|
113
93
|
...options,
|
|
114
94
|
...fnOptions,
|
|
115
95
|
throwOnError: true
|
|
@@ -119,35 +99,18 @@ export const deletePaymentMethodMutation = (options) => {
|
|
|
119
99
|
};
|
|
120
100
|
return mutationOptions;
|
|
121
101
|
};
|
|
122
|
-
export const
|
|
102
|
+
export const getUserQueryKey = (options) => createQueryKey('getUser', options);
|
|
123
103
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* 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.
|
|
104
|
+
* Get user profile information by id.
|
|
127
105
|
*
|
|
128
|
-
|
|
129
|
-
export const listInvoicesOptions = (options) => queryOptions({
|
|
130
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
131
|
-
const { data } = await BillingService.listInvoices({
|
|
132
|
-
...options,
|
|
133
|
-
...queryKey[0],
|
|
134
|
-
signal,
|
|
135
|
-
throwOnError: true
|
|
136
|
-
});
|
|
137
|
-
return data;
|
|
138
|
-
},
|
|
139
|
-
queryKey: listInvoicesQueryKey(options)
|
|
140
|
-
});
|
|
141
|
-
export const getContactQueryKey = (options) => createQueryKey('getContact', options);
|
|
142
|
-
/**
|
|
143
|
-
* Get organization contact and billing address information.
|
|
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.
|
|
144
107
|
*
|
|
145
|
-
*
|
|
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 getContactOptions = (options) => queryOptions({
|
|
|
155
118
|
});
|
|
156
119
|
return data;
|
|
157
120
|
},
|
|
158
|
-
queryKey:
|
|
121
|
+
queryKey: getUserQueryKey(options)
|
|
159
122
|
});
|
|
160
123
|
/**
|
|
161
|
-
* Update
|
|
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,16 +139,16 @@ export const updateContactMutation = (options) => {
|
|
|
176
139
|
};
|
|
177
140
|
return mutationOptions;
|
|
178
141
|
};
|
|
179
|
-
export const
|
|
142
|
+
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
180
143
|
/**
|
|
181
|
-
*
|
|
144
|
+
* List access tokens in organization.
|
|
182
145
|
*
|
|
183
|
-
*
|
|
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.
|
|
184
147
|
*
|
|
185
148
|
*/
|
|
186
|
-
export const
|
|
149
|
+
export const listTokensOptions = (options) => queryOptions({
|
|
187
150
|
queryFn: async ({ queryKey, signal }) => {
|
|
188
|
-
const { data } = await
|
|
151
|
+
const { data } = await TokensService.listTokens({
|
|
189
152
|
...options,
|
|
190
153
|
...queryKey[0],
|
|
191
154
|
signal,
|
|
@@ -193,18 +156,20 @@ export const getCreditsOptions = (options) => queryOptions({
|
|
|
193
156
|
});
|
|
194
157
|
return data;
|
|
195
158
|
},
|
|
196
|
-
queryKey:
|
|
159
|
+
queryKey: listTokensQueryKey(options)
|
|
197
160
|
});
|
|
198
161
|
/**
|
|
199
|
-
*
|
|
162
|
+
* Create a new access token.
|
|
200
163
|
*
|
|
201
|
-
*
|
|
164
|
+
* This endpoint allows you to create a new access token. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton.
|
|
165
|
+
*
|
|
166
|
+
* This endpoint is available to administrators of the organization only.
|
|
202
167
|
*
|
|
203
168
|
*/
|
|
204
|
-
export const
|
|
169
|
+
export const createTokenMutation = (options) => {
|
|
205
170
|
const mutationOptions = {
|
|
206
171
|
mutationFn: async (fnOptions) => {
|
|
207
|
-
const { data } = await
|
|
172
|
+
const { data } = await TokensService.createToken({
|
|
208
173
|
...options,
|
|
209
174
|
...fnOptions,
|
|
210
175
|
throwOnError: true
|
|
@@ -214,18 +179,35 @@ export const redeemCreditsMutation = (options) => {
|
|
|
214
179
|
};
|
|
215
180
|
return mutationOptions;
|
|
216
181
|
};
|
|
217
|
-
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
218
182
|
/**
|
|
219
|
-
*
|
|
183
|
+
* Permanently delete access token.
|
|
220
184
|
*
|
|
221
|
-
*
|
|
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.
|
|
222
186
|
*
|
|
223
|
-
|
|
187
|
+
*/
|
|
188
|
+
export const deleteTokenMutation = (options) => {
|
|
189
|
+
const mutationOptions = {
|
|
190
|
+
mutationFn: async (fnOptions) => {
|
|
191
|
+
const { data } = await TokensService.deleteToken({
|
|
192
|
+
...options,
|
|
193
|
+
...fnOptions,
|
|
194
|
+
throwOnError: true
|
|
195
|
+
});
|
|
196
|
+
return data;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
return mutationOptions;
|
|
200
|
+
};
|
|
201
|
+
export const getTokenQueryKey = (options) => createQueryKey('getToken', options);
|
|
202
|
+
/**
|
|
203
|
+
* Get access token information.
|
|
204
|
+
*
|
|
205
|
+
* This endpoint allows you to get access token details. For more information about identity access management and security, see [Service Accounts](https://cloudfleet.ai/docs/organization/api-tokens/) section of documentaiton. This endpoint is available to all users in the organization.
|
|
224
206
|
*
|
|
225
207
|
*/
|
|
226
|
-
export const
|
|
208
|
+
export const getTokenOptions = (options) => queryOptions({
|
|
227
209
|
queryFn: async ({ queryKey, signal }) => {
|
|
228
|
-
const { data } = await
|
|
210
|
+
const { data } = await TokensService.getToken({
|
|
229
211
|
...options,
|
|
230
212
|
...queryKey[0],
|
|
231
213
|
signal,
|
|
@@ -233,20 +215,20 @@ export const listChartsOptions = (options) => queryOptions({
|
|
|
233
215
|
});
|
|
234
216
|
return data;
|
|
235
217
|
},
|
|
236
|
-
queryKey:
|
|
218
|
+
queryKey: getTokenQueryKey(options)
|
|
237
219
|
});
|
|
238
220
|
/**
|
|
239
|
-
*
|
|
221
|
+
* Update access token information.
|
|
240
222
|
*
|
|
241
|
-
*
|
|
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.
|
|
242
224
|
*
|
|
243
225
|
* This endpoint is available to administrators of the organization only.
|
|
244
226
|
*
|
|
245
227
|
*/
|
|
246
|
-
export const
|
|
228
|
+
export const updateTokenMutation = (options) => {
|
|
247
229
|
const mutationOptions = {
|
|
248
230
|
mutationFn: async (fnOptions) => {
|
|
249
|
-
const { data } = await
|
|
231
|
+
const { data } = await TokensService.updateToken({
|
|
250
232
|
...options,
|
|
251
233
|
...fnOptions,
|
|
252
234
|
throwOnError: true
|
|
@@ -257,17 +239,14 @@ export const createChartMutation = (options) => {
|
|
|
257
239
|
return mutationOptions;
|
|
258
240
|
};
|
|
259
241
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
263
|
-
*
|
|
264
|
-
* This endpoint is available to administrators of the organization only.
|
|
242
|
+
* Regenerate access token secret key.
|
|
265
243
|
*
|
|
244
|
+
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
266
245
|
*/
|
|
267
|
-
export const
|
|
246
|
+
export const regenerateTokenMutation = (options) => {
|
|
268
247
|
const mutationOptions = {
|
|
269
248
|
mutationFn: async (fnOptions) => {
|
|
270
|
-
const { data } = await
|
|
249
|
+
const { data } = await TokensService.regenerateToken({
|
|
271
250
|
...options,
|
|
272
251
|
...fnOptions,
|
|
273
252
|
throwOnError: true
|
|
@@ -277,18 +256,16 @@ export const deleteChartMutation = (options) => {
|
|
|
277
256
|
};
|
|
278
257
|
return mutationOptions;
|
|
279
258
|
};
|
|
280
|
-
export const
|
|
259
|
+
export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
|
|
281
260
|
/**
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* Returns the details of the chart deployment.
|
|
261
|
+
* List tickets for the current organization.
|
|
285
262
|
*
|
|
286
|
-
*
|
|
263
|
+
* Returns all tickets belonging to the caller's organization, newest first.
|
|
287
264
|
*
|
|
288
265
|
*/
|
|
289
|
-
export const
|
|
266
|
+
export const listTicketsOptions = (options) => queryOptions({
|
|
290
267
|
queryFn: async ({ queryKey, signal }) => {
|
|
291
|
-
const { data } = await
|
|
268
|
+
const { data } = await TicketsService.listTickets({
|
|
292
269
|
...options,
|
|
293
270
|
...queryKey[0],
|
|
294
271
|
signal,
|
|
@@ -296,20 +273,18 @@ export const getChartOptions = (options) => queryOptions({
|
|
|
296
273
|
});
|
|
297
274
|
return data;
|
|
298
275
|
},
|
|
299
|
-
queryKey:
|
|
276
|
+
queryKey: listTicketsQueryKey(options)
|
|
300
277
|
});
|
|
301
278
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* This endpoint allows you to update the values of a chart deployment.
|
|
279
|
+
* Create a new support ticket.
|
|
305
280
|
*
|
|
306
|
-
*
|
|
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).
|
|
307
282
|
*
|
|
308
283
|
*/
|
|
309
|
-
export const
|
|
284
|
+
export const createTicketMutation = (options) => {
|
|
310
285
|
const mutationOptions = {
|
|
311
286
|
mutationFn: async (fnOptions) => {
|
|
312
|
-
const { data } = await
|
|
287
|
+
const { data } = await TicketsService.createTicket({
|
|
313
288
|
...options,
|
|
314
289
|
...fnOptions,
|
|
315
290
|
throwOnError: true
|
|
@@ -319,39 +294,16 @@ export const updateChartMutation = (options) => {
|
|
|
319
294
|
};
|
|
320
295
|
return mutationOptions;
|
|
321
296
|
};
|
|
322
|
-
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
323
297
|
/**
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
* Returns a list of fleets belonging to the cluster. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
327
|
-
*
|
|
328
|
-
* This endpoint is available to all users in the organization.
|
|
329
|
-
*
|
|
330
|
-
*/
|
|
331
|
-
export const listFleetsOptions = (options) => queryOptions({
|
|
332
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
333
|
-
const { data } = await ClustersService.listFleets({
|
|
334
|
-
...options,
|
|
335
|
-
...queryKey[0],
|
|
336
|
-
signal,
|
|
337
|
-
throwOnError: true
|
|
338
|
-
});
|
|
339
|
-
return data;
|
|
340
|
-
},
|
|
341
|
-
queryKey: listFleetsQueryKey(options)
|
|
342
|
-
});
|
|
343
|
-
/**
|
|
344
|
-
* Create a new fleet.
|
|
345
|
-
*
|
|
346
|
-
* 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.
|
|
298
|
+
* Close a ticket (soft close).
|
|
347
299
|
*
|
|
348
|
-
*
|
|
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.
|
|
349
301
|
*
|
|
350
302
|
*/
|
|
351
|
-
export const
|
|
303
|
+
export const closeTicketMutation = (options) => {
|
|
352
304
|
const mutationOptions = {
|
|
353
305
|
mutationFn: async (fnOptions) => {
|
|
354
|
-
const { data } = await
|
|
306
|
+
const { data } = await TicketsService.closeTicket({
|
|
355
307
|
...options,
|
|
356
308
|
...fnOptions,
|
|
357
309
|
throwOnError: true
|
|
@@ -361,18 +313,32 @@ export const createFleetMutation = (options) => {
|
|
|
361
313
|
};
|
|
362
314
|
return mutationOptions;
|
|
363
315
|
};
|
|
316
|
+
export const getTicketQueryKey = (options) => createQueryKey('getTicket', options);
|
|
364
317
|
/**
|
|
365
|
-
*
|
|
366
|
-
|
|
367
|
-
|
|
318
|
+
* Get a ticket and its messages.
|
|
319
|
+
*/
|
|
320
|
+
export const getTicketOptions = (options) => queryOptions({
|
|
321
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
322
|
+
const { data } = await TicketsService.getTicket({
|
|
323
|
+
...options,
|
|
324
|
+
...queryKey[0],
|
|
325
|
+
signal,
|
|
326
|
+
throwOnError: true
|
|
327
|
+
});
|
|
328
|
+
return data;
|
|
329
|
+
},
|
|
330
|
+
queryKey: getTicketQueryKey(options)
|
|
331
|
+
});
|
|
332
|
+
/**
|
|
333
|
+
* Append a customer reply to a ticket.
|
|
368
334
|
*
|
|
369
|
-
*
|
|
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.
|
|
370
336
|
*
|
|
371
337
|
*/
|
|
372
|
-
export const
|
|
338
|
+
export const replyTicketMutation = (options) => {
|
|
373
339
|
const mutationOptions = {
|
|
374
340
|
mutationFn: async (fnOptions) => {
|
|
375
|
-
const { data } = await
|
|
341
|
+
const { data } = await TicketsService.replyTicket({
|
|
376
342
|
...options,
|
|
377
343
|
...fnOptions,
|
|
378
344
|
throwOnError: true
|
|
@@ -382,18 +348,32 @@ export const deleteFleetMutation = (options) => {
|
|
|
382
348
|
};
|
|
383
349
|
return mutationOptions;
|
|
384
350
|
};
|
|
385
|
-
export const
|
|
351
|
+
export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
|
|
386
352
|
/**
|
|
387
|
-
*
|
|
388
|
-
|
|
389
|
-
|
|
353
|
+
* Download a ticket attachment.
|
|
354
|
+
*/
|
|
355
|
+
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
356
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
357
|
+
const { data } = await TicketsService.getTicketAttachment({
|
|
358
|
+
...options,
|
|
359
|
+
...queryKey[0],
|
|
360
|
+
signal,
|
|
361
|
+
throwOnError: true
|
|
362
|
+
});
|
|
363
|
+
return data;
|
|
364
|
+
},
|
|
365
|
+
queryKey: getTicketAttachmentQueryKey(options)
|
|
366
|
+
});
|
|
367
|
+
export const listRepositoriesQueryKey = (options) => createQueryKey('listRepositories', options);
|
|
368
|
+
/**
|
|
369
|
+
* List repositories
|
|
390
370
|
*
|
|
391
|
-
* 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.
|
|
392
372
|
*
|
|
393
373
|
*/
|
|
394
|
-
export const
|
|
374
|
+
export const listRepositoriesOptions = (options) => queryOptions({
|
|
395
375
|
queryFn: async ({ queryKey, signal }) => {
|
|
396
|
-
const { data } = await
|
|
376
|
+
const { data } = await RegistryService.listRepositories({
|
|
397
377
|
...options,
|
|
398
378
|
...queryKey[0],
|
|
399
379
|
signal,
|
|
@@ -401,24 +381,37 @@ export const getFleetOptions = (options) => queryOptions({
|
|
|
401
381
|
});
|
|
402
382
|
return data;
|
|
403
383
|
},
|
|
404
|
-
queryKey:
|
|
384
|
+
queryKey: listRepositoriesQueryKey(options)
|
|
405
385
|
});
|
|
386
|
+
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
406
387
|
/**
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* This endpoint allows you to update fleet details.
|
|
388
|
+
* List tags for a repository
|
|
410
389
|
*
|
|
411
|
-
*
|
|
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.
|
|
412
391
|
*
|
|
413
|
-
|
|
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
|
|
414
407
|
*
|
|
415
|
-
* 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.
|
|
416
409
|
*
|
|
417
410
|
*/
|
|
418
|
-
export const
|
|
411
|
+
export const deleteTagMutation = (options) => {
|
|
419
412
|
const mutationOptions = {
|
|
420
413
|
mutationFn: async (fnOptions) => {
|
|
421
|
-
const { data } = await
|
|
414
|
+
const { data } = await RegistryService.deleteTag({
|
|
422
415
|
...options,
|
|
423
416
|
...fnOptions,
|
|
424
417
|
throwOnError: true
|
|
@@ -428,15 +421,16 @@ export const updateFleetMutation = (options) => {
|
|
|
428
421
|
};
|
|
429
422
|
return mutationOptions;
|
|
430
423
|
};
|
|
431
|
-
export const
|
|
424
|
+
export const getTagQueryKey = (options) => createQueryKey('getTag', options);
|
|
432
425
|
/**
|
|
433
|
-
*
|
|
426
|
+
* Get tag details
|
|
427
|
+
*
|
|
428
|
+
* Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
|
|
434
429
|
*
|
|
435
|
-
* 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.
|
|
436
430
|
*/
|
|
437
|
-
export const
|
|
431
|
+
export const getTagOptions = (options) => queryOptions({
|
|
438
432
|
queryFn: async ({ queryKey, signal }) => {
|
|
439
|
-
const { data } = await
|
|
433
|
+
const { data } = await RegistryService.getTag({
|
|
440
434
|
...options,
|
|
441
435
|
...queryKey[0],
|
|
442
436
|
signal,
|
|
@@ -444,20 +438,20 @@ export const queryClusterOptions = (options) => queryOptions({
|
|
|
444
438
|
});
|
|
445
439
|
return data;
|
|
446
440
|
},
|
|
447
|
-
queryKey:
|
|
441
|
+
queryKey: getTagQueryKey(options)
|
|
448
442
|
});
|
|
449
|
-
export const
|
|
443
|
+
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
450
444
|
/**
|
|
451
|
-
*
|
|
445
|
+
* Get organization information.
|
|
452
446
|
*
|
|
453
|
-
* 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.
|
|
454
448
|
*
|
|
455
449
|
* This endpoint is available to all users in the organization.
|
|
456
450
|
*
|
|
457
451
|
*/
|
|
458
|
-
export const
|
|
452
|
+
export const getOrganizationOptions = (options) => queryOptions({
|
|
459
453
|
queryFn: async ({ queryKey, signal }) => {
|
|
460
|
-
const { data } = await
|
|
454
|
+
const { data } = await OrganizationService.getOrganization({
|
|
461
455
|
...options,
|
|
462
456
|
...queryKey[0],
|
|
463
457
|
signal,
|
|
@@ -465,41 +459,18 @@ export const listClustersOptions = (options) => queryOptions({
|
|
|
465
459
|
});
|
|
466
460
|
return data;
|
|
467
461
|
},
|
|
468
|
-
queryKey:
|
|
462
|
+
queryKey: getOrganizationQueryKey(options)
|
|
469
463
|
});
|
|
470
464
|
/**
|
|
471
|
-
* Create a new
|
|
472
|
-
*
|
|
473
|
-
* 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.
|
|
474
|
-
*
|
|
475
|
-
* This endpoint is available to administrators of the organization only.
|
|
476
|
-
*
|
|
477
|
-
*/
|
|
478
|
-
export const createClusterMutation = (options) => {
|
|
479
|
-
const mutationOptions = {
|
|
480
|
-
mutationFn: async (fnOptions) => {
|
|
481
|
-
const { data } = await ClustersService.createCluster({
|
|
482
|
-
...options,
|
|
483
|
-
...fnOptions,
|
|
484
|
-
throwOnError: true
|
|
485
|
-
});
|
|
486
|
-
return data;
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
return mutationOptions;
|
|
490
|
-
};
|
|
491
|
-
/**
|
|
492
|
-
* Permanently delete cluster.
|
|
493
|
-
*
|
|
494
|
-
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
465
|
+
* Create a new organization / Cloudfleet account signup.
|
|
495
466
|
*
|
|
496
|
-
* This endpoint
|
|
467
|
+
* This endpoint allows you to create a new Cloudfleet organization and an administrator user.
|
|
497
468
|
*
|
|
498
469
|
*/
|
|
499
|
-
export const
|
|
470
|
+
export const createOrganizationMutation = (options) => {
|
|
500
471
|
const mutationOptions = {
|
|
501
472
|
mutationFn: async (fnOptions) => {
|
|
502
|
-
const { data } = await
|
|
473
|
+
const { data } = await OrganizationService.createOrganization({
|
|
503
474
|
...options,
|
|
504
475
|
...fnOptions,
|
|
505
476
|
throwOnError: true
|
|
@@ -509,18 +480,18 @@ export const deleteClusterMutation = (options) => {
|
|
|
509
480
|
};
|
|
510
481
|
return mutationOptions;
|
|
511
482
|
};
|
|
512
|
-
export const
|
|
483
|
+
export const getBasicPriceConsentQueryKey = (options) => createQueryKey('getBasicPriceConsent', options);
|
|
513
484
|
/**
|
|
514
|
-
* Get
|
|
485
|
+
* Get the organization's consent status for the new Basic price.
|
|
515
486
|
*
|
|
516
|
-
* 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.
|
|
517
488
|
*
|
|
518
|
-
* This endpoint is available to all users in the organization.
|
|
489
|
+
* This endpoint is available to all users in the organization and drives the consent dialog in the console.
|
|
519
490
|
*
|
|
520
491
|
*/
|
|
521
|
-
export const
|
|
492
|
+
export const getBasicPriceConsentOptions = (options) => queryOptions({
|
|
522
493
|
queryFn: async ({ queryKey, signal }) => {
|
|
523
|
-
const { data } = await
|
|
494
|
+
const { data } = await OrganizationService.getBasicPriceConsent({
|
|
524
495
|
...options,
|
|
525
496
|
...queryKey[0],
|
|
526
497
|
signal,
|
|
@@ -528,20 +499,18 @@ export const getClusterOptions = (options) => queryOptions({
|
|
|
528
499
|
});
|
|
529
500
|
return data;
|
|
530
501
|
},
|
|
531
|
-
queryKey:
|
|
502
|
+
queryKey: getBasicPriceConsentQueryKey(options)
|
|
532
503
|
});
|
|
533
504
|
/**
|
|
534
|
-
*
|
|
505
|
+
* Record an administrator's decision on the new Basic price.
|
|
535
506
|
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* This endpoint is available to administrators of the organization only.
|
|
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.
|
|
539
508
|
*
|
|
540
509
|
*/
|
|
541
|
-
export const
|
|
510
|
+
export const setBasicPriceConsentMutation = (options) => {
|
|
542
511
|
const mutationOptions = {
|
|
543
512
|
mutationFn: async (fnOptions) => {
|
|
544
|
-
const { data } = await
|
|
513
|
+
const { data } = await OrganizationService.setBasicPriceConsent({
|
|
545
514
|
...options,
|
|
546
515
|
...fnOptions,
|
|
547
516
|
throwOnError: true
|
|
@@ -552,15 +521,14 @@ export const updateClusterMutation = (options) => {
|
|
|
552
521
|
return mutationOptions;
|
|
553
522
|
};
|
|
554
523
|
/**
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
* 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.
|
|
524
|
+
* MCP endpoint
|
|
558
525
|
*
|
|
526
|
+
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
559
527
|
*/
|
|
560
|
-
export const
|
|
528
|
+
export const postMcpMutation = (options) => {
|
|
561
529
|
const mutationOptions = {
|
|
562
530
|
mutationFn: async (fnOptions) => {
|
|
563
|
-
const { data } = await
|
|
531
|
+
const { data } = await McpService.postMcp({
|
|
564
532
|
...options,
|
|
565
533
|
...fnOptions,
|
|
566
534
|
throwOnError: true
|
|
@@ -570,6 +538,50 @@ export const getJoinInformationMutation = (options) => {
|
|
|
570
538
|
};
|
|
571
539
|
return mutationOptions;
|
|
572
540
|
};
|
|
541
|
+
export const listMarketplaceChartsQueryKey = (options) => createQueryKey('listMarketplaceCharts', options);
|
|
542
|
+
/**
|
|
543
|
+
* List chart listings available in the marketplace.
|
|
544
|
+
*
|
|
545
|
+
* Returns a list of available charts in the marketplace.
|
|
546
|
+
*
|
|
547
|
+
* This endpoint is available to all users in the organization.
|
|
548
|
+
*
|
|
549
|
+
*/
|
|
550
|
+
export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
551
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
552
|
+
const { data } = await ChartsMarketplaceService.listMarketplaceCharts({
|
|
553
|
+
...options,
|
|
554
|
+
...queryKey[0],
|
|
555
|
+
signal,
|
|
556
|
+
throwOnError: true
|
|
557
|
+
});
|
|
558
|
+
return data;
|
|
559
|
+
},
|
|
560
|
+
queryKey: listMarketplaceChartsQueryKey(options)
|
|
561
|
+
});
|
|
562
|
+
export const getMarketplaceChartFilesQueryKey = (options) => createQueryKey('getMarketplaceChartFiles', options);
|
|
563
|
+
/**
|
|
564
|
+
* Get chart files for a specific version channel.
|
|
565
|
+
*
|
|
566
|
+
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
567
|
+
*
|
|
568
|
+
* 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.
|
|
569
|
+
*
|
|
570
|
+
* This endpoint is available to all users in the organization.
|
|
571
|
+
*
|
|
572
|
+
*/
|
|
573
|
+
export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
574
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
575
|
+
const { data } = await ChartsMarketplaceService.getMarketplaceChartFiles({
|
|
576
|
+
...options,
|
|
577
|
+
...queryKey[0],
|
|
578
|
+
signal,
|
|
579
|
+
throwOnError: true
|
|
580
|
+
});
|
|
581
|
+
return data;
|
|
582
|
+
},
|
|
583
|
+
queryKey: getMarketplaceChartFilesQueryKey(options)
|
|
584
|
+
});
|
|
573
585
|
export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
|
|
574
586
|
/**
|
|
575
587
|
* List invites.
|
|
@@ -646,18 +658,15 @@ export const deleteInviteMutation = (options) => {
|
|
|
646
658
|
};
|
|
647
659
|
return mutationOptions;
|
|
648
660
|
};
|
|
649
|
-
export const
|
|
661
|
+
export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
|
|
650
662
|
/**
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
* Returns a list of available charts in the marketplace.
|
|
654
|
-
*
|
|
655
|
-
* This endpoint is available to all users in the organization.
|
|
663
|
+
* Query Kubernetes cluster API
|
|
656
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.
|
|
657
666
|
*/
|
|
658
|
-
export const
|
|
667
|
+
export const queryClusterOptions = (options) => queryOptions({
|
|
659
668
|
queryFn: async ({ queryKey, signal }) => {
|
|
660
|
-
const { data } = await
|
|
669
|
+
const { data } = await ClustersService.queryCluster({
|
|
661
670
|
...options,
|
|
662
671
|
...queryKey[0],
|
|
663
672
|
signal,
|
|
@@ -665,22 +674,20 @@ export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
|
665
674
|
});
|
|
666
675
|
return data;
|
|
667
676
|
},
|
|
668
|
-
queryKey:
|
|
677
|
+
queryKey: queryClusterQueryKey(options)
|
|
669
678
|
});
|
|
670
|
-
export const
|
|
679
|
+
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
671
680
|
/**
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
681
|
+
* List fleets.
|
|
675
682
|
*
|
|
676
|
-
*
|
|
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.
|
|
677
684
|
*
|
|
678
685
|
* This endpoint is available to all users in the organization.
|
|
679
686
|
*
|
|
680
687
|
*/
|
|
681
|
-
export const
|
|
688
|
+
export const listFleetsOptions = (options) => queryOptions({
|
|
682
689
|
queryFn: async ({ queryKey, signal }) => {
|
|
683
|
-
const { data } = await
|
|
690
|
+
const { data } = await ClustersService.listFleets({
|
|
684
691
|
...options,
|
|
685
692
|
...queryKey[0],
|
|
686
693
|
signal,
|
|
@@ -688,17 +695,22 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
|
688
695
|
});
|
|
689
696
|
return data;
|
|
690
697
|
},
|
|
691
|
-
queryKey:
|
|
698
|
+
queryKey: listFleetsQueryKey(options)
|
|
692
699
|
});
|
|
693
700
|
/**
|
|
694
|
-
*
|
|
701
|
+
* Create a new fleet.
|
|
702
|
+
*
|
|
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.
|
|
695
708
|
*
|
|
696
|
-
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
697
709
|
*/
|
|
698
|
-
export const
|
|
710
|
+
export const createFleetMutation = (options) => {
|
|
699
711
|
const mutationOptions = {
|
|
700
712
|
mutationFn: async (fnOptions) => {
|
|
701
|
-
const { data } = await
|
|
713
|
+
const { data } = await ClustersService.createFleet({
|
|
702
714
|
...options,
|
|
703
715
|
...fnOptions,
|
|
704
716
|
throwOnError: true
|
|
@@ -708,37 +720,20 @@ export const postMcpMutation = (options) => {
|
|
|
708
720
|
};
|
|
709
721
|
return mutationOptions;
|
|
710
722
|
};
|
|
711
|
-
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
712
723
|
/**
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
* Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
724
|
+
* Permanently delete fleet.
|
|
716
725
|
*
|
|
717
|
-
* This endpoint
|
|
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.
|
|
718
727
|
*
|
|
719
|
-
|
|
720
|
-
export const getOrganizationOptions = (options) => queryOptions({
|
|
721
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
722
|
-
const { data } = await OrganizationService.getOrganization({
|
|
723
|
-
...options,
|
|
724
|
-
...queryKey[0],
|
|
725
|
-
signal,
|
|
726
|
-
throwOnError: true
|
|
727
|
-
});
|
|
728
|
-
return data;
|
|
729
|
-
},
|
|
730
|
-
queryKey: getOrganizationQueryKey(options)
|
|
731
|
-
});
|
|
732
|
-
/**
|
|
733
|
-
* Create a new organization / Cloudfleet account signup.
|
|
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.
|
|
734
729
|
*
|
|
735
|
-
* This endpoint
|
|
730
|
+
* This endpoint is available to administrators of the organization only.
|
|
736
731
|
*
|
|
737
732
|
*/
|
|
738
|
-
export const
|
|
733
|
+
export const deleteFleetMutation = (options) => {
|
|
739
734
|
const mutationOptions = {
|
|
740
735
|
mutationFn: async (fnOptions) => {
|
|
741
|
-
const { data } = await
|
|
736
|
+
const { data } = await ClustersService.deleteFleet({
|
|
742
737
|
...options,
|
|
743
738
|
...fnOptions,
|
|
744
739
|
throwOnError: true
|
|
@@ -748,16 +743,18 @@ export const createOrganizationMutation = (options) => {
|
|
|
748
743
|
};
|
|
749
744
|
return mutationOptions;
|
|
750
745
|
};
|
|
751
|
-
export const
|
|
746
|
+
export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
|
|
752
747
|
/**
|
|
753
|
-
*
|
|
748
|
+
* Get fleet information.
|
|
754
749
|
*
|
|
755
|
-
* Returns
|
|
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.
|
|
756
753
|
*
|
|
757
754
|
*/
|
|
758
|
-
export const
|
|
755
|
+
export const getFleetOptions = (options) => queryOptions({
|
|
759
756
|
queryFn: async ({ queryKey, signal }) => {
|
|
760
|
-
const { data } = await
|
|
757
|
+
const { data } = await ClustersService.getFleet({
|
|
761
758
|
...options,
|
|
762
759
|
...queryKey[0],
|
|
763
760
|
signal,
|
|
@@ -765,37 +762,24 @@ export const listRepositoriesOptions = (options) => queryOptions({
|
|
|
765
762
|
});
|
|
766
763
|
return data;
|
|
767
764
|
},
|
|
768
|
-
queryKey:
|
|
765
|
+
queryKey: getFleetQueryKey(options)
|
|
769
766
|
});
|
|
770
|
-
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
771
767
|
/**
|
|
772
|
-
*
|
|
768
|
+
* Update fleet information.
|
|
773
769
|
*
|
|
774
|
-
*
|
|
770
|
+
* This endpoint allows you to update fleet details.
|
|
775
771
|
*
|
|
776
|
-
|
|
777
|
-
export const listTagsOptions = (options) => queryOptions({
|
|
778
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
779
|
-
const { data } = await RegistryService.listTags({
|
|
780
|
-
...options,
|
|
781
|
-
...queryKey[0],
|
|
782
|
-
signal,
|
|
783
|
-
throwOnError: true
|
|
784
|
-
});
|
|
785
|
-
return data;
|
|
786
|
-
},
|
|
787
|
-
queryKey: listTagsQueryKey(options)
|
|
788
|
-
});
|
|
789
|
-
/**
|
|
790
|
-
* Delete tag
|
|
772
|
+
* For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
791
773
|
*
|
|
792
|
-
*
|
|
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.
|
|
793
777
|
*
|
|
794
778
|
*/
|
|
795
|
-
export const
|
|
779
|
+
export const updateFleetMutation = (options) => {
|
|
796
780
|
const mutationOptions = {
|
|
797
781
|
mutationFn: async (fnOptions) => {
|
|
798
|
-
const { data } = await
|
|
782
|
+
const { data } = await ClustersService.updateFleet({
|
|
799
783
|
...options,
|
|
800
784
|
...fnOptions,
|
|
801
785
|
throwOnError: true
|
|
@@ -805,35 +789,18 @@ export const deleteTagMutation = (options) => {
|
|
|
805
789
|
};
|
|
806
790
|
return mutationOptions;
|
|
807
791
|
};
|
|
808
|
-
export const
|
|
792
|
+
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
809
793
|
/**
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* 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.
|
|
794
|
+
* List charts.
|
|
813
795
|
*
|
|
814
|
-
|
|
815
|
-
export const getTagOptions = (options) => queryOptions({
|
|
816
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
817
|
-
const { data } = await RegistryService.getTag({
|
|
818
|
-
...options,
|
|
819
|
-
...queryKey[0],
|
|
820
|
-
signal,
|
|
821
|
-
throwOnError: true
|
|
822
|
-
});
|
|
823
|
-
return data;
|
|
824
|
-
},
|
|
825
|
-
queryKey: getTagQueryKey(options)
|
|
826
|
-
});
|
|
827
|
-
export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
|
|
828
|
-
/**
|
|
829
|
-
* List tickets for the current organization.
|
|
796
|
+
* Returns a list of charts in the cluster.
|
|
830
797
|
*
|
|
831
|
-
*
|
|
798
|
+
* This endpoint is available to all users in the organization.
|
|
832
799
|
*
|
|
833
800
|
*/
|
|
834
|
-
export const
|
|
801
|
+
export const listChartsOptions = (options) => queryOptions({
|
|
835
802
|
queryFn: async ({ queryKey, signal }) => {
|
|
836
|
-
const { data } = await
|
|
803
|
+
const { data } = await ClustersService.listCharts({
|
|
837
804
|
...options,
|
|
838
805
|
...queryKey[0],
|
|
839
806
|
signal,
|
|
@@ -841,18 +808,20 @@ export const listTicketsOptions = (options) => queryOptions({
|
|
|
841
808
|
});
|
|
842
809
|
return data;
|
|
843
810
|
},
|
|
844
|
-
queryKey:
|
|
811
|
+
queryKey: listChartsQueryKey(options)
|
|
845
812
|
});
|
|
846
813
|
/**
|
|
847
|
-
* Create a new
|
|
814
|
+
* Create a new chart.
|
|
815
|
+
*
|
|
816
|
+
* Create a new chart deployment.
|
|
848
817
|
*
|
|
849
|
-
*
|
|
818
|
+
* This endpoint is available to administrators of the organization only.
|
|
850
819
|
*
|
|
851
820
|
*/
|
|
852
|
-
export const
|
|
821
|
+
export const createChartMutation = (options) => {
|
|
853
822
|
const mutationOptions = {
|
|
854
823
|
mutationFn: async (fnOptions) => {
|
|
855
|
-
const { data } = await
|
|
824
|
+
const { data } = await ClustersService.createChart({
|
|
856
825
|
...options,
|
|
857
826
|
...fnOptions,
|
|
858
827
|
throwOnError: true
|
|
@@ -863,15 +832,17 @@ export const createTicketMutation = (options) => {
|
|
|
863
832
|
return mutationOptions;
|
|
864
833
|
};
|
|
865
834
|
/**
|
|
866
|
-
*
|
|
835
|
+
* Permanently delete the chart deployment from the cluster.
|
|
867
836
|
*
|
|
868
|
-
*
|
|
837
|
+
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
838
|
+
*
|
|
839
|
+
* This endpoint is available to administrators of the organization only.
|
|
869
840
|
*
|
|
870
841
|
*/
|
|
871
|
-
export const
|
|
842
|
+
export const deleteChartMutation = (options) => {
|
|
872
843
|
const mutationOptions = {
|
|
873
844
|
mutationFn: async (fnOptions) => {
|
|
874
|
-
const { data } = await
|
|
845
|
+
const { data } = await ClustersService.deleteChart({
|
|
875
846
|
...options,
|
|
876
847
|
...fnOptions,
|
|
877
848
|
throwOnError: true
|
|
@@ -881,13 +852,18 @@ export const closeTicketMutation = (options) => {
|
|
|
881
852
|
};
|
|
882
853
|
return mutationOptions;
|
|
883
854
|
};
|
|
884
|
-
export const
|
|
855
|
+
export const getChartQueryKey = (options) => createQueryKey('getChart', options);
|
|
885
856
|
/**
|
|
886
|
-
* Get
|
|
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
|
+
*
|
|
887
863
|
*/
|
|
888
|
-
export const
|
|
864
|
+
export const getChartOptions = (options) => queryOptions({
|
|
889
865
|
queryFn: async ({ queryKey, signal }) => {
|
|
890
|
-
const { data } = await
|
|
866
|
+
const { data } = await ClustersService.getChart({
|
|
891
867
|
...options,
|
|
892
868
|
...queryKey[0],
|
|
893
869
|
signal,
|
|
@@ -895,18 +871,20 @@ export const getTicketOptions = (options) => queryOptions({
|
|
|
895
871
|
});
|
|
896
872
|
return data;
|
|
897
873
|
},
|
|
898
|
-
queryKey:
|
|
874
|
+
queryKey: getChartQueryKey(options)
|
|
899
875
|
});
|
|
900
876
|
/**
|
|
901
|
-
*
|
|
877
|
+
* Update chart information.
|
|
902
878
|
*
|
|
903
|
-
*
|
|
879
|
+
* This endpoint allows you to update the values of a chart deployment.
|
|
880
|
+
*
|
|
881
|
+
* This endpoint is available to administrators of the organization only.
|
|
904
882
|
*
|
|
905
883
|
*/
|
|
906
|
-
export const
|
|
884
|
+
export const updateChartMutation = (options) => {
|
|
907
885
|
const mutationOptions = {
|
|
908
886
|
mutationFn: async (fnOptions) => {
|
|
909
|
-
const { data } = await
|
|
887
|
+
const { data } = await ClustersService.updateChart({
|
|
910
888
|
...options,
|
|
911
889
|
...fnOptions,
|
|
912
890
|
throwOnError: true
|
|
@@ -916,32 +894,18 @@ export const replyTicketMutation = (options) => {
|
|
|
916
894
|
};
|
|
917
895
|
return mutationOptions;
|
|
918
896
|
};
|
|
919
|
-
export const
|
|
920
|
-
/**
|
|
921
|
-
* Download a ticket attachment.
|
|
922
|
-
*/
|
|
923
|
-
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
924
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
925
|
-
const { data } = await TicketsService.getTicketAttachment({
|
|
926
|
-
...options,
|
|
927
|
-
...queryKey[0],
|
|
928
|
-
signal,
|
|
929
|
-
throwOnError: true
|
|
930
|
-
});
|
|
931
|
-
return data;
|
|
932
|
-
},
|
|
933
|
-
queryKey: getTicketAttachmentQueryKey(options)
|
|
934
|
-
});
|
|
935
|
-
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
897
|
+
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
936
898
|
/**
|
|
937
|
-
* List
|
|
899
|
+
* List clusters.
|
|
938
900
|
*
|
|
939
|
-
*
|
|
901
|
+
* Returns a list of clusters under the current organization.
|
|
902
|
+
*
|
|
903
|
+
* This endpoint is available to all users in the organization.
|
|
940
904
|
*
|
|
941
905
|
*/
|
|
942
|
-
export const
|
|
906
|
+
export const listClustersOptions = (options) => queryOptions({
|
|
943
907
|
queryFn: async ({ queryKey, signal }) => {
|
|
944
|
-
const { data } = await
|
|
908
|
+
const { data } = await ClustersService.listClusters({
|
|
945
909
|
...options,
|
|
946
910
|
...queryKey[0],
|
|
947
911
|
signal,
|
|
@@ -949,20 +913,20 @@ export const listTokensOptions = (options) => queryOptions({
|
|
|
949
913
|
});
|
|
950
914
|
return data;
|
|
951
915
|
},
|
|
952
|
-
queryKey:
|
|
916
|
+
queryKey: listClustersQueryKey(options)
|
|
953
917
|
});
|
|
954
918
|
/**
|
|
955
|
-
* Create a new
|
|
919
|
+
* Create a new cluster.
|
|
956
920
|
*
|
|
957
|
-
*
|
|
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.
|
|
958
922
|
*
|
|
959
923
|
* This endpoint is available to administrators of the organization only.
|
|
960
924
|
*
|
|
961
925
|
*/
|
|
962
|
-
export const
|
|
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
|
|
@@ -973,15 +937,19 @@ export const createTokenMutation = (options) => {
|
|
|
973
937
|
return mutationOptions;
|
|
974
938
|
};
|
|
975
939
|
/**
|
|
976
|
-
* Permanently delete
|
|
940
|
+
* Permanently delete cluster.
|
|
977
941
|
*
|
|
978
|
-
* 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.
|
|
979
947
|
*
|
|
980
948
|
*/
|
|
981
|
-
export const
|
|
949
|
+
export const deleteClusterMutation = (options) => {
|
|
982
950
|
const mutationOptions = {
|
|
983
951
|
mutationFn: async (fnOptions) => {
|
|
984
|
-
const { data } = await
|
|
952
|
+
const { data } = await ClustersService.deleteCluster({
|
|
985
953
|
...options,
|
|
986
954
|
...fnOptions,
|
|
987
955
|
throwOnError: true
|
|
@@ -991,16 +959,18 @@ export const deleteTokenMutation = (options) => {
|
|
|
991
959
|
};
|
|
992
960
|
return mutationOptions;
|
|
993
961
|
};
|
|
994
|
-
export const
|
|
962
|
+
export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
|
|
995
963
|
/**
|
|
996
|
-
* Get
|
|
964
|
+
* Get cluster information.
|
|
997
965
|
*
|
|
998
|
-
*
|
|
966
|
+
* Returns cluster details.
|
|
967
|
+
*
|
|
968
|
+
* This endpoint is available to all users in the organization.
|
|
999
969
|
*
|
|
1000
970
|
*/
|
|
1001
|
-
export const
|
|
971
|
+
export const getClusterOptions = (options) => queryOptions({
|
|
1002
972
|
queryFn: async ({ queryKey, signal }) => {
|
|
1003
|
-
const { data } = await
|
|
973
|
+
const { data } = await ClustersService.getCluster({
|
|
1004
974
|
...options,
|
|
1005
975
|
...queryKey[0],
|
|
1006
976
|
signal,
|
|
@@ -1008,20 +978,22 @@ export const getTokenOptions = (options) => queryOptions({
|
|
|
1008
978
|
});
|
|
1009
979
|
return data;
|
|
1010
980
|
},
|
|
1011
|
-
queryKey:
|
|
981
|
+
queryKey: getClusterQueryKey(options)
|
|
1012
982
|
});
|
|
1013
983
|
/**
|
|
1014
|
-
* Update
|
|
984
|
+
* Update cluster information.
|
|
1015
985
|
*
|
|
1016
|
-
* 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.
|
|
1017
989
|
*
|
|
1018
990
|
* This endpoint is available to administrators of the organization only.
|
|
1019
991
|
*
|
|
1020
992
|
*/
|
|
1021
|
-
export const
|
|
993
|
+
export const updateClusterMutation = (options) => {
|
|
1022
994
|
const mutationOptions = {
|
|
1023
995
|
mutationFn: async (fnOptions) => {
|
|
1024
|
-
const { data } = await
|
|
996
|
+
const { data } = await ClustersService.updateCluster({
|
|
1025
997
|
...options,
|
|
1026
998
|
...fnOptions,
|
|
1027
999
|
throwOnError: true
|
|
@@ -1032,14 +1004,15 @@ export const updateTokenMutation = (options) => {
|
|
|
1032
1004
|
return mutationOptions;
|
|
1033
1005
|
};
|
|
1034
1006
|
/**
|
|
1035
|
-
*
|
|
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.
|
|
1036
1010
|
*
|
|
1037
|
-
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
1038
1011
|
*/
|
|
1039
|
-
export const
|
|
1012
|
+
export const getJoinInformationMutation = (options) => {
|
|
1040
1013
|
const mutationOptions = {
|
|
1041
1014
|
mutationFn: async (fnOptions) => {
|
|
1042
|
-
const { data } = await
|
|
1015
|
+
const { data } = await ClustersService.getJoinInformation({
|
|
1043
1016
|
...options,
|
|
1044
1017
|
...fnOptions,
|
|
1045
1018
|
throwOnError: true
|
|
@@ -1049,13 +1022,16 @@ export const regenerateTokenMutation = (options) => {
|
|
|
1049
1022
|
};
|
|
1050
1023
|
return mutationOptions;
|
|
1051
1024
|
};
|
|
1052
|
-
export const
|
|
1025
|
+
export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
|
|
1053
1026
|
/**
|
|
1054
|
-
* 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
|
+
*
|
|
1055
1031
|
*/
|
|
1056
|
-
export const
|
|
1032
|
+
export const getUsageOptions = (options) => queryOptions({
|
|
1057
1033
|
queryFn: async ({ queryKey, signal }) => {
|
|
1058
|
-
const { data } = await
|
|
1034
|
+
const { data } = await BillingService.getUsage({
|
|
1059
1035
|
...options,
|
|
1060
1036
|
...queryKey[0],
|
|
1061
1037
|
signal,
|
|
@@ -1063,20 +1039,37 @@ export const listUserOrganizationsOptions = (options) => queryOptions({
|
|
|
1063
1039
|
});
|
|
1064
1040
|
return data;
|
|
1065
1041
|
},
|
|
1066
|
-
queryKey:
|
|
1042
|
+
queryKey: getUsageQueryKey(options)
|
|
1067
1043
|
});
|
|
1068
|
-
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
1069
1044
|
/**
|
|
1070
|
-
*
|
|
1045
|
+
* Get Stripe client secret.
|
|
1071
1046
|
*
|
|
1072
|
-
*
|
|
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.
|
|
1073
1048
|
*
|
|
1074
|
-
|
|
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.
|
|
1075
1068
|
*
|
|
1076
1069
|
*/
|
|
1077
|
-
export const
|
|
1070
|
+
export const listPaymentMethodsOptions = (options) => queryOptions({
|
|
1078
1071
|
queryFn: async ({ queryKey, signal }) => {
|
|
1079
|
-
const { data } = await
|
|
1072
|
+
const { data } = await BillingService.listPaymentMethods({
|
|
1080
1073
|
...options,
|
|
1081
1074
|
...queryKey[0],
|
|
1082
1075
|
signal,
|
|
@@ -1084,18 +1077,18 @@ export const listUsersOptions = (options) => queryOptions({
|
|
|
1084
1077
|
});
|
|
1085
1078
|
return data;
|
|
1086
1079
|
},
|
|
1087
|
-
queryKey:
|
|
1080
|
+
queryKey: listPaymentMethodsQueryKey(options)
|
|
1088
1081
|
});
|
|
1089
1082
|
/**
|
|
1090
|
-
*
|
|
1083
|
+
* Set the default payment method.
|
|
1091
1084
|
*
|
|
1092
|
-
*
|
|
1085
|
+
* Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
|
|
1093
1086
|
*
|
|
1094
1087
|
*/
|
|
1095
|
-
export const
|
|
1088
|
+
export const setDefaultPaymentMethodMutation = (options) => {
|
|
1096
1089
|
const mutationOptions = {
|
|
1097
1090
|
mutationFn: async (fnOptions) => {
|
|
1098
|
-
const { data } = await
|
|
1091
|
+
const { data } = await BillingService.setDefaultPaymentMethod({
|
|
1099
1092
|
...options,
|
|
1100
1093
|
...fnOptions,
|
|
1101
1094
|
throwOnError: true
|
|
@@ -1106,15 +1099,15 @@ export const createUserMutation = (options) => {
|
|
|
1106
1099
|
return mutationOptions;
|
|
1107
1100
|
};
|
|
1108
1101
|
/**
|
|
1109
|
-
* Delete
|
|
1102
|
+
* Delete a payment method.
|
|
1110
1103
|
*
|
|
1111
|
-
*
|
|
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.
|
|
1112
1105
|
*
|
|
1113
1106
|
*/
|
|
1114
|
-
export const
|
|
1107
|
+
export const deletePaymentMethodMutation = (options) => {
|
|
1115
1108
|
const mutationOptions = {
|
|
1116
1109
|
mutationFn: async (fnOptions) => {
|
|
1117
|
-
const { data } = await
|
|
1110
|
+
const { data } = await BillingService.deletePaymentMethod({
|
|
1118
1111
|
...options,
|
|
1119
1112
|
...fnOptions,
|
|
1120
1113
|
throwOnError: true
|
|
@@ -1124,18 +1117,35 @@ export const deleteUserMutation = (options) => {
|
|
|
1124
1117
|
};
|
|
1125
1118
|
return mutationOptions;
|
|
1126
1119
|
};
|
|
1127
|
-
export const
|
|
1120
|
+
export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
|
|
1128
1121
|
/**
|
|
1129
|
-
*
|
|
1122
|
+
* List issued invoices.
|
|
1130
1123
|
*
|
|
1131
|
-
* 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.
|
|
1132
1125
|
*
|
|
1133
|
-
|
|
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.
|
|
1134
1144
|
*
|
|
1135
1145
|
*/
|
|
1136
|
-
export const
|
|
1146
|
+
export const getContactOptions = (options) => queryOptions({
|
|
1137
1147
|
queryFn: async ({ queryKey, signal }) => {
|
|
1138
|
-
const { data } = await
|
|
1148
|
+
const { data } = await BillingService.getContact({
|
|
1139
1149
|
...options,
|
|
1140
1150
|
...queryKey[0],
|
|
1141
1151
|
signal,
|
|
@@ -1143,18 +1153,56 @@ export const getUserOptions = (options) => queryOptions({
|
|
|
1143
1153
|
});
|
|
1144
1154
|
return data;
|
|
1145
1155
|
},
|
|
1146
|
-
queryKey:
|
|
1156
|
+
queryKey: getContactQueryKey(options)
|
|
1147
1157
|
});
|
|
1148
1158
|
/**
|
|
1149
|
-
* Update
|
|
1159
|
+
* Update organization contact information and billing address.
|
|
1150
1160
|
*
|
|
1151
|
-
*
|
|
1161
|
+
* This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
|
|
1152
1162
|
*
|
|
1153
1163
|
*/
|
|
1154
|
-
export const
|
|
1164
|
+
export const updateContactMutation = (options) => {
|
|
1155
1165
|
const mutationOptions = {
|
|
1156
1166
|
mutationFn: async (fnOptions) => {
|
|
1157
|
-
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({
|
|
1158
1206
|
...options,
|
|
1159
1207
|
...fnOptions,
|
|
1160
1208
|
throwOnError: true
|