@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
package/job/job.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { GetJobsParams, customInstance, JobsGetResponse, ErrorType, DmError, GetJobByVersionParams, JobGetResponse, GetJobParams } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ Job availability will vary as Jobs are added to the service.
|
|
|
13
13
|
declare const getJobs: (params?: GetJobsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobsGetResponse>;
|
|
14
14
|
declare const getGetJobsQueryKey: (params?: GetJobsParams) => readonly ["data-manager-api", "/job", ...GetJobsParams[]];
|
|
15
15
|
declare const getGetJobsQueryOptions: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
16
|
-
query?: UseQueryOptions<JobsGetResponse, TError, TData, QueryKey
|
|
16
|
+
query?: Partial<UseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
18
|
} | undefined) => UseQueryOptions<JobsGetResponse, TError, TData, QueryKey> & {
|
|
19
19
|
queryKey: QueryKey;
|
|
@@ -24,11 +24,28 @@ type GetJobsQueryError = ErrorType<DmError>;
|
|
|
24
24
|
* @summary Get all Jobs available to you
|
|
25
25
|
*/
|
|
26
26
|
declare const useGetJobs: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
27
|
-
query?: UseQueryOptions<JobsGetResponse, TError, TData, QueryKey
|
|
27
|
+
query?: Partial<UseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
28
28
|
request?: SecondParameter<typeof customInstance>;
|
|
29
29
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
30
30
|
queryKey: QueryKey;
|
|
31
31
|
};
|
|
32
|
+
declare const getGetJobsSuspenseQueryOptions: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
33
|
+
query?: Partial<UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
34
|
+
request?: SecondParameter<typeof customInstance>;
|
|
35
|
+
} | undefined) => UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey> & {
|
|
36
|
+
queryKey: QueryKey;
|
|
37
|
+
};
|
|
38
|
+
type GetJobsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>;
|
|
39
|
+
type GetJobsSuspenseQueryError = ErrorType<DmError>;
|
|
40
|
+
/**
|
|
41
|
+
* @summary Get all Jobs available to you
|
|
42
|
+
*/
|
|
43
|
+
declare const useGetJobsSuspense: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
44
|
+
query?: Partial<UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
45
|
+
request?: SecondParameter<typeof customInstance>;
|
|
46
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
47
|
+
queryKey: QueryKey;
|
|
48
|
+
};
|
|
32
49
|
/**
|
|
33
50
|
* Gets a Job based on its **collection**, **job** and **version**.
|
|
34
51
|
|
|
@@ -39,7 +56,7 @@ Job availability will vary as Jobs are added to the service. Jobs that have been
|
|
|
39
56
|
declare const getJobByVersion: (params: GetJobByVersionParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobGetResponse>;
|
|
40
57
|
declare const getGetJobByVersionQueryKey: (params: GetJobByVersionParams) => readonly ["data-manager-api", "/job/get-by-version", ...GetJobByVersionParams[]];
|
|
41
58
|
declare const getGetJobByVersionQueryOptions: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
42
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
59
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
43
60
|
request?: SecondParameter<typeof customInstance>;
|
|
44
61
|
} | undefined) => UseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
45
62
|
queryKey: QueryKey;
|
|
@@ -50,11 +67,28 @@ type GetJobByVersionQueryError = ErrorType<DmError>;
|
|
|
50
67
|
* @summary Get a Job by its version
|
|
51
68
|
*/
|
|
52
69
|
declare const useGetJobByVersion: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
53
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
70
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
54
71
|
request?: SecondParameter<typeof customInstance>;
|
|
55
72
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
56
73
|
queryKey: QueryKey;
|
|
57
74
|
};
|
|
75
|
+
declare const getGetJobByVersionSuspenseQueryOptions: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
76
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
77
|
+
request?: SecondParameter<typeof customInstance>;
|
|
78
|
+
} | undefined) => UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
79
|
+
queryKey: QueryKey;
|
|
80
|
+
};
|
|
81
|
+
type GetJobByVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>;
|
|
82
|
+
type GetJobByVersionSuspenseQueryError = ErrorType<DmError>;
|
|
83
|
+
/**
|
|
84
|
+
* @summary Get a Job by its version
|
|
85
|
+
*/
|
|
86
|
+
declare const useGetJobByVersionSuspense: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
87
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
88
|
+
request?: SecondParameter<typeof customInstance>;
|
|
89
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
90
|
+
queryKey: QueryKey;
|
|
91
|
+
};
|
|
58
92
|
/**
|
|
59
93
|
* Get details of a specific Job available to you that can be instantiated.
|
|
60
94
|
|
|
@@ -65,7 +99,7 @@ To run a job you need to use the `/instance` endpoint. The Job is controlled thr
|
|
|
65
99
|
declare const getJob: (jobId: number, params?: GetJobParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobGetResponse>;
|
|
66
100
|
declare const getGetJobQueryKey: (jobId: number, params?: GetJobParams) => readonly ["data-manager-api", `/job/${number}`, ...GetJobParams[]];
|
|
67
101
|
declare const getGetJobQueryOptions: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
68
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
102
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
69
103
|
request?: SecondParameter<typeof customInstance>;
|
|
70
104
|
} | undefined) => UseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
71
105
|
queryKey: QueryKey;
|
|
@@ -76,10 +110,27 @@ type GetJobQueryError = ErrorType<void | DmError>;
|
|
|
76
110
|
* @summary Get details of a specific Job
|
|
77
111
|
*/
|
|
78
112
|
declare const useGetJob: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
79
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
113
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
80
114
|
request?: SecondParameter<typeof customInstance>;
|
|
81
115
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
82
116
|
queryKey: QueryKey;
|
|
83
117
|
};
|
|
118
|
+
declare const getGetJobSuspenseQueryOptions: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
119
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
120
|
+
request?: SecondParameter<typeof customInstance>;
|
|
121
|
+
} | undefined) => UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
122
|
+
queryKey: QueryKey;
|
|
123
|
+
};
|
|
124
|
+
type GetJobSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>;
|
|
125
|
+
type GetJobSuspenseQueryError = ErrorType<void | DmError>;
|
|
126
|
+
/**
|
|
127
|
+
* @summary Get details of a specific Job
|
|
128
|
+
*/
|
|
129
|
+
declare const useGetJobSuspense: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
130
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
131
|
+
request?: SecondParameter<typeof customInstance>;
|
|
132
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
133
|
+
queryKey: QueryKey;
|
|
134
|
+
};
|
|
84
135
|
|
|
85
|
-
export { GetJobByVersionQueryError, GetJobByVersionQueryResult, GetJobQueryError, GetJobQueryResult, GetJobsQueryError, GetJobsQueryResult, getGetJobByVersionQueryKey, getGetJobByVersionQueryOptions, getGetJobQueryKey, getGetJobQueryOptions, getGetJobsQueryKey, getGetJobsQueryOptions, getJob, getJobByVersion, getJobs, useGetJob, useGetJobByVersion, useGetJobs };
|
|
136
|
+
export { type GetJobByVersionQueryError, type GetJobByVersionQueryResult, type GetJobByVersionSuspenseQueryError, type GetJobByVersionSuspenseQueryResult, type GetJobQueryError, type GetJobQueryResult, type GetJobSuspenseQueryError, type GetJobSuspenseQueryResult, type GetJobsQueryError, type GetJobsQueryResult, type GetJobsSuspenseQueryError, type GetJobsSuspenseQueryResult, getGetJobByVersionQueryKey, getGetJobByVersionQueryOptions, getGetJobByVersionSuspenseQueryOptions, getGetJobQueryKey, getGetJobQueryOptions, getGetJobSuspenseQueryOptions, getGetJobsQueryKey, getGetJobsQueryOptions, getGetJobsSuspenseQueryOptions, getJob, getJobByVersion, getJobs, useGetJob, useGetJobByVersion, useGetJobByVersionSuspense, useGetJobSuspense, useGetJobs, useGetJobsSuspense };
|
package/job/job.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { GetJobsParams, customInstance, JobsGetResponse, ErrorType, DmError, GetJobByVersionParams, JobGetResponse, GetJobParams } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ Job availability will vary as Jobs are added to the service.
|
|
|
13
13
|
declare const getJobs: (params?: GetJobsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobsGetResponse>;
|
|
14
14
|
declare const getGetJobsQueryKey: (params?: GetJobsParams) => readonly ["data-manager-api", "/job", ...GetJobsParams[]];
|
|
15
15
|
declare const getGetJobsQueryOptions: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
16
|
-
query?: UseQueryOptions<JobsGetResponse, TError, TData, QueryKey
|
|
16
|
+
query?: Partial<UseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
18
|
} | undefined) => UseQueryOptions<JobsGetResponse, TError, TData, QueryKey> & {
|
|
19
19
|
queryKey: QueryKey;
|
|
@@ -24,11 +24,28 @@ type GetJobsQueryError = ErrorType<DmError>;
|
|
|
24
24
|
* @summary Get all Jobs available to you
|
|
25
25
|
*/
|
|
26
26
|
declare const useGetJobs: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
27
|
-
query?: UseQueryOptions<JobsGetResponse, TError, TData, QueryKey
|
|
27
|
+
query?: Partial<UseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
28
28
|
request?: SecondParameter<typeof customInstance>;
|
|
29
29
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
30
30
|
queryKey: QueryKey;
|
|
31
31
|
};
|
|
32
|
+
declare const getGetJobsSuspenseQueryOptions: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
33
|
+
query?: Partial<UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
34
|
+
request?: SecondParameter<typeof customInstance>;
|
|
35
|
+
} | undefined) => UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey> & {
|
|
36
|
+
queryKey: QueryKey;
|
|
37
|
+
};
|
|
38
|
+
type GetJobsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>;
|
|
39
|
+
type GetJobsSuspenseQueryError = ErrorType<DmError>;
|
|
40
|
+
/**
|
|
41
|
+
* @summary Get all Jobs available to you
|
|
42
|
+
*/
|
|
43
|
+
declare const useGetJobsSuspense: <TData = JobsGetResponse, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: {
|
|
44
|
+
query?: Partial<UseSuspenseQueryOptions<JobsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
45
|
+
request?: SecondParameter<typeof customInstance>;
|
|
46
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
47
|
+
queryKey: QueryKey;
|
|
48
|
+
};
|
|
32
49
|
/**
|
|
33
50
|
* Gets a Job based on its **collection**, **job** and **version**.
|
|
34
51
|
|
|
@@ -39,7 +56,7 @@ Job availability will vary as Jobs are added to the service. Jobs that have been
|
|
|
39
56
|
declare const getJobByVersion: (params: GetJobByVersionParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobGetResponse>;
|
|
40
57
|
declare const getGetJobByVersionQueryKey: (params: GetJobByVersionParams) => readonly ["data-manager-api", "/job/get-by-version", ...GetJobByVersionParams[]];
|
|
41
58
|
declare const getGetJobByVersionQueryOptions: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
42
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
59
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
43
60
|
request?: SecondParameter<typeof customInstance>;
|
|
44
61
|
} | undefined) => UseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
45
62
|
queryKey: QueryKey;
|
|
@@ -50,11 +67,28 @@ type GetJobByVersionQueryError = ErrorType<DmError>;
|
|
|
50
67
|
* @summary Get a Job by its version
|
|
51
68
|
*/
|
|
52
69
|
declare const useGetJobByVersion: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
53
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
70
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
54
71
|
request?: SecondParameter<typeof customInstance>;
|
|
55
72
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
56
73
|
queryKey: QueryKey;
|
|
57
74
|
};
|
|
75
|
+
declare const getGetJobByVersionSuspenseQueryOptions: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
76
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
77
|
+
request?: SecondParameter<typeof customInstance>;
|
|
78
|
+
} | undefined) => UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
79
|
+
queryKey: QueryKey;
|
|
80
|
+
};
|
|
81
|
+
type GetJobByVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>;
|
|
82
|
+
type GetJobByVersionSuspenseQueryError = ErrorType<DmError>;
|
|
83
|
+
/**
|
|
84
|
+
* @summary Get a Job by its version
|
|
85
|
+
*/
|
|
86
|
+
declare const useGetJobByVersionSuspense: <TData = JobGetResponse, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: {
|
|
87
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
88
|
+
request?: SecondParameter<typeof customInstance>;
|
|
89
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
90
|
+
queryKey: QueryKey;
|
|
91
|
+
};
|
|
58
92
|
/**
|
|
59
93
|
* Get details of a specific Job available to you that can be instantiated.
|
|
60
94
|
|
|
@@ -65,7 +99,7 @@ To run a job you need to use the `/instance` endpoint. The Job is controlled thr
|
|
|
65
99
|
declare const getJob: (jobId: number, params?: GetJobParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<JobGetResponse>;
|
|
66
100
|
declare const getGetJobQueryKey: (jobId: number, params?: GetJobParams) => readonly ["data-manager-api", `/job/${number}`, ...GetJobParams[]];
|
|
67
101
|
declare const getGetJobQueryOptions: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
68
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
102
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
69
103
|
request?: SecondParameter<typeof customInstance>;
|
|
70
104
|
} | undefined) => UseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
71
105
|
queryKey: QueryKey;
|
|
@@ -76,10 +110,27 @@ type GetJobQueryError = ErrorType<void | DmError>;
|
|
|
76
110
|
* @summary Get details of a specific Job
|
|
77
111
|
*/
|
|
78
112
|
declare const useGetJob: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
79
|
-
query?: UseQueryOptions<JobGetResponse, TError, TData, QueryKey
|
|
113
|
+
query?: Partial<UseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
80
114
|
request?: SecondParameter<typeof customInstance>;
|
|
81
115
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
82
116
|
queryKey: QueryKey;
|
|
83
117
|
};
|
|
118
|
+
declare const getGetJobSuspenseQueryOptions: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
119
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
120
|
+
request?: SecondParameter<typeof customInstance>;
|
|
121
|
+
} | undefined) => UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey> & {
|
|
122
|
+
queryKey: QueryKey;
|
|
123
|
+
};
|
|
124
|
+
type GetJobSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>;
|
|
125
|
+
type GetJobSuspenseQueryError = ErrorType<void | DmError>;
|
|
126
|
+
/**
|
|
127
|
+
* @summary Get details of a specific Job
|
|
128
|
+
*/
|
|
129
|
+
declare const useGetJobSuspense: <TData = JobGetResponse, TError = ErrorType<void | DmError>>(jobId: number, params?: GetJobParams, options?: {
|
|
130
|
+
query?: Partial<UseSuspenseQueryOptions<JobGetResponse, TError, TData, QueryKey>> | undefined;
|
|
131
|
+
request?: SecondParameter<typeof customInstance>;
|
|
132
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
133
|
+
queryKey: QueryKey;
|
|
134
|
+
};
|
|
84
135
|
|
|
85
|
-
export { GetJobByVersionQueryError, GetJobByVersionQueryResult, GetJobQueryError, GetJobQueryResult, GetJobsQueryError, GetJobsQueryResult, getGetJobByVersionQueryKey, getGetJobByVersionQueryOptions, getGetJobQueryKey, getGetJobQueryOptions, getGetJobsQueryKey, getGetJobsQueryOptions, getJob, getJobByVersion, getJobs, useGetJob, useGetJobByVersion, useGetJobs };
|
|
136
|
+
export { type GetJobByVersionQueryError, type GetJobByVersionQueryResult, type GetJobByVersionSuspenseQueryError, type GetJobByVersionSuspenseQueryResult, type GetJobQueryError, type GetJobQueryResult, type GetJobSuspenseQueryError, type GetJobSuspenseQueryResult, type GetJobsQueryError, type GetJobsQueryResult, type GetJobsSuspenseQueryError, type GetJobsSuspenseQueryResult, getGetJobByVersionQueryKey, getGetJobByVersionQueryOptions, getGetJobByVersionSuspenseQueryOptions, getGetJobQueryKey, getGetJobQueryOptions, getGetJobSuspenseQueryOptions, getGetJobsQueryKey, getGetJobsQueryOptions, getGetJobsSuspenseQueryOptions, getJob, getJobByVersion, getJobs, useGetJob, useGetJobByVersion, useGetJobByVersionSuspense, useGetJobSuspense, useGetJobs, useGetJobsSuspense };
|
package/job/job.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EBOQPVLG.js";
|
|
4
4
|
|
|
5
5
|
// src/job/job.ts
|
|
6
6
|
import {
|
|
7
|
-
useQuery
|
|
7
|
+
useQuery,
|
|
8
|
+
useSuspenseQuery
|
|
8
9
|
} from "@tanstack/react-query";
|
|
9
10
|
var getJobs = (params, options, signal) => {
|
|
10
11
|
return customInstance(
|
|
11
12
|
{
|
|
12
13
|
url: `/job`,
|
|
13
|
-
method: "
|
|
14
|
+
method: "GET",
|
|
14
15
|
params,
|
|
15
16
|
signal
|
|
16
17
|
},
|
|
@@ -32,11 +33,23 @@ var useGetJobs = (params, options) => {
|
|
|
32
33
|
query.queryKey = queryOptions.queryKey;
|
|
33
34
|
return query;
|
|
34
35
|
};
|
|
36
|
+
var getGetJobsSuspenseQueryOptions = (params, options) => {
|
|
37
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
38
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetJobsQueryKey(params);
|
|
39
|
+
const queryFn = ({ signal }) => getJobs(params, requestOptions, signal);
|
|
40
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
41
|
+
};
|
|
42
|
+
var useGetJobsSuspense = (params, options) => {
|
|
43
|
+
const queryOptions = getGetJobsSuspenseQueryOptions(params, options);
|
|
44
|
+
const query = useSuspenseQuery(queryOptions);
|
|
45
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
|
+
return query;
|
|
47
|
+
};
|
|
35
48
|
var getJobByVersion = (params, options, signal) => {
|
|
36
49
|
return customInstance(
|
|
37
50
|
{
|
|
38
51
|
url: `/job/get-by-version`,
|
|
39
|
-
method: "
|
|
52
|
+
method: "GET",
|
|
40
53
|
params,
|
|
41
54
|
signal
|
|
42
55
|
},
|
|
@@ -58,11 +71,23 @@ var useGetJobByVersion = (params, options) => {
|
|
|
58
71
|
query.queryKey = queryOptions.queryKey;
|
|
59
72
|
return query;
|
|
60
73
|
};
|
|
74
|
+
var getGetJobByVersionSuspenseQueryOptions = (params, options) => {
|
|
75
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
76
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetJobByVersionQueryKey(params);
|
|
77
|
+
const queryFn = ({ signal }) => getJobByVersion(params, requestOptions, signal);
|
|
78
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
79
|
+
};
|
|
80
|
+
var useGetJobByVersionSuspense = (params, options) => {
|
|
81
|
+
const queryOptions = getGetJobByVersionSuspenseQueryOptions(params, options);
|
|
82
|
+
const query = useSuspenseQuery(queryOptions);
|
|
83
|
+
query.queryKey = queryOptions.queryKey;
|
|
84
|
+
return query;
|
|
85
|
+
};
|
|
61
86
|
var getJob = (jobId, params, options, signal) => {
|
|
62
87
|
return customInstance(
|
|
63
88
|
{
|
|
64
89
|
url: `/job/${jobId}`,
|
|
65
|
-
method: "
|
|
90
|
+
method: "GET",
|
|
66
91
|
params,
|
|
67
92
|
signal
|
|
68
93
|
},
|
|
@@ -84,18 +109,36 @@ var useGetJob = (jobId, params, options) => {
|
|
|
84
109
|
query.queryKey = queryOptions.queryKey;
|
|
85
110
|
return query;
|
|
86
111
|
};
|
|
112
|
+
var getGetJobSuspenseQueryOptions = (jobId, params, options) => {
|
|
113
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
114
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetJobQueryKey(jobId, params);
|
|
115
|
+
const queryFn = ({ signal }) => getJob(jobId, params, requestOptions, signal);
|
|
116
|
+
return { queryKey, queryFn, enabled: !!jobId, ...queryOptions };
|
|
117
|
+
};
|
|
118
|
+
var useGetJobSuspense = (jobId, params, options) => {
|
|
119
|
+
const queryOptions = getGetJobSuspenseQueryOptions(jobId, params, options);
|
|
120
|
+
const query = useSuspenseQuery(queryOptions);
|
|
121
|
+
query.queryKey = queryOptions.queryKey;
|
|
122
|
+
return query;
|
|
123
|
+
};
|
|
87
124
|
export {
|
|
88
125
|
getGetJobByVersionQueryKey,
|
|
89
126
|
getGetJobByVersionQueryOptions,
|
|
127
|
+
getGetJobByVersionSuspenseQueryOptions,
|
|
90
128
|
getGetJobQueryKey,
|
|
91
129
|
getGetJobQueryOptions,
|
|
130
|
+
getGetJobSuspenseQueryOptions,
|
|
92
131
|
getGetJobsQueryKey,
|
|
93
132
|
getGetJobsQueryOptions,
|
|
133
|
+
getGetJobsSuspenseQueryOptions,
|
|
94
134
|
getJob,
|
|
95
135
|
getJobByVersion,
|
|
96
136
|
getJobs,
|
|
97
137
|
useGetJob,
|
|
98
138
|
useGetJobByVersion,
|
|
99
|
-
|
|
139
|
+
useGetJobByVersionSuspense,
|
|
140
|
+
useGetJobSuspense,
|
|
141
|
+
useGetJobs,
|
|
142
|
+
useGetJobsSuspense
|
|
100
143
|
};
|
|
101
144
|
//# sourceMappingURL=job.js.map
|
package/job/job.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/job/job.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetJobByVersionParams,\n GetJobParams,\n GetJobsParams,\n JobGetResponse,\n JobsGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.\n\nJob availability will vary as Jobs are added to the service.\n\n * @summary Get all Jobs available to you\n */\nexport const getJobs = (\n params?: GetJobsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobsGetResponse>(\n {url: `/job`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobsQueryKey = (params?: GetJobsParams,) => {\n \n return [\"data-manager-api\", `/job`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobsQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobsQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>\nexport type GetJobsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Jobs available to you\n */\nexport const useGetJobs = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(\n params?: GetJobsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a Job based on its **collection**, **job** and **version**.\n\nJob availability will vary as Jobs are added to the service. Jobs that have been added are unlikely to be removed.\n\n * @summary Get a Job by its version\n */\nexport const getJobByVersion = (\n params: GetJobByVersionParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobGetResponse>(\n {url: `/job/get-by-version`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobByVersionQueryKey = (params: GetJobByVersionParams,) => {\n \n return [\"data-manager-api\", `/job/get-by-version`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobByVersionQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobByVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>\nexport type GetJobByVersionQueryError = ErrorType<DmError>\n\n/**\n * @summary Get a Job by its version\n */\nexport const useGetJobByVersion = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(\n params: GetJobByVersionParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobByVersionQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get details of a specific Job available to you that can be instantiated.\n\nTo run a job you need to use the `/instance` endpoint. The Job is controlled through the `specification` field, a JSON string. You will need to identify the Job using its `collection`, `job` and `version` as well as providing any variables in the specification required by the Job's command.\n\n * @summary Get details of a specific Job\n */\nexport const getJob = (\n jobId: number,\n params?: GetJobParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobGetResponse>(\n {url: `/job/${jobId}`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobQueryKey = (jobId: number,\n params?: GetJobParams,) => {\n \n return [\"data-manager-api\", `/job/${jobId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>\nexport type GetJobQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Job\n */\nexport const useGetJob = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobQueryOptions(jobId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AAmCA,IAAM,UAAU,CACnB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAQ,QAAQ;AAAA,MACpB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,CAAC,WAA4B;AAE3D,SAAO,CAAC,oBAAoB,QAAQ,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAC9D;AAGG,IAAM,yBAAyB,CAA2E,QAAwB,YACpI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB,MAAM;AAInE,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAQ,gBAAgB,MAAM;AAM3H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,aAAa,CACzB,QAAwB,YAEuC;AAE9D,QAAM,eAAe,uBAAuB,QAAO,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,kBAAkB,CAC3B,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAuB,QAAQ;AAAA,MACnC;AAAA,MAAQ;AAAA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M,YAAY,CACxB,OACG,QAAuB,YAEqC;AAE9D,QAAM,eAAe,sBAAsB,OAAM,QAAO,OAAO;AAE/D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/job/job.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 2.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetJobByVersionParams,\n GetJobParams,\n GetJobsParams,\n JobGetResponse,\n JobsGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.\n\nJob availability will vary as Jobs are added to the service.\n\n * @summary Get all Jobs available to you\n */\nexport const getJobs = (\n params?: GetJobsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobsGetResponse>(\n {url: `/job`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobsQueryKey = (params?: GetJobsParams,) => {\n return [\"data-manager-api\", `/job`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobsQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobsQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>\nexport type GetJobsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Jobs available to you\n */\nexport const useGetJobs = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(\n params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetJobsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>\nexport type GetJobsSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Jobs available to you\n */\nexport const useGetJobsSuspense = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(\n params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobsSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a Job based on its **collection**, **job** and **version**.\n\nJob availability will vary as Jobs are added to the service. Jobs that have been added are unlikely to be removed.\n\n * @summary Get a Job by its version\n */\nexport const getJobByVersion = (\n params: GetJobByVersionParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobGetResponse>(\n {url: `/job/get-by-version`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobByVersionQueryKey = (params: GetJobByVersionParams,) => {\n return [\"data-manager-api\", `/job/get-by-version`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobByVersionQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobByVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>\nexport type GetJobByVersionQueryError = ErrorType<DmError>\n\n/**\n * @summary Get a Job by its version\n */\nexport const useGetJobByVersion = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(\n params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobByVersionQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetJobByVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobByVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>\nexport type GetJobByVersionSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Get a Job by its version\n */\nexport const useGetJobByVersionSuspense = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(\n params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobByVersionSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get details of a specific Job available to you that can be instantiated.\n\nTo run a job you need to use the `/instance` endpoint. The Job is controlled through the `specification` field, a JSON string. You will need to identify the Job using its `collection`, `job` and `version` as well as providing any variables in the specification required by the Job's command.\n\n * @summary Get details of a specific Job\n */\nexport const getJob = (\n jobId: number,\n params?: GetJobParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<JobGetResponse>(\n {url: `/job/${jobId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobQueryKey = (jobId: number,\n params?: GetJobParams,) => {\n return [\"data-manager-api\", `/job/${jobId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>\nexport type GetJobQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Job\n */\nexport const useGetJob = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobQueryOptions(jobId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetJobSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>\nexport type GetJobSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Job\n */\nexport const useGetJobSuspense = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobSuspenseQueryOptions(jobId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+BA,IAAM,UAAU,CACnB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAQ,QAAQ;AAAA,MACpB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,CAAC,WAA4B;AAC3D,SAAO,CAAC,oBAAoB,QAAQ,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAC9D;AAGG,IAAM,yBAAyB,CAA2E,QAAwB,YACpI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB,MAAM;AAInE,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAQ,gBAAgB,MAAM;AAM3H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,aAAa,CACzB,QAAwB,YAEuC;AAE9D,QAAM,eAAe,uBAAuB,QAAO,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,iCAAiC,CAA2E,QAAwB,YAC5I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB,MAAM;AAInE,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAQ,gBAAgB,MAAM;AAM3H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CACjC,QAAwB,YAE+C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,OAAM,QAAO,OAAO;AAEvE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
package/metadata/metadata.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
4
|
|
|
5
5
|
// src/metadata/metadata.ts
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
var _reactquery = require('@tanstack/react-query');
|
|
10
11
|
var addMetadataVersion = (datasetId, datasetVersion, datasetVersionMetaPostBodyBody, options) => {
|
|
11
12
|
const formData = new FormData();
|
|
@@ -15,10 +16,10 @@ var addMetadataVersion = (datasetId, datasetVersion, datasetVersionMetaPostBodyB
|
|
|
15
16
|
if (datasetVersionMetaPostBodyBody.annotations !== void 0) {
|
|
16
17
|
formData.append("annotations", datasetVersionMetaPostBodyBody.annotations);
|
|
17
18
|
}
|
|
18
|
-
return
|
|
19
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
19
20
|
{
|
|
20
21
|
url: `/dataset/${datasetId}/meta/${datasetVersion}`,
|
|
21
|
-
method: "
|
|
22
|
+
method: "POST",
|
|
22
23
|
headers: { "Content-Type": "multipart/form-data" },
|
|
23
24
|
data: formData
|
|
24
25
|
},
|
|
@@ -38,10 +39,10 @@ var useAddMetadataVersion = (options) => {
|
|
|
38
39
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
39
40
|
};
|
|
40
41
|
var getMetadataVersion = (datasetId, datasetVersion, options, signal) => {
|
|
41
|
-
return
|
|
42
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
42
43
|
{
|
|
43
44
|
url: `/dataset/${datasetId}/meta/${datasetVersion}`,
|
|
44
|
-
method: "
|
|
45
|
+
method: "GET",
|
|
45
46
|
signal
|
|
46
47
|
},
|
|
47
48
|
options
|
|
@@ -62,6 +63,18 @@ var useGetMetadataVersion = (datasetId, datasetVersion, options) => {
|
|
|
62
63
|
query.queryKey = queryOptions.queryKey;
|
|
63
64
|
return query;
|
|
64
65
|
};
|
|
66
|
+
var getGetMetadataVersionSuspenseQueryOptions = (datasetId, datasetVersion, options) => {
|
|
67
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
68
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetMetadataVersionQueryKey(datasetId, datasetVersion)));
|
|
69
|
+
const queryFn = ({ signal }) => getMetadataVersion(datasetId, datasetVersion, requestOptions, signal);
|
|
70
|
+
return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
|
|
71
|
+
};
|
|
72
|
+
var useGetMetadataVersionSuspense = (datasetId, datasetVersion, options) => {
|
|
73
|
+
const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId, datasetVersion, options);
|
|
74
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
75
|
+
query.queryKey = queryOptions.queryKey;
|
|
76
|
+
return query;
|
|
77
|
+
};
|
|
65
78
|
var addMetadata = (datasetId, datasetMetaPostBodyBody, options) => {
|
|
66
79
|
const formData = new FormData();
|
|
67
80
|
if (datasetMetaPostBodyBody.meta_properties !== void 0) {
|
|
@@ -70,10 +83,10 @@ var addMetadata = (datasetId, datasetMetaPostBodyBody, options) => {
|
|
|
70
83
|
if (datasetMetaPostBodyBody.labels !== void 0) {
|
|
71
84
|
formData.append("labels", datasetMetaPostBodyBody.labels);
|
|
72
85
|
}
|
|
73
|
-
return
|
|
86
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
74
87
|
{
|
|
75
88
|
url: `/dataset/${datasetId}/meta`,
|
|
76
|
-
method: "
|
|
89
|
+
method: "POST",
|
|
77
90
|
headers: { "Content-Type": "multipart/form-data" },
|
|
78
91
|
data: formData
|
|
79
92
|
},
|
|
@@ -93,10 +106,10 @@ var useAddMetadata = (options) => {
|
|
|
93
106
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
94
107
|
};
|
|
95
108
|
var getMetadata = (datasetId, options, signal) => {
|
|
96
|
-
return
|
|
109
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
97
110
|
{
|
|
98
111
|
url: `/dataset/${datasetId}/meta`,
|
|
99
|
-
method: "
|
|
112
|
+
method: "GET",
|
|
100
113
|
signal
|
|
101
114
|
},
|
|
102
115
|
options
|
|
@@ -117,6 +130,22 @@ var useGetMetadata = (datasetId, options) => {
|
|
|
117
130
|
query.queryKey = queryOptions.queryKey;
|
|
118
131
|
return query;
|
|
119
132
|
};
|
|
133
|
+
var getGetMetadataSuspenseQueryOptions = (datasetId, options) => {
|
|
134
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
135
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetMetadataQueryKey(datasetId)));
|
|
136
|
+
const queryFn = ({ signal }) => getMetadata(datasetId, requestOptions, signal);
|
|
137
|
+
return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
|
|
138
|
+
};
|
|
139
|
+
var useGetMetadataSuspense = (datasetId, options) => {
|
|
140
|
+
const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId, options);
|
|
141
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
142
|
+
query.queryKey = queryOptions.queryKey;
|
|
143
|
+
return query;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
120
149
|
|
|
121
150
|
|
|
122
151
|
|
|
@@ -132,5 +161,5 @@ var useGetMetadata = (datasetId, options) => {
|
|
|
132
161
|
|
|
133
162
|
|
|
134
163
|
|
|
135
|
-
exports.addMetadata = addMetadata; exports.addMetadataVersion = addMetadataVersion; exports.getAddMetadataMutationOptions = getAddMetadataMutationOptions; exports.getAddMetadataVersionMutationOptions = getAddMetadataVersionMutationOptions; exports.getGetMetadataQueryKey = getGetMetadataQueryKey; exports.getGetMetadataQueryOptions = getGetMetadataQueryOptions; exports.getGetMetadataVersionQueryKey = getGetMetadataVersionQueryKey; exports.getGetMetadataVersionQueryOptions = getGetMetadataVersionQueryOptions; exports.getMetadata = getMetadata; exports.getMetadataVersion = getMetadataVersion; exports.useAddMetadata = useAddMetadata; exports.useAddMetadataVersion = useAddMetadataVersion; exports.useGetMetadata = useGetMetadata; exports.useGetMetadataVersion = useGetMetadataVersion;
|
|
164
|
+
exports.addMetadata = addMetadata; exports.addMetadataVersion = addMetadataVersion; exports.getAddMetadataMutationOptions = getAddMetadataMutationOptions; exports.getAddMetadataVersionMutationOptions = getAddMetadataVersionMutationOptions; exports.getGetMetadataQueryKey = getGetMetadataQueryKey; exports.getGetMetadataQueryOptions = getGetMetadataQueryOptions; exports.getGetMetadataSuspenseQueryOptions = getGetMetadataSuspenseQueryOptions; exports.getGetMetadataVersionQueryKey = getGetMetadataVersionQueryKey; exports.getGetMetadataVersionQueryOptions = getGetMetadataVersionQueryOptions; exports.getGetMetadataVersionSuspenseQueryOptions = getGetMetadataVersionSuspenseQueryOptions; exports.getMetadata = getMetadata; exports.getMetadataVersion = getMetadataVersion; exports.useAddMetadata = useAddMetadata; exports.useAddMetadataVersion = useAddMetadataVersion; exports.useGetMetadata = useGetMetadata; exports.useGetMetadataSuspense = useGetMetadataSuspense; exports.useGetMetadataVersion = useGetMetadataVersion; exports.useGetMetadataVersionSuspense = useGetMetadataVersionSuspense;
|
|
136
165
|
//# sourceMappingURL=metadata.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metadata/metadata.ts"],"names":[],"mappings":";;;;;AAUA;A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B,WACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IACrD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,yBAAyB,CAAC,cAAuB;AAE1D,SAAO,CAAC,oBAAoB,YAAY,SAAS,OAAO;AACxD;AAGG,IAAM,6BAA6B,CAAsF,WAAmB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,uBAAuB,SAAS;AAI1E,QAAM,UAAkE,CAAC,EAAE,OAAO,MAAM,YAAY,WAAW,gBAAgB,MAAM;AAMtI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,iBAAiB,CAC7B,WAAmB,YAE4C;AAE9D,QAAM,eAAe,2BAA2B,WAAU,OAAO;AAEjE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const useGetMetadataVersion = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const useGetMetadata = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/metadata/metadata.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,qBAAqB,CAC9B,WACA,gBACA,gCACH,YAAsD;AAEjD,QAAM,WAAW,IAAI,SAAS;AACpC,MAAG,+BAA+B,oBAAoB,QAAW;AAChE,aAAS,OAAO,mBAAmB,+BAA+B,eAAe;AAAA,EACjF;AACD,MAAG,+BAA+B,gBAAgB,QAAW;AAC5D,aAAS,OAAO,eAAe,+BAA+B,WAAW;AAAA,EACzE;AAEK,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS,SAAS,cAAc;AAAA,MAAI,QAAQ;AAAA,MAC9D,SAAS,EAAC,gBAAgB,sBAAuB;AAAA,MAChD,MAAM;AAAA,IACT;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,uCAAuC,CAC5B,YACmJ;AA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iD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IACrD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,yBAAyB,CAAC,cAAuB;AAC1D,SAAO,CAAC,oBAAoB,YAAY,SAAS,OAAO;AACxD;AAGG,IAAM,6BAA6B,CAAsF,WAAmB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,uBAAuB,SAAS;AAI1E,QAAM,UAAkE,CAAC,EAAE,OAAO,MAAM,YAAY,WAAW,gBAAgB,MAAM;AAMtI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,iBAAiB,CAC7B,WAAmB,YAE4C;AAE9D,QAAM,eAAe,2BAA2B,WAAU,OAAO;AAEjE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,qCAAqC,CAAsF,WAAmB,YACtJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,uBAAuB,SAAS;AAI1E,QAAM,UAAkE,CAAC,EAAE,OAAO,MAAM,YAAY,WAAW,gBAAgB,MAAM;AAMtI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,yBAAyB,CACrC,WAAmB,YAEoD;AAEtE,QAAM,eAAe,mCAAmC,WAAU,OAAO;AAEzE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 2.0\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const useGetMetadataVersion = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetMetadataVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const useGetMetadataVersionSuspense = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId,datasetVersion,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const useGetMetadata = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetMetadataSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const useGetMetadataSuspense = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|