@squonk/data-manager-client 1.2.8 → 2.0.0-alpha.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 (122) hide show
  1. package/README.md +1 -1
  2. package/accounting/accounting.cjs +51 -8
  3. package/accounting/accounting.cjs.map +1 -1
  4. package/accounting/accounting.d.cts +61 -10
  5. package/accounting/accounting.d.ts +61 -10
  6. package/accounting/accounting.js +49 -6
  7. package/accounting/accounting.js.map +1 -1
  8. package/admin/admin.cjs +67 -24
  9. package/admin/admin.cjs.map +1 -1
  10. package/admin/admin.d.cts +75 -24
  11. package/admin/admin.d.ts +75 -24
  12. package/admin/admin.js +56 -13
  13. package/admin/admin.js.map +1 -1
  14. package/application/application.cjs +35 -6
  15. package/application/application.cjs.map +1 -1
  16. package/application/application.d.cts +42 -8
  17. package/application/application.d.ts +42 -8
  18. package/application/application.js +34 -5
  19. package/application/application.js.map +1 -1
  20. package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
  21. package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
  22. package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
  23. package/chunk-TKLTUR4R.cjs.map +1 -0
  24. package/configuration/configuration.cjs +19 -4
  25. package/configuration/configuration.cjs.map +1 -1
  26. package/configuration/configuration.d.cts +23 -6
  27. package/configuration/configuration.d.ts +23 -6
  28. package/configuration/configuration.js +19 -4
  29. package/configuration/configuration.js.map +1 -1
  30. package/dataset/dataset.cjs +93 -22
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +105 -20
  33. package/dataset/dataset.d.ts +105 -20
  34. package/dataset/dataset.js +83 -12
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +71 -14
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +83 -15
  39. package/exchange-rate/exchange-rate.d.ts +83 -15
  40. package/exchange-rate/exchange-rate.js +65 -8
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file-and-path/file-and-path.cjs +45 -16
  43. package/file-and-path/file-and-path.cjs.map +1 -1
  44. package/file-and-path/file-and-path.d.cts +53 -19
  45. package/file-and-path/file-and-path.d.ts +53 -19
  46. package/file-and-path/file-and-path.js +39 -10
  47. package/file-and-path/file-and-path.js.map +1 -1
  48. package/index.cjs +2 -2
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2102 -2
  51. package/index.d.ts +2102 -2
  52. package/index.js +1 -1
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +45 -16
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +48 -14
  57. package/instance/instance.d.ts +48 -14
  58. package/instance/instance.js +38 -9
  59. package/instance/instance.js.map +1 -1
  60. package/inventory/inventory.cjs +56 -0
  61. package/inventory/inventory.cjs.map +1 -0
  62. package/inventory/inventory.d.cts +50 -0
  63. package/inventory/inventory.d.ts +50 -0
  64. package/inventory/inventory.js +56 -0
  65. package/inventory/inventory.js.map +1 -0
  66. package/inventory/package.json +7 -0
  67. package/job/job.cjs +51 -8
  68. package/job/job.cjs.map +1 -1
  69. package/job/job.d.cts +61 -10
  70. package/job/job.d.ts +61 -10
  71. package/job/job.js +49 -6
  72. package/job/job.js.map +1 -1
  73. package/metadata/metadata.cjs +39 -10
  74. package/metadata/metadata.cjs.map +1 -1
  75. package/metadata/metadata.d.cts +45 -11
  76. package/metadata/metadata.d.ts +45 -11
  77. package/metadata/metadata.js +36 -7
  78. package/metadata/metadata.js.map +1 -1
  79. package/package.json +11 -11
  80. package/project/project.cjs +131 -26
  81. package/project/project.cjs.map +1 -1
  82. package/project/project.d.cts +166 -30
  83. package/project/project.d.ts +166 -30
  84. package/project/project.js +119 -14
  85. package/project/project.js.map +1 -1
  86. package/src/accounting/accounting.ts +137 -23
  87. package/src/admin/admin.ts +149 -51
  88. package/src/application/application.ts +94 -19
  89. package/src/configuration/configuration.ts +51 -15
  90. package/src/custom-instance.ts +3 -4
  91. package/src/data-manager-api.schemas.ts +115 -13
  92. package/src/dataset/dataset.ts +234 -46
  93. package/src/exchange-rate/exchange-rate.ts +186 -33
  94. package/src/file-and-path/file-and-path.ts +104 -39
  95. package/src/instance/instance.ts +99 -34
  96. package/src/inventory/inventory.ts +140 -0
  97. package/src/job/job.ts +139 -23
  98. package/src/metadata/metadata.ts +98 -25
  99. package/src/project/project.ts +313 -60
  100. package/src/task/task.ts +97 -22
  101. package/src/type/type.ts +51 -15
  102. package/src/user/user.ts +138 -26
  103. package/task/task.cjs +37 -8
  104. package/task/task.cjs.map +1 -1
  105. package/task/task.d.cts +44 -10
  106. package/task/task.d.ts +44 -10
  107. package/task/task.js +35 -6
  108. package/task/task.js.map +1 -1
  109. package/type/type.cjs +19 -4
  110. package/type/type.cjs.map +1 -1
  111. package/type/type.d.cts +23 -6
  112. package/type/type.d.ts +23 -6
  113. package/type/type.js +19 -4
  114. package/type/type.js.map +1 -1
  115. package/user/user.cjs +53 -10
  116. package/user/user.cjs.map +1 -1
  117. package/user/user.d.cts +63 -12
  118. package/user/user.d.ts +63 -12
  119. package/user/user.js +49 -6
  120. package/user/user.js.map +1 -1
  121. package/chunk-J22A7LHX.cjs.map +0 -1
  122. package/custom-instance-37ed2460.d.ts +0 -2014
@@ -1,16 +1,17 @@
1
1
  /**
2
- * Generated by orval v6.20.0 🍺
2
+ * Generated by orval v6.25.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 1.2
9
+ * OpenAPI spec version: 2.0
10
10
  */
11
11
  import {
12
12
  useMutation,
13
- useQuery
13
+ useQuery,
14
+ useSuspenseQuery
14
15
  } from '@tanstack/react-query'
15
16
  import type {
16
17
  MutationFunction,
@@ -18,7 +19,9 @@ import type {
18
19
  QueryKey,
19
20
  UseMutationOptions,
20
21
  UseQueryOptions,
21
- UseQueryResult
22
+ UseQueryResult,
23
+ UseSuspenseQueryOptions,
24
+ UseSuspenseQueryResult
22
25
  } from '@tanstack/react-query'
23
26
  import type {
24
27
  DmError,
@@ -37,13 +40,7 @@ import { customInstance } from '.././custom-instance';
37
40
  import type { ErrorType } from '.././custom-instance';
38
41
 
39
42
 
40
- // eslint-disable-next-line
41
- type SecondParameter<T extends (...args: any) => any> = T extends (
42
- config: any,
43
- args: infer P,
44
- ) => any
45
- ? P
46
- : never;
43
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
47
44
 
48
45
 
49
46
  /**
@@ -56,7 +53,7 @@ export const getProjects = (
56
53
 
57
54
 
58
55
  return customInstance<ProjectsGetResponse>(
59
- {url: `/project`, method: 'get',
56
+ {url: `/project`, method: 'GET',
60
57
  params, signal
61
58
  },
62
59
  options);
@@ -64,12 +61,11 @@ export const getProjects = (
64
61
 
65
62
 
66
63
  export const getGetProjectsQueryKey = (params?: GetProjectsParams,) => {
67
-
68
64
  return ["data-manager-api", `/project`, ...(params ? [params]: [])] as const;
69
65
  }
70
66
 
71
67
 
72
- export const getGetProjectsQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
68
+ export const getGetProjectsQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
73
69
  ) => {
74
70
 
75
71
  const {query: queryOptions, request: requestOptions} = options ?? {};
@@ -94,7 +90,7 @@ export type GetProjectsQueryError = ErrorType<void | DmError>
94
90
  * @summary Get all Projects available to you
95
91
  */
96
92
  export const useGetProjects = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(
97
- params?: GetProjectsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
93
+ params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
98
94
 
99
95
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
100
96
 
@@ -109,14 +105,54 @@ export const useGetProjects = <TData = Awaited<ReturnType<typeof getProjects>>,
109
105
 
110
106
 
111
107
 
108
+ export const getGetProjectsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
109
+ ) => {
110
+
111
+ const {query: queryOptions, request: requestOptions} = options ?? {};
112
+
113
+ const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);
114
+
115
+
116
+
117
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);
118
+
119
+
120
+
121
+
122
+
123
+ return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }
124
+ }
125
+
126
+ export type GetProjectsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>
127
+ export type GetProjectsSuspenseQueryError = ErrorType<void | DmError>
128
+
129
+ /**
130
+ * @summary Get all Projects available to you
131
+ */
132
+ export const useGetProjectsSuspense = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(
133
+ params?: GetProjectsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
134
+
135
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
136
+
137
+ const queryOptions = getGetProjectsSuspenseQueryOptions(params,options)
138
+
139
+ const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
140
+
141
+ query.queryKey = queryOptions.queryKey ;
142
+
143
+ return query;
144
+ }
145
+
146
+
147
+
112
148
  /**
113
149
  * Creates a new Project, assigning and returning a unique **ID**. A persistent volume is created in the cluster and assigned to your Project. It's here you can add **Datasets** as **Files** and run **Applications** and **Jobs**.
114
150
 
115
151
  To create a Project when an **Account Server** is configured you will need a **Product**.
116
152
 
117
- As the Project `owner` (creator) you are also automatically an `editor` of the Project and can add other users as **Editors** so that they can also manipulate the project. An **Editor** of a project can also delete it.
153
+ As the Project creator you are also automatically an `administrator` of the Project and can add other users so that they can also see or manipulate data in the Project.
118
154
 
119
- The name you give the Project is free-form text (can contain spaces etc.) but the name you use must be unique amongst all the Projects you create.
155
+ The name you give the Project is free-form text (can contain spaces etc.) but the name you use must be unique amongst all the Projects within the same Organisational Unit.
120
156
 
121
157
  * @summary Create a new Project
122
158
  */
@@ -132,7 +168,7 @@ if(projectPostBodyBody.private !== undefined) {
132
168
  formData.append('tier_product_id', projectPostBodyBody.tier_product_id)
133
169
 
134
170
  return customInstance<ProjectPostResponse>(
135
- {url: `/project`, method: 'post',
171
+ {url: `/project`, method: 'POST',
136
172
  headers: {'Content-Type': 'multipart/form-data', },
137
173
  data: formData
138
174
  },
@@ -142,7 +178,6 @@ formData.append('tier_product_id', projectPostBodyBody.tier_product_id)
142
178
 
143
179
 
144
180
  export const getCreateProjectMutationOptions = <TError = ErrorType<DmError | void>,
145
-
146
181
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
147
182
  ): UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext> => {
148
183
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -169,7 +204,6 @@ export const getCreateProjectMutationOptions = <TError = ErrorType<DmError | voi
169
204
  * @summary Create a new Project
170
205
  */
171
206
  export const useCreateProject = <TError = ErrorType<DmError | void>,
172
-
173
207
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
174
208
  ) => {
175
209
 
@@ -189,19 +223,18 @@ export const getProject = (
189
223
 
190
224
 
191
225
  return customInstance<ProjectDetail>(
192
- {url: `/project/${projectId}`, method: 'get', signal
226
+ {url: `/project/${projectId}`, method: 'GET', signal
193
227
  },
194
228
  options);
195
229
  }
196
230
 
197
231
 
198
232
  export const getGetProjectQueryKey = (projectId: string,) => {
199
-
200
233
  return ["data-manager-api", `/project/${projectId}`] as const;
201
234
  }
202
235
 
203
236
 
204
- export const getGetProjectQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
237
+ export const getGetProjectQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
205
238
  ) => {
206
239
 
207
240
  const {query: queryOptions, request: requestOptions} = options ?? {};
@@ -226,7 +259,7 @@ export type GetProjectQueryError = ErrorType<void | DmError>
226
259
  * @summary Get a Project
227
260
  */
228
261
  export const useGetProject = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(
229
- projectId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
262
+ projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
230
263
 
231
264
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
232
265
 
@@ -241,6 +274,46 @@ export const useGetProject = <TData = Awaited<ReturnType<typeof getProject>>, TE
241
274
 
242
275
 
243
276
 
277
+ export const getGetProjectSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
278
+ ) => {
279
+
280
+ const {query: queryOptions, request: requestOptions} = options ?? {};
281
+
282
+ const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);
283
+
284
+
285
+
286
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);
287
+
288
+
289
+
290
+
291
+
292
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }
293
+ }
294
+
295
+ export type GetProjectSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>
296
+ export type GetProjectSuspenseQueryError = ErrorType<void | DmError>
297
+
298
+ /**
299
+ * @summary Get a Project
300
+ */
301
+ export const useGetProjectSuspense = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(
302
+ projectId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
303
+
304
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
305
+
306
+ const queryOptions = getGetProjectSuspenseQueryOptions(projectId,options)
307
+
308
+ const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
309
+
310
+ query.queryKey = queryOptions.queryKey ;
311
+
312
+ return query;
313
+ }
314
+
315
+
316
+
244
317
  /**
245
318
  * Used to update some adjustable parameters of a Project, i.e. to make it `private` or make it `public``. What can be adjusted will depend on the purchased **Product**
246
319
 
@@ -260,7 +333,7 @@ if(projectPatchBodyBody.name !== undefined) {
260
333
  }
261
334
 
262
335
  return customInstance<void>(
263
- {url: `/project/${projectId}`, method: 'patch',
336
+ {url: `/project/${projectId}`, method: 'PATCH',
264
337
  headers: {'Content-Type': 'multipart/form-data', },
265
338
  data: formData
266
339
  },
@@ -270,7 +343,6 @@ if(projectPatchBodyBody.name !== undefined) {
270
343
 
271
344
 
272
345
  export const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,
273
-
274
346
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
275
347
  ): UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext> => {
276
348
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -297,7 +369,6 @@ export const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,
297
369
  * @summary Adjust an existing Project
298
370
  */
299
371
  export const usePatchProject = <TError = ErrorType<DmError>,
300
-
301
372
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
302
373
  ) => {
303
374
 
@@ -308,7 +379,7 @@ export const usePatchProject = <TError = ErrorType<DmError>,
308
379
  /**
309
380
  * Deletes an existing Project.
310
381
 
311
- You must be an `editor` or the `owner` of the project.
382
+ You must be an `administrator` of the project.
312
383
 
313
384
  Once deleted all **Files**, working directories and material in the Project will also be removed
314
385
 
@@ -320,7 +391,7 @@ export const deleteProject = (
320
391
 
321
392
 
322
393
  return customInstance<TaskIdentity>(
323
- {url: `/project/${projectId}`, method: 'delete'
394
+ {url: `/project/${projectId}`, method: 'DELETE'
324
395
  },
325
396
  options);
326
397
  }
@@ -328,7 +399,6 @@ export const deleteProject = (
328
399
 
329
400
 
330
401
  export const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmError>,
331
-
332
402
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
333
403
  ): UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext> => {
334
404
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -355,7 +425,6 @@ export const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmErro
355
425
  * @summary Delete a Project
356
426
  */
357
427
  export const useDeleteProject = <TError = ErrorType<void | DmError>,
358
-
359
428
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
360
429
  ) => {
361
430
 
@@ -364,11 +433,123 @@ export const useDeleteProject = <TError = ErrorType<void | DmError>,
364
433
  return useMutation(mutationOptions);
365
434
  }
366
435
  /**
436
+ * Adds a user to a Project as an `administrator`. As well as the ability to edit the project administrators can add and remove other users.
437
+
438
+ You must be an `administrator` of the project
439
+
440
+ * @summary Add a Project Administrator
441
+ */
442
+ export const addAdministratorToProject = (
443
+ projectId: string,
444
+ userId: string,
445
+ options?: SecondParameter<typeof customInstance>,) => {
446
+
447
+
448
+ return customInstance<void>(
449
+ {url: `/project/${projectId}/administrator/${userId}`, method: 'PUT'
450
+ },
451
+ options);
452
+ }
453
+
454
+
455
+
456
+ export const getAddAdministratorToProjectMutationOptions = <TError = ErrorType<DmError>,
457
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
458
+ ): UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext> => {
459
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
460
+
461
+
462
+
463
+
464
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addAdministratorToProject>>, {projectId: string;userId: string}> = (props) => {
465
+ const {projectId,userId} = props ?? {};
466
+
467
+ return addAdministratorToProject(projectId,userId,requestOptions)
468
+ }
469
+
470
+
471
+
472
+
473
+ return { mutationFn, ...mutationOptions }}
474
+
475
+ export type AddAdministratorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addAdministratorToProject>>>
476
+
477
+ export type AddAdministratorToProjectMutationError = ErrorType<DmError>
478
+
479
+ /**
480
+ * @summary Add a Project Administrator
481
+ */
482
+ export const useAddAdministratorToProject = <TError = ErrorType<DmError>,
483
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
484
+ ) => {
485
+
486
+ const mutationOptions = getAddAdministratorToProjectMutationOptions(options);
487
+
488
+ return useMutation(mutationOptions);
489
+ }
490
+ /**
491
+ * Deletes a project `administrator`. The administrator can be you.
492
+
493
+ A project must always have one `administrator` so you will not be able to delete the last administrator of a project.
494
+
495
+ You must be an `administrator` of the project
496
+
497
+ * @summary Delete a Project Administrator
498
+ */
499
+ export const removeAdministratorFromProject = (
500
+ projectId: string,
501
+ userId: string,
502
+ options?: SecondParameter<typeof customInstance>,) => {
503
+
504
+
505
+ return customInstance<void>(
506
+ {url: `/project/${projectId}/administrator/${userId}`, method: 'DELETE'
507
+ },
508
+ options);
509
+ }
510
+
511
+
512
+
513
+ export const getRemoveAdministratorFromProjectMutationOptions = <TError = ErrorType<DmError>,
514
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
515
+ ): UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {
516
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
517
+
518
+
519
+
520
+
521
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeAdministratorFromProject>>, {projectId: string;userId: string}> = (props) => {
522
+ const {projectId,userId} = props ?? {};
523
+
524
+ return removeAdministratorFromProject(projectId,userId,requestOptions)
525
+ }
526
+
527
+
528
+
529
+
530
+ return { mutationFn, ...mutationOptions }}
531
+
532
+ export type RemoveAdministratorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeAdministratorFromProject>>>
533
+
534
+ export type RemoveAdministratorFromProjectMutationError = ErrorType<DmError>
535
+
536
+ /**
537
+ * @summary Delete a Project Administrator
538
+ */
539
+ export const useRemoveAdministratorFromProject = <TError = ErrorType<DmError>,
540
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
541
+ ) => {
542
+
543
+ const mutationOptions = getRemoveAdministratorFromProjectMutationOptions(options);
544
+
545
+ return useMutation(mutationOptions);
546
+ }
547
+ /**
367
548
  * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.
368
549
 
369
550
  An `editor` of a project is not automatically an `editor` of any datasets the project contains.
370
551
 
371
- You must be an `editor` or the `owner` of the project
552
+ You must be an `administrator` of the project
372
553
 
373
554
  * @summary Add a Project Editor
374
555
  */
@@ -379,7 +560,7 @@ export const addEditorToProject = (
379
560
 
380
561
 
381
562
  return customInstance<void>(
382
- {url: `/project/${projectId}/editor/${userId}`, method: 'put'
563
+ {url: `/project/${projectId}/editor/${userId}`, method: 'PUT'
383
564
  },
384
565
  options);
385
566
  }
@@ -387,7 +568,6 @@ export const addEditorToProject = (
387
568
 
388
569
 
389
570
  export const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>,
390
-
391
571
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
392
572
  ): UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext> => {
393
573
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -414,7 +594,6 @@ export const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>
414
594
  * @summary Add a Project Editor
415
595
  */
416
596
  export const useAddEditorToProject = <TError = ErrorType<DmError>,
417
-
418
597
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
419
598
  ) => {
420
599
 
@@ -427,7 +606,7 @@ export const useAddEditorToProject = <TError = ErrorType<DmError>,
427
606
 
428
607
  A project must always have one `editor` so you will not be able to delete the last editor of a project.
429
608
 
430
- You must be an `editor` or the `owner` of the project
609
+ You must be an `administrator` of the project
431
610
 
432
611
  * @summary Delete a Project Editor
433
612
  */
@@ -438,7 +617,7 @@ export const removeEditorFromProject = (
438
617
 
439
618
 
440
619
  return customInstance<void>(
441
- {url: `/project/${projectId}/editor/${userId}`, method: 'delete'
620
+ {url: `/project/${projectId}/editor/${userId}`, method: 'DELETE'
442
621
  },
443
622
  options);
444
623
  }
@@ -446,7 +625,6 @@ export const removeEditorFromProject = (
446
625
 
447
626
 
448
627
  export const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmError>,
449
-
450
628
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
451
629
  ): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {
452
630
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -473,7 +651,6 @@ export const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmE
473
651
  * @summary Delete a Project Editor
474
652
  */
475
653
  export const useRemoveEditorFromProject = <TError = ErrorType<DmError>,
476
-
477
654
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
478
655
  ) => {
479
656
 
@@ -484,7 +661,7 @@ export const useRemoveEditorFromProject = <TError = ErrorType<DmError>,
484
661
  /**
485
662
  * Adds a user to a project as an `observer`. Observers can view Projects and download files but they cannot modify Project data or run **Applications** or **Jobs**.
486
663
 
487
- You must be an `editor` or the `owner` of the Project to add Observers
664
+ You must be an `administrator` of the Project to add Observers
488
665
 
489
666
  * @summary Add a Project Observer
490
667
  */
@@ -495,7 +672,7 @@ export const addObserverToProject = (
495
672
 
496
673
 
497
674
  return customInstance<void>(
498
- {url: `/project/${projectId}/observer/${userId}`, method: 'put'
675
+ {url: `/project/${projectId}/observer/${userId}`, method: 'PUT'
499
676
  },
500
677
  options);
501
678
  }
@@ -503,7 +680,6 @@ export const addObserverToProject = (
503
680
 
504
681
 
505
682
  export const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmError>,
506
-
507
683
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
508
684
  ): UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext> => {
509
685
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -530,7 +706,6 @@ export const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmErro
530
706
  * @summary Add a Project Observer
531
707
  */
532
708
  export const useAddObserverToProject = <TError = ErrorType<DmError>,
533
-
534
709
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
535
710
  ) => {
536
711
 
@@ -541,7 +716,7 @@ export const useAddObserverToProject = <TError = ErrorType<DmError>,
541
716
  /**
542
717
  * Deletes a project `observer`.
543
718
 
544
- You must be an `editor` or the `owner` of the Project to remove Observers
719
+ You must be an `administrator` of the Project to remove Observers
545
720
 
546
721
  * @summary Delete a Project Observer
547
722
  */
@@ -552,7 +727,7 @@ export const removeObserverFromProject = (
552
727
 
553
728
 
554
729
  return customInstance<void>(
555
- {url: `/project/${projectId}/observer/${userId}`, method: 'delete'
730
+ {url: `/project/${projectId}/observer/${userId}`, method: 'DELETE'
556
731
  },
557
732
  options);
558
733
  }
@@ -560,7 +735,6 @@ export const removeObserverFromProject = (
560
735
 
561
736
 
562
737
  export const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<DmError>,
563
-
564
738
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
565
739
  ): UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext> => {
566
740
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -587,7 +761,6 @@ export const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<D
587
761
  * @summary Delete a Project Observer
588
762
  */
589
763
  export const useRemoveObserverFromProject = <TError = ErrorType<DmError>,
590
-
591
764
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
592
765
  ) => {
593
766
 
@@ -600,7 +773,7 @@ export const useRemoveObserverFromProject = <TError = ErrorType<DmError>,
600
773
 
601
774
  For **managed** files you should consider using the `/file/{file_id}` endpoint.
602
775
 
603
- You must be an `editor` or the `owner` of the Project if the Project is `private`
776
+ You must be an `editor` of the Project if the Project is `private`
604
777
 
605
778
  * @summary Download a Project file
606
779
  */
@@ -612,7 +785,7 @@ export const getProjectFile = (
612
785
 
613
786
 
614
787
  return customInstance<void>(
615
- {url: `/project/${projectId}/file`, method: 'get',
788
+ {url: `/project/${projectId}/file`, method: 'GET',
616
789
  params, signal
617
790
  },
618
791
  options);
@@ -621,13 +794,12 @@ export const getProjectFile = (
621
794
 
622
795
  export const getGetProjectFileQueryKey = (projectId: string,
623
796
  params: GetProjectFileParams,) => {
624
-
625
797
  return ["data-manager-api", `/project/${projectId}/file`, ...(params ? [params]: [])] as const;
626
798
  }
627
799
 
628
800
 
629
801
  export const getGetProjectFileQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,
630
- params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
802
+ params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
631
803
  ) => {
632
804
 
633
805
  const {query: queryOptions, request: requestOptions} = options ?? {};
@@ -653,7 +825,7 @@ export type GetProjectFileQueryError = ErrorType<DmError>
653
825
  */
654
826
  export const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(
655
827
  projectId: string,
656
- params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
828
+ params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
657
829
 
658
830
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
659
831
 
@@ -668,10 +840,52 @@ export const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFi
668
840
 
669
841
 
670
842
 
843
+ export const getGetProjectFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,
844
+ params: GetProjectFileParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
845
+ ) => {
846
+
847
+ const {query: queryOptions, request: requestOptions} = options ?? {};
848
+
849
+ const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);
850
+
851
+
852
+
853
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);
854
+
855
+
856
+
857
+
858
+
859
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }
860
+ }
861
+
862
+ export type GetProjectFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>
863
+ export type GetProjectFileSuspenseQueryError = ErrorType<DmError>
864
+
865
+ /**
866
+ * @summary Download a Project file
867
+ */
868
+ export const useGetProjectFileSuspense = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(
869
+ projectId: string,
870
+ params: GetProjectFileParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
871
+
872
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
873
+
874
+ const queryOptions = getGetProjectFileSuspenseQueryOptions(projectId,params,options)
875
+
876
+ const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
877
+
878
+ query.queryKey = queryOptions.queryKey ;
879
+
880
+ return query;
881
+ }
882
+
883
+
884
+
671
885
  /**
672
886
  * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.
673
887
 
674
- You must be an `editor` or the `owner` of the project
888
+ You must be an `editor` of the project
675
889
 
676
890
  * @summary Upload a file into a Project
677
891
  */
@@ -690,7 +904,7 @@ if(projectFilePutBodyBody.path !== undefined) {
690
904
  }
691
905
 
692
906
  return customInstance<void>(
693
- {url: `/project/${projectId}/file`, method: 'put',
907
+ {url: `/project/${projectId}/file`, method: 'PUT',
694
908
  headers: {'Content-Type': 'multipart/form-data', },
695
909
  data: formData
696
910
  },
@@ -700,7 +914,6 @@ if(projectFilePutBodyBody.path !== undefined) {
700
914
 
701
915
 
702
916
  export const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,
703
-
704
917
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
705
918
  ): UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext> => {
706
919
  const {mutation: mutationOptions, request: requestOptions} = options ?? {};
@@ -727,7 +940,6 @@ export const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,
727
940
  * @summary Upload a file into a Project
728
941
  */
729
942
  export const useAddFileToProject = <TError = ErrorType<DmError>,
730
-
731
943
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
732
944
  ) => {
733
945
 
@@ -752,7 +964,7 @@ export const getProjectFileWithToken = (
752
964
 
753
965
 
754
966
  return customInstance<void>(
755
- {url: `/project/${projectId}/file-with-token`, method: 'get',
967
+ {url: `/project/${projectId}/file-with-token`, method: 'GET',
756
968
  params, signal
757
969
  },
758
970
  options);
@@ -761,13 +973,12 @@ export const getProjectFileWithToken = (
761
973
 
762
974
  export const getGetProjectFileWithTokenQueryKey = (projectId: string,
763
975
  params: GetProjectFileWithTokenParams,) => {
764
-
765
976
  return ["data-manager-api", `/project/${projectId}/file-with-token`, ...(params ? [params]: [])] as const;
766
977
  }
767
978
 
768
979
 
769
980
  export const getGetProjectFileWithTokenQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,
770
- params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
981
+ params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
771
982
  ) => {
772
983
 
773
984
  const {query: queryOptions, request: requestOptions} = options ?? {};
@@ -793,7 +1004,7 @@ export type GetProjectFileWithTokenQueryError = ErrorType<DmError>
793
1004
  */
794
1005
  export const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(
795
1006
  projectId: string,
796
- params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
1007
+ params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
797
1008
 
798
1009
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
799
1010
 
@@ -808,3 +1019,45 @@ export const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof get
808
1019
 
809
1020
 
810
1021
 
1022
+ export const getGetProjectFileWithTokenSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,
1023
+ params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
1024
+ ) => {
1025
+
1026
+ const {query: queryOptions, request: requestOptions} = options ?? {};
1027
+
1028
+ const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);
1029
+
1030
+
1031
+
1032
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }
1039
+ }
1040
+
1041
+ export type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>
1042
+ export type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>
1043
+
1044
+ /**
1045
+ * @summary Download a Project file using a Token
1046
+ */
1047
+ export const useGetProjectFileWithTokenSuspense = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(
1048
+ projectId: string,
1049
+ params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
1050
+
1051
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
1052
+
1053
+ const queryOptions = getGetProjectFileWithTokenSuspenseQueryOptions(projectId,params,options)
1054
+
1055
+ const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
1056
+
1057
+ query.queryKey = queryOptions.queryKey ;
1058
+
1059
+ return query;
1060
+ }
1061
+
1062
+
1063
+