@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,112 +8,106 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery, useMutation } from "@tanstack/react-query";
11
+ import {
12
+ useMutation,
13
+ useQuery
14
+ } from '@tanstack/react-query'
12
15
  import type {
13
- UseQueryOptions,
14
- UseMutationOptions,
15
- QueryFunction,
16
16
  MutationFunction,
17
- UseQueryResult,
17
+ QueryFunction,
18
18
  QueryKey,
19
- } from "@tanstack/react-query";
19
+ UseMutationOptions,
20
+ UseQueryOptions,
21
+ UseQueryResult
22
+ } from '@tanstack/react-query'
20
23
  import type {
21
- ProjectsGetResponse,
22
24
  DmError,
23
- GetProjectsParams,
24
- ProjectPostResponse,
25
- ProjectPostBodyBody,
26
- ProjectGetResponse,
27
- ProjectPatchBodyBody,
28
- ProjectDeleteResponse,
29
25
  GetProjectFileParams,
30
- ProjectFilePutBodyBody,
31
26
  GetProjectFileWithTokenParams,
32
- } from "../data-manager-api.schemas";
33
- import { customInstance } from ".././custom-instance";
34
- import type { ErrorType } from ".././custom-instance";
27
+ GetProjectsParams,
28
+ ProjectDetail,
29
+ ProjectFilePutBodyBody,
30
+ ProjectPatchBodyBody,
31
+ ProjectPostBodyBody,
32
+ ProjectPostResponse,
33
+ ProjectsGetResponse,
34
+ TaskIdentity
35
+ } from '../data-manager-api.schemas'
36
+ import { customInstance } from '.././custom-instance';
37
+ import type { ErrorType } from '.././custom-instance';
38
+
35
39
 
36
40
  // eslint-disable-next-line
37
- type SecondParameter<T extends (...args: any) => any> = T extends (
41
+ type SecondParameter<T extends (...args: any) => any> = T extends (
38
42
  config: any,
39
- args: infer P
43
+ args: infer P,
40
44
  ) => any
41
45
  ? P
42
46
  : never;
43
47
 
48
+
44
49
  /**
45
50
  * @summary Get all Projects available to you
46
51
  */
47
52
  export const getProjects = (
48
- params?: GetProjectsParams,
49
- options?: SecondParameter<typeof customInstance>,
50
- signal?: AbortSignal
53
+ params?: GetProjectsParams,
54
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
55
+ ) => {
56
+
57
+
58
+ return customInstance<ProjectsGetResponse>(
59
+ {url: `/project`, method: 'get',
60
+ params, signal
61
+ },
62
+ options);
63
+ }
64
+
65
+
66
+ export const getGetProjectsQueryKey = (params?: GetProjectsParams,) => {
67
+
68
+ return ["data-manager-api", `/project`, ...(params ? [params]: [])] as const;
69
+ }
70
+
71
+
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>}
51
73
  ) => {
52
- return customInstance<ProjectsGetResponse>(
53
- { url: `/project`, method: "get", params, signal },
54
- options
55
- );
56
- };
57
-
58
- export const getGetProjectsQueryKey = (params?: GetProjectsParams) =>
59
- ["data-manager-api", `/project`, ...(params ? [params] : [])] as const;
60
-
61
- export const getGetProjectsQueryOptions = <
62
- TData = Awaited<ReturnType<typeof getProjects>>,
63
- TError = ErrorType<void | DmError>
64
- >(
65
- params?: GetProjectsParams,
66
- options?: {
67
- query?: UseQueryOptions<
68
- Awaited<ReturnType<typeof getProjects>>,
69
- TError,
70
- TData
71
- >;
72
- request?: SecondParameter<typeof customInstance>;
73
- }
74
- ): UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & {
75
- queryKey: QueryKey;
76
- } => {
77
- const { query: queryOptions, request: requestOptions } = options ?? {};
78
-
79
- const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);
80
-
81
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({
82
- signal,
83
- }) => getProjects(params, requestOptions, signal);
84
-
85
- return { queryKey, queryFn, ...queryOptions };
86
- };
87
-
88
- export type GetProjectsQueryResult = NonNullable<
89
- Awaited<ReturnType<typeof getProjects>>
90
- >;
91
- export type GetProjectsQueryError = ErrorType<void | DmError>;
92
-
93
- export const useGetProjects = <
94
- TData = Awaited<ReturnType<typeof getProjects>>,
95
- TError = ErrorType<void | DmError>
96
- >(
97
- params?: GetProjectsParams,
98
- options?: {
99
- query?: UseQueryOptions<
100
- Awaited<ReturnType<typeof getProjects>>,
101
- TError,
102
- TData
103
- >;
104
- request?: SecondParameter<typeof customInstance>;
105
- }
106
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
107
- const queryOptions = getGetProjectsQueryOptions(params, options);
108
-
109
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
110
- queryKey: QueryKey;
111
- };
112
-
113
- query.queryKey = queryOptions.queryKey;
74
+
75
+ const {query: queryOptions, request: requestOptions} = options ?? {};
76
+
77
+ const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);
78
+
79
+
80
+
81
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);
82
+
83
+
84
+
85
+
86
+
87
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }
88
+ }
89
+
90
+ export type GetProjectsQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>
91
+ export type GetProjectsQueryError = ErrorType<void | DmError>
92
+
93
+ /**
94
+ * @summary Get all Projects available to you
95
+ */
96
+ 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>}
98
+
99
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
100
+
101
+ const queryOptions = getGetProjectsQueryOptions(params,options)
102
+
103
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
104
+
105
+ query.queryKey = queryOptions.queryKey ;
114
106
 
115
107
  return query;
116
- };
108
+ }
109
+
110
+
117
111
 
118
112
  /**
119
113
  * 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**.
@@ -127,155 +121,125 @@ The name you give the Project is free-form text (can contain spaces etc.) but th
127
121
  * @summary Create a new Project
128
122
  */
129
123
  export const createProject = (
130
- projectPostBodyBody: ProjectPostBodyBody,
131
- options?: SecondParameter<typeof customInstance>
132
- ) => {
133
- const formData = new FormData();
134
- formData.append("name", projectPostBodyBody.name);
135
- if (projectPostBodyBody.private !== undefined) {
136
- formData.append("private", projectPostBodyBody.private.toString());
137
- }
138
- formData.append("tier_product_id", projectPostBodyBody.tier_product_id);
139
-
140
- return customInstance<ProjectPostResponse>(
141
- {
142
- url: `/project`,
143
- method: "post",
144
- headers: { "Content-Type": "multipart/form-data" },
145
- data: formData,
124
+ projectPostBodyBody: ProjectPostBodyBody,
125
+ options?: SecondParameter<typeof customInstance>,) => {
126
+
127
+ const formData = new FormData();
128
+ formData.append('name', projectPostBodyBody.name)
129
+ if(projectPostBodyBody.private !== undefined) {
130
+ formData.append('private', projectPostBodyBody.private.toString())
131
+ }
132
+ formData.append('tier_product_id', projectPostBodyBody.tier_product_id)
133
+
134
+ return customInstance<ProjectPostResponse>(
135
+ {url: `/project`, method: 'post',
136
+ headers: {'Content-Type': 'multipart/form-data', },
137
+ data: formData
146
138
  },
147
- options
148
- );
149
- };
150
-
151
- export const getCreateProjectMutationOptions = <
152
- TError = ErrorType<DmError | void>,
153
- TContext = unknown
154
- >(options?: {
155
- mutation?: UseMutationOptions<
156
- Awaited<ReturnType<typeof createProject>>,
157
- TError,
158
- { data: ProjectPostBodyBody },
159
- TContext
160
- >;
161
- request?: SecondParameter<typeof customInstance>;
162
- }): UseMutationOptions<
163
- Awaited<ReturnType<typeof createProject>>,
164
- TError,
165
- { data: ProjectPostBodyBody },
166
- TContext
167
- > => {
168
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
169
-
170
- const mutationFn: MutationFunction<
171
- Awaited<ReturnType<typeof createProject>>,
172
- { data: ProjectPostBodyBody }
173
- > = (props) => {
174
- const { data } = props ?? {};
175
-
176
- return createProject(data, requestOptions);
177
- };
178
-
179
- return { mutationFn, ...mutationOptions };
180
- };
181
-
182
- export type CreateProjectMutationResult = NonNullable<
183
- Awaited<ReturnType<typeof createProject>>
184
- >;
185
- export type CreateProjectMutationBody = ProjectPostBodyBody;
186
- export type CreateProjectMutationError = ErrorType<DmError | void>;
187
-
188
- export const useCreateProject = <
189
- TError = ErrorType<DmError | void>,
190
- TContext = unknown
191
- >(options?: {
192
- mutation?: UseMutationOptions<
193
- Awaited<ReturnType<typeof createProject>>,
194
- TError,
195
- { data: ProjectPostBodyBody },
196
- TContext
197
- >;
198
- request?: SecondParameter<typeof customInstance>;
199
- }) => {
200
- const mutationOptions = getCreateProjectMutationOptions(options);
201
-
202
- return useMutation(mutationOptions);
203
- };
204
- /**
139
+ options);
140
+ }
141
+
142
+
143
+
144
+ export const getCreateProjectMutationOptions = <TError = ErrorType<DmError | void>,
145
+
146
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
147
+ ): UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext> => {
148
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
149
+
150
+
151
+
152
+
153
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof createProject>>, {data: ProjectPostBodyBody}> = (props) => {
154
+ const {data} = props ?? {};
155
+
156
+ return createProject(data,requestOptions)
157
+ }
158
+
159
+
160
+
161
+
162
+ return { mutationFn, ...mutationOptions }}
163
+
164
+ export type CreateProjectMutationResult = NonNullable<Awaited<ReturnType<typeof createProject>>>
165
+ export type CreateProjectMutationBody = ProjectPostBodyBody
166
+ export type CreateProjectMutationError = ErrorType<DmError | void>
167
+
168
+ /**
169
+ * @summary Create a new Project
170
+ */
171
+ export const useCreateProject = <TError = ErrorType<DmError | void>,
172
+
173
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
174
+ ) => {
175
+
176
+ const mutationOptions = getCreateProjectMutationOptions(options);
177
+
178
+ return useMutation(mutationOptions);
179
+ }
180
+ /**
205
181
  * Gets the details of a Project that is available to you.
206
182
 
207
183
  * @summary Get a Project
208
184
  */
209
185
  export const getProject = (
210
- projectId: string,
211
- options?: SecondParameter<typeof customInstance>,
212
- signal?: AbortSignal
186
+ projectId: string,
187
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
188
+ ) => {
189
+
190
+
191
+ return customInstance<ProjectDetail>(
192
+ {url: `/project/${projectId}`, method: 'get', signal
193
+ },
194
+ options);
195
+ }
196
+
197
+
198
+ export const getGetProjectQueryKey = (projectId: string,) => {
199
+
200
+ return ["data-manager-api", `/project/${projectId}`] as const;
201
+ }
202
+
203
+
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>}
213
205
  ) => {
214
- return customInstance<ProjectGetResponse>(
215
- { url: `/project/${projectId}`, method: "get", signal },
216
- options
217
- );
218
- };
219
-
220
- export const getGetProjectQueryKey = (projectId: string) =>
221
- ["data-manager-api", `/project/${projectId}`] as const;
222
-
223
- export const getGetProjectQueryOptions = <
224
- TData = Awaited<ReturnType<typeof getProject>>,
225
- TError = ErrorType<void | DmError>
226
- >(
227
- projectId: string,
228
- options?: {
229
- query?: UseQueryOptions<
230
- Awaited<ReturnType<typeof getProject>>,
231
- TError,
232
- TData
233
- >;
234
- request?: SecondParameter<typeof customInstance>;
235
- }
236
- ): UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & {
237
- queryKey: QueryKey;
238
- } => {
239
- const { query: queryOptions, request: requestOptions } = options ?? {};
240
-
241
- const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);
242
-
243
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({
244
- signal,
245
- }) => getProject(projectId, requestOptions, signal);
246
-
247
- return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
248
- };
249
-
250
- export type GetProjectQueryResult = NonNullable<
251
- Awaited<ReturnType<typeof getProject>>
252
- >;
253
- export type GetProjectQueryError = ErrorType<void | DmError>;
254
-
255
- export const useGetProject = <
256
- TData = Awaited<ReturnType<typeof getProject>>,
257
- TError = ErrorType<void | DmError>
258
- >(
259
- projectId: string,
260
- options?: {
261
- query?: UseQueryOptions<
262
- Awaited<ReturnType<typeof getProject>>,
263
- TError,
264
- TData
265
- >;
266
- request?: SecondParameter<typeof customInstance>;
267
- }
268
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
269
- const queryOptions = getGetProjectQueryOptions(projectId, options);
270
-
271
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
272
- queryKey: QueryKey;
273
- };
274
-
275
- query.queryKey = queryOptions.queryKey;
206
+
207
+ const {query: queryOptions, request: requestOptions} = options ?? {};
208
+
209
+ const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);
210
+
211
+
212
+
213
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);
214
+
215
+
216
+
217
+
218
+
219
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }
220
+ }
221
+
222
+ export type GetProjectQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>
223
+ export type GetProjectQueryError = ErrorType<void | DmError>
224
+
225
+ /**
226
+ * @summary Get a Project
227
+ */
228
+ 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>}
230
+
231
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
232
+
233
+ const queryOptions = getGetProjectQueryOptions(projectId,options)
234
+
235
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
236
+
237
+ query.queryKey = queryOptions.queryKey ;
276
238
 
277
239
  return query;
278
- };
240
+ }
241
+
242
+
279
243
 
280
244
  /**
281
245
  * 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**
@@ -283,83 +247,65 @@ export const useGetProject = <
283
247
  * @summary Adjust an existing Project
284
248
  */
285
249
  export const patchProject = (
286
- projectId: string,
287
- projectPatchBodyBody: ProjectPatchBodyBody,
288
- options?: SecondParameter<typeof customInstance>
289
- ) => {
290
- const formData = new FormData();
291
- if (projectPatchBodyBody.private !== undefined) {
292
- formData.append("private", projectPatchBodyBody.private.toString());
293
- }
294
- if (projectPatchBodyBody.name !== undefined) {
295
- formData.append("name", projectPatchBodyBody.name);
296
- }
297
-
298
- return customInstance<void>(
299
- {
300
- url: `/project/${projectId}`,
301
- method: "patch",
302
- headers: { "Content-Type": "multipart/form-data" },
303
- data: formData,
250
+ projectId: string,
251
+ projectPatchBodyBody: ProjectPatchBodyBody,
252
+ options?: SecondParameter<typeof customInstance>,) => {
253
+
254
+ const formData = new FormData();
255
+ if(projectPatchBodyBody.private !== undefined) {
256
+ formData.append('private', projectPatchBodyBody.private.toString())
257
+ }
258
+ if(projectPatchBodyBody.name !== undefined) {
259
+ formData.append('name', projectPatchBodyBody.name)
260
+ }
261
+
262
+ return customInstance<void>(
263
+ {url: `/project/${projectId}`, method: 'patch',
264
+ headers: {'Content-Type': 'multipart/form-data', },
265
+ data: formData
304
266
  },
305
- options
306
- );
307
- };
308
-
309
- export const getPatchProjectMutationOptions = <
310
- TError = ErrorType<DmError>,
311
- TContext = unknown
312
- >(options?: {
313
- mutation?: UseMutationOptions<
314
- Awaited<ReturnType<typeof patchProject>>,
315
- TError,
316
- { projectId: string; data: ProjectPatchBodyBody },
317
- TContext
318
- >;
319
- request?: SecondParameter<typeof customInstance>;
320
- }): UseMutationOptions<
321
- Awaited<ReturnType<typeof patchProject>>,
322
- TError,
323
- { projectId: string; data: ProjectPatchBodyBody },
324
- TContext
325
- > => {
326
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
327
-
328
- const mutationFn: MutationFunction<
329
- Awaited<ReturnType<typeof patchProject>>,
330
- { projectId: string; data: ProjectPatchBodyBody }
331
- > = (props) => {
332
- const { projectId, data } = props ?? {};
333
-
334
- return patchProject(projectId, data, requestOptions);
335
- };
336
-
337
- return { mutationFn, ...mutationOptions };
338
- };
339
-
340
- export type PatchProjectMutationResult = NonNullable<
341
- Awaited<ReturnType<typeof patchProject>>
342
- >;
343
- export type PatchProjectMutationBody = ProjectPatchBodyBody;
344
- export type PatchProjectMutationError = ErrorType<DmError>;
345
-
346
- export const usePatchProject = <
347
- TError = ErrorType<DmError>,
348
- TContext = unknown
349
- >(options?: {
350
- mutation?: UseMutationOptions<
351
- Awaited<ReturnType<typeof patchProject>>,
352
- TError,
353
- { projectId: string; data: ProjectPatchBodyBody },
354
- TContext
355
- >;
356
- request?: SecondParameter<typeof customInstance>;
357
- }) => {
358
- const mutationOptions = getPatchProjectMutationOptions(options);
359
-
360
- return useMutation(mutationOptions);
361
- };
362
- /**
267
+ options);
268
+ }
269
+
270
+
271
+
272
+ export const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,
273
+
274
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
275
+ ): UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext> => {
276
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
277
+
278
+
279
+
280
+
281
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProject>>, {projectId: string;data: ProjectPatchBodyBody}> = (props) => {
282
+ const {projectId,data} = props ?? {};
283
+
284
+ return patchProject(projectId,data,requestOptions)
285
+ }
286
+
287
+
288
+
289
+
290
+ return { mutationFn, ...mutationOptions }}
291
+
292
+ export type PatchProjectMutationResult = NonNullable<Awaited<ReturnType<typeof patchProject>>>
293
+ export type PatchProjectMutationBody = ProjectPatchBodyBody
294
+ export type PatchProjectMutationError = ErrorType<DmError>
295
+
296
+ /**
297
+ * @summary Adjust an existing Project
298
+ */
299
+ export const usePatchProject = <TError = ErrorType<DmError>,
300
+
301
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
302
+ ) => {
303
+
304
+ const mutationOptions = getPatchProjectMutationOptions(options);
305
+
306
+ return useMutation(mutationOptions);
307
+ }
308
+ /**
363
309
  * Deletes an existing Project.
364
310
 
365
311
  You must be an `editor` or the `owner` of the project.
@@ -369,69 +315,55 @@ Once deleted all **Files**, working directories and material in the Project will
369
315
  * @summary Delete a Project
370
316
  */
371
317
  export const deleteProject = (
372
- projectId: string,
373
- options?: SecondParameter<typeof customInstance>
318
+ projectId: string,
319
+ options?: SecondParameter<typeof customInstance>,) => {
320
+
321
+
322
+ return customInstance<TaskIdentity>(
323
+ {url: `/project/${projectId}`, method: 'delete'
324
+ },
325
+ options);
326
+ }
327
+
328
+
329
+
330
+ export const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmError>,
331
+
332
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
333
+ ): UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext> => {
334
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
335
+
336
+
337
+
338
+
339
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProject>>, {projectId: string}> = (props) => {
340
+ const {projectId} = props ?? {};
341
+
342
+ return deleteProject(projectId,requestOptions)
343
+ }
344
+
345
+
346
+
347
+
348
+ return { mutationFn, ...mutationOptions }}
349
+
350
+ export type DeleteProjectMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProject>>>
351
+
352
+ export type DeleteProjectMutationError = ErrorType<void | DmError>
353
+
354
+ /**
355
+ * @summary Delete a Project
356
+ */
357
+ export const useDeleteProject = <TError = ErrorType<void | DmError>,
358
+
359
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
374
360
  ) => {
375
- return customInstance<ProjectDeleteResponse>(
376
- { url: `/project/${projectId}`, method: "delete" },
377
- options
378
- );
379
- };
380
-
381
- export const getDeleteProjectMutationOptions = <
382
- TError = ErrorType<void | DmError>,
383
- TContext = unknown
384
- >(options?: {
385
- mutation?: UseMutationOptions<
386
- Awaited<ReturnType<typeof deleteProject>>,
387
- TError,
388
- { projectId: string },
389
- TContext
390
- >;
391
- request?: SecondParameter<typeof customInstance>;
392
- }): UseMutationOptions<
393
- Awaited<ReturnType<typeof deleteProject>>,
394
- TError,
395
- { projectId: string },
396
- TContext
397
- > => {
398
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
399
-
400
- const mutationFn: MutationFunction<
401
- Awaited<ReturnType<typeof deleteProject>>,
402
- { projectId: string }
403
- > = (props) => {
404
- const { projectId } = props ?? {};
405
-
406
- return deleteProject(projectId, requestOptions);
407
- };
408
-
409
- return { mutationFn, ...mutationOptions };
410
- };
411
-
412
- export type DeleteProjectMutationResult = NonNullable<
413
- Awaited<ReturnType<typeof deleteProject>>
414
- >;
415
-
416
- export type DeleteProjectMutationError = ErrorType<void | DmError>;
417
-
418
- export const useDeleteProject = <
419
- TError = ErrorType<void | DmError>,
420
- TContext = unknown
421
- >(options?: {
422
- mutation?: UseMutationOptions<
423
- Awaited<ReturnType<typeof deleteProject>>,
424
- TError,
425
- { projectId: string },
426
- TContext
427
- >;
428
- request?: SecondParameter<typeof customInstance>;
429
- }) => {
430
- const mutationOptions = getDeleteProjectMutationOptions(options);
431
-
432
- return useMutation(mutationOptions);
433
- };
434
- /**
361
+
362
+ const mutationOptions = getDeleteProjectMutationOptions(options);
363
+
364
+ return useMutation(mutationOptions);
365
+ }
366
+ /**
435
367
  * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.
436
368
 
437
369
  An `editor` of a project is not automatically an `editor` of any datasets the project contains.
@@ -441,70 +373,56 @@ You must be an `editor` or the `owner` of the project
441
373
  * @summary Add a Project Editor
442
374
  */
443
375
  export const addEditorToProject = (
444
- projectId: string,
445
- userId: string,
446
- options?: SecondParameter<typeof customInstance>
376
+ projectId: string,
377
+ userId: string,
378
+ options?: SecondParameter<typeof customInstance>,) => {
379
+
380
+
381
+ return customInstance<void>(
382
+ {url: `/project/${projectId}/editor/${userId}`, method: 'put'
383
+ },
384
+ options);
385
+ }
386
+
387
+
388
+
389
+ export const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>,
390
+
391
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
392
+ ): UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext> => {
393
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
394
+
395
+
396
+
397
+
398
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToProject>>, {projectId: string;userId: string}> = (props) => {
399
+ const {projectId,userId} = props ?? {};
400
+
401
+ return addEditorToProject(projectId,userId,requestOptions)
402
+ }
403
+
404
+
405
+
406
+
407
+ return { mutationFn, ...mutationOptions }}
408
+
409
+ export type AddEditorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToProject>>>
410
+
411
+ export type AddEditorToProjectMutationError = ErrorType<DmError>
412
+
413
+ /**
414
+ * @summary Add a Project Editor
415
+ */
416
+ export const useAddEditorToProject = <TError = ErrorType<DmError>,
417
+
418
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
447
419
  ) => {
448
- return customInstance<void>(
449
- { url: `/project/${projectId}/editor/${userId}`, method: "put" },
450
- options
451
- );
452
- };
453
-
454
- export const getAddEditorToProjectMutationOptions = <
455
- TError = ErrorType<DmError>,
456
- TContext = unknown
457
- >(options?: {
458
- mutation?: UseMutationOptions<
459
- Awaited<ReturnType<typeof addEditorToProject>>,
460
- TError,
461
- { projectId: string; userId: string },
462
- TContext
463
- >;
464
- request?: SecondParameter<typeof customInstance>;
465
- }): UseMutationOptions<
466
- Awaited<ReturnType<typeof addEditorToProject>>,
467
- TError,
468
- { projectId: string; userId: string },
469
- TContext
470
- > => {
471
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
472
-
473
- const mutationFn: MutationFunction<
474
- Awaited<ReturnType<typeof addEditorToProject>>,
475
- { projectId: string; userId: string }
476
- > = (props) => {
477
- const { projectId, userId } = props ?? {};
478
-
479
- return addEditorToProject(projectId, userId, requestOptions);
480
- };
481
-
482
- return { mutationFn, ...mutationOptions };
483
- };
484
-
485
- export type AddEditorToProjectMutationResult = NonNullable<
486
- Awaited<ReturnType<typeof addEditorToProject>>
487
- >;
488
-
489
- export type AddEditorToProjectMutationError = ErrorType<DmError>;
490
-
491
- export const useAddEditorToProject = <
492
- TError = ErrorType<DmError>,
493
- TContext = unknown
494
- >(options?: {
495
- mutation?: UseMutationOptions<
496
- Awaited<ReturnType<typeof addEditorToProject>>,
497
- TError,
498
- { projectId: string; userId: string },
499
- TContext
500
- >;
501
- request?: SecondParameter<typeof customInstance>;
502
- }) => {
503
- const mutationOptions = getAddEditorToProjectMutationOptions(options);
504
-
505
- return useMutation(mutationOptions);
506
- };
507
- /**
420
+
421
+ const mutationOptions = getAddEditorToProjectMutationOptions(options);
422
+
423
+ return useMutation(mutationOptions);
424
+ }
425
+ /**
508
426
  * Deletes a project `editor`. The editor can be you.
509
427
 
510
428
  A project must always have one `editor` so you will not be able to delete the last editor of a project.
@@ -514,70 +432,56 @@ You must be an `editor` or the `owner` of the project
514
432
  * @summary Delete a Project Editor
515
433
  */
516
434
  export const removeEditorFromProject = (
517
- projectId: string,
518
- userId: string,
519
- options?: SecondParameter<typeof customInstance>
435
+ projectId: string,
436
+ userId: string,
437
+ options?: SecondParameter<typeof customInstance>,) => {
438
+
439
+
440
+ return customInstance<void>(
441
+ {url: `/project/${projectId}/editor/${userId}`, method: 'delete'
442
+ },
443
+ options);
444
+ }
445
+
446
+
447
+
448
+ export const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmError>,
449
+
450
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
451
+ ): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {
452
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
453
+
454
+
455
+
456
+
457
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromProject>>, {projectId: string;userId: string}> = (props) => {
458
+ const {projectId,userId} = props ?? {};
459
+
460
+ return removeEditorFromProject(projectId,userId,requestOptions)
461
+ }
462
+
463
+
464
+
465
+
466
+ return { mutationFn, ...mutationOptions }}
467
+
468
+ export type RemoveEditorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromProject>>>
469
+
470
+ export type RemoveEditorFromProjectMutationError = ErrorType<DmError>
471
+
472
+ /**
473
+ * @summary Delete a Project Editor
474
+ */
475
+ export const useRemoveEditorFromProject = <TError = ErrorType<DmError>,
476
+
477
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
520
478
  ) => {
521
- return customInstance<void>(
522
- { url: `/project/${projectId}/editor/${userId}`, method: "delete" },
523
- options
524
- );
525
- };
526
-
527
- export const getRemoveEditorFromProjectMutationOptions = <
528
- TError = ErrorType<DmError>,
529
- TContext = unknown
530
- >(options?: {
531
- mutation?: UseMutationOptions<
532
- Awaited<ReturnType<typeof removeEditorFromProject>>,
533
- TError,
534
- { projectId: string; userId: string },
535
- TContext
536
- >;
537
- request?: SecondParameter<typeof customInstance>;
538
- }): UseMutationOptions<
539
- Awaited<ReturnType<typeof removeEditorFromProject>>,
540
- TError,
541
- { projectId: string; userId: string },
542
- TContext
543
- > => {
544
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
545
-
546
- const mutationFn: MutationFunction<
547
- Awaited<ReturnType<typeof removeEditorFromProject>>,
548
- { projectId: string; userId: string }
549
- > = (props) => {
550
- const { projectId, userId } = props ?? {};
551
-
552
- return removeEditorFromProject(projectId, userId, requestOptions);
553
- };
554
-
555
- return { mutationFn, ...mutationOptions };
556
- };
557
-
558
- export type RemoveEditorFromProjectMutationResult = NonNullable<
559
- Awaited<ReturnType<typeof removeEditorFromProject>>
560
- >;
561
-
562
- export type RemoveEditorFromProjectMutationError = ErrorType<DmError>;
563
-
564
- export const useRemoveEditorFromProject = <
565
- TError = ErrorType<DmError>,
566
- TContext = unknown
567
- >(options?: {
568
- mutation?: UseMutationOptions<
569
- Awaited<ReturnType<typeof removeEditorFromProject>>,
570
- TError,
571
- { projectId: string; userId: string },
572
- TContext
573
- >;
574
- request?: SecondParameter<typeof customInstance>;
575
- }) => {
576
- const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);
577
-
578
- return useMutation(mutationOptions);
579
- };
580
- /**
479
+
480
+ const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);
481
+
482
+ return useMutation(mutationOptions);
483
+ }
484
+ /**
581
485
  * 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**.
582
486
 
583
487
  You must be an `editor` or the `owner` of the Project to add Observers
@@ -585,70 +489,56 @@ You must be an `editor` or the `owner` of the Project to add Observers
585
489
  * @summary Add a Project Observer
586
490
  */
587
491
  export const addObserverToProject = (
588
- projectId: string,
589
- userId: string,
590
- options?: SecondParameter<typeof customInstance>
492
+ projectId: string,
493
+ userId: string,
494
+ options?: SecondParameter<typeof customInstance>,) => {
495
+
496
+
497
+ return customInstance<void>(
498
+ {url: `/project/${projectId}/observer/${userId}`, method: 'put'
499
+ },
500
+ options);
501
+ }
502
+
503
+
504
+
505
+ export const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmError>,
506
+
507
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
508
+ ): UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext> => {
509
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
510
+
511
+
512
+
513
+
514
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addObserverToProject>>, {projectId: string;userId: string}> = (props) => {
515
+ const {projectId,userId} = props ?? {};
516
+
517
+ return addObserverToProject(projectId,userId,requestOptions)
518
+ }
519
+
520
+
521
+
522
+
523
+ return { mutationFn, ...mutationOptions }}
524
+
525
+ export type AddObserverToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addObserverToProject>>>
526
+
527
+ export type AddObserverToProjectMutationError = ErrorType<DmError>
528
+
529
+ /**
530
+ * @summary Add a Project Observer
531
+ */
532
+ export const useAddObserverToProject = <TError = ErrorType<DmError>,
533
+
534
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
591
535
  ) => {
592
- return customInstance<void>(
593
- { url: `/project/${projectId}/observer/${userId}`, method: "put" },
594
- options
595
- );
596
- };
597
-
598
- export const getAddObserverToProjectMutationOptions = <
599
- TError = ErrorType<DmError>,
600
- TContext = unknown
601
- >(options?: {
602
- mutation?: UseMutationOptions<
603
- Awaited<ReturnType<typeof addObserverToProject>>,
604
- TError,
605
- { projectId: string; userId: string },
606
- TContext
607
- >;
608
- request?: SecondParameter<typeof customInstance>;
609
- }): UseMutationOptions<
610
- Awaited<ReturnType<typeof addObserverToProject>>,
611
- TError,
612
- { projectId: string; userId: string },
613
- TContext
614
- > => {
615
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
616
-
617
- const mutationFn: MutationFunction<
618
- Awaited<ReturnType<typeof addObserverToProject>>,
619
- { projectId: string; userId: string }
620
- > = (props) => {
621
- const { projectId, userId } = props ?? {};
622
-
623
- return addObserverToProject(projectId, userId, requestOptions);
624
- };
625
-
626
- return { mutationFn, ...mutationOptions };
627
- };
628
-
629
- export type AddObserverToProjectMutationResult = NonNullable<
630
- Awaited<ReturnType<typeof addObserverToProject>>
631
- >;
632
-
633
- export type AddObserverToProjectMutationError = ErrorType<DmError>;
634
-
635
- export const useAddObserverToProject = <
636
- TError = ErrorType<DmError>,
637
- TContext = unknown
638
- >(options?: {
639
- mutation?: UseMutationOptions<
640
- Awaited<ReturnType<typeof addObserverToProject>>,
641
- TError,
642
- { projectId: string; userId: string },
643
- TContext
644
- >;
645
- request?: SecondParameter<typeof customInstance>;
646
- }) => {
647
- const mutationOptions = getAddObserverToProjectMutationOptions(options);
648
-
649
- return useMutation(mutationOptions);
650
- };
651
- /**
536
+
537
+ const mutationOptions = getAddObserverToProjectMutationOptions(options);
538
+
539
+ return useMutation(mutationOptions);
540
+ }
541
+ /**
652
542
  * Deletes a project `observer`.
653
543
 
654
544
  You must be an `editor` or the `owner` of the Project to remove Observers
@@ -656,70 +546,56 @@ You must be an `editor` or the `owner` of the Project to remove Observers
656
546
  * @summary Delete a Project Observer
657
547
  */
658
548
  export const removeObserverFromProject = (
659
- projectId: string,
660
- userId: string,
661
- options?: SecondParameter<typeof customInstance>
549
+ projectId: string,
550
+ userId: string,
551
+ options?: SecondParameter<typeof customInstance>,) => {
552
+
553
+
554
+ return customInstance<void>(
555
+ {url: `/project/${projectId}/observer/${userId}`, method: 'delete'
556
+ },
557
+ options);
558
+ }
559
+
560
+
561
+
562
+ export const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<DmError>,
563
+
564
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
565
+ ): UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext> => {
566
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
567
+
568
+
569
+
570
+
571
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeObserverFromProject>>, {projectId: string;userId: string}> = (props) => {
572
+ const {projectId,userId} = props ?? {};
573
+
574
+ return removeObserverFromProject(projectId,userId,requestOptions)
575
+ }
576
+
577
+
578
+
579
+
580
+ return { mutationFn, ...mutationOptions }}
581
+
582
+ export type RemoveObserverFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeObserverFromProject>>>
583
+
584
+ export type RemoveObserverFromProjectMutationError = ErrorType<DmError>
585
+
586
+ /**
587
+ * @summary Delete a Project Observer
588
+ */
589
+ export const useRemoveObserverFromProject = <TError = ErrorType<DmError>,
590
+
591
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
662
592
  ) => {
663
- return customInstance<void>(
664
- { url: `/project/${projectId}/observer/${userId}`, method: "delete" },
665
- options
666
- );
667
- };
668
-
669
- export const getRemoveObserverFromProjectMutationOptions = <
670
- TError = ErrorType<DmError>,
671
- TContext = unknown
672
- >(options?: {
673
- mutation?: UseMutationOptions<
674
- Awaited<ReturnType<typeof removeObserverFromProject>>,
675
- TError,
676
- { projectId: string; userId: string },
677
- TContext
678
- >;
679
- request?: SecondParameter<typeof customInstance>;
680
- }): UseMutationOptions<
681
- Awaited<ReturnType<typeof removeObserverFromProject>>,
682
- TError,
683
- { projectId: string; userId: string },
684
- TContext
685
- > => {
686
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
687
-
688
- const mutationFn: MutationFunction<
689
- Awaited<ReturnType<typeof removeObserverFromProject>>,
690
- { projectId: string; userId: string }
691
- > = (props) => {
692
- const { projectId, userId } = props ?? {};
693
-
694
- return removeObserverFromProject(projectId, userId, requestOptions);
695
- };
696
-
697
- return { mutationFn, ...mutationOptions };
698
- };
699
-
700
- export type RemoveObserverFromProjectMutationResult = NonNullable<
701
- Awaited<ReturnType<typeof removeObserverFromProject>>
702
- >;
703
-
704
- export type RemoveObserverFromProjectMutationError = ErrorType<DmError>;
705
-
706
- export const useRemoveObserverFromProject = <
707
- TError = ErrorType<DmError>,
708
- TContext = unknown
709
- >(options?: {
710
- mutation?: UseMutationOptions<
711
- Awaited<ReturnType<typeof removeObserverFromProject>>,
712
- TError,
713
- { projectId: string; userId: string },
714
- TContext
715
- >;
716
- request?: SecondParameter<typeof customInstance>;
717
- }) => {
718
- const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);
719
-
720
- return useMutation(mutationOptions);
721
- };
722
- /**
593
+
594
+ const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);
595
+
596
+ return useMutation(mutationOptions);
597
+ }
598
+ /**
723
599
  * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
724
600
 
725
601
  For **managed** files you should consider using the `/file/{file_id}` endpoint.
@@ -729,87 +605,68 @@ You must be an `editor` or the `owner` of the Project if the Project is `private
729
605
  * @summary Download a Project file
730
606
  */
731
607
  export const getProjectFile = (
732
- projectId: string,
733
- params: GetProjectFileParams,
734
- options?: SecondParameter<typeof customInstance>,
735
- signal?: AbortSignal
608
+ projectId: string,
609
+ params: GetProjectFileParams,
610
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
611
+ ) => {
612
+
613
+
614
+ return customInstance<void>(
615
+ {url: `/project/${projectId}/file`, method: 'get',
616
+ params, signal
617
+ },
618
+ options);
619
+ }
620
+
621
+
622
+ export const getGetProjectFileQueryKey = (projectId: string,
623
+ params: GetProjectFileParams,) => {
624
+
625
+ return ["data-manager-api", `/project/${projectId}/file`, ...(params ? [params]: [])] as const;
626
+ }
627
+
628
+
629
+ 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>}
736
631
  ) => {
737
- return customInstance<void>(
738
- { url: `/project/${projectId}/file`, method: "get", params, signal },
739
- options
740
- );
741
- };
742
-
743
- export const getGetProjectFileQueryKey = (
744
- projectId: string,
745
- params: GetProjectFileParams
746
- ) => ["data-manager-api", `/project/${projectId}/file`, ...(params ? [params] : [])] as const;
747
-
748
- export const getGetProjectFileQueryOptions = <
749
- TData = Awaited<ReturnType<typeof getProjectFile>>,
750
- TError = ErrorType<DmError>
751
- >(
752
- projectId: string,
753
- params: GetProjectFileParams,
754
- options?: {
755
- query?: UseQueryOptions<
756
- Awaited<ReturnType<typeof getProjectFile>>,
757
- TError,
758
- TData
759
- >;
760
- request?: SecondParameter<typeof customInstance>;
761
- }
762
- ): UseQueryOptions<
763
- Awaited<ReturnType<typeof getProjectFile>>,
764
- TError,
765
- TData
766
- > & { queryKey: QueryKey } => {
767
- const { query: queryOptions, request: requestOptions } = options ?? {};
768
-
769
- const queryKey =
770
- queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
771
-
772
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({
773
- signal,
774
- }) => getProjectFile(projectId, params, requestOptions, signal);
775
-
776
- return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
777
- };
778
-
779
- export type GetProjectFileQueryResult = NonNullable<
780
- Awaited<ReturnType<typeof getProjectFile>>
781
- >;
782
- export type GetProjectFileQueryError = ErrorType<DmError>;
783
-
784
- export const useGetProjectFile = <
785
- TData = Awaited<ReturnType<typeof getProjectFile>>,
786
- TError = ErrorType<DmError>
787
- >(
788
- projectId: string,
789
- params: GetProjectFileParams,
790
- options?: {
791
- query?: UseQueryOptions<
792
- Awaited<ReturnType<typeof getProjectFile>>,
793
- TError,
794
- TData
795
- >;
796
- request?: SecondParameter<typeof customInstance>;
797
- }
798
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
799
- const queryOptions = getGetProjectFileQueryOptions(
800
- projectId,
801
- params,
802
- options
803
- );
804
-
805
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
806
- queryKey: QueryKey;
807
- };
808
-
809
- query.queryKey = queryOptions.queryKey;
632
+
633
+ const {query: queryOptions, request: requestOptions} = options ?? {};
634
+
635
+ const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);
636
+
637
+
638
+
639
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);
640
+
641
+
642
+
643
+
644
+
645
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }
646
+ }
647
+
648
+ export type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>
649
+ export type GetProjectFileQueryError = ErrorType<DmError>
650
+
651
+ /**
652
+ * @summary Download a Project file
653
+ */
654
+ export const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(
655
+ projectId: string,
656
+ params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
657
+
658
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
659
+
660
+ const queryOptions = getGetProjectFileQueryOptions(projectId,params,options)
661
+
662
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
663
+
664
+ query.queryKey = queryOptions.queryKey ;
810
665
 
811
666
  return query;
812
- };
667
+ }
668
+
669
+
813
670
 
814
671
  /**
815
672
  * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.
@@ -819,84 +676,66 @@ You must be an `editor` or the `owner` of the project
819
676
  * @summary Upload a file into a Project
820
677
  */
821
678
  export const addFileToProject = (
822
- projectId: string,
823
- projectFilePutBodyBody: ProjectFilePutBodyBody,
824
- options?: SecondParameter<typeof customInstance>
825
- ) => {
826
- const formData = new FormData();
827
- formData.append("file", projectFilePutBodyBody.file);
828
- if (projectFilePutBodyBody.as_filename !== undefined) {
829
- formData.append("as_filename", projectFilePutBodyBody.as_filename);
830
- }
831
- if (projectFilePutBodyBody.path !== undefined) {
832
- formData.append("path", projectFilePutBodyBody.path);
833
- }
834
-
835
- return customInstance<void>(
836
- {
837
- url: `/project/${projectId}/file`,
838
- method: "put",
839
- headers: { "Content-Type": "multipart/form-data" },
840
- data: formData,
679
+ projectId: string,
680
+ projectFilePutBodyBody: ProjectFilePutBodyBody,
681
+ options?: SecondParameter<typeof customInstance>,) => {
682
+
683
+ const formData = new FormData();
684
+ formData.append('file', projectFilePutBodyBody.file)
685
+ if(projectFilePutBodyBody.as_filename !== undefined) {
686
+ formData.append('as_filename', projectFilePutBodyBody.as_filename)
687
+ }
688
+ if(projectFilePutBodyBody.path !== undefined) {
689
+ formData.append('path', projectFilePutBodyBody.path)
690
+ }
691
+
692
+ return customInstance<void>(
693
+ {url: `/project/${projectId}/file`, method: 'put',
694
+ headers: {'Content-Type': 'multipart/form-data', },
695
+ data: formData
841
696
  },
842
- options
843
- );
844
- };
845
-
846
- export const getAddFileToProjectMutationOptions = <
847
- TError = ErrorType<DmError>,
848
- TContext = unknown
849
- >(options?: {
850
- mutation?: UseMutationOptions<
851
- Awaited<ReturnType<typeof addFileToProject>>,
852
- TError,
853
- { projectId: string; data: ProjectFilePutBodyBody },
854
- TContext
855
- >;
856
- request?: SecondParameter<typeof customInstance>;
857
- }): UseMutationOptions<
858
- Awaited<ReturnType<typeof addFileToProject>>,
859
- TError,
860
- { projectId: string; data: ProjectFilePutBodyBody },
861
- TContext
862
- > => {
863
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
864
-
865
- const mutationFn: MutationFunction<
866
- Awaited<ReturnType<typeof addFileToProject>>,
867
- { projectId: string; data: ProjectFilePutBodyBody }
868
- > = (props) => {
869
- const { projectId, data } = props ?? {};
870
-
871
- return addFileToProject(projectId, data, requestOptions);
872
- };
873
-
874
- return { mutationFn, ...mutationOptions };
875
- };
876
-
877
- export type AddFileToProjectMutationResult = NonNullable<
878
- Awaited<ReturnType<typeof addFileToProject>>
879
- >;
880
- export type AddFileToProjectMutationBody = ProjectFilePutBodyBody;
881
- export type AddFileToProjectMutationError = ErrorType<DmError>;
882
-
883
- export const useAddFileToProject = <
884
- TError = ErrorType<DmError>,
885
- TContext = unknown
886
- >(options?: {
887
- mutation?: UseMutationOptions<
888
- Awaited<ReturnType<typeof addFileToProject>>,
889
- TError,
890
- { projectId: string; data: ProjectFilePutBodyBody },
891
- TContext
892
- >;
893
- request?: SecondParameter<typeof customInstance>;
894
- }) => {
895
- const mutationOptions = getAddFileToProjectMutationOptions(options);
896
-
897
- return useMutation(mutationOptions);
898
- };
899
- /**
697
+ options);
698
+ }
699
+
700
+
701
+
702
+ export const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,
703
+
704
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
705
+ ): UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext> => {
706
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
707
+
708
+
709
+
710
+
711
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof addFileToProject>>, {projectId: string;data: ProjectFilePutBodyBody}> = (props) => {
712
+ const {projectId,data} = props ?? {};
713
+
714
+ return addFileToProject(projectId,data,requestOptions)
715
+ }
716
+
717
+
718
+
719
+
720
+ return { mutationFn, ...mutationOptions }}
721
+
722
+ export type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>
723
+ export type AddFileToProjectMutationBody = ProjectFilePutBodyBody
724
+ export type AddFileToProjectMutationError = ErrorType<DmError>
725
+
726
+ /**
727
+ * @summary Upload a file into a Project
728
+ */
729
+ export const useAddFileToProject = <TError = ErrorType<DmError>,
730
+
731
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
732
+ ) => {
733
+
734
+ const mutationOptions = getAddFileToProjectMutationOptions(options);
735
+
736
+ return useMutation(mutationOptions);
737
+ }
738
+ /**
900
739
  * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
901
740
 
902
741
  For **managed** files you should consider using the `/file/{file_id}` endpoint.
@@ -906,96 +745,66 @@ As there is no authentication for this endpoint you must provide a valid token.
906
745
  * @summary Download a Project file using a Token
907
746
  */
908
747
  export const getProjectFileWithToken = (
909
- projectId: string,
910
- params: GetProjectFileWithTokenParams,
911
- options?: SecondParameter<typeof customInstance>,
912
- signal?: AbortSignal
748
+ projectId: string,
749
+ params: GetProjectFileWithTokenParams,
750
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
913
751
  ) => {
914
- return customInstance<void>(
915
- {
916
- url: `/project/${projectId}/file-with-token`,
917
- method: "get",
918
- params,
919
- signal,
752
+
753
+
754
+ return customInstance<void>(
755
+ {url: `/project/${projectId}/file-with-token`, method: 'get',
756
+ params, signal
920
757
  },
921
- options
922
- );
923
- };
924
-
925
- export const getGetProjectFileWithTokenQueryKey = (
926
- projectId: string,
927
- params: GetProjectFileWithTokenParams
928
- ) =>
929
- [
930
- "data-manager-api",
931
- `/project/${projectId}/file-with-token`,
932
- ...(params ? [params] : []),
933
- ] as const;
934
-
935
- export const getGetProjectFileWithTokenQueryOptions = <
936
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
937
- TError = ErrorType<DmError>
938
- >(
939
- projectId: string,
940
- params: GetProjectFileWithTokenParams,
941
- options?: {
942
- query?: UseQueryOptions<
943
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
944
- TError,
945
- TData
946
- >;
947
- request?: SecondParameter<typeof customInstance>;
948
- }
949
- ): UseQueryOptions<
950
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
951
- TError,
952
- TData
953
- > & { queryKey: QueryKey } => {
954
- const { query: queryOptions, request: requestOptions } = options ?? {};
955
-
956
- const queryKey =
957
- queryOptions?.queryKey ??
958
- getGetProjectFileWithTokenQueryKey(projectId, params);
959
-
960
- const queryFn: QueryFunction<
961
- Awaited<ReturnType<typeof getProjectFileWithToken>>
962
- > = ({ signal }) =>
963
- getProjectFileWithToken(projectId, params, requestOptions, signal);
964
-
965
- return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
966
- };
967
-
968
- export type GetProjectFileWithTokenQueryResult = NonNullable<
969
- Awaited<ReturnType<typeof getProjectFileWithToken>>
970
- >;
971
- export type GetProjectFileWithTokenQueryError = ErrorType<DmError>;
972
-
973
- export const useGetProjectFileWithToken = <
974
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
975
- TError = ErrorType<DmError>
976
- >(
977
- projectId: string,
978
- params: GetProjectFileWithTokenParams,
979
- options?: {
980
- query?: UseQueryOptions<
981
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
982
- TError,
983
- TData
984
- >;
985
- request?: SecondParameter<typeof customInstance>;
986
- }
987
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
988
- const queryOptions = getGetProjectFileWithTokenQueryOptions(
989
- projectId,
990
- params,
991
- options
992
- );
993
-
994
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
995
- queryKey: QueryKey;
996
- };
997
-
998
- query.queryKey = queryOptions.queryKey;
758
+ options);
759
+ }
760
+
761
+
762
+ export const getGetProjectFileWithTokenQueryKey = (projectId: string,
763
+ params: GetProjectFileWithTokenParams,) => {
764
+
765
+ return ["data-manager-api", `/project/${projectId}/file-with-token`, ...(params ? [params]: [])] as const;
766
+ }
767
+
768
+
769
+ 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>}
771
+ ) => {
772
+
773
+ const {query: queryOptions, request: requestOptions} = options ?? {};
774
+
775
+ const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);
776
+
777
+
778
+
779
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);
780
+
781
+
782
+
783
+
784
+
785
+ return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }
786
+ }
787
+
788
+ export type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>
789
+ export type GetProjectFileWithTokenQueryError = ErrorType<DmError>
790
+
791
+ /**
792
+ * @summary Download a Project file using a Token
793
+ */
794
+ export const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(
795
+ projectId: string,
796
+ params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
797
+
798
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
799
+
800
+ const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId,params,options)
801
+
802
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
803
+
804
+ query.queryKey = queryOptions.queryKey ;
999
805
 
1000
806
  return query;
1001
- };
807
+ }
808
+
809
+
810
+