@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounting/accounting.cjs +31 -13
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +77 -0
- package/accounting/accounting.d.ts +10 -1
- package/accounting/accounting.js +29 -11
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -27
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +324 -0
- package/admin/admin.d.ts +55 -22
- package/admin/admin.js +57 -17
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +23 -13
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +57 -0
- package/application/application.d.ts +7 -1
- package/application/application.js +22 -12
- package/application/application.js.map +1 -1
- package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
- package/chunk-J22A7LHX.cjs.map +1 -0
- package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
- package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
- package/configuration/configuration.cjs +13 -7
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +29 -0
- package/configuration/configuration.d.ts +4 -1
- package/configuration/configuration.js +13 -7
- package/configuration/configuration.js.map +1 -1
- package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
- package/dataset/dataset.cjs +71 -72
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +315 -0
- package/dataset/dataset.d.ts +46 -16
- package/dataset/dataset.js +62 -63
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +43 -32
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +180 -0
- package/exchange-rate/exchange-rate.d.ts +25 -7
- package/exchange-rate/exchange-rate.js +38 -27
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs +38 -22
- package/file/file.cjs.map +1 -1
- package/file/file.d.cts +154 -0
- package/file/file.d.ts +25 -10
- package/file/file.js +34 -18
- package/file/file.js.map +1 -1
- package/index.cjs +10 -10
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -0
- package/index.d.ts +1 -1
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/instance/instance.cjs +47 -37
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +215 -0
- package/instance/instance.d.ts +33 -12
- package/instance/instance.js +41 -31
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +36 -19
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +85 -0
- package/job/job.d.ts +10 -1
- package/job/job.js +34 -17
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +23 -26
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +132 -0
- package/metadata/metadata.d.ts +19 -7
- package/metadata/metadata.js +20 -23
- package/metadata/metadata.js.map +1 -1
- package/package.json +12 -12
- package/project/project.cjs +70 -48
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +377 -0
- package/project/project.d.ts +61 -25
- package/project/project.js +59 -37
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +179 -194
- package/src/admin/admin.ts +590 -735
- package/src/application/application.ts +125 -141
- package/src/configuration/configuration.ts +72 -60
- package/src/data-manager-api.schemas.ts +940 -941
- package/src/dataset/dataset.ts +591 -770
- package/src/exchange-rate/exchange-rate.ts +362 -478
- package/src/file/file.ts +292 -357
- package/src/instance/instance.ts +427 -533
- package/src/job/job.ts +187 -198
- package/src/metadata/metadata.ts +247 -339
- package/src/project/project.ts +669 -860
- package/src/task/task.ts +181 -202
- package/src/type/type.ts +72 -68
- package/src/user/user.ts +248 -286
- package/task/task.cjs +31 -15
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +103 -0
- package/task/task.d.ts +10 -1
- package/task/task.js +29 -13
- package/task/task.js.map +1 -1
- package/type/type.cjs +13 -7
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +31 -0
- package/type/type.d.ts +4 -1
- package/type/type.js +13 -7
- package/type/type.js.map +1 -1
- package/user/user.cjs +39 -28
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +104 -0
- package/user/user.d.ts +16 -4
- package/user/user.js +36 -25
- package/user/user.js.map +1 -1
- package/chunk-UZTHSGDT.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":";;;;;AAUA,
|
|
1
|
+
{"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AAgCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAgB,QAAQ;AAAA,MAAO;AAAA,IACvC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAE5C,SAAO,CAAC,oBAAoB,cAAc;AAC1C;AAGG,IAAM,iCAAiC,CAAoF,YAC7H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,QAAM,UAAsE,CAAC,EAAE,OAAO,MAAM,gBAAgB,gBAAgB,MAAM;AAMnI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CAChC,YAE8D;AAE9D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,iBAAiB,CAC1B,eACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,gBAAgB,aAAa;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IACxD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,CAAC,kBAA2B;AAEjE,SAAO,CAAC,oBAAoB,gBAAgB,aAAa,EAAE;AAC3D;AAGG,IAAM,gCAAgC,CAAyF,eAAuB,YACxJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B,aAAa;AAIjF,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,oBAAoB,CAChC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,8BAA8B,eAAc,OAAO;AAExE,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 useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n ApplicationGetResponse,\n ApplicationsGetResponse,\n DmError\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 * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationsGetResponse>(\n {url: `/application`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationsQueryKey = () => {\n \n return [\"data-manager-api\", `/application`] as const;\n }\n\n \nexport const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({ signal }) => getApplications(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>\nexport type GetApplicationsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Applications available to you\n */\nexport const useGetApplications = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationsQueryOptions(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 * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationGetResponse>(\n {url: `/application/${applicationId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationQueryKey = (applicationId: string,) => {\n \n return [\"data-manager-api\", `/application/${applicationId}`] as const;\n }\n\n \nexport const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({ signal }) => getApplication(applicationId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>\nexport type GetApplicationQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Application\n */\nexport const useGetApplication = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(\n applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationQueryOptions(applicationId,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"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-a2110e78.js';
|
|
3
|
+
import 'axios';
|
|
4
|
+
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
6
|
+
/**
|
|
7
|
+
* Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.
|
|
8
|
+
|
|
9
|
+
Application availability will vary as applications are added to the service.
|
|
10
|
+
|
|
11
|
+
* @summary Get all Applications available to you
|
|
12
|
+
*/
|
|
13
|
+
declare const getApplications: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationsGetResponse>;
|
|
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
|
+
};
|
|
21
|
+
type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>;
|
|
22
|
+
type GetApplicationsQueryError = ErrorType<DmError>;
|
|
23
|
+
/**
|
|
24
|
+
* @summary Get all Applications available to you
|
|
25
|
+
*/
|
|
26
|
+
declare const useGetApplications: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
|
|
27
|
+
query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
|
|
28
|
+
request?: SecondParameter<typeof customInstance>;
|
|
29
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
30
|
+
queryKey: QueryKey;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Get details of a specific Application available to you that can be instantiated.
|
|
34
|
+
|
|
35
|
+
* @summary Get details of a specific Application
|
|
36
|
+
*/
|
|
37
|
+
declare const getApplication: (applicationId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationGetResponse>;
|
|
38
|
+
declare const getGetApplicationQueryKey: (applicationId: string) => readonly ["data-manager-api", `/application/${string}`];
|
|
39
|
+
declare const getGetApplicationQueryOptions: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
|
|
40
|
+
query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
|
|
41
|
+
request?: SecondParameter<typeof customInstance>;
|
|
42
|
+
} | undefined) => UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> & {
|
|
43
|
+
queryKey: QueryKey;
|
|
44
|
+
};
|
|
45
|
+
type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>;
|
|
46
|
+
type GetApplicationQueryError = ErrorType<void | DmError>;
|
|
47
|
+
/**
|
|
48
|
+
* @summary Get details of a specific Application
|
|
49
|
+
*/
|
|
50
|
+
declare const useGetApplication: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
|
|
51
|
+
query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
|
|
52
|
+
request?: SecondParameter<typeof customInstance>;
|
|
53
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
54
|
+
queryKey: QueryKey;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { GetApplicationQueryError, GetApplicationQueryResult, GetApplicationsQueryError, GetApplicationsQueryResult, getApplication, getApplications, getGetApplicationQueryKey, getGetApplicationQueryOptions, getGetApplicationsQueryKey, getGetApplicationsQueryOptions, useGetApplication, useGetApplications };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-
|
|
2
|
+
import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-a2110e78.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;
|
|
@@ -20,6 +20,9 @@ declare const getGetApplicationsQueryOptions: <TData = ApplicationsGetResponse,
|
|
|
20
20
|
};
|
|
21
21
|
type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>;
|
|
22
22
|
type GetApplicationsQueryError = ErrorType<DmError>;
|
|
23
|
+
/**
|
|
24
|
+
* @summary Get all Applications available to you
|
|
25
|
+
*/
|
|
23
26
|
declare const useGetApplications: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
|
|
24
27
|
query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
|
|
25
28
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -41,6 +44,9 @@ declare const getGetApplicationQueryOptions: <TData = ApplicationGetResponse, TE
|
|
|
41
44
|
};
|
|
42
45
|
type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>;
|
|
43
46
|
type GetApplicationQueryError = ErrorType<void | DmError>;
|
|
47
|
+
/**
|
|
48
|
+
* @summary Get details of a specific Application
|
|
49
|
+
*/
|
|
44
50
|
declare const useGetApplication: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
|
|
45
51
|
query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
|
|
46
52
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-UKA7G3OB.js";
|
|
4
4
|
|
|
5
5
|
// src/application/application.ts
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
useQuery
|
|
8
|
+
} from "@tanstack/react-query";
|
|
7
9
|
var getApplications = (options, signal) => {
|
|
8
10
|
return customInstance(
|
|
9
|
-
{
|
|
11
|
+
{
|
|
12
|
+
url: `/application`,
|
|
13
|
+
method: "get",
|
|
14
|
+
signal
|
|
15
|
+
},
|
|
10
16
|
options
|
|
11
17
|
);
|
|
12
18
|
};
|
|
13
|
-
var getGetApplicationsQueryKey = () =>
|
|
19
|
+
var getGetApplicationsQueryKey = () => {
|
|
20
|
+
return ["data-manager-api", `/application`];
|
|
21
|
+
};
|
|
14
22
|
var getGetApplicationsQueryOptions = (options) => {
|
|
15
23
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
16
24
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationsQueryKey();
|
|
17
|
-
const queryFn = ({
|
|
18
|
-
signal
|
|
19
|
-
}) => getApplications(requestOptions, signal);
|
|
25
|
+
const queryFn = ({ signal }) => getApplications(requestOptions, signal);
|
|
20
26
|
return { queryKey, queryFn, ...queryOptions };
|
|
21
27
|
};
|
|
22
28
|
var useGetApplications = (options) => {
|
|
@@ -27,17 +33,21 @@ var useGetApplications = (options) => {
|
|
|
27
33
|
};
|
|
28
34
|
var getApplication = (applicationId, options, signal) => {
|
|
29
35
|
return customInstance(
|
|
30
|
-
{
|
|
36
|
+
{
|
|
37
|
+
url: `/application/${applicationId}`,
|
|
38
|
+
method: "get",
|
|
39
|
+
signal
|
|
40
|
+
},
|
|
31
41
|
options
|
|
32
42
|
);
|
|
33
43
|
};
|
|
34
|
-
var getGetApplicationQueryKey = (applicationId) =>
|
|
44
|
+
var getGetApplicationQueryKey = (applicationId) => {
|
|
45
|
+
return ["data-manager-api", `/application/${applicationId}`];
|
|
46
|
+
};
|
|
35
47
|
var getGetApplicationQueryOptions = (applicationId, options) => {
|
|
36
48
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
37
49
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationQueryKey(applicationId);
|
|
38
|
-
const queryFn = ({
|
|
39
|
-
signal
|
|
40
|
-
}) => getApplication(applicationId, requestOptions, signal);
|
|
50
|
+
const queryFn = ({ signal }) => getApplication(applicationId, requestOptions, signal);
|
|
41
51
|
return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
|
|
42
52
|
};
|
|
43
53
|
var useGetApplication = (applicationId, options) => {
|
|
@@ -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.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 useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n ApplicationGetResponse,\n ApplicationsGetResponse,\n DmError\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 * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationsGetResponse>(\n {url: `/application`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationsQueryKey = () => {\n \n return [\"data-manager-api\", `/application`] as const;\n }\n\n \nexport const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({ signal }) => getApplications(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>\nexport type GetApplicationsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Applications available to you\n */\nexport const useGetApplications = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationsQueryOptions(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 * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationGetResponse>(\n {url: `/application/${applicationId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationQueryKey = (applicationId: string,) => {\n \n return [\"data-manager-api\", `/application/${applicationId}`] as const;\n }\n\n \nexport const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({ signal }) => getApplication(applicationId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>\nexport type GetApplicationQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Application\n */\nexport const useGetApplication = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(\n applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationQueryOptions(applicationId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AAgCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAgB,QAAQ;AAAA,MAAO;AAAA,IACvC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAE5C,SAAO,CAAC,oBAAoB,cAAc;AAC1C;AAGG,IAAM,iCAAiC,CAAoF,YAC7H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,QAAM,UAAsE,CAAC,EAAE,OAAO,MAAM,gBAAgB,gBAAgB,MAAM;AAMnI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CAChC,YAE8D;AAE9D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,iBAAiB,CAC1B,eACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,gBAAgB,aAAa;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IACxD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,CAAC,kBAA2B;AAEjE,SAAO,CAAC,oBAAoB,gBAAgB,aAAa,EAAE;AAC3D;AAGG,IAAM,gCAAgC,CAAyF,eAAuB,YACxJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B,aAAa;AAIjF,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,oBAAoB,CAChC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,8BAA8B,eAAc,OAAO;AAExE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
@@ -24,4 +24,4 @@ var customInstance = (config, options) => {
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
exports.AXIOS_INSTANCE = AXIOS_INSTANCE; exports.setAuthToken = setAuthToken; exports.setBaseUrl = setBaseUrl; exports.customInstance = customInstance;
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-J22A7LHX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/custom-instance.ts"],"names":[],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU,KAAK;AAC3E;AAMO,IAAM,aAAa,CAAC,YAAoB;AAC7C,iBAAe,SAAS,UAAU;AACpC;AAEO,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY,OAAO;AAExC,QAAM,UAAU,eAAe,EAAE,GAAG,QAAQ,GAAG,SAAS,aAAa,OAAO,MAAM,CAAC,EAAE;AAAA,IACnF,CAAC,EAAE,KAAK,MAAM;AAAA,EAChB;AAIA,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO,oCAAoC;AAAA,EACpD;AAEA,SAAO;AACT","sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/custom-instance.ts"],"sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU;
|
|
1
|
+
{"version":3,"sources":["../src/custom-instance.ts"],"sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU,KAAK;AAC3E;AAMO,IAAM,aAAa,CAAC,YAAoB;AAC7C,iBAAe,SAAS,UAAU;AACpC;AAEO,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY,OAAO;AAExC,QAAM,UAAU,eAAe,EAAE,GAAG,QAAQ,GAAG,SAAS,aAAa,OAAO,MAAM,CAAC,EAAE;AAAA,IACnF,CAAC,EAAE,KAAK,MAAM;AAAA,EAChB;AAIA,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO,oCAAoC;AAAA,EACpD;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
|
|
4
4
|
|
|
5
5
|
// src/configuration/configuration.ts
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
var _reactquery = require('@tanstack/react-query');
|
|
7
9
|
var getMode = (options, signal) => {
|
|
8
|
-
return
|
|
9
|
-
{
|
|
10
|
+
return _chunkJ22A7LHXcjs.customInstance.call(void 0,
|
|
11
|
+
{
|
|
12
|
+
url: `/mode`,
|
|
13
|
+
method: "get",
|
|
14
|
+
signal
|
|
15
|
+
},
|
|
10
16
|
options
|
|
11
17
|
);
|
|
12
18
|
};
|
|
13
|
-
var getGetModeQueryKey = () =>
|
|
19
|
+
var getGetModeQueryKey = () => {
|
|
20
|
+
return ["data-manager-api", `/mode`];
|
|
21
|
+
};
|
|
14
22
|
var getGetModeQueryOptions = (options) => {
|
|
15
23
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
16
24
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetModeQueryKey()));
|
|
17
|
-
const queryFn = ({
|
|
18
|
-
signal
|
|
19
|
-
}) => getMode(requestOptions, signal);
|
|
25
|
+
const queryFn = ({ signal }) => getMode(requestOptions, signal);
|
|
20
26
|
return { queryKey, queryFn, ...queryOptions };
|
|
21
27
|
};
|
|
22
28
|
var useGetMode = (options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/configuration/configuration.ts"],"names":[],"mappings":";;;;;AAUA,
|
|
1
|
+
{"version":3,"sources":["../../src/configuration/configuration.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA2BA,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;AAEpC,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","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 useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\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\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary 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 \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?: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?: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\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.js';
|
|
3
|
+
import 'axios';
|
|
4
|
+
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
6
|
+
/**
|
|
7
|
+
* @summary Gets the Data Manager mode that's running behind the API
|
|
8
|
+
*/
|
|
9
|
+
declare const getMode: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ModeGetResponse>;
|
|
10
|
+
declare const getGetModeQueryKey: () => readonly ["data-manager-api", "/mode"];
|
|
11
|
+
declare const getGetModeQueryOptions: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
12
|
+
query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
|
|
13
|
+
request?: SecondParameter<typeof customInstance>;
|
|
14
|
+
} | undefined) => UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> & {
|
|
15
|
+
queryKey: QueryKey;
|
|
16
|
+
};
|
|
17
|
+
type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
|
|
18
|
+
type GetModeQueryError = ErrorType<void | DmError>;
|
|
19
|
+
/**
|
|
20
|
+
* @summary Gets the Data Manager mode that's running behind the API
|
|
21
|
+
*/
|
|
22
|
+
declare const useGetMode: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
23
|
+
query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
|
|
24
|
+
request?: SecondParameter<typeof customInstance>;
|
|
25
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
26
|
+
queryKey: QueryKey;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { GetModeQueryError, GetModeQueryResult, getGetModeQueryKey, getGetModeQueryOptions, getMode, useGetMode };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-
|
|
2
|
+
import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.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;
|
|
@@ -16,6 +16,9 @@ declare const getGetModeQueryOptions: <TData = ModeGetResponse, TError = ErrorTy
|
|
|
16
16
|
};
|
|
17
17
|
type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
|
|
18
18
|
type GetModeQueryError = ErrorType<void | DmError>;
|
|
19
|
+
/**
|
|
20
|
+
* @summary Gets the Data Manager mode that's running behind the API
|
|
21
|
+
*/
|
|
19
22
|
declare const useGetMode: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
20
23
|
query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
|
|
21
24
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-UKA7G3OB.js";
|
|
4
4
|
|
|
5
5
|
// src/configuration/configuration.ts
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
useQuery
|
|
8
|
+
} from "@tanstack/react-query";
|
|
7
9
|
var getMode = (options, signal) => {
|
|
8
10
|
return customInstance(
|
|
9
|
-
{
|
|
11
|
+
{
|
|
12
|
+
url: `/mode`,
|
|
13
|
+
method: "get",
|
|
14
|
+
signal
|
|
15
|
+
},
|
|
10
16
|
options
|
|
11
17
|
);
|
|
12
18
|
};
|
|
13
|
-
var getGetModeQueryKey = () =>
|
|
19
|
+
var getGetModeQueryKey = () => {
|
|
20
|
+
return ["data-manager-api", `/mode`];
|
|
21
|
+
};
|
|
14
22
|
var getGetModeQueryOptions = (options) => {
|
|
15
23
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
16
24
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetModeQueryKey();
|
|
17
|
-
const queryFn = ({
|
|
18
|
-
signal
|
|
19
|
-
}) => getMode(requestOptions, signal);
|
|
25
|
+
const queryFn = ({ signal }) => getMode(requestOptions, signal);
|
|
20
26
|
return { queryKey, queryFn, ...queryOptions };
|
|
21
27
|
};
|
|
22
28
|
var useGetMode = (options) => {
|
|
@@ -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.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 useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\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\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary 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 \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?: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?: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\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA2BA,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;AAEpC,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;","names":[]}
|