@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
|
@@ -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
|
/**
|
|
@@ -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,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.
|
|
@@ -28,6 +28,12 @@ idle_days?: QIdleDaysParameter;
|
|
|
28
28
|
active_days?: QActiveDaysParameter;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Set to include acknowledged items
|
|
33
|
+
|
|
34
|
+
*/
|
|
35
|
+
export type QIncludeAcknowlegedParameter = boolean;
|
|
36
|
+
|
|
31
37
|
export type AdminGetServiceErrorsParams = {
|
|
32
38
|
/**
|
|
33
39
|
* Set to include acknowledged items
|
|
@@ -36,6 +42,12 @@ export type AdminGetServiceErrorsParams = {
|
|
|
36
42
|
include_acknowleged?: QIncludeAcknowlegedParameter;
|
|
37
43
|
};
|
|
38
44
|
|
|
45
|
+
/**
|
|
46
|
+
* A from (inclusive) date-time. If provided no API calls prior to this will be returned. UTC is assumed if no timezone is provided
|
|
47
|
+
|
|
48
|
+
*/
|
|
49
|
+
export type QFromParameter = string;
|
|
50
|
+
|
|
39
51
|
export type GetUserApiLogParams = {
|
|
40
52
|
/**
|
|
41
53
|
* A from (inclusive) date-time. If provided no API calls prior to this will be returned. UTC is assumed if no timezone is provided
|
|
@@ -153,6 +165,11 @@ event_prior_ordinal?: QEventPriorOrdinalParameter;
|
|
|
153
165
|
};
|
|
154
166
|
|
|
155
167
|
export type GetTasksParams = {
|
|
168
|
+
/**
|
|
169
|
+
* Set to limit the response to objects relating to the named purpose.
|
|
170
|
+
|
|
171
|
+
*/
|
|
172
|
+
purpose?: QPurposeParameter;
|
|
156
173
|
/**
|
|
157
174
|
* Set true if you want to exclude 'done' tasks, i.e. just see those that are still running.
|
|
158
175
|
|
|
@@ -178,6 +195,23 @@ project_id?: QProjectIdParameter;
|
|
|
178
195
|
instance_callback_context?: QInstanceCallbackContextParameter;
|
|
179
196
|
};
|
|
180
197
|
|
|
198
|
+
/**
|
|
199
|
+
* The Project identity
|
|
200
|
+
*/
|
|
201
|
+
export type QFileProjectIdParameter = string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
205
|
+
|
|
206
|
+
*/
|
|
207
|
+
export type QFilePathParameter = string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* A project file.
|
|
211
|
+
|
|
212
|
+
*/
|
|
213
|
+
export type QFileParameter = string;
|
|
214
|
+
|
|
181
215
|
export type DeleteUnmanagedFileParams = {
|
|
182
216
|
/**
|
|
183
217
|
* A project file.
|
|
@@ -425,35 +459,6 @@ export type QIncludeHiddenParameter = boolean;
|
|
|
425
459
|
*/
|
|
426
460
|
export type QIncludeDeletedParameter = boolean;
|
|
427
461
|
|
|
428
|
-
/**
|
|
429
|
-
* Set to include acknowledged items
|
|
430
|
-
|
|
431
|
-
*/
|
|
432
|
-
export type QIncludeAcknowlegedParameter = boolean;
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* A from (inclusive) date-time. If provided no API calls prior to this will be returned. UTC is assumed if no timezone is provided
|
|
436
|
-
|
|
437
|
-
*/
|
|
438
|
-
export type QFromParameter = string;
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* The Project identity
|
|
442
|
-
*/
|
|
443
|
-
export type QFileProjectIdParameter = string;
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
447
|
-
|
|
448
|
-
*/
|
|
449
|
-
export type QFilePathParameter = string;
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* A project file.
|
|
453
|
-
|
|
454
|
-
*/
|
|
455
|
-
export type QFileParameter = string;
|
|
456
|
-
|
|
457
462
|
/**
|
|
458
463
|
* Minimum days a user has been active (has used the API). If you specify `2` and it's Monday then users who have used the API on Saturday or later will be returned.
|
|
459
464
|
|
|
@@ -466,6 +471,17 @@ export type QActiveDaysParameter = number;
|
|
|
466
471
|
*/
|
|
467
472
|
export type QIdleDaysParameter = number;
|
|
468
473
|
|
|
474
|
+
export type QPurposeParameter = typeof QPurposeParameter[keyof typeof QPurposeParameter];
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
478
|
+
export const QPurposeParameter = {
|
|
479
|
+
DATASET: 'DATASET',
|
|
480
|
+
FILE: 'FILE',
|
|
481
|
+
INSTANCE: 'INSTANCE',
|
|
482
|
+
PROJECT: 'PROJECT',
|
|
483
|
+
} as const;
|
|
484
|
+
|
|
469
485
|
/**
|
|
470
486
|
* Set to a dot-separated string of purpose enumerations, i.e. `DATASET`, `FILE`, `INSTANCE`, or `PROJECT`. To exclude file and dataset tasks set this field to `FILE.DATASET`
|
|
471
487
|
|
|
@@ -1732,6 +1748,12 @@ export interface JobsGetResponse {
|
|
|
1732
1748
|
jobs: JobSummary[];
|
|
1733
1749
|
}
|
|
1734
1750
|
|
|
1751
|
+
/**
|
|
1752
|
+
* The directory used as the container image working directory (if defined)
|
|
1753
|
+
|
|
1754
|
+
*/
|
|
1755
|
+
export type JobGetResponseImageWorkingDirectory = {};
|
|
1756
|
+
|
|
1735
1757
|
/**
|
|
1736
1758
|
* 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
1759
|
|
|
@@ -1794,7 +1816,7 @@ Where there is no remedy for a given reason the remedy will be "There is no reme
|
|
|
1794
1816
|
image_type?: JobGetResponseImageType;
|
|
1795
1817
|
/** The directory used as the container image working directory (if defined)
|
|
1796
1818
|
*/
|
|
1797
|
-
image_working_directory?:
|
|
1819
|
+
image_working_directory?: JobGetResponseImageWorkingDirectory;
|
|
1798
1820
|
/** The Job name, unique within a given collection
|
|
1799
1821
|
*/
|
|
1800
1822
|
job: string;
|
|
@@ -2085,10 +2107,14 @@ export interface DatasetSchemaGetResponse {
|
|
|
2085
2107
|
[key: string]: any;
|
|
2086
2108
|
}
|
|
2087
2109
|
|
|
2110
|
+
export type DatasetMetaGetResponseLabelsItem = {};
|
|
2111
|
+
|
|
2112
|
+
export type DatasetMetaGetResponseAnnotationsItem = {};
|
|
2113
|
+
|
|
2088
2114
|
export interface DatasetMetaGetResponse {
|
|
2089
2115
|
/** The Metadata's annotations
|
|
2090
2116
|
*/
|
|
2091
|
-
annotations:
|
|
2117
|
+
annotations: DatasetMetaGetResponseAnnotationsItem[];
|
|
2092
2118
|
/** The date and time of creation
|
|
2093
2119
|
*/
|
|
2094
2120
|
created: string;
|
|
@@ -2106,7 +2132,7 @@ export interface DatasetMetaGetResponse {
|
|
|
2106
2132
|
description: string;
|
|
2107
2133
|
/** The Metadata's labels
|
|
2108
2134
|
*/
|
|
2109
|
-
labels:
|
|
2135
|
+
labels: DatasetMetaGetResponseLabelsItem[];
|
|
2110
2136
|
/** The date and time it was last updated
|
|
2111
2137
|
*/
|
|
2112
2138
|
last_updated: string;
|