@squonk/data-manager-client 0.7.3 → 0.7.8-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 (85) hide show
  1. package/accounting/accounting.cjs +5 -5
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +8 -3
  4. package/accounting/accounting.js +1 -1
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +35 -25
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +36 -17
  9. package/admin/admin.js +32 -22
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +12 -12
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +11 -6
  14. package/application/application.js +9 -9
  15. package/application/application.js.map +1 -1
  16. package/{chunk-JR7F532L.js → chunk-6EEIAH4R.js} +1 -1
  17. package/{chunk-JR7F532L.js.map → chunk-6EEIAH4R.js.map} +1 -1
  18. package/{chunk-3DXYUDZH.cjs → chunk-NGBTCJWS.cjs} +1 -1
  19. package/chunk-NGBTCJWS.cjs.map +1 -0
  20. package/{custom-instance-32850190.d.ts → custom-instance-42e56f26.d.ts} +10 -3
  21. package/dataset/dataset.cjs +62 -52
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.ts +52 -29
  24. package/dataset/dataset.js +54 -44
  25. package/dataset/dataset.js.map +1 -1
  26. package/file/file.cjs +22 -17
  27. package/file/file.cjs.map +1 -1
  28. package/file/file.d.ts +20 -8
  29. package/file/file.js +18 -13
  30. package/file/file.js.map +1 -1
  31. package/index.cjs +2 -2
  32. package/index.cjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.js +1 -1
  35. package/index.js.map +1 -1
  36. package/instance/instance.cjs +26 -21
  37. package/instance/instance.cjs.map +1 -1
  38. package/instance/instance.d.ts +23 -11
  39. package/instance/instance.js +23 -18
  40. package/instance/instance.js.map +1 -1
  41. package/job/job.cjs +11 -11
  42. package/job/job.cjs.map +1 -1
  43. package/job/job.d.ts +11 -6
  44. package/job/job.js +8 -8
  45. package/job/job.js.map +1 -1
  46. package/metadata/metadata.cjs +34 -28
  47. package/metadata/metadata.cjs.map +1 -1
  48. package/metadata/metadata.d.ts +27 -16
  49. package/metadata/metadata.js +30 -24
  50. package/metadata/metadata.js.map +1 -1
  51. package/package.json +14 -14
  52. package/project/project.cjs +56 -41
  53. package/project/project.cjs.map +1 -1
  54. package/project/project.d.ts +49 -27
  55. package/project/project.js +52 -37
  56. package/project/project.js.map +1 -1
  57. package/src/accounting/accounting.ts +11 -1
  58. package/src/admin/admin.ts +94 -37
  59. package/src/application/application.ts +19 -9
  60. package/src/data-manager-api.schemas.ts +6 -3
  61. package/src/dataset/dataset.ts +130 -65
  62. package/src/file/file.ts +47 -16
  63. package/src/instance/instance.ts +57 -24
  64. package/src/job/job.ts +14 -8
  65. package/src/metadata/metadata.ts +66 -38
  66. package/src/project/project.ts +121 -55
  67. package/src/task/task.ts +28 -16
  68. package/src/type/type.ts +6 -1
  69. package/src/user/user.ts +26 -2
  70. package/task/task.cjs +16 -16
  71. package/task/task.cjs.map +1 -1
  72. package/task/task.d.ts +15 -8
  73. package/task/task.js +13 -13
  74. package/task/task.js.map +1 -1
  75. package/type/type.cjs +3 -3
  76. package/type/type.cjs.map +1 -1
  77. package/type/type.d.ts +6 -3
  78. package/type/type.js +1 -1
  79. package/type/type.js.map +1 -1
  80. package/user/user.cjs +13 -8
  81. package/user/user.cjs.map +1 -1
  82. package/user/user.d.ts +12 -2
  83. package/user/user.js +7 -2
  84. package/user/user.js.map +1 -1
  85. package/chunk-3DXYUDZH.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.6.0 🍺
2
+ * Generated by orval v6.7.1 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -62,6 +62,11 @@ export const getProjects = (
62
62
 
63
63
  export const getGetProjectsQueryKey = () => [`/project`];
64
64
 
65
+ export type GetProjectsQueryResult = NonNullable<
66
+ AsyncReturnType<typeof getProjects>
67
+ >;
68
+ export type GetProjectsQueryError = ErrorType<void | DmError>;
69
+
65
70
  export const useGetProjects = <
66
71
  TData = AsyncReturnType<typeof getProjects>,
67
72
  TError = ErrorType<void | DmError>
@@ -113,11 +118,22 @@ export const createProject = (
113
118
  formData.append("tier_product_id", projectPostBodyBody.tier_product_id);
114
119
 
115
120
  return customInstance<ProjectPostResponse>(
116
- { url: `/project`, method: "post", data: formData },
121
+ {
122
+ url: `/project`,
123
+ method: "post",
124
+ headers: { "Content-Type": "multipart/form-data" },
125
+ data: formData,
126
+ },
117
127
  options
118
128
  );
119
129
  };
120
130
 
131
+ export type CreateProjectMutationResult = NonNullable<
132
+ AsyncReturnType<typeof createProject>
133
+ >;
134
+ export type CreateProjectMutationBody = ProjectPostBodyBody;
135
+ export type CreateProjectMutationError = ErrorType<DmError | void>;
136
+
121
137
  export const useCreateProject = <
122
138
  TError = ErrorType<DmError | void>,
123
139
  TContext = unknown
@@ -154,24 +170,29 @@ export const useCreateProject = <
154
170
  * @summary Get a project
155
171
  */
156
172
  export const getProject = (
157
- projectid: string,
173
+ projectId: string,
158
174
  options?: SecondParameter<typeof customInstance>
159
175
  ) => {
160
176
  return customInstance<ProjectGetResponse>(
161
- { url: `/project/${projectid}`, method: "get" },
177
+ { url: `/project/${projectId}`, method: "get" },
162
178
  options
163
179
  );
164
180
  };
165
181
 
166
- export const getGetProjectQueryKey = (projectid: string) => [
167
- `/project/${projectid}`,
182
+ export const getGetProjectQueryKey = (projectId: string) => [
183
+ `/project/${projectId}`,
168
184
  ];
169
185
 
186
+ export type GetProjectQueryResult = NonNullable<
187
+ AsyncReturnType<typeof getProject>
188
+ >;
189
+ export type GetProjectQueryError = ErrorType<void | DmError>;
190
+
170
191
  export const useGetProject = <
171
192
  TData = AsyncReturnType<typeof getProject>,
172
193
  TError = ErrorType<void | DmError>
173
194
  >(
174
- projectid: string,
195
+ projectId: string,
175
196
  options?: {
176
197
  query?: UseQueryOptions<AsyncReturnType<typeof getProject>, TError, TData>;
177
198
  request?: SecondParameter<typeof customInstance>;
@@ -179,15 +200,15 @@ export const useGetProject = <
179
200
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
180
201
  const { query: queryOptions, request: requestOptions } = options || {};
181
202
 
182
- const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectid);
203
+ const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);
183
204
 
184
205
  const queryFn: QueryFunction<AsyncReturnType<typeof getProject>> = () =>
185
- getProject(projectid, requestOptions);
206
+ getProject(projectId, requestOptions);
186
207
 
187
208
  const query = useQuery<AsyncReturnType<typeof getProject>, TError, TData>(
188
209
  queryKey,
189
210
  queryFn,
190
- { enabled: !!projectid, ...queryOptions }
211
+ { enabled: !!projectId, ...queryOptions }
191
212
  );
192
213
 
193
214
  return {
@@ -202,7 +223,7 @@ export const useGetProject = <
202
223
  * @summary Adjust an existing project
203
224
  */
204
225
  export const patchProject = (
205
- projectid: string,
226
+ projectId: string,
206
227
  projectPatchBodyBody: ProjectPatchBodyBody,
207
228
  options?: SecondParameter<typeof customInstance>
208
229
  ) => {
@@ -215,11 +236,22 @@ export const patchProject = (
215
236
  }
216
237
 
217
238
  return customInstance<void>(
218
- { url: `/project/${projectid}`, method: "patch", data: formData },
239
+ {
240
+ url: `/project/${projectId}`,
241
+ method: "patch",
242
+ headers: { "Content-Type": "multipart/form-data" },
243
+ data: formData,
244
+ },
219
245
  options
220
246
  );
221
247
  };
222
248
 
249
+ export type PatchProjectMutationResult = NonNullable<
250
+ AsyncReturnType<typeof patchProject>
251
+ >;
252
+ export type PatchProjectMutationBody = ProjectPatchBodyBody;
253
+ export type PatchProjectMutationError = ErrorType<DmError>;
254
+
223
255
  export const usePatchProject = <
224
256
  TError = ErrorType<DmError>,
225
257
  TContext = unknown
@@ -227,7 +259,7 @@ export const usePatchProject = <
227
259
  mutation?: UseMutationOptions<
228
260
  AsyncReturnType<typeof patchProject>,
229
261
  TError,
230
- { projectid: string; data: ProjectPatchBodyBody },
262
+ { projectId: string; data: ProjectPatchBodyBody },
231
263
  TContext
232
264
  >;
233
265
  request?: SecondParameter<typeof customInstance>;
@@ -236,17 +268,17 @@ export const usePatchProject = <
236
268
 
237
269
  const mutationFn: MutationFunction<
238
270
  AsyncReturnType<typeof patchProject>,
239
- { projectid: string; data: ProjectPatchBodyBody }
271
+ { projectId: string; data: ProjectPatchBodyBody }
240
272
  > = (props) => {
241
- const { projectid, data } = props || {};
273
+ const { projectId, data } = props || {};
242
274
 
243
- return patchProject(projectid, data, requestOptions);
275
+ return patchProject(projectId, data, requestOptions);
244
276
  };
245
277
 
246
278
  return useMutation<
247
279
  AsyncReturnType<typeof patchProject>,
248
280
  TError,
249
- { projectid: string; data: ProjectPatchBodyBody },
281
+ { projectId: string; data: ProjectPatchBodyBody },
250
282
  TContext
251
283
  >(mutationFn, mutationOptions);
252
284
  };
@@ -260,15 +292,21 @@ Once deleted all **Files**, working directories and material in the project will
260
292
  * @summary Delete a project
261
293
  */
262
294
  export const deleteProject = (
263
- projectid: string,
295
+ projectId: string,
264
296
  options?: SecondParameter<typeof customInstance>
265
297
  ) => {
266
298
  return customInstance<ProjectDeleteResponse>(
267
- { url: `/project/${projectid}`, method: "delete" },
299
+ { url: `/project/${projectId}`, method: "delete" },
268
300
  options
269
301
  );
270
302
  };
271
303
 
304
+ export type DeleteProjectMutationResult = NonNullable<
305
+ AsyncReturnType<typeof deleteProject>
306
+ >;
307
+
308
+ export type DeleteProjectMutationError = ErrorType<void | DmError>;
309
+
272
310
  export const useDeleteProject = <
273
311
  TError = ErrorType<void | DmError>,
274
312
  TContext = unknown
@@ -276,7 +314,7 @@ export const useDeleteProject = <
276
314
  mutation?: UseMutationOptions<
277
315
  AsyncReturnType<typeof deleteProject>,
278
316
  TError,
279
- { projectid: string },
317
+ { projectId: string },
280
318
  TContext
281
319
  >;
282
320
  request?: SecondParameter<typeof customInstance>;
@@ -285,17 +323,17 @@ export const useDeleteProject = <
285
323
 
286
324
  const mutationFn: MutationFunction<
287
325
  AsyncReturnType<typeof deleteProject>,
288
- { projectid: string }
326
+ { projectId: string }
289
327
  > = (props) => {
290
- const { projectid } = props || {};
328
+ const { projectId } = props || {};
291
329
 
292
- return deleteProject(projectid, requestOptions);
330
+ return deleteProject(projectId, requestOptions);
293
331
  };
294
332
 
295
333
  return useMutation<
296
334
  AsyncReturnType<typeof deleteProject>,
297
335
  TError,
298
- { projectid: string },
336
+ { projectId: string },
299
337
  TContext
300
338
  >(mutationFn, mutationOptions);
301
339
  };
@@ -309,16 +347,22 @@ You must be an `editor` or the `owner` of the project
309
347
  * @summary Add a project editor
310
348
  */
311
349
  export const addEditorToProject = (
312
- projectid: string,
313
- userid: string,
350
+ projectId: string,
351
+ userId: string,
314
352
  options?: SecondParameter<typeof customInstance>
315
353
  ) => {
316
354
  return customInstance<void>(
317
- { url: `/project/${projectid}/editor/${userid}`, method: "put" },
355
+ { url: `/project/${projectId}/editor/${userId}`, method: "put" },
318
356
  options
319
357
  );
320
358
  };
321
359
 
360
+ export type AddEditorToProjectMutationResult = NonNullable<
361
+ AsyncReturnType<typeof addEditorToProject>
362
+ >;
363
+
364
+ export type AddEditorToProjectMutationError = ErrorType<DmError>;
365
+
322
366
  export const useAddEditorToProject = <
323
367
  TError = ErrorType<DmError>,
324
368
  TContext = unknown
@@ -326,7 +370,7 @@ export const useAddEditorToProject = <
326
370
  mutation?: UseMutationOptions<
327
371
  AsyncReturnType<typeof addEditorToProject>,
328
372
  TError,
329
- { projectid: string; userid: string },
373
+ { projectId: string; userId: string },
330
374
  TContext
331
375
  >;
332
376
  request?: SecondParameter<typeof customInstance>;
@@ -335,17 +379,17 @@ export const useAddEditorToProject = <
335
379
 
336
380
  const mutationFn: MutationFunction<
337
381
  AsyncReturnType<typeof addEditorToProject>,
338
- { projectid: string; userid: string }
382
+ { projectId: string; userId: string }
339
383
  > = (props) => {
340
- const { projectid, userid } = props || {};
384
+ const { projectId, userId } = props || {};
341
385
 
342
- return addEditorToProject(projectid, userid, requestOptions);
386
+ return addEditorToProject(projectId, userId, requestOptions);
343
387
  };
344
388
 
345
389
  return useMutation<
346
390
  AsyncReturnType<typeof addEditorToProject>,
347
391
  TError,
348
- { projectid: string; userid: string },
392
+ { projectId: string; userId: string },
349
393
  TContext
350
394
  >(mutationFn, mutationOptions);
351
395
  };
@@ -359,16 +403,22 @@ You must be an `editor` or the `owner` of the project
359
403
  * @summary Delete a project editor
360
404
  */
361
405
  export const removeEditorFromProject = (
362
- projectid: string,
363
- userid: string,
406
+ projectId: string,
407
+ userId: string,
364
408
  options?: SecondParameter<typeof customInstance>
365
409
  ) => {
366
410
  return customInstance<void>(
367
- { url: `/project/${projectid}/editor/${userid}`, method: "delete" },
411
+ { url: `/project/${projectId}/editor/${userId}`, method: "delete" },
368
412
  options
369
413
  );
370
414
  };
371
415
 
416
+ export type RemoveEditorFromProjectMutationResult = NonNullable<
417
+ AsyncReturnType<typeof removeEditorFromProject>
418
+ >;
419
+
420
+ export type RemoveEditorFromProjectMutationError = ErrorType<DmError>;
421
+
372
422
  export const useRemoveEditorFromProject = <
373
423
  TError = ErrorType<DmError>,
374
424
  TContext = unknown
@@ -376,7 +426,7 @@ export const useRemoveEditorFromProject = <
376
426
  mutation?: UseMutationOptions<
377
427
  AsyncReturnType<typeof removeEditorFromProject>,
378
428
  TError,
379
- { projectid: string; userid: string },
429
+ { projectId: string; userId: string },
380
430
  TContext
381
431
  >;
382
432
  request?: SecondParameter<typeof customInstance>;
@@ -385,17 +435,17 @@ export const useRemoveEditorFromProject = <
385
435
 
386
436
  const mutationFn: MutationFunction<
387
437
  AsyncReturnType<typeof removeEditorFromProject>,
388
- { projectid: string; userid: string }
438
+ { projectId: string; userId: string }
389
439
  > = (props) => {
390
- const { projectid, userid } = props || {};
440
+ const { projectId, userId } = props || {};
391
441
 
392
- return removeEditorFromProject(projectid, userid, requestOptions);
442
+ return removeEditorFromProject(projectId, userId, requestOptions);
393
443
  };
394
444
 
395
445
  return useMutation<
396
446
  AsyncReturnType<typeof removeEditorFromProject>,
397
447
  TError,
398
- { projectid: string; userid: string },
448
+ { projectId: string; userId: string },
399
449
  TContext
400
450
  >(mutationFn, mutationOptions);
401
451
  };
@@ -409,26 +459,31 @@ You must be an `editor` or the `owner` of the project if the project is private
409
459
  * @summary Download a project file
410
460
  */
411
461
  export const getProjectFile = (
412
- projectid: string,
462
+ projectId: string,
413
463
  params?: GetProjectFileParams,
414
464
  options?: SecondParameter<typeof customInstance>
415
465
  ) => {
416
466
  return customInstance<void>(
417
- { url: `/project/${projectid}/file`, method: "get", params },
467
+ { url: `/project/${projectId}/file`, method: "get", params },
418
468
  options
419
469
  );
420
470
  };
421
471
 
422
472
  export const getGetProjectFileQueryKey = (
423
- projectid: string,
473
+ projectId: string,
424
474
  params?: GetProjectFileParams
425
- ) => [`/project/${projectid}/file`, ...(params ? [params] : [])];
475
+ ) => [`/project/${projectId}/file`, ...(params ? [params] : [])];
476
+
477
+ export type GetProjectFileQueryResult = NonNullable<
478
+ AsyncReturnType<typeof getProjectFile>
479
+ >;
480
+ export type GetProjectFileQueryError = ErrorType<DmError>;
426
481
 
427
482
  export const useGetProjectFile = <
428
483
  TData = AsyncReturnType<typeof getProjectFile>,
429
484
  TError = ErrorType<DmError>
430
485
  >(
431
- projectid: string,
486
+ projectId: string,
432
487
  params?: GetProjectFileParams,
433
488
  options?: {
434
489
  query?: UseQueryOptions<
@@ -442,15 +497,15 @@ export const useGetProjectFile = <
442
497
  const { query: queryOptions, request: requestOptions } = options || {};
443
498
 
444
499
  const queryKey =
445
- queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectid, params);
500
+ queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
446
501
 
447
502
  const queryFn: QueryFunction<AsyncReturnType<typeof getProjectFile>> = () =>
448
- getProjectFile(projectid, params, requestOptions);
503
+ getProjectFile(projectId, params, requestOptions);
449
504
 
450
505
  const query = useQuery<AsyncReturnType<typeof getProjectFile>, TError, TData>(
451
506
  queryKey,
452
507
  queryFn,
453
- { enabled: !!projectid, ...queryOptions }
508
+ { enabled: !!projectId, ...queryOptions }
454
509
  );
455
510
 
456
511
  return {
@@ -467,7 +522,7 @@ You must be an `editor` or the `owner` of the project
467
522
  * @summary Upload a file into a Project
468
523
  */
469
524
  export const addFileToProject = (
470
- projectid: string,
525
+ projectId: string,
471
526
  projectFilePutBodyBody: ProjectFilePutBodyBody,
472
527
  options?: SecondParameter<typeof customInstance>
473
528
  ) => {
@@ -481,11 +536,22 @@ export const addFileToProject = (
481
536
  }
482
537
 
483
538
  return customInstance<void>(
484
- { url: `/project/${projectid}/file`, method: "put", data: formData },
539
+ {
540
+ url: `/project/${projectId}/file`,
541
+ method: "put",
542
+ headers: { "Content-Type": "multipart/form-data" },
543
+ data: formData,
544
+ },
485
545
  options
486
546
  );
487
547
  };
488
548
 
549
+ export type AddFileToProjectMutationResult = NonNullable<
550
+ AsyncReturnType<typeof addFileToProject>
551
+ >;
552
+ export type AddFileToProjectMutationBody = ProjectFilePutBodyBody;
553
+ export type AddFileToProjectMutationError = ErrorType<DmError>;
554
+
489
555
  export const useAddFileToProject = <
490
556
  TError = ErrorType<DmError>,
491
557
  TContext = unknown
@@ -493,7 +559,7 @@ export const useAddFileToProject = <
493
559
  mutation?: UseMutationOptions<
494
560
  AsyncReturnType<typeof addFileToProject>,
495
561
  TError,
496
- { projectid: string; data: ProjectFilePutBodyBody },
562
+ { projectId: string; data: ProjectFilePutBodyBody },
497
563
  TContext
498
564
  >;
499
565
  request?: SecondParameter<typeof customInstance>;
@@ -502,17 +568,17 @@ export const useAddFileToProject = <
502
568
 
503
569
  const mutationFn: MutationFunction<
504
570
  AsyncReturnType<typeof addFileToProject>,
505
- { projectid: string; data: ProjectFilePutBodyBody }
571
+ { projectId: string; data: ProjectFilePutBodyBody }
506
572
  > = (props) => {
507
- const { projectid, data } = props || {};
573
+ const { projectId, data } = props || {};
508
574
 
509
- return addFileToProject(projectid, data, requestOptions);
575
+ return addFileToProject(projectId, data, requestOptions);
510
576
  };
511
577
 
512
578
  return useMutation<
513
579
  AsyncReturnType<typeof addFileToProject>,
514
580
  TError,
515
- { projectid: string; data: ProjectFilePutBodyBody },
581
+ { projectId: string; data: ProjectFilePutBodyBody },
516
582
  TContext
517
583
  >(mutationFn, mutationOptions);
518
584
  };
package/src/task/task.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.6.0 🍺
2
+ * Generated by orval v6.7.1 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -62,6 +62,9 @@ export const getGetTasksQueryKey = (params?: GetTasksParams) => [
62
62
  ...(params ? [params] : []),
63
63
  ];
64
64
 
65
+ export type GetTasksQueryResult = NonNullable<AsyncReturnType<typeof getTasks>>;
66
+ export type GetTasksQueryError = ErrorType<void | DmError>;
67
+
65
68
  export const useGetTasks = <
66
69
  TData = AsyncReturnType<typeof getTasks>,
67
70
  TError = ErrorType<void | DmError>
@@ -113,26 +116,29 @@ For Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you
113
116
  * @summary Returns task information
114
117
  */
115
118
  export const getTask = (
116
- taskid: string,
119
+ taskId: string,
117
120
  params?: GetTaskParams,
118
121
  options?: SecondParameter<typeof customInstance>
119
122
  ) => {
120
123
  return customInstance<TaskGetResponse>(
121
- { url: `/task/${taskid}`, method: "get", params },
124
+ { url: `/task/${taskId}`, method: "get", params },
122
125
  options
123
126
  );
124
127
  };
125
128
 
126
- export const getGetTaskQueryKey = (taskid: string, params?: GetTaskParams) => [
127
- `/task/${taskid}`,
129
+ export const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [
130
+ `/task/${taskId}`,
128
131
  ...(params ? [params] : []),
129
132
  ];
130
133
 
134
+ export type GetTaskQueryResult = NonNullable<AsyncReturnType<typeof getTask>>;
135
+ export type GetTaskQueryError = ErrorType<void | DmError>;
136
+
131
137
  export const useGetTask = <
132
138
  TData = AsyncReturnType<typeof getTask>,
133
139
  TError = ErrorType<void | DmError>
134
140
  >(
135
- taskid: string,
141
+ taskId: string,
136
142
  params?: GetTaskParams,
137
143
  options?: {
138
144
  query?: UseQueryOptions<AsyncReturnType<typeof getTask>, TError, TData>;
@@ -141,15 +147,15 @@ export const useGetTask = <
141
147
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
142
148
  const { query: queryOptions, request: requestOptions } = options || {};
143
149
 
144
- const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskid, params);
150
+ const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);
145
151
 
146
152
  const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>
147
- getTask(taskid, params, requestOptions);
153
+ getTask(taskId, params, requestOptions);
148
154
 
149
155
  const query = useQuery<AsyncReturnType<typeof getTask>, TError, TData>(
150
156
  queryKey,
151
157
  queryFn,
152
- { enabled: !!taskid, ...queryOptions }
158
+ { enabled: !!taskId, ...queryOptions }
153
159
  );
154
160
 
155
161
  return {
@@ -168,15 +174,21 @@ You must be an **owner** of the Task action to delete it. For example you must b
168
174
  * @summary Delete a Task entry
169
175
  */
170
176
  export const deleteTask = (
171
- taskid: string,
177
+ taskId: string,
172
178
  options?: SecondParameter<typeof customInstance>
173
179
  ) => {
174
180
  return customInstance<void>(
175
- { url: `/task/${taskid}`, method: "delete" },
181
+ { url: `/task/${taskId}`, method: "delete" },
176
182
  options
177
183
  );
178
184
  };
179
185
 
186
+ export type DeleteTaskMutationResult = NonNullable<
187
+ AsyncReturnType<typeof deleteTask>
188
+ >;
189
+
190
+ export type DeleteTaskMutationError = ErrorType<DmError>;
191
+
180
192
  export const useDeleteTask = <
181
193
  TError = ErrorType<DmError>,
182
194
  TContext = unknown
@@ -184,7 +196,7 @@ export const useDeleteTask = <
184
196
  mutation?: UseMutationOptions<
185
197
  AsyncReturnType<typeof deleteTask>,
186
198
  TError,
187
- { taskid: string },
199
+ { taskId: string },
188
200
  TContext
189
201
  >;
190
202
  request?: SecondParameter<typeof customInstance>;
@@ -193,17 +205,17 @@ export const useDeleteTask = <
193
205
 
194
206
  const mutationFn: MutationFunction<
195
207
  AsyncReturnType<typeof deleteTask>,
196
- { taskid: string }
208
+ { taskId: string }
197
209
  > = (props) => {
198
- const { taskid } = props || {};
210
+ const { taskId } = props || {};
199
211
 
200
- return deleteTask(taskid, requestOptions);
212
+ return deleteTask(taskId, requestOptions);
201
213
  };
202
214
 
203
215
  return useMutation<
204
216
  AsyncReturnType<typeof deleteTask>,
205
217
  TError,
206
- { taskid: string },
218
+ { taskId: string },
207
219
  TContext
208
220
  >(mutationFn, mutationOptions);
209
221
  };
package/src/type/type.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.6.0 🍺
2
+ * Generated by orval v6.7.1 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -49,6 +49,11 @@ export const getFileTypes = (
49
49
 
50
50
  export const getGetFileTypesQueryKey = () => [`/type`];
51
51
 
52
+ export type GetFileTypesQueryResult = NonNullable<
53
+ AsyncReturnType<typeof getFileTypes>
54
+ >;
55
+ export type GetFileTypesQueryError = ErrorType<void | DmError>;
56
+
52
57
  export const useGetFileTypes = <
53
58
  TData = AsyncReturnType<typeof getFileTypes>,
54
59
  TError = ErrorType<void | DmError>
package/src/user/user.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.6.0 🍺
2
+ * Generated by orval v6.7.1 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -58,6 +58,9 @@ export const getUsers = (options?: SecondParameter<typeof customInstance>) => {
58
58
 
59
59
  export const getGetUsersQueryKey = () => [`/user`];
60
60
 
61
+ export type GetUsersQueryResult = NonNullable<AsyncReturnType<typeof getUsers>>;
62
+ export type GetUsersQueryError = ErrorType<void | DmError>;
63
+
61
64
  export const useGetUsers = <
62
65
  TData = AsyncReturnType<typeof getUsers>,
63
66
  TError = ErrorType<void | DmError>
@@ -104,6 +107,11 @@ export const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [
104
107
  ...(params ? [params] : []),
105
108
  ];
106
109
 
110
+ export type GetUserAccountQueryResult = NonNullable<
111
+ AsyncReturnType<typeof getUserAccount>
112
+ >;
113
+ export type GetUserAccountQueryError = ErrorType<void | DmError>;
114
+
107
115
  export const useGetUserAccount = <
108
116
  TData = AsyncReturnType<typeof getUserAccount>,
109
117
  TError = ErrorType<void | DmError>
@@ -167,11 +175,22 @@ export const patchUserAccount = (
167
175
  }
168
176
 
169
177
  return customInstance<void>(
170
- { url: `/user/account`, method: "patch", data: formData },
178
+ {
179
+ url: `/user/account`,
180
+ method: "patch",
181
+ headers: { "Content-Type": "multipart/form-data" },
182
+ data: formData,
183
+ },
171
184
  options
172
185
  );
173
186
  };
174
187
 
188
+ export type PatchUserAccountMutationResult = NonNullable<
189
+ AsyncReturnType<typeof patchUserAccount>
190
+ >;
191
+ export type PatchUserAccountMutationBody = UserAccountPatchBodyBody;
192
+ export type PatchUserAccountMutationError = ErrorType<DmError>;
193
+
175
194
  export const usePatchUserAccount = <
176
195
  TError = ErrorType<DmError>,
177
196
  TContext = unknown
@@ -222,6 +241,11 @@ export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [
222
241
  ...(params ? [params] : []),
223
242
  ];
224
243
 
244
+ export type GetUserApiLogQueryResult = NonNullable<
245
+ AsyncReturnType<typeof getUserApiLog>
246
+ >;
247
+ export type GetUserApiLogQueryError = ErrorType<void>;
248
+
225
249
  export const useGetUserApiLog = <
226
250
  TData = AsyncReturnType<typeof getUserApiLog>,
227
251
  TError = ErrorType<void>