@squonk/data-manager-client 1.2.8 → 1.2.9
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/README.md +1 -1
- package/accounting/accounting.cjs +51 -8
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +61 -10
- package/accounting/accounting.d.ts +61 -10
- package/accounting/accounting.js +49 -6
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -24
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +75 -24
- package/admin/admin.d.ts +75 -24
- package/admin/admin.js +56 -13
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +35 -6
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +42 -8
- package/application/application.d.ts +42 -8
- package/application/application.js +34 -5
- package/application/application.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/configuration/configuration.cjs +19 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +23 -6
- package/configuration/configuration.d.ts +23 -6
- package/configuration/configuration.js +19 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +93 -22
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +105 -20
- package/dataset/dataset.d.ts +105 -20
- package/dataset/dataset.js +83 -12
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +71 -14
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +83 -15
- package/exchange-rate/exchange-rate.d.ts +83 -15
- package/exchange-rate/exchange-rate.js +65 -8
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +45 -16
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +48 -14
- package/file-and-path/file-and-path.d.ts +48 -14
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +9 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2033 -2
- package/index.d.ts +2033 -2
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +45 -16
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +48 -14
- package/instance/instance.d.ts +48 -14
- package/instance/instance.js +38 -9
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +51 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +61 -10
- package/job/job.d.ts +61 -10
- package/job/job.js +49 -6
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +39 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +45 -11
- package/metadata/metadata.d.ts +45 -11
- package/metadata/metadata.js +36 -7
- package/metadata/metadata.js.map +1 -1
- package/package.json +11 -11
- package/project/project.cjs +83 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +89 -21
- package/project/project.d.ts +89 -21
- package/project/project.js +71 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +136 -22
- package/src/admin/admin.ts +148 -50
- package/src/application/application.ts +93 -18
- package/src/configuration/configuration.ts +50 -14
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +59 -33
- package/src/dataset/dataset.ts +233 -45
- package/src/exchange-rate/exchange-rate.ts +185 -32
- package/src/file-and-path/file-and-path.ts +98 -33
- package/src/instance/instance.ts +98 -33
- package/src/job/job.ts +138 -22
- package/src/metadata/metadata.ts +97 -24
- package/src/project/project.ts +191 -50
- package/src/task/task.ts +96 -21
- package/src/type/type.ts +50 -14
- package/src/user/user.ts +137 -25
- package/task/task.cjs +37 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +44 -10
- package/task/task.d.ts +44 -10
- package/task/task.js +35 -6
- package/task/task.js.map +1 -1
- package/type/type.cjs +19 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +23 -6
- package/type/type.d.ts +23 -6
- package/type/type.js +19 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +53 -10
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +63 -12
- package/user/user.d.ts +63 -12
- package/user/user.js +49 -6
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-37ed2460.d.ts +0 -2014
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { customInstance, ModeGetResponse, ErrorType, DmError } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
8
8
|
*/
|
|
9
9
|
declare const getMode: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ModeGetResponse>;
|
|
10
10
|
declare const getGetModeQueryKey: () => readonly ["data-manager-api", "/mode"];
|
|
11
11
|
declare const getGetModeQueryOptions: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
12
|
-
query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey
|
|
12
|
+
query?: Partial<UseQueryOptions<ModeGetResponse, TError, TData, QueryKey>> | undefined;
|
|
13
13
|
request?: SecondParameter<typeof customInstance>;
|
|
14
14
|
} | undefined) => UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> & {
|
|
15
15
|
queryKey: QueryKey;
|
|
@@ -20,10 +20,27 @@ type GetModeQueryError = ErrorType<void | DmError>;
|
|
|
20
20
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
21
21
|
*/
|
|
22
22
|
declare const useGetMode: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
23
|
-
query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey
|
|
23
|
+
query?: Partial<UseQueryOptions<ModeGetResponse, TError, TData, QueryKey>> | undefined;
|
|
24
24
|
request?: SecondParameter<typeof customInstance>;
|
|
25
25
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
26
26
|
queryKey: QueryKey;
|
|
27
27
|
};
|
|
28
|
+
declare const getGetModeSuspenseQueryOptions: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
29
|
+
query?: Partial<UseSuspenseQueryOptions<ModeGetResponse, TError, TData, QueryKey>> | undefined;
|
|
30
|
+
request?: SecondParameter<typeof customInstance>;
|
|
31
|
+
} | undefined) => UseSuspenseQueryOptions<ModeGetResponse, TError, TData, QueryKey> & {
|
|
32
|
+
queryKey: QueryKey;
|
|
33
|
+
};
|
|
34
|
+
type GetModeSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
|
|
35
|
+
type GetModeSuspenseQueryError = ErrorType<void | DmError>;
|
|
36
|
+
/**
|
|
37
|
+
* @summary Gets the Data Manager mode that's running behind the API
|
|
38
|
+
*/
|
|
39
|
+
declare const useGetModeSuspense: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
40
|
+
query?: Partial<UseSuspenseQueryOptions<ModeGetResponse, TError, TData, QueryKey>> | undefined;
|
|
41
|
+
request?: SecondParameter<typeof customInstance>;
|
|
42
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
43
|
+
queryKey: QueryKey;
|
|
44
|
+
};
|
|
28
45
|
|
|
29
|
-
export { GetModeQueryError, GetModeQueryResult, getGetModeQueryKey, getGetModeQueryOptions, getMode, useGetMode };
|
|
46
|
+
export { type GetModeQueryError, type GetModeQueryResult, type GetModeSuspenseQueryError, type GetModeSuspenseQueryResult, getGetModeQueryKey, getGetModeQueryOptions, getGetModeSuspenseQueryOptions, getMode, useGetMode, useGetModeSuspense };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EBOQPVLG.js";
|
|
4
4
|
|
|
5
5
|
// src/configuration/configuration.ts
|
|
6
6
|
import {
|
|
7
|
-
useQuery
|
|
7
|
+
useQuery,
|
|
8
|
+
useSuspenseQuery
|
|
8
9
|
} from "@tanstack/react-query";
|
|
9
10
|
var getMode = (options, signal) => {
|
|
10
11
|
return customInstance(
|
|
11
12
|
{
|
|
12
13
|
url: `/mode`,
|
|
13
|
-
method: "
|
|
14
|
+
method: "GET",
|
|
14
15
|
signal
|
|
15
16
|
},
|
|
16
17
|
options
|
|
@@ -31,10 +32,24 @@ var useGetMode = (options) => {
|
|
|
31
32
|
query.queryKey = queryOptions.queryKey;
|
|
32
33
|
return query;
|
|
33
34
|
};
|
|
35
|
+
var getGetModeSuspenseQueryOptions = (options) => {
|
|
36
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
37
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetModeQueryKey();
|
|
38
|
+
const queryFn = ({ signal }) => getMode(requestOptions, signal);
|
|
39
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
40
|
+
};
|
|
41
|
+
var useGetModeSuspense = (options) => {
|
|
42
|
+
const queryOptions = getGetModeSuspenseQueryOptions(options);
|
|
43
|
+
const query = useSuspenseQuery(queryOptions);
|
|
44
|
+
query.queryKey = queryOptions.queryKey;
|
|
45
|
+
return query;
|
|
46
|
+
};
|
|
34
47
|
export {
|
|
35
48
|
getGetModeQueryKey,
|
|
36
49
|
getGetModeQueryOptions,
|
|
50
|
+
getGetModeSuspenseQueryOptions,
|
|
37
51
|
getMode,
|
|
38
|
-
useGetMode
|
|
52
|
+
useGetMode,
|
|
53
|
+
useGetModeSuspense
|
|
39
54
|
};
|
|
40
55
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/configuration/configuration.ts"],"sourcesContent":["/**\n * Generated by orval v6.
|
|
1
|
+
{"version":3,"sources":["../../src/configuration/configuration.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n ModeGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const getMode = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ModeGetResponse>(\n {url: `/mode`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetModeQueryKey = () => {\n return [\"data-manager-api\", `/mode`] as const;\n }\n\n \nexport const getGetModeQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) => getMode(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>\nexport type GetModeQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const useGetMode = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetModeQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetModeSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) => getMode(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetModeSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>\nexport type GetModeSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const useGetModeSuspense = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetModeSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAuBA,IAAM,UAAU,CAEtB,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,MAAM;AACpC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,yBAAyB,CAAmF,YACpH;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB;AAI7D,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,gBAAgB,MAAM;AAMnH,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,aAAa,CACxB,YAE8D;AAE9D,QAAM,eAAe,uBAAuB,OAAO;AAEnD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,iCAAiC,CAAmF,YAC5H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB;AAI7D,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,gBAAgB,MAAM;AAMnH,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CAChC,YAEsE;AAEtE,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
package/dataset/dataset.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
4
|
|
|
5
5
|
// src/dataset/dataset.ts
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
var _reactquery = require('@tanstack/react-query');
|
|
10
11
|
var createDatasetFromFile = (datasetPutBodyBody, options) => {
|
|
11
12
|
const formData = new FormData();
|
|
@@ -25,10 +26,10 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
|
|
|
25
26
|
if (datasetPutBodyBody.unit_id !== void 0) {
|
|
26
27
|
formData.append("unit_id", datasetPutBodyBody.unit_id);
|
|
27
28
|
}
|
|
28
|
-
return
|
|
29
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
29
30
|
{
|
|
30
31
|
url: `/dataset`,
|
|
31
|
-
method: "
|
|
32
|
+
method: "PUT",
|
|
32
33
|
headers: { "Content-Type": "multipart/form-data" },
|
|
33
34
|
data: formData
|
|
34
35
|
},
|
|
@@ -64,10 +65,10 @@ var uploadDataset = (datasetPostBodyBody, options) => {
|
|
|
64
65
|
formData.append("dataset_id", datasetPostBodyBody.dataset_id);
|
|
65
66
|
}
|
|
66
67
|
formData.append("unit_id", datasetPostBodyBody.unit_id);
|
|
67
|
-
return
|
|
68
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
68
69
|
{
|
|
69
70
|
url: `/dataset`,
|
|
70
|
-
method: "
|
|
71
|
+
method: "POST",
|
|
71
72
|
headers: { "Content-Type": "multipart/form-data" },
|
|
72
73
|
data: formData
|
|
73
74
|
},
|
|
@@ -87,10 +88,10 @@ var useUploadDataset = (options) => {
|
|
|
87
88
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
88
89
|
};
|
|
89
90
|
var getDatasets = (params, options, signal) => {
|
|
90
|
-
return
|
|
91
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
91
92
|
{
|
|
92
93
|
url: `/dataset`,
|
|
93
|
-
method: "
|
|
94
|
+
method: "GET",
|
|
94
95
|
params,
|
|
95
96
|
signal
|
|
96
97
|
},
|
|
@@ -112,11 +113,23 @@ var useGetDatasets = (params, options) => {
|
|
|
112
113
|
query.queryKey = queryOptions.queryKey;
|
|
113
114
|
return query;
|
|
114
115
|
};
|
|
116
|
+
var getGetDatasetsSuspenseQueryOptions = (params, options) => {
|
|
117
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
118
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetsQueryKey(params)));
|
|
119
|
+
const queryFn = ({ signal }) => getDatasets(params, requestOptions, signal);
|
|
120
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
121
|
+
};
|
|
122
|
+
var useGetDatasetsSuspense = (params, options) => {
|
|
123
|
+
const queryOptions = getGetDatasetsSuspenseQueryOptions(params, options);
|
|
124
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
125
|
+
query.queryKey = queryOptions.queryKey;
|
|
126
|
+
return query;
|
|
127
|
+
};
|
|
115
128
|
var getVersions = (datasetId, params, options, signal) => {
|
|
116
|
-
return
|
|
129
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
117
130
|
{
|
|
118
131
|
url: `/dataset/${datasetId}/versions`,
|
|
119
|
-
method: "
|
|
132
|
+
method: "GET",
|
|
120
133
|
params,
|
|
121
134
|
signal
|
|
122
135
|
},
|
|
@@ -138,11 +151,23 @@ var useGetVersions = (datasetId, params, options) => {
|
|
|
138
151
|
query.queryKey = queryOptions.queryKey;
|
|
139
152
|
return query;
|
|
140
153
|
};
|
|
154
|
+
var getGetVersionsSuspenseQueryOptions = (datasetId, params, options) => {
|
|
155
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
156
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionsQueryKey(datasetId, params)));
|
|
157
|
+
const queryFn = ({ signal }) => getVersions(datasetId, params, requestOptions, signal);
|
|
158
|
+
return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
|
|
159
|
+
};
|
|
160
|
+
var useGetVersionsSuspense = (datasetId, params, options) => {
|
|
161
|
+
const queryOptions = getGetVersionsSuspenseQueryOptions(datasetId, params, options);
|
|
162
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
163
|
+
query.queryKey = queryOptions.queryKey;
|
|
164
|
+
return query;
|
|
165
|
+
};
|
|
141
166
|
var deleteDataset = (datasetId, datasetVersion, params, options) => {
|
|
142
|
-
return
|
|
167
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
143
168
|
{
|
|
144
169
|
url: `/dataset/${datasetId}/${datasetVersion}`,
|
|
145
|
-
method: "
|
|
170
|
+
method: "DELETE",
|
|
146
171
|
params
|
|
147
172
|
},
|
|
148
173
|
options
|
|
@@ -161,10 +186,10 @@ var useDeleteDataset = (options) => {
|
|
|
161
186
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
162
187
|
};
|
|
163
188
|
var downloadDataset = (datasetId, datasetVersion, options, signal) => {
|
|
164
|
-
return
|
|
189
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
165
190
|
{
|
|
166
191
|
url: `/dataset/${datasetId}/${datasetVersion}`,
|
|
167
|
-
method: "
|
|
192
|
+
method: "GET",
|
|
168
193
|
signal
|
|
169
194
|
},
|
|
170
195
|
options
|
|
@@ -185,11 +210,23 @@ var useDownloadDataset = (datasetId, datasetVersion, options) => {
|
|
|
185
210
|
query.queryKey = queryOptions.queryKey;
|
|
186
211
|
return query;
|
|
187
212
|
};
|
|
213
|
+
var getDownloadDatasetSuspenseQueryOptions = (datasetId, datasetVersion, options) => {
|
|
214
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
215
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadDatasetQueryKey(datasetId, datasetVersion)));
|
|
216
|
+
const queryFn = ({ signal }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
|
|
217
|
+
return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
|
|
218
|
+
};
|
|
219
|
+
var useDownloadDatasetSuspense = (datasetId, datasetVersion, options) => {
|
|
220
|
+
const queryOptions = getDownloadDatasetSuspenseQueryOptions(datasetId, datasetVersion, options);
|
|
221
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
222
|
+
query.queryKey = queryOptions.queryKey;
|
|
223
|
+
return query;
|
|
224
|
+
};
|
|
188
225
|
var removeEditorFromDataset = (datasetId, userId, options) => {
|
|
189
|
-
return
|
|
226
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
190
227
|
{
|
|
191
228
|
url: `/dataset/${datasetId}/editor/${userId}`,
|
|
192
|
-
method: "
|
|
229
|
+
method: "DELETE"
|
|
193
230
|
},
|
|
194
231
|
options
|
|
195
232
|
);
|
|
@@ -207,10 +244,10 @@ var useRemoveEditorFromDataset = (options) => {
|
|
|
207
244
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
208
245
|
};
|
|
209
246
|
var addEditorToDataset = (datasetId, userId, options) => {
|
|
210
|
-
return
|
|
247
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
211
248
|
{
|
|
212
249
|
url: `/dataset/${datasetId}/editor/${userId}`,
|
|
213
|
-
method: "
|
|
250
|
+
method: "PUT"
|
|
214
251
|
},
|
|
215
252
|
options
|
|
216
253
|
);
|
|
@@ -228,10 +265,10 @@ var useAddEditorToDataset = (options) => {
|
|
|
228
265
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
229
266
|
};
|
|
230
267
|
var getDatasetDigest = (datasetDigest, options, signal) => {
|
|
231
|
-
return
|
|
268
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
232
269
|
{
|
|
233
270
|
url: `/dataset/digest/${datasetDigest}`,
|
|
234
|
-
method: "
|
|
271
|
+
method: "GET",
|
|
235
272
|
signal
|
|
236
273
|
},
|
|
237
274
|
options
|
|
@@ -252,11 +289,23 @@ var useGetDatasetDigest = (datasetDigest, options) => {
|
|
|
252
289
|
query.queryKey = queryOptions.queryKey;
|
|
253
290
|
return query;
|
|
254
291
|
};
|
|
292
|
+
var getGetDatasetDigestSuspenseQueryOptions = (datasetDigest, options) => {
|
|
293
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
294
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetDigestQueryKey(datasetDigest)));
|
|
295
|
+
const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
|
|
296
|
+
return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };
|
|
297
|
+
};
|
|
298
|
+
var useGetDatasetDigestSuspense = (datasetDigest, options) => {
|
|
299
|
+
const queryOptions = getGetDatasetDigestSuspenseQueryOptions(datasetDigest, options);
|
|
300
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
301
|
+
query.queryKey = queryOptions.queryKey;
|
|
302
|
+
return query;
|
|
303
|
+
};
|
|
255
304
|
var getSchema = (datasetId, datasetVersion, options, signal) => {
|
|
256
|
-
return
|
|
305
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
257
306
|
{
|
|
258
307
|
url: `/dataset/${datasetId}/schema/${datasetVersion}`,
|
|
259
|
-
method: "
|
|
308
|
+
method: "GET",
|
|
260
309
|
signal
|
|
261
310
|
},
|
|
262
311
|
options
|
|
@@ -277,6 +326,28 @@ var useGetSchema = (datasetId, datasetVersion, options) => {
|
|
|
277
326
|
query.queryKey = queryOptions.queryKey;
|
|
278
327
|
return query;
|
|
279
328
|
};
|
|
329
|
+
var getGetSchemaSuspenseQueryOptions = (datasetId, datasetVersion, options) => {
|
|
330
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
331
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetSchemaQueryKey(datasetId, datasetVersion)));
|
|
332
|
+
const queryFn = ({ signal }) => getSchema(datasetId, datasetVersion, requestOptions, signal);
|
|
333
|
+
return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
|
|
334
|
+
};
|
|
335
|
+
var useGetSchemaSuspense = (datasetId, datasetVersion, options) => {
|
|
336
|
+
const queryOptions = getGetSchemaSuspenseQueryOptions(datasetId, datasetVersion, options);
|
|
337
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
338
|
+
query.queryKey = queryOptions.queryKey;
|
|
339
|
+
return query;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
280
351
|
|
|
281
352
|
|
|
282
353
|
|
|
@@ -313,5 +384,5 @@ var useGetSchema = (datasetId, datasetVersion, options) => {
|
|
|
313
384
|
|
|
314
385
|
|
|
315
386
|
|
|
316
|
-
exports.addEditorToDataset = addEditorToDataset; exports.createDatasetFromFile = createDatasetFromFile; exports.deleteDataset = deleteDataset; exports.downloadDataset = downloadDataset; exports.getAddEditorToDatasetMutationOptions = getAddEditorToDatasetMutationOptions; exports.getCreateDatasetFromFileMutationOptions = getCreateDatasetFromFileMutationOptions; exports.getDatasetDigest = getDatasetDigest; exports.getDatasets = getDatasets; exports.getDeleteDatasetMutationOptions = getDeleteDatasetMutationOptions; exports.getDownloadDatasetQueryKey = getDownloadDatasetQueryKey; exports.getDownloadDatasetQueryOptions = getDownloadDatasetQueryOptions; exports.getGetDatasetDigestQueryKey = getGetDatasetDigestQueryKey; exports.getGetDatasetDigestQueryOptions = getGetDatasetDigestQueryOptions; exports.getGetDatasetsQueryKey = getGetDatasetsQueryKey; exports.getGetDatasetsQueryOptions = getGetDatasetsQueryOptions; exports.getGetSchemaQueryKey = getGetSchemaQueryKey; exports.getGetSchemaQueryOptions = getGetSchemaQueryOptions; exports.getGetVersionsQueryKey = getGetVersionsQueryKey; exports.getGetVersionsQueryOptions = getGetVersionsQueryOptions; exports.getRemoveEditorFromDatasetMutationOptions = getRemoveEditorFromDatasetMutationOptions; exports.getSchema = getSchema; exports.getUploadDatasetMutationOptions = getUploadDatasetMutationOptions; exports.getVersions = getVersions; exports.removeEditorFromDataset = removeEditorFromDataset; exports.uploadDataset = uploadDataset; exports.useAddEditorToDataset = useAddEditorToDataset; exports.useCreateDatasetFromFile = useCreateDatasetFromFile; exports.useDeleteDataset = useDeleteDataset; exports.useDownloadDataset = useDownloadDataset; exports.useGetDatasetDigest = useGetDatasetDigest; exports.useGetDatasets = useGetDatasets; exports.useGetSchema = useGetSchema; exports.useGetVersions = useGetVersions; exports.useRemoveEditorFromDataset = useRemoveEditorFromDataset; exports.useUploadDataset = useUploadDataset;
|
|
387
|
+
exports.addEditorToDataset = addEditorToDataset; exports.createDatasetFromFile = createDatasetFromFile; exports.deleteDataset = deleteDataset; exports.downloadDataset = downloadDataset; exports.getAddEditorToDatasetMutationOptions = getAddEditorToDatasetMutationOptions; exports.getCreateDatasetFromFileMutationOptions = getCreateDatasetFromFileMutationOptions; exports.getDatasetDigest = getDatasetDigest; exports.getDatasets = getDatasets; exports.getDeleteDatasetMutationOptions = getDeleteDatasetMutationOptions; exports.getDownloadDatasetQueryKey = getDownloadDatasetQueryKey; exports.getDownloadDatasetQueryOptions = getDownloadDatasetQueryOptions; exports.getDownloadDatasetSuspenseQueryOptions = getDownloadDatasetSuspenseQueryOptions; exports.getGetDatasetDigestQueryKey = getGetDatasetDigestQueryKey; exports.getGetDatasetDigestQueryOptions = getGetDatasetDigestQueryOptions; exports.getGetDatasetDigestSuspenseQueryOptions = getGetDatasetDigestSuspenseQueryOptions; exports.getGetDatasetsQueryKey = getGetDatasetsQueryKey; exports.getGetDatasetsQueryOptions = getGetDatasetsQueryOptions; exports.getGetDatasetsSuspenseQueryOptions = getGetDatasetsSuspenseQueryOptions; exports.getGetSchemaQueryKey = getGetSchemaQueryKey; exports.getGetSchemaQueryOptions = getGetSchemaQueryOptions; exports.getGetSchemaSuspenseQueryOptions = getGetSchemaSuspenseQueryOptions; exports.getGetVersionsQueryKey = getGetVersionsQueryKey; exports.getGetVersionsQueryOptions = getGetVersionsQueryOptions; exports.getGetVersionsSuspenseQueryOptions = getGetVersionsSuspenseQueryOptions; exports.getRemoveEditorFromDatasetMutationOptions = getRemoveEditorFromDatasetMutationOptions; exports.getSchema = getSchema; exports.getUploadDatasetMutationOptions = getUploadDatasetMutationOptions; exports.getVersions = getVersions; exports.removeEditorFromDataset = removeEditorFromDataset; exports.uploadDataset = uploadDataset; exports.useAddEditorToDataset = useAddEditorToDataset; exports.useCreateDatasetFromFile = useCreateDatasetFromFile; exports.useDeleteDataset = useDeleteDataset; exports.useDownloadDataset = useDownloadDataset; exports.useDownloadDatasetSuspense = useDownloadDatasetSuspense; exports.useGetDatasetDigest = useGetDatasetDigest; exports.useGetDatasetDigestSuspense = useGetDatasetDigestSuspense; exports.useGetDatasets = useGetDatasets; exports.useGetDatasetsSuspense = useGetDatasetsSuspense; exports.useGetSchema = useGetSchema; exports.useGetSchemaSuspense = useGetSchemaSuspense; exports.useGetVersions = useGetVersions; exports.useGetVersionsSuspense = useGetVersionsSuspense; exports.useRemoveEditorFromDataset = useRemoveEditorFromDataset; exports.useUploadDataset = useUploadDataset;
|
|
317
388
|
//# sourceMappingURL=dataset.cjs.map
|
package/dataset/dataset.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA6CA,IAAM,wBAAwB,CACjC,oBACH,YAAsD;AAEjD,QAAM,WAAW,IAAI,SAAS;AACpC,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAG,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS,OAAO,0BAA0B,mBAAmB,sBAAsB;AAAA,EACnF;AACD,MAAG,mBAAmB,uBAAuB,QAAW;AACvD,aAAS,OAAO,sBAAsB,mBAAmB,mBAAmB,SAAS,CAAC;AAAA,EACtF;AACD,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAG,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU;AAAA,EAC3D;AACD,MAAG,mBAAmB,YAAY,QAAW;AAC5C,aAAS,OAAO,WAAW,mBAAmB,OAAO;AAAA,EACrD;AAEK,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MAC1B,SAAS,EAAC,gBAAgB,sBAAuB;AAAA,MAChD,MAAM;AAAA,IACT;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,0CAA0C,CAE/B,YACiG;AACxH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAA8G,CAAC,UAAU;AAC3H,UAAM,EAAC,KAAI,IAAI,SAAS,CAAC;AAEzB,WAAQ,sBAAsB,MAAK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,SAAO,CAAC,oBAAoB,YAAY,SAAS,WAAW,cAAc,EAAE;AAC5E;AAGG,IAAM,2BAA2B,CAAoF,WACxH,gBAAwB,YACvB;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,qBAAqB,WAAU,cAAc;AAIvF,QAAM,UAAgE,CAAC,EAAE,OAAO,MAAM,UAAU,WAAU,gBAAgB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,EAAE,aAAa,iBAAiB,GAAG,aAAY;AACzF;AAQO,IAAM,eAAe,CAC3B,WACG,gBAAwB,YAEoC;AAE9D,QAAM,eAAe,yBAAyB,WAAU,gBAAe,OAAO;AAE9E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetDetail,\n DatasetDigestGetResponse,\n DatasetPostBodyBody,\n DatasetPutBodyBody,\n DatasetPutPostResponse,\n DatasetSchemaGetResponse,\n DatasetsGetResponse,\n DeleteDatasetParams,\n DmError,\n GetDatasetsParams,\n GetVersionsParams,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * 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();\nformData.append('dataset_type', datasetPutBodyBody.dataset_type)\nif(datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPutBodyBody.format_extra_variables)\n }\nif(datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPutBodyBody.skip_molecule_load.toString())\n }\nformData.append('project_id', datasetPutBodyBody.project_id)\nformData.append('path', datasetPutBodyBody.path)\nformData.append('file_name', datasetPutBodyBody.file_name)\nif(datasetPutBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPutBodyBody.dataset_id)\n }\nif(datasetPutBodyBody.unit_id !== undefined) {\n formData.append('unit_id', datasetPutBodyBody.unit_id)\n }\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateDatasetFromFileMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createDatasetFromFile>>, {data: DatasetPutBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createDatasetFromFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateDatasetFromFileMutationResult = NonNullable<Awaited<ReturnType<typeof createDatasetFromFile>>>\n export type CreateDatasetFromFileMutationBody = DatasetPutBodyBody\n export type CreateDatasetFromFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a Dataset from a file in a Project\n */\nexport const useCreateDatasetFromFile = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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();\nformData.append('dataset_file', datasetPostBodyBody.dataset_file)\nformData.append('dataset_type', datasetPostBodyBody.dataset_type)\nif(datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPostBodyBody.format_extra_variables)\n }\nif(datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPostBodyBody.skip_molecule_load.toString())\n }\nif(datasetPostBodyBody.as_filename !== undefined) {\n formData.append('as_filename', datasetPostBodyBody.as_filename)\n }\nif(datasetPostBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPostBodyBody.dataset_id)\n }\nformData.append('unit_id', datasetPostBodyBody.unit_id)\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getUploadDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof uploadDataset>>, {data: DatasetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return uploadDataset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UploadDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof uploadDataset>>>\n export type UploadDatasetMutationBody = DatasetPostBodyBody\n export type UploadDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Upload an external file as a Dataset\n */\nexport const useUploadDataset = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetsGetResponse>(\n {url: `/dataset`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams,) => {\n \n return [\"data-manager-api\", `/dataset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetDatasetsQueryOptions = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(params?: GetDatasetsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({ signal }) => getDatasets(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetsQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasets>>>\nexport type GetDatasetsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get Datasets that are available to you\n */\nexport const useGetDatasets = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(\n params?: GetDatasetsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDetail>(\n {url: `/dataset/${datasetId}/versions`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetVersionsQueryKey = (datasetId: string,\n params?: GetVersionsParams,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetVersionsQueryOptions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(datasetId: string,\n params?: GetVersionsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({ signal }) => getVersions(datasetId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionsQueryResult = NonNullable<Awaited<ReturnType<typeof getVersions>>>\nexport type GetVersionsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const useGetVersions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n params?: GetVersionsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetVersionsQueryOptions(datasetId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Given 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 \n return customInstance<TaskIdentity>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDataset>>, {datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}> = (props) => {\n const {datasetId,datasetVersion,params} = props ?? {};\n\n return deleteDataset(datasetId,datasetVersion,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDataset>>>\n \n export type DeleteDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Dataset\n */\nexport const useDeleteDataset = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getDownloadDatasetQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n }\n\n \nexport const getDownloadDatasetQueryOptions = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadDatasetQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({ signal }) => downloadDataset(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadDatasetQueryResult = NonNullable<Awaited<ReturnType<typeof downloadDataset>>>\nexport type DownloadDatasetQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Dataset\n */\nexport const useDownloadDataset = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadDatasetQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The user 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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromDatasetMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return removeEditorFromDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromDataset>>>\n \n export type RemoveEditorFromDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const useRemoveEditorFromDataset = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddEditorToDatasetMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return addEditorToDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToDataset>>>\n \n export type AddEditorToDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Give a user edit permission for a Dataset\n */\nexport const useAddEditorToDataset = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDigestGetResponse>(\n {url: `/dataset/digest/${datasetDigest}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string,) => {\n \n return [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n }\n\n \nexport const getGetDatasetDigestQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetDigest), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetDigestQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const useGetDatasetDigest = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetSchemaGetResponse>(\n {url: `/dataset/${datasetId}/schema/${datasetVersion}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetSchemaQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n }\n\n \nexport const getGetSchemaQueryOptions = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({ signal }) => getSchema(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSchemaQueryResult = NonNullable<Awaited<ReturnType<typeof getSchema>>>\nexport type GetSchemaQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the property schema for a specific Dataset\n */\nexport const useGetSchema = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSchemaQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAyCA,IAAM,wBAAwB,CACjC,oBACH,YAAsD;AAEjD,QAAM,WAAW,IAAI,SAAS;AACpC,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAG,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS,OAAO,0BAA0B,mBAAmB,sBAAsB;AAAA,EACnF;AACD,MAAG,mBAAmB,uBAAuB,QAAW;AACvD,aAAS,OAAO,sBAAsB,mBAAmB,mBAAmB,SAAS,CAAC;AAAA,EACtF;AACD,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAG,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU;AAAA,EAC3D;AACD,MAAG,mBAAmB,YAAY,QAAW;AAC5C,aAAS,OAAO,WAAW,mBAAmB,OAAO;AAAA,EACrD;AAEK,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MAC1B,SAAS,EAAC,gBAAgB,sBAAuB;AAAA,MAChD,MAAM;AAAA,IACT;A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;AACzF;AAQO,IAAM,eAAe,CAC3B,WACG,gBAAwB,YAEoC;AAE9D,QAAM,eAAe,yBAAyB,WAAU,gBAAe,OAAO;AAE9E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,mCAAmC,CAAoF,WAChI,gBAAwB,YACvB;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,qBAAqB,WAAU,cAAc;AAIvF,QAAM,UAAgE,CAAC,EAAE,OAAO,MAAM,UAAU,WAAU,gBAAgB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,EAAE,aAAa,iBAAiB,GAAG,aAAY;AACzF;AAQO,IAAM,uBAAuB,CACnC,WACG,gBAAwB,YAE4C;AAEtE,QAAM,eAAe,iCAAiC,WAAU,gBAAe,OAAO;AAEtF,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetDetail,\n DatasetDigestGetResponse,\n DatasetPostBodyBody,\n DatasetPutBodyBody,\n DatasetPutPostResponse,\n DatasetSchemaGetResponse,\n DatasetsGetResponse,\n DeleteDatasetParams,\n DmError,\n GetDatasetsParams,\n GetVersionsParams,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\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();\nformData.append('dataset_type', datasetPutBodyBody.dataset_type)\nif(datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPutBodyBody.format_extra_variables)\n }\nif(datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPutBodyBody.skip_molecule_load.toString())\n }\nformData.append('project_id', datasetPutBodyBody.project_id)\nformData.append('path', datasetPutBodyBody.path)\nformData.append('file_name', datasetPutBodyBody.file_name)\nif(datasetPutBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPutBodyBody.dataset_id)\n }\nif(datasetPutBodyBody.unit_id !== undefined) {\n formData.append('unit_id', datasetPutBodyBody.unit_id)\n }\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'PUT',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateDatasetFromFileMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createDatasetFromFile>>, {data: DatasetPutBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createDatasetFromFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateDatasetFromFileMutationResult = NonNullable<Awaited<ReturnType<typeof createDatasetFromFile>>>\n export type CreateDatasetFromFileMutationBody = DatasetPutBodyBody\n export type CreateDatasetFromFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a Dataset from a file in a Project\n */\nexport const useCreateDatasetFromFile = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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();\nformData.append('dataset_file', datasetPostBodyBody.dataset_file)\nformData.append('dataset_type', datasetPostBodyBody.dataset_type)\nif(datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPostBodyBody.format_extra_variables)\n }\nif(datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPostBodyBody.skip_molecule_load.toString())\n }\nif(datasetPostBodyBody.as_filename !== undefined) {\n formData.append('as_filename', datasetPostBodyBody.as_filename)\n }\nif(datasetPostBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPostBodyBody.dataset_id)\n }\nformData.append('unit_id', datasetPostBodyBody.unit_id)\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getUploadDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof uploadDataset>>, {data: DatasetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return uploadDataset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UploadDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof uploadDataset>>>\n export type UploadDatasetMutationBody = DatasetPostBodyBody\n export type UploadDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Upload an external file as a Dataset\n */\nexport const useUploadDataset = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetsGetResponse>(\n {url: `/dataset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams,) => {\n return [\"data-manager-api\", `/dataset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetDatasetsQueryOptions = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(params?: GetDatasetsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({ signal }) => getDatasets(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetsQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasets>>>\nexport type GetDatasetsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get Datasets that are available to you\n */\nexport const useGetDatasets = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(\n params?: GetDatasetsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetDatasetsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(params?: GetDatasetsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({ signal }) => getDatasets(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasets>>>\nexport type GetDatasetsSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get Datasets that are available to you\n */\nexport const useGetDatasetsSuspense = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(\n params?: GetDatasetsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetsSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDetail>(\n {url: `/dataset/${datasetId}/versions`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetVersionsQueryKey = (datasetId: string,\n params?: GetVersionsParams,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetVersionsQueryOptions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(datasetId: string,\n params?: GetVersionsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({ signal }) => getVersions(datasetId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionsQueryResult = NonNullable<Awaited<ReturnType<typeof getVersions>>>\nexport type GetVersionsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const useGetVersions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n params?: GetVersionsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetVersionsQueryOptions(datasetId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetVersionsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(datasetId: string,\n params?: GetVersionsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({ signal }) => getVersions(datasetId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersions>>>\nexport type GetVersionsSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const useGetVersionsSuspense = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n params?: GetVersionsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetVersionsSuspenseQueryOptions(datasetId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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 \n return customInstance<TaskIdentity>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDataset>>, {datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}> = (props) => {\n const {datasetId,datasetVersion,params} = props ?? {};\n\n return deleteDataset(datasetId,datasetVersion,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDataset>>>\n \n export type DeleteDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Dataset\n */\nexport const useDeleteDataset = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getDownloadDatasetQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n }\n\n \nexport const getDownloadDatasetQueryOptions = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadDatasetQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({ signal }) => downloadDataset(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadDatasetQueryResult = NonNullable<Awaited<ReturnType<typeof downloadDataset>>>\nexport type DownloadDatasetQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Dataset\n */\nexport const useDownloadDataset = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadDatasetQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getDownloadDatasetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadDatasetQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({ signal }) => downloadDataset(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadDatasetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadDataset>>>\nexport type DownloadDatasetSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Dataset\n */\nexport const useDownloadDatasetSuspense = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadDatasetSuspenseQueryOptions(datasetId,datasetVersion,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromDatasetMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return removeEditorFromDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromDataset>>>\n \n export type RemoveEditorFromDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const useRemoveEditorFromDataset = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddEditorToDatasetMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return addEditorToDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToDataset>>>\n \n export type AddEditorToDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Give a user edit permission for a Dataset\n */\nexport const useAddEditorToDataset = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDigestGetResponse>(\n {url: `/dataset/digest/${datasetDigest}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string,) => {\n return [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n }\n\n \nexport const getGetDatasetDigestQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetDigest), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetDigestQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const useGetDatasetDigest = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetDatasetDigestSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetDigest), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetDigestSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const useGetDatasetDigestSuspense = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetDigestSuspenseQueryOptions(datasetDigest,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetSchemaGetResponse>(\n {url: `/dataset/${datasetId}/schema/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetSchemaQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n }\n\n \nexport const getGetSchemaQueryOptions = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({ signal }) => getSchema(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSchemaQueryResult = NonNullable<Awaited<ReturnType<typeof getSchema>>>\nexport type GetSchemaQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the property schema for a specific Dataset\n */\nexport const useGetSchema = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSchemaQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetSchemaSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({ signal }) => getSchema(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSchemaSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSchema>>>\nexport type GetSchemaSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the property schema for a specific Dataset\n */\nexport const useGetSchemaSuspense = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSchemaSuspenseQueryOptions(datasetId,datasetVersion,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|