@squonk/data-manager-client 1.1.3 → 1.1.4-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounting/accounting.cjs +28 -25
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +23 -5
- package/accounting/accounting.js +27 -24
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +68 -28
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +74 -4
- package/admin/admin.js +67 -27
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +19 -16
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +16 -4
- package/application/application.js +18 -15
- package/application/application.js.map +1 -1
- package/{custom-instance-d49ce6d9.d.ts → custom-instance-e49ba702.d.ts} +1 -1
- package/dataset/dataset.cjs +98 -45
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +85 -7
- package/dataset/dataset.js +97 -44
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +62 -27
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.ts +50 -6
- package/exchange-rate/exchange-rate.js +61 -26
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs +40 -25
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +40 -4
- package/file/file.js +39 -24
- package/file/file.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +54 -29
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +60 -4
- package/instance/instance.js +53 -28
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +28 -32
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +23 -5
- package/job/job.js +27 -31
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +42 -20
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +38 -4
- package/metadata/metadata.js +41 -19
- package/metadata/metadata.js.map +1 -1
- package/package.json +10 -9
- package/project/project.cjs +105 -47
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +106 -6
- package/project/project.js +104 -46
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +88 -43
- package/src/admin/admin.ts +253 -99
- package/src/application/application.ts +64 -31
- package/src/data-manager-api.schemas.ts +1 -1
- package/src/dataset/dataset.ts +323 -130
- package/src/exchange-rate/exchange-rate.ts +211 -87
- package/src/file/file.ts +148 -63
- package/src/instance/instance.ts +202 -87
- package/src/job/job.ts +93 -50
- package/src/metadata/metadata.ts +136 -54
- package/src/project/project.ts +367 -146
- package/src/task/task.ts +91 -44
- package/src/type/type.ts +27 -14
- package/src/user/user.ts +121 -61
- package/task/task.cjs +26 -26
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +24 -4
- package/task/task.js +25 -25
- package/task/task.js.map +1 -1
- package/type/type.cjs +10 -9
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +9 -3
- package/type/type.js +9 -8
- package/type/type.js.map +1 -1
- package/user/user.cjs +35 -29
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +31 -5
- package/user/user.js +34 -28
- package/user/user.js.map +1 -1
- package/chunk-LNYWU37B.cjs +0 -13
- package/chunk-LNYWU37B.cjs.map +0 -1
- package/chunk-LT4O36DN.js +0 -13
- package/chunk-LT4O36DN.js.map +0 -1
- package/src/queryMutator.ts +0 -12
|
@@ -1,8 +1,5 @@
|
|
|
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 _chunkLNYWU37Bcjs = require('../chunk-LNYWU37B.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
|
|
7
4
|
|
|
8
5
|
// src/application/application.ts
|
|
@@ -13,16 +10,19 @@ var getApplications = (options, signal) => {
|
|
|
13
10
|
options
|
|
14
11
|
);
|
|
15
12
|
};
|
|
16
|
-
var getGetApplicationsQueryKey = () => [`/application`];
|
|
17
|
-
var
|
|
13
|
+
var getGetApplicationsQueryKey = () => ["data-manager-api", `/application`];
|
|
14
|
+
var getGetApplicationsQueryOptions = (options) => {
|
|
18
15
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
19
16
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetApplicationsQueryKey()));
|
|
20
17
|
const queryFn = ({
|
|
21
18
|
signal
|
|
22
19
|
}) => getApplications(requestOptions, signal);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
21
|
+
};
|
|
22
|
+
var useGetApplications = (options) => {
|
|
23
|
+
const queryOptions = getGetApplicationsQueryOptions(options);
|
|
24
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
25
|
+
query.queryKey = queryOptions.queryKey;
|
|
26
26
|
return query;
|
|
27
27
|
};
|
|
28
28
|
var getApplication = (applicationId, options, signal) => {
|
|
@@ -31,18 +31,19 @@ var getApplication = (applicationId, options, signal) => {
|
|
|
31
31
|
options
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
|
-
var getGetApplicationQueryKey = (applicationId) => [
|
|
35
|
-
|
|
36
|
-
];
|
|
37
|
-
var useGetApplication = (applicationId, options) => {
|
|
34
|
+
var getGetApplicationQueryKey = (applicationId) => ["data-manager-api", `/application/${applicationId}`];
|
|
35
|
+
var getGetApplicationQueryOptions = (applicationId, options) => {
|
|
38
36
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
39
37
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetApplicationQueryKey(applicationId)));
|
|
40
38
|
const queryFn = ({
|
|
41
39
|
signal
|
|
42
40
|
}) => getApplication(applicationId, requestOptions, signal);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
|
|
42
|
+
};
|
|
43
|
+
var useGetApplication = (applicationId, options) => {
|
|
44
|
+
const queryOptions = getGetApplicationQueryOptions(applicationId, options);
|
|
45
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
46
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
47
|
return query;
|
|
47
48
|
};
|
|
48
49
|
|
|
@@ -52,5 +53,7 @@ var useGetApplication = (applicationId, options) => {
|
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
exports.getApplication = getApplication; exports.getApplications = getApplications; exports.getGetApplicationQueryKey = getGetApplicationQueryKey; exports.getGetApplicationQueryOptions = getGetApplicationQueryOptions; exports.getGetApplicationsQueryKey = getGetApplicationsQueryKey; exports.getGetApplicationsQueryOptions = getGetApplicationsQueryOptions; exports.useGetApplication = useGetApplication; exports.useGetApplications = useGetApplications;
|
|
56
59
|
//# sourceMappingURL=application.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,QAAQ,OAAO,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,oBAAoB,cAAc;AAE5E,IAAM,iCAAiC,CAG5C,YAW4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9D;AAAA,EACF;AACF;AAEO,IAAM,4BAA4B,CAAC,kBACxC,CAAC,oBAAoB,gBAAgB,eAAe;AAE/C,IAAM,gCAAgC,CAI3C,eACA,YAY4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,0BAA0B,aAAa;AAEnE,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,EACF,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAE1D,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,eAAe,GAAG,aAAa;AACxE;AAOO,IAAM,oBAAoB,CAI/B,eACA,YAQ2D;AAC3D,QAAM,eAAe,8BAA8B,eAAe,OAAO;AAEzE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ApplicationsGetResponse,\n DmError,\n ApplicationGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Get a list of all applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the cluster.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationsGetResponse>(\n { url: `/application`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationsQueryKey = () => [\"data-manager-api\", `/application`] as const;\n\nexport const getGetApplicationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({\n signal,\n }) => getApplications(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetApplicationsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplications>>\n>;\nexport type GetApplicationsQueryError = ErrorType<DmError>;\n\nexport const useGetApplications = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationsQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationGetResponse>(\n { url: `/application/${applicationId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationQueryKey = (applicationId: string) =>\n [\"data-manager-api\", `/application/${applicationId}`] as const;\n\nexport const getGetApplicationQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({\n signal,\n }) => getApplication(applicationId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };\n};\n\nexport type GetApplicationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplication>>\n>;\nexport type GetApplicationQueryError = ErrorType<void | DmError>;\n\nexport const useGetApplication = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationQueryOptions(applicationId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { bO as customInstance, bD as ApplicationsGetResponse, bP as ErrorType, bK as DmError, bE as ApplicationGetResponse } from '../custom-instance-
|
|
2
|
+
import { bO as customInstance, bD as ApplicationsGetResponse, bP as ErrorType, bK as DmError, bE as ApplicationGetResponse } from '../custom-instance-e49ba702.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -11,7 +11,13 @@ Application availability will vary as applications are added to the cluster.
|
|
|
11
11
|
* @summary Get all Applications available to you
|
|
12
12
|
*/
|
|
13
13
|
declare const getApplications: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationsGetResponse>;
|
|
14
|
-
declare const getGetApplicationsQueryKey: () =>
|
|
14
|
+
declare const getGetApplicationsQueryKey: () => readonly ["data-manager-api", "/application"];
|
|
15
|
+
declare const getGetApplicationsQueryOptions: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
|
|
16
|
+
query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
|
|
17
|
+
request?: SecondParameter<typeof customInstance>;
|
|
18
|
+
} | undefined) => UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> & {
|
|
19
|
+
queryKey: QueryKey;
|
|
20
|
+
};
|
|
15
21
|
type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>;
|
|
16
22
|
type GetApplicationsQueryError = ErrorType<DmError>;
|
|
17
23
|
declare const useGetApplications: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
|
|
@@ -26,7 +32,13 @@ declare const useGetApplications: <TData = ApplicationsGetResponse, TError = Err
|
|
|
26
32
|
* @summary Get details of a specific Application
|
|
27
33
|
*/
|
|
28
34
|
declare const getApplication: (applicationId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationGetResponse>;
|
|
29
|
-
declare const getGetApplicationQueryKey: (applicationId: string) => string
|
|
35
|
+
declare const getGetApplicationQueryKey: (applicationId: string) => readonly ["data-manager-api", `/application/${string}`];
|
|
36
|
+
declare const getGetApplicationQueryOptions: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
|
|
37
|
+
query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
|
|
38
|
+
request?: SecondParameter<typeof customInstance>;
|
|
39
|
+
} | undefined) => UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> & {
|
|
40
|
+
queryKey: QueryKey;
|
|
41
|
+
};
|
|
30
42
|
type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>;
|
|
31
43
|
type GetApplicationQueryError = ErrorType<void | DmError>;
|
|
32
44
|
declare const useGetApplication: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
|
|
@@ -36,4 +48,4 @@ declare const useGetApplication: <TData = ApplicationGetResponse, TError = Error
|
|
|
36
48
|
queryKey: QueryKey;
|
|
37
49
|
};
|
|
38
50
|
|
|
39
|
-
export { GetApplicationQueryError, GetApplicationQueryResult, GetApplicationsQueryError, GetApplicationsQueryResult, getApplication, getApplications, getGetApplicationQueryKey, getGetApplicationsQueryKey, useGetApplication, useGetApplications };
|
|
51
|
+
export { GetApplicationQueryError, GetApplicationQueryResult, GetApplicationsQueryError, GetApplicationsQueryResult, getApplication, getApplications, getGetApplicationQueryKey, getGetApplicationQueryOptions, getGetApplicationsQueryKey, getGetApplicationsQueryOptions, useGetApplication, useGetApplications };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryMutator
|
|
3
|
-
} from "../chunk-LT4O36DN.js";
|
|
4
1
|
import {
|
|
5
2
|
customInstance
|
|
6
3
|
} from "../chunk-3RNIDX7T.js";
|
|
@@ -13,16 +10,19 @@ var getApplications = (options, signal) => {
|
|
|
13
10
|
options
|
|
14
11
|
);
|
|
15
12
|
};
|
|
16
|
-
var getGetApplicationsQueryKey = () => [`/application`];
|
|
17
|
-
var
|
|
13
|
+
var getGetApplicationsQueryKey = () => ["data-manager-api", `/application`];
|
|
14
|
+
var getGetApplicationsQueryOptions = (options) => {
|
|
18
15
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
19
16
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationsQueryKey();
|
|
20
17
|
const queryFn = ({
|
|
21
18
|
signal
|
|
22
19
|
}) => getApplications(requestOptions, signal);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
21
|
+
};
|
|
22
|
+
var useGetApplications = (options) => {
|
|
23
|
+
const queryOptions = getGetApplicationsQueryOptions(options);
|
|
24
|
+
const query = useQuery(queryOptions);
|
|
25
|
+
query.queryKey = queryOptions.queryKey;
|
|
26
26
|
return query;
|
|
27
27
|
};
|
|
28
28
|
var getApplication = (applicationId, options, signal) => {
|
|
@@ -31,25 +31,28 @@ var getApplication = (applicationId, options, signal) => {
|
|
|
31
31
|
options
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
|
-
var getGetApplicationQueryKey = (applicationId) => [
|
|
35
|
-
|
|
36
|
-
];
|
|
37
|
-
var useGetApplication = (applicationId, options) => {
|
|
34
|
+
var getGetApplicationQueryKey = (applicationId) => ["data-manager-api", `/application/${applicationId}`];
|
|
35
|
+
var getGetApplicationQueryOptions = (applicationId, options) => {
|
|
38
36
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
39
37
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationQueryKey(applicationId);
|
|
40
38
|
const queryFn = ({
|
|
41
39
|
signal
|
|
42
40
|
}) => getApplication(applicationId, requestOptions, signal);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
|
|
42
|
+
};
|
|
43
|
+
var useGetApplication = (applicationId, options) => {
|
|
44
|
+
const queryOptions = getGetApplicationQueryOptions(applicationId, options);
|
|
45
|
+
const query = useQuery(queryOptions);
|
|
46
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
47
|
return query;
|
|
47
48
|
};
|
|
48
49
|
export {
|
|
49
50
|
getApplication,
|
|
50
51
|
getApplications,
|
|
51
52
|
getGetApplicationQueryKey,
|
|
53
|
+
getGetApplicationQueryOptions,
|
|
52
54
|
getGetApplicationsQueryKey,
|
|
55
|
+
getGetApplicationsQueryOptions,
|
|
53
56
|
useGetApplication,
|
|
54
57
|
useGetApplications
|
|
55
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/application/application.ts"],"sourcesContent":["/**\n * Generated by orval v6.
|
|
1
|
+
{"version":3,"sources":["../../src/application/application.ts"],"sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ApplicationsGetResponse,\n DmError,\n ApplicationGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Get a list of all applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the cluster.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationsGetResponse>(\n { url: `/application`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationsQueryKey = () => [\"data-manager-api\", `/application`] as const;\n\nexport const getGetApplicationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({\n signal,\n }) => getApplications(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetApplicationsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplications>>\n>;\nexport type GetApplicationsQueryError = ErrorType<DmError>;\n\nexport const useGetApplications = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationsQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationGetResponse>(\n { url: `/application/${applicationId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationQueryKey = (applicationId: string) =>\n [\"data-manager-api\", `/application/${applicationId}`] as const;\n\nexport const getGetApplicationQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({\n signal,\n }) => getApplication(applicationId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };\n};\n\nexport type GetApplicationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplication>>\n>;\nexport type GetApplicationQueryError = ErrorType<void | DmError>;\n\nexport const useGetApplication = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationQueryOptions(applicationId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,QAAQ,OAAO,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,oBAAoB,cAAc;AAE5E,IAAM,iCAAiC,CAG5C,YAW4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9D;AAAA,EACF;AACF;AAEO,IAAM,4BAA4B,CAAC,kBACxC,CAAC,oBAAoB,gBAAgB,eAAe;AAE/C,IAAM,gCAAgC,CAI3C,eACA,YAY4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,0BAA0B,aAAa;AAEnE,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,EACF,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAE1D,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,eAAe,GAAG,aAAa;AACxE;AAOO,IAAM,oBAAoB,CAI/B,eACA,YAQ2D;AAC3D,QAAM,eAAe,8BAA8B,eAAe,OAAO;AAEzE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
package/dataset/dataset.cjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
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 _chunkLNYWU37Bcjs = require('../chunk-LNYWU37B.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
|
|
7
4
|
|
|
8
5
|
// src/dataset/dataset.ts
|
|
@@ -41,13 +38,17 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
|
|
|
41
38
|
options
|
|
42
39
|
);
|
|
43
40
|
};
|
|
44
|
-
var
|
|
41
|
+
var getCreateDatasetFromFileMutationOptions = (options) => {
|
|
45
42
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
46
43
|
const mutationFn = (props) => {
|
|
47
44
|
const { data } = _nullishCoalesce(props, () => ( {}));
|
|
48
45
|
return createDatasetFromFile(data, requestOptions);
|
|
49
46
|
};
|
|
50
|
-
return
|
|
47
|
+
return { mutationFn, ...mutationOptions };
|
|
48
|
+
};
|
|
49
|
+
var useCreateDatasetFromFile = (options) => {
|
|
50
|
+
const mutationOptions = getCreateDatasetFromFileMutationOptions(options);
|
|
51
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
51
52
|
};
|
|
52
53
|
var uploadDataset = (datasetPostBodyBody, options) => {
|
|
53
54
|
const formData = new FormData();
|
|
@@ -82,13 +83,17 @@ var uploadDataset = (datasetPostBodyBody, options) => {
|
|
|
82
83
|
options
|
|
83
84
|
);
|
|
84
85
|
};
|
|
85
|
-
var
|
|
86
|
+
var getUploadDatasetMutationOptions = (options) => {
|
|
86
87
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
87
88
|
const mutationFn = (props) => {
|
|
88
89
|
const { data } = _nullishCoalesce(props, () => ( {}));
|
|
89
90
|
return uploadDataset(data, requestOptions);
|
|
90
91
|
};
|
|
91
|
-
return
|
|
92
|
+
return { mutationFn, ...mutationOptions };
|
|
93
|
+
};
|
|
94
|
+
var useUploadDataset = (options) => {
|
|
95
|
+
const mutationOptions = getUploadDatasetMutationOptions(options);
|
|
96
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
92
97
|
};
|
|
93
98
|
var getDatasets = (params, options, signal) => {
|
|
94
99
|
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
@@ -96,19 +101,19 @@ var getDatasets = (params, options, signal) => {
|
|
|
96
101
|
options
|
|
97
102
|
);
|
|
98
103
|
};
|
|
99
|
-
var getGetDatasetsQueryKey = (params) => [
|
|
100
|
-
|
|
101
|
-
...params ? [params] : []
|
|
102
|
-
];
|
|
103
|
-
var useGetDatasets = (params, options) => {
|
|
104
|
+
var getGetDatasetsQueryKey = (params) => ["data-manager-api", `/dataset`, ...params ? [params] : []];
|
|
105
|
+
var getGetDatasetsQueryOptions = (params, options) => {
|
|
104
106
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
105
107
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetsQueryKey(params)));
|
|
106
108
|
const queryFn = ({
|
|
107
109
|
signal
|
|
108
110
|
}) => getDatasets(params, requestOptions, signal);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
112
|
+
};
|
|
113
|
+
var useGetDatasets = (params, options) => {
|
|
114
|
+
const queryOptions = getGetDatasetsQueryOptions(params, options);
|
|
115
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
116
|
+
query.queryKey = queryOptions.queryKey;
|
|
112
117
|
return query;
|
|
113
118
|
};
|
|
114
119
|
var getVersions = (datasetId, params, options, signal) => {
|
|
@@ -117,16 +122,19 @@ var getVersions = (datasetId, params, options, signal) => {
|
|
|
117
122
|
options
|
|
118
123
|
);
|
|
119
124
|
};
|
|
120
|
-
var getGetVersionsQueryKey = (datasetId, params) => [`/dataset/${datasetId}/versions`, ...params ? [params] : []];
|
|
121
|
-
var
|
|
125
|
+
var getGetVersionsQueryKey = (datasetId, params) => ["data-manager-api", `/dataset/${datasetId}/versions`, ...params ? [params] : []];
|
|
126
|
+
var getGetVersionsQueryOptions = (datasetId, params, options) => {
|
|
122
127
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
123
128
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionsQueryKey(datasetId, params)));
|
|
124
129
|
const queryFn = ({
|
|
125
130
|
signal
|
|
126
131
|
}) => getVersions(datasetId, params, requestOptions, signal);
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
|
|
133
|
+
};
|
|
134
|
+
var useGetVersions = (datasetId, params, options) => {
|
|
135
|
+
const queryOptions = getGetVersionsQueryOptions(datasetId, params, options);
|
|
136
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
137
|
+
query.queryKey = queryOptions.queryKey;
|
|
130
138
|
return query;
|
|
131
139
|
};
|
|
132
140
|
var deleteDataset = (datasetId, datasetVersion, params, options) => {
|
|
@@ -139,13 +147,17 @@ var deleteDataset = (datasetId, datasetVersion, params, options) => {
|
|
|
139
147
|
options
|
|
140
148
|
);
|
|
141
149
|
};
|
|
142
|
-
var
|
|
150
|
+
var getDeleteDatasetMutationOptions = (options) => {
|
|
143
151
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
144
152
|
const mutationFn = (props) => {
|
|
145
153
|
const { datasetId, datasetVersion, params } = _nullishCoalesce(props, () => ( {}));
|
|
146
154
|
return deleteDataset(datasetId, datasetVersion, params, requestOptions);
|
|
147
155
|
};
|
|
148
|
-
return
|
|
156
|
+
return { mutationFn, ...mutationOptions };
|
|
157
|
+
};
|
|
158
|
+
var useDeleteDataset = (options) => {
|
|
159
|
+
const mutationOptions = getDeleteDatasetMutationOptions(options);
|
|
160
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
149
161
|
};
|
|
150
162
|
var downloadDataset = (datasetId, datasetVersion, options, signal) => {
|
|
151
163
|
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
@@ -153,16 +165,28 @@ var downloadDataset = (datasetId, datasetVersion, options, signal) => {
|
|
|
153
165
|
options
|
|
154
166
|
);
|
|
155
167
|
};
|
|
156
|
-
var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/${datasetVersion}`];
|
|
157
|
-
var
|
|
168
|
+
var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => ["data-manager-api", `/dataset/${datasetId}/${datasetVersion}`];
|
|
169
|
+
var getDownloadDatasetQueryOptions = (datasetId, datasetVersion, options) => {
|
|
158
170
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
159
171
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadDatasetQueryKey(datasetId, datasetVersion)));
|
|
160
172
|
const queryFn = ({
|
|
161
173
|
signal
|
|
162
174
|
}) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
175
|
+
return {
|
|
176
|
+
queryKey,
|
|
177
|
+
queryFn,
|
|
178
|
+
enabled: !!(datasetId && datasetVersion),
|
|
179
|
+
...queryOptions
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
var useDownloadDataset = (datasetId, datasetVersion, options) => {
|
|
183
|
+
const queryOptions = getDownloadDatasetQueryOptions(
|
|
184
|
+
datasetId,
|
|
185
|
+
datasetVersion,
|
|
186
|
+
options
|
|
187
|
+
);
|
|
188
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
189
|
+
query.queryKey = queryOptions.queryKey;
|
|
166
190
|
return query;
|
|
167
191
|
};
|
|
168
192
|
var removeEditorFromDataset = (datasetId, userId, options) => {
|
|
@@ -171,13 +195,17 @@ var removeEditorFromDataset = (datasetId, userId, options) => {
|
|
|
171
195
|
options
|
|
172
196
|
);
|
|
173
197
|
};
|
|
174
|
-
var
|
|
198
|
+
var getRemoveEditorFromDatasetMutationOptions = (options) => {
|
|
175
199
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
176
200
|
const mutationFn = (props) => {
|
|
177
201
|
const { datasetId, userId } = _nullishCoalesce(props, () => ( {}));
|
|
178
202
|
return removeEditorFromDataset(datasetId, userId, requestOptions);
|
|
179
203
|
};
|
|
180
|
-
return
|
|
204
|
+
return { mutationFn, ...mutationOptions };
|
|
205
|
+
};
|
|
206
|
+
var useRemoveEditorFromDataset = (options) => {
|
|
207
|
+
const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);
|
|
208
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
181
209
|
};
|
|
182
210
|
var addEditorToDataset = (datasetId, userId, options) => {
|
|
183
211
|
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
@@ -185,13 +213,17 @@ var addEditorToDataset = (datasetId, userId, options) => {
|
|
|
185
213
|
options
|
|
186
214
|
);
|
|
187
215
|
};
|
|
188
|
-
var
|
|
216
|
+
var getAddEditorToDatasetMutationOptions = (options) => {
|
|
189
217
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
190
218
|
const mutationFn = (props) => {
|
|
191
219
|
const { datasetId, userId } = _nullishCoalesce(props, () => ( {}));
|
|
192
220
|
return addEditorToDataset(datasetId, userId, requestOptions);
|
|
193
221
|
};
|
|
194
|
-
return
|
|
222
|
+
return { mutationFn, ...mutationOptions };
|
|
223
|
+
};
|
|
224
|
+
var useAddEditorToDataset = (options) => {
|
|
225
|
+
const mutationOptions = getAddEditorToDatasetMutationOptions(options);
|
|
226
|
+
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
195
227
|
};
|
|
196
228
|
var getDatasetDigest = (datasetDigest, options, signal) => {
|
|
197
229
|
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
@@ -199,16 +231,17 @@ var getDatasetDigest = (datasetDigest, options, signal) => {
|
|
|
199
231
|
options
|
|
200
232
|
);
|
|
201
233
|
};
|
|
202
|
-
var getGetDatasetDigestQueryKey = (datasetDigest) => [
|
|
203
|
-
|
|
204
|
-
];
|
|
205
|
-
var useGetDatasetDigest = (datasetDigest, options) => {
|
|
234
|
+
var getGetDatasetDigestQueryKey = (datasetDigest) => ["data-manager-api", `/dataset/digest/${datasetDigest}`];
|
|
235
|
+
var getGetDatasetDigestQueryOptions = (datasetDigest, options) => {
|
|
206
236
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
207
237
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetDigestQueryKey(datasetDigest)));
|
|
208
238
|
const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
239
|
+
return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };
|
|
240
|
+
};
|
|
241
|
+
var useGetDatasetDigest = (datasetDigest, options) => {
|
|
242
|
+
const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, options);
|
|
243
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
244
|
+
query.queryKey = queryOptions.queryKey;
|
|
212
245
|
return query;
|
|
213
246
|
};
|
|
214
247
|
var getSchema = (datasetId, datasetVersion, options, signal) => {
|
|
@@ -221,18 +254,28 @@ var getSchema = (datasetId, datasetVersion, options, signal) => {
|
|
|
221
254
|
options
|
|
222
255
|
);
|
|
223
256
|
};
|
|
224
|
-
var getGetSchemaQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/schema/${datasetVersion}`];
|
|
225
|
-
var
|
|
257
|
+
var getGetSchemaQueryKey = (datasetId, datasetVersion) => ["data-manager-api", `/dataset/${datasetId}/schema/${datasetVersion}`];
|
|
258
|
+
var getGetSchemaQueryOptions = (datasetId, datasetVersion, options) => {
|
|
226
259
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
227
260
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetSchemaQueryKey(datasetId, datasetVersion)));
|
|
228
261
|
const queryFn = ({
|
|
229
262
|
signal
|
|
230
263
|
}) => getSchema(datasetId, datasetVersion, requestOptions, signal);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
264
|
+
return {
|
|
265
|
+
queryKey,
|
|
266
|
+
queryFn,
|
|
267
|
+
enabled: !!(datasetId && datasetVersion),
|
|
268
|
+
...queryOptions
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
var useGetSchema = (datasetId, datasetVersion, options) => {
|
|
272
|
+
const queryOptions = getGetSchemaQueryOptions(
|
|
273
|
+
datasetId,
|
|
274
|
+
datasetVersion,
|
|
275
|
+
options
|
|
234
276
|
);
|
|
235
|
-
query
|
|
277
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
278
|
+
query.queryKey = queryOptions.queryKey;
|
|
236
279
|
return query;
|
|
237
280
|
};
|
|
238
281
|
|
|
@@ -261,5 +304,15 @@ var useGetSchema = (datasetId, datasetVersion, options) => {
|
|
|
261
304
|
|
|
262
305
|
|
|
263
306
|
|
|
264
|
-
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
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;
|
|
265
318
|
//# sourceMappingURL=dataset.cjs.map
|