@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.
- package/accounting/accounting.cjs +5 -5
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +8 -3
- package/accounting/accounting.js +1 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +35 -25
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +36 -17
- package/admin/admin.js +32 -22
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +12 -12
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +11 -6
- package/application/application.js +9 -9
- package/application/application.js.map +1 -1
- package/{chunk-JR7F532L.js → chunk-6EEIAH4R.js} +1 -1
- package/{chunk-JR7F532L.js.map → chunk-6EEIAH4R.js.map} +1 -1
- package/{chunk-3DXYUDZH.cjs → chunk-NGBTCJWS.cjs} +1 -1
- package/chunk-NGBTCJWS.cjs.map +1 -0
- package/{custom-instance-32850190.d.ts → custom-instance-42e56f26.d.ts} +10 -3
- package/dataset/dataset.cjs +62 -52
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +52 -29
- package/dataset/dataset.js +54 -44
- package/dataset/dataset.js.map +1 -1
- package/file/file.cjs +22 -17
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +20 -8
- package/file/file.js +18 -13
- package/file/file.js.map +1 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +26 -21
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +23 -11
- package/instance/instance.js +23 -18
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +11 -11
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +11 -6
- package/job/job.js +8 -8
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +34 -28
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +27 -16
- package/metadata/metadata.js +30 -24
- package/metadata/metadata.js.map +1 -1
- package/package.json +14 -14
- package/project/project.cjs +56 -41
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +49 -27
- package/project/project.js +52 -37
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +11 -1
- package/src/admin/admin.ts +94 -37
- package/src/application/application.ts +19 -9
- package/src/data-manager-api.schemas.ts +6 -3
- package/src/dataset/dataset.ts +130 -65
- package/src/file/file.ts +47 -16
- package/src/instance/instance.ts +57 -24
- package/src/job/job.ts +14 -8
- package/src/metadata/metadata.ts +66 -38
- package/src/project/project.ts +121 -55
- package/src/task/task.ts +28 -16
- package/src/type/type.ts +6 -1
- package/src/user/user.ts +26 -2
- package/task/task.cjs +16 -16
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +15 -8
- package/task/task.js +13 -13
- package/task/task.js.map +1 -1
- package/type/type.cjs +3 -3
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +6 -3
- package/type/type.js +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs +13 -8
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +12 -2
- package/user/user.js +7 -2
- package/user/user.js.map +1 -1
- package/chunk-3DXYUDZH.cjs.map +0 -1
package/src/project/project.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
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
|
-
{
|
|
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
|
-
|
|
173
|
+
projectId: string,
|
|
158
174
|
options?: SecondParameter<typeof customInstance>
|
|
159
175
|
) => {
|
|
160
176
|
return customInstance<ProjectGetResponse>(
|
|
161
|
-
{ url: `/project/${
|
|
177
|
+
{ url: `/project/${projectId}`, method: "get" },
|
|
162
178
|
options
|
|
163
179
|
);
|
|
164
180
|
};
|
|
165
181
|
|
|
166
|
-
export const getGetProjectQueryKey = (
|
|
167
|
-
`/project/${
|
|
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
|
-
|
|
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(
|
|
203
|
+
const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);
|
|
183
204
|
|
|
184
205
|
const queryFn: QueryFunction<AsyncReturnType<typeof getProject>> = () =>
|
|
185
|
-
getProject(
|
|
206
|
+
getProject(projectId, requestOptions);
|
|
186
207
|
|
|
187
208
|
const query = useQuery<AsyncReturnType<typeof getProject>, TError, TData>(
|
|
188
209
|
queryKey,
|
|
189
210
|
queryFn,
|
|
190
|
-
{ enabled: !!
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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
|
-
{
|
|
271
|
+
{ projectId: string; data: ProjectPatchBodyBody }
|
|
240
272
|
> = (props) => {
|
|
241
|
-
const {
|
|
273
|
+
const { projectId, data } = props || {};
|
|
242
274
|
|
|
243
|
-
return patchProject(
|
|
275
|
+
return patchProject(projectId, data, requestOptions);
|
|
244
276
|
};
|
|
245
277
|
|
|
246
278
|
return useMutation<
|
|
247
279
|
AsyncReturnType<typeof patchProject>,
|
|
248
280
|
TError,
|
|
249
|
-
{
|
|
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
|
-
|
|
295
|
+
projectId: string,
|
|
264
296
|
options?: SecondParameter<typeof customInstance>
|
|
265
297
|
) => {
|
|
266
298
|
return customInstance<ProjectDeleteResponse>(
|
|
267
|
-
{ url: `/project/${
|
|
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
|
-
{
|
|
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
|
-
{
|
|
326
|
+
{ projectId: string }
|
|
289
327
|
> = (props) => {
|
|
290
|
-
const {
|
|
328
|
+
const { projectId } = props || {};
|
|
291
329
|
|
|
292
|
-
return deleteProject(
|
|
330
|
+
return deleteProject(projectId, requestOptions);
|
|
293
331
|
};
|
|
294
332
|
|
|
295
333
|
return useMutation<
|
|
296
334
|
AsyncReturnType<typeof deleteProject>,
|
|
297
335
|
TError,
|
|
298
|
-
{
|
|
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
|
-
|
|
313
|
-
|
|
350
|
+
projectId: string,
|
|
351
|
+
userId: string,
|
|
314
352
|
options?: SecondParameter<typeof customInstance>
|
|
315
353
|
) => {
|
|
316
354
|
return customInstance<void>(
|
|
317
|
-
{ url: `/project/${
|
|
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
|
-
{
|
|
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
|
-
{
|
|
382
|
+
{ projectId: string; userId: string }
|
|
339
383
|
> = (props) => {
|
|
340
|
-
const {
|
|
384
|
+
const { projectId, userId } = props || {};
|
|
341
385
|
|
|
342
|
-
return addEditorToProject(
|
|
386
|
+
return addEditorToProject(projectId, userId, requestOptions);
|
|
343
387
|
};
|
|
344
388
|
|
|
345
389
|
return useMutation<
|
|
346
390
|
AsyncReturnType<typeof addEditorToProject>,
|
|
347
391
|
TError,
|
|
348
|
-
{
|
|
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
|
-
|
|
363
|
-
|
|
406
|
+
projectId: string,
|
|
407
|
+
userId: string,
|
|
364
408
|
options?: SecondParameter<typeof customInstance>
|
|
365
409
|
) => {
|
|
366
410
|
return customInstance<void>(
|
|
367
|
-
{ url: `/project/${
|
|
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
|
-
{
|
|
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
|
-
{
|
|
438
|
+
{ projectId: string; userId: string }
|
|
389
439
|
> = (props) => {
|
|
390
|
-
const {
|
|
440
|
+
const { projectId, userId } = props || {};
|
|
391
441
|
|
|
392
|
-
return removeEditorFromProject(
|
|
442
|
+
return removeEditorFromProject(projectId, userId, requestOptions);
|
|
393
443
|
};
|
|
394
444
|
|
|
395
445
|
return useMutation<
|
|
396
446
|
AsyncReturnType<typeof removeEditorFromProject>,
|
|
397
447
|
TError,
|
|
398
|
-
{
|
|
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
|
-
|
|
462
|
+
projectId: string,
|
|
413
463
|
params?: GetProjectFileParams,
|
|
414
464
|
options?: SecondParameter<typeof customInstance>
|
|
415
465
|
) => {
|
|
416
466
|
return customInstance<void>(
|
|
417
|
-
{ url: `/project/${
|
|
467
|
+
{ url: `/project/${projectId}/file`, method: "get", params },
|
|
418
468
|
options
|
|
419
469
|
);
|
|
420
470
|
};
|
|
421
471
|
|
|
422
472
|
export const getGetProjectFileQueryKey = (
|
|
423
|
-
|
|
473
|
+
projectId: string,
|
|
424
474
|
params?: GetProjectFileParams
|
|
425
|
-
) => [`/project/${
|
|
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
|
-
|
|
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(
|
|
500
|
+
queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
|
|
446
501
|
|
|
447
502
|
const queryFn: QueryFunction<AsyncReturnType<typeof getProjectFile>> = () =>
|
|
448
|
-
getProjectFile(
|
|
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: !!
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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
|
-
{
|
|
571
|
+
{ projectId: string; data: ProjectFilePutBodyBody }
|
|
506
572
|
> = (props) => {
|
|
507
|
-
const {
|
|
573
|
+
const { projectId, data } = props || {};
|
|
508
574
|
|
|
509
|
-
return addFileToProject(
|
|
575
|
+
return addFileToProject(projectId, data, requestOptions);
|
|
510
576
|
};
|
|
511
577
|
|
|
512
578
|
return useMutation<
|
|
513
579
|
AsyncReturnType<typeof addFileToProject>,
|
|
514
580
|
TError,
|
|
515
|
-
{
|
|
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.
|
|
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
|
-
|
|
119
|
+
taskId: string,
|
|
117
120
|
params?: GetTaskParams,
|
|
118
121
|
options?: SecondParameter<typeof customInstance>
|
|
119
122
|
) => {
|
|
120
123
|
return customInstance<TaskGetResponse>(
|
|
121
|
-
{ url: `/task/${
|
|
124
|
+
{ url: `/task/${taskId}`, method: "get", params },
|
|
122
125
|
options
|
|
123
126
|
);
|
|
124
127
|
};
|
|
125
128
|
|
|
126
|
-
export const getGetTaskQueryKey = (
|
|
127
|
-
`/task/${
|
|
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
|
-
|
|
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(
|
|
150
|
+
const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);
|
|
145
151
|
|
|
146
152
|
const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>
|
|
147
|
-
getTask(
|
|
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: !!
|
|
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
|
-
|
|
177
|
+
taskId: string,
|
|
172
178
|
options?: SecondParameter<typeof customInstance>
|
|
173
179
|
) => {
|
|
174
180
|
return customInstance<void>(
|
|
175
|
-
{ url: `/task/${
|
|
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
|
-
{
|
|
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
|
-
{
|
|
208
|
+
{ taskId: string }
|
|
197
209
|
> = (props) => {
|
|
198
|
-
const {
|
|
210
|
+
const { taskId } = props || {};
|
|
199
211
|
|
|
200
|
-
return deleteTask(
|
|
212
|
+
return deleteTask(taskId, requestOptions);
|
|
201
213
|
};
|
|
202
214
|
|
|
203
215
|
return useMutation<
|
|
204
216
|
AsyncReturnType<typeof deleteTask>,
|
|
205
217
|
TError,
|
|
206
|
-
{
|
|
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.
|
|
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.
|
|
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
|
-
{
|
|
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>
|