@squonk/data-manager-client 1.1.0 → 1.1.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 +16 -12
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +8 -8
- package/accounting/accounting.js +13 -9
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +19 -14
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +23 -23
- package/admin/admin.js +10 -5
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +12 -10
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +6 -6
- package/application/application.js +10 -8
- package/application/application.js.map +1 -1
- package/{chunk-3O5KIRV4.js → chunk-3RNIDX7T.js} +1 -1
- package/{chunk-3O5KIRV4.js.map → chunk-3RNIDX7T.js.map} +1 -1
- package/chunk-LNYWU37B.cjs +13 -0
- package/chunk-LNYWU37B.cjs.map +1 -0
- package/chunk-LT4O36DN.js +13 -0
- package/chunk-LT4O36DN.js.map +1 -0
- package/{chunk-IUEU2LYC.cjs → chunk-UZTHSGDT.cjs} +1 -1
- package/chunk-UZTHSGDT.cjs.map +1 -0
- package/{custom-instance-5c7b6971.d.ts → custom-instance-b5dd9223.d.ts} +259 -98
- package/dataset/dataset.cjs +29 -32
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +24 -24
- package/dataset/dataset.js +19 -22
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +22 -18
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.ts +16 -16
- package/exchange-rate/exchange-rate.js +16 -12
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs +15 -15
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +13 -13
- package/file/file.js +10 -10
- 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 +17 -15
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +18 -18
- package/instance/instance.js +10 -8
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +16 -14
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +8 -8
- package/job/job.js +13 -11
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +14 -15
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +12 -12
- package/metadata/metadata.js +10 -11
- package/metadata/metadata.js.map +1 -1
- package/package.json +12 -12
- package/project/project.cjs +28 -29
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +29 -29
- package/project/project.js +16 -17
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +14 -13
- package/src/admin/admin.ts +10 -9
- package/src/application/application.ts +10 -10
- package/src/data-manager-api.schemas.ts +206 -27
- package/src/dataset/dataset.ts +22 -24
- package/src/exchange-rate/exchange-rate.ts +18 -19
- package/src/file/file.ts +10 -10
- package/src/instance/instance.ts +10 -10
- package/src/job/job.ts +14 -13
- package/src/metadata/metadata.ts +10 -11
- package/src/project/project.ts +18 -19
- package/src/queryMutator.ts +12 -0
- package/src/task/task.ts +10 -9
- package/src/type/type.ts +6 -5
- package/src/user/user.ts +14 -13
- package/task/task.cjs +13 -12
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +8 -8
- package/task/task.js +10 -9
- package/task/task.js.map +1 -1
- package/type/type.cjs +8 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +4 -4
- package/type/type.js +7 -3
- package/type/type.js.map +1 -1
- package/user/user.cjs +17 -13
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +11 -11
- package/user/user.js +13 -9
- package/user/user.js.map +1 -1
- package/chunk-IUEU2LYC.cjs.map +0 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLNYWU37Bcjs = require('../chunk-LNYWU37B.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
|
|
4
7
|
|
|
5
8
|
// src/accounting/accounting.ts
|
|
6
9
|
var _reactquery = require('@tanstack/react-query');
|
|
7
10
|
var getAccountServerNamespace = (options, signal) => {
|
|
8
|
-
return
|
|
11
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
9
12
|
{ url: `/account-server/namespace`, method: "get", signal },
|
|
10
13
|
options
|
|
11
14
|
);
|
|
@@ -17,12 +20,13 @@ var useGetAccountServerNamespace = (options) => {
|
|
|
17
20
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
18
21
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerNamespaceQueryKey()));
|
|
19
22
|
const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
|
|
20
|
-
const
|
|
21
|
-
query
|
|
23
|
+
const customOptions = _chunkLNYWU37Bcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
24
|
+
const query = _reactquery.useQuery.call(void 0, customOptions);
|
|
25
|
+
query.queryKey = customOptions.queryKey;
|
|
22
26
|
return query;
|
|
23
27
|
};
|
|
24
28
|
var getAccountServerRegistration = (options, signal) => {
|
|
25
|
-
return
|
|
29
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
26
30
|
{ url: `/account-server/registration`, method: "get", signal },
|
|
27
31
|
options
|
|
28
32
|
);
|
|
@@ -34,12 +38,13 @@ var useGetAccountServerRegistration = (options) => {
|
|
|
34
38
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
35
39
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerRegistrationQueryKey()));
|
|
36
40
|
const queryFn = ({ signal }) => getAccountServerRegistration(requestOptions, signal);
|
|
37
|
-
const
|
|
38
|
-
query
|
|
41
|
+
const customOptions = _chunkLNYWU37Bcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
42
|
+
const query = _reactquery.useQuery.call(void 0, customOptions);
|
|
43
|
+
query.queryKey = customOptions.queryKey;
|
|
39
44
|
return query;
|
|
40
45
|
};
|
|
41
46
|
var getVersion = (options, signal) => {
|
|
42
|
-
return
|
|
47
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
43
48
|
{ url: `/version`, method: "get", signal },
|
|
44
49
|
options
|
|
45
50
|
);
|
|
@@ -51,12 +56,11 @@ var useGetVersion = (options) => {
|
|
|
51
56
|
const queryFn = ({
|
|
52
57
|
signal
|
|
53
58
|
}) => getVersion(requestOptions, signal);
|
|
59
|
+
const customOptions = _chunkLNYWU37Bcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
54
60
|
const query = _reactquery.useQuery.call(void 0,
|
|
55
|
-
|
|
56
|
-
queryFn,
|
|
57
|
-
queryOptions
|
|
61
|
+
customOptions
|
|
58
62
|
);
|
|
59
|
-
query.queryKey = queryKey;
|
|
63
|
+
query.queryKey = customOptions.queryKey;
|
|
60
64
|
return query;
|
|
61
65
|
};
|
|
62
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":";;;;;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,4BAA4B,CACvC,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,6BAA6B,QAAQ,OAAO,OAAO;AAAA,IAC1D;AAAA,EACF;AACF;AAEO,IAAM,uCAAuC,MAAM;AAAA,EACxD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AM;AAEvC,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,QAAM,QAAQ;AAAA,IACZ;AAAA,EACF;AAEA,QAAM,WAAW,cAAc;AAE/B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.12.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n AccountServerGetRegistrationResponse,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { queryMutator } from \".././queryMutator\";\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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n customOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.queryKey;\n\n return query;\n};\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bK as customInstance, bE as AccountServerGetNamespaceResponse, bL as ErrorType, bG as DmError, bF as AccountServerGetRegistrationResponse, aX as VersionGetResponse } from '../custom-instance-b5dd9223.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
6
6
|
/**
|
|
7
7
|
* If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned
|
|
8
8
|
|
|
@@ -10,8 +10,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
|
|
|
10
10
|
*/
|
|
11
11
|
declare const getAccountServerNamespace: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<AccountServerGetNamespaceResponse>;
|
|
12
12
|
declare const getGetAccountServerNamespaceQueryKey: () => string[];
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type GetAccountServerNamespaceQueryResult = NonNullable<Awaited<ReturnType<typeof getAccountServerNamespace>>>;
|
|
14
|
+
type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;
|
|
15
15
|
declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
16
16
|
query?: UseQueryOptions<AccountServerGetNamespaceResponse, TError, TData, QueryKey> | undefined;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -25,8 +25,8 @@ declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceRe
|
|
|
25
25
|
*/
|
|
26
26
|
declare const getAccountServerRegistration: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<AccountServerGetRegistrationResponse>;
|
|
27
27
|
declare const getGetAccountServerRegistrationQueryKey: () => string[];
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
type GetAccountServerRegistrationQueryResult = NonNullable<Awaited<ReturnType<typeof getAccountServerRegistration>>>;
|
|
29
|
+
type GetAccountServerRegistrationQueryError = ErrorType<void | DmError>;
|
|
30
30
|
declare const useGetAccountServerRegistration: <TData = AccountServerGetRegistrationResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
31
31
|
query?: UseQueryOptions<AccountServerGetRegistrationResponse, TError, TData, QueryKey> | undefined;
|
|
32
32
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -38,8 +38,8 @@ declare const useGetAccountServerRegistration: <TData = AccountServerGetRegistra
|
|
|
38
38
|
*/
|
|
39
39
|
declare const getVersion: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<VersionGetResponse>;
|
|
40
40
|
declare const getGetVersionQueryKey: () => string[];
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
|
|
42
|
+
type GetVersionQueryError = ErrorType<void | DmError>;
|
|
43
43
|
declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
44
44
|
query?: UseQueryOptions<VersionGetResponse, TError, TData, QueryKey> | undefined;
|
|
45
45
|
request?: SecondParameter<typeof customInstance>;
|
package/accounting/accounting.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
queryMutator
|
|
3
|
+
} from "../chunk-LT4O36DN.js";
|
|
1
4
|
import {
|
|
2
5
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3RNIDX7T.js";
|
|
4
7
|
|
|
5
8
|
// src/accounting/accounting.ts
|
|
6
9
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -17,8 +20,9 @@ var useGetAccountServerNamespace = (options) => {
|
|
|
17
20
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
18
21
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAccountServerNamespaceQueryKey();
|
|
19
22
|
const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
|
|
20
|
-
const
|
|
21
|
-
query
|
|
23
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
24
|
+
const query = useQuery(customOptions);
|
|
25
|
+
query.queryKey = customOptions.queryKey;
|
|
22
26
|
return query;
|
|
23
27
|
};
|
|
24
28
|
var getAccountServerRegistration = (options, signal) => {
|
|
@@ -34,8 +38,9 @@ var useGetAccountServerRegistration = (options) => {
|
|
|
34
38
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
35
39
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAccountServerRegistrationQueryKey();
|
|
36
40
|
const queryFn = ({ signal }) => getAccountServerRegistration(requestOptions, signal);
|
|
37
|
-
const
|
|
38
|
-
query
|
|
41
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
42
|
+
const query = useQuery(customOptions);
|
|
43
|
+
query.queryKey = customOptions.queryKey;
|
|
39
44
|
return query;
|
|
40
45
|
};
|
|
41
46
|
var getVersion = (options, signal) => {
|
|
@@ -51,12 +56,11 @@ var useGetVersion = (options) => {
|
|
|
51
56
|
const queryFn = ({
|
|
52
57
|
signal
|
|
53
58
|
}) => getVersion(requestOptions, signal);
|
|
59
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
54
60
|
const query = useQuery(
|
|
55
|
-
|
|
56
|
-
queryFn,
|
|
57
|
-
queryOptions
|
|
61
|
+
customOptions
|
|
58
62
|
);
|
|
59
|
-
query.queryKey = queryKey;
|
|
63
|
+
query.queryKey = customOptions.queryKey;
|
|
60
64
|
return query;
|
|
61
65
|
};
|
|
62
66
|
export {
|
|
@@ -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.12.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n AccountServerGetRegistrationResponse,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { queryMutator } from \".././queryMutator\";\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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerRegistration>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n customOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.queryKey;\n\n return query;\n};\n"],"mappings":";;;;;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,4BAA4B,CACvC,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,6BAA6B,QAAQ,OAAO,OAAO;AAAA,IAC1D;AAAA,EACF;AACF;AAEO,IAAM,uCAAuC,MAAM;AAAA,EACxD;AACF;AAOO,IAAM,+BAA+B,CAG1C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,qCAAqC;AAEjE,QAAM,UAEF,CAAC,EAAE,OAAO,MAAM,0BAA0B,gBAAgB,MAAM;AAEpE,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,QAAM,QAAQ,SAIZ,aAAa;AAEf,QAAM,WAAW,cAAc;AAE/B,SAAO;AACT;AAOO,IAAM,+BAA+B,CAC1C,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gCAAgC,QAAQ,OAAO,OAAO;AAAA,IAC7D;AAAA,EACF;AACF;AAEO,IAAM,0CAA0C,MAAM;AAAA,EAC3D;AACF;AAOO,IAAM,kCAAkC,CAG7C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,wCAAwC;AAEpE,QAAM,UAEF,CAAC,EAAE,OAAO,MAAM,6BAA6B,gBAAgB,MAAM;AAEvE,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,QAAM,QAAQ,SAIZ,aAAa;AAEf,QAAM,WAAW,cAAc;AAE/B,SAAO;AACT;AAKO,IAAM,aAAa,CACxB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,YAAY,QAAQ,OAAO,OAAO;AAAA,IACzC;AAAA,EACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,EACF,MAAM,WAAW,gBAAgB,MAAM;AAEvC,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,QAAM,QAAQ;AAAA,IACZ;AAAA,EACF;AAEA,QAAM,WAAW,cAAc;AAE/B,SAAO;AACT;","names":[]}
|
package/admin/admin.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLNYWU37Bcjs = require('../chunk-LNYWU37B.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
|
|
4
7
|
|
|
5
8
|
// src/admin/admin.ts
|
|
6
9
|
var _reactquery = require('@tanstack/react-query');
|
|
7
10
|
var adminGetServiceErrors = (params, options, signal) => {
|
|
8
|
-
return
|
|
11
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
9
12
|
{ url: `/admin/service-error`, method: "get", params, signal },
|
|
10
13
|
options
|
|
11
14
|
);
|
|
@@ -15,12 +18,13 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
15
18
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
16
19
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetServiceErrorsQueryKey(params)));
|
|
17
20
|
const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
|
|
18
|
-
const
|
|
19
|
-
query
|
|
21
|
+
const customOptions = _chunkLNYWU37Bcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
22
|
+
const query = _reactquery.useQuery.call(void 0, customOptions);
|
|
23
|
+
query.queryKey = customOptions.queryKey;
|
|
20
24
|
return query;
|
|
21
25
|
};
|
|
22
26
|
var adminPatchServiceError = (errorId, options) => {
|
|
23
|
-
return
|
|
27
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
24
28
|
{ url: `/admin/service-error/${errorId}`, method: "patch" },
|
|
25
29
|
options
|
|
26
30
|
);
|
|
@@ -34,7 +38,7 @@ var useAdminPatchServiceError = (options) => {
|
|
|
34
38
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
35
39
|
};
|
|
36
40
|
var adminDeleteServiceError = (errorId, options) => {
|
|
37
|
-
return
|
|
41
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
38
42
|
{ url: `/admin/service-error/${errorId}`, method: "delete" },
|
|
39
43
|
options
|
|
40
44
|
);
|
|
@@ -48,7 +52,7 @@ var useAdminDeleteServiceError = (options) => {
|
|
|
48
52
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
49
53
|
};
|
|
50
54
|
var adminPutUser = (userId, options) => {
|
|
51
|
-
return
|
|
55
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
52
56
|
{ url: `/admin/user/${userId}`, method: "put" },
|
|
53
57
|
options
|
|
54
58
|
);
|
|
@@ -62,7 +66,7 @@ var useAdminPutUser = (options) => {
|
|
|
62
66
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
63
67
|
};
|
|
64
68
|
var adminDeleteUser = (userId, options) => {
|
|
65
|
-
return
|
|
69
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
66
70
|
{ url: `/admin/user/${userId}`, method: "delete" },
|
|
67
71
|
options
|
|
68
72
|
);
|
|
@@ -80,7 +84,7 @@ var adminPatchUser = (userId, userPatchBodyBody, options) => {
|
|
|
80
84
|
if (userPatchBodyBody.suspend_message !== void 0) {
|
|
81
85
|
formData.append("suspend_message", userPatchBodyBody.suspend_message);
|
|
82
86
|
}
|
|
83
|
-
return
|
|
87
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
84
88
|
{
|
|
85
89
|
url: `/admin/user/${userId}`,
|
|
86
90
|
method: "patch",
|
|
@@ -99,7 +103,7 @@ var useAdminPatchUser = (options) => {
|
|
|
99
103
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
100
104
|
};
|
|
101
105
|
var adminGetJobManifests = (options, signal) => {
|
|
102
|
-
return
|
|
106
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
103
107
|
{ url: `/admin/job-manifest`, method: "get", signal },
|
|
104
108
|
options
|
|
105
109
|
);
|
|
@@ -109,8 +113,9 @@ var useAdminGetJobManifests = (options) => {
|
|
|
109
113
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
110
114
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetJobManifestsQueryKey()));
|
|
111
115
|
const queryFn = ({ signal }) => adminGetJobManifests(requestOptions, signal);
|
|
112
|
-
const
|
|
113
|
-
query
|
|
116
|
+
const customOptions = _chunkLNYWU37Bcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
117
|
+
const query = _reactquery.useQuery.call(void 0, customOptions);
|
|
118
|
+
query.queryKey = customOptions.queryKey;
|
|
114
119
|
return query;
|
|
115
120
|
};
|
|
116
121
|
var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|
|
@@ -122,7 +127,7 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|
|
|
122
127
|
if (jobManifestPutBodyBody.params !== void 0) {
|
|
123
128
|
formData.append("params", jobManifestPutBodyBody.params);
|
|
124
129
|
}
|
|
125
|
-
return
|
|
130
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
126
131
|
{
|
|
127
132
|
url: `/admin/job-manifest`,
|
|
128
133
|
method: "put",
|
|
@@ -145,7 +150,7 @@ var adminJobManifestLoad = (jobManifestLoadPutBodyBody, options) => {
|
|
|
145
150
|
if (jobManifestLoadPutBodyBody.purge !== void 0) {
|
|
146
151
|
formData.append("purge", jobManifestLoadPutBodyBody.purge.toString());
|
|
147
152
|
}
|
|
148
|
-
return
|
|
153
|
+
return _chunkUZTHSGDTcjs.customInstance.call(void 0,
|
|
149
154
|
{
|
|
150
155
|
url: `/admin/job-manifest/load`,
|
|
151
156
|
method: "put",
|
package/admin/admin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAsC/B,IAAM,wBAAwB,CACnC,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,QAAQ,OAA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WAAW,IAAI,SAAS;AAC9B,MAAI,2BAA2B,UAAU,QAAW;AAClD,aAAS,OAAO,SAAS,2BAA2B,MAAM,SAAS,CAAC;AAAA,EACtE;AAEA,SAAO;AAAA,IACL;AAAA,MACE,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,MACjD,MAAM;AAAA,IACR;AAAA,IACA;AAAA,EACF;AACF;AAQO,IAAM,0BAA0B,CAGrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,KAAK,IAAI,SAAS,CAAC;AAE3B,WAAO,qBAAqB,MAAM,cAAc;AAAA,EAClD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestGetResponse,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Displays the existing Service Errors, which can also include acknowledged 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, typically 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 * Returns the list of known **Job Manifests** including the time the manifest was last loaded and its load status, a message indicating success or failure.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Get Job Manifests\n */\nexport const adminGetJobManifests = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AdminJobManifestGetResponse>(\n { url: `/admin/job-manifest`, method: \"get\", signal },\n options\n );\n};\n\nexport const getAdminGetJobManifestsQueryKey = () => [`/admin/job-manifest`];\n\nexport type AdminGetJobManifestsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetJobManifests>>\n>;\nexport type AdminGetJobManifestsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetJobManifests = <\n TData = Awaited<ReturnType<typeof adminGetJobManifests>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetJobManifests>>,\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 ?? getAdminGetJobManifestsQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetJobManifests>>\n > = ({ signal }) => adminGetJobManifests(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetJobManifests>>,\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 * This endpoint is used to add (or update an existing **Job Manifest**). Manifests are the source of Job definitions. 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 Job Manifest and triggers the download of its 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 definitions 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 Job Definitions using existing Job Manifests\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (jobManifestLoadPutBodyBody.purge !== undefined) {\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n }\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,SAAS,UAAU,mBAAmB;AAuC/B,IAAM,wBAAwB,CACnC,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,QAAQ,OAAO;AAAA,IAC7D;AAAA,EACF;AACF;AAEO,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAA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AW,IAAI,SAAS;AAC9B,MAAI,2BAA2B,UAAU,QAAW;AAClD,aAAS,OAAO,SAAS,2BAA2B,MAAM,SAAS,CAAC;AAAA,EACtE;AAEA,SAAO;AAAA,IACL;AAAA,MACE,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,MACjD,MAAM;AAAA,IACR;AAAA,IACA;AAAA,EACF;AACF;AAQO,IAAM,0BAA0B,CAGrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,KAAK,IAAI,SAAS,CAAC;AAE3B,WAAO,qBAAqB,MAAM,cAAc;AAAA,EAClD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.12.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestGetResponse,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n JobManifestLoadPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { queryMutator } from \".././queryMutator\";\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 acknowledged 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 customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.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, typically 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 * Returns the list of known **Job Manifests** including the time the manifest was last loaded and its load status, a message indicating success or failure.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Get Job Manifests\n */\nexport const adminGetJobManifests = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AdminJobManifestGetResponse>(\n { url: `/admin/job-manifest`, method: \"get\", signal },\n options\n );\n};\n\nexport const getAdminGetJobManifestsQueryKey = () => [`/admin/job-manifest`];\n\nexport type AdminGetJobManifestsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetJobManifests>>\n>;\nexport type AdminGetJobManifestsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetJobManifests = <\n TData = Awaited<ReturnType<typeof adminGetJobManifests>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetJobManifests>>,\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 ?? getAdminGetJobManifestsQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetJobManifests>>\n > = ({ signal }) => adminGetJobManifests(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetJobManifests>>,\n TError,\n TData\n >(customOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = customOptions.queryKey;\n\n return query;\n};\n\n/**\n * This endpoint is used to add (or update an existing **Job Manifest**). Manifests are the source of Job definitions. 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 Job Manifest and triggers the download of its 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 definitions 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 Job Definitions using existing Job Manifests\n */\nexport const adminJobManifestLoad = (\n jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (jobManifestLoadPutBodyBody.purge !== undefined) {\n formData.append(\"purge\", jobManifestLoadPutBodyBody.purge.toString());\n }\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,9 +1,9 @@
|
|
|
1
|
-
import { A as AdminGetServiceErrorsParams,
|
|
1
|
+
import { A as AdminGetServiceErrorsParams, bK as customInstance, b3 as ServiceErrorsGetResponse, bL as ErrorType, bG as DmError, ad as UserAccountDetail, Y as UserPatchBodyBody, bD as AdminJobManifestGetResponse, a2 as JobManifestPutBodyBody, bC as AdminJobManifestLoadPutResponse, a3 as JobManifestLoadPutBodyBody } from '../custom-instance-b5dd9223.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
7
7
|
/**
|
|
8
8
|
* Displays the existing Service Errors, which can also include acknowledged errors, normally excluded from the list.
|
|
9
9
|
|
|
@@ -13,8 +13,8 @@ You will need **admin** rights to use this endpoint
|
|
|
13
13
|
*/
|
|
14
14
|
declare const adminGetServiceErrors: (params?: AdminGetServiceErrorsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ServiceErrorsGetResponse>;
|
|
15
15
|
declare const getAdminGetServiceErrorsQueryKey: (params?: AdminGetServiceErrorsParams) => (string | AdminGetServiceErrorsParams)[];
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
type AdminGetServiceErrorsQueryResult = NonNullable<Awaited<ReturnType<typeof adminGetServiceErrors>>>;
|
|
17
|
+
type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;
|
|
18
18
|
declare const useAdminGetServiceErrors: <TData = ServiceErrorsGetResponse, TError = ErrorType<void | DmError>>(params?: AdminGetServiceErrorsParams, options?: {
|
|
19
19
|
query?: UseQueryOptions<ServiceErrorsGetResponse, TError, TData, QueryKey> | undefined;
|
|
20
20
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -29,8 +29,8 @@ You will need **admin** rights to use this endpoint
|
|
|
29
29
|
* @summary Patches a Service Error
|
|
30
30
|
*/
|
|
31
31
|
declare const adminPatchServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
type AdminPatchServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchServiceError>>>;
|
|
33
|
+
type AdminPatchServiceErrorMutationError = ErrorType<DmError>;
|
|
34
34
|
declare const useAdminPatchServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
35
35
|
mutation?: UseMutationOptions<void, TError, {
|
|
36
36
|
errorId: number;
|
|
@@ -47,8 +47,8 @@ You will need **admin** rights to use this endpoint
|
|
|
47
47
|
* @summary Deletes a Service Error
|
|
48
48
|
*/
|
|
49
49
|
declare const adminDeleteServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
type AdminDeleteServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteServiceError>>>;
|
|
51
|
+
type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;
|
|
52
52
|
declare const useAdminDeleteServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
53
53
|
mutation?: UseMutationOptions<void, TError, {
|
|
54
54
|
errorId: number;
|
|
@@ -65,8 +65,8 @@ You will need **admin** rights to use this endpoint
|
|
|
65
65
|
* @summary Prepares a user account in the Data Manager service
|
|
66
66
|
*/
|
|
67
67
|
declare const adminPutUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<UserAccountDetail>;
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
type AdminPutUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPutUser>>>;
|
|
69
|
+
type AdminPutUserMutationError = ErrorType<void | DmError>;
|
|
70
70
|
declare const useAdminPutUser: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
71
71
|
mutation?: UseMutationOptions<UserAccountDetail, TError, {
|
|
72
72
|
userId: string;
|
|
@@ -83,8 +83,8 @@ You will need **admin** rights to use this endpoint
|
|
|
83
83
|
* @summary Deletes a user account
|
|
84
84
|
*/
|
|
85
85
|
declare const adminDeleteUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
type AdminDeleteUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteUser>>>;
|
|
87
|
+
type AdminDeleteUserMutationError = ErrorType<DmError>;
|
|
88
88
|
declare const useAdminDeleteUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
89
89
|
mutation?: UseMutationOptions<void, TError, {
|
|
90
90
|
userId: string;
|
|
@@ -101,9 +101,9 @@ You will need **admin** rights to use this endpoint
|
|
|
101
101
|
* @summary Patch a given user
|
|
102
102
|
*/
|
|
103
103
|
declare const adminPatchUser: (userId: string, userPatchBodyBody: UserPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
type AdminPatchUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchUser>>>;
|
|
105
|
+
type AdminPatchUserMutationBody = UserPatchBodyBody;
|
|
106
|
+
type AdminPatchUserMutationError = ErrorType<DmError>;
|
|
107
107
|
declare const useAdminPatchUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
108
108
|
mutation?: UseMutationOptions<void, TError, {
|
|
109
109
|
userId: string;
|
|
@@ -123,8 +123,8 @@ You will need **admin** rights to use this endpoint
|
|
|
123
123
|
*/
|
|
124
124
|
declare const adminGetJobManifests: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<AdminJobManifestGetResponse>;
|
|
125
125
|
declare const getAdminGetJobManifestsQueryKey: () => string[];
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
type AdminGetJobManifestsQueryResult = NonNullable<Awaited<ReturnType<typeof adminGetJobManifests>>>;
|
|
127
|
+
type AdminGetJobManifestsQueryError = ErrorType<void | DmError>;
|
|
128
128
|
declare const useAdminGetJobManifests: <TData = AdminJobManifestGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
129
129
|
query?: UseQueryOptions<AdminJobManifestGetResponse, TError, TData, QueryKey> | undefined;
|
|
130
130
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -141,9 +141,9 @@ You will need **admin** rights to use this endpoint
|
|
|
141
141
|
* @summary Adds a Job Manifest and triggers the download of its Job Definitions
|
|
142
142
|
*/
|
|
143
143
|
declare const adminJobManifestPut: (jobManifestPutBodyBody: JobManifestPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
type AdminJobManifestPutMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestPut>>>;
|
|
145
|
+
type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;
|
|
146
|
+
type AdminJobManifestPutMutationError = ErrorType<void | DmError>;
|
|
147
147
|
declare const useAdminJobManifestPut: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
148
148
|
mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, {
|
|
149
149
|
data: JobManifestPutBodyBody;
|
|
@@ -160,9 +160,9 @@ You will need **admin** rights to use this endpoint
|
|
|
160
160
|
* @summary Trigger a download of Job Definitions using existing Job Manifests
|
|
161
161
|
*/
|
|
162
162
|
declare const adminJobManifestLoad: (jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
type AdminJobManifestLoadMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestLoad>>>;
|
|
164
|
+
type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;
|
|
165
|
+
type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;
|
|
166
166
|
declare const useAdminJobManifestLoad: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
167
167
|
mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, {
|
|
168
168
|
data: JobManifestLoadPutBodyBody;
|
package/admin/admin.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
queryMutator
|
|
3
|
+
} from "../chunk-LT4O36DN.js";
|
|
1
4
|
import {
|
|
2
5
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3RNIDX7T.js";
|
|
4
7
|
|
|
5
8
|
// src/admin/admin.ts
|
|
6
9
|
import { useQuery, useMutation } from "@tanstack/react-query";
|
|
@@ -15,8 +18,9 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
15
18
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
16
19
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getAdminGetServiceErrorsQueryKey(params);
|
|
17
20
|
const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
|
|
18
|
-
const
|
|
19
|
-
query
|
|
21
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
22
|
+
const query = useQuery(customOptions);
|
|
23
|
+
query.queryKey = customOptions.queryKey;
|
|
20
24
|
return query;
|
|
21
25
|
};
|
|
22
26
|
var adminPatchServiceError = (errorId, options) => {
|
|
@@ -109,8 +113,9 @@ var useAdminGetJobManifests = (options) => {
|
|
|
109
113
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
110
114
|
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getAdminGetJobManifestsQueryKey();
|
|
111
115
|
const queryFn = ({ signal }) => adminGetJobManifests(requestOptions, signal);
|
|
112
|
-
const
|
|
113
|
-
query
|
|
116
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
117
|
+
const query = useQuery(customOptions);
|
|
118
|
+
query.queryKey = customOptions.queryKey;
|
|
114
119
|
return query;
|
|
115
120
|
};
|
|
116
121
|
var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|