@squonk/data-manager-client 0.7.19 → 0.7.21-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 +10 -16
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +2 -13
- package/accounting/accounting.js +8 -14
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +11 -16
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +2 -2
- package/admin/admin.js +5 -10
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +10 -12
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +2 -13
- package/application/application.js +9 -11
- package/application/application.js.map +1 -1
- package/{chunk-6EEIAH4R.js → chunk-3TENYKS7.js} +1 -1
- package/{chunk-6EEIAH4R.js.map → chunk-3TENYKS7.js.map} +0 -0
- package/{chunk-NGBTCJWS.cjs → chunk-RHHRF25R.cjs} +1 -1
- package/{chunk-NGBTCJWS.cjs.map → chunk-RHHRF25R.cjs.map} +0 -0
- package/{custom-instance-2adec346.d.ts → custom-instance-4dd0f9fc.d.ts} +1 -1
- package/dataset/dataset.cjs +29 -33
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +2 -2
- package/dataset/dataset.js +20 -24
- package/dataset/dataset.js.map +1 -1
- package/file/file.cjs +13 -16
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +8 -8
- package/file/file.js +10 -13
- package/file/file.js.map +1 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +14 -17
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +2 -2
- package/instance/instance.js +10 -13
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +11 -16
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +5 -16
- package/job/job.js +9 -14
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +13 -16
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +2 -2
- package/metadata/metadata.js +9 -12
- package/metadata/metadata.js.map +1 -1
- package/package.json +8 -8
- package/project/project.cjs +28 -31
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +8 -8
- package/project/project.js +19 -22
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +24 -22
- package/src/admin/admin.ts +15 -14
- package/src/application/application.ts +21 -17
- package/src/data-manager-api.schemas.ts +1 -1
- package/src/dataset/dataset.ts +38 -35
- package/src/file/file.ts +27 -26
- package/src/instance/instance.ts +22 -19
- package/src/job/job.ts +26 -26
- package/src/metadata/metadata.ts +19 -18
- package/src/project/project.ts +40 -36
- package/src/task/task.ts +18 -20
- package/src/type/type.ts +14 -12
- package/src/user/user.ts +26 -25
- package/task/task.cjs +9 -14
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +2 -2
- package/task/task.js +8 -13
- package/task/task.js.map +1 -1
- package/type/type.cjs +4 -8
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +2 -13
- package/type/type.js +4 -8
- package/type/type.js.map +1 -1
- package/user/user.cjs +11 -18
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +2 -2
- package/user/user.js +10 -17
- package/user/user.js.map +1 -1
|
@@ -1,14 +1,11 @@
|
|
|
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
|
-
|
|
4
|
-
var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
|
|
3
|
+
var _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
|
|
5
4
|
|
|
6
5
|
// src/accounting/accounting.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
6
|
var _reactquery = require('react-query');
|
|
10
7
|
var getAccountServerNamespace = (options, signal) => {
|
|
11
|
-
return
|
|
8
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/account-server/namespace`, method: "get", signal }, options);
|
|
12
9
|
};
|
|
13
10
|
var getGetAccountServerNamespaceQueryKey = () => [
|
|
14
11
|
`/account-server/namespace`
|
|
@@ -18,12 +15,11 @@ var useGetAccountServerNamespace = (options) => {
|
|
|
18
15
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerNamespaceQueryKey()));
|
|
19
16
|
const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
|
|
20
17
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, query);
|
|
18
|
+
query.queryKey = queryKey;
|
|
19
|
+
return query;
|
|
24
20
|
};
|
|
25
21
|
var getAccountServerRegistration = (options, signal) => {
|
|
26
|
-
return
|
|
22
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/account-server/registration`, method: "get", signal }, options);
|
|
27
23
|
};
|
|
28
24
|
var getGetAccountServerRegistrationQueryKey = () => [
|
|
29
25
|
`/account-server/registration`
|
|
@@ -33,12 +29,11 @@ var useGetAccountServerRegistration = (options) => {
|
|
|
33
29
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerRegistrationQueryKey()));
|
|
34
30
|
const queryFn = ({ signal }) => getAccountServerRegistration(requestOptions, signal);
|
|
35
31
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, query);
|
|
32
|
+
query.queryKey = queryKey;
|
|
33
|
+
return query;
|
|
39
34
|
};
|
|
40
35
|
var getVersion = (options, signal) => {
|
|
41
|
-
return
|
|
36
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/version`, method: "get", signal }, options);
|
|
42
37
|
};
|
|
43
38
|
var getGetVersionQueryKey = () => [`/version`];
|
|
44
39
|
var useGetVersion = (options) => {
|
|
@@ -48,9 +43,8 @@ var useGetVersion = (options) => {
|
|
|
48
43
|
signal
|
|
49
44
|
}) => getVersion(requestOptions, signal);
|
|
50
45
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, query);
|
|
46
|
+
query.queryKey = queryKey;
|
|
47
|
+
return query;
|
|
54
48
|
};
|
|
55
49
|
|
|
56
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":";;;;;AAUA;AAiCO,IAAM,4BAA4B,CACvC,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,OAAO,OAAO,GAC1D,OACF;AACF;AAEO,IAAM,uCAAuC,MAAM;AAAA,EACxD;AACF;AAOO,IAAM,+BAA+B,CAG1C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,qCAAqC;AAEjE,QAAM,UAEF,CAAC,EAAE,aAAa,0BAA0B,gBAAgB,MAAM;AAEpE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,+BAA+B,CAC1C,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,gCAAgC,QAAQ,OAAO,OAAO,GAC7D,OACF;AACF;AAEO,IAAM,0CAA0C,MAAM;AAAA,EAC3D;AACF;AAOO,IAAM,kCAAkC,CAG7C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,wCAAwC;AAEpE,QAAM,UAEF,CAAC,EAAE,aAAa,6BAA6B,gBAAgB,MAAM;AAEvE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AAKO,IAAM,aAAa,CACxB,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,OAAO,OAAO,GACzC,OACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,QACI,WAAW,gBAAgB,MAAM;AAEvC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.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: 0.7\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n AccountServerGetRegistrationResponse,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\ntype AwaitedInput<T> = PromiseLike<T> | T;\n\ntype Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\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 * If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned\n\n * @summary Gets the Account Server cluster namespace\n */\nexport const getAccountServerNamespace = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerNamespaceQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n > = ({ signal }) => getAccountServerNamespace(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns our Account Server Registration information\n\n * @summary Gets the Data Manager Account Server Registration\n */\nexport const getAccountServerRegistration = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetRegistrationResponse>(\n { url: `/account-server/registration`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerRegistrationQueryKey = () => [\n `/account-server/registration`,\n];\n\nexport type GetAccountServerRegistrationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerRegistration>>\n>;\nexport type GetAccountServerRegistrationQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerRegistration = <\n TData = Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerRegistrationQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerRegistration>>\n > = ({ signal }) => getAccountServerRegistration(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * @summary Gets the Data Manager version that's running behind the API\n */\nexport const getVersion = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersion>>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({\n signal,\n }) => getVersion(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
|
|
2
|
-
import { bj as customInstance, bd as AccountServerGetNamespaceResponse, bk as ErrorType, bf as DmError, be as AccountServerGetRegistrationResponse, aD as VersionGetResponse } from '../custom-instance-
|
|
2
|
+
import { bj as customInstance, bd as AccountServerGetNamespaceResponse, bk as ErrorType, bf as DmError, be as AccountServerGetRegistrationResponse, aD as VersionGetResponse } from '../custom-instance-4dd0f9fc.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Generated by orval v6.8.0 🍺
|
|
7
|
-
* Do not edit manually.
|
|
8
|
-
* Dataset Manager API
|
|
9
|
-
* The Dataset Manager API service.
|
|
10
|
-
|
|
11
|
-
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
|
|
12
|
-
|
|
13
|
-
* OpenAPI spec version: 0.7
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
5
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
17
6
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
18
7
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -60,4 +49,4 @@ declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<voi
|
|
|
60
49
|
queryKey: QueryKey;
|
|
61
50
|
};
|
|
62
51
|
|
|
63
|
-
export {
|
|
52
|
+
export { GetAccountServerNamespaceQueryError, GetAccountServerNamespaceQueryResult, GetAccountServerRegistrationQueryError, GetAccountServerRegistrationQueryResult, GetVersionQueryError, GetVersionQueryResult, getAccountServerNamespace, getAccountServerRegistration, getGetAccountServerNamespaceQueryKey, getGetAccountServerRegistrationQueryKey, getGetVersionQueryKey, getVersion, useGetAccountServerNamespace, useGetAccountServerRegistration, useGetVersion };
|
package/accounting/accounting.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__spreadValues,
|
|
3
2
|
customInstance
|
|
4
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-3TENYKS7.js";
|
|
5
4
|
|
|
6
5
|
// src/accounting/accounting.ts
|
|
7
|
-
import {
|
|
8
|
-
useQuery
|
|
9
|
-
} from "react-query";
|
|
6
|
+
import { useQuery } from "react-query";
|
|
10
7
|
var getAccountServerNamespace = (options, signal) => {
|
|
11
8
|
return customInstance({ url: `/account-server/namespace`, method: "get", signal }, options);
|
|
12
9
|
};
|
|
@@ -18,9 +15,8 @@ var useGetAccountServerNamespace = (options) => {
|
|
|
18
15
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAccountServerNamespaceQueryKey();
|
|
19
16
|
const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
|
|
20
17
|
const query = useQuery(queryKey, queryFn, queryOptions);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, query);
|
|
18
|
+
query.queryKey = queryKey;
|
|
19
|
+
return query;
|
|
24
20
|
};
|
|
25
21
|
var getAccountServerRegistration = (options, signal) => {
|
|
26
22
|
return customInstance({ url: `/account-server/registration`, method: "get", signal }, options);
|
|
@@ -33,9 +29,8 @@ var useGetAccountServerRegistration = (options) => {
|
|
|
33
29
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAccountServerRegistrationQueryKey();
|
|
34
30
|
const queryFn = ({ signal }) => getAccountServerRegistration(requestOptions, signal);
|
|
35
31
|
const query = useQuery(queryKey, queryFn, queryOptions);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, query);
|
|
32
|
+
query.queryKey = queryKey;
|
|
33
|
+
return query;
|
|
39
34
|
};
|
|
40
35
|
var getVersion = (options, signal) => {
|
|
41
36
|
return customInstance({ url: `/version`, method: "get", signal }, options);
|
|
@@ -48,9 +43,8 @@ var useGetVersion = (options) => {
|
|
|
48
43
|
signal
|
|
49
44
|
}) => getVersion(requestOptions, signal);
|
|
50
45
|
const query = useQuery(queryKey, queryFn, queryOptions);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, query);
|
|
46
|
+
query.queryKey = queryKey;
|
|
47
|
+
return query;
|
|
54
48
|
};
|
|
55
49
|
export {
|
|
56
50
|
getAccountServerNamespace,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/accounting/accounting.ts"],"sourcesContent":["/**\n * Generated by orval v6.
|
|
1
|
+
{"version":3,"sources":["../../src/accounting/accounting.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.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: 0.7\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n AccountServerGetRegistrationResponse,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\ntype AwaitedInput<T> = PromiseLike<T> | T;\n\ntype Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\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 * If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned\n\n * @summary Gets the Account Server cluster namespace\n */\nexport const getAccountServerNamespace = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerNamespaceQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n > = ({ signal }) => getAccountServerNamespace(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns our Account Server Registration information\n\n * @summary Gets the Data Manager Account Server Registration\n */\nexport const getAccountServerRegistration = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetRegistrationResponse>(\n { url: `/account-server/registration`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerRegistrationQueryKey = () => [\n `/account-server/registration`,\n];\n\nexport type GetAccountServerRegistrationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerRegistration>>\n>;\nexport type GetAccountServerRegistrationQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerRegistration = <\n TData = Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerRegistrationQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerRegistration>>\n > = ({ signal }) => getAccountServerRegistration(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * @summary Gets the Data Manager version that's running behind the API\n */\nexport const getVersion = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersion>>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({\n signal,\n }) => getVersion(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA;AAiCO,IAAM,4BAA4B,CACvC,SACA,WACG;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AAO;AACT;","names":[]}
|
package/admin/admin.cjs
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
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
|
-
|
|
4
|
-
var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
|
|
3
|
+
var _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
|
|
5
4
|
|
|
6
5
|
// src/admin/admin.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
6
|
var _reactquery = require('react-query');
|
|
11
7
|
var adminGetServiceErrors = (params, options, signal) => {
|
|
12
|
-
return
|
|
8
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/admin/service-error`, method: "get", params, signal }, options);
|
|
13
9
|
};
|
|
14
10
|
var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
|
|
15
11
|
var useAdminGetServiceErrors = (params, options) => {
|
|
@@ -17,12 +13,11 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
17
13
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetServiceErrorsQueryKey(params)));
|
|
18
14
|
const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
|
|
19
15
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, query);
|
|
16
|
+
query.queryKey = queryKey;
|
|
17
|
+
return query;
|
|
23
18
|
};
|
|
24
19
|
var adminPatchServiceError = (errorId, options) => {
|
|
25
|
-
return
|
|
20
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "patch" }, options);
|
|
26
21
|
};
|
|
27
22
|
var useAdminPatchServiceError = (options) => {
|
|
28
23
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
@@ -33,7 +28,7 @@ var useAdminPatchServiceError = (options) => {
|
|
|
33
28
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
34
29
|
};
|
|
35
30
|
var adminDeleteServiceError = (errorId, options) => {
|
|
36
|
-
return
|
|
31
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "delete" }, options);
|
|
37
32
|
};
|
|
38
33
|
var useAdminDeleteServiceError = (options) => {
|
|
39
34
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
@@ -44,7 +39,7 @@ var useAdminDeleteServiceError = (options) => {
|
|
|
44
39
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
45
40
|
};
|
|
46
41
|
var adminPutUser = (userId, options) => {
|
|
47
|
-
return
|
|
42
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "put" }, options);
|
|
48
43
|
};
|
|
49
44
|
var useAdminPutUser = (options) => {
|
|
50
45
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
@@ -55,7 +50,7 @@ var useAdminPutUser = (options) => {
|
|
|
55
50
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
56
51
|
};
|
|
57
52
|
var adminDeleteUser = (userId, options) => {
|
|
58
|
-
return
|
|
53
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "delete" }, options);
|
|
59
54
|
};
|
|
60
55
|
var useAdminDeleteUser = (options) => {
|
|
61
56
|
const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
@@ -70,7 +65,7 @@ var adminPatchUser = (userId, userPatchBodyBody, options) => {
|
|
|
70
65
|
if (userPatchBodyBody.suspend_message !== void 0) {
|
|
71
66
|
formData.append("suspend_message", userPatchBodyBody.suspend_message);
|
|
72
67
|
}
|
|
73
|
-
return
|
|
68
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
|
|
74
69
|
url: `/admin/user/${userId}`,
|
|
75
70
|
method: "patch",
|
|
76
71
|
headers: { "Content-Type": "multipart/form-data" },
|
|
@@ -94,7 +89,7 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|
|
|
94
89
|
if (jobManifestPutBodyBody.params !== void 0) {
|
|
95
90
|
formData.append("params", jobManifestPutBodyBody.params);
|
|
96
91
|
}
|
|
97
|
-
return
|
|
92
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
|
|
98
93
|
url: `/admin/job-manifest`,
|
|
99
94
|
method: "put",
|
|
100
95
|
headers: { "Content-Type": "multipart/form-data" },
|
|
@@ -112,7 +107,7 @@ var useAdminJobManifestPut = (options) => {
|
|
|
112
107
|
var adminJobManifestLoad = (jobManifestLoadPutBodyBody, options) => {
|
|
113
108
|
const formData = new FormData();
|
|
114
109
|
formData.append("purge", jobManifestLoadPutBodyBody.purge.toString());
|
|
115
|
-
return
|
|
110
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
|
|
116
111
|
url: `/admin/job-manifest/load`,
|
|
117
112
|
method: "put",
|
|
118
113
|
headers: { "Content-Type": "multipart/form-data" },
|
package/admin/admin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAyCO,IAAM,wBAAwB,CACnC,QACA,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,QAAQ,OAAO,GAC7D,OACF;AACF;AAEO,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAOlD,IAAM,2BAA2B,CAItC,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAA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O,eACL;AAAA,IACE,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,IACjD,MAAM;AAAA,EACR,GACA,OACF;AACF;AAQO,IAAM,yBAAyB,CAGpC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS,CAAC;AAE3B,WAAO,oBAAoB,MAAM,cAAc;AAAA,EACjD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAQO,IAAM,uBAAuB,CAClC,4BACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,SAAS,2BAA2B,MAAM,SAAS,CAAC;AAEpE,SAAO,eACL;AAAA,IACE,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,IACjD,MAAM;AAAA,EACR,GACA,OACF;AACF;AAQO,IAAM,0BAA0B,CAGrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS,CAAC;AAE3B,WAAO,qBAAqB,MAAM,cAAc;AAAA,EAClD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.8.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: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\nexport type AwaitedInput<T> = PromiseLike<T> | T;\n\nexport type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Gets Service Errors\n */\nexport const adminGetServiceErrors = (\n params?: AdminGetServiceErrorsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", signal, params },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Used primarily to 'Acknowledge' but not delete a Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patches a Service Error\n */\nexport const adminPatchServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"patch\" },\n options\n );\n};\n\nexport type AdminPatchServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchServiceError>>\n>;\n\nexport type AdminPatchServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an existing Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a Service Error\n */\nexport const adminDeleteServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteServiceError>>\n>;\n\nexport type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Prepares a user account in the Data Manager service\n */\nexport const adminPutUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminUserPutResponse>(\n { url: `/admin/user/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AdminPutUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPutUser>>\n>;\n\nexport type AdminPutUserMutationError = ErrorType<void | DmError>;\n\nexport const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPutUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes a user account, along with all the user's Datasets\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a user account\n */\nexport const adminDeleteUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/user/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteUser>>\n>;\n\nexport type AdminDeleteUserMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Patches a user record, typcially to suspend or re-enable a user account\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patch a given user\n */\nexport const adminPatchUser = (\n userId: string,\n userPatchBodyBody: UserPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userPatchBodyBody.suspend_message !== undefined) {\n formData.append(\"suspend_message\", userPatchBodyBody.suspend_message);\n }\n\n return customInstance<void>(\n {\n url: `/admin/user/${userId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminPatchUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchUser>>\n>;\nexport type AdminPatchUserMutationBody = UserPatchBodyBody;\nexport type AdminPatchUserMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchUser>>,\n { userId: string; data: UserPatchBodyBody }\n > = (props) => {\n const { userId, data } = props ?? {};\n\n return adminPatchUser(userId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to add (or update an existing manifest). Manifests are the soirce of Job defintions. Once added the manifest is inspected and any Jobs it refers to are loaded.\n\nA limited number of manifest origins (URLs) are supported. At the moment we support basic GitHib and GitLab URLs, i.e. those that begin `https://raw.githubusercontent.com/` and `https://gitlab.com/api/v4/projects/`.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Adds a manifest and triggers the download of Job Definitions\n */\nexport const adminJobManifestPut = (\n jobManifestPutBodyBody: JobManifestPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"url\", jobManifestPutBodyBody.url);\n if (jobManifestPutBodyBody.header !== undefined) {\n formData.append(\"header\", jobManifestPutBodyBody.header);\n }\n if (jobManifestPutBodyBody.params !== undefined) {\n formData.append(\"params\", jobManifestPutBodyBody.params);\n }\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestPutMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestPut>>\n>;\nexport type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;\nexport type AdminJobManifestPutMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to trigger the Data Manager to re-inspect the internal Job **Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job defitnions are known to have changed in the referenced repositories.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Trigger a download of known Job Definitions using the Manifest table\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest/load`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestLoadMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestLoad>>\n>;\nexport type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;\nexport type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n { data: JobManifestLoadPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestLoad(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":";;;;;AAUA;AAyCO,IAAM,wBAAwB,CACnC,QACA,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,QAAQ,OAAO,GAC7D,OACF;AACF;AAEO,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAOlD,IAAM,2BAA2B,CAItC,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,iCAAiC,MAAM;AAEnE,QAAM,UAEF,CAAC,EAAE,aAAa,sBAAsB,QAAQ,gBAAgB,MAAM;AAExE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AASO,IAAM,yBAAyB,CACpC,SACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,WAAW,QAAQ,QAAQ,GAC1D,OACF;AACF;AAQO,IAAM,4BAA4B,CAGvC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,YAAY,SAAS,CAAC;AAE9B,WAAO,uBAAuB,SAAS,cAAc;AAAA,EACvD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAQO,IAAM,0BAA0B,CACrC,SACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,w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AGrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS,CAAC;AAE3B,WAAO,qBAAqB,MAAM,cAAc;AAAA,EAClD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.9.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: 0.7\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\ntype AwaitedInput<T> = PromiseLike<T> | T;\n\ntype Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\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 * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Gets Service Errors\n */\nexport const adminGetServiceErrors = (\n params?: AdminGetServiceErrorsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Used primarily to 'Acknowledge' but not delete a Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patches a Service Error\n */\nexport const adminPatchServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"patch\" },\n options\n );\n};\n\nexport type AdminPatchServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchServiceError>>\n>;\n\nexport type AdminPatchServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an existing Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a Service Error\n */\nexport const adminDeleteServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteServiceError>>\n>;\n\nexport type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Prepares a user account in the Data Manager service\n */\nexport const adminPutUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminUserPutResponse>(\n { url: `/admin/user/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AdminPutUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPutUser>>\n>;\n\nexport type AdminPutUserMutationError = ErrorType<void | DmError>;\n\nexport const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPutUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes a user account, along with all the user's Datasets\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a user account\n */\nexport const adminDeleteUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/user/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteUser>>\n>;\n\nexport type AdminDeleteUserMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Patches a user record, typcially to suspend or re-enable a user account\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patch a given user\n */\nexport const adminPatchUser = (\n userId: string,\n userPatchBodyBody: UserPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userPatchBodyBody.suspend_message !== undefined) {\n formData.append(\"suspend_message\", userPatchBodyBody.suspend_message);\n }\n\n return customInstance<void>(\n {\n url: `/admin/user/${userId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminPatchUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchUser>>\n>;\nexport type AdminPatchUserMutationBody = UserPatchBodyBody;\nexport type AdminPatchUserMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchUser>>,\n { userId: string; data: UserPatchBodyBody }\n > = (props) => {\n const { userId, data } = props ?? {};\n\n return adminPatchUser(userId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to add (or update an existing manifest). Manifests are the soirce of Job defintions. Once added the manifest is inspected and any Jobs it refers to are loaded.\n\nA limited number of manifest origins (URLs) are supported. At the moment we support basic GitHib and GitLab URLs, i.e. those that begin `https://raw.githubusercontent.com/` and `https://gitlab.com/api/v4/projects/`.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Adds a manifest and triggers the download of Job Definitions\n */\nexport const adminJobManifestPut = (\n jobManifestPutBodyBody: JobManifestPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"url\", jobManifestPutBodyBody.url);\n if (jobManifestPutBodyBody.header !== undefined) {\n formData.append(\"header\", jobManifestPutBodyBody.header);\n }\n if (jobManifestPutBodyBody.params !== undefined) {\n formData.append(\"params\", jobManifestPutBodyBody.params);\n }\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestPutMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestPut>>\n>;\nexport type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;\nexport type AdminJobManifestPutMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to trigger the Data Manager to re-inspect the internal Job **Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job defitnions are known to have changed in the referenced repositories.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Trigger a download of known Job Definitions using the Manifest table\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest/load`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestLoadMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestLoad>>\n>;\nexport type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;\nexport type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n { data: JobManifestLoadPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestLoad(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
|
package/admin/admin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AdminGetServiceErrorsParams, bj as customInstance, aL as ServiceErrorsGetResponse, bk as ErrorType, bf as DmError, a1 as UserAccountDetail, U as UserPatchBodyBody, S as JobManifestPutBodyBody, bc as AdminJobManifestLoadPutResponse, T as JobManifestLoadPutBodyBody } from '../custom-instance-
|
|
1
|
+
import { A as AdminGetServiceErrorsParams, bj as customInstance, aL as ServiceErrorsGetResponse, bk as ErrorType, bf as DmError, a1 as UserAccountDetail, U as UserPatchBodyBody, S as JobManifestPutBodyBody, bc as AdminJobManifestLoadPutResponse, T as JobManifestLoadPutBodyBody } from '../custom-instance-4dd0f9fc.js';
|
|
2
2
|
import * as react_query from 'react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
|
|
4
4
|
import 'axios';
|
|
@@ -157,4 +157,4 @@ declare const useAdminJobManifestLoad: <TError = ErrorType<void | DmError>, TCon
|
|
|
157
157
|
data: JobManifestLoadPutBodyBody;
|
|
158
158
|
}, TContext>;
|
|
159
159
|
|
|
160
|
-
export { AdminDeleteServiceErrorMutationError, AdminDeleteServiceErrorMutationResult, AdminDeleteUserMutationError, AdminDeleteUserMutationResult, AdminGetServiceErrorsQueryError, AdminGetServiceErrorsQueryResult, AdminJobManifestLoadMutationBody, AdminJobManifestLoadMutationError, AdminJobManifestLoadMutationResult, AdminJobManifestPutMutationBody, AdminJobManifestPutMutationError, AdminJobManifestPutMutationResult, AdminPatchServiceErrorMutationError, AdminPatchServiceErrorMutationResult, AdminPatchUserMutationBody, AdminPatchUserMutationError, AdminPatchUserMutationResult, AdminPutUserMutationError, AdminPutUserMutationResult,
|
|
160
|
+
export { AdminDeleteServiceErrorMutationError, AdminDeleteServiceErrorMutationResult, AdminDeleteUserMutationError, AdminDeleteUserMutationResult, AdminGetServiceErrorsQueryError, AdminGetServiceErrorsQueryResult, AdminJobManifestLoadMutationBody, AdminJobManifestLoadMutationError, AdminJobManifestLoadMutationResult, AdminJobManifestPutMutationBody, AdminJobManifestPutMutationError, AdminJobManifestPutMutationResult, AdminPatchServiceErrorMutationError, AdminPatchServiceErrorMutationResult, AdminPatchUserMutationBody, AdminPatchUserMutationError, AdminPatchUserMutationResult, AdminPutUserMutationError, AdminPutUserMutationResult, adminDeleteServiceError, adminDeleteUser, adminGetServiceErrors, adminJobManifestLoad, adminJobManifestPut, adminPatchServiceError, adminPatchUser, adminPutUser, getAdminGetServiceErrorsQueryKey, useAdminDeleteServiceError, useAdminDeleteUser, useAdminGetServiceErrors, useAdminJobManifestLoad, useAdminJobManifestPut, useAdminPatchServiceError, useAdminPatchUser, useAdminPutUser };
|
package/admin/admin.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__spreadValues,
|
|
3
2
|
customInstance
|
|
4
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-3TENYKS7.js";
|
|
5
4
|
|
|
6
5
|
// src/admin/admin.ts
|
|
7
|
-
import {
|
|
8
|
-
useQuery,
|
|
9
|
-
useMutation
|
|
10
|
-
} from "react-query";
|
|
6
|
+
import { useQuery, useMutation } from "react-query";
|
|
11
7
|
var adminGetServiceErrors = (params, options, signal) => {
|
|
12
|
-
return customInstance({ url: `/admin/service-error`, method: "get",
|
|
8
|
+
return customInstance({ url: `/admin/service-error`, method: "get", params, signal }, options);
|
|
13
9
|
};
|
|
14
10
|
var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
|
|
15
11
|
var useAdminGetServiceErrors = (params, options) => {
|
|
@@ -17,9 +13,8 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
17
13
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getAdminGetServiceErrorsQueryKey(params);
|
|
18
14
|
const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
|
|
19
15
|
const query = useQuery(queryKey, queryFn, queryOptions);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, query);
|
|
16
|
+
query.queryKey = queryKey;
|
|
17
|
+
return query;
|
|
23
18
|
};
|
|
24
19
|
var adminPatchServiceError = (errorId, options) => {
|
|
25
20
|
return customInstance({ url: `/admin/service-error/${errorId}`, method: "patch" }, options);
|
package/admin/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/admin.ts"],"sourcesContent":["/**\n * Generated by orval v6.8.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: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\nexport type AwaitedInput<T> = PromiseLike<T> | T;\n\nexport type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Gets Service Errors\n */\nexport const adminGetServiceErrors = (\n params?: AdminGetServiceErrorsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", signal, params },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Used primarily to 'Acknowledge' but not delete a Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patches a Service Error\n */\nexport const adminPatchServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"patch\" },\n options\n );\n};\n\nexport type AdminPatchServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchServiceError>>\n>;\n\nexport type AdminPatchServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an existing Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a Service Error\n */\nexport const adminDeleteServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteServiceError>>\n>;\n\nexport type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Prepares a user account in the Data Manager service\n */\nexport const adminPutUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminUserPutResponse>(\n { url: `/admin/user/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AdminPutUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPutUser>>\n>;\n\nexport type AdminPutUserMutationError = ErrorType<void | DmError>;\n\nexport const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPutUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes a user account, along with all the user's Datasets\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a user account\n */\nexport const adminDeleteUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/user/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteUser>>\n>;\n\nexport type AdminDeleteUserMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Patches a user record, typcially to suspend or re-enable a user account\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patch a given user\n */\nexport const adminPatchUser = (\n userId: string,\n userPatchBodyBody: UserPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userPatchBodyBody.suspend_message !== undefined) {\n formData.append(\"suspend_message\", userPatchBodyBody.suspend_message);\n }\n\n return customInstance<void>(\n {\n url: `/admin/user/${userId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminPatchUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchUser>>\n>;\nexport type AdminPatchUserMutationBody = UserPatchBodyBody;\nexport type AdminPatchUserMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchUser>>,\n { userId: string; data: UserPatchBodyBody }\n > = (props) => {\n const { userId, data } = props ?? {};\n\n return adminPatchUser(userId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to add (or update an existing manifest). Manifests are the soirce of Job defintions. Once added the manifest is inspected and any Jobs it refers to are loaded.\n\nA limited number of manifest origins (URLs) are supported. At the moment we support basic GitHib and GitLab URLs, i.e. those that begin `https://raw.githubusercontent.com/` and `https://gitlab.com/api/v4/projects/`.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Adds a manifest and triggers the download of Job Definitions\n */\nexport const adminJobManifestPut = (\n jobManifestPutBodyBody: JobManifestPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"url\", jobManifestPutBodyBody.url);\n if (jobManifestPutBodyBody.header !== undefined) {\n formData.append(\"header\", jobManifestPutBodyBody.header);\n }\n if (jobManifestPutBodyBody.params !== undefined) {\n formData.append(\"params\", jobManifestPutBodyBody.params);\n }\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestPutMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestPut>>\n>;\nexport type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;\nexport type AdminJobManifestPutMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to trigger the Data Manager to re-inspect the internal Job **Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job defitnions are known to have changed in the referenced repositories.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Trigger a download of known Job Definitions using the Manifest table\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest/load`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestLoadMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestLoad>>\n>;\nexport type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;\nexport type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n { data: JobManifestLoadPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestLoad(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAyCO,IAAM,wBAAwB,CACnC,QACA,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,QAAQ,OAAO,GAC7D,OACF;AACF;AAEO,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAOlD,IAAM,2BAA2B,CAItC,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,iCAAiC,MAAM;AAEnE,QAAM,UAEF,CAAC,EAAE,aAAa,sBAAsB,QAAQ,gBAAgB,MAAM;AAExE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAEjC,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AASO,IAAM,yBAAyB,CACpC,SACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,WAAW,QAAQ,QAAQ,GAC1D,OACF;AACF;AAQO,IAAM,4BAA4B,CAG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AAC/B;AAQO,IAAM,uBAAuB,CAClC,4BACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,SAAS,2BAA2B,MAAM,SAAS,CAAC;AAEpE,SAAO,eACL;AAAA,IACE,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,IACjD,MAAM;AAAA,EACR,GACA,OACF;AACF;AAQO,IAAM,0BAA0B,CAGrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS,CAAC;AAE3B,WAAO,qBAAqB,MAAM,cAAc;AAAA,EAClD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/admin/admin.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.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: 0.7\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\ntype AwaitedInput<T> = PromiseLike<T> | T;\n\ntype Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\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 * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Gets Service Errors\n */\nexport const adminGetServiceErrors = (\n params?: AdminGetServiceErrorsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Used primarily to 'Acknowledge' but not delete a Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patches a Service Error\n */\nexport const adminPatchServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"patch\" },\n options\n );\n};\n\nexport type AdminPatchServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchServiceError>>\n>;\n\nexport type AdminPatchServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an existing Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a Service Error\n */\nexport const adminDeleteServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteServiceError>>\n>;\n\nexport type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Prepares a user account in the Data Manager service\n */\nexport const adminPutUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminUserPutResponse>(\n { url: `/admin/user/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AdminPutUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPutUser>>\n>;\n\nexport type AdminPutUserMutationError = ErrorType<void | DmError>;\n\nexport const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPutUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes a user account, along with all the user's Datasets\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a user account\n */\nexport const adminDeleteUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/user/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteUser>>\n>;\n\nexport type AdminDeleteUserMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Patches a user record, typcially to suspend or re-enable a user account\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patch a given user\n */\nexport const adminPatchUser = (\n userId: string,\n userPatchBodyBody: UserPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userPatchBodyBody.suspend_message !== undefined) {\n formData.append(\"suspend_message\", userPatchBodyBody.suspend_message);\n }\n\n return customInstance<void>(\n {\n url: `/admin/user/${userId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminPatchUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchUser>>\n>;\nexport type AdminPatchUserMutationBody = UserPatchBodyBody;\nexport type AdminPatchUserMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchUser>>,\n { userId: string; data: UserPatchBodyBody }\n > = (props) => {\n const { userId, data } = props ?? {};\n\n return adminPatchUser(userId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to add (or update an existing manifest). Manifests are the soirce of Job defintions. Once added the manifest is inspected and any Jobs it refers to are loaded.\n\nA limited number of manifest origins (URLs) are supported. At the moment we support basic GitHib and GitLab URLs, i.e. those that begin `https://raw.githubusercontent.com/` and `https://gitlab.com/api/v4/projects/`.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Adds a manifest and triggers the download of Job Definitions\n */\nexport const adminJobManifestPut = (\n jobManifestPutBodyBody: JobManifestPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"url\", jobManifestPutBodyBody.url);\n if (jobManifestPutBodyBody.header !== undefined) {\n formData.append(\"header\", jobManifestPutBodyBody.header);\n }\n if (jobManifestPutBodyBody.params !== undefined) {\n formData.append(\"params\", jobManifestPutBodyBody.params);\n }\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestPutMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestPut>>\n>;\nexport type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;\nexport type AdminJobManifestPutMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to trigger the Data Manager to re-inspect the internal Job **Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job defitnions are known to have changed in the referenced repositories.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Trigger a download of known Job Definitions using the Manifest table\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest/load`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestLoadMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestLoad>>\n>;\nexport type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;\nexport type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n { data: JobManifestLoadPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestLoad(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n { data: JobManifestLoadPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],"mappings":";;;;;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ishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
|
|
5
5
|
|
|
6
6
|
// src/application/application.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
var _reactquery = require('react-query');
|
|
10
8
|
var getApplications = (options, signal) => {
|
|
11
|
-
return
|
|
9
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/application`, method: "get", signal }, options);
|
|
12
10
|
};
|
|
13
11
|
var getGetApplicationsQueryKey = () => [`/application`];
|
|
14
12
|
var useGetApplications = (options) => {
|
|
@@ -18,12 +16,11 @@ var useGetApplications = (options) => {
|
|
|
18
16
|
signal
|
|
19
17
|
}) => getApplications(requestOptions, signal);
|
|
20
18
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, query);
|
|
19
|
+
query.queryKey = queryKey;
|
|
20
|
+
return query;
|
|
24
21
|
};
|
|
25
22
|
var getApplication = (applicationId, options, signal) => {
|
|
26
|
-
return
|
|
23
|
+
return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/application/${applicationId}`, method: "get", signal }, options);
|
|
27
24
|
};
|
|
28
25
|
var getGetApplicationQueryKey = (applicationId) => [
|
|
29
26
|
`/application/${applicationId}`
|
|
@@ -34,10 +31,11 @@ var useGetApplication = (applicationId, options) => {
|
|
|
34
31
|
const queryFn = ({
|
|
35
32
|
signal
|
|
36
33
|
}) => getApplication(applicationId, requestOptions, signal);
|
|
37
|
-
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkRHHRF25Rcjs.__spreadValues.call(void 0, {
|
|
35
|
+
enabled: !!applicationId
|
|
36
|
+
}, queryOptions));
|
|
37
|
+
query.queryKey = queryKey;
|
|
38
|
+
return query;
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
|