@squonk/data-manager-client 1.2.8 → 2.0.0-alpha.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 +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 +53 -19
- package/file-and-path/file-and-path.d.ts +53 -19
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2102 -2
- package/index.d.ts +2102 -2
- package/index.js +1 -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/inventory/inventory.cjs +56 -0
- package/inventory/inventory.cjs.map +1 -0
- package/inventory/inventory.d.cts +50 -0
- package/inventory/inventory.d.ts +50 -0
- package/inventory/inventory.js +56 -0
- package/inventory/inventory.js.map +1 -0
- package/inventory/package.json +7 -0
- 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 +131 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +166 -30
- package/project/project.d.ts +166 -30
- package/project/project.js +119 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +137 -23
- package/src/admin/admin.ts +149 -51
- package/src/application/application.ts +94 -19
- package/src/configuration/configuration.ts +51 -15
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +115 -13
- package/src/dataset/dataset.ts +234 -46
- package/src/exchange-rate/exchange-rate.ts +186 -33
- package/src/file-and-path/file-and-path.ts +104 -39
- package/src/instance/instance.ts +99 -34
- package/src/inventory/inventory.ts +140 -0
- package/src/job/job.ts +139 -23
- package/src/metadata/metadata.ts +98 -25
- package/src/project/project.ts +313 -60
- package/src/task/task.ts +97 -22
- package/src/type/type.ts +51 -15
- package/src/user/user.ts +138 -26
- 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
|
@@ -1,21 +1,24 @@
|
|
|
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.
|
|
6
6
|
|
|
7
7
|
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
|
|
8
8
|
|
|
9
|
-
* OpenAPI spec version:
|
|
9
|
+
* OpenAPI spec version: 2.0
|
|
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
|
ApplicationGetResponse,
|
|
@@ -26,13 +29,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
26
29
|
import type { ErrorType } from '.././custom-instance';
|
|
27
30
|
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
31
|
-
config: any,
|
|
32
|
-
args: infer P,
|
|
33
|
-
) => any
|
|
34
|
-
? P
|
|
35
|
-
: never;
|
|
32
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
36
33
|
|
|
37
34
|
|
|
38
35
|
/**
|
|
@@ -49,19 +46,18 @@ export const getApplications = (
|
|
|
49
46
|
|
|
50
47
|
|
|
51
48
|
return customInstance<ApplicationsGetResponse>(
|
|
52
|
-
{url: `/application`, method: '
|
|
49
|
+
{url: `/application`, method: 'GET', signal
|
|
53
50
|
},
|
|
54
51
|
options);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
|
|
58
55
|
export const getGetApplicationsQueryKey = () => {
|
|
59
|
-
|
|
60
56
|
return ["data-manager-api", `/application`] as const;
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
|
|
64
|
-
export const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData
|
|
60
|
+
export const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
65
61
|
) => {
|
|
66
62
|
|
|
67
63
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -86,7 +82,7 @@ export type GetApplicationsQueryError = ErrorType<DmError>
|
|
|
86
82
|
* @summary Get all Applications available to you
|
|
87
83
|
*/
|
|
88
84
|
export const useGetApplications = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(
|
|
89
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData
|
|
85
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
90
86
|
|
|
91
87
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
92
88
|
|
|
@@ -101,6 +97,46 @@ export const useGetApplications = <TData = Awaited<ReturnType<typeof getApplicat
|
|
|
101
97
|
|
|
102
98
|
|
|
103
99
|
|
|
100
|
+
export const getGetApplicationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
101
|
+
) => {
|
|
102
|
+
|
|
103
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
104
|
+
|
|
105
|
+
const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({ signal }) => getApplications(requestOptions, signal);
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData> & { queryKey: QueryKey }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type GetApplicationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>
|
|
119
|
+
export type GetApplicationsSuspenseQueryError = ErrorType<DmError>
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @summary Get all Applications available to you
|
|
123
|
+
*/
|
|
124
|
+
export const useGetApplicationsSuspense = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(
|
|
125
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
126
|
+
|
|
127
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
128
|
+
|
|
129
|
+
const queryOptions = getGetApplicationsSuspenseQueryOptions(options)
|
|
130
|
+
|
|
131
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
132
|
+
|
|
133
|
+
query.queryKey = queryOptions.queryKey ;
|
|
134
|
+
|
|
135
|
+
return query;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
104
140
|
/**
|
|
105
141
|
* Get details of a specific Application available to you that can be instantiated.
|
|
106
142
|
|
|
@@ -113,19 +149,18 @@ export const getApplication = (
|
|
|
113
149
|
|
|
114
150
|
|
|
115
151
|
return customInstance<ApplicationGetResponse>(
|
|
116
|
-
{url: `/application/${applicationId}`, method: '
|
|
152
|
+
{url: `/application/${applicationId}`, method: 'GET', signal
|
|
117
153
|
},
|
|
118
154
|
options);
|
|
119
155
|
}
|
|
120
156
|
|
|
121
157
|
|
|
122
158
|
export const getGetApplicationQueryKey = (applicationId: string,) => {
|
|
123
|
-
|
|
124
159
|
return ["data-manager-api", `/application/${applicationId}`] as const;
|
|
125
160
|
}
|
|
126
161
|
|
|
127
162
|
|
|
128
|
-
export const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData
|
|
163
|
+
export const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
129
164
|
) => {
|
|
130
165
|
|
|
131
166
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -150,7 +185,7 @@ export type GetApplicationQueryError = ErrorType<void | DmError>
|
|
|
150
185
|
* @summary Get details of a specific Application
|
|
151
186
|
*/
|
|
152
187
|
export const useGetApplication = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(
|
|
153
|
-
applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData
|
|
188
|
+
applicationId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
154
189
|
|
|
155
190
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
156
191
|
|
|
@@ -165,3 +200,43 @@ export const useGetApplication = <TData = Awaited<ReturnType<typeof getApplicati
|
|
|
165
200
|
|
|
166
201
|
|
|
167
202
|
|
|
203
|
+
export const getGetApplicationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
204
|
+
) => {
|
|
205
|
+
|
|
206
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
207
|
+
|
|
208
|
+
const queryKey = queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({ signal }) => getApplication(applicationId, requestOptions, signal);
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData> & { queryKey: QueryKey }
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type GetApplicationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>
|
|
222
|
+
export type GetApplicationSuspenseQueryError = ErrorType<void | DmError>
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @summary Get details of a specific Application
|
|
226
|
+
*/
|
|
227
|
+
export const useGetApplicationSuspense = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(
|
|
228
|
+
applicationId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
229
|
+
|
|
230
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
231
|
+
|
|
232
|
+
const queryOptions = getGetApplicationSuspenseQueryOptions(applicationId,options)
|
|
233
|
+
|
|
234
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
235
|
+
|
|
236
|
+
query.queryKey = queryOptions.queryKey ;
|
|
237
|
+
|
|
238
|
+
return query;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
@@ -1,21 +1,24 @@
|
|
|
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.
|
|
6
6
|
|
|
7
7
|
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
|
|
8
8
|
|
|
9
|
-
* OpenAPI spec version:
|
|
9
|
+
* OpenAPI spec version: 2.0
|
|
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
|
/**
|
|
@@ -44,19 +41,18 @@ export const getMode = (
|
|
|
44
41
|
|
|
45
42
|
|
|
46
43
|
return customInstance<ModeGetResponse>(
|
|
47
|
-
{url: `/mode`, method: '
|
|
44
|
+
{url: `/mode`, method: 'GET', signal
|
|
48
45
|
},
|
|
49
46
|
options);
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
|
|
53
50
|
export const getGetModeQueryKey = () => {
|
|
54
|
-
|
|
55
51
|
return ["data-manager-api", `/mode`] as const;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
|
|
59
|
-
export const getGetModeQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData
|
|
55
|
+
export const getGetModeQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
60
56
|
) => {
|
|
61
57
|
|
|
62
58
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -81,7 +77,7 @@ export type GetModeQueryError = ErrorType<void | DmError>
|
|
|
81
77
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
82
78
|
*/
|
|
83
79
|
export const useGetMode = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(
|
|
84
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData
|
|
80
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
85
81
|
|
|
86
82
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
87
83
|
|
|
@@ -96,3 +92,43 @@ export const useGetMode = <TData = Awaited<ReturnType<typeof getMode>>, TError =
|
|
|
96
92
|
|
|
97
93
|
|
|
98
94
|
|
|
95
|
+
export const getGetModeSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
96
|
+
) => {
|
|
97
|
+
|
|
98
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
99
|
+
|
|
100
|
+
const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) => getMode(requestOptions, signal);
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & { queryKey: QueryKey }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type GetModeSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>
|
|
114
|
+
export type GetModeSuspenseQueryError = ErrorType<void | DmError>
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @summary Gets the Data Manager mode that's running behind the API
|
|
118
|
+
*/
|
|
119
|
+
export const useGetModeSuspense = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(
|
|
120
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
121
|
+
|
|
122
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
123
|
+
|
|
124
|
+
const queryOptions = getGetModeSuspenseQueryOptions(options)
|
|
125
|
+
|
|
126
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
127
|
+
|
|
128
|
+
query.queryKey = queryOptions.queryKey ;
|
|
129
|
+
|
|
130
|
+
return query;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
package/src/custom-instance.ts
CHANGED
|
@@ -39,10 +39,9 @@ export const customInstance = <TReturn>(
|
|
|
39
39
|
({ data }) => data,
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
source.cancel('Query was cancelled by React Query');
|
|
42
|
+
// @ts-expect-error need to add a cancel method to the promise
|
|
43
|
+
promise.cancel = () => {
|
|
44
|
+
source.cancel('Query was cancelled');
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
return promise;
|
|
@@ -1,13 +1,29 @@
|
|
|
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.
|
|
6
6
|
|
|
7
7
|
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
|
|
8
8
|
|
|
9
|
-
* OpenAPI spec version:
|
|
9
|
+
* OpenAPI spec version: 2.0
|
|
10
10
|
*/
|
|
11
|
+
export type GetUserInventoryParams = {
|
|
12
|
+
/**
|
|
13
|
+
* An Organisation identity
|
|
14
|
+
*/
|
|
15
|
+
org_id?: QOrgIdParameter;
|
|
16
|
+
/**
|
|
17
|
+
* A Unit identity
|
|
18
|
+
*/
|
|
19
|
+
unit_id?: QUnitIdParameter;
|
|
20
|
+
/**
|
|
21
|
+
* A comma-separated list of usernames
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
usernames?: QUsernamesParameter;
|
|
25
|
+
};
|
|
26
|
+
|
|
11
27
|
export type AdminDeleteJobManifestParams = {
|
|
12
28
|
/**
|
|
13
29
|
* Purge unreferenced Jobs
|
|
@@ -242,12 +258,12 @@ username?: QUsernameParameter;
|
|
|
242
258
|
*/
|
|
243
259
|
dataset_mime_type?: QDatasetMimeTypeParameter;
|
|
244
260
|
/**
|
|
245
|
-
*
|
|
261
|
+
* A comma-separated list of owners
|
|
246
262
|
|
|
247
263
|
*/
|
|
248
264
|
owners?: QOwnersParameter;
|
|
249
265
|
/**
|
|
250
|
-
*
|
|
266
|
+
* A comma-separated list of editors
|
|
251
267
|
|
|
252
268
|
*/
|
|
253
269
|
editors?: QEditorsParameter;
|
|
@@ -320,7 +336,7 @@ path?: QFilePathParameter;
|
|
|
320
336
|
};
|
|
321
337
|
|
|
322
338
|
/**
|
|
323
|
-
*
|
|
339
|
+
* A comma-separated list of editors
|
|
324
340
|
|
|
325
341
|
*/
|
|
326
342
|
export type QEditorsParameter = string;
|
|
@@ -331,11 +347,17 @@ export type QEditorsParameter = string;
|
|
|
331
347
|
export type QPurgeParameter = boolean;
|
|
332
348
|
|
|
333
349
|
/**
|
|
334
|
-
*
|
|
350
|
+
* A comma-separated list of owners
|
|
335
351
|
|
|
336
352
|
*/
|
|
337
353
|
export type QOwnersParameter = string;
|
|
338
354
|
|
|
355
|
+
/**
|
|
356
|
+
* A comma-separated list of usernames
|
|
357
|
+
|
|
358
|
+
*/
|
|
359
|
+
export type QUsernamesParameter = string;
|
|
360
|
+
|
|
339
361
|
/**
|
|
340
362
|
* Filter the datasets by username
|
|
341
363
|
|
|
@@ -348,6 +370,11 @@ export type QUsernameParameter = string;
|
|
|
348
370
|
*/
|
|
349
371
|
export type QUntilParameter = string;
|
|
350
372
|
|
|
373
|
+
/**
|
|
374
|
+
* A Unit identity
|
|
375
|
+
*/
|
|
376
|
+
export type QUnitIdParameter = string;
|
|
377
|
+
|
|
351
378
|
/**
|
|
352
379
|
* A token
|
|
353
380
|
*/
|
|
@@ -368,6 +395,11 @@ export type QProjectNameParameter = string;
|
|
|
368
395
|
*/
|
|
369
396
|
export type QProjectIdParameter = string;
|
|
370
397
|
|
|
398
|
+
/**
|
|
399
|
+
* An Organisation identity
|
|
400
|
+
*/
|
|
401
|
+
export type QOrgIdParameter = string;
|
|
402
|
+
|
|
371
403
|
/**
|
|
372
404
|
* JSON string containing a list of label/value pairs for the datasets to be filtered by. If the value is set to null, then only the label is matched. If both the label and value are set, then both are matched. e.g. '{"label1": null, "label2": "value2"}'
|
|
373
405
|
|
|
@@ -1010,7 +1042,12 @@ export interface ProjectFileDetail {
|
|
|
1010
1042
|
}
|
|
1011
1043
|
|
|
1012
1044
|
export interface ProjectDetail {
|
|
1045
|
+
/** An administrator (user_id) of the project */
|
|
1046
|
+
administrators: string[];
|
|
1013
1047
|
created: string;
|
|
1048
|
+
/** The user who created the project
|
|
1049
|
+
*/
|
|
1050
|
+
creator: string;
|
|
1014
1051
|
/** An editor (user_id) of the project */
|
|
1015
1052
|
editors: string[];
|
|
1016
1053
|
/** A list of managed files in the Project
|
|
@@ -1024,10 +1061,7 @@ export interface ProjectDetail {
|
|
|
1024
1061
|
/** The Account Server Organisation the Project Product Unit belongs to
|
|
1025
1062
|
*/
|
|
1026
1063
|
organisation_id?: string;
|
|
1027
|
-
/**
|
|
1028
|
-
*/
|
|
1029
|
-
owner: string;
|
|
1030
|
-
/** True if the project is private. Private projects are only visible to the owner and its editors.
|
|
1064
|
+
/** True if the project is private. Private projects are only visible to editors.
|
|
1031
1065
|
*/
|
|
1032
1066
|
private: boolean;
|
|
1033
1067
|
/** The Account Server Product the Project belongs to
|
|
@@ -1643,6 +1677,24 @@ export interface UserApiLogGetResponse {
|
|
|
1643
1677
|
api_log: ApiLogDetail[];
|
|
1644
1678
|
}
|
|
1645
1679
|
|
|
1680
|
+
export interface UserActivityDetail {
|
|
1681
|
+
/** A list of dates where the API has been used during the monitoring period. Dates are returned if when the activity is not 100% and active dates are present. Dates are listed in reverse chronological order (i.e. the most recent first)
|
|
1682
|
+
*/
|
|
1683
|
+
active_dates?: string[];
|
|
1684
|
+
/** The number of days the API has been used
|
|
1685
|
+
*/
|
|
1686
|
+
active_days: number;
|
|
1687
|
+
/** Active days, as a percentage, over the monitoring period.
|
|
1688
|
+
*/
|
|
1689
|
+
activity: string;
|
|
1690
|
+
/** The number of days the API has not been used
|
|
1691
|
+
*/
|
|
1692
|
+
inactive_days: number;
|
|
1693
|
+
/** The period over which the activity is monitored
|
|
1694
|
+
*/
|
|
1695
|
+
monitoring_period: string;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1646
1698
|
export type UserAccountGetResponse = UserAccountDetail;
|
|
1647
1699
|
|
|
1648
1700
|
export interface TypesGetResponse {
|
|
@@ -1732,6 +1784,12 @@ export interface JobsGetResponse {
|
|
|
1732
1784
|
jobs: JobSummary[];
|
|
1733
1785
|
}
|
|
1734
1786
|
|
|
1787
|
+
/**
|
|
1788
|
+
* The directory used as the container image working directory (if defined)
|
|
1789
|
+
|
|
1790
|
+
*/
|
|
1791
|
+
export type JobGetResponseImageWorkingDirectory = {};
|
|
1792
|
+
|
|
1735
1793
|
/**
|
|
1736
1794
|
* The optional container image type. Typically a single-container `SIMPLE` (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
1737
1795
|
|
|
@@ -1794,7 +1852,7 @@ Where there is no remedy for a given reason the remedy will be "There is no reme
|
|
|
1794
1852
|
image_type?: JobGetResponseImageType;
|
|
1795
1853
|
/** The directory used as the container image working directory (if defined)
|
|
1796
1854
|
*/
|
|
1797
|
-
image_working_directory?:
|
|
1855
|
+
image_working_directory?: JobGetResponseImageWorkingDirectory;
|
|
1798
1856
|
/** The Job name, unique within a given collection
|
|
1799
1857
|
*/
|
|
1800
1858
|
job: string;
|
|
@@ -1818,6 +1876,40 @@ Where there is no remedy for a given reason the remedy will be "There is no reme
|
|
|
1818
1876
|
version: string;
|
|
1819
1877
|
}
|
|
1820
1878
|
|
|
1879
|
+
export interface InventoryProjectDetail {
|
|
1880
|
+
id: string;
|
|
1881
|
+
name: string;
|
|
1882
|
+
unit_id: string;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
export interface InventoryDatasetDetail {
|
|
1886
|
+
filename: string;
|
|
1887
|
+
id: string;
|
|
1888
|
+
unit_id: string;
|
|
1889
|
+
version: number;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
export type InventoryUserDetailProjects = {
|
|
1893
|
+
administrator: InventoryProjectDetail[];
|
|
1894
|
+
editor: InventoryProjectDetail[];
|
|
1895
|
+
observer: InventoryProjectDetail[];
|
|
1896
|
+
};
|
|
1897
|
+
|
|
1898
|
+
export type InventoryUserDetailDatasets = {
|
|
1899
|
+
editor?: InventoryDatasetDetail[];
|
|
1900
|
+
owner?: InventoryDatasetDetail[];
|
|
1901
|
+
};
|
|
1902
|
+
|
|
1903
|
+
export interface InventoryUserDetail {
|
|
1904
|
+
activity: UserActivityDetail;
|
|
1905
|
+
datasets: InventoryUserDetailDatasets;
|
|
1906
|
+
f_uid: number;
|
|
1907
|
+
first_seen: string;
|
|
1908
|
+
last_seen_date: string;
|
|
1909
|
+
projects: InventoryUserDetailProjects;
|
|
1910
|
+
username: string;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1821
1913
|
export type InstanceTaskPurpose = typeof InstanceTaskPurpose[keyof typeof InstanceTaskPurpose];
|
|
1822
1914
|
|
|
1823
1915
|
|
|
@@ -2085,10 +2177,14 @@ export interface DatasetSchemaGetResponse {
|
|
|
2085
2177
|
[key: string]: any;
|
|
2086
2178
|
}
|
|
2087
2179
|
|
|
2180
|
+
export type DatasetMetaGetResponseLabelsItem = {};
|
|
2181
|
+
|
|
2182
|
+
export type DatasetMetaGetResponseAnnotationsItem = {};
|
|
2183
|
+
|
|
2088
2184
|
export interface DatasetMetaGetResponse {
|
|
2089
2185
|
/** The Metadata's annotations
|
|
2090
2186
|
*/
|
|
2091
|
-
annotations:
|
|
2187
|
+
annotations: DatasetMetaGetResponseAnnotationsItem[];
|
|
2092
2188
|
/** The date and time of creation
|
|
2093
2189
|
*/
|
|
2094
2190
|
created: string;
|
|
@@ -2106,7 +2202,7 @@ export interface DatasetMetaGetResponse {
|
|
|
2106
2202
|
description: string;
|
|
2107
2203
|
/** The Metadata's labels
|
|
2108
2204
|
*/
|
|
2109
|
-
labels:
|
|
2205
|
+
labels: DatasetMetaGetResponseLabelsItem[];
|
|
2110
2206
|
/** The date and time it was last updated
|
|
2111
2207
|
*/
|
|
2112
2208
|
last_updated: string;
|
|
@@ -2191,6 +2287,12 @@ export interface AdminJobManifestLoadPutResponse {
|
|
|
2191
2287
|
status: boolean;
|
|
2192
2288
|
}
|
|
2193
2289
|
|
|
2290
|
+
export interface InventoryUserGetResponse {
|
|
2291
|
+
/** The list of known Users
|
|
2292
|
+
*/
|
|
2293
|
+
users: InventoryUserDetail[];
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2194
2296
|
export interface AdminJobManifestGetResponse {
|
|
2195
2297
|
/** The list of known Job manifests
|
|
2196
2298
|
*/
|