@squonk/data-manager-client 1.2.3 → 1.2.4-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounting/accounting.cjs +31 -13
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +77 -0
- package/accounting/accounting.d.ts +10 -1
- package/accounting/accounting.js +29 -11
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -27
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +324 -0
- package/admin/admin.d.ts +55 -22
- package/admin/admin.js +57 -17
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +23 -13
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +57 -0
- package/application/application.d.ts +7 -1
- package/application/application.js +22 -12
- package/application/application.js.map +1 -1
- package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
- package/chunk-J22A7LHX.cjs.map +1 -0
- package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
- package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
- package/configuration/configuration.cjs +13 -7
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +29 -0
- package/configuration/configuration.d.ts +4 -1
- package/configuration/configuration.js +13 -7
- package/configuration/configuration.js.map +1 -1
- package/{custom-instance-50c9dd5d.d.ts → custom-instance-3d66fe97.d.ts} +826 -826
- package/dataset/dataset.cjs +71 -72
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +315 -0
- package/dataset/dataset.d.ts +46 -16
- package/dataset/dataset.js +62 -63
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +43 -32
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +180 -0
- package/exchange-rate/exchange-rate.d.ts +25 -7
- package/exchange-rate/exchange-rate.js +38 -27
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs +38 -22
- package/file/file.cjs.map +1 -1
- package/file/file.d.cts +154 -0
- package/file/file.d.ts +25 -10
- package/file/file.js +34 -18
- package/file/file.js.map +1 -1
- package/index.cjs +10 -10
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -0
- package/index.d.ts +1 -1
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/instance/instance.cjs +47 -37
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +215 -0
- package/instance/instance.d.ts +33 -12
- package/instance/instance.js +41 -31
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +36 -19
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +85 -0
- package/job/job.d.ts +10 -1
- package/job/job.js +34 -17
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +23 -26
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +132 -0
- package/metadata/metadata.d.ts +19 -7
- package/metadata/metadata.js +20 -23
- package/metadata/metadata.js.map +1 -1
- package/package.json +12 -12
- package/project/project.cjs +70 -48
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +377 -0
- package/project/project.d.ts +61 -25
- package/project/project.js +59 -37
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +179 -194
- package/src/admin/admin.ts +590 -735
- package/src/application/application.ts +125 -141
- package/src/configuration/configuration.ts +72 -60
- package/src/data-manager-api.schemas.ts +941 -942
- package/src/dataset/dataset.ts +591 -770
- package/src/exchange-rate/exchange-rate.ts +362 -478
- package/src/file/file.ts +292 -357
- package/src/instance/instance.ts +427 -533
- package/src/job/job.ts +187 -198
- package/src/metadata/metadata.ts +247 -339
- package/src/project/project.ts +669 -860
- package/src/task/task.ts +181 -202
- package/src/type/type.ts +72 -68
- package/src/user/user.ts +248 -286
- package/task/task.cjs +31 -15
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +103 -0
- package/task/task.d.ts +10 -1
- package/task/task.js +29 -13
- package/task/task.js.map +1 -1
- package/type/type.cjs +13 -7
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +31 -0
- package/type/type.d.ts +4 -1
- package/type/type.js +13 -7
- package/type/type.js.map +1 -1
- package/user/user.cjs +39 -28
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +104 -0
- package/user/user.d.ts +16 -4
- package/user/user.js +36 -25
- package/user/user.js.map +1 -1
- package/chunk-UZTHSGDT.cjs.map +0 -1
package/project/project.cjs
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
|
|
4
4
|
|
|
5
5
|
// src/project/project.ts
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
var _reactquery = require('@tanstack/react-query');
|
|
7
10
|
var getProjects = (params, options, signal) => {
|
|
8
|
-
return
|
|
9
|
-
{
|
|
11
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
12
|
+
{
|
|
13
|
+
url: `/project`,
|
|
14
|
+
method: "get",
|
|
15
|
+
params,
|
|
16
|
+
signal
|
|
17
|
+
},
|
|
10
18
|
options
|
|
11
19
|
);
|
|
12
20
|
};
|
|
13
|
-
var getGetProjectsQueryKey = (params) =>
|
|
21
|
+
var getGetProjectsQueryKey = (params) => {
|
|
22
|
+
return ["data-manager-api", `/project`, ...params ? [params] : []];
|
|
23
|
+
};
|
|
14
24
|
var getGetProjectsQueryOptions = (params, options) => {
|
|
15
25
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
16
26
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectsQueryKey(params)));
|
|
17
|
-
const queryFn = ({
|
|
18
|
-
signal
|
|
19
|
-
}) => getProjects(params, requestOptions, signal);
|
|
27
|
+
const queryFn = ({ signal }) => getProjects(params, requestOptions, signal);
|
|
20
28
|
return { queryKey, queryFn, ...queryOptions };
|
|
21
29
|
};
|
|
22
30
|
var useGetProjects = (params, options) => {
|
|
@@ -32,7 +40,7 @@ var createProject = (projectPostBodyBody, options) => {
|
|
|
32
40
|
formData.append("private", projectPostBodyBody.private.toString());
|
|
33
41
|
}
|
|
34
42
|
formData.append("tier_product_id", projectPostBodyBody.tier_product_id);
|
|
35
|
-
return
|
|
43
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
36
44
|
{
|
|
37
45
|
url: `/project`,
|
|
38
46
|
method: "post",
|
|
@@ -55,18 +63,22 @@ var useCreateProject = (options) => {
|
|
|
55
63
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
56
64
|
};
|
|
57
65
|
var getProject = (projectId, options, signal) => {
|
|
58
|
-
return
|
|
59
|
-
{
|
|
66
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
67
|
+
{
|
|
68
|
+
url: `/project/${projectId}`,
|
|
69
|
+
method: "get",
|
|
70
|
+
signal
|
|
71
|
+
},
|
|
60
72
|
options
|
|
61
73
|
);
|
|
62
74
|
};
|
|
63
|
-
var getGetProjectQueryKey = (projectId) =>
|
|
75
|
+
var getGetProjectQueryKey = (projectId) => {
|
|
76
|
+
return ["data-manager-api", `/project/${projectId}`];
|
|
77
|
+
};
|
|
64
78
|
var getGetProjectQueryOptions = (projectId, options) => {
|
|
65
79
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
66
80
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectQueryKey(projectId)));
|
|
67
|
-
const queryFn = ({
|
|
68
|
-
signal
|
|
69
|
-
}) => getProject(projectId, requestOptions, signal);
|
|
81
|
+
const queryFn = ({ signal }) => getProject(projectId, requestOptions, signal);
|
|
70
82
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
71
83
|
};
|
|
72
84
|
var useGetProject = (projectId, options) => {
|
|
@@ -83,7 +95,7 @@ var patchProject = (projectId, projectPatchBodyBody, options) => {
|
|
|
83
95
|
if (projectPatchBodyBody.name !== void 0) {
|
|
84
96
|
formData.append("name", projectPatchBodyBody.name);
|
|
85
97
|
}
|
|
86
|
-
return
|
|
98
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
87
99
|
{
|
|
88
100
|
url: `/project/${projectId}`,
|
|
89
101
|
method: "patch",
|
|
@@ -106,8 +118,11 @@ var usePatchProject = (options) => {
|
|
|
106
118
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
107
119
|
};
|
|
108
120
|
var deleteProject = (projectId, options) => {
|
|
109
|
-
return
|
|
110
|
-
{
|
|
121
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
122
|
+
{
|
|
123
|
+
url: `/project/${projectId}`,
|
|
124
|
+
method: "delete"
|
|
125
|
+
},
|
|
111
126
|
options
|
|
112
127
|
);
|
|
113
128
|
};
|
|
@@ -124,8 +139,11 @@ var useDeleteProject = (options) => {
|
|
|
124
139
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
125
140
|
};
|
|
126
141
|
var addEditorToProject = (projectId, userId, options) => {
|
|
127
|
-
return
|
|
128
|
-
{
|
|
142
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
143
|
+
{
|
|
144
|
+
url: `/project/${projectId}/editor/${userId}`,
|
|
145
|
+
method: "put"
|
|
146
|
+
},
|
|
129
147
|
options
|
|
130
148
|
);
|
|
131
149
|
};
|
|
@@ -142,8 +160,11 @@ var useAddEditorToProject = (options) => {
|
|
|
142
160
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
143
161
|
};
|
|
144
162
|
var removeEditorFromProject = (projectId, userId, options) => {
|
|
145
|
-
return
|
|
146
|
-
{
|
|
163
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
164
|
+
{
|
|
165
|
+
url: `/project/${projectId}/editor/${userId}`,
|
|
166
|
+
method: "delete"
|
|
167
|
+
},
|
|
147
168
|
options
|
|
148
169
|
);
|
|
149
170
|
};
|
|
@@ -160,8 +181,11 @@ var useRemoveEditorFromProject = (options) => {
|
|
|
160
181
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
161
182
|
};
|
|
162
183
|
var addObserverToProject = (projectId, userId, options) => {
|
|
163
|
-
return
|
|
164
|
-
{
|
|
184
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
185
|
+
{
|
|
186
|
+
url: `/project/${projectId}/observer/${userId}`,
|
|
187
|
+
method: "put"
|
|
188
|
+
},
|
|
165
189
|
options
|
|
166
190
|
);
|
|
167
191
|
};
|
|
@@ -178,8 +202,11 @@ var useAddObserverToProject = (options) => {
|
|
|
178
202
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
179
203
|
};
|
|
180
204
|
var removeObserverFromProject = (projectId, userId, options) => {
|
|
181
|
-
return
|
|
182
|
-
{
|
|
205
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
206
|
+
{
|
|
207
|
+
url: `/project/${projectId}/observer/${userId}`,
|
|
208
|
+
method: "delete"
|
|
209
|
+
},
|
|
183
210
|
options
|
|
184
211
|
);
|
|
185
212
|
};
|
|
@@ -196,26 +223,27 @@ var useRemoveObserverFromProject = (options) => {
|
|
|
196
223
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
197
224
|
};
|
|
198
225
|
var getProjectFile = (projectId, params, options, signal) => {
|
|
199
|
-
return
|
|
200
|
-
{
|
|
226
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
227
|
+
{
|
|
228
|
+
url: `/project/${projectId}/file`,
|
|
229
|
+
method: "get",
|
|
230
|
+
params,
|
|
231
|
+
signal
|
|
232
|
+
},
|
|
201
233
|
options
|
|
202
234
|
);
|
|
203
235
|
};
|
|
204
|
-
var getGetProjectFileQueryKey = (projectId, params) =>
|
|
236
|
+
var getGetProjectFileQueryKey = (projectId, params) => {
|
|
237
|
+
return ["data-manager-api", `/project/${projectId}/file`, ...params ? [params] : []];
|
|
238
|
+
};
|
|
205
239
|
var getGetProjectFileQueryOptions = (projectId, params, options) => {
|
|
206
240
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
207
241
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectFileQueryKey(projectId, params)));
|
|
208
|
-
const queryFn = ({
|
|
209
|
-
signal
|
|
210
|
-
}) => getProjectFile(projectId, params, requestOptions, signal);
|
|
242
|
+
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
211
243
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
212
244
|
};
|
|
213
245
|
var useGetProjectFile = (projectId, params, options) => {
|
|
214
|
-
const queryOptions = getGetProjectFileQueryOptions(
|
|
215
|
-
projectId,
|
|
216
|
-
params,
|
|
217
|
-
options
|
|
218
|
-
);
|
|
246
|
+
const queryOptions = getGetProjectFileQueryOptions(projectId, params, options);
|
|
219
247
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
220
248
|
query.queryKey = queryOptions.queryKey;
|
|
221
249
|
return query;
|
|
@@ -229,7 +257,7 @@ var addFileToProject = (projectId, projectFilePutBodyBody, options) => {
|
|
|
229
257
|
if (projectFilePutBodyBody.path !== void 0) {
|
|
230
258
|
formData.append("path", projectFilePutBodyBody.path);
|
|
231
259
|
}
|
|
232
|
-
return
|
|
260
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
233
261
|
{
|
|
234
262
|
url: `/project/${projectId}/file`,
|
|
235
263
|
method: "put",
|
|
@@ -252,7 +280,7 @@ var useAddFileToProject = (options) => {
|
|
|
252
280
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
253
281
|
};
|
|
254
282
|
var getProjectFileWithToken = (projectId, params, options, signal) => {
|
|
255
|
-
return
|
|
283
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
256
284
|
{
|
|
257
285
|
url: `/project/${projectId}/file-with-token`,
|
|
258
286
|
method: "get",
|
|
@@ -262,11 +290,9 @@ var getProjectFileWithToken = (projectId, params, options, signal) => {
|
|
|
262
290
|
options
|
|
263
291
|
);
|
|
264
292
|
};
|
|
265
|
-
var getGetProjectFileWithTokenQueryKey = (projectId, params) =>
|
|
266
|
-
"data-manager-api",
|
|
267
|
-
|
|
268
|
-
...params ? [params] : []
|
|
269
|
-
];
|
|
293
|
+
var getGetProjectFileWithTokenQueryKey = (projectId, params) => {
|
|
294
|
+
return ["data-manager-api", `/project/${projectId}/file-with-token`, ...params ? [params] : []];
|
|
295
|
+
};
|
|
270
296
|
var getGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
|
|
271
297
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
272
298
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
|
|
@@ -274,11 +300,7 @@ var getGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
|
|
|
274
300
|
return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };
|
|
275
301
|
};
|
|
276
302
|
var useGetProjectFileWithToken = (projectId, params, options) => {
|
|
277
|
-
const queryOptions = getGetProjectFileWithTokenQueryOptions(
|
|
278
|
-
projectId,
|
|
279
|
-
params,
|
|
280
|
-
options
|
|
281
|
-
);
|
|
303
|
+
const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId, params, options);
|
|
282
304
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
283
305
|
query.queryKey = queryOptions.queryKey;
|
|
284
306
|
return query;
|
package/project/project.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/project/project.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c,aACd,mCAAmC,WAAW,MAAM;AAEtD,QAAM,UAEF,CAAC,EAAE,OAAO,MACZ,wBAAwB,WAAW,QAAQ,gBAAgB,MAAM;AAEnE,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,WAAW,GAAG,aAAa;AACpE;AAOO,IAAM,6BAA6B,CAIxC,WACA,QACA,YAQ2D;AAC3D,QAAM,eAAe;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ProjectsGetResponse,\n DmError,\n GetProjectsParams,\n ProjectPostResponse,\n ProjectPostBodyBody,\n ProjectGetResponse,\n ProjectPatchBodyBody,\n ProjectDeleteResponse,\n GetProjectFileParams,\n ProjectFilePutBodyBody,\n GetProjectFileWithTokenParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * @summary Get all Projects available to you\n */\nexport const getProjects = (\n params?: GetProjectsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProjectsGetResponse>(\n { url: `/project`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetProjectsQueryKey = (params?: GetProjectsParams) =>\n [\"data-manager-api\", `/project`, ...(params ? [params] : [])] as const;\n\nexport const getGetProjectsQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjects>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetProjectsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({\n signal,\n }) => getProjects(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetProjectsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjects>>\n>;\nexport type GetProjectsQueryError = ErrorType<void | DmError>;\n\nexport const useGetProjects = <\n TData = Awaited<ReturnType<typeof getProjects>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetProjectsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetProjectsQueryOptions(params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * 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**.\n\nTo create a Project when an **Account Server** is configured you will need a **Product**.\n\nAs 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.\n\nThe 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.\n\n * @summary Create a new Project\n */\nexport const createProject = (\n projectPostBodyBody: ProjectPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"name\", projectPostBodyBody.name);\n if (projectPostBodyBody.private !== undefined) {\n formData.append(\"private\", projectPostBodyBody.private.toString());\n }\n formData.append(\"tier_product_id\", projectPostBodyBody.tier_product_id);\n\n return customInstance<ProjectPostResponse>(\n {\n url: `/project`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getCreateProjectMutationOptions = <\n TError = ErrorType<DmError | void>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createProject>>,\n TError,\n { data: ProjectPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createProject>>,\n TError,\n { data: ProjectPostBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createProject>>,\n { data: ProjectPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createProject(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof createProject>>\n>;\nexport type CreateProjectMutationBody = ProjectPostBodyBody;\nexport type CreateProjectMutationError = ErrorType<DmError | void>;\n\nexport const useCreateProject = <\n TError = ErrorType<DmError | void>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createProject>>,\n TError,\n { data: ProjectPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getCreateProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets the details of a Project that is available to you.\n\n * @summary Get a Project\n */\nexport const getProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProjectGetResponse>(\n { url: `/project/${projectId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProjectQueryKey = (projectId: string) =>\n [\"data-manager-api\", `/project/${projectId}`] as const;\n\nexport const getGetProjectQueryOptions = <\n TData = Awaited<ReturnType<typeof getProject>>,\n TError = ErrorType<void | DmError>\n>(\n projectId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({\n signal,\n }) => getProject(projectId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };\n};\n\nexport type GetProjectQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProject>>\n>;\nexport type GetProjectQueryError = ErrorType<void | DmError>;\n\nexport const useGetProject = <\n TData = Awaited<ReturnType<typeof getProject>>,\n TError = ErrorType<void | DmError>\n>(\n projectId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetProjectQueryOptions(projectId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * 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**\n\n * @summary Adjust an existing Project\n */\nexport const patchProject = (\n projectId: string,\n projectPatchBodyBody: ProjectPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (projectPatchBodyBody.private !== undefined) {\n formData.append(\"private\", projectPatchBodyBody.private.toString());\n }\n if (projectPatchBodyBody.name !== undefined) {\n formData.append(\"name\", projectPatchBodyBody.name);\n }\n\n return customInstance<void>(\n {\n url: `/project/${projectId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getPatchProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProject>>,\n TError,\n { projectId: string; data: ProjectPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchProject>>,\n TError,\n { projectId: string; data: ProjectPatchBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProject>>,\n { projectId: string; data: ProjectPatchBodyBody }\n > = (props) => {\n const { projectId, data } = props ?? {};\n\n return patchProject(projectId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchProject>>\n>;\nexport type PatchProjectMutationBody = ProjectPatchBodyBody;\nexport type PatchProjectMutationError = ErrorType<DmError>;\n\nexport const usePatchProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProject>>,\n TError,\n { projectId: string; data: ProjectPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes an existing Project.\n\nYou must be an `editor` or the `owner` of the project.\n\nOnce deleted all **Files**, working directories and material in the Project will also be removed\n\n * @summary Delete a Project\n */\nexport const deleteProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<ProjectDeleteResponse>(\n { url: `/project/${projectId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getDeleteProjectMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProject>>,\n TError,\n { projectId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteProject>>,\n TError,\n { projectId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProject>>,\n { projectId: string }\n > = (props) => {\n const { projectId } = props ?? {};\n\n return deleteProject(projectId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteProject>>\n>;\n\nexport type DeleteProjectMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteProject = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProject>>,\n TError,\n { projectId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.\n\nAn `editor` of a project is not automatically an `editor` of any datasets the project contains.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Add a Project Editor\n */\nexport const addEditorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddEditorToProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToProject>>,\n { projectId: string; userId: string }\n > = (props) => {\n const { projectId, userId } = props ?? {};\n\n return addEditorToProject(projectId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddEditorToProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToProject>>\n>;\n\nexport type AddEditorToProjectMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddEditorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a project `editor`. The editor can be you.\n\nA project must always have one `editor` so you will not be able to delete the last editor of a project.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Delete a Project Editor\n */\nexport const removeEditorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveEditorFromProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n { projectId: string; userId: string }\n > = (props) => {\n const { projectId, userId } = props ?? {};\n\n return removeEditorFromProject(projectId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveEditorFromProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromProject>>\n>;\n\nexport type RemoveEditorFromProjectMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * 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**.\n\nYou must be an `editor` or the `owner` of the Project to add Observers\n\n * @summary Add a Project Observer\n */\nexport const addObserverToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/observer/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddObserverToProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addObserverToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addObserverToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addObserverToProject>>,\n { projectId: string; userId: string }\n > = (props) => {\n const { projectId, userId } = props ?? {};\n\n return addObserverToProject(projectId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddObserverToProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof addObserverToProject>>\n>;\n\nexport type AddObserverToProjectMutationError = ErrorType<DmError>;\n\nexport const useAddObserverToProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addObserverToProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a project `observer`.\n\nYou must be an `editor` or the `owner` of the Project to remove Observers\n\n * @summary Delete a Project Observer\n */\nexport const removeObserverFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/observer/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveObserverFromProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n { projectId: string; userId: string }\n > = (props) => {\n const { projectId, userId } = props ?? {};\n\n return removeObserverFromProject(projectId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveObserverFromProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeObserverFromProject>>\n>;\n\nexport type RemoveObserverFromProjectMutationError = ErrorType<DmError>;\n\nexport const useRemoveObserverFromProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n TError,\n { projectId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * 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).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nYou must be an `editor` or the `owner` of the Project if the Project is `private`\n\n * @summary Download a Project file\n */\nexport const getProjectFile = (\n projectId: string,\n params: GetProjectFileParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/file`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetProjectFileQueryKey = (\n projectId: string,\n params: GetProjectFileParams\n) => [\"data-manager-api\", `/project/${projectId}/file`, ...(params ? [params] : [])] as const;\n\nexport const getGetProjectFileQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<DmError>\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({\n signal,\n }) => getProjectFile(projectId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };\n};\n\nexport type GetProjectFileQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjectFile>>\n>;\nexport type GetProjectFileQueryError = ErrorType<DmError>;\n\nexport const useGetProjectFile = <\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<DmError>\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetProjectFileQueryOptions(\n projectId,\n params,\n options\n );\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Upload a file into a Project\n */\nexport const addFileToProject = (\n projectId: string,\n projectFilePutBodyBody: ProjectFilePutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"file\", projectFilePutBodyBody.file);\n if (projectFilePutBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", projectFilePutBodyBody.as_filename);\n }\n if (projectFilePutBodyBody.path !== undefined) {\n formData.append(\"path\", projectFilePutBodyBody.path);\n }\n\n return customInstance<void>(\n {\n url: `/project/${projectId}/file`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getAddFileToProjectMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addFileToProject>>,\n { projectId: string; data: ProjectFilePutBodyBody }\n > = (props) => {\n const { projectId, data } = props ?? {};\n\n return addFileToProject(projectId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddFileToProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof addFileToProject>>\n>;\nexport type AddFileToProjectMutationBody = ProjectFilePutBodyBody;\nexport type AddFileToProjectMutationError = ErrorType<DmError>;\n\nexport const useAddFileToProject = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddFileToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * 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).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nAs there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.\n\n * @summary Download a Project file using a Token\n */\nexport const getProjectFileWithToken = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n {\n url: `/project/${projectId}/file-with-token`,\n method: \"get\",\n params,\n signal,\n },\n options\n );\n};\n\nexport const getGetProjectFileWithTokenQueryKey = (\n projectId: string,\n params: GetProjectFileWithTokenParams\n) =>\n [\n \"data-manager-api\",\n `/project/${projectId}/file-with-token`,\n ...(params ? [params] : []),\n ] as const;\n\nexport const getGetProjectFileWithTokenQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getGetProjectFileWithTokenQueryKey(projectId, params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n > = ({ signal }) =>\n getProjectFileWithToken(projectId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!projectId, ...queryOptions };\n};\n\nexport type GetProjectFileWithTokenQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n>;\nexport type GetProjectFileWithTokenQueryError = ErrorType<DmError>;\n\nexport const useGetProjectFileWithToken = <\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetProjectFileWithTokenQueryOptions(\n projectId,\n params,\n options\n );\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/project/project.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAsCA,IAAM,cAAc,CACvB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MACxB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,yBAAyB,CAAC,WAAgC;AAEnE,SAAO,CAAC,oBAAoB,YAAY,GAAI,SAAS,CAAC,MAAM,IAAG,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yC,CAA2F,WAC7I,QAAuC,YACtC;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mCAAmC,WAAU,MAAM;AAI7F,QAAM,UAA8E,CAAC,EAAE,OAAO,MAAM,wBAAwB,WAAU,QAAQ,gBAAgB,MAAM;AAMrK,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,6BAA6B,CACzC,WACG,QAAuC,YAEqB;AAE9D,QAAM,eAAe,uCAAuC,WAAU,QAAO,OAAO;AAEpF,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetProjectFileParams,\n GetProjectFileWithTokenParams,\n GetProjectsParams,\n ProjectDetail,\n ProjectFilePutBodyBody,\n ProjectPatchBodyBody,\n ProjectPostBodyBody,\n ProjectPostResponse,\n ProjectsGetResponse,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary Get all Projects available to you\n */\nexport const getProjects = (\n params?: GetProjectsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectsGetResponse>(\n {url: `/project`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectsQueryKey = (params?: GetProjectsParams,) => {\n \n return [\"data-manager-api\", `/project`, ...(params ? [params]: [])] as const;\n }\n\n \nexport 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>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectsQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>\nexport type GetProjectsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get all Projects available to you\n */\nexport const useGetProjects = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * 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**.\n\nTo create a Project when an **Account Server** is configured you will need a **Product**.\n\nAs 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.\n\nThe 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.\n\n * @summary Create a new Project\n */\nexport const createProject = (\n projectPostBodyBody: ProjectPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', projectPostBodyBody.name)\nif(projectPostBodyBody.private !== undefined) {\n formData.append('private', projectPostBodyBody.private.toString())\n }\nformData.append('tier_product_id', projectPostBodyBody.tier_product_id)\n\n return customInstance<ProjectPostResponse>(\n {url: `/project`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateProjectMutationOptions = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createProject>>, {data: ProjectPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createProject(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateProjectMutationResult = NonNullable<Awaited<ReturnType<typeof createProject>>>\n export type CreateProjectMutationBody = ProjectPostBodyBody\n export type CreateProjectMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Create a new Project\n */\nexport const useCreateProject = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the details of a Project that is available to you.\n\n * @summary Get a Project\n */\nexport const getProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectDetail>(\n {url: `/project/${projectId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProjectQueryKey = (projectId: string,) => {\n \n return [\"data-manager-api\", `/project/${projectId}`] as const;\n }\n\n \nexport 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>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>\nexport type GetProjectQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get a Project\n */\nexport const useGetProject = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectQueryOptions(projectId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * 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**\n\n * @summary Adjust an existing Project\n */\nexport const patchProject = (\n projectId: string,\n projectPatchBodyBody: ProjectPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(projectPatchBodyBody.private !== undefined) {\n formData.append('private', projectPatchBodyBody.private.toString())\n }\nif(projectPatchBodyBody.name !== undefined) {\n formData.append('name', projectPatchBodyBody.name)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}`, method: 'patch',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProject>>, {projectId: string;data: ProjectPatchBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return patchProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchProjectMutationResult = NonNullable<Awaited<ReturnType<typeof patchProject>>>\n export type PatchProjectMutationBody = ProjectPatchBodyBody\n export type PatchProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Adjust an existing Project\n */\nexport const usePatchProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an existing Project.\n\nYou must be an `editor` or the `owner` of the project.\n\nOnce deleted all **Files**, working directories and material in the Project will also be removed\n\n * @summary Delete a Project\n */\nexport const deleteProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<TaskIdentity>(\n {url: `/project/${projectId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProject>>, {projectId: string}> = (props) => {\n const {projectId} = props ?? {};\n\n return deleteProject(projectId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteProjectMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProject>>>\n \n export type DeleteProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project\n */\nexport const useDeleteProject = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.\n\nAn `editor` of a project is not automatically an `editor` of any datasets the project contains.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Add a Project Editor\n */\nexport const addEditorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addEditorToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToProject>>>\n \n export type AddEditorToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Editor\n */\nexport const useAddEditorToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddEditorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `editor`. The editor can be you.\n\nA project must always have one `editor` so you will not be able to delete the last editor of a project.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Delete a Project Editor\n */\nexport const removeEditorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeEditorFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromProject>>>\n \n export type RemoveEditorFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Editor\n */\nexport const useRemoveEditorFromProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * 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**.\n\nYou must be an `editor` or the `owner` of the Project to add Observers\n\n * @summary Add a Project Observer\n */\nexport const addObserverToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addObserverToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addObserverToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddObserverToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addObserverToProject>>>\n \n export type AddObserverToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Observer\n */\nexport const useAddObserverToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `observer`.\n\nYou must be an `editor` or the `owner` of the Project to remove Observers\n\n * @summary Delete a Project Observer\n */\nexport const removeObserverFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeObserverFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeObserverFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveObserverFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeObserverFromProject>>>\n \n export type RemoveObserverFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Observer\n */\nexport const useRemoveObserverFromProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * 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).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nYou must be an `editor` or the `owner` of the Project if the Project is `private`\n\n * @summary Download a Project file\n */\nexport const getProjectFile = (\n projectId: string,\n params: GetProjectFileParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileQueryKey = (projectId: string,\n params: GetProjectFileParams,) => {\n \n return [\"data-manager-api\", `/project/${projectId}/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>\nexport type GetProjectFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file\n */\nexport const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Upload a file into a Project\n */\nexport const addFileToProject = (\n projectId: string,\n projectFilePutBodyBody: ProjectFilePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('file', projectFilePutBodyBody.file)\nif(projectFilePutBodyBody.as_filename !== undefined) {\n formData.append('as_filename', projectFilePutBodyBody.as_filename)\n }\nif(projectFilePutBodyBody.path !== undefined) {\n formData.append('path', projectFilePutBodyBody.path)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addFileToProject>>, {projectId: string;data: ProjectFilePutBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return addFileToProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>\n export type AddFileToProjectMutationBody = ProjectFilePutBodyBody\n export type AddFileToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddFileToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * 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).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nAs there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.\n\n * @summary Download a Project file using a Token\n */\nexport const getProjectFileWithToken = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file-with-token`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileWithTokenQueryKey = (projectId: string,\n params: GetProjectFileWithTokenParams,) => {\n \n return [\"data-manager-api\", `/project/${projectId}/file-with-token`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileWithTokenQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>\nexport type GetProjectFileWithTokenQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file using a Token\n */\nexport const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|