@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.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.
Files changed (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,32 +8,37 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery, useMutation } from "@tanstack/react-query";
11
+ import {
12
+ useMutation,
13
+ useQuery
14
+ } from '@tanstack/react-query'
12
15
  import type {
13
- UseQueryOptions,
14
- UseMutationOptions,
15
- QueryFunction,
16
16
  MutationFunction,
17
- UseQueryResult,
17
+ QueryFunction,
18
18
  QueryKey,
19
- } from "@tanstack/react-query";
19
+ UseMutationOptions,
20
+ UseQueryOptions,
21
+ UseQueryResult
22
+ } from '@tanstack/react-query'
20
23
  import type {
21
24
  DatasetMetaGetResponse,
22
- DmError,
23
- DatasetVersionMetaPostBodyBody,
24
25
  DatasetMetaPostBodyBody,
25
- } from "../data-manager-api.schemas";
26
- import { customInstance } from ".././custom-instance";
27
- import type { ErrorType } from ".././custom-instance";
26
+ DatasetVersionMetaPostBodyBody,
27
+ DmError
28
+ } from '../data-manager-api.schemas'
29
+ import { customInstance } from '.././custom-instance';
30
+ import type { ErrorType } from '.././custom-instance';
31
+
28
32
 
29
33
  // eslint-disable-next-line
30
- type SecondParameter<T extends (...args: any) => any> = T extends (
34
+ type SecondParameter<T extends (...args: any) => any> = T extends (
31
35
  config: any,
32
- args: infer P
36
+ args: infer P,
33
37
  ) => any
34
38
  ? P
35
39
  : never;
36
40
 
41
+
37
42
  /**
38
43
  * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.
39
44
 
@@ -44,200 +49,132 @@ The annotations are provided in a list in JSON format. For details of the annota
44
49
  * @summary Update Metadata for the Dataset version
45
50
  */
46
51
  export const addMetadataVersion = (
47
- datasetId: string,
48
- datasetVersion: number,
49
- datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,
50
- options?: SecondParameter<typeof customInstance>
51
- ) => {
52
- const formData = new FormData();
53
- if (datasetVersionMetaPostBodyBody.meta_properties !== undefined) {
54
- formData.append(
55
- "meta_properties",
56
- datasetVersionMetaPostBodyBody.meta_properties
57
- );
58
- }
59
- if (datasetVersionMetaPostBodyBody.annotations !== undefined) {
60
- formData.append("annotations", datasetVersionMetaPostBodyBody.annotations);
61
- }
62
-
63
- return customInstance<DatasetMetaGetResponse>(
64
- {
65
- url: `/dataset/${datasetId}/meta/${datasetVersion}`,
66
- method: "post",
67
- headers: { "Content-Type": "multipart/form-data" },
68
- data: formData,
69
- },
70
- options
71
- );
72
- };
73
-
74
- export const getAddMetadataVersionMutationOptions = <
75
- TError = ErrorType<DmError | void>,
76
- TContext = unknown
77
- >(options?: {
78
- mutation?: UseMutationOptions<
79
- Awaited<ReturnType<typeof addMetadataVersion>>,
80
- TError,
81
- {
82
- datasetId: string;
83
- datasetVersion: number;
84
- data: DatasetVersionMetaPostBodyBody;
52
+ datasetId: string,
53
+ datasetVersion: number,
54
+ datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,
55
+ options?: SecondParameter<typeof customInstance>,) => {
56
+
57
+ const formData = new FormData();
58
+ if(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {
59
+ formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)
60
+ }
61
+ if(datasetVersionMetaPostBodyBody.annotations !== undefined) {
62
+ formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)
63
+ }
64
+
65
+ return customInstance<DatasetMetaGetResponse>(
66
+ {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'post',
67
+ headers: {'Content-Type': 'multipart/form-data', },
68
+ data: formData
85
69
  },
86
- TContext
87
- >;
88
- request?: SecondParameter<typeof customInstance>;
89
- }): UseMutationOptions<
90
- Awaited<ReturnType<typeof addMetadataVersion>>,
91
- TError,
92
- {
93
- datasetId: string;
94
- datasetVersion: number;
95
- data: DatasetVersionMetaPostBodyBody;
96
- },
97
- TContext
98
- > => {
99
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
100
-
101
- const mutationFn: MutationFunction<
102
- Awaited<ReturnType<typeof addMetadataVersion>>,
103
- {
104
- datasetId: string;
105
- datasetVersion: number;
106
- data: DatasetVersionMetaPostBodyBody;
70
+ options);
107
71
  }
108
- > = (props) => {
109
- const { datasetId, datasetVersion, data } = props ?? {};
110
-
111
- return addMetadataVersion(datasetId, datasetVersion, data, requestOptions);
112
- };
113
-
114
- return { mutationFn, ...mutationOptions };
115
- };
116
-
117
- export type AddMetadataVersionMutationResult = NonNullable<
118
- Awaited<ReturnType<typeof addMetadataVersion>>
119
- >;
120
- export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody;
121
- export type AddMetadataVersionMutationError = ErrorType<DmError | void>;
122
-
123
- export const useAddMetadataVersion = <
124
- TError = ErrorType<DmError | void>,
125
- TContext = unknown
126
- >(options?: {
127
- mutation?: UseMutationOptions<
128
- Awaited<ReturnType<typeof addMetadataVersion>>,
129
- TError,
130
- {
131
- datasetId: string;
132
- datasetVersion: number;
133
- data: DatasetVersionMetaPostBodyBody;
134
- },
135
- TContext
136
- >;
137
- request?: SecondParameter<typeof customInstance>;
138
- }) => {
139
- const mutationOptions = getAddMetadataVersionMutationOptions(options);
140
-
141
- return useMutation(mutationOptions);
142
- };
143
- /**
72
+
73
+
74
+
75
+ export const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,
76
+
77
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
78
+ ): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {
79
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
80
+
81
+
82
+
83
+
84
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {
85
+ const {datasetId,datasetVersion,data} = props ?? {};
86
+
87
+ return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)
88
+ }
89
+
90
+
91
+
92
+
93
+ return { mutationFn, ...mutationOptions }}
94
+
95
+ export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>
96
+ export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody
97
+ export type AddMetadataVersionMutationError = ErrorType<DmError | void>
98
+
99
+ /**
100
+ * @summary Update Metadata for the Dataset version
101
+ */
102
+ export const useAddMetadataVersion = <TError = ErrorType<DmError | void>,
103
+
104
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
105
+ ) => {
106
+
107
+ const mutationOptions = getAddMetadataVersionMutationOptions(options);
108
+
109
+ return useMutation(mutationOptions);
110
+ }
111
+ /**
144
112
  * Returns the Metadata for a **Dataset Version** in JSON format.
145
113
 
146
114
  * @summary Gets the Metadata for a specific Dataset Version
147
115
  */
148
116
  export const getMetadataVersion = (
149
- datasetId: string,
150
- datasetVersion: number,
151
- options?: SecondParameter<typeof customInstance>,
152
- signal?: AbortSignal
117
+ datasetId: string,
118
+ datasetVersion: number,
119
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
153
120
  ) => {
154
- return customInstance<DatasetMetaGetResponse>(
155
- {
156
- url: `/dataset/${datasetId}/meta/${datasetVersion}`,
157
- method: "get",
158
- signal,
121
+
122
+
123
+ return customInstance<DatasetMetaGetResponse>(
124
+ {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'get', signal
159
125
  },
160
- options
161
- );
162
- };
163
-
164
- export const getGetMetadataVersionQueryKey = (
165
- datasetId: string,
166
- datasetVersion: number
167
- ) => ["data-manager-api", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;
168
-
169
- export const getGetMetadataVersionQueryOptions = <
170
- TData = Awaited<ReturnType<typeof getMetadataVersion>>,
171
- TError = ErrorType<void | DmError>
172
- >(
173
- datasetId: string,
174
- datasetVersion: number,
175
- options?: {
176
- query?: UseQueryOptions<
177
- Awaited<ReturnType<typeof getMetadataVersion>>,
178
- TError,
179
- TData
180
- >;
181
- request?: SecondParameter<typeof customInstance>;
182
- }
183
- ): UseQueryOptions<
184
- Awaited<ReturnType<typeof getMetadataVersion>>,
185
- TError,
186
- TData
187
- > & { queryKey: QueryKey } => {
188
- const { query: queryOptions, request: requestOptions } = options ?? {};
189
-
190
- const queryKey =
191
- queryOptions?.queryKey ??
192
- getGetMetadataVersionQueryKey(datasetId, datasetVersion);
193
-
194
- const queryFn: QueryFunction<
195
- Awaited<ReturnType<typeof getMetadataVersion>>
196
- > = ({ signal }) =>
197
- getMetadataVersion(datasetId, datasetVersion, requestOptions, signal);
198
-
199
- return {
200
- queryKey,
201
- queryFn,
202
- enabled: !!(datasetId && datasetVersion),
203
- ...queryOptions,
204
- };
205
- };
206
-
207
- export type GetMetadataVersionQueryResult = NonNullable<
208
- Awaited<ReturnType<typeof getMetadataVersion>>
209
- >;
210
- export type GetMetadataVersionQueryError = ErrorType<void | DmError>;
211
-
212
- export const useGetMetadataVersion = <
213
- TData = Awaited<ReturnType<typeof getMetadataVersion>>,
214
- TError = ErrorType<void | DmError>
215
- >(
216
- datasetId: string,
217
- datasetVersion: number,
218
- options?: {
219
- query?: UseQueryOptions<
220
- Awaited<ReturnType<typeof getMetadataVersion>>,
221
- TError,
222
- TData
223
- >;
224
- request?: SecondParameter<typeof customInstance>;
225
- }
226
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
227
- const queryOptions = getGetMetadataVersionQueryOptions(
228
- datasetId,
229
- datasetVersion,
230
- options
231
- );
232
-
233
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
234
- queryKey: QueryKey;
235
- };
236
-
237
- query.queryKey = queryOptions.queryKey;
126
+ options);
127
+ }
128
+
129
+
130
+ export const getGetMetadataVersionQueryKey = (datasetId: string,
131
+ datasetVersion: number,) => {
132
+
133
+ return ["data-manager-api", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;
134
+ }
135
+
136
+
137
+ export const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,
138
+ datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
139
+ ) => {
140
+
141
+ const {query: queryOptions, request: requestOptions} = options ?? {};
142
+
143
+ const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);
144
+
145
+
146
+
147
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);
148
+
149
+
150
+
151
+
152
+
153
+ return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }
154
+ }
155
+
156
+ export type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>
157
+ export type GetMetadataVersionQueryError = ErrorType<void | DmError>
158
+
159
+ /**
160
+ * @summary Gets the Metadata for a specific Dataset Version
161
+ */
162
+ export const useGetMetadataVersion = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(
163
+ datasetId: string,
164
+ datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
165
+
166
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
167
+
168
+ const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,options)
169
+
170
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
171
+
172
+ query.queryKey = queryOptions.queryKey ;
238
173
 
239
174
  return query;
240
- };
175
+ }
176
+
177
+
241
178
 
242
179
  /**
243
180
  * Update default parameters or add new labels to the Metadata for the Dataset.
@@ -249,154 +186,125 @@ The labels are provided in a list in JSON format. For details of the label forma
249
186
  * @summary Update Metadata for the Dataset
250
187
  */
251
188
  export const addMetadata = (
252
- datasetId: string,
253
- datasetMetaPostBodyBody: DatasetMetaPostBodyBody,
254
- options?: SecondParameter<typeof customInstance>
255
- ) => {
256
- const formData = new FormData();
257
- if (datasetMetaPostBodyBody.meta_properties !== undefined) {
258
- formData.append("meta_properties", datasetMetaPostBodyBody.meta_properties);
259
- }
260
- if (datasetMetaPostBodyBody.labels !== undefined) {
261
- formData.append("labels", datasetMetaPostBodyBody.labels);
262
- }
263
-
264
- return customInstance<DatasetMetaGetResponse>(
265
- {
266
- url: `/dataset/${datasetId}/meta`,
267
- method: "post",
268
- headers: { "Content-Type": "multipart/form-data" },
269
- data: formData,
189
+ datasetId: string,
190
+ datasetMetaPostBodyBody: DatasetMetaPostBodyBody,
191
+ options?: SecondParameter<typeof customInstance>,) => {
192
+
193
+ const formData = new FormData();
194
+ if(datasetMetaPostBodyBody.meta_properties !== undefined) {
195
+ formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)
196
+ }
197
+ if(datasetMetaPostBodyBody.labels !== undefined) {
198
+ formData.append('labels', datasetMetaPostBodyBody.labels)
199
+ }
200
+
201
+ return customInstance<DatasetMetaGetResponse>(
202
+ {url: `/dataset/${datasetId}/meta`, method: 'post',
203
+ headers: {'Content-Type': 'multipart/form-data', },
204
+ data: formData
270
205
  },
271
- options
272
- );
273
- };
274
-
275
- export const getAddMetadataMutationOptions = <
276
- TError = ErrorType<DmError | void>,
277
- TContext = unknown
278
- >(options?: {
279
- mutation?: UseMutationOptions<
280
- Awaited<ReturnType<typeof addMetadata>>,
281
- TError,
282
- { datasetId: string; data: DatasetMetaPostBodyBody },
283
- TContext
284
- >;
285
- request?: SecondParameter<typeof customInstance>;
286
- }): UseMutationOptions<
287
- Awaited<ReturnType<typeof addMetadata>>,
288
- TError,
289
- { datasetId: string; data: DatasetMetaPostBodyBody },
290
- TContext
291
- > => {
292
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
293
-
294
- const mutationFn: MutationFunction<
295
- Awaited<ReturnType<typeof addMetadata>>,
296
- { datasetId: string; data: DatasetMetaPostBodyBody }
297
- > = (props) => {
298
- const { datasetId, data } = props ?? {};
299
-
300
- return addMetadata(datasetId, data, requestOptions);
301
- };
302
-
303
- return { mutationFn, ...mutationOptions };
304
- };
305
-
306
- export type AddMetadataMutationResult = NonNullable<
307
- Awaited<ReturnType<typeof addMetadata>>
308
- >;
309
- export type AddMetadataMutationBody = DatasetMetaPostBodyBody;
310
- export type AddMetadataMutationError = ErrorType<DmError | void>;
311
-
312
- export const useAddMetadata = <
313
- TError = ErrorType<DmError | void>,
314
- TContext = unknown
315
- >(options?: {
316
- mutation?: UseMutationOptions<
317
- Awaited<ReturnType<typeof addMetadata>>,
318
- TError,
319
- { datasetId: string; data: DatasetMetaPostBodyBody },
320
- TContext
321
- >;
322
- request?: SecondParameter<typeof customInstance>;
323
- }) => {
324
- const mutationOptions = getAddMetadataMutationOptions(options);
325
-
326
- return useMutation(mutationOptions);
327
- };
328
- /**
206
+ options);
207
+ }
208
+
209
+
210
+
211
+ export const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,
212
+
213
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
214
+ ): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {
215
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
216
+
217
+
218
+
219
+
220
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {
221
+ const {datasetId,data} = props ?? {};
222
+
223
+ return addMetadata(datasetId,data,requestOptions)
224
+ }
225
+
226
+
227
+
228
+
229
+ return { mutationFn, ...mutationOptions }}
230
+
231
+ export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>
232
+ export type AddMetadataMutationBody = DatasetMetaPostBodyBody
233
+ export type AddMetadataMutationError = ErrorType<DmError | void>
234
+
235
+ /**
236
+ * @summary Update Metadata for the Dataset
237
+ */
238
+ export const useAddMetadata = <TError = ErrorType<DmError | void>,
239
+
240
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
241
+ ) => {
242
+
243
+ const mutationOptions = getAddMetadataMutationOptions(options);
244
+
245
+ return useMutation(mutationOptions);
246
+ }
247
+ /**
329
248
  * Returns the Metadata for a Dataset in JSON format.
330
249
 
331
250
  * @summary Gets the Metadata for a specific Dataset
332
251
  */
333
252
  export const getMetadata = (
334
- datasetId: string,
335
- options?: SecondParameter<typeof customInstance>,
336
- signal?: AbortSignal
253
+ datasetId: string,
254
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
337
255
  ) => {
338
- return customInstance<DatasetMetaGetResponse>(
339
- { url: `/dataset/${datasetId}/meta`, method: "get", signal },
340
- options
341
- );
342
- };
343
-
344
- export const getGetMetadataQueryKey = (datasetId: string) =>
345
- ["data-manager-api", `/dataset/${datasetId}/meta`] as const;
346
-
347
- export const getGetMetadataQueryOptions = <
348
- TData = Awaited<ReturnType<typeof getMetadata>>,
349
- TError = ErrorType<void | DmError>
350
- >(
351
- datasetId: string,
352
- options?: {
353
- query?: UseQueryOptions<
354
- Awaited<ReturnType<typeof getMetadata>>,
355
- TError,
356
- TData
357
- >;
358
- request?: SecondParameter<typeof customInstance>;
359
- }
360
- ): UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & {
361
- queryKey: QueryKey;
362
- } => {
363
- const { query: queryOptions, request: requestOptions } = options ?? {};
364
-
365
- const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);
366
-
367
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({
368
- signal,
369
- }) => getMetadata(datasetId, requestOptions, signal);
370
-
371
- return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
372
- };
373
-
374
- export type GetMetadataQueryResult = NonNullable<
375
- Awaited<ReturnType<typeof getMetadata>>
376
- >;
377
- export type GetMetadataQueryError = ErrorType<void | DmError>;
378
-
379
- export const useGetMetadata = <
380
- TData = Awaited<ReturnType<typeof getMetadata>>,
381
- TError = ErrorType<void | DmError>
382
- >(
383
- datasetId: string,
384
- options?: {
385
- query?: UseQueryOptions<
386
- Awaited<ReturnType<typeof getMetadata>>,
387
- TError,
388
- TData
389
- >;
390
- request?: SecondParameter<typeof customInstance>;
391
- }
392
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
393
- const queryOptions = getGetMetadataQueryOptions(datasetId, options);
394
-
395
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
396
- queryKey: QueryKey;
397
- };
398
-
399
- query.queryKey = queryOptions.queryKey;
256
+
257
+
258
+ return customInstance<DatasetMetaGetResponse>(
259
+ {url: `/dataset/${datasetId}/meta`, method: 'get', signal
260
+ },
261
+ options);
262
+ }
263
+
264
+
265
+ export const getGetMetadataQueryKey = (datasetId: string,) => {
266
+
267
+ return ["data-manager-api", `/dataset/${datasetId}/meta`] as const;
268
+ }
269
+
270
+
271
+ export 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>}
272
+ ) => {
273
+
274
+ const {query: queryOptions, request: requestOptions} = options ?? {};
275
+
276
+ const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);
277
+
278
+
279
+
280
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);
281
+
282
+
283
+
284
+
285
+
286
+ return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }
287
+ }
288
+
289
+ export type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>
290
+ export type GetMetadataQueryError = ErrorType<void | DmError>
291
+
292
+ /**
293
+ * @summary Gets the Metadata for a specific Dataset
294
+ */
295
+ export const useGetMetadata = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(
296
+ datasetId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
297
+
298
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
299
+
300
+ const queryOptions = getGetMetadataQueryOptions(datasetId,options)
301
+
302
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
303
+
304
+ query.queryKey = queryOptions.queryKey ;
400
305
 
401
306
  return query;
402
- };
307
+ }
308
+
309
+
310
+