@squonk/data-manager-client 1.2.7 → 1.2.8-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounting/accounting.d.cts +1 -1
- package/accounting/accounting.d.ts +1 -1
- package/admin/admin.d.cts +1 -1
- package/admin/admin.d.ts +1 -1
- package/application/application.d.cts +1 -1
- package/application/application.d.ts +1 -1
- package/configuration/configuration.d.cts +1 -1
- package/configuration/configuration.d.ts +1 -1
- package/{custom-instance-b1bb92a3.d.ts → custom-instance-37ed2460.d.ts} +23 -1
- package/dataset/dataset.d.cts +1 -1
- package/dataset/dataset.d.ts +1 -1
- package/exchange-rate/exchange-rate.d.cts +1 -1
- package/exchange-rate/exchange-rate.d.ts +1 -1
- package/{file/file.cjs → file-and-path/file-and-path.cjs} +53 -3
- package/file-and-path/file-and-path.cjs.map +1 -0
- package/{file/file.d.ts → file-and-path/file-and-path.d.cts} +63 -5
- package/{file/file.d.cts → file-and-path/file-and-path.d.ts} +63 -5
- package/{file/file.js → file-and-path/file-and-path.js} +52 -2
- package/file-and-path/file-and-path.js.map +1 -0
- package/file-and-path/package.json +7 -0
- package/index.cjs.map +1 -1
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/instance/instance.d.cts +1 -1
- package/instance/instance.d.ts +1 -1
- package/job/job.d.cts +1 -1
- package/job/job.d.ts +1 -1
- package/metadata/metadata.d.cts +1 -1
- package/metadata/metadata.d.ts +1 -1
- package/package.json +1 -1
- package/project/project.d.cts +1 -1
- package/project/project.d.ts +1 -1
- package/src/data-manager-api.schemas.ts +24 -0
- package/src/{file/file.ts → file-and-path/file-and-path.ts} +116 -0
- package/task/task.d.cts +1 -1
- package/task/task.d.ts +1 -1
- package/type/type.d.cts +1 -1
- package/type/type.d.ts +1 -1
- package/user/user.d.cts +1 -1
- package/user/user.d.ts +1 -1
- package/file/file.cjs.map +0 -1
- package/file/file.js.map +0 -1
- package/file/package.json +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, bT as AccountServerGetNamespaceResponse, b_ as ErrorType, bV as DmError, bU as AccountServerGetRegistrationResponse, b9 as VersionGetResponse } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, bT as AccountServerGetNamespaceResponse, b_ as ErrorType, bV as DmError, bU as AccountServerGetRegistrationResponse, b9 as VersionGetResponse } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
package/admin/admin.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { b as AdminGetServiceErrorsParams,
|
|
3
|
+
import { b as AdminGetServiceErrorsParams, bZ as customInstance, bh as ServiceErrorsGetResponse, b_ as ErrorType, bV as DmError, a as AdminGetUsersParams, bP as AdminUsersGetResponse, an as UserAccountDetail, a7 as UserPatchBodyBody, bS as AdminJobManifestGetResponse, ad as JobManifestPutBodyBody, bR as AdminJobManifestLoadPutResponse, A as AdminDeleteJobManifestParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
package/admin/admin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { b as AdminGetServiceErrorsParams,
|
|
3
|
+
import { b as AdminGetServiceErrorsParams, bZ as customInstance, bh as ServiceErrorsGetResponse, b_ as ErrorType, bV as DmError, a as AdminGetUsersParams, bP as AdminUsersGetResponse, an as UserAccountDetail, a7 as UserPatchBodyBody, bS as AdminJobManifestGetResponse, ad as JobManifestPutBodyBody, bR as AdminJobManifestLoadPutResponse, A as AdminDeleteJobManifestParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, bN as ApplicationsGetResponse, b_ as ErrorType, bV as DmError, bO as ApplicationGetResponse } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, bN as ApplicationsGetResponse, b_ as ErrorType, bV as DmError, bO as ApplicationGetResponse } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, b8 as ModeGetResponse, b_ as ErrorType, bV as DmError } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bZ as customInstance, b8 as ModeGetResponse, b_ as ErrorType, bV as DmError } from '../custom-instance-37ed2460.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -274,6 +274,28 @@ type GetProjectsParams = {
|
|
|
274
274
|
*/
|
|
275
275
|
project_name?: QProjectNameParameter;
|
|
276
276
|
};
|
|
277
|
+
type DeletePathParams = {
|
|
278
|
+
/**
|
|
279
|
+
* The Project identity
|
|
280
|
+
*/
|
|
281
|
+
project_id: QFileProjectIdParameter;
|
|
282
|
+
/**
|
|
283
|
+
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
284
|
+
|
|
285
|
+
*/
|
|
286
|
+
path?: QFilePathParameter;
|
|
287
|
+
};
|
|
288
|
+
type CreatePathParams = {
|
|
289
|
+
/**
|
|
290
|
+
* The Project identity
|
|
291
|
+
*/
|
|
292
|
+
project_id: QFileProjectIdParameter;
|
|
293
|
+
/**
|
|
294
|
+
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
295
|
+
|
|
296
|
+
*/
|
|
297
|
+
path?: QFilePathParameter;
|
|
298
|
+
};
|
|
277
299
|
/**
|
|
278
300
|
* Filter the datasets by a comma separated list of editors
|
|
279
301
|
|
|
@@ -1989,4 +2011,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
1989
2011
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
|
|
1990
2012
|
type ErrorType<TError> = AxiosError<TError>;
|
|
1991
2013
|
|
|
1992
|
-
export {
|
|
2014
|
+
export { QExcludeRemovalParameter as $, AdminDeleteJobManifestParams as A, QInstanceCallbackContextParameter as B, CreatePathParams as C, DeleteUnmanagedFileParams as D, QProjectNameParameter as E, QProjectIdParameter as F, GetUserApiLogParams as G, QLabelsParameter as H, QOnlyUndefinedParameter as I, QKeepProjectFilesParameter as J, QJobVersionParameter as K, QJobJobParameter as L, QJobIdParameter as M, QJobCollectionParameter as N, QInstanceArchiveParameter as O, PatchInstanceParams as P, QEditorsParameter as Q, QIncludeHiddenParameter as R, QIncludeDeletedParameter as S, QIncludeAcknowlegedParameter as T, QFromParameter as U, QFileProjectIdParameter as V, QFilePathParameter as W, QFileParameter as X, QActiveDaysParameter as Y, QIdleDaysParameter as Z, QExcludePurposeParameter as _, AdminGetUsersParams as a, DatasetVersionDetailLabels as a$, QExcludeDoneParameter as a0, QEventPriorOrdinalParameter as a1, QEventLimitParameter as a2, QDatasetMimeTypeParameter as a3, QDoNotImpersonateParameter as a4, QCurrentParameter as a5, QApplicationIdParameter as a6, UserPatchBodyBody as a7, UserAccountPatchBodyBody as a8, ProjectPostBodyBody as a9, ProjectFileDetail as aA, ProjectDetail as aB, JobReplacement as aC, JobReplacements as aD, JobOrderDetail as aE, JobVariablesOutputs as aF, JobVariablesOptions as aG, JobVariablesInputs as aH, JobVariables as aI, JobSummaryImageType as aJ, JobSummary as aK, JobManifestDetail as aL, JobApplication as aM, InstanceSummaryPhase as aN, InstanceSummaryJobImageType as aO, InstanceSummaryApplicationType as aP, InstanceSummary as aQ, FileStat as aR, FilePathFile as aS, JobExchangeRateSummary as aT, ApplicationExchangeRateSummary as aU, ExchangeRateDetail as aV, DatasetVersionSummaryProcessingStage as aW, DatasetVersionSummaryLabels as aX, DatasetVersionSummary as aY, DatasetVersionProjectFile as aZ, DatasetVersionDetailProcessingStage as a_, ProjectPatchBodyBody as aa, ProjectFilePutBodyBody as ab, ExchangeRatePutBodyBody as ac, JobManifestPutBodyBody as ad, InstancePostBodyBody as ae, FilePostBodyBody as af, DatasetPutBodyBody as ag, DatasetVersionMetaPostBodyBody as ah, DatasetMetaPostBodyBody as ai, DatasetPostBodyBody as aj, AsAdditionalDataProcessingCharge as ak, UserSummary as al, UserDetail as am, UserAccountDetail as an, TypeSummaryFormatterOptionsType as ao, TypeSummaryFormatterOptions as ap, TypeSummary as aq, TaskSummaryProcessingStage as ar, TaskSummary as as, TaskStateState as at, TaskState as au, TaskIdentity as av, TaskEventLevel as aw, TaskEvent as ax, ServiceErrorSummarySeverity as ay, ServiceErrorSummary as az, AdminGetServiceErrorsParams as b, DatasetVersionDetail as b0, DatasetSummary as b1, DatasetDetail as b2, ApplicationSummary as b3, ApplicationImageVariant as b4, ApplicationImageVariants as b5, ApiLogDetailMethod as b6, ApiLogDetail as b7, ModeGetResponse as b8, VersionGetResponse as b9, FilesGetResponse as bA, FilePostResponse as bB, InstancePostResponse as bC, InstanceDryRunPostResponse as bD, InstanceDeleteResponse as bE, DatasetsGetResponse as bF, DatasetVersionsGetResponse as bG, DatasetVersionDeleteResponse as bH, DatasetSchemaGetResponseType as bI, DatasetSchemaGetResponse as bJ, DatasetMetaGetResponse as bK, DatasetDigestGetResponse as bL, DatasetPutPostResponse as bM, ApplicationsGetResponse as bN, ApplicationGetResponse as bO, AdminUsersGetResponse as bP, AdminUserPutResponse as bQ, AdminJobManifestLoadPutResponse as bR, AdminJobManifestGetResponse as bS, AccountServerGetNamespaceResponse as bT, AccountServerGetRegistrationResponse as bU, DmError as bV, AXIOS_INSTANCE as bW, setAuthToken as bX, setBaseUrl as bY, customInstance as bZ, ErrorType as b_, UsersGetResponse as ba, UserApiLogGetResponse as bb, UserAccountGetResponse as bc, TypesGetResponse as bd, TasksGetResponse as be, TaskGetResponsePurpose as bf, TaskGetResponse as bg, ServiceErrorsGetResponse as bh, ProjectsGetResponse as bi, ProjectPostResponse as bj, ProjectGetResponse as bk, ProjectDeleteResponse as bl, JobsGetResponse as bm, JobGetResponseImageType as bn, JobGetResponse as bo, InstanceTaskPurpose as bp, InstanceTask as bq, InstancesGetResponse as br, InstanceGetResponsePhase as bs, InstanceGetResponseJobImageType as bt, InstanceGetResponseApplicationType as bu, InstanceGetResponse as bv, GetExchangeRatesResponseId as bw, GetExchangeRatesResponse as bx, GetAllExchangeRatesResponseExchangeRatesItem as by, GetAllExchangeRatesResponse as bz, GetUserAccountParams as c, GetInstancesParams as d, GetJobExchangeRatesParams as e, GetAllJobExchangeRatesParams as f, GetJobParams as g, GetJobByVersionParams as h, GetJobsParams as i, GetApplicationExchangeRatesParams as j, GetAllApplicationExchangeRatesParams as k, GetTaskParams as l, GetTasksParams as m, GetFilesParams as n, DeleteDatasetParams as o, GetVersionsParams as p, GetDatasetsParams as q, GetProjectFileWithTokenParams as r, GetProjectFileParams as s, GetProjectsParams as t, DeletePathParams as u, QPurgeParameter as v, QOwnersParameter as w, QUsernameParameter as x, QUntilParameter as y, QTokenParameter as z };
|
package/dataset/dataset.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { ag as DatasetPutBodyBody, bZ as customInstance, bM as DatasetPutPostResponse, b_ as ErrorType, bV as DmError, aj as DatasetPostBodyBody, q as GetDatasetsParams, bF as DatasetsGetResponse, p as GetVersionsParams, b2 as DatasetDetail, o as DeleteDatasetParams, av as TaskIdentity, bL as DatasetDigestGetResponse, bJ as DatasetSchemaGetResponse } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
package/dataset/dataset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { ag as DatasetPutBodyBody, bZ as customInstance, bM as DatasetPutPostResponse, b_ as ErrorType, bV as DmError, aj as DatasetPostBodyBody, q as GetDatasetsParams, bF as DatasetsGetResponse, p as GetVersionsParams, b2 as DatasetDetail, o as DeleteDatasetParams, av as TaskIdentity, bL as DatasetDigestGetResponse, bJ as DatasetSchemaGetResponse } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { k as GetAllApplicationExchangeRatesParams,
|
|
3
|
+
import { k as GetAllApplicationExchangeRatesParams, bZ as customInstance, bz as GetAllExchangeRatesResponse, b_ as ErrorType, bV as DmError, ac as ExchangeRatePutBodyBody, j as GetApplicationExchangeRatesParams, bx as GetExchangeRatesResponse, f as GetAllJobExchangeRatesParams, e as GetJobExchangeRatesParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { k as GetAllApplicationExchangeRatesParams,
|
|
3
|
+
import { k as GetAllApplicationExchangeRatesParams, bZ as customInstance, bz as GetAllExchangeRatesResponse, b_ as ErrorType, bV as DmError, ac as ExchangeRatePutBodyBody, j as GetApplicationExchangeRatesParams, bx as GetExchangeRatesResponse, f as GetAllJobExchangeRatesParams, e as GetJobExchangeRatesParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -2,11 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
|
|
4
4
|
|
|
5
|
-
// src/file/file.ts
|
|
5
|
+
// src/file-and-path/file-and-path.ts
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _reactquery = require('@tanstack/react-query');
|
|
10
|
+
var createPath = (params, options) => {
|
|
11
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
12
|
+
{
|
|
13
|
+
url: `/path`,
|
|
14
|
+
method: "put",
|
|
15
|
+
params
|
|
16
|
+
},
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
var getCreatePathMutationOptions = (options) => {
|
|
21
|
+
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
22
|
+
const mutationFn = (props) => {
|
|
23
|
+
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
24
|
+
return createPath(params, requestOptions);
|
|
25
|
+
};
|
|
26
|
+
return { mutationFn, ...mutationOptions };
|
|
27
|
+
};
|
|
28
|
+
var useCreatePath = (options) => {
|
|
29
|
+
const mutationOptions = getCreatePathMutationOptions(options);
|
|
30
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
31
|
+
};
|
|
32
|
+
var deletePath = (params, options) => {
|
|
33
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
34
|
+
{
|
|
35
|
+
url: `/path`,
|
|
36
|
+
method: "delete",
|
|
37
|
+
params
|
|
38
|
+
},
|
|
39
|
+
options
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
var getDeletePathMutationOptions = (options) => {
|
|
43
|
+
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
44
|
+
const mutationFn = (props) => {
|
|
45
|
+
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
46
|
+
return deletePath(params, requestOptions);
|
|
47
|
+
};
|
|
48
|
+
return { mutationFn, ...mutationOptions };
|
|
49
|
+
};
|
|
50
|
+
var useDeletePath = (options) => {
|
|
51
|
+
const mutationOptions = getDeletePathMutationOptions(options);
|
|
52
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
53
|
+
};
|
|
10
54
|
var getFiles = (params, options, signal) => {
|
|
11
55
|
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
12
56
|
{
|
|
@@ -156,5 +200,11 @@ var useDownloadFile = (fileId, options) => {
|
|
|
156
200
|
|
|
157
201
|
|
|
158
202
|
|
|
159
|
-
|
|
160
|
-
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getAttachFileMutationOptions = getAttachFileMutationOptions; exports.getCreatePathMutationOptions = getCreatePathMutationOptions; exports.getDeleteFileMutationOptions = getDeleteFileMutationOptions; exports.getDeletePathMutationOptions = getDeletePathMutationOptions; exports.getDeleteUnmanagedFileMutationOptions = getDeleteUnmanagedFileMutationOptions; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getDownloadFileQueryOptions = getDownloadFileQueryOptions; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.getGetFilesQueryOptions = getGetFilesQueryOptions; exports.useAttachFile = useAttachFile; exports.useCreatePath = useCreatePath; exports.useDeleteFile = useDeleteFile; exports.useDeletePath = useDeletePath; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDownloadFile = useDownloadFile; exports.useGetFiles = useGetFiles;
|
|
210
|
+
//# sourceMappingURL=file-and-path.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAuCA,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YACsF;AAC7G,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAmG,CAAC,UAAU;AAChH,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC;AAQG,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YACsF;AAC7G,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAmG,CAAC,UAAU;AAChH,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,k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ACT;AAIG,IAAM,+BAA+B,CAEpB,YAC4E;AACnG,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAyF,CAAC,UAAU;AACtG,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC;AAQG,IAAM,eAAe,CACxB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IAC1C;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,CAAC,WAAoB;AAExD,SAAO,CAAC,oBAAoB,SAAS,MAAM,EAAE;AAC7C;AAGG,IAAM,8BAA8B,CAAgF,QAAgB,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB,MAAM;AAIxE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,QAAQ,gBAAgB,MAAM;AAMrI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,kBAAkB,CAC9B,QAAgB,YAE+C;AAE9D,QAAM,eAAe,4BAA4B,QAAO,OAAO;AAE/D,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 CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams\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 * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project owners or editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'put',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.\n\nOnly Project owners or editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n \n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Files on a Project Path\n */\nexport const useGetFiles = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFilesQueryOptions(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 * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **File**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the `/task` endpoint to determine when the file is available to the project.\n\nOnly Datasets attached to projects are available through the Project API. A Dataset that you upload is only available to others (who are not already `editors` of the data) when the Dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n \n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a File (from a project)\n */\nexport const useDownloadFile = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(\n fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,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"]}
|
|
@@ -1,14 +1,72 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult
|
|
3
|
-
import {
|
|
2
|
+
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import { C as CreatePathParams, bZ as customInstance, b_ as ErrorType, bV as DmError, u as DeletePathParams, n as GetFilesParams, bA as FilesGetResponse, af as FilePostBodyBody, bB as FilePostResponse, D as DeleteUnmanagedFileParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Only Project owners or editors can create Paths.
|
|
11
|
+
|
|
12
|
+
* @summary Create a new Project Path
|
|
11
13
|
*/
|
|
14
|
+
declare const createPath: (params: CreatePathParams, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
15
|
+
declare const getCreatePathMutationOptions: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
16
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
17
|
+
params: CreatePathParams;
|
|
18
|
+
}, TContext> | undefined;
|
|
19
|
+
request?: SecondParameter<typeof customInstance>;
|
|
20
|
+
} | undefined) => UseMutationOptions<void, TError, {
|
|
21
|
+
params: CreatePathParams;
|
|
22
|
+
}, TContext>;
|
|
23
|
+
type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>;
|
|
24
|
+
type CreatePathMutationError = ErrorType<DmError>;
|
|
25
|
+
/**
|
|
26
|
+
* @summary Create a new Project Path
|
|
27
|
+
*/
|
|
28
|
+
declare const useCreatePath: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
29
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
30
|
+
params: CreatePathParams;
|
|
31
|
+
}, TContext> | undefined;
|
|
32
|
+
request?: SecondParameter<typeof customInstance>;
|
|
33
|
+
} | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
|
|
34
|
+
params: CreatePathParams;
|
|
35
|
+
}, TContext>;
|
|
36
|
+
/**
|
|
37
|
+
* Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.
|
|
38
|
+
|
|
39
|
+
Only Project owners or editors can delete Paths.
|
|
40
|
+
|
|
41
|
+
* @summary Delete a Project Path
|
|
42
|
+
*/
|
|
43
|
+
declare const deletePath: (params: DeletePathParams, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
44
|
+
declare const getDeletePathMutationOptions: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
45
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
46
|
+
params: DeletePathParams;
|
|
47
|
+
}, TContext> | undefined;
|
|
48
|
+
request?: SecondParameter<typeof customInstance>;
|
|
49
|
+
} | undefined) => UseMutationOptions<void, TError, {
|
|
50
|
+
params: DeletePathParams;
|
|
51
|
+
}, TContext>;
|
|
52
|
+
type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>;
|
|
53
|
+
type DeletePathMutationError = ErrorType<DmError>;
|
|
54
|
+
/**
|
|
55
|
+
* @summary Delete a Project Path
|
|
56
|
+
*/
|
|
57
|
+
declare const useDeletePath: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
58
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
59
|
+
params: DeletePathParams;
|
|
60
|
+
}, TContext> | undefined;
|
|
61
|
+
request?: SecondParameter<typeof customInstance>;
|
|
62
|
+
} | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
|
|
63
|
+
params: DeletePathParams;
|
|
64
|
+
}, TContext>;
|
|
65
|
+
/**
|
|
66
|
+
* Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).
|
|
67
|
+
|
|
68
|
+
* @summary Gets the Files on a Project Path
|
|
69
|
+
*/
|
|
12
70
|
declare const getFiles: (params: GetFilesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<FilesGetResponse>;
|
|
13
71
|
declare const getGetFilesQueryKey: (params: GetFilesParams) => readonly ["data-manager-api", "/file", ...GetFilesParams[]];
|
|
14
72
|
declare const getGetFilesQueryOptions: <TData = FilesGetResponse, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: {
|
|
@@ -151,4 +209,4 @@ declare const useDownloadFile: <TData = void, TError = ErrorType<DmError>>(fileI
|
|
|
151
209
|
queryKey: QueryKey;
|
|
152
210
|
};
|
|
153
211
|
|
|
154
|
-
export { AttachFileMutationBody, AttachFileMutationError, AttachFileMutationResult, DeleteFileMutationError, DeleteFileMutationResult, DeleteUnmanagedFileMutationError, DeleteUnmanagedFileMutationResult, DownloadFileQueryError, DownloadFileQueryResult, GetFilesQueryError, GetFilesQueryResult, attachFile, deleteFile, deleteUnmanagedFile, downloadFile, getAttachFileMutationOptions, getDeleteFileMutationOptions, getDeleteUnmanagedFileMutationOptions, getDownloadFileQueryKey, getDownloadFileQueryOptions, getFiles, getGetFilesQueryKey, getGetFilesQueryOptions, useAttachFile, useDeleteFile, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
|
|
212
|
+
export { AttachFileMutationBody, AttachFileMutationError, AttachFileMutationResult, CreatePathMutationError, CreatePathMutationResult, DeleteFileMutationError, DeleteFileMutationResult, DeletePathMutationError, DeletePathMutationResult, DeleteUnmanagedFileMutationError, DeleteUnmanagedFileMutationResult, DownloadFileQueryError, DownloadFileQueryResult, GetFilesQueryError, GetFilesQueryResult, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getAttachFileMutationOptions, getCreatePathMutationOptions, getDeleteFileMutationOptions, getDeletePathMutationOptions, getDeleteUnmanagedFileMutationOptions, getDownloadFileQueryKey, getDownloadFileQueryOptions, getFiles, getGetFilesQueryKey, getGetFilesQueryOptions, useAttachFile, useCreatePath, useDeleteFile, useDeletePath, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
|
|
@@ -1,14 +1,72 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult
|
|
3
|
-
import {
|
|
2
|
+
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import { C as CreatePathParams, bZ as customInstance, b_ as ErrorType, bV as DmError, u as DeletePathParams, n as GetFilesParams, bA as FilesGetResponse, af as FilePostBodyBody, bB as FilePostResponse, D as DeleteUnmanagedFileParams } from '../custom-instance-37ed2460.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Only Project owners or editors can create Paths.
|
|
11
|
+
|
|
12
|
+
* @summary Create a new Project Path
|
|
11
13
|
*/
|
|
14
|
+
declare const createPath: (params: CreatePathParams, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
15
|
+
declare const getCreatePathMutationOptions: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
16
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
17
|
+
params: CreatePathParams;
|
|
18
|
+
}, TContext> | undefined;
|
|
19
|
+
request?: SecondParameter<typeof customInstance>;
|
|
20
|
+
} | undefined) => UseMutationOptions<void, TError, {
|
|
21
|
+
params: CreatePathParams;
|
|
22
|
+
}, TContext>;
|
|
23
|
+
type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>;
|
|
24
|
+
type CreatePathMutationError = ErrorType<DmError>;
|
|
25
|
+
/**
|
|
26
|
+
* @summary Create a new Project Path
|
|
27
|
+
*/
|
|
28
|
+
declare const useCreatePath: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
29
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
30
|
+
params: CreatePathParams;
|
|
31
|
+
}, TContext> | undefined;
|
|
32
|
+
request?: SecondParameter<typeof customInstance>;
|
|
33
|
+
} | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
|
|
34
|
+
params: CreatePathParams;
|
|
35
|
+
}, TContext>;
|
|
36
|
+
/**
|
|
37
|
+
* Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.
|
|
38
|
+
|
|
39
|
+
Only Project owners or editors can delete Paths.
|
|
40
|
+
|
|
41
|
+
* @summary Delete a Project Path
|
|
42
|
+
*/
|
|
43
|
+
declare const deletePath: (params: DeletePathParams, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
44
|
+
declare const getDeletePathMutationOptions: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
45
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
46
|
+
params: DeletePathParams;
|
|
47
|
+
}, TContext> | undefined;
|
|
48
|
+
request?: SecondParameter<typeof customInstance>;
|
|
49
|
+
} | undefined) => UseMutationOptions<void, TError, {
|
|
50
|
+
params: DeletePathParams;
|
|
51
|
+
}, TContext>;
|
|
52
|
+
type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>;
|
|
53
|
+
type DeletePathMutationError = ErrorType<DmError>;
|
|
54
|
+
/**
|
|
55
|
+
* @summary Delete a Project Path
|
|
56
|
+
*/
|
|
57
|
+
declare const useDeletePath: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
58
|
+
mutation?: UseMutationOptions<void, TError, {
|
|
59
|
+
params: DeletePathParams;
|
|
60
|
+
}, TContext> | undefined;
|
|
61
|
+
request?: SecondParameter<typeof customInstance>;
|
|
62
|
+
} | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
|
|
63
|
+
params: DeletePathParams;
|
|
64
|
+
}, TContext>;
|
|
65
|
+
/**
|
|
66
|
+
* Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).
|
|
67
|
+
|
|
68
|
+
* @summary Gets the Files on a Project Path
|
|
69
|
+
*/
|
|
12
70
|
declare const getFiles: (params: GetFilesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<FilesGetResponse>;
|
|
13
71
|
declare const getGetFilesQueryKey: (params: GetFilesParams) => readonly ["data-manager-api", "/file", ...GetFilesParams[]];
|
|
14
72
|
declare const getGetFilesQueryOptions: <TData = FilesGetResponse, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: {
|
|
@@ -151,4 +209,4 @@ declare const useDownloadFile: <TData = void, TError = ErrorType<DmError>>(fileI
|
|
|
151
209
|
queryKey: QueryKey;
|
|
152
210
|
};
|
|
153
211
|
|
|
154
|
-
export { AttachFileMutationBody, AttachFileMutationError, AttachFileMutationResult, DeleteFileMutationError, DeleteFileMutationResult, DeleteUnmanagedFileMutationError, DeleteUnmanagedFileMutationResult, DownloadFileQueryError, DownloadFileQueryResult, GetFilesQueryError, GetFilesQueryResult, attachFile, deleteFile, deleteUnmanagedFile, downloadFile, getAttachFileMutationOptions, getDeleteFileMutationOptions, getDeleteUnmanagedFileMutationOptions, getDownloadFileQueryKey, getDownloadFileQueryOptions, getFiles, getGetFilesQueryKey, getGetFilesQueryOptions, useAttachFile, useDeleteFile, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
|
|
212
|
+
export { AttachFileMutationBody, AttachFileMutationError, AttachFileMutationResult, CreatePathMutationError, CreatePathMutationResult, DeleteFileMutationError, DeleteFileMutationResult, DeletePathMutationError, DeletePathMutationResult, DeleteUnmanagedFileMutationError, DeleteUnmanagedFileMutationResult, DownloadFileQueryError, DownloadFileQueryResult, GetFilesQueryError, GetFilesQueryResult, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getAttachFileMutationOptions, getCreatePathMutationOptions, getDeleteFileMutationOptions, getDeletePathMutationOptions, getDeleteUnmanagedFileMutationOptions, getDownloadFileQueryKey, getDownloadFileQueryOptions, getFiles, getGetFilesQueryKey, getGetFilesQueryOptions, useAttachFile, useCreatePath, useDeleteFile, useDeletePath, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
|
|
@@ -2,11 +2,55 @@ import {
|
|
|
2
2
|
customInstance
|
|
3
3
|
} from "../chunk-UKA7G3OB.js";
|
|
4
4
|
|
|
5
|
-
// src/file/file.ts
|
|
5
|
+
// src/file-and-path/file-and-path.ts
|
|
6
6
|
import {
|
|
7
7
|
useMutation,
|
|
8
8
|
useQuery
|
|
9
9
|
} from "@tanstack/react-query";
|
|
10
|
+
var createPath = (params, options) => {
|
|
11
|
+
return customInstance(
|
|
12
|
+
{
|
|
13
|
+
url: `/path`,
|
|
14
|
+
method: "put",
|
|
15
|
+
params
|
|
16
|
+
},
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
var getCreatePathMutationOptions = (options) => {
|
|
21
|
+
const { mutation: mutationOptions, request: requestOptions } = options ?? {};
|
|
22
|
+
const mutationFn = (props) => {
|
|
23
|
+
const { params } = props ?? {};
|
|
24
|
+
return createPath(params, requestOptions);
|
|
25
|
+
};
|
|
26
|
+
return { mutationFn, ...mutationOptions };
|
|
27
|
+
};
|
|
28
|
+
var useCreatePath = (options) => {
|
|
29
|
+
const mutationOptions = getCreatePathMutationOptions(options);
|
|
30
|
+
return useMutation(mutationOptions);
|
|
31
|
+
};
|
|
32
|
+
var deletePath = (params, options) => {
|
|
33
|
+
return customInstance(
|
|
34
|
+
{
|
|
35
|
+
url: `/path`,
|
|
36
|
+
method: "delete",
|
|
37
|
+
params
|
|
38
|
+
},
|
|
39
|
+
options
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
var getDeletePathMutationOptions = (options) => {
|
|
43
|
+
const { mutation: mutationOptions, request: requestOptions } = options ?? {};
|
|
44
|
+
const mutationFn = (props) => {
|
|
45
|
+
const { params } = props ?? {};
|
|
46
|
+
return deletePath(params, requestOptions);
|
|
47
|
+
};
|
|
48
|
+
return { mutationFn, ...mutationOptions };
|
|
49
|
+
};
|
|
50
|
+
var useDeletePath = (options) => {
|
|
51
|
+
const mutationOptions = getDeletePathMutationOptions(options);
|
|
52
|
+
return useMutation(mutationOptions);
|
|
53
|
+
};
|
|
10
54
|
var getFiles = (params, options, signal) => {
|
|
11
55
|
return customInstance(
|
|
12
56
|
{
|
|
@@ -140,11 +184,15 @@ var useDownloadFile = (fileId, options) => {
|
|
|
140
184
|
};
|
|
141
185
|
export {
|
|
142
186
|
attachFile,
|
|
187
|
+
createPath,
|
|
143
188
|
deleteFile,
|
|
189
|
+
deletePath,
|
|
144
190
|
deleteUnmanagedFile,
|
|
145
191
|
downloadFile,
|
|
146
192
|
getAttachFileMutationOptions,
|
|
193
|
+
getCreatePathMutationOptions,
|
|
147
194
|
getDeleteFileMutationOptions,
|
|
195
|
+
getDeletePathMutationOptions,
|
|
148
196
|
getDeleteUnmanagedFileMutationOptions,
|
|
149
197
|
getDownloadFileQueryKey,
|
|
150
198
|
getDownloadFileQueryOptions,
|
|
@@ -152,9 +200,11 @@ export {
|
|
|
152
200
|
getGetFilesQueryKey,
|
|
153
201
|
getGetFilesQueryOptions,
|
|
154
202
|
useAttachFile,
|
|
203
|
+
useCreatePath,
|
|
155
204
|
useDeleteFile,
|
|
205
|
+
useDeletePath,
|
|
156
206
|
useDeleteUnmanagedFile,
|
|
157
207
|
useDownloadFile,
|
|
158
208
|
useGetFiles
|
|
159
209
|
};
|
|
160
|
-
//# sourceMappingURL=file.js.map
|
|
210
|
+
//# sourceMappingURL=file-and-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/file-and-path/file-and-path.ts"],"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 CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams\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 * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project owners or editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'put',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.\n\nOnly Project owners or editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n \n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Files on a Project Path\n */\nexport const useGetFiles = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFilesQueryOptions(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 * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **File**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the `/task` endpoint to determine when the file is available to the project.\n\nOnly Datasets attached to projects are available through the Project API. A Dataset that you upload is only available to others (who are not already `editors` of the data) when the Dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n \n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a File (from a project)\n */\nexport const useDownloadFile = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(\n fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,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"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAuCA,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAA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