@squonk/data-manager-client 0.7.3 → 0.7.7-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 +5 -5
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +8 -3
- package/accounting/accounting.js +1 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +35 -25
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +36 -17
- package/admin/admin.js +32 -22
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +12 -12
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +11 -6
- package/application/application.js +9 -9
- package/application/application.js.map +1 -1
- package/{chunk-JR7F532L.js → chunk-6EEIAH4R.js} +1 -1
- package/{chunk-JR7F532L.js.map → chunk-6EEIAH4R.js.map} +1 -1
- package/{chunk-3DXYUDZH.cjs → chunk-NGBTCJWS.cjs} +1 -1
- package/chunk-NGBTCJWS.cjs.map +1 -0
- package/{custom-instance-32850190.d.ts → custom-instance-42e56f26.d.ts} +10 -3
- package/dataset/dataset.cjs +62 -52
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +52 -29
- package/dataset/dataset.js +54 -44
- package/dataset/dataset.js.map +1 -1
- package/file/file.cjs +22 -17
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +20 -8
- package/file/file.js +18 -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 +26 -21
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +23 -11
- package/instance/instance.js +23 -18
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +11 -11
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +11 -6
- package/job/job.js +8 -8
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +34 -28
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +27 -16
- package/metadata/metadata.js +30 -24
- package/metadata/metadata.js.map +1 -1
- package/package.json +14 -14
- package/project/project.cjs +56 -41
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +49 -27
- package/project/project.js +52 -37
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +11 -1
- package/src/admin/admin.ts +94 -37
- package/src/application/application.ts +19 -9
- package/src/data-manager-api.schemas.ts +6 -3
- package/src/dataset/dataset.ts +130 -65
- package/src/file/file.ts +47 -16
- package/src/instance/instance.ts +57 -24
- package/src/job/job.ts +14 -8
- package/src/metadata/metadata.ts +66 -38
- package/src/project/project.ts +121 -55
- package/src/task/task.ts +28 -16
- package/src/type/type.ts +6 -1
- package/src/user/user.ts +26 -2
- package/task/task.cjs +16 -16
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +15 -8
- package/task/task.js +13 -13
- package/task/task.js.map +1 -1
- package/type/type.cjs +3 -3
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +6 -3
- package/type/type.js +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs +13 -8
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +12 -2
- package/user/user.js +7 -2
- package/user/user.js.map +1 -1
- package/chunk-3DXYUDZH.cjs.map +0 -1
|
@@ -1,14 +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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/accounting/accounting.ts
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _reactquery = require('react-query');
|
|
10
10
|
var getAccountServerNamespace = (options) => {
|
|
11
|
-
return
|
|
11
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/account-server/namespace`, method: "get" }, options);
|
|
12
12
|
};
|
|
13
13
|
var getGetAccountServerNamespaceQueryKey = () => [
|
|
14
14
|
`/account-server/namespace`
|
|
@@ -18,12 +18,12 @@ var useGetAccountServerNamespace = (options) => {
|
|
|
18
18
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerNamespaceQueryKey()));
|
|
19
19
|
const queryFn = () => getAccountServerNamespace(requestOptions);
|
|
20
20
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
21
|
-
return
|
|
21
|
+
return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
|
|
22
22
|
queryKey
|
|
23
23
|
}, query);
|
|
24
24
|
};
|
|
25
25
|
var getVersion = (options) => {
|
|
26
|
-
return
|
|
26
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/version`, method: "get" }, options);
|
|
27
27
|
};
|
|
28
28
|
var getGetVersionQueryKey = () => [`/version`];
|
|
29
29
|
var useGetVersion = (options) => {
|
|
@@ -31,7 +31,7 @@ var useGetVersion = (options) => {
|
|
|
31
31
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionQueryKey()));
|
|
32
32
|
const queryFn = () => getVersion(requestOptions);
|
|
33
33
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
34
|
-
return
|
|
34
|
+
return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
|
|
35
35
|
queryKey
|
|
36
36
|
}, query);
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAkCO,IAAM,4BAA4B,CACvC,YACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAkCO,IAAM,4BAA4B,CACvC,YACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,MAAM,GAClD,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,MAAM,0BAA0B,cAAc;AAElD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAEjC,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAKO,IAAM,aAAa,CACxB,YACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,MAAM,GACjC,OACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAA6D,MACjE,WAAW,cAAc;AAE3B,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP","sourcesContent":["/**\n * Generated by orval v6.7.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: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\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 * 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) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\" },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n AsyncReturnType<typeof getAccountServerNamespace>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = AsyncReturnType<typeof getAccountServerNamespace>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n AsyncReturnType<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 AsyncReturnType<typeof getAccountServerNamespace>\n > = () => getAccountServerNamespace(requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getAccountServerNamespace>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\n\n return {\n queryKey,\n ...query,\n };\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) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\" },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n AsyncReturnType<typeof getVersion>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = AsyncReturnType<typeof getVersion>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getVersion>, TError, TData>;\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<AsyncReturnType<typeof getVersion>> = () =>\n getVersion(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getVersion>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
|
|
2
|
-
import { bb as customInstance, b6 as AccountServerGetNamespaceResponse, bc as ErrorType, b7 as DmError, aw as VersionGetResponse } from '../custom-instance-
|
|
2
|
+
import { bb as customInstance, b6 as AccountServerGetNamespaceResponse, bc as ErrorType, b7 as DmError, aw as VersionGetResponse } from '../custom-instance-42e56f26.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Generated by orval v6.
|
|
6
|
+
* Generated by orval v6.7.1 🍺
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Dataset Manager API
|
|
9
9
|
* The Dataset Manager API service.
|
|
@@ -13,6 +13,7 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
13
13
|
* OpenAPI spec version: 0.7
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
|
|
16
17
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
17
18
|
/**
|
|
18
19
|
* If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned
|
|
@@ -21,6 +22,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
|
|
|
21
22
|
*/
|
|
22
23
|
declare const getAccountServerNamespace: (options?: SecondParameter<typeof customInstance>) => Promise<AccountServerGetNamespaceResponse>;
|
|
23
24
|
declare const getGetAccountServerNamespaceQueryKey: () => string[];
|
|
25
|
+
declare type GetAccountServerNamespaceQueryResult = NonNullable<AsyncReturnType<typeof getAccountServerNamespace>>;
|
|
26
|
+
declare type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;
|
|
24
27
|
declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
25
28
|
query?: UseQueryOptions<AccountServerGetNamespaceResponse, TError, TData, QueryKey> | undefined;
|
|
26
29
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -32,6 +35,8 @@ declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceRe
|
|
|
32
35
|
*/
|
|
33
36
|
declare const getVersion: (options?: SecondParameter<typeof customInstance>) => Promise<VersionGetResponse>;
|
|
34
37
|
declare const getGetVersionQueryKey: () => string[];
|
|
38
|
+
declare type GetVersionQueryResult = NonNullable<AsyncReturnType<typeof getVersion>>;
|
|
39
|
+
declare type GetVersionQueryError = ErrorType<void | DmError>;
|
|
35
40
|
declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
36
41
|
query?: UseQueryOptions<VersionGetResponse, TError, TData, QueryKey> | undefined;
|
|
37
42
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -39,4 +44,4 @@ declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<voi
|
|
|
39
44
|
queryKey: QueryKey;
|
|
40
45
|
};
|
|
41
46
|
|
|
42
|
-
export { getAccountServerNamespace, getGetAccountServerNamespaceQueryKey, getGetVersionQueryKey, getVersion, useGetAccountServerNamespace, useGetVersion };
|
|
47
|
+
export { GetAccountServerNamespaceQueryError, GetAccountServerNamespaceQueryResult, GetVersionQueryError, GetVersionQueryResult, getAccountServerNamespace, getGetAccountServerNamespaceQueryKey, getGetVersionQueryKey, getVersion, useGetAccountServerNamespace, useGetVersion };
|
package/accounting/accounting.js
CHANGED
|
@@ -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.7.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: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n AccountServerGetNamespaceResponse,\n DmError,\n VersionGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\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 * 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) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\" },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n AsyncReturnType<typeof getAccountServerNamespace>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = AsyncReturnType<typeof getAccountServerNamespace>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n AsyncReturnType<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 AsyncReturnType<typeof getAccountServerNamespace>\n > = () => getAccountServerNamespace(requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getAccountServerNamespace>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\n\n return {\n queryKey,\n ...query,\n };\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) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\" },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n AsyncReturnType<typeof getVersion>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = AsyncReturnType<typeof getVersion>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getVersion>, TError, TData>;\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<AsyncReturnType<typeof getVersion>> = () =>\n getVersion(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getVersion>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAkCO,IAAM,4BAA4B,CACvC,YACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,MAAM,GAClD,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,MAAM,0BAA0B,cAAc;AAElD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAEjC,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAKO,IAAM,aAAa,CACxB,YACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,MAAM,GACjC,OACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAA6D,MACjE,WAAW,cAAc;AAE3B,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;","names":[]}
|
package/admin/admin.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/admin/admin.ts
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
|
|
|
9
9
|
|
|
10
10
|
var _reactquery = require('react-query');
|
|
11
11
|
var adminGetServiceErrors = (params, options) => {
|
|
12
|
-
return
|
|
12
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error`, method: "get", params }, options);
|
|
13
13
|
};
|
|
14
14
|
var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
|
|
15
15
|
var useAdminGetServiceErrors = (params, options) => {
|
|
@@ -17,66 +17,71 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
17
17
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetServiceErrorsQueryKey(params)));
|
|
18
18
|
const queryFn = () => adminGetServiceErrors(params, requestOptions);
|
|
19
19
|
const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
|
|
20
|
-
return
|
|
20
|
+
return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
|
|
21
21
|
queryKey
|
|
22
22
|
}, query);
|
|
23
23
|
};
|
|
24
|
-
var adminPatchServiceError = (
|
|
25
|
-
return
|
|
24
|
+
var adminPatchServiceError = (errorId, options) => {
|
|
25
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "patch" }, options);
|
|
26
26
|
};
|
|
27
27
|
var useAdminPatchServiceError = (options) => {
|
|
28
28
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
29
29
|
const mutationFn = (props) => {
|
|
30
|
-
const {
|
|
31
|
-
return adminPatchServiceError(
|
|
30
|
+
const { errorId } = props || {};
|
|
31
|
+
return adminPatchServiceError(errorId, requestOptions);
|
|
32
32
|
};
|
|
33
33
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
34
34
|
};
|
|
35
|
-
var adminDeleteServiceError = (
|
|
36
|
-
return
|
|
35
|
+
var adminDeleteServiceError = (errorId, options) => {
|
|
36
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "delete" }, options);
|
|
37
37
|
};
|
|
38
38
|
var useAdminDeleteServiceError = (options) => {
|
|
39
39
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
40
40
|
const mutationFn = (props) => {
|
|
41
|
-
const {
|
|
42
|
-
return adminDeleteServiceError(
|
|
41
|
+
const { errorId } = props || {};
|
|
42
|
+
return adminDeleteServiceError(errorId, requestOptions);
|
|
43
43
|
};
|
|
44
44
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
45
45
|
};
|
|
46
|
-
var adminPutUser = (
|
|
47
|
-
return
|
|
46
|
+
var adminPutUser = (userId, options) => {
|
|
47
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "put" }, options);
|
|
48
48
|
};
|
|
49
49
|
var useAdminPutUser = (options) => {
|
|
50
50
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
51
51
|
const mutationFn = (props) => {
|
|
52
|
-
const {
|
|
53
|
-
return adminPutUser(
|
|
52
|
+
const { userId } = props || {};
|
|
53
|
+
return adminPutUser(userId, requestOptions);
|
|
54
54
|
};
|
|
55
55
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
56
56
|
};
|
|
57
|
-
var adminDeleteUser = (
|
|
58
|
-
return
|
|
57
|
+
var adminDeleteUser = (userId, options) => {
|
|
58
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "delete" }, options);
|
|
59
59
|
};
|
|
60
60
|
var useAdminDeleteUser = (options) => {
|
|
61
61
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
62
62
|
const mutationFn = (props) => {
|
|
63
|
-
const {
|
|
64
|
-
return adminDeleteUser(
|
|
63
|
+
const { userId } = props || {};
|
|
64
|
+
return adminDeleteUser(userId, requestOptions);
|
|
65
65
|
};
|
|
66
66
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
67
67
|
};
|
|
68
|
-
var adminPatchUser = (
|
|
68
|
+
var adminPatchUser = (userId, userPatchBodyBody, options) => {
|
|
69
69
|
const formData = new FormData();
|
|
70
70
|
if (userPatchBodyBody.suspend_message !== void 0) {
|
|
71
71
|
formData.append("suspend_message", userPatchBodyBody.suspend_message);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, {
|
|
74
|
+
url: `/admin/user/${userId}`,
|
|
75
|
+
method: "patch",
|
|
76
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
77
|
+
data: formData
|
|
78
|
+
}, options);
|
|
74
79
|
};
|
|
75
80
|
var useAdminPatchUser = (options) => {
|
|
76
81
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
77
82
|
const mutationFn = (props) => {
|
|
78
|
-
const {
|
|
79
|
-
return adminPatchUser(
|
|
83
|
+
const { userId, data } = props || {};
|
|
84
|
+
return adminPatchUser(userId, data, requestOptions);
|
|
80
85
|
};
|
|
81
86
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
82
87
|
};
|
|
@@ -89,7 +94,12 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|
|
|
89
94
|
if (jobManifestPutBodyBody.params !== void 0) {
|
|
90
95
|
formData.append("params", jobManifestPutBodyBody.params);
|
|
91
96
|
}
|
|
92
|
-
return
|
|
97
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, {
|
|
98
|
+
url: `/admin/job-manifest`,
|
|
99
|
+
method: "put",
|
|
100
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
101
|
+
data: formData
|
|
102
|
+
}, options);
|
|
93
103
|
};
|
|
94
104
|
var useAdminJobManifestPut = (options) => {
|
|
95
105
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
@@ -100,7 +110,7 @@ var useAdminJobManifestPut = (options) => {
|
|
|
100
110
|
return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
|
|
101
111
|
};
|
|
102
112
|
var adminJobManifestLoad = (options) => {
|
|
103
|
-
return
|
|
113
|
+
return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/job-manifest/load`, method: "put" }, options);
|
|
104
114
|
};
|
|
105
115
|
var useAdminJobManifestLoad = (options) => {
|
|
106
116
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
package/admin/admin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Generated by orval v6.6.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} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\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) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", params },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport const useAdminGetServiceErrors = <\n TData = AsyncReturnType<typeof adminGetServiceErrors>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminGetServiceErrors>\n > = () => adminGetServiceErrors(params, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<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 const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminPatchServiceError>,\n { errorid: number }\n > = (props) => {\n const { errorid } = props || {};\n\n return adminPatchServiceError(errorid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminDeleteServiceError>,\n { errorid: number }\n > = (props) => {\n const { errorid } = props || {};\n\n return adminDeleteServiceError(errorid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminPutUser>,\n { userid: string }\n > = (props) => {\n const { userid } = props || {};\n\n return adminPutUser(userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminDeleteUser>,\n { userid: string }\n > = (props) => {\n const { userid } = props || {};\n\n return adminDeleteUser(userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 { url: `/admin/user/${userid}`, method: \"patch\", data: formData },\n options\n );\n};\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 { url: `/admin/job-manifest`, method: \"put\", data: formData },\n options\n );\n};\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminJobManifestPut>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminJobManifestLoadPutResponse>(\n { url: `/admin/job-manifest/load`, method: \"put\" },\n options\n );\n};\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TVariables = void,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TError,\n TVariables,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TVariables\n > = () => {\n return adminJobManifestLoad(requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TError,\n TVariables,\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Generated by orval v6.7.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: 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} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\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) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", params },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n AsyncReturnType<typeof adminGetServiceErrors>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = AsyncReturnType<typeof adminGetServiceErrors>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<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 AsyncReturnType<typeof adminGetServiceErrors>\n > = () => adminGetServiceErrors(params, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<typeof adminPatchServiceError>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props || {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<typeof adminDeleteServiceError>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props || {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<typeof adminPutUser>,\n { userId: string }\n > = (props) => {\n const { userId } = props || {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<typeof adminDeleteUser>,\n { userId: string }\n > = (props) => {\n const { userId } = props || {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<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 AsyncReturnType<typeof adminJobManifestPut>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<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 options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminJobManifestLoadPutResponse>(\n { url: `/admin/job-manifest/load`, method: \"put\" },\n options\n );\n};\n\nexport type AdminJobManifestLoadMutationResult = NonNullable<\n AsyncReturnType<typeof adminJobManifestLoad>\n>;\n\nexport type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestLoad = <\n TError = ErrorType<void | DmError>,\n TVariables = void,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TError,\n TVariables,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TVariables\n > = () => {\n return adminJobManifestLoad(requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof adminJobManifestLoad>,\n TError,\n TVariables,\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
|
package/admin/admin.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { A as AdminGetServiceErrorsParams, bb as customInstance, aE as ServiceErrorsGetResponse, bc as ErrorType, b7 as DmError, W as UserAccountDetail, U as UserPatchBodyBody, K as JobManifestPutBodyBody, b5 as AdminJobManifestLoadPutResponse } from '../custom-instance-
|
|
1
|
+
import { A as AdminGetServiceErrorsParams, bb as customInstance, aE as ServiceErrorsGetResponse, bc as ErrorType, b7 as DmError, W as UserAccountDetail, U as UserPatchBodyBody, K as JobManifestPutBodyBody, b5 as AdminJobManifestLoadPutResponse } from '../custom-instance-42e56f26.js';
|
|
2
2
|
import * as react_query from 'react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
+
declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
|
|
6
7
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
7
8
|
/**
|
|
8
9
|
* Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.
|
|
@@ -13,6 +14,8 @@ You will need **admin** rights to use this endpoint
|
|
|
13
14
|
*/
|
|
14
15
|
declare const adminGetServiceErrors: (params?: AdminGetServiceErrorsParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<ServiceErrorsGetResponse>;
|
|
15
16
|
declare const getAdminGetServiceErrorsQueryKey: (params?: AdminGetServiceErrorsParams | undefined) => (string | AdminGetServiceErrorsParams)[];
|
|
17
|
+
declare type AdminGetServiceErrorsQueryResult = NonNullable<AsyncReturnType<typeof adminGetServiceErrors>>;
|
|
18
|
+
declare type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;
|
|
16
19
|
declare const useAdminGetServiceErrors: <TData = ServiceErrorsGetResponse, TError = ErrorType<void | DmError>>(params?: AdminGetServiceErrorsParams | undefined, options?: {
|
|
17
20
|
query?: UseQueryOptions<ServiceErrorsGetResponse, TError, TData, QueryKey> | undefined;
|
|
18
21
|
request?: SecondParameter<typeof customInstance>;
|
|
@@ -26,14 +29,16 @@ You will need **admin** rights to use this endpoint
|
|
|
26
29
|
|
|
27
30
|
* @summary Patches a Service Error
|
|
28
31
|
*/
|
|
29
|
-
declare const adminPatchServiceError: (
|
|
32
|
+
declare const adminPatchServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
33
|
+
declare type AdminPatchServiceErrorMutationResult = NonNullable<AsyncReturnType<typeof adminPatchServiceError>>;
|
|
34
|
+
declare type AdminPatchServiceErrorMutationError = ErrorType<DmError>;
|
|
30
35
|
declare const useAdminPatchServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
31
36
|
mutation?: UseMutationOptions<void, TError, {
|
|
32
|
-
|
|
37
|
+
errorId: number;
|
|
33
38
|
}, TContext> | undefined;
|
|
34
39
|
request?: SecondParameter<typeof customInstance>;
|
|
35
40
|
} | undefined) => react_query.UseMutationResult<void, TError, {
|
|
36
|
-
|
|
41
|
+
errorId: number;
|
|
37
42
|
}, TContext>;
|
|
38
43
|
/**
|
|
39
44
|
* Deletes an existing Service Error.
|
|
@@ -42,14 +47,16 @@ You will need **admin** rights to use this endpoint
|
|
|
42
47
|
|
|
43
48
|
* @summary Deletes a Service Error
|
|
44
49
|
*/
|
|
45
|
-
declare const adminDeleteServiceError: (
|
|
50
|
+
declare const adminDeleteServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
51
|
+
declare type AdminDeleteServiceErrorMutationResult = NonNullable<AsyncReturnType<typeof adminDeleteServiceError>>;
|
|
52
|
+
declare type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;
|
|
46
53
|
declare const useAdminDeleteServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
47
54
|
mutation?: UseMutationOptions<void, TError, {
|
|
48
|
-
|
|
55
|
+
errorId: number;
|
|
49
56
|
}, TContext> | undefined;
|
|
50
57
|
request?: SecondParameter<typeof customInstance>;
|
|
51
58
|
} | undefined) => react_query.UseMutationResult<void, TError, {
|
|
52
|
-
|
|
59
|
+
errorId: number;
|
|
53
60
|
}, TContext>;
|
|
54
61
|
/**
|
|
55
62
|
* 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.
|
|
@@ -58,14 +65,16 @@ You will need **admin** rights to use this endpoint
|
|
|
58
65
|
|
|
59
66
|
* @summary Prepares a user account in the Data Manager service
|
|
60
67
|
*/
|
|
61
|
-
declare const adminPutUser: (
|
|
68
|
+
declare const adminPutUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<UserAccountDetail>;
|
|
69
|
+
declare type AdminPutUserMutationResult = NonNullable<AsyncReturnType<typeof adminPutUser>>;
|
|
70
|
+
declare type AdminPutUserMutationError = ErrorType<void | DmError>;
|
|
62
71
|
declare const useAdminPutUser: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
63
72
|
mutation?: UseMutationOptions<UserAccountDetail, TError, {
|
|
64
|
-
|
|
73
|
+
userId: string;
|
|
65
74
|
}, TContext> | undefined;
|
|
66
75
|
request?: SecondParameter<typeof customInstance>;
|
|
67
76
|
} | undefined) => react_query.UseMutationResult<UserAccountDetail, TError, {
|
|
68
|
-
|
|
77
|
+
userId: string;
|
|
69
78
|
}, TContext>;
|
|
70
79
|
/**
|
|
71
80
|
* Deletes a user account, along with all the user's Datasets
|
|
@@ -74,14 +83,16 @@ You will need **admin** rights to use this endpoint
|
|
|
74
83
|
|
|
75
84
|
* @summary Deletes a user account
|
|
76
85
|
*/
|
|
77
|
-
declare const adminDeleteUser: (
|
|
86
|
+
declare const adminDeleteUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
87
|
+
declare type AdminDeleteUserMutationResult = NonNullable<AsyncReturnType<typeof adminDeleteUser>>;
|
|
88
|
+
declare type AdminDeleteUserMutationError = ErrorType<DmError>;
|
|
78
89
|
declare const useAdminDeleteUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
79
90
|
mutation?: UseMutationOptions<void, TError, {
|
|
80
|
-
|
|
91
|
+
userId: string;
|
|
81
92
|
}, TContext> | undefined;
|
|
82
93
|
request?: SecondParameter<typeof customInstance>;
|
|
83
94
|
} | undefined) => react_query.UseMutationResult<void, TError, {
|
|
84
|
-
|
|
95
|
+
userId: string;
|
|
85
96
|
}, TContext>;
|
|
86
97
|
/**
|
|
87
98
|
* Patches a user record, typcially to suspend or re-enable a user account
|
|
@@ -90,15 +101,18 @@ You will need **admin** rights to use this endpoint
|
|
|
90
101
|
|
|
91
102
|
* @summary Patch a given user
|
|
92
103
|
*/
|
|
93
|
-
declare const adminPatchUser: (
|
|
104
|
+
declare const adminPatchUser: (userId: string, userPatchBodyBody: UserPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
105
|
+
declare type AdminPatchUserMutationResult = NonNullable<AsyncReturnType<typeof adminPatchUser>>;
|
|
106
|
+
declare type AdminPatchUserMutationBody = UserPatchBodyBody;
|
|
107
|
+
declare type AdminPatchUserMutationError = ErrorType<DmError>;
|
|
94
108
|
declare const useAdminPatchUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
|
|
95
109
|
mutation?: UseMutationOptions<void, TError, {
|
|
96
|
-
|
|
110
|
+
userId: string;
|
|
97
111
|
data: UserPatchBodyBody;
|
|
98
112
|
}, TContext> | undefined;
|
|
99
113
|
request?: SecondParameter<typeof customInstance>;
|
|
100
114
|
} | undefined) => react_query.UseMutationResult<void, TError, {
|
|
101
|
-
|
|
115
|
+
userId: string;
|
|
102
116
|
data: UserPatchBodyBody;
|
|
103
117
|
}, TContext>;
|
|
104
118
|
/**
|
|
@@ -111,6 +125,9 @@ You will need **admin** rights to use this endpoint
|
|
|
111
125
|
* @summary Adds a manifest and triggers the download of Job Definitions
|
|
112
126
|
*/
|
|
113
127
|
declare const adminJobManifestPut: (jobManifestPutBodyBody: JobManifestPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
|
|
128
|
+
declare type AdminJobManifestPutMutationResult = NonNullable<AsyncReturnType<typeof adminJobManifestPut>>;
|
|
129
|
+
declare type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;
|
|
130
|
+
declare type AdminJobManifestPutMutationError = ErrorType<void | DmError>;
|
|
114
131
|
declare const useAdminJobManifestPut: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
115
132
|
mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, {
|
|
116
133
|
data: JobManifestPutBodyBody;
|
|
@@ -127,9 +144,11 @@ You will need **admin** rights to use this endpoint
|
|
|
127
144
|
* @summary Trigger a download of known Job Definitions using the Manifest table
|
|
128
145
|
*/
|
|
129
146
|
declare const adminJobManifestLoad: (options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
|
|
147
|
+
declare type AdminJobManifestLoadMutationResult = NonNullable<AsyncReturnType<typeof adminJobManifestLoad>>;
|
|
148
|
+
declare type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;
|
|
130
149
|
declare const useAdminJobManifestLoad: <TError = ErrorType<void | DmError>, TVariables = void, TContext = unknown>(options?: {
|
|
131
150
|
mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, TVariables, TContext> | undefined;
|
|
132
151
|
request?: SecondParameter<typeof customInstance>;
|
|
133
152
|
} | undefined) => react_query.UseMutationResult<AdminJobManifestLoadPutResponse, TError, TVariables, TContext>;
|
|
134
153
|
|
|
135
|
-
export { adminDeleteServiceError, adminDeleteUser, adminGetServiceErrors, adminJobManifestLoad, adminJobManifestPut, adminPatchServiceError, adminPatchUser, adminPutUser, getAdminGetServiceErrorsQueryKey, useAdminDeleteServiceError, useAdminDeleteUser, useAdminGetServiceErrors, useAdminJobManifestLoad, useAdminJobManifestPut, useAdminPatchServiceError, useAdminPatchUser, useAdminPutUser };
|
|
154
|
+
export { AdminDeleteServiceErrorMutationError, AdminDeleteServiceErrorMutationResult, AdminDeleteUserMutationError, AdminDeleteUserMutationResult, AdminGetServiceErrorsQueryError, AdminGetServiceErrorsQueryResult, 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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues,
|
|
3
3
|
customInstance
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6EEIAH4R.js";
|
|
5
5
|
|
|
6
6
|
// src/admin/admin.ts
|
|
7
7
|
import {
|
|
@@ -21,62 +21,67 @@ var useAdminGetServiceErrors = (params, options) => {
|
|
|
21
21
|
queryKey
|
|
22
22
|
}, query);
|
|
23
23
|
};
|
|
24
|
-
var adminPatchServiceError = (
|
|
25
|
-
return customInstance({ url: `/admin/service-error/${
|
|
24
|
+
var adminPatchServiceError = (errorId, options) => {
|
|
25
|
+
return customInstance({ url: `/admin/service-error/${errorId}`, method: "patch" }, options);
|
|
26
26
|
};
|
|
27
27
|
var useAdminPatchServiceError = (options) => {
|
|
28
28
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
29
29
|
const mutationFn = (props) => {
|
|
30
|
-
const {
|
|
31
|
-
return adminPatchServiceError(
|
|
30
|
+
const { errorId } = props || {};
|
|
31
|
+
return adminPatchServiceError(errorId, requestOptions);
|
|
32
32
|
};
|
|
33
33
|
return useMutation(mutationFn, mutationOptions);
|
|
34
34
|
};
|
|
35
|
-
var adminDeleteServiceError = (
|
|
36
|
-
return customInstance({ url: `/admin/service-error/${
|
|
35
|
+
var adminDeleteServiceError = (errorId, options) => {
|
|
36
|
+
return customInstance({ url: `/admin/service-error/${errorId}`, method: "delete" }, options);
|
|
37
37
|
};
|
|
38
38
|
var useAdminDeleteServiceError = (options) => {
|
|
39
39
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
40
40
|
const mutationFn = (props) => {
|
|
41
|
-
const {
|
|
42
|
-
return adminDeleteServiceError(
|
|
41
|
+
const { errorId } = props || {};
|
|
42
|
+
return adminDeleteServiceError(errorId, requestOptions);
|
|
43
43
|
};
|
|
44
44
|
return useMutation(mutationFn, mutationOptions);
|
|
45
45
|
};
|
|
46
|
-
var adminPutUser = (
|
|
47
|
-
return customInstance({ url: `/admin/user/${
|
|
46
|
+
var adminPutUser = (userId, options) => {
|
|
47
|
+
return customInstance({ url: `/admin/user/${userId}`, method: "put" }, options);
|
|
48
48
|
};
|
|
49
49
|
var useAdminPutUser = (options) => {
|
|
50
50
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
51
51
|
const mutationFn = (props) => {
|
|
52
|
-
const {
|
|
53
|
-
return adminPutUser(
|
|
52
|
+
const { userId } = props || {};
|
|
53
|
+
return adminPutUser(userId, requestOptions);
|
|
54
54
|
};
|
|
55
55
|
return useMutation(mutationFn, mutationOptions);
|
|
56
56
|
};
|
|
57
|
-
var adminDeleteUser = (
|
|
58
|
-
return customInstance({ url: `/admin/user/${
|
|
57
|
+
var adminDeleteUser = (userId, options) => {
|
|
58
|
+
return customInstance({ url: `/admin/user/${userId}`, method: "delete" }, options);
|
|
59
59
|
};
|
|
60
60
|
var useAdminDeleteUser = (options) => {
|
|
61
61
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
62
62
|
const mutationFn = (props) => {
|
|
63
|
-
const {
|
|
64
|
-
return adminDeleteUser(
|
|
63
|
+
const { userId } = props || {};
|
|
64
|
+
return adminDeleteUser(userId, requestOptions);
|
|
65
65
|
};
|
|
66
66
|
return useMutation(mutationFn, mutationOptions);
|
|
67
67
|
};
|
|
68
|
-
var adminPatchUser = (
|
|
68
|
+
var adminPatchUser = (userId, userPatchBodyBody, options) => {
|
|
69
69
|
const formData = new FormData();
|
|
70
70
|
if (userPatchBodyBody.suspend_message !== void 0) {
|
|
71
71
|
formData.append("suspend_message", userPatchBodyBody.suspend_message);
|
|
72
72
|
}
|
|
73
|
-
return customInstance({
|
|
73
|
+
return customInstance({
|
|
74
|
+
url: `/admin/user/${userId}`,
|
|
75
|
+
method: "patch",
|
|
76
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
77
|
+
data: formData
|
|
78
|
+
}, options);
|
|
74
79
|
};
|
|
75
80
|
var useAdminPatchUser = (options) => {
|
|
76
81
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
77
82
|
const mutationFn = (props) => {
|
|
78
|
-
const {
|
|
79
|
-
return adminPatchUser(
|
|
83
|
+
const { userId, data } = props || {};
|
|
84
|
+
return adminPatchUser(userId, data, requestOptions);
|
|
80
85
|
};
|
|
81
86
|
return useMutation(mutationFn, mutationOptions);
|
|
82
87
|
};
|
|
@@ -89,7 +94,12 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
|
|
|
89
94
|
if (jobManifestPutBodyBody.params !== void 0) {
|
|
90
95
|
formData.append("params", jobManifestPutBodyBody.params);
|
|
91
96
|
}
|
|
92
|
-
return customInstance({
|
|
97
|
+
return customInstance({
|
|
98
|
+
url: `/admin/job-manifest`,
|
|
99
|
+
method: "put",
|
|
100
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
101
|
+
data: formData
|
|
102
|
+
}, options);
|
|
93
103
|
};
|
|
94
104
|
var useAdminJobManifestPut = (options) => {
|
|
95
105
|
const { mutation: mutationOptions, request: requestOptions } = options || {};
|