@squonk/data-manager-client 1.1.11 → 1.2.0
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.map +1 -1
- package/accounting/accounting.d.ts +1 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +26 -1
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +23 -2
- package/admin/admin.js +25 -0
- package/admin/admin.js.map +1 -1
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +1 -1
- package/application/application.js.map +1 -1
- package/{custom-instance-f006607a.d.ts → custom-instance-e5540c3b.d.ts} +43 -10
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +1 -1
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.ts +1 -1
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +1 -1
- package/file/file.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +1 -1
- package/instance/instance.js.map +1 -1
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +1 -1
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +1 -1
- package/metadata/metadata.js.map +1 -1
- package/package.json +1 -1
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +1 -1
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +1 -1
- package/src/admin/admin.ts +79 -1
- package/src/application/application.ts +1 -1
- package/src/data-manager-api.schemas.ts +47 -10
- package/src/dataset/dataset.ts +1 -1
- package/src/exchange-rate/exchange-rate.ts +1 -1
- package/src/file/file.ts +1 -1
- package/src/instance/instance.ts +1 -1
- package/src/job/job.ts +1 -1
- package/src/metadata/metadata.ts +1 -1
- package/src/project/project.ts +1 -1
- package/src/task/task.ts +1 -1
- package/src/type/type.ts +1 -1
- package/src/user/user.ts +1 -1
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +1 -1
- package/task/task.js.map +1 -1
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +1 -1
- package/user/user.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/application/application.ts"],"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.
|
|
1
|
+
{"version":3,"sources":["../../src/application/application.ts"],"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 } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ApplicationsGetResponse,\n DmError,\n ApplicationGetResponse,\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 * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationsGetResponse>(\n { url: `/application`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationsQueryKey = () => [\"data-manager-api\", `/application`] as const;\n\nexport const getGetApplicationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({\n signal,\n }) => getApplications(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetApplicationsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplications>>\n>;\nexport type GetApplicationsQueryError = ErrorType<DmError>;\n\nexport const useGetApplications = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationsQueryOptions(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 * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationGetResponse>(\n { url: `/application/${applicationId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationQueryKey = (applicationId: string) =>\n [\"data-manager-api\", `/application/${applicationId}`] as const;\n\nexport const getGetApplicationQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({\n signal,\n }) => getApplication(applicationId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };\n};\n\nexport type GetApplicationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplication>>\n>;\nexport type GetApplicationQueryError = ErrorType<void | DmError>;\n\nexport const useGetApplication = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationQueryOptions(applicationId, 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"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,QAAQ,OAAO,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,oBAAoB,cAAc;AAE5E,IAAM,iCAAiC,CAG5C,YAW4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9D;AAAA,EACF;AACF;AAEO,IAAM,4BAA4B,CAAC,kBACxC,CAAC,oBAAoB,gBAAgB,eAAe;AAE/C,IAAM,gCAAgC,CAI3C,eACA,YAY4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,0BAA0B,aAAa;AAEnE,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,EACF,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAE1D,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,eAAe,GAAG,aAAa;AACxE;AAOO,IAAM,oBAAoB,CAI/B,eACA,YAQ2D;AAC3D,QAAM,eAAe,8BAA8B,eAAe,OAAO;AAEzE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
@@ -9,8 +9,20 @@ import { AxiosRequestConfig, AxiosError } from 'axios';
|
|
|
9
9
|
|
|
10
10
|
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
|
|
11
11
|
|
|
12
|
-
* OpenAPI spec version: 1.
|
|
12
|
+
* OpenAPI spec version: 1.2
|
|
13
13
|
*/
|
|
14
|
+
type AdminGetUsersParams = {
|
|
15
|
+
/**
|
|
16
|
+
* Maximum days a user has been idle (has not used the API). If you specify `2` and it's Monday then users who have not used the API since Saturday will be returned.
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
idle_days?: QIdleDaysParameter;
|
|
20
|
+
/**
|
|
21
|
+
* Minimum days a user has been active (has used the API). If you specify `2` and it's Monday then users who have used the API on Saturday or later will be returned.
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
active_days?: QActiveDaysParameter;
|
|
25
|
+
};
|
|
14
26
|
type AdminGetServiceErrorsParams = {
|
|
15
27
|
/**
|
|
16
28
|
* Set to include acknowledged items
|
|
@@ -147,6 +159,20 @@ type GetTasksParams = {
|
|
|
147
159
|
*/
|
|
148
160
|
instance_callback_context?: QInstanceCallbackContextParameter;
|
|
149
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* The Project identity
|
|
164
|
+
*/
|
|
165
|
+
type QFileProjectIdParameter = string;
|
|
166
|
+
/**
|
|
167
|
+
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
168
|
+
|
|
169
|
+
*/
|
|
170
|
+
type QFilePathParameter = string;
|
|
171
|
+
/**
|
|
172
|
+
* A project file.
|
|
173
|
+
|
|
174
|
+
*/
|
|
175
|
+
type QFileParameter = string;
|
|
150
176
|
type DeleteUnmanagedFileParams = {
|
|
151
177
|
/**
|
|
152
178
|
* A project file.
|
|
@@ -350,19 +376,15 @@ type QIncludeAcknowlegedParameter = boolean;
|
|
|
350
376
|
*/
|
|
351
377
|
type QFromParameter = string;
|
|
352
378
|
/**
|
|
353
|
-
*
|
|
354
|
-
*/
|
|
355
|
-
type QFileProjectIdParameter = string;
|
|
356
|
-
/**
|
|
357
|
-
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
379
|
+
* Minimum days a user has been active (has used the API). If you specify `2` and it's Monday then users who have used the API on Saturday or later will be returned.
|
|
358
380
|
|
|
359
381
|
*/
|
|
360
|
-
type
|
|
382
|
+
type QActiveDaysParameter = number;
|
|
361
383
|
/**
|
|
362
|
-
*
|
|
384
|
+
* Maximum days a user has been idle (has not used the API). If you specify `2` and it's Monday then users who have not used the API since Saturday will be returned.
|
|
363
385
|
|
|
364
386
|
*/
|
|
365
|
-
type
|
|
387
|
+
type QIdleDaysParameter = number;
|
|
366
388
|
/**
|
|
367
389
|
* Set to a dot-separated string of purpose enumerations, i.e. `DATASET`, `FILE`, `INSTANCE`, or `PROJECT`. To exclude file and dataset tasks set this field to `FILE.DATASET`
|
|
368
390
|
|
|
@@ -638,9 +660,15 @@ interface UserDetail {
|
|
|
638
660
|
/** The user's preferred username
|
|
639
661
|
*/
|
|
640
662
|
username: string;
|
|
663
|
+
/** The user's filesystem user uid
|
|
664
|
+
*/
|
|
665
|
+
f_uid?: number;
|
|
641
666
|
/** The date and time the user was first seen (an ISO-8601 formatted string in UTC)
|
|
642
667
|
*/
|
|
643
668
|
first_seen?: string;
|
|
669
|
+
/** The date the user was last seen
|
|
670
|
+
*/
|
|
671
|
+
last_seen_date?: string;
|
|
644
672
|
/** Set if the user's account is marked as private. Private accounts do not show up against general queries.
|
|
645
673
|
*/
|
|
646
674
|
private: boolean;
|
|
@@ -1893,6 +1921,11 @@ interface ApplicationGetResponse {
|
|
|
1893
1921
|
versions: string[];
|
|
1894
1922
|
image_variants?: ApplicationImageVariants;
|
|
1895
1923
|
}
|
|
1924
|
+
interface AdminUsersGetResponse {
|
|
1925
|
+
/** A list of Users that have used the Data Manager
|
|
1926
|
+
*/
|
|
1927
|
+
users: UserDetail[];
|
|
1928
|
+
}
|
|
1896
1929
|
type AdminUserPutResponse = UserAccountDetail;
|
|
1897
1930
|
interface AdminJobManifestLoadPutResponse {
|
|
1898
1931
|
/** True if successful, false otherwise
|
|
@@ -1947,4 +1980,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
1947
1980
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
|
|
1948
1981
|
type ErrorType<TError> = AxiosError<TError>;
|
|
1949
1982
|
|
|
1950
|
-
export {
|
|
1983
|
+
export { QDatasetMimeTypeParameter as $, AdminGetUsersParams as A, QInstanceCallbackContextParameter as B, QProjectNameParameter as C, DeleteUnmanagedFileParams as D, QProjectIdParameter as E, QLabelsParameter as F, GetUserApiLogParams as G, QOnlyUndefinedParameter as H, QKeepProjectFilesParameter as I, QJobVersionParameter as J, QJobJobParameter as K, QJobIdParameter as L, QJobCollectionParameter as M, QInstanceArchiveParameter as N, QIncludeHiddenParameter as O, PatchInstanceParams as P, QFileProjectIdParameter as Q, QIncludeDeletedParameter as R, QIncludeAcknowlegedParameter as S, QFromParameter as T, QActiveDaysParameter as U, QIdleDaysParameter as V, QExcludePurposeParameter as W, QExcludeRemovalParameter as X, QExcludeDoneParameter as Y, QEventPriorOrdinalParameter as Z, QEventLimitParameter as _, AdminGetServiceErrorsParams as a, DatasetDetail as a$, QDoNotImpersonateParameter as a0, QCurrentParameter as a1, QApplicationIdParameter as a2, UserPatchBodyBody as a3, UserAccountPatchBodyBody as a4, ProjectPostBodyBody as a5, ProjectPatchBodyBody as a6, ProjectFilePutBodyBody as a7, ExchangeRatePutBodyBody as a8, JobManifestPutBodyBody as a9, JobReplacements as aA, JobOrderDetail as aB, JobVariablesOptions as aC, JobVariablesOutputs as aD, JobVariablesInputs as aE, JobVariables as aF, JobSummaryImageType as aG, JobSummary as aH, JobManifestDetail as aI, JobApplication as aJ, InstanceSummaryJobImageType as aK, InstanceSummaryPhase as aL, InstanceSummaryApplicationType as aM, InstanceSummary as aN, FileStat as aO, FilePathFile as aP, JobExchangeRateSummary as aQ, ApplicationExchangeRateSummary as aR, ExchangeRateDetail as aS, DatasetVersionSummaryLabels as aT, DatasetVersionSummaryProcessingStage as aU, DatasetVersionSummary as aV, DatasetVersionProjectFile as aW, DatasetVersionDetailLabels as aX, DatasetVersionDetailProcessingStage as aY, DatasetVersionDetail as aZ, DatasetSummary as a_, JobManifestLoadPutBodyBody as aa, InstancePostBodyBody as ab, FilePostBodyBody as ac, DatasetPutBodyBody as ad, DatasetVersionMetaPostBodyBody as ae, DatasetMetaPostBodyBody as af, DatasetPostBodyBody as ag, AsAdditionalDataProcessingCharge as ah, UserSummary as ai, UserDetail as aj, UserAccountDetail as ak, TypeSummaryFormatterOptionsType as al, TypeSummaryFormatterOptions as am, TypeSummary as an, TaskSummaryProcessingStage as ao, TaskSummary as ap, TaskStateState as aq, TaskState as ar, TaskIdentity as as, TaskEventLevel as at, TaskEvent as au, ServiceErrorSummarySeverity as av, ServiceErrorSummary as aw, ProjectFileDetail as ax, ProjectDetail as ay, JobReplacement as az, GetUserAccountParams as b, ApplicationSummary as b0, ApplicationImageVariant as b1, ApplicationImageVariants as b2, ApiLogDetailMethod as b3, ApiLogDetail as b4, VersionGetResponse as b5, UsersGetResponse as b6, UserApiLogGetResponse as b7, UserAccountGetResponse as b8, TypesGetResponse as b9, InstanceDeleteResponse as bA, DatasetsGetResponse as bB, DatasetVersionsGetResponse as bC, DatasetVersionDeleteResponse as bD, DatasetSchemaGetResponseType as bE, DatasetSchemaGetResponse as bF, DatasetMetaGetResponse as bG, DatasetDigestGetResponse as bH, DatasetPutPostResponse as bI, ApplicationsGetResponse as bJ, ApplicationGetResponse as bK, AdminUsersGetResponse as bL, AdminUserPutResponse as bM, AdminJobManifestLoadPutResponse as bN, AdminJobManifestGetResponse as bO, AccountServerGetNamespaceResponse as bP, AccountServerGetRegistrationResponse as bQ, DmError as bR, AXIOS_INSTANCE as bS, setAuthToken as bT, setBaseUrl as bU, customInstance as bV, ErrorType as bW, TasksGetResponse as ba, TaskGetResponsePurpose as bb, TaskGetResponse as bc, ServiceErrorsGetResponse as bd, ProjectsGetResponse as be, ProjectPostResponse as bf, ProjectGetResponse as bg, ProjectDeleteResponse as bh, JobsGetResponse as bi, JobGetResponseImageType as bj, JobGetResponse as bk, InstanceTaskPurpose as bl, InstanceTask as bm, InstancesGetResponse as bn, InstanceGetResponseJobImageType as bo, InstanceGetResponsePhase as bp, InstanceGetResponseApplicationType as bq, InstanceGetResponse as br, GetExchangeRatesResponseId as bs, GetExchangeRatesResponse as bt, GetAllExchangeRatesResponseExchangeRatesItem as bu, GetAllExchangeRatesResponse as bv, FilesGetResponse as bw, FilePostResponse as bx, InstancePostResponse as by, InstanceDryRunPostResponse as bz, GetInstancesParams as c, GetJobExchangeRatesParams as d, GetAllJobExchangeRatesParams as e, GetJobParams as f, GetJobByVersionParams as g, GetJobsParams as h, GetApplicationExchangeRatesParams as i, GetAllApplicationExchangeRatesParams as j, GetTaskParams as k, GetTasksParams as l, QFilePathParameter as m, QFileParameter as n, GetFilesParams as o, DeleteDatasetParams as p, GetVersionsParams as q, GetDatasetsParams as r, GetProjectFileWithTokenParams as s, GetProjectFileParams as t, GetProjectsParams as u, QEditorsParameter as v, QOwnersParameter as w, QUsernameParameter as x, QUntilParameter as y, QTokenParameter as z };
|
package/dataset/dataset.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AA2C/B,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB;AAAA,IACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB,mBAAmB,SAAS;AAAA,IACjD;AAAA,EACF;AACA,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAI,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU;AAAA,EAC7D;AACA,MAAI,mBAAmB,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AAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEO,IAAM,uBAAuB,CAClC,WACA,mBACG,CAAC,oBAAoB,YAAY,oBAAoB,gBAAgB;AAEnE,IAAM,2BAA2B,CAItC,WACA,gBACA,YAUG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,EACF,MAAM,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,CAAC,EAAE,aAAa;AAAA,IACzB,GAAG;AAAA,EACL;AACF;AAOO,IAAM,eAAe,CAI1B,WACA,gBACA,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.1\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 DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset Version) is created.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent Dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique Version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getCreateDatasetFromFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the `/type` endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous **Task** after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the `/task/{task-id}` endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getUploadDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get Datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) =>\n [\"data-manager-api\", `/dataset`, ...(params ? [params] : [])] as const;\n\nexport const getGetDatasetsQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetsQueryOptions(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 * Returns a list of Dataset Versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params] : [])] as const;\n\nexport const getGetVersionsQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };\n};\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetVersionsQueryOptions(datasetId, 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 * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a Dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport const getDeleteDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a Dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n\nexport const getDownloadDatasetQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getDownloadDatasetQueryOptions(\n datasetId,\n datasetVersion,\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 is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveEditorFromDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * The user is added to the dataset's `editor`` list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a Dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddEditorToDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) =>\n [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n\nexport const getGetDatasetDigestQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };\n};\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, 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 * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n\nexport const getGetSchemaQueryOptions = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetSchemaQueryOptions(\n datasetId,\n datasetVersion,\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/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AA2C/B,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB;AAAA,IACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB,mBAAmB,SAAS;AAAA,IACjD;AAAA,EACF;AACA,WAAS,OAAO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AO;AAE3E,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,YAAY,CACvB,WACA,gBACA,SACA,WACG;AACH,SAAO;AAAA,IACL;AAAA,MACE,KAAK,YAAY,oBAAoB;AAAA,MACrC,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEO,IAAM,uBAAuB,CAClC,WACA,mBACG,CAAC,oBAAoB,YAAY,oBAAoB,gBAAgB;AAEnE,IAAM,2BAA2B,CAItC,WACA,gBACA,YAUG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,EACF,MAAM,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,CAAC,EAAE,aAAa;AAAA,IACzB,GAAG;AAAA,EACL;AACF;AAOO,IAAM,eAAe,CAI1B,WACA,gBACA,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 DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset Version) is created.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent Dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique Version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getCreateDatasetFromFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the `/type` endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous **Task** after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the `/task/{task-id}` endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getUploadDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get Datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) =>\n [\"data-manager-api\", `/dataset`, ...(params ? [params] : [])] as const;\n\nexport const getGetDatasetsQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetsQueryOptions(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 * Returns a list of Dataset Versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params] : [])] as const;\n\nexport const getGetVersionsQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };\n};\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetVersionsQueryOptions(datasetId, 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 * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a Dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport const getDeleteDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a Dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n\nexport const getDownloadDatasetQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getDownloadDatasetQueryOptions(\n datasetId,\n datasetVersion,\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 is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveEditorFromDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * The user is added to the dataset's `editor`` list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a Dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddEditorToDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) =>\n [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n\nexport const getGetDatasetDigestQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };\n};\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, 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 * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n\nexport const getGetSchemaQueryOptions = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetSchemaQueryOptions(\n datasetId,\n datasetVersion,\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"]}
|
package/dataset/dataset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as DatasetPutBodyBody, bV as customInstance, bI as DatasetPutPostResponse, bW as ErrorType, bR as DmError, ag as DatasetPostBodyBody, r as GetDatasetsParams, bB as DatasetsGetResponse, q as GetVersionsParams, a$ as DatasetDetail, p as DeleteDatasetParams, as as TaskIdentity, bH as DatasetDigestGetResponse, bF as DatasetSchemaGetResponse } from '../custom-instance-e5540c3b.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
4
4
|
import 'axios';
|
package/dataset/dataset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dataset/dataset.ts"],"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.1\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 DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset Version) is created.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent Dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique Version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getCreateDatasetFromFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the `/type` endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous **Task** after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the `/task/{task-id}` endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getUploadDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get Datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) =>\n [\"data-manager-api\", `/dataset`, ...(params ? [params] : [])] as const;\n\nexport const getGetDatasetsQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetsQueryOptions(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 * Returns a list of Dataset Versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params] : [])] as const;\n\nexport const getGetVersionsQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };\n};\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetVersionsQueryOptions(datasetId, 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 * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a Dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport const getDeleteDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a Dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n\nexport const getDownloadDatasetQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getDownloadDatasetQueryOptions(\n datasetId,\n datasetVersion,\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 is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveEditorFromDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * The user is added to the dataset's `editor`` list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a Dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddEditorToDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) =>\n [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n\nexport const getGetDatasetDigestQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };\n};\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, 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 * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n\nexport const getGetSchemaQueryOptions = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetSchemaQueryOptions(\n datasetId,\n datasetVersion,\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"],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AA2C/B,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB;AAAA,IACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB,mBAAmB,SAAS;AAAA,IACjD;AAAA,EACF;AACA,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAI,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU;AAAA,EAC7D;AACA,MAAI,mBAAmB,YAAY,QAAW;AAC5C,aAAS,OAAO,WAAW,mBAAmB,OAAO;AAAA,EACvD;AAEA,SAAO;AAAA,IACL;AAAA,MACE,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,MACjD,M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AO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,EACF,MAAM,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,CAAC,EAAE,aAAa;AAAA,IACzB,GAAG;AAAA,EACL;AACF;AAOO,IAAM,eAAe,CAI1B,WACA,gBACA,YAQ2D;AAC3D,QAAM,eAAe;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/dataset/dataset.ts"],"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 DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset Version) is created.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent Dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique Version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getCreateDatasetFromFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the `/type` endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe Dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous **Task** after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the `/task/{task-id}` endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport const getUploadDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get Datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) =>\n [\"data-manager-api\", `/dataset`, ...(params ? [params] : [])] as const;\n\nexport const getGetDatasetsQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetsQueryOptions(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 * Returns a list of Dataset Versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params] : [])] as const;\n\nexport const getGetVersionsQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };\n};\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetVersionsQueryOptions(datasetId, 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 * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a Dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport const getDeleteDatasetMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a Dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n\nexport const getDownloadDatasetQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getDownloadDatasetQueryOptions(\n datasetId,\n datasetVersion,\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 is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport const getRemoveEditorFromDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * The user is added to the dataset's `editor`` list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a Dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport const getAddEditorToDatasetMutationOptions = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n> => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) =>\n [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n\nexport const getGetDatasetDigestQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };\n};\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, 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 * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n\nexport const getGetSchemaQueryOptions = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetSchemaQueryOptions(\n datasetId,\n datasetVersion,\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"],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AA2C/B,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB;AAAA,IACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB,mBAAmB,SAAS;AAAA,IACjD;AAAA,EACF;AACA,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAI,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU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