@squonk/data-manager-client 3.1.0-beta.2 → 3.1.0
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/accounting/accounting.cjs +12 -12
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +103 -49
- package/accounting/accounting.d.ts +103 -49
- package/accounting/accounting.js +12 -12
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +12 -12
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +168 -115
- package/admin/admin.d.ts +168 -115
- package/admin/admin.js +12 -12
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +8 -8
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +69 -33
- package/application/application.d.ts +69 -33
- package/application/application.js +8 -8
- package/application/application.js.map +1 -1
- package/chunk-TKLTUR4R.cjs.map +1 -1
- package/configuration/configuration.cjs +4 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +35 -17
- package/configuration/configuration.d.ts +35 -17
- package/configuration/configuration.js +4 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +16 -16
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +181 -110
- package/dataset/dataset.d.ts +181 -110
- package/dataset/dataset.js +16 -16
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs +4 -4
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.d.cts +35 -17
- package/digest/digest.d.ts +35 -17
- package/digest/digest.js +4 -4
- package/digest/digest.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +16 -16
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +155 -84
- package/exchange-rate/exchange-rate.d.ts +155 -84
- package/exchange-rate/exchange-rate.js +16 -16
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +8 -8
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +133 -98
- package/file-and-path/file-and-path.d.ts +133 -98
- package/file-and-path/file-and-path.js +8 -8
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +156 -68
- package/index.d.ts +156 -68
- package/index.js.map +1 -1
- package/instance/instance.cjs +8 -8
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +106 -71
- package/instance/instance.d.ts +106 -71
- package/instance/instance.js +8 -8
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs +4 -4
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.d.cts +35 -17
- package/inventory/inventory.d.ts +35 -17
- package/inventory/inventory.js +4 -4
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs +12 -12
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +103 -49
- package/job/job.d.ts +103 -49
- package/job/job.js +12 -12
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +8 -8
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +81 -46
- package/metadata/metadata.d.ts +81 -46
- package/metadata/metadata.js +8 -8
- package/metadata/metadata.js.map +1 -1
- package/package.json +7 -7
- package/project/project.cjs +16 -16
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +225 -154
- package/project/project.d.ts +225 -154
- package/project/project.js +16 -16
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +137 -13
- package/src/admin/admin.ts +217 -52
- package/src/application/application.ts +93 -9
- package/src/configuration/configuration.ts +49 -5
- package/src/data-manager-api.schemas.ts +156 -70
- package/src/dataset/dataset.ts +250 -42
- package/src/digest/digest.ts +49 -5
- package/src/exchange-rate/exchange-rate.ts +216 -29
- package/src/file-and-path/file-and-path.ts +172 -52
- package/src/instance/instance.ts +137 -27
- package/src/inventory/inventory.ts +49 -5
- package/src/job/job.ts +143 -13
- package/src/metadata/metadata.ts +116 -15
- package/src/project/project.ts +302 -75
- package/src/task/task.ts +111 -15
- package/src/type/type.ts +49 -5
- package/src/user/user.ts +149 -19
- package/task/task.cjs +8 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +78 -43
- package/task/task.d.ts +78 -43
- package/task/task.js +8 -8
- package/task/task.js.map +1 -1
- package/type/type.cjs +4 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +35 -17
- package/type/type.d.ts +35 -17
- package/type/type.js +4 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +12 -12
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +112 -59
- package/user/user.d.ts +112 -59
- package/user/user.js +12 -12
- package/user/user.js.map +1 -1
package/metadata/metadata.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseMutationOptions, UseMutationResult, UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
3
2
|
import { DatasetVersionMetaPostBodyBody, customInstance, DatasetMetaGetResponse, ErrorType, DmError, DatasetMetaPostBodyBody } from '../index.js';
|
|
4
3
|
import 'axios';
|
|
5
4
|
|
|
@@ -15,13 +14,13 @@ The annotations are provided in a list in JSON format. For details of the annota
|
|
|
15
14
|
*/
|
|
16
15
|
declare const addMetadataVersion: (datasetId: string, datasetVersion: number, datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<DatasetMetaGetResponse>;
|
|
17
16
|
declare const getAddMetadataVersionMutationOptions: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
18
|
-
mutation?: UseMutationOptions<
|
|
17
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError, {
|
|
19
18
|
datasetId: string;
|
|
20
19
|
datasetVersion: number;
|
|
21
20
|
data: DatasetVersionMetaPostBodyBody;
|
|
22
|
-
}, TContext
|
|
21
|
+
}, TContext>;
|
|
23
22
|
request?: SecondParameter<typeof customInstance>;
|
|
24
|
-
}
|
|
23
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError, {
|
|
25
24
|
datasetId: string;
|
|
26
25
|
datasetVersion: number;
|
|
27
26
|
data: DatasetVersionMetaPostBodyBody;
|
|
@@ -33,13 +32,13 @@ type AddMetadataVersionMutationError = ErrorType<DmError | void>;
|
|
|
33
32
|
* @summary Update Metadata for the Dataset version
|
|
34
33
|
*/
|
|
35
34
|
declare const useAddMetadataVersion: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
36
|
-
mutation?: UseMutationOptions<
|
|
35
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError, {
|
|
37
36
|
datasetId: string;
|
|
38
37
|
datasetVersion: number;
|
|
39
38
|
data: DatasetVersionMetaPostBodyBody;
|
|
40
|
-
}, TContext
|
|
39
|
+
}, TContext>;
|
|
41
40
|
request?: SecondParameter<typeof customInstance>;
|
|
42
|
-
}
|
|
41
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof addMetadataVersion>>, TError, {
|
|
43
42
|
datasetId: string;
|
|
44
43
|
datasetVersion: number;
|
|
45
44
|
data: DatasetVersionMetaPostBodyBody;
|
|
@@ -52,37 +51,55 @@ declare const useAddMetadataVersion: <TError = ErrorType<void | DmError>, TConte
|
|
|
52
51
|
declare const getMetadataVersion: (datasetId: string, datasetVersion: number, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<DatasetMetaGetResponse>;
|
|
53
52
|
declare const getGetMetadataVersionQueryKey: (datasetId: string, datasetVersion: number) => readonly ["data-manager-api", `/dataset/${string}/meta/${number}`];
|
|
54
53
|
declare const getGetMetadataVersionQueryOptions: <TData = DatasetMetaGetResponse, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
55
|
-
query?: Partial<UseQueryOptions<
|
|
54
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
56
55
|
request?: SecondParameter<typeof customInstance>;
|
|
57
|
-
}
|
|
56
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & {
|
|
58
57
|
queryKey: QueryKey;
|
|
59
58
|
};
|
|
60
59
|
type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>;
|
|
61
60
|
type GetMetadataVersionQueryError = ErrorType<void | DmError>;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
declare function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options: {
|
|
62
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, 'initialData'>;
|
|
63
|
+
request?: SecondParameter<typeof customInstance>;
|
|
64
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
65
|
+
queryKey: QueryKey;
|
|
66
|
+
};
|
|
67
|
+
declare function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
68
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, 'initialData'>;
|
|
69
|
+
request?: SecondParameter<typeof customInstance>;
|
|
70
|
+
}): UseQueryResult<TData, TError> & {
|
|
71
|
+
queryKey: QueryKey;
|
|
72
|
+
};
|
|
73
|
+
declare function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
74
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
67
75
|
request?: SecondParameter<typeof customInstance>;
|
|
68
|
-
}
|
|
76
|
+
}): UseQueryResult<TData, TError> & {
|
|
69
77
|
queryKey: QueryKey;
|
|
70
78
|
};
|
|
71
79
|
declare const getGetMetadataVersionSuspenseQueryOptions: <TData = DatasetMetaGetResponse, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
72
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
80
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
73
81
|
request?: SecondParameter<typeof customInstance>;
|
|
74
|
-
}
|
|
82
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & {
|
|
75
83
|
queryKey: QueryKey;
|
|
76
84
|
};
|
|
77
85
|
type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>;
|
|
78
86
|
type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
declare function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options: {
|
|
88
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
89
|
+
request?: SecondParameter<typeof customInstance>;
|
|
90
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
91
|
+
queryKey: QueryKey;
|
|
92
|
+
};
|
|
93
|
+
declare function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
94
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
95
|
+
request?: SecondParameter<typeof customInstance>;
|
|
96
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
97
|
+
queryKey: QueryKey;
|
|
98
|
+
};
|
|
99
|
+
declare function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string, datasetVersion: number, options?: {
|
|
100
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>;
|
|
84
101
|
request?: SecondParameter<typeof customInstance>;
|
|
85
|
-
}
|
|
102
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
86
103
|
queryKey: QueryKey;
|
|
87
104
|
};
|
|
88
105
|
/**
|
|
@@ -96,12 +113,12 @@ The labels are provided in a list in JSON format. For details of the label forma
|
|
|
96
113
|
*/
|
|
97
114
|
declare const addMetadata: (datasetId: string, datasetMetaPostBodyBody: DatasetMetaPostBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<DatasetMetaGetResponse>;
|
|
98
115
|
declare const getAddMetadataMutationOptions: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
99
|
-
mutation?: UseMutationOptions<
|
|
116
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError, {
|
|
100
117
|
datasetId: string;
|
|
101
118
|
data: DatasetMetaPostBodyBody;
|
|
102
|
-
}, TContext
|
|
119
|
+
}, TContext>;
|
|
103
120
|
request?: SecondParameter<typeof customInstance>;
|
|
104
|
-
}
|
|
121
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError, {
|
|
105
122
|
datasetId: string;
|
|
106
123
|
data: DatasetMetaPostBodyBody;
|
|
107
124
|
}, TContext>;
|
|
@@ -112,12 +129,12 @@ type AddMetadataMutationError = ErrorType<DmError | void>;
|
|
|
112
129
|
* @summary Update Metadata for the Dataset
|
|
113
130
|
*/
|
|
114
131
|
declare const useAddMetadata: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
115
|
-
mutation?: UseMutationOptions<
|
|
132
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError, {
|
|
116
133
|
datasetId: string;
|
|
117
134
|
data: DatasetMetaPostBodyBody;
|
|
118
|
-
}, TContext
|
|
135
|
+
}, TContext>;
|
|
119
136
|
request?: SecondParameter<typeof customInstance>;
|
|
120
|
-
}
|
|
137
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof addMetadata>>, TError, {
|
|
121
138
|
datasetId: string;
|
|
122
139
|
data: DatasetMetaPostBodyBody;
|
|
123
140
|
}, TContext>;
|
|
@@ -129,37 +146,55 @@ declare const useAddMetadata: <TError = ErrorType<void | DmError>, TContext = un
|
|
|
129
146
|
declare const getMetadata: (datasetId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<DatasetMetaGetResponse>;
|
|
130
147
|
declare const getGetMetadataQueryKey: (datasetId: string) => readonly ["data-manager-api", `/dataset/${string}/meta`];
|
|
131
148
|
declare const getGetMetadataQueryOptions: <TData = DatasetMetaGetResponse, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
132
|
-
query?: Partial<UseQueryOptions<
|
|
149
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
133
150
|
request?: SecondParameter<typeof customInstance>;
|
|
134
|
-
}
|
|
151
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & {
|
|
135
152
|
queryKey: QueryKey;
|
|
136
153
|
};
|
|
137
154
|
type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>;
|
|
138
155
|
type GetMetadataQueryError = ErrorType<void | DmError>;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
156
|
+
declare function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options: {
|
|
157
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>, 'initialData'>;
|
|
158
|
+
request?: SecondParameter<typeof customInstance>;
|
|
159
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
160
|
+
queryKey: QueryKey;
|
|
161
|
+
};
|
|
162
|
+
declare function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
163
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>, 'initialData'>;
|
|
164
|
+
request?: SecondParameter<typeof customInstance>;
|
|
165
|
+
}): UseQueryResult<TData, TError> & {
|
|
166
|
+
queryKey: QueryKey;
|
|
167
|
+
};
|
|
168
|
+
declare function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
169
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
144
170
|
request?: SecondParameter<typeof customInstance>;
|
|
145
|
-
}
|
|
171
|
+
}): UseQueryResult<TData, TError> & {
|
|
146
172
|
queryKey: QueryKey;
|
|
147
173
|
};
|
|
148
174
|
declare const getGetMetadataSuspenseQueryOptions: <TData = DatasetMetaGetResponse, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
149
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
175
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
150
176
|
request?: SecondParameter<typeof customInstance>;
|
|
151
|
-
}
|
|
177
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & {
|
|
152
178
|
queryKey: QueryKey;
|
|
153
179
|
};
|
|
154
180
|
type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>;
|
|
155
181
|
type GetMetadataSuspenseQueryError = ErrorType<void | DmError>;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
182
|
+
declare function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options: {
|
|
183
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
184
|
+
request?: SecondParameter<typeof customInstance>;
|
|
185
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
186
|
+
queryKey: QueryKey;
|
|
187
|
+
};
|
|
188
|
+
declare function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
189
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
190
|
+
request?: SecondParameter<typeof customInstance>;
|
|
191
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
192
|
+
queryKey: QueryKey;
|
|
193
|
+
};
|
|
194
|
+
declare function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: {
|
|
195
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>;
|
|
161
196
|
request?: SecondParameter<typeof customInstance>;
|
|
162
|
-
}
|
|
197
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
163
198
|
queryKey: QueryKey;
|
|
164
199
|
};
|
|
165
200
|
|
package/metadata/metadata.js
CHANGED
|
@@ -57,24 +57,24 @@ var getGetMetadataVersionQueryOptions = (datasetId, datasetVersion, options) =>
|
|
|
57
57
|
const queryFn = ({ signal }) => getMetadataVersion(datasetId, datasetVersion, requestOptions, signal);
|
|
58
58
|
return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
|
|
59
59
|
};
|
|
60
|
-
|
|
60
|
+
function useGetMetadataVersion(datasetId, datasetVersion, options) {
|
|
61
61
|
const queryOptions = getGetMetadataVersionQueryOptions(datasetId, datasetVersion, options);
|
|
62
62
|
const query = useQuery(queryOptions);
|
|
63
63
|
query.queryKey = queryOptions.queryKey;
|
|
64
64
|
return query;
|
|
65
|
-
}
|
|
65
|
+
}
|
|
66
66
|
var getGetMetadataVersionSuspenseQueryOptions = (datasetId, datasetVersion, options) => {
|
|
67
67
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
68
68
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetMetadataVersionQueryKey(datasetId, datasetVersion);
|
|
69
69
|
const queryFn = ({ signal }) => getMetadataVersion(datasetId, datasetVersion, requestOptions, signal);
|
|
70
70
|
return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
function useGetMetadataVersionSuspense(datasetId, datasetVersion, options) {
|
|
73
73
|
const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId, datasetVersion, options);
|
|
74
74
|
const query = useSuspenseQuery(queryOptions);
|
|
75
75
|
query.queryKey = queryOptions.queryKey;
|
|
76
76
|
return query;
|
|
77
|
-
}
|
|
77
|
+
}
|
|
78
78
|
var addMetadata = (datasetId, datasetMetaPostBodyBody, options) => {
|
|
79
79
|
const formData = new FormData();
|
|
80
80
|
if (datasetMetaPostBodyBody.meta_properties !== void 0) {
|
|
@@ -124,24 +124,24 @@ var getGetMetadataQueryOptions = (datasetId, options) => {
|
|
|
124
124
|
const queryFn = ({ signal }) => getMetadata(datasetId, requestOptions, signal);
|
|
125
125
|
return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
function useGetMetadata(datasetId, options) {
|
|
128
128
|
const queryOptions = getGetMetadataQueryOptions(datasetId, options);
|
|
129
129
|
const query = useQuery(queryOptions);
|
|
130
130
|
query.queryKey = queryOptions.queryKey;
|
|
131
131
|
return query;
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
var getGetMetadataSuspenseQueryOptions = (datasetId, options) => {
|
|
134
134
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
135
135
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetMetadataQueryKey(datasetId);
|
|
136
136
|
const queryFn = ({ signal }) => getMetadata(datasetId, requestOptions, signal);
|
|
137
137
|
return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
|
|
138
138
|
};
|
|
139
|
-
|
|
139
|
+
function useGetMetadataSuspense(datasetId, options) {
|
|
140
140
|
const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId, options);
|
|
141
141
|
const query = useSuspenseQuery(queryOptions);
|
|
142
142
|
query.queryKey = queryOptions.queryKey;
|
|
143
143
|
return query;
|
|
144
|
-
}
|
|
144
|
+
}
|
|
145
145
|
export {
|
|
146
146
|
addMetadata,
|
|
147
147
|
addMetadataVersion,
|
package/metadata/metadata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metadata/metadata.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: 3.1\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"],"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;AAC1K,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAgK,CAAC,UAAU;AAC7K,UAAM,EAAC,WAAU,gBAAe,KAAI,IA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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;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/metadata/metadata.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof addMetadataVersion>>,\n TError,\n {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody},\n TContext\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\nexport function 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>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function 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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof addMetadata>>,\n TError,\n {datasetId: string;data: DatasetMetaPostBodyBody},\n TContext\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\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function 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"],"mappings":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAqCA,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;AAC3K,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKnE,QAAM,aAAgK,CAAC,UAAU;AAC7K,UAAM,EAAC,WAAU,gBAAe,KAAI,IAAI,SAAS,CAAC;AAElD,WAAQ,mBAAmB,WAAU,gBAAe,MAAK,cAAc;AAAA,EACzE;AAKN,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AASrC,IAAM,wBAAwB,CACb,YAMb;AAEL,QAAM,kBAAkB,qCAAqC,OAAO;AAEpE,SAAO,YAAY,eAAe;AACpC;AAMG,IAAM,qBAAqB,CAC9B,WACA,gBACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS,SAA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,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAkCO,SAAS,eACf,WAAmB,SAEyC;AAE3D,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;AAsBO,SAAS,uBACf,WAAmB,SAEiD;AAEnE,QAAM,eAAe,mCAAmC,WAAU,OAAO;AAEzE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.1.0
|
|
2
|
+
"version": "3.1.0",
|
|
3
3
|
"author": "Oliver Dudgeon",
|
|
4
4
|
"name": "@squonk/data-manager-client",
|
|
5
5
|
"private": false,
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@tanstack/react-query": "5.24.1",
|
|
19
19
|
"@typescript-eslint/eslint-plugin": "7.1.0",
|
|
20
|
-
"axios": "1.
|
|
20
|
+
"axios": "1.7.4",
|
|
21
21
|
"eslint": "8.57.0",
|
|
22
22
|
"eslint-plugin-prettier": "5.1.3",
|
|
23
23
|
"js-yaml": "4.1.0",
|
|
24
|
-
"orval": "
|
|
25
|
-
"prettier": "3.
|
|
24
|
+
"orval": "7.2.0",
|
|
25
|
+
"prettier": "3.3.3",
|
|
26
26
|
"ts-morph": "21.0.1",
|
|
27
|
-
"tslib": "2.6.
|
|
28
|
-
"tsup": "8.
|
|
29
|
-
"typescript": "5.
|
|
27
|
+
"tslib": "2.6.3",
|
|
28
|
+
"tsup": "8.2.4",
|
|
29
|
+
"typescript": "5.5.4"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@tanstack/react-query": ">=4",
|
package/project/project.cjs
CHANGED
|
@@ -28,24 +28,24 @@ var getGetProjectsQueryOptions = (params, options) => {
|
|
|
28
28
|
const queryFn = ({ signal }) => getProjects(params, requestOptions, signal);
|
|
29
29
|
return { queryKey, queryFn, ...queryOptions };
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
function useGetProjects(params, options) {
|
|
32
32
|
const queryOptions = getGetProjectsQueryOptions(params, options);
|
|
33
33
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
34
34
|
query.queryKey = queryOptions.queryKey;
|
|
35
35
|
return query;
|
|
36
|
-
}
|
|
36
|
+
}
|
|
37
37
|
var getGetProjectsSuspenseQueryOptions = (params, options) => {
|
|
38
38
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
39
39
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectsQueryKey(params)));
|
|
40
40
|
const queryFn = ({ signal }) => getProjects(params, requestOptions, signal);
|
|
41
41
|
return { queryKey, queryFn, ...queryOptions };
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
function useGetProjectsSuspense(params, options) {
|
|
44
44
|
const queryOptions = getGetProjectsSuspenseQueryOptions(params, options);
|
|
45
45
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
46
46
|
query.queryKey = queryOptions.queryKey;
|
|
47
47
|
return query;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
var createProject = (projectPostBodyBody, options) => {
|
|
50
50
|
const formData = new FormData();
|
|
51
51
|
formData.append("name", projectPostBodyBody.name);
|
|
@@ -94,24 +94,24 @@ var getGetProjectQueryOptions = (projectId, options) => {
|
|
|
94
94
|
const queryFn = ({ signal }) => getProject(projectId, requestOptions, signal);
|
|
95
95
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
function useGetProject(projectId, options) {
|
|
98
98
|
const queryOptions = getGetProjectQueryOptions(projectId, options);
|
|
99
99
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
100
100
|
query.queryKey = queryOptions.queryKey;
|
|
101
101
|
return query;
|
|
102
|
-
}
|
|
102
|
+
}
|
|
103
103
|
var getGetProjectSuspenseQueryOptions = (projectId, options) => {
|
|
104
104
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
105
105
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectQueryKey(projectId)));
|
|
106
106
|
const queryFn = ({ signal }) => getProject(projectId, requestOptions, signal);
|
|
107
107
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
function useGetProjectSuspense(projectId, options) {
|
|
110
110
|
const queryOptions = getGetProjectSuspenseQueryOptions(projectId, options);
|
|
111
111
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
112
112
|
query.queryKey = queryOptions.queryKey;
|
|
113
113
|
return query;
|
|
114
|
-
}
|
|
114
|
+
}
|
|
115
115
|
var patchProject = (projectId, projectPatchBodyBody, options) => {
|
|
116
116
|
const formData = new FormData();
|
|
117
117
|
if (projectPatchBodyBody.private !== void 0) {
|
|
@@ -309,24 +309,24 @@ var getGetProjectFileQueryOptions = (projectId, params, options) => {
|
|
|
309
309
|
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
310
310
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
311
311
|
};
|
|
312
|
-
|
|
312
|
+
function useGetProjectFile(projectId, params, options) {
|
|
313
313
|
const queryOptions = getGetProjectFileQueryOptions(projectId, params, options);
|
|
314
314
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
315
315
|
query.queryKey = queryOptions.queryKey;
|
|
316
316
|
return query;
|
|
317
|
-
}
|
|
317
|
+
}
|
|
318
318
|
var getGetProjectFileSuspenseQueryOptions = (projectId, params, options) => {
|
|
319
319
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
320
320
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectFileQueryKey(projectId, params)));
|
|
321
321
|
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
322
322
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
323
323
|
};
|
|
324
|
-
|
|
324
|
+
function useGetProjectFileSuspense(projectId, params, options) {
|
|
325
325
|
const queryOptions = getGetProjectFileSuspenseQueryOptions(projectId, params, options);
|
|
326
326
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
327
327
|
query.queryKey = queryOptions.queryKey;
|
|
328
328
|
return query;
|
|
329
|
-
}
|
|
329
|
+
}
|
|
330
330
|
var addFileToProject = (projectId, projectFilePutBodyBody, options) => {
|
|
331
331
|
const formData = new FormData();
|
|
332
332
|
formData.append("file", projectFilePutBodyBody.file);
|
|
@@ -378,24 +378,24 @@ var getGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
|
|
|
378
378
|
const queryFn = ({ signal }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
379
379
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
380
380
|
};
|
|
381
|
-
|
|
381
|
+
function useGetProjectFileWithToken(projectId, params, options) {
|
|
382
382
|
const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId, params, options);
|
|
383
383
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
384
384
|
query.queryKey = queryOptions.queryKey;
|
|
385
385
|
return query;
|
|
386
|
-
}
|
|
386
|
+
}
|
|
387
387
|
var getGetProjectFileWithTokenSuspenseQueryOptions = (projectId, params, options) => {
|
|
388
388
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
389
389
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
|
|
390
390
|
const queryFn = ({ signal }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
391
391
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
392
392
|
};
|
|
393
|
-
|
|
393
|
+
function useGetProjectFileWithTokenSuspense(projectId, params, options) {
|
|
394
394
|
const queryOptions = getGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);
|
|
395
395
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
396
396
|
query.queryKey = queryOptions.queryKey;
|
|
397
397
|
return query;
|
|
398
|
-
}
|
|
398
|
+
}
|
|
399
399
|
|
|
400
400
|
|
|
401
401
|
|