@squonk/data-manager-client 1.1.3 → 1.1.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 (84) hide show
  1. package/accounting/accounting.cjs +27 -18
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +23 -5
  4. package/accounting/accounting.js +27 -18
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +66 -21
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +74 -4
  9. package/admin/admin.js +65 -20
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +18 -10
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +16 -4
  14. package/application/application.js +18 -10
  15. package/application/application.js.map +1 -1
  16. package/{custom-instance-d49ce6d9.d.ts → custom-instance-e49ba702.d.ts} +1 -1
  17. package/dataset/dataset.cjs +85 -34
  18. package/dataset/dataset.cjs.map +1 -1
  19. package/dataset/dataset.d.ts +85 -7
  20. package/dataset/dataset.js +84 -33
  21. package/dataset/dataset.js.map +1 -1
  22. package/exchange-rate/exchange-rate.cjs +58 -17
  23. package/exchange-rate/exchange-rate.cjs.map +1 -1
  24. package/exchange-rate/exchange-rate.d.ts +50 -6
  25. package/exchange-rate/exchange-rate.js +57 -16
  26. package/exchange-rate/exchange-rate.js.map +1 -1
  27. package/file/file.cjs +39 -19
  28. package/file/file.cjs.map +1 -1
  29. package/file/file.d.ts +40 -4
  30. package/file/file.js +39 -19
  31. package/file/file.js.map +1 -1
  32. package/index.cjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.js.map +1 -1
  35. package/instance/instance.cjs +54 -24
  36. package/instance/instance.cjs.map +1 -1
  37. package/instance/instance.d.ts +60 -4
  38. package/instance/instance.js +53 -23
  39. package/instance/instance.js.map +1 -1
  40. package/job/job.cjs +28 -26
  41. package/job/job.cjs.map +1 -1
  42. package/job/job.d.ts +23 -5
  43. package/job/job.js +28 -26
  44. package/job/job.js.map +1 -1
  45. package/metadata/metadata.cjs +36 -14
  46. package/metadata/metadata.cjs.map +1 -1
  47. package/metadata/metadata.d.ts +38 -4
  48. package/metadata/metadata.js +36 -14
  49. package/metadata/metadata.js.map +1 -1
  50. package/package.json +9 -9
  51. package/project/project.cjs +103 -39
  52. package/project/project.cjs.map +1 -1
  53. package/project/project.d.ts +106 -6
  54. package/project/project.js +102 -38
  55. package/project/project.js.map +1 -1
  56. package/src/accounting/accounting.ts +91 -39
  57. package/src/admin/admin.ts +255 -96
  58. package/src/application/application.ts +66 -28
  59. package/src/data-manager-api.schemas.ts +1 -1
  60. package/src/dataset/dataset.ts +318 -124
  61. package/src/exchange-rate/exchange-rate.ts +213 -81
  62. package/src/file/file.ts +150 -60
  63. package/src/instance/instance.ts +204 -84
  64. package/src/job/job.ts +96 -46
  65. package/src/metadata/metadata.ts +133 -51
  66. package/src/project/project.ts +369 -140
  67. package/src/task/task.ts +93 -41
  68. package/src/type/type.ts +28 -12
  69. package/src/user/user.ts +124 -57
  70. package/task/task.cjs +26 -21
  71. package/task/task.cjs.map +1 -1
  72. package/task/task.d.ts +24 -4
  73. package/task/task.js +26 -21
  74. package/task/task.js.map +1 -1
  75. package/type/type.cjs +9 -4
  76. package/type/type.cjs.map +1 -1
  77. package/type/type.d.ts +9 -3
  78. package/type/type.js +9 -4
  79. package/type/type.js.map +1 -1
  80. package/user/user.cjs +34 -22
  81. package/user/user.cjs.map +1 -1
  82. package/user/user.d.ts +31 -5
  83. package/user/user.js +33 -21
  84. package/user/user.js.map +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.12.1 🍺
2
+ * Generated by orval v6.15.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -72,13 +72,7 @@ export const addMetadataVersion = (
72
72
  );
73
73
  };
74
74
 
75
- export type AddMetadataVersionMutationResult = NonNullable<
76
- Awaited<ReturnType<typeof addMetadataVersion>>
77
- >;
78
- export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody;
79
- export type AddMetadataVersionMutationError = ErrorType<DmError | void>;
80
-
81
- export const useAddMetadataVersion = <
75
+ export const getAddMetadataVersionMutationOptions = <
82
76
  TError = ErrorType<DmError | void>,
83
77
  TContext = unknown
84
78
  >(options?: {
@@ -93,7 +87,16 @@ export const useAddMetadataVersion = <
93
87
  TContext
94
88
  >;
95
89
  request?: SecondParameter<typeof customInstance>;
96
- }) => {
90
+ }): UseMutationOptions<
91
+ Awaited<ReturnType<typeof addMetadataVersion>>,
92
+ TError,
93
+ {
94
+ datasetId: string;
95
+ datasetVersion: number;
96
+ data: DatasetVersionMetaPostBodyBody;
97
+ },
98
+ TContext
99
+ > => {
97
100
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
98
101
 
99
102
  const mutationFn: MutationFunction<
@@ -109,7 +112,20 @@ export const useAddMetadataVersion = <
109
112
  return addMetadataVersion(datasetId, datasetVersion, data, requestOptions);
110
113
  };
111
114
 
112
- return useMutation<
115
+ return { mutationFn, ...mutationOptions };
116
+ };
117
+
118
+ export type AddMetadataVersionMutationResult = NonNullable<
119
+ Awaited<ReturnType<typeof addMetadataVersion>>
120
+ >;
121
+ export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody;
122
+ export type AddMetadataVersionMutationError = ErrorType<DmError | void>;
123
+
124
+ export const useAddMetadataVersion = <
125
+ TError = ErrorType<DmError | void>,
126
+ TContext = unknown
127
+ >(options?: {
128
+ mutation?: UseMutationOptions<
113
129
  Awaited<ReturnType<typeof addMetadataVersion>>,
114
130
  TError,
115
131
  {
@@ -118,7 +134,12 @@ export const useAddMetadataVersion = <
118
134
  data: DatasetVersionMetaPostBodyBody;
119
135
  },
120
136
  TContext
121
- >(mutationFn, mutationOptions);
137
+ >;
138
+ request?: SecondParameter<typeof customInstance>;
139
+ }) => {
140
+ const mutationOptions = getAddMetadataVersionMutationOptions(options);
141
+
142
+ return useMutation(mutationOptions);
122
143
  };
123
144
  /**
124
145
  * Returns the metadata for a Dataset version in JSON format.
@@ -144,14 +165,9 @@ export const getMetadataVersion = (
144
165
  export const getGetMetadataVersionQueryKey = (
145
166
  datasetId: string,
146
167
  datasetVersion: number
147
- ) => [`/dataset/${datasetId}/meta/${datasetVersion}`];
148
-
149
- export type GetMetadataVersionQueryResult = NonNullable<
150
- Awaited<ReturnType<typeof getMetadataVersion>>
151
- >;
152
- export type GetMetadataVersionQueryError = ErrorType<void | DmError>;
168
+ ) => [`/dataset/${datasetId}/meta/${datasetVersion}`] as const;
153
169
 
154
- export const useGetMetadataVersion = <
170
+ export const useGetMetadataVersionQueryOptions = <
155
171
  TData = Awaited<ReturnType<typeof getMetadataVersion>>,
156
172
  TError = ErrorType<void | DmError>
157
173
  >(
@@ -165,7 +181,11 @@ export const useGetMetadataVersion = <
165
181
  >;
166
182
  request?: SecondParameter<typeof customInstance>;
167
183
  }
168
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
184
+ ): UseQueryOptions<
185
+ Awaited<ReturnType<typeof getMetadataVersion>>,
186
+ TError,
187
+ TData
188
+ > & { queryKey: QueryKey } => {
169
189
  const { query: queryOptions, request: requestOptions } = options ?? {};
170
190
 
171
191
  const queryKey =
@@ -179,13 +199,40 @@ export const useGetMetadataVersion = <
179
199
 
180
200
  const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
181
201
 
182
- const query = useQuery<
183
- Awaited<ReturnType<typeof getMetadataVersion>>,
184
- TError,
185
- TData
186
- >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
202
+ return customOptions;
203
+ };
187
204
 
188
- query.queryKey = customOptions.queryKey;
205
+ export type GetMetadataVersionQueryResult = NonNullable<
206
+ Awaited<ReturnType<typeof getMetadataVersion>>
207
+ >;
208
+ export type GetMetadataVersionQueryError = ErrorType<void | DmError>;
209
+
210
+ export const useGetMetadataVersion = <
211
+ TData = Awaited<ReturnType<typeof getMetadataVersion>>,
212
+ TError = ErrorType<void | DmError>
213
+ >(
214
+ datasetId: string,
215
+ datasetVersion: number,
216
+ options?: {
217
+ query?: UseQueryOptions<
218
+ Awaited<ReturnType<typeof getMetadataVersion>>,
219
+ TError,
220
+ TData
221
+ >;
222
+ request?: SecondParameter<typeof customInstance>;
223
+ }
224
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
225
+ const queryOptions = useGetMetadataVersionQueryOptions(
226
+ datasetId,
227
+ datasetVersion,
228
+ options
229
+ );
230
+
231
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
232
+ queryKey: QueryKey;
233
+ };
234
+
235
+ query.queryKey = queryOptions.queryKey;
189
236
 
190
237
  return query;
191
238
  };
@@ -221,13 +268,7 @@ export const addMetadata = (
221
268
  );
222
269
  };
223
270
 
224
- export type AddMetadataMutationResult = NonNullable<
225
- Awaited<ReturnType<typeof addMetadata>>
226
- >;
227
- export type AddMetadataMutationBody = DatasetMetaPostBodyBody;
228
- export type AddMetadataMutationError = ErrorType<DmError | void>;
229
-
230
- export const useAddMetadata = <
271
+ export const getAddMetadataMutationOptions = <
231
272
  TError = ErrorType<DmError | void>,
232
273
  TContext = unknown
233
274
  >(options?: {
@@ -238,7 +279,12 @@ export const useAddMetadata = <
238
279
  TContext
239
280
  >;
240
281
  request?: SecondParameter<typeof customInstance>;
241
- }) => {
282
+ }): UseMutationOptions<
283
+ Awaited<ReturnType<typeof addMetadata>>,
284
+ TError,
285
+ { datasetId: string; data: DatasetMetaPostBodyBody },
286
+ TContext
287
+ > => {
242
288
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
243
289
 
244
290
  const mutationFn: MutationFunction<
@@ -250,12 +296,30 @@ export const useAddMetadata = <
250
296
  return addMetadata(datasetId, data, requestOptions);
251
297
  };
252
298
 
253
- return useMutation<
299
+ return { mutationFn, ...mutationOptions };
300
+ };
301
+
302
+ export type AddMetadataMutationResult = NonNullable<
303
+ Awaited<ReturnType<typeof addMetadata>>
304
+ >;
305
+ export type AddMetadataMutationBody = DatasetMetaPostBodyBody;
306
+ export type AddMetadataMutationError = ErrorType<DmError | void>;
307
+
308
+ export const useAddMetadata = <
309
+ TError = ErrorType<DmError | void>,
310
+ TContext = unknown
311
+ >(options?: {
312
+ mutation?: UseMutationOptions<
254
313
  Awaited<ReturnType<typeof addMetadata>>,
255
314
  TError,
256
315
  { datasetId: string; data: DatasetMetaPostBodyBody },
257
316
  TContext
258
- >(mutationFn, mutationOptions);
317
+ >;
318
+ request?: SecondParameter<typeof customInstance>;
319
+ }) => {
320
+ const mutationOptions = getAddMetadataMutationOptions(options);
321
+
322
+ return useMutation(mutationOptions);
259
323
  };
260
324
  /**
261
325
  * Returns the metadata for a Dataset in JSON format.
@@ -273,16 +337,10 @@ export const getMetadata = (
273
337
  );
274
338
  };
275
339
 
276
- export const getGetMetadataQueryKey = (datasetId: string) => [
277
- `/dataset/${datasetId}/meta`,
278
- ];
340
+ export const getGetMetadataQueryKey = (datasetId: string) =>
341
+ [`/dataset/${datasetId}/meta`] as const;
279
342
 
280
- export type GetMetadataQueryResult = NonNullable<
281
- Awaited<ReturnType<typeof getMetadata>>
282
- >;
283
- export type GetMetadataQueryError = ErrorType<void | DmError>;
284
-
285
- export const useGetMetadata = <
343
+ export const useGetMetadataQueryOptions = <
286
344
  TData = Awaited<ReturnType<typeof getMetadata>>,
287
345
  TError = ErrorType<void | DmError>
288
346
  >(
@@ -295,7 +353,9 @@ export const useGetMetadata = <
295
353
  >;
296
354
  request?: SecondParameter<typeof customInstance>;
297
355
  }
298
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
356
+ ): UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & {
357
+ queryKey: QueryKey;
358
+ } => {
299
359
  const { query: queryOptions, request: requestOptions } = options ?? {};
300
360
 
301
361
  const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);
@@ -306,13 +366,35 @@ export const useGetMetadata = <
306
366
 
307
367
  const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
308
368
 
309
- const query = useQuery<
310
- Awaited<ReturnType<typeof getMetadata>>,
311
- TError,
312
- TData
313
- >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
369
+ return customOptions;
370
+ };
371
+
372
+ export type GetMetadataQueryResult = NonNullable<
373
+ Awaited<ReturnType<typeof getMetadata>>
374
+ >;
375
+ export type GetMetadataQueryError = ErrorType<void | DmError>;
376
+
377
+ export const useGetMetadata = <
378
+ TData = Awaited<ReturnType<typeof getMetadata>>,
379
+ TError = ErrorType<void | DmError>
380
+ >(
381
+ datasetId: string,
382
+ options?: {
383
+ query?: UseQueryOptions<
384
+ Awaited<ReturnType<typeof getMetadata>>,
385
+ TError,
386
+ TData
387
+ >;
388
+ request?: SecondParameter<typeof customInstance>;
389
+ }
390
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
391
+ const queryOptions = useGetMetadataQueryOptions(datasetId, options);
392
+
393
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
394
+ queryKey: QueryKey;
395
+ };
314
396
 
315
- query.queryKey = customOptions.queryKey;
397
+ query.queryKey = queryOptions.queryKey;
316
398
 
317
399
  return query;
318
400
  };