@cloudfleet/sdk 0.12.3 → 1.0.1
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 +437 -387
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/@tanstack/react-query.gen.js +458 -408
- 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 +360 -177
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +493 -229
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +244 -218
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +353 -316
- package/dist/sdk.gen.js.map +1 -1
- package/dist/types.gen.d.ts +991 -803
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +1560 -1316
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +465 -314
- 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,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,18 +294,32 @@ 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.
|
|
298
|
+
* Close a ticket (soft close).
|
|
327
299
|
*
|
|
328
|
-
*
|
|
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.
|
|
329
301
|
*
|
|
330
302
|
*/
|
|
331
|
-
export const
|
|
303
|
+
export const closeTicketMutation = (options) => {
|
|
304
|
+
const mutationOptions = {
|
|
305
|
+
mutationFn: async (fnOptions) => {
|
|
306
|
+
const { data } = await TicketsService.closeTicket({
|
|
307
|
+
...options,
|
|
308
|
+
...fnOptions,
|
|
309
|
+
throwOnError: true
|
|
310
|
+
});
|
|
311
|
+
return data;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
return mutationOptions;
|
|
315
|
+
};
|
|
316
|
+
export const getTicketQueryKey = (options) => createQueryKey('getTicket', options);
|
|
317
|
+
/**
|
|
318
|
+
* Get a ticket and its messages.
|
|
319
|
+
*/
|
|
320
|
+
export const getTicketOptions = (options) => queryOptions({
|
|
332
321
|
queryFn: async ({ queryKey, signal }) => {
|
|
333
|
-
const { data } = await
|
|
322
|
+
const { data } = await TicketsService.getTicket({
|
|
334
323
|
...options,
|
|
335
324
|
...queryKey[0],
|
|
336
325
|
signal,
|
|
@@ -338,20 +327,18 @@ export const listFleetsOptions = (options) => queryOptions({
|
|
|
338
327
|
});
|
|
339
328
|
return data;
|
|
340
329
|
},
|
|
341
|
-
queryKey:
|
|
330
|
+
queryKey: getTicketQueryKey(options)
|
|
342
331
|
});
|
|
343
332
|
/**
|
|
344
|
-
*
|
|
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.
|
|
333
|
+
* Append a customer reply to a ticket.
|
|
347
334
|
*
|
|
348
|
-
*
|
|
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.
|
|
349
336
|
*
|
|
350
337
|
*/
|
|
351
|
-
export const
|
|
338
|
+
export const replyTicketMutation = (options) => {
|
|
352
339
|
const mutationOptions = {
|
|
353
340
|
mutationFn: async (fnOptions) => {
|
|
354
|
-
const { data } = await
|
|
341
|
+
const { data } = await TicketsService.replyTicket({
|
|
355
342
|
...options,
|
|
356
343
|
...fnOptions,
|
|
357
344
|
throwOnError: true
|
|
@@ -361,18 +348,70 @@ export const createFleetMutation = (options) => {
|
|
|
361
348
|
};
|
|
362
349
|
return mutationOptions;
|
|
363
350
|
};
|
|
351
|
+
export const getTicketAttachmentQueryKey = (options) => createQueryKey('getTicketAttachment', options);
|
|
364
352
|
/**
|
|
365
|
-
*
|
|
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
|
|
366
370
|
*
|
|
367
|
-
*
|
|
371
|
+
* Returns a list of repositories in the registry across all regions. This endpoint is available to all users in the organization.
|
|
368
372
|
*
|
|
369
|
-
|
|
373
|
+
*/
|
|
374
|
+
export const listRepositoriesOptions = (options) => queryOptions({
|
|
375
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
376
|
+
const { data } = await RegistryService.listRepositories({
|
|
377
|
+
...options,
|
|
378
|
+
...queryKey[0],
|
|
379
|
+
signal,
|
|
380
|
+
throwOnError: true
|
|
381
|
+
});
|
|
382
|
+
return data;
|
|
383
|
+
},
|
|
384
|
+
queryKey: listRepositoriesQueryKey(options)
|
|
385
|
+
});
|
|
386
|
+
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
387
|
+
/**
|
|
388
|
+
* List tags for a repository
|
|
389
|
+
*
|
|
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.
|
|
370
391
|
*
|
|
371
392
|
*/
|
|
372
|
-
export const
|
|
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.
|
|
409
|
+
*
|
|
410
|
+
*/
|
|
411
|
+
export const deleteTagMutation = (options) => {
|
|
373
412
|
const mutationOptions = {
|
|
374
413
|
mutationFn: async (fnOptions) => {
|
|
375
|
-
const { data } = await
|
|
414
|
+
const { data } = await RegistryService.deleteTag({
|
|
376
415
|
...options,
|
|
377
416
|
...fnOptions,
|
|
378
417
|
throwOnError: true
|
|
@@ -382,18 +421,16 @@ export const deleteFleetMutation = (options) => {
|
|
|
382
421
|
};
|
|
383
422
|
return mutationOptions;
|
|
384
423
|
};
|
|
385
|
-
export const
|
|
424
|
+
export const getTagQueryKey = (options) => createQueryKey('getTag', options);
|
|
386
425
|
/**
|
|
387
|
-
* Get
|
|
388
|
-
*
|
|
389
|
-
* Returns fleet details. For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
426
|
+
* Get tag details
|
|
390
427
|
*
|
|
391
|
-
* This endpoint is available to all users in the organization.
|
|
428
|
+
* Returns detailed information for a specific tag in a repository, including manifest details, size, and URI. This endpoint is available to all users in the organization.
|
|
392
429
|
*
|
|
393
430
|
*/
|
|
394
|
-
export const
|
|
431
|
+
export const getTagOptions = (options) => queryOptions({
|
|
395
432
|
queryFn: async ({ queryKey, signal }) => {
|
|
396
|
-
const { data } = await
|
|
433
|
+
const { data } = await RegistryService.getTag({
|
|
397
434
|
...options,
|
|
398
435
|
...queryKey[0],
|
|
399
436
|
signal,
|
|
@@ -401,22 +438,39 @@ export const getFleetOptions = (options) => queryOptions({
|
|
|
401
438
|
});
|
|
402
439
|
return data;
|
|
403
440
|
},
|
|
404
|
-
queryKey:
|
|
441
|
+
queryKey: getTagQueryKey(options)
|
|
405
442
|
});
|
|
443
|
+
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
406
444
|
/**
|
|
407
|
-
*
|
|
445
|
+
* Get organization information.
|
|
408
446
|
*
|
|
409
|
-
*
|
|
447
|
+
* Returns organization details including quota. For more information about quotas, see [Quotas and limits](https://cloudfleet.ai/docs/organization/quotas/) section of documentaiton.
|
|
410
448
|
*
|
|
411
|
-
*
|
|
449
|
+
* This endpoint is available to all users in the organization.
|
|
412
450
|
*
|
|
413
|
-
|
|
451
|
+
*/
|
|
452
|
+
export const getOrganizationOptions = (options) => queryOptions({
|
|
453
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
454
|
+
const { data } = await OrganizationService.getOrganization({
|
|
455
|
+
...options,
|
|
456
|
+
...queryKey[0],
|
|
457
|
+
signal,
|
|
458
|
+
throwOnError: true
|
|
459
|
+
});
|
|
460
|
+
return data;
|
|
461
|
+
},
|
|
462
|
+
queryKey: getOrganizationQueryKey(options)
|
|
463
|
+
});
|
|
464
|
+
/**
|
|
465
|
+
* Create a new organization / Cloudfleet account signup.
|
|
466
|
+
*
|
|
467
|
+
* This endpoint allows you to create a new Cloudfleet organization and an administrator user.
|
|
414
468
|
*
|
|
415
469
|
*/
|
|
416
|
-
export const
|
|
470
|
+
export const createOrganizationMutation = (options) => {
|
|
417
471
|
const mutationOptions = {
|
|
418
472
|
mutationFn: async (fnOptions) => {
|
|
419
|
-
const { data } = await
|
|
473
|
+
const { data } = await OrganizationService.createOrganization({
|
|
420
474
|
...options,
|
|
421
475
|
...fnOptions,
|
|
422
476
|
throwOnError: true
|
|
@@ -426,36 +480,18 @@ export const updateFleetMutation = (options) => {
|
|
|
426
480
|
};
|
|
427
481
|
return mutationOptions;
|
|
428
482
|
};
|
|
429
|
-
export const
|
|
430
|
-
/**
|
|
431
|
-
* Query Kubernetes cluster API
|
|
432
|
-
*
|
|
433
|
-
* 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.
|
|
434
|
-
*/
|
|
435
|
-
export const queryClusterOptions = (options) => queryOptions({
|
|
436
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
437
|
-
const { data } = await ClustersService.queryCluster({
|
|
438
|
-
...options,
|
|
439
|
-
...queryKey[0],
|
|
440
|
-
signal,
|
|
441
|
-
throwOnError: true
|
|
442
|
-
});
|
|
443
|
-
return data;
|
|
444
|
-
},
|
|
445
|
-
queryKey: queryClusterQueryKey(options)
|
|
446
|
-
});
|
|
447
|
-
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
483
|
+
export const getBasicPriceConsentQueryKey = (options) => createQueryKey('getBasicPriceConsent', options);
|
|
448
484
|
/**
|
|
449
|
-
*
|
|
485
|
+
* Get the organization's consent status for the new Basic price.
|
|
450
486
|
*
|
|
451
|
-
* 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.
|
|
452
488
|
*
|
|
453
|
-
* 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.
|
|
454
490
|
*
|
|
455
491
|
*/
|
|
456
|
-
export const
|
|
492
|
+
export const getBasicPriceConsentOptions = (options) => queryOptions({
|
|
457
493
|
queryFn: async ({ queryKey, signal }) => {
|
|
458
|
-
const { data } = await
|
|
494
|
+
const { data } = await OrganizationService.getBasicPriceConsent({
|
|
459
495
|
...options,
|
|
460
496
|
...queryKey[0],
|
|
461
497
|
signal,
|
|
@@ -463,20 +499,18 @@ export const listClustersOptions = (options) => queryOptions({
|
|
|
463
499
|
});
|
|
464
500
|
return data;
|
|
465
501
|
},
|
|
466
|
-
queryKey:
|
|
502
|
+
queryKey: getBasicPriceConsentQueryKey(options)
|
|
467
503
|
});
|
|
468
504
|
/**
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
* 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.
|
|
505
|
+
* Record an administrator's decision on the new Basic price.
|
|
472
506
|
*
|
|
473
|
-
* This
|
|
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.
|
|
474
508
|
*
|
|
475
509
|
*/
|
|
476
|
-
export const
|
|
510
|
+
export const setBasicPriceConsentMutation = (options) => {
|
|
477
511
|
const mutationOptions = {
|
|
478
512
|
mutationFn: async (fnOptions) => {
|
|
479
|
-
const { data } = await
|
|
513
|
+
const { data } = await OrganizationService.setBasicPriceConsent({
|
|
480
514
|
...options,
|
|
481
515
|
...fnOptions,
|
|
482
516
|
throwOnError: true
|
|
@@ -487,17 +521,14 @@ export const createClusterMutation = (options) => {
|
|
|
487
521
|
return mutationOptions;
|
|
488
522
|
};
|
|
489
523
|
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
* This endpoint will permanently delete the cluster. This operation cannot be undone.
|
|
493
|
-
*
|
|
494
|
-
* This endpoint is available to administrators of the organization only.
|
|
524
|
+
* MCP endpoint
|
|
495
525
|
*
|
|
526
|
+
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
496
527
|
*/
|
|
497
|
-
export const
|
|
528
|
+
export const postMcpMutation = (options) => {
|
|
498
529
|
const mutationOptions = {
|
|
499
530
|
mutationFn: async (fnOptions) => {
|
|
500
|
-
const { data } = await
|
|
531
|
+
const { data } = await McpService.postMcp({
|
|
501
532
|
...options,
|
|
502
533
|
...fnOptions,
|
|
503
534
|
throwOnError: true
|
|
@@ -507,18 +538,18 @@ export const deleteClusterMutation = (options) => {
|
|
|
507
538
|
};
|
|
508
539
|
return mutationOptions;
|
|
509
540
|
};
|
|
510
|
-
export const
|
|
541
|
+
export const listMarketplaceChartsQueryKey = (options) => createQueryKey('listMarketplaceCharts', options);
|
|
511
542
|
/**
|
|
512
|
-
*
|
|
543
|
+
* List chart listings available in the marketplace.
|
|
513
544
|
*
|
|
514
|
-
* Returns
|
|
545
|
+
* Returns a list of available charts in the marketplace.
|
|
515
546
|
*
|
|
516
547
|
* This endpoint is available to all users in the organization.
|
|
517
548
|
*
|
|
518
549
|
*/
|
|
519
|
-
export const
|
|
550
|
+
export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
520
551
|
queryFn: async ({ queryKey, signal }) => {
|
|
521
|
-
const { data } = await
|
|
552
|
+
const { data } = await ChartsMarketplaceService.listMarketplaceCharts({
|
|
522
553
|
...options,
|
|
523
554
|
...queryKey[0],
|
|
524
555
|
signal,
|
|
@@ -526,48 +557,31 @@ export const getClusterOptions = (options) => queryOptions({
|
|
|
526
557
|
});
|
|
527
558
|
return data;
|
|
528
559
|
},
|
|
529
|
-
queryKey:
|
|
560
|
+
queryKey: listMarketplaceChartsQueryKey(options)
|
|
530
561
|
});
|
|
562
|
+
export const getMarketplaceChartFilesQueryKey = (options) => createQueryKey('getMarketplaceChartFiles', options);
|
|
531
563
|
/**
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
* This endpoint allows you to update cluster details such as name, tier, and Kubernetes version. For more information about clusters, see [Clusters](https://cloudfleet.ai/docs/cluster-management/cluster-types/) section of documentation.
|
|
564
|
+
* Get chart files for a specific version channel.
|
|
535
565
|
*
|
|
536
|
-
*
|
|
566
|
+
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
537
567
|
*
|
|
538
|
-
|
|
539
|
-
export const updateClusterMutation = (options) => {
|
|
540
|
-
const mutationOptions = {
|
|
541
|
-
mutationFn: async (fnOptions) => {
|
|
542
|
-
const { data } = await ClustersService.updateCluster({
|
|
543
|
-
...options,
|
|
544
|
-
...fnOptions,
|
|
545
|
-
throwOnError: true
|
|
546
|
-
});
|
|
547
|
-
return data;
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
return mutationOptions;
|
|
551
|
-
};
|
|
552
|
-
/**
|
|
553
|
-
* Node join information for the cluster
|
|
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.
|
|
554
569
|
*
|
|
555
|
-
*
|
|
570
|
+
* This endpoint is available to all users in the organization.
|
|
556
571
|
*
|
|
557
572
|
*/
|
|
558
|
-
export const
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
};
|
|
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
|
+
});
|
|
571
585
|
export const listInvitesQueryKey = (options) => createQueryKey('listInvites', options);
|
|
572
586
|
/**
|
|
573
587
|
* List invites.
|
|
@@ -644,18 +658,15 @@ export const deleteInviteMutation = (options) => {
|
|
|
644
658
|
};
|
|
645
659
|
return mutationOptions;
|
|
646
660
|
};
|
|
647
|
-
export const
|
|
661
|
+
export const queryClusterQueryKey = (options) => createQueryKey('queryCluster', options);
|
|
648
662
|
/**
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
* Returns a list of available charts in the marketplace.
|
|
652
|
-
*
|
|
653
|
-
* This endpoint is available to all users in the organization.
|
|
663
|
+
* Query Kubernetes cluster API
|
|
654
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.
|
|
655
666
|
*/
|
|
656
|
-
export const
|
|
667
|
+
export const queryClusterOptions = (options) => queryOptions({
|
|
657
668
|
queryFn: async ({ queryKey, signal }) => {
|
|
658
|
-
const { data } = await
|
|
669
|
+
const { data } = await ClustersService.queryCluster({
|
|
659
670
|
...options,
|
|
660
671
|
...queryKey[0],
|
|
661
672
|
signal,
|
|
@@ -663,22 +674,20 @@ export const listMarketplaceChartsOptions = (options) => queryOptions({
|
|
|
663
674
|
});
|
|
664
675
|
return data;
|
|
665
676
|
},
|
|
666
|
-
queryKey:
|
|
677
|
+
queryKey: queryClusterQueryKey(options)
|
|
667
678
|
});
|
|
668
|
-
export const
|
|
679
|
+
export const listFleetsQueryKey = (options) => createQueryKey('listFleets', options);
|
|
669
680
|
/**
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
* Returns the Chart.yaml, values.yaml, and values.schema.json files for the latest version matching the specified version channel.
|
|
681
|
+
* List fleets.
|
|
673
682
|
*
|
|
674
|
-
*
|
|
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.
|
|
675
684
|
*
|
|
676
685
|
* This endpoint is available to all users in the organization.
|
|
677
686
|
*
|
|
678
687
|
*/
|
|
679
|
-
export const
|
|
688
|
+
export const listFleetsOptions = (options) => queryOptions({
|
|
680
689
|
queryFn: async ({ queryKey, signal }) => {
|
|
681
|
-
const { data } = await
|
|
690
|
+
const { data } = await ClustersService.listFleets({
|
|
682
691
|
...options,
|
|
683
692
|
...queryKey[0],
|
|
684
693
|
signal,
|
|
@@ -686,17 +695,22 @@ export const getMarketplaceChartFilesOptions = (options) => queryOptions({
|
|
|
686
695
|
});
|
|
687
696
|
return data;
|
|
688
697
|
},
|
|
689
|
-
queryKey:
|
|
698
|
+
queryKey: listFleetsQueryKey(options)
|
|
690
699
|
});
|
|
691
700
|
/**
|
|
692
|
-
*
|
|
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.
|
|
693
708
|
*
|
|
694
|
-
* MCP endpoint for handling Model Context Protocol JSON-RPC 2.0 messages.
|
|
695
709
|
*/
|
|
696
|
-
export const
|
|
710
|
+
export const createFleetMutation = (options) => {
|
|
697
711
|
const mutationOptions = {
|
|
698
712
|
mutationFn: async (fnOptions) => {
|
|
699
|
-
const { data } = await
|
|
713
|
+
const { data } = await ClustersService.createFleet({
|
|
700
714
|
...options,
|
|
701
715
|
...fnOptions,
|
|
702
716
|
throwOnError: true
|
|
@@ -706,37 +720,20 @@ export const postMcpMutation = (options) => {
|
|
|
706
720
|
};
|
|
707
721
|
return mutationOptions;
|
|
708
722
|
};
|
|
709
|
-
export const getOrganizationQueryKey = (options) => createQueryKey('getOrganization', options);
|
|
710
723
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
* 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.
|
|
714
725
|
*
|
|
715
|
-
* 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.
|
|
716
727
|
*
|
|
717
|
-
|
|
718
|
-
export const getOrganizationOptions = (options) => queryOptions({
|
|
719
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
720
|
-
const { data } = await OrganizationService.getOrganization({
|
|
721
|
-
...options,
|
|
722
|
-
...queryKey[0],
|
|
723
|
-
signal,
|
|
724
|
-
throwOnError: true
|
|
725
|
-
});
|
|
726
|
-
return data;
|
|
727
|
-
},
|
|
728
|
-
queryKey: getOrganizationQueryKey(options)
|
|
729
|
-
});
|
|
730
|
-
/**
|
|
731
|
-
* 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.
|
|
732
729
|
*
|
|
733
|
-
* This endpoint
|
|
730
|
+
* This endpoint is available to administrators of the organization only.
|
|
734
731
|
*
|
|
735
732
|
*/
|
|
736
|
-
export const
|
|
733
|
+
export const deleteFleetMutation = (options) => {
|
|
737
734
|
const mutationOptions = {
|
|
738
735
|
mutationFn: async (fnOptions) => {
|
|
739
|
-
const { data } = await
|
|
736
|
+
const { data } = await ClustersService.deleteFleet({
|
|
740
737
|
...options,
|
|
741
738
|
...fnOptions,
|
|
742
739
|
throwOnError: true
|
|
@@ -746,16 +743,18 @@ export const createOrganizationMutation = (options) => {
|
|
|
746
743
|
};
|
|
747
744
|
return mutationOptions;
|
|
748
745
|
};
|
|
749
|
-
export const
|
|
746
|
+
export const getFleetQueryKey = (options) => createQueryKey('getFleet', options);
|
|
750
747
|
/**
|
|
751
|
-
*
|
|
748
|
+
* Get fleet information.
|
|
752
749
|
*
|
|
753
|
-
* 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.
|
|
754
753
|
*
|
|
755
754
|
*/
|
|
756
|
-
export const
|
|
755
|
+
export const getFleetOptions = (options) => queryOptions({
|
|
757
756
|
queryFn: async ({ queryKey, signal }) => {
|
|
758
|
-
const { data } = await
|
|
757
|
+
const { data } = await ClustersService.getFleet({
|
|
759
758
|
...options,
|
|
760
759
|
...queryKey[0],
|
|
761
760
|
signal,
|
|
@@ -763,37 +762,24 @@ export const listRepositoriesOptions = (options) => queryOptions({
|
|
|
763
762
|
});
|
|
764
763
|
return data;
|
|
765
764
|
},
|
|
766
|
-
queryKey:
|
|
765
|
+
queryKey: getFleetQueryKey(options)
|
|
767
766
|
});
|
|
768
|
-
export const listTagsQueryKey = (options) => createQueryKey('listTags', options);
|
|
769
767
|
/**
|
|
770
|
-
*
|
|
768
|
+
* Update fleet information.
|
|
771
769
|
*
|
|
772
|
-
*
|
|
770
|
+
* This endpoint allows you to update fleet details.
|
|
773
771
|
*
|
|
774
|
-
|
|
775
|
-
export const listTagsOptions = (options) => queryOptions({
|
|
776
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
777
|
-
const { data } = await RegistryService.listTags({
|
|
778
|
-
...options,
|
|
779
|
-
...queryKey[0],
|
|
780
|
-
signal,
|
|
781
|
-
throwOnError: true
|
|
782
|
-
});
|
|
783
|
-
return data;
|
|
784
|
-
},
|
|
785
|
-
queryKey: listTagsQueryKey(options)
|
|
786
|
-
});
|
|
787
|
-
/**
|
|
788
|
-
* Delete tag
|
|
772
|
+
* For more information, see [Fleets](https://cloudfleet.ai/docs/cloud-infrastructure/fleets/) section of documentaiton.
|
|
789
773
|
*
|
|
790
|
-
*
|
|
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.
|
|
791
777
|
*
|
|
792
778
|
*/
|
|
793
|
-
export const
|
|
779
|
+
export const updateFleetMutation = (options) => {
|
|
794
780
|
const mutationOptions = {
|
|
795
781
|
mutationFn: async (fnOptions) => {
|
|
796
|
-
const { data } = await
|
|
782
|
+
const { data } = await ClustersService.updateFleet({
|
|
797
783
|
...options,
|
|
798
784
|
...fnOptions,
|
|
799
785
|
throwOnError: true
|
|
@@ -803,35 +789,18 @@ export const deleteTagMutation = (options) => {
|
|
|
803
789
|
};
|
|
804
790
|
return mutationOptions;
|
|
805
791
|
};
|
|
806
|
-
export const
|
|
792
|
+
export const listChartsQueryKey = (options) => createQueryKey('listCharts', options);
|
|
807
793
|
/**
|
|
808
|
-
*
|
|
809
|
-
*
|
|
810
|
-
* 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.
|
|
811
795
|
*
|
|
812
|
-
|
|
813
|
-
export const getTagOptions = (options) => queryOptions({
|
|
814
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
815
|
-
const { data } = await RegistryService.getTag({
|
|
816
|
-
...options,
|
|
817
|
-
...queryKey[0],
|
|
818
|
-
signal,
|
|
819
|
-
throwOnError: true
|
|
820
|
-
});
|
|
821
|
-
return data;
|
|
822
|
-
},
|
|
823
|
-
queryKey: getTagQueryKey(options)
|
|
824
|
-
});
|
|
825
|
-
export const listTicketsQueryKey = (options) => createQueryKey('listTickets', options);
|
|
826
|
-
/**
|
|
827
|
-
* List tickets for the current organization.
|
|
796
|
+
* Returns a list of charts in the cluster.
|
|
828
797
|
*
|
|
829
|
-
*
|
|
798
|
+
* This endpoint is available to all users in the organization.
|
|
830
799
|
*
|
|
831
800
|
*/
|
|
832
|
-
export const
|
|
801
|
+
export const listChartsOptions = (options) => queryOptions({
|
|
833
802
|
queryFn: async ({ queryKey, signal }) => {
|
|
834
|
-
const { data } = await
|
|
803
|
+
const { data } = await ClustersService.listCharts({
|
|
835
804
|
...options,
|
|
836
805
|
...queryKey[0],
|
|
837
806
|
signal,
|
|
@@ -839,18 +808,20 @@ export const listTicketsOptions = (options) => queryOptions({
|
|
|
839
808
|
});
|
|
840
809
|
return data;
|
|
841
810
|
},
|
|
842
|
-
queryKey:
|
|
811
|
+
queryKey: listChartsQueryKey(options)
|
|
843
812
|
});
|
|
844
813
|
/**
|
|
845
|
-
* Create a new
|
|
814
|
+
* Create a new chart.
|
|
846
815
|
*
|
|
847
|
-
*
|
|
816
|
+
* Create a new chart deployment.
|
|
817
|
+
*
|
|
818
|
+
* This endpoint is available to administrators of the organization only.
|
|
848
819
|
*
|
|
849
820
|
*/
|
|
850
|
-
export const
|
|
821
|
+
export const createChartMutation = (options) => {
|
|
851
822
|
const mutationOptions = {
|
|
852
823
|
mutationFn: async (fnOptions) => {
|
|
853
|
-
const { data } = await
|
|
824
|
+
const { data } = await ClustersService.createChart({
|
|
854
825
|
...options,
|
|
855
826
|
...fnOptions,
|
|
856
827
|
throwOnError: true
|
|
@@ -861,15 +832,17 @@ export const createTicketMutation = (options) => {
|
|
|
861
832
|
return mutationOptions;
|
|
862
833
|
};
|
|
863
834
|
/**
|
|
864
|
-
*
|
|
835
|
+
* Permanently delete the chart deployment from the cluster.
|
|
865
836
|
*
|
|
866
|
-
*
|
|
837
|
+
* This endpoint will permanently delete chart. This operation cannot be undone.
|
|
838
|
+
*
|
|
839
|
+
* This endpoint is available to administrators of the organization only.
|
|
867
840
|
*
|
|
868
841
|
*/
|
|
869
|
-
export const
|
|
842
|
+
export const deleteChartMutation = (options) => {
|
|
870
843
|
const mutationOptions = {
|
|
871
844
|
mutationFn: async (fnOptions) => {
|
|
872
|
-
const { data } = await
|
|
845
|
+
const { data } = await ClustersService.deleteChart({
|
|
873
846
|
...options,
|
|
874
847
|
...fnOptions,
|
|
875
848
|
throwOnError: true
|
|
@@ -879,13 +852,18 @@ export const closeTicketMutation = (options) => {
|
|
|
879
852
|
};
|
|
880
853
|
return mutationOptions;
|
|
881
854
|
};
|
|
882
|
-
export const
|
|
855
|
+
export const getChartQueryKey = (options) => createQueryKey('getChart', options);
|
|
883
856
|
/**
|
|
884
|
-
* 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
|
+
*
|
|
885
863
|
*/
|
|
886
|
-
export const
|
|
864
|
+
export const getChartOptions = (options) => queryOptions({
|
|
887
865
|
queryFn: async ({ queryKey, signal }) => {
|
|
888
|
-
const { data } = await
|
|
866
|
+
const { data } = await ClustersService.getChart({
|
|
889
867
|
...options,
|
|
890
868
|
...queryKey[0],
|
|
891
869
|
signal,
|
|
@@ -893,18 +871,20 @@ export const getTicketOptions = (options) => queryOptions({
|
|
|
893
871
|
});
|
|
894
872
|
return data;
|
|
895
873
|
},
|
|
896
|
-
queryKey:
|
|
874
|
+
queryKey: getChartQueryKey(options)
|
|
897
875
|
});
|
|
898
876
|
/**
|
|
899
|
-
*
|
|
877
|
+
* Update chart information.
|
|
900
878
|
*
|
|
901
|
-
*
|
|
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.
|
|
902
882
|
*
|
|
903
883
|
*/
|
|
904
|
-
export const
|
|
884
|
+
export const updateChartMutation = (options) => {
|
|
905
885
|
const mutationOptions = {
|
|
906
886
|
mutationFn: async (fnOptions) => {
|
|
907
|
-
const { data } = await
|
|
887
|
+
const { data } = await ClustersService.updateChart({
|
|
908
888
|
...options,
|
|
909
889
|
...fnOptions,
|
|
910
890
|
throwOnError: true
|
|
@@ -914,32 +894,18 @@ export const replyTicketMutation = (options) => {
|
|
|
914
894
|
};
|
|
915
895
|
return mutationOptions;
|
|
916
896
|
};
|
|
917
|
-
export const
|
|
918
|
-
/**
|
|
919
|
-
* Download a ticket attachment.
|
|
920
|
-
*/
|
|
921
|
-
export const getTicketAttachmentOptions = (options) => queryOptions({
|
|
922
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
923
|
-
const { data } = await TicketsService.getTicketAttachment({
|
|
924
|
-
...options,
|
|
925
|
-
...queryKey[0],
|
|
926
|
-
signal,
|
|
927
|
-
throwOnError: true
|
|
928
|
-
});
|
|
929
|
-
return data;
|
|
930
|
-
},
|
|
931
|
-
queryKey: getTicketAttachmentQueryKey(options)
|
|
932
|
-
});
|
|
933
|
-
export const listTokensQueryKey = (options) => createQueryKey('listTokens', options);
|
|
897
|
+
export const listClustersQueryKey = (options) => createQueryKey('listClusters', options);
|
|
934
898
|
/**
|
|
935
|
-
* List
|
|
899
|
+
* List clusters.
|
|
936
900
|
*
|
|
937
|
-
*
|
|
901
|
+
* Returns a list of clusters under the current organization.
|
|
902
|
+
*
|
|
903
|
+
* This endpoint is available to all users in the organization.
|
|
938
904
|
*
|
|
939
905
|
*/
|
|
940
|
-
export const
|
|
906
|
+
export const listClustersOptions = (options) => queryOptions({
|
|
941
907
|
queryFn: async ({ queryKey, signal }) => {
|
|
942
|
-
const { data } = await
|
|
908
|
+
const { data } = await ClustersService.listClusters({
|
|
943
909
|
...options,
|
|
944
910
|
...queryKey[0],
|
|
945
911
|
signal,
|
|
@@ -947,20 +913,20 @@ export const listTokensOptions = (options) => queryOptions({
|
|
|
947
913
|
});
|
|
948
914
|
return data;
|
|
949
915
|
},
|
|
950
|
-
queryKey:
|
|
916
|
+
queryKey: listClustersQueryKey(options)
|
|
951
917
|
});
|
|
952
918
|
/**
|
|
953
|
-
* Create a new
|
|
919
|
+
* Create a new cluster.
|
|
954
920
|
*
|
|
955
|
-
*
|
|
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.
|
|
956
922
|
*
|
|
957
923
|
* This endpoint is available to administrators of the organization only.
|
|
958
924
|
*
|
|
959
925
|
*/
|
|
960
|
-
export const
|
|
926
|
+
export const createClusterMutation = (options) => {
|
|
961
927
|
const mutationOptions = {
|
|
962
928
|
mutationFn: async (fnOptions) => {
|
|
963
|
-
const { data } = await
|
|
929
|
+
const { data } = await ClustersService.createCluster({
|
|
964
930
|
...options,
|
|
965
931
|
...fnOptions,
|
|
966
932
|
throwOnError: true
|
|
@@ -971,15 +937,19 @@ export const createTokenMutation = (options) => {
|
|
|
971
937
|
return mutationOptions;
|
|
972
938
|
};
|
|
973
939
|
/**
|
|
974
|
-
* Permanently delete
|
|
940
|
+
* Permanently delete cluster.
|
|
975
941
|
*
|
|
976
|
-
* 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.
|
|
977
947
|
*
|
|
978
948
|
*/
|
|
979
|
-
export const
|
|
949
|
+
export const deleteClusterMutation = (options) => {
|
|
980
950
|
const mutationOptions = {
|
|
981
951
|
mutationFn: async (fnOptions) => {
|
|
982
|
-
const { data } = await
|
|
952
|
+
const { data } = await ClustersService.deleteCluster({
|
|
983
953
|
...options,
|
|
984
954
|
...fnOptions,
|
|
985
955
|
throwOnError: true
|
|
@@ -989,16 +959,18 @@ export const deleteTokenMutation = (options) => {
|
|
|
989
959
|
};
|
|
990
960
|
return mutationOptions;
|
|
991
961
|
};
|
|
992
|
-
export const
|
|
962
|
+
export const getClusterQueryKey = (options) => createQueryKey('getCluster', options);
|
|
993
963
|
/**
|
|
994
|
-
* Get
|
|
964
|
+
* Get cluster information.
|
|
995
965
|
*
|
|
996
|
-
*
|
|
966
|
+
* Returns cluster details.
|
|
967
|
+
*
|
|
968
|
+
* This endpoint is available to all users in the organization.
|
|
997
969
|
*
|
|
998
970
|
*/
|
|
999
|
-
export const
|
|
971
|
+
export const getClusterOptions = (options) => queryOptions({
|
|
1000
972
|
queryFn: async ({ queryKey, signal }) => {
|
|
1001
|
-
const { data } = await
|
|
973
|
+
const { data } = await ClustersService.getCluster({
|
|
1002
974
|
...options,
|
|
1003
975
|
...queryKey[0],
|
|
1004
976
|
signal,
|
|
@@ -1006,20 +978,22 @@ export const getTokenOptions = (options) => queryOptions({
|
|
|
1006
978
|
});
|
|
1007
979
|
return data;
|
|
1008
980
|
},
|
|
1009
|
-
queryKey:
|
|
981
|
+
queryKey: getClusterQueryKey(options)
|
|
1010
982
|
});
|
|
1011
983
|
/**
|
|
1012
|
-
* Update
|
|
984
|
+
* Update cluster information.
|
|
1013
985
|
*
|
|
1014
|
-
* 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.
|
|
1015
989
|
*
|
|
1016
990
|
* This endpoint is available to administrators of the organization only.
|
|
1017
991
|
*
|
|
1018
992
|
*/
|
|
1019
|
-
export const
|
|
993
|
+
export const updateClusterMutation = (options) => {
|
|
1020
994
|
const mutationOptions = {
|
|
1021
995
|
mutationFn: async (fnOptions) => {
|
|
1022
|
-
const { data } = await
|
|
996
|
+
const { data } = await ClustersService.updateCluster({
|
|
1023
997
|
...options,
|
|
1024
998
|
...fnOptions,
|
|
1025
999
|
throwOnError: true
|
|
@@ -1030,14 +1004,15 @@ export const updateTokenMutation = (options) => {
|
|
|
1030
1004
|
return mutationOptions;
|
|
1031
1005
|
};
|
|
1032
1006
|
/**
|
|
1033
|
-
*
|
|
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.
|
|
1034
1010
|
*
|
|
1035
|
-
* Generates a new access token secret. Old secret will not be valid anymore.
|
|
1036
1011
|
*/
|
|
1037
|
-
export const
|
|
1012
|
+
export const getJoinInformationMutation = (options) => {
|
|
1038
1013
|
const mutationOptions = {
|
|
1039
1014
|
mutationFn: async (fnOptions) => {
|
|
1040
|
-
const { data } = await
|
|
1015
|
+
const { data } = await ClustersService.getJoinInformation({
|
|
1041
1016
|
...options,
|
|
1042
1017
|
...fnOptions,
|
|
1043
1018
|
throwOnError: true
|
|
@@ -1047,13 +1022,16 @@ export const regenerateTokenMutation = (options) => {
|
|
|
1047
1022
|
};
|
|
1048
1023
|
return mutationOptions;
|
|
1049
1024
|
};
|
|
1050
|
-
export const
|
|
1025
|
+
export const getUsageQueryKey = (options) => createQueryKey('getUsage', options);
|
|
1051
1026
|
/**
|
|
1052
|
-
* 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
|
+
*
|
|
1053
1031
|
*/
|
|
1054
|
-
export const
|
|
1032
|
+
export const getUsageOptions = (options) => queryOptions({
|
|
1055
1033
|
queryFn: async ({ queryKey, signal }) => {
|
|
1056
|
-
const { data } = await
|
|
1034
|
+
const { data } = await BillingService.getUsage({
|
|
1057
1035
|
...options,
|
|
1058
1036
|
...queryKey[0],
|
|
1059
1037
|
signal,
|
|
@@ -1061,20 +1039,37 @@ export const listUserOrganizationsOptions = (options) => queryOptions({
|
|
|
1061
1039
|
});
|
|
1062
1040
|
return data;
|
|
1063
1041
|
},
|
|
1064
|
-
queryKey:
|
|
1042
|
+
queryKey: getUsageQueryKey(options)
|
|
1065
1043
|
});
|
|
1066
|
-
export const listUsersQueryKey = (options) => createQueryKey('listUsers', options);
|
|
1067
1044
|
/**
|
|
1068
|
-
*
|
|
1045
|
+
* Get Stripe client secret.
|
|
1069
1046
|
*
|
|
1070
|
-
*
|
|
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.
|
|
1071
1048
|
*
|
|
1072
|
-
|
|
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.
|
|
1073
1068
|
*
|
|
1074
1069
|
*/
|
|
1075
|
-
export const
|
|
1070
|
+
export const listPaymentMethodsOptions = (options) => queryOptions({
|
|
1076
1071
|
queryFn: async ({ queryKey, signal }) => {
|
|
1077
|
-
const { data } = await
|
|
1072
|
+
const { data } = await BillingService.listPaymentMethods({
|
|
1078
1073
|
...options,
|
|
1079
1074
|
...queryKey[0],
|
|
1080
1075
|
signal,
|
|
@@ -1082,18 +1077,18 @@ export const listUsersOptions = (options) => queryOptions({
|
|
|
1082
1077
|
});
|
|
1083
1078
|
return data;
|
|
1084
1079
|
},
|
|
1085
|
-
queryKey:
|
|
1080
|
+
queryKey: listPaymentMethodsQueryKey(options)
|
|
1086
1081
|
});
|
|
1087
1082
|
/**
|
|
1088
|
-
*
|
|
1083
|
+
* Set the default payment method.
|
|
1089
1084
|
*
|
|
1090
|
-
*
|
|
1085
|
+
* Sets the given payment method as the default used for invoices and active subscriptions. Requires the Administrator role.
|
|
1091
1086
|
*
|
|
1092
1087
|
*/
|
|
1093
|
-
export const
|
|
1088
|
+
export const setDefaultPaymentMethodMutation = (options) => {
|
|
1094
1089
|
const mutationOptions = {
|
|
1095
1090
|
mutationFn: async (fnOptions) => {
|
|
1096
|
-
const { data } = await
|
|
1091
|
+
const { data } = await BillingService.setDefaultPaymentMethod({
|
|
1097
1092
|
...options,
|
|
1098
1093
|
...fnOptions,
|
|
1099
1094
|
throwOnError: true
|
|
@@ -1104,15 +1099,15 @@ export const createUserMutation = (options) => {
|
|
|
1104
1099
|
return mutationOptions;
|
|
1105
1100
|
};
|
|
1106
1101
|
/**
|
|
1107
|
-
* Delete
|
|
1102
|
+
* Delete a payment method.
|
|
1108
1103
|
*
|
|
1109
|
-
*
|
|
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.
|
|
1110
1105
|
*
|
|
1111
1106
|
*/
|
|
1112
|
-
export const
|
|
1107
|
+
export const deletePaymentMethodMutation = (options) => {
|
|
1113
1108
|
const mutationOptions = {
|
|
1114
1109
|
mutationFn: async (fnOptions) => {
|
|
1115
|
-
const { data } = await
|
|
1110
|
+
const { data } = await BillingService.deletePaymentMethod({
|
|
1116
1111
|
...options,
|
|
1117
1112
|
...fnOptions,
|
|
1118
1113
|
throwOnError: true
|
|
@@ -1122,18 +1117,35 @@ export const deleteUserMutation = (options) => {
|
|
|
1122
1117
|
};
|
|
1123
1118
|
return mutationOptions;
|
|
1124
1119
|
};
|
|
1125
|
-
export const
|
|
1120
|
+
export const listInvoicesQueryKey = (options) => createQueryKey('listInvoices', options);
|
|
1126
1121
|
/**
|
|
1127
|
-
*
|
|
1122
|
+
* List issued invoices.
|
|
1128
1123
|
*
|
|
1129
|
-
* 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.
|
|
1130
1125
|
*
|
|
1131
|
-
|
|
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.
|
|
1132
1144
|
*
|
|
1133
1145
|
*/
|
|
1134
|
-
export const
|
|
1146
|
+
export const getContactOptions = (options) => queryOptions({
|
|
1135
1147
|
queryFn: async ({ queryKey, signal }) => {
|
|
1136
|
-
const { data } = await
|
|
1148
|
+
const { data } = await BillingService.getContact({
|
|
1137
1149
|
...options,
|
|
1138
1150
|
...queryKey[0],
|
|
1139
1151
|
signal,
|
|
@@ -1141,18 +1153,56 @@ export const getUserOptions = (options) => queryOptions({
|
|
|
1141
1153
|
});
|
|
1142
1154
|
return data;
|
|
1143
1155
|
},
|
|
1144
|
-
queryKey:
|
|
1156
|
+
queryKey: getContactQueryKey(options)
|
|
1145
1157
|
});
|
|
1146
1158
|
/**
|
|
1147
|
-
* Update
|
|
1159
|
+
* Update organization contact information and billing address.
|
|
1148
1160
|
*
|
|
1149
|
-
*
|
|
1161
|
+
* This endpoint allows you to update organization details with its contact information. This endpoint is available to administrators of the organization only.
|
|
1150
1162
|
*
|
|
1151
1163
|
*/
|
|
1152
|
-
export const
|
|
1164
|
+
export const updateContactMutation = (options) => {
|
|
1153
1165
|
const mutationOptions = {
|
|
1154
1166
|
mutationFn: async (fnOptions) => {
|
|
1155
|
-
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({
|
|
1156
1206
|
...options,
|
|
1157
1207
|
...fnOptions,
|
|
1158
1208
|
throwOnError: true
|