@squonk/data-manager-client 1.2.8 → 1.2.9
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 +1 -1
- package/accounting/accounting.cjs +51 -8
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +61 -10
- package/accounting/accounting.d.ts +61 -10
- package/accounting/accounting.js +49 -6
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -24
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +75 -24
- package/admin/admin.d.ts +75 -24
- package/admin/admin.js +56 -13
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +35 -6
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +42 -8
- package/application/application.d.ts +42 -8
- package/application/application.js +34 -5
- package/application/application.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/configuration/configuration.cjs +19 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +23 -6
- package/configuration/configuration.d.ts +23 -6
- package/configuration/configuration.js +19 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +93 -22
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +105 -20
- package/dataset/dataset.d.ts +105 -20
- package/dataset/dataset.js +83 -12
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +71 -14
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +83 -15
- package/exchange-rate/exchange-rate.d.ts +83 -15
- package/exchange-rate/exchange-rate.js +65 -8
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +45 -16
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +48 -14
- package/file-and-path/file-and-path.d.ts +48 -14
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +9 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2033 -2
- package/index.d.ts +2033 -2
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +45 -16
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +48 -14
- package/instance/instance.d.ts +48 -14
- package/instance/instance.js +38 -9
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +51 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +61 -10
- package/job/job.d.ts +61 -10
- package/job/job.js +49 -6
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +39 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +45 -11
- package/metadata/metadata.d.ts +45 -11
- package/metadata/metadata.js +36 -7
- package/metadata/metadata.js.map +1 -1
- package/package.json +11 -11
- package/project/project.cjs +83 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +89 -21
- package/project/project.d.ts +89 -21
- package/project/project.js +71 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +136 -22
- package/src/admin/admin.ts +148 -50
- package/src/application/application.ts +93 -18
- package/src/configuration/configuration.ts +50 -14
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +59 -33
- package/src/dataset/dataset.ts +233 -45
- package/src/exchange-rate/exchange-rate.ts +185 -32
- package/src/file-and-path/file-and-path.ts +98 -33
- package/src/instance/instance.ts +98 -33
- package/src/job/job.ts +138 -22
- package/src/metadata/metadata.ts +97 -24
- package/src/project/project.ts +191 -50
- package/src/task/task.ts +96 -21
- package/src/type/type.ts +50 -14
- package/src/user/user.ts +137 -25
- package/task/task.cjs +37 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +44 -10
- package/task/task.d.ts +44 -10
- package/task/task.js +35 -6
- package/task/task.js.map +1 -1
- package/type/type.cjs +19 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +23 -6
- package/type/type.d.ts +23 -6
- package/type/type.js +19 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +53 -10
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +63 -12
- package/user/user.d.ts +63 -12
- package/user/user.js +49 -6
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-37ed2460.d.ts +0 -2014
package/src/task/task.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
2
|
+
* Generated by orval v6.25.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Dataset Manager API
|
|
5
5
|
* The Dataset Manager API service.
|
|
@@ -10,7 +10,8 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
10
10
|
*/
|
|
11
11
|
import {
|
|
12
12
|
useMutation,
|
|
13
|
-
useQuery
|
|
13
|
+
useQuery,
|
|
14
|
+
useSuspenseQuery
|
|
14
15
|
} from '@tanstack/react-query'
|
|
15
16
|
import type {
|
|
16
17
|
MutationFunction,
|
|
@@ -18,7 +19,9 @@ import type {
|
|
|
18
19
|
QueryKey,
|
|
19
20
|
UseMutationOptions,
|
|
20
21
|
UseQueryOptions,
|
|
21
|
-
UseQueryResult
|
|
22
|
+
UseQueryResult,
|
|
23
|
+
UseSuspenseQueryOptions,
|
|
24
|
+
UseSuspenseQueryResult
|
|
22
25
|
} from '@tanstack/react-query'
|
|
23
26
|
import type {
|
|
24
27
|
DmError,
|
|
@@ -31,13 +34,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
31
34
|
import type { ErrorType } from '.././custom-instance';
|
|
32
35
|
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
36
|
-
config: any,
|
|
37
|
-
args: infer P,
|
|
38
|
-
) => any
|
|
39
|
-
? P
|
|
40
|
-
: never;
|
|
37
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
41
38
|
|
|
42
39
|
|
|
43
40
|
/**
|
|
@@ -52,7 +49,7 @@ export const getTasks = (
|
|
|
52
49
|
|
|
53
50
|
|
|
54
51
|
return customInstance<TasksGetResponse>(
|
|
55
|
-
{url: `/task`, method: '
|
|
52
|
+
{url: `/task`, method: 'GET',
|
|
56
53
|
params, signal
|
|
57
54
|
},
|
|
58
55
|
options);
|
|
@@ -60,12 +57,11 @@ export const getTasks = (
|
|
|
60
57
|
|
|
61
58
|
|
|
62
59
|
export const getGetTasksQueryKey = (params?: GetTasksParams,) => {
|
|
63
|
-
|
|
64
60
|
return ["data-manager-api", `/task`, ...(params ? [params]: [])] as const;
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
|
|
68
|
-
export const getGetTasksQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData
|
|
64
|
+
export const getGetTasksQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
69
65
|
) => {
|
|
70
66
|
|
|
71
67
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -90,7 +86,7 @@ export type GetTasksQueryError = ErrorType<void | DmError>
|
|
|
90
86
|
* @summary Returns a list of Tasks
|
|
91
87
|
*/
|
|
92
88
|
export const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(
|
|
93
|
-
params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData
|
|
89
|
+
params?: GetTasksParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
94
90
|
|
|
95
91
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
96
92
|
|
|
@@ -105,6 +101,46 @@ export const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError
|
|
|
105
101
|
|
|
106
102
|
|
|
107
103
|
|
|
104
|
+
export const getGetTasksSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
105
|
+
) => {
|
|
106
|
+
|
|
107
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
108
|
+
|
|
109
|
+
const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({ signal }) => getTasks(params, requestOptions, signal);
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & { queryKey: QueryKey }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type GetTasksSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>
|
|
123
|
+
export type GetTasksSuspenseQueryError = ErrorType<void | DmError>
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @summary Returns a list of Tasks
|
|
127
|
+
*/
|
|
128
|
+
export const useGetTasksSuspense = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(
|
|
129
|
+
params?: GetTasksParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
130
|
+
|
|
131
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
132
|
+
|
|
133
|
+
const queryOptions = getGetTasksSuspenseQueryOptions(params,options)
|
|
134
|
+
|
|
135
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
136
|
+
|
|
137
|
+
query.queryKey = queryOptions.queryKey ;
|
|
138
|
+
|
|
139
|
+
return query;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
108
144
|
/**
|
|
109
145
|
* Returns Task information including its states and events.
|
|
110
146
|
|
|
@@ -134,7 +170,7 @@ export const getTask = (
|
|
|
134
170
|
|
|
135
171
|
|
|
136
172
|
return customInstance<TaskGetResponse>(
|
|
137
|
-
{url: `/task/${taskId}`, method: '
|
|
173
|
+
{url: `/task/${taskId}`, method: 'GET',
|
|
138
174
|
params, signal
|
|
139
175
|
},
|
|
140
176
|
options);
|
|
@@ -143,13 +179,12 @@ export const getTask = (
|
|
|
143
179
|
|
|
144
180
|
export const getGetTaskQueryKey = (taskId: string,
|
|
145
181
|
params?: GetTaskParams,) => {
|
|
146
|
-
|
|
147
182
|
return ["data-manager-api", `/task/${taskId}`, ...(params ? [params]: [])] as const;
|
|
148
183
|
}
|
|
149
184
|
|
|
150
185
|
|
|
151
186
|
export const getGetTaskQueryOptions = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(taskId: string,
|
|
152
|
-
params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData
|
|
187
|
+
params?: GetTaskParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
153
188
|
) => {
|
|
154
189
|
|
|
155
190
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -175,7 +210,7 @@ export type GetTaskQueryError = ErrorType<void | DmError>
|
|
|
175
210
|
*/
|
|
176
211
|
export const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(
|
|
177
212
|
taskId: string,
|
|
178
|
-
params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData
|
|
213
|
+
params?: GetTaskParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
179
214
|
|
|
180
215
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
181
216
|
|
|
@@ -190,6 +225,48 @@ export const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError =
|
|
|
190
225
|
|
|
191
226
|
|
|
192
227
|
|
|
228
|
+
export const getGetTaskSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(taskId: string,
|
|
229
|
+
params?: GetTaskParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
230
|
+
) => {
|
|
231
|
+
|
|
232
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
233
|
+
|
|
234
|
+
const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId,params);
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({ signal }) => getTask(taskId,params, requestOptions, signal);
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
return { queryKey, queryFn, enabled: !!(taskId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & { queryKey: QueryKey }
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type GetTaskSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>
|
|
248
|
+
export type GetTaskSuspenseQueryError = ErrorType<void | DmError>
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @summary Returns Task information
|
|
252
|
+
*/
|
|
253
|
+
export const useGetTaskSuspense = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(
|
|
254
|
+
taskId: string,
|
|
255
|
+
params?: GetTaskParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
256
|
+
|
|
257
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
258
|
+
|
|
259
|
+
const queryOptions = getGetTaskSuspenseQueryOptions(taskId,params,options)
|
|
260
|
+
|
|
261
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
262
|
+
|
|
263
|
+
query.queryKey = queryOptions.queryKey ;
|
|
264
|
+
|
|
265
|
+
return query;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
193
270
|
/**
|
|
194
271
|
* Given a `task_id` the Task will be removed.
|
|
195
272
|
|
|
@@ -205,7 +282,7 @@ export const deleteTask = (
|
|
|
205
282
|
|
|
206
283
|
|
|
207
284
|
return customInstance<void>(
|
|
208
|
-
{url: `/task/${taskId}`, method: '
|
|
285
|
+
{url: `/task/${taskId}`, method: 'DELETE'
|
|
209
286
|
},
|
|
210
287
|
options);
|
|
211
288
|
}
|
|
@@ -213,7 +290,6 @@ export const deleteTask = (
|
|
|
213
290
|
|
|
214
291
|
|
|
215
292
|
export const getDeleteTaskMutationOptions = <TError = ErrorType<DmError>,
|
|
216
|
-
|
|
217
293
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
218
294
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext> => {
|
|
219
295
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
@@ -240,7 +316,6 @@ export const getDeleteTaskMutationOptions = <TError = ErrorType<DmError>,
|
|
|
240
316
|
* @summary Delete a Task entry
|
|
241
317
|
*/
|
|
242
318
|
export const useDeleteTask = <TError = ErrorType<DmError>,
|
|
243
|
-
|
|
244
319
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
245
320
|
) => {
|
|
246
321
|
|
package/src/type/type.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
2
|
+
* Generated by orval v6.25.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Dataset Manager API
|
|
5
5
|
* The Dataset Manager API service.
|
|
@@ -9,13 +9,16 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
9
9
|
* OpenAPI spec version: 1.2
|
|
10
10
|
*/
|
|
11
11
|
import {
|
|
12
|
-
useQuery
|
|
12
|
+
useQuery,
|
|
13
|
+
useSuspenseQuery
|
|
13
14
|
} from '@tanstack/react-query'
|
|
14
15
|
import type {
|
|
15
16
|
QueryFunction,
|
|
16
17
|
QueryKey,
|
|
17
18
|
UseQueryOptions,
|
|
18
|
-
UseQueryResult
|
|
19
|
+
UseQueryResult,
|
|
20
|
+
UseSuspenseQueryOptions,
|
|
21
|
+
UseSuspenseQueryResult
|
|
19
22
|
} from '@tanstack/react-query'
|
|
20
23
|
import type {
|
|
21
24
|
DmError,
|
|
@@ -25,13 +28,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
25
28
|
import type { ErrorType } from '.././custom-instance';
|
|
26
29
|
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
30
|
-
config: any,
|
|
31
|
-
args: infer P,
|
|
32
|
-
) => any
|
|
33
|
-
? P
|
|
34
|
-
: never;
|
|
31
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
35
32
|
|
|
36
33
|
|
|
37
34
|
/**
|
|
@@ -46,19 +43,18 @@ export const getFileTypes = (
|
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
return customInstance<TypesGetResponse>(
|
|
49
|
-
{url: `/type`, method: '
|
|
46
|
+
{url: `/type`, method: 'GET', signal
|
|
50
47
|
},
|
|
51
48
|
options);
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
|
|
55
52
|
export const getGetFileTypesQueryKey = () => {
|
|
56
|
-
|
|
57
53
|
return ["data-manager-api", `/type`] as const;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
|
|
61
|
-
export const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData
|
|
57
|
+
export const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
62
58
|
) => {
|
|
63
59
|
|
|
64
60
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -83,7 +79,7 @@ export type GetFileTypesQueryError = ErrorType<void | DmError>
|
|
|
83
79
|
* @summary Get the supported File Types
|
|
84
80
|
*/
|
|
85
81
|
export const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
|
|
86
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData
|
|
82
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
87
83
|
|
|
88
84
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
89
85
|
|
|
@@ -98,3 +94,43 @@ export const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>
|
|
|
98
94
|
|
|
99
95
|
|
|
100
96
|
|
|
97
|
+
export const getGetFileTypesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
98
|
+
) => {
|
|
99
|
+
|
|
100
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
101
|
+
|
|
102
|
+
const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>
|
|
116
|
+
export type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @summary Get the supported File Types
|
|
120
|
+
*/
|
|
121
|
+
export const useGetFileTypesSuspense = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
|
|
122
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
123
|
+
|
|
124
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
125
|
+
|
|
126
|
+
const queryOptions = getGetFileTypesSuspenseQueryOptions(options)
|
|
127
|
+
|
|
128
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
129
|
+
|
|
130
|
+
query.queryKey = queryOptions.queryKey ;
|
|
131
|
+
|
|
132
|
+
return query;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
package/src/user/user.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
2
|
+
* Generated by orval v6.25.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Dataset Manager API
|
|
5
5
|
* The Dataset Manager API service.
|
|
@@ -10,7 +10,8 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
10
10
|
*/
|
|
11
11
|
import {
|
|
12
12
|
useMutation,
|
|
13
|
-
useQuery
|
|
13
|
+
useQuery,
|
|
14
|
+
useSuspenseQuery
|
|
14
15
|
} from '@tanstack/react-query'
|
|
15
16
|
import type {
|
|
16
17
|
MutationFunction,
|
|
@@ -18,7 +19,9 @@ import type {
|
|
|
18
19
|
QueryKey,
|
|
19
20
|
UseMutationOptions,
|
|
20
21
|
UseQueryOptions,
|
|
21
|
-
UseQueryResult
|
|
22
|
+
UseQueryResult,
|
|
23
|
+
UseSuspenseQueryOptions,
|
|
24
|
+
UseSuspenseQueryResult
|
|
22
25
|
} from '@tanstack/react-query'
|
|
23
26
|
import type {
|
|
24
27
|
DmError,
|
|
@@ -33,13 +36,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
33
36
|
import type { ErrorType } from '.././custom-instance';
|
|
34
37
|
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
38
|
-
config: any,
|
|
39
|
-
args: infer P,
|
|
40
|
-
) => any
|
|
41
|
-
? P
|
|
42
|
-
: never;
|
|
39
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
43
40
|
|
|
44
41
|
|
|
45
42
|
/**
|
|
@@ -54,19 +51,18 @@ export const getUsers = (
|
|
|
54
51
|
|
|
55
52
|
|
|
56
53
|
return customInstance<UsersGetResponse>(
|
|
57
|
-
{url: `/user`, method: '
|
|
54
|
+
{url: `/user`, method: 'GET', signal
|
|
58
55
|
},
|
|
59
56
|
options);
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
|
|
63
60
|
export const getGetUsersQueryKey = () => {
|
|
64
|
-
|
|
65
61
|
return ["data-manager-api", `/user`] as const;
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
|
|
69
|
-
export const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData
|
|
65
|
+
export const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
70
66
|
) => {
|
|
71
67
|
|
|
72
68
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -91,7 +87,7 @@ export type GetUsersQueryError = ErrorType<void | DmError>
|
|
|
91
87
|
* @summary Get information about all known Users
|
|
92
88
|
*/
|
|
93
89
|
export const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(
|
|
94
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData
|
|
90
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
95
91
|
|
|
96
92
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
97
93
|
|
|
@@ -106,6 +102,46 @@ export const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError
|
|
|
106
102
|
|
|
107
103
|
|
|
108
104
|
|
|
105
|
+
export const getGetUsersSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
106
|
+
) => {
|
|
107
|
+
|
|
108
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
109
|
+
|
|
110
|
+
const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: QueryKey }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GetUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>
|
|
124
|
+
export type GetUsersSuspenseQueryError = ErrorType<void | DmError>
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @summary Get information about all known Users
|
|
128
|
+
*/
|
|
129
|
+
export const useGetUsersSuspense = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(
|
|
130
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
131
|
+
|
|
132
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
133
|
+
|
|
134
|
+
const queryOptions = getGetUsersSuspenseQueryOptions(options)
|
|
135
|
+
|
|
136
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
137
|
+
|
|
138
|
+
query.queryKey = queryOptions.queryKey ;
|
|
139
|
+
|
|
140
|
+
return query;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
109
145
|
/**
|
|
110
146
|
* @summary Get information about your account
|
|
111
147
|
*/
|
|
@@ -116,7 +152,7 @@ export const getUserAccount = (
|
|
|
116
152
|
|
|
117
153
|
|
|
118
154
|
return customInstance<UserAccountDetail>(
|
|
119
|
-
{url: `/user/account`, method: '
|
|
155
|
+
{url: `/user/account`, method: 'GET',
|
|
120
156
|
params, signal
|
|
121
157
|
},
|
|
122
158
|
options);
|
|
@@ -124,12 +160,11 @@ export const getUserAccount = (
|
|
|
124
160
|
|
|
125
161
|
|
|
126
162
|
export const getGetUserAccountQueryKey = (params?: GetUserAccountParams,) => {
|
|
127
|
-
|
|
128
163
|
return ["data-manager-api", `/user/account`, ...(params ? [params]: [])] as const;
|
|
129
164
|
}
|
|
130
165
|
|
|
131
166
|
|
|
132
|
-
export const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData
|
|
167
|
+
export const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
133
168
|
) => {
|
|
134
169
|
|
|
135
170
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -154,7 +189,7 @@ export type GetUserAccountQueryError = ErrorType<void | DmError>
|
|
|
154
189
|
* @summary Get information about your account
|
|
155
190
|
*/
|
|
156
191
|
export const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(
|
|
157
|
-
params?: GetUserAccountParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData
|
|
192
|
+
params?: GetUserAccountParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
158
193
|
|
|
159
194
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
160
195
|
|
|
@@ -169,6 +204,46 @@ export const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccou
|
|
|
169
204
|
|
|
170
205
|
|
|
171
206
|
|
|
207
|
+
export const getGetUserAccountSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
208
|
+
) => {
|
|
209
|
+
|
|
210
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
211
|
+
|
|
212
|
+
const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, requestOptions, signal);
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & { queryKey: QueryKey }
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>
|
|
226
|
+
export type GetUserAccountSuspenseQueryError = ErrorType<void | DmError>
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @summary Get information about your account
|
|
230
|
+
*/
|
|
231
|
+
export const useGetUserAccountSuspense = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(
|
|
232
|
+
params?: GetUserAccountParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
233
|
+
|
|
234
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
235
|
+
|
|
236
|
+
const queryOptions = getGetUserAccountSuspenseQueryOptions(params,options)
|
|
237
|
+
|
|
238
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
239
|
+
|
|
240
|
+
query.queryKey = queryOptions.queryKey ;
|
|
241
|
+
|
|
242
|
+
return query;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
172
247
|
/**
|
|
173
248
|
* @summary Patch your account
|
|
174
249
|
*/
|
|
@@ -191,7 +266,7 @@ if(userAccountPatchBodyBody.use_impersonation !== undefined) {
|
|
|
191
266
|
}
|
|
192
267
|
|
|
193
268
|
return customInstance<void>(
|
|
194
|
-
{url: `/user/account`, method: '
|
|
269
|
+
{url: `/user/account`, method: 'PATCH',
|
|
195
270
|
headers: {'Content-Type': 'multipart/form-data', },
|
|
196
271
|
data: formData
|
|
197
272
|
},
|
|
@@ -201,7 +276,6 @@ if(userAccountPatchBodyBody.use_impersonation !== undefined) {
|
|
|
201
276
|
|
|
202
277
|
|
|
203
278
|
export const getPatchUserAccountMutationOptions = <TError = ErrorType<DmError>,
|
|
204
|
-
|
|
205
279
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
206
280
|
): UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext> => {
|
|
207
281
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
@@ -228,7 +302,6 @@ export const getPatchUserAccountMutationOptions = <TError = ErrorType<DmError>,
|
|
|
228
302
|
* @summary Patch your account
|
|
229
303
|
*/
|
|
230
304
|
export const usePatchUserAccount = <TError = ErrorType<DmError>,
|
|
231
|
-
|
|
232
305
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
233
306
|
) => {
|
|
234
307
|
|
|
@@ -248,7 +321,7 @@ export const getUserApiLog = (
|
|
|
248
321
|
|
|
249
322
|
|
|
250
323
|
return customInstance<UserApiLogGetResponse>(
|
|
251
|
-
{url: `/user/api-log`, method: '
|
|
324
|
+
{url: `/user/api-log`, method: 'GET',
|
|
252
325
|
params, signal
|
|
253
326
|
},
|
|
254
327
|
options);
|
|
@@ -256,12 +329,11 @@ export const getUserApiLog = (
|
|
|
256
329
|
|
|
257
330
|
|
|
258
331
|
export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams,) => {
|
|
259
|
-
|
|
260
332
|
return ["data-manager-api", `/user/api-log`, ...(params ? [params]: [])] as const;
|
|
261
333
|
}
|
|
262
334
|
|
|
263
335
|
|
|
264
|
-
export const getGetUserApiLogQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData
|
|
336
|
+
export const getGetUserApiLogQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
265
337
|
) => {
|
|
266
338
|
|
|
267
339
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -286,7 +358,7 @@ export type GetUserApiLogQueryError = ErrorType<void>
|
|
|
286
358
|
* @summary Get the API call log recorded against your account
|
|
287
359
|
*/
|
|
288
360
|
export const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(
|
|
289
|
-
params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData
|
|
361
|
+
params?: GetUserApiLogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
290
362
|
|
|
291
363
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
292
364
|
|
|
@@ -301,3 +373,43 @@ export const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog
|
|
|
301
373
|
|
|
302
374
|
|
|
303
375
|
|
|
376
|
+
export const getGetUserApiLogSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
377
|
+
) => {
|
|
378
|
+
|
|
379
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
380
|
+
|
|
381
|
+
const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & { queryKey: QueryKey }
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export type GetUserApiLogSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>
|
|
395
|
+
export type GetUserApiLogSuspenseQueryError = ErrorType<void>
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @summary Get the API call log recorded against your account
|
|
399
|
+
*/
|
|
400
|
+
export const useGetUserApiLogSuspense = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(
|
|
401
|
+
params?: GetUserApiLogParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
402
|
+
|
|
403
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
404
|
+
|
|
405
|
+
const queryOptions = getGetUserApiLogSuspenseQueryOptions(params,options)
|
|
406
|
+
|
|
407
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
408
|
+
|
|
409
|
+
query.queryKey = queryOptions.queryKey ;
|
|
410
|
+
|
|
411
|
+
return query;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|