@squonk/data-manager-client 0.7.10 → 0.7.11-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/accounting/accounting.cjs +10 -8
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +9 -8
  4. package/accounting/accounting.js +10 -8
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +17 -17
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +13 -12
  9. package/admin/admin.js +17 -17
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +12 -8
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +9 -8
  14. package/application/application.js +12 -8
  15. package/application/application.js.map +1 -1
  16. package/{custom-instance-6e6b0801.d.ts → custom-instance-da4fff1f.d.ts} +144 -116
  17. package/dataset/dataset.cjs +42 -30
  18. package/dataset/dataset.cjs.map +1 -1
  19. package/dataset/dataset.d.ts +19 -18
  20. package/dataset/dataset.js +42 -30
  21. package/dataset/dataset.js.map +1 -1
  22. package/file/file.cjs +18 -14
  23. package/file/file.cjs.map +1 -1
  24. package/file/file.d.ts +11 -10
  25. package/file/file.js +18 -14
  26. package/file/file.js.map +1 -1
  27. package/index.cjs.map +1 -1
  28. package/index.d.ts +1 -1
  29. package/index.js.map +1 -1
  30. package/instance/instance.cjs +35 -15
  31. package/instance/instance.cjs.map +1 -1
  32. package/instance/instance.d.ts +33 -10
  33. package/instance/instance.js +34 -14
  34. package/instance/instance.js.map +1 -1
  35. package/job/job.cjs +12 -8
  36. package/job/job.cjs.map +1 -1
  37. package/job/job.d.ts +9 -8
  38. package/job/job.js +12 -8
  39. package/job/job.js.map +1 -1
  40. package/metadata/metadata.cjs +18 -12
  41. package/metadata/metadata.cjs.map +1 -1
  42. package/metadata/metadata.d.ts +10 -9
  43. package/metadata/metadata.js +18 -12
  44. package/metadata/metadata.js.map +1 -1
  45. package/package.json +9 -9
  46. package/project/project.cjs +52 -25
  47. package/project/project.cjs.map +1 -1
  48. package/project/project.d.ts +35 -15
  49. package/project/project.js +51 -24
  50. package/project/project.js.map +1 -1
  51. package/src/accounting/accounting.ts +29 -25
  52. package/src/admin/admin.ts +55 -57
  53. package/src/application/application.ts +30 -29
  54. package/src/data-manager-api.schemas.ts +178 -180
  55. package/src/dataset/dataset.ts +113 -90
  56. package/src/file/file.ts +54 -47
  57. package/src/instance/instance.ts +118 -51
  58. package/src/job/job.ts +30 -25
  59. package/src/metadata/metadata.ts +50 -41
  60. package/src/project/project.ts +163 -78
  61. package/src/task/task.ts +40 -31
  62. package/src/type/type.ts +23 -20
  63. package/src/user/user.ts +55 -48
  64. package/task/task.cjs +14 -10
  65. package/task/task.cjs.map +1 -1
  66. package/task/task.d.ts +9 -8
  67. package/task/task.js +14 -10
  68. package/task/task.js.map +1 -1
  69. package/type/type.cjs +6 -4
  70. package/type/type.cjs.map +1 -1
  71. package/type/type.d.ts +7 -6
  72. package/type/type.js +6 -4
  73. package/type/type.js.map +1 -1
  74. package/user/user.cjs +20 -14
  75. package/user/user.cjs.map +1 -1
  76. package/user/user.d.ts +11 -10
  77. package/user/user.js +20 -14
  78. package/user/user.js.map +1 -1
@@ -7,29 +7,31 @@ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
7
7
 
8
8
 
9
9
  var _reactquery = require('react-query');
10
- var getAccountServerNamespace = (options) => {
11
- return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/account-server/namespace`, method: "get" }, options);
10
+ var getAccountServerNamespace = (options, signal) => {
11
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/account-server/namespace`, method: "get", signal }, options);
12
12
  };
13
13
  var getGetAccountServerNamespaceQueryKey = () => [
14
14
  `/account-server/namespace`
15
15
  ];
16
16
  var useGetAccountServerNamespace = (options) => {
17
- const { query: queryOptions, request: requestOptions } = options || {};
17
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
18
18
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetAccountServerNamespaceQueryKey()));
19
- const queryFn = () => getAccountServerNamespace(requestOptions);
19
+ const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
20
20
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
21
21
  return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
22
22
  queryKey
23
23
  }, query);
24
24
  };
25
- var getVersion = (options) => {
26
- return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/version`, method: "get" }, options);
25
+ var getVersion = (options, signal) => {
26
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/version`, method: "get", signal }, options);
27
27
  };
28
28
  var getGetVersionQueryKey = () => [`/version`];
29
29
  var useGetVersion = (options) => {
30
- const { query: queryOptions, request: requestOptions } = options || {};
30
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
31
31
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionQueryKey()));
32
- const queryFn = () => getVersion(requestOptions);
32
+ const queryFn = ({
33
+ signal
34
+ }) => getVersion(requestOptions, signal);
33
35
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
34
36
  return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
35
37
  queryKey
@@ -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,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
+ {"version":3,"sources":["../../src/accounting/accounting.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AA+BO,IAAM,4BAA4B,CACvC,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,OAAO,OAAO,GAC1D,OACF;AACF;AAEO,IAAM,uCAAuC,MAAM;AAAA,EACxD;AACF;AAOO,IAAM,+BAA+B,CAG1C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,qCAAqC;AAEjE,QAAM,UAEF,CAAC,EAAE,aAAa,0BAA0B,gBAAgB,MAAM;AAEpE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAEjC,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAKO,IAAM,aAAa,CACxB,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,OAAO,OAAO,GACzC,OACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,QACI,WAAW,gBAAgB,MAAM;AAEvC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP","sourcesContent":["/**\n * Generated by orval v6.8.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n 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\nexport type AwaitedInput<T> = PromiseLike<T> | T;\n\nexport type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned\n\n * @summary Gets the Account Server cluster namespace\n */\nexport const getAccountServerNamespace = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerNamespaceQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n > = ({ signal }) => getAccountServerNamespace(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\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 signal?: AbortSignal\n) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersion>>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({\n signal,\n }) => getVersion(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\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-6e6b0801.js';
2
+ import { bd as customInstance, b8 as AccountServerGetNamespaceResponse, be as ErrorType, b9 as DmError, ay as VersionGetResponse } from '../custom-instance-da4fff1f.js';
3
3
  import 'axios';
4
4
 
5
5
  /**
6
- * Generated by orval v6.7.1 🍺
6
+ * Generated by orval v6.8.0 🍺
7
7
  * Do not edit manually.
8
8
  * Dataset Manager API
9
9
  * The Dataset Manager API service.
@@ -13,16 +13,17 @@ 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
+ declare type AwaitedInput<T> = PromiseLike<T> | T;
17
+ declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
17
18
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
18
19
  /**
19
20
  * If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned
20
21
 
21
22
  * @summary Gets the Account Server cluster namespace
22
23
  */
23
- declare const getAccountServerNamespace: (options?: SecondParameter<typeof customInstance>) => Promise<AccountServerGetNamespaceResponse>;
24
+ declare const getAccountServerNamespace: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal | undefined) => Promise<AccountServerGetNamespaceResponse>;
24
25
  declare const getGetAccountServerNamespaceQueryKey: () => string[];
25
- declare type GetAccountServerNamespaceQueryResult = NonNullable<AsyncReturnType<typeof getAccountServerNamespace>>;
26
+ declare type GetAccountServerNamespaceQueryResult = NonNullable<Awaited<ReturnType<typeof getAccountServerNamespace>>>;
26
27
  declare type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;
27
28
  declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceResponse, TError = ErrorType<void | DmError>>(options?: {
28
29
  query?: UseQueryOptions<AccountServerGetNamespaceResponse, TError, TData, QueryKey> | undefined;
@@ -33,9 +34,9 @@ declare const useGetAccountServerNamespace: <TData = AccountServerGetNamespaceRe
33
34
  /**
34
35
  * @summary Gets the Data Manager version that's running behind the API
35
36
  */
36
- declare const getVersion: (options?: SecondParameter<typeof customInstance>) => Promise<VersionGetResponse>;
37
+ declare const getVersion: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal | undefined) => Promise<VersionGetResponse>;
37
38
  declare const getGetVersionQueryKey: () => string[];
38
- declare type GetVersionQueryResult = NonNullable<AsyncReturnType<typeof getVersion>>;
39
+ declare type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
39
40
  declare type GetVersionQueryError = ErrorType<void | DmError>;
40
41
  declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<void | DmError>>(options?: {
41
42
  query?: UseQueryOptions<VersionGetResponse, TError, TData, QueryKey> | undefined;
@@ -44,4 +45,4 @@ declare const useGetVersion: <TData = VersionGetResponse, TError = ErrorType<voi
44
45
  queryKey: QueryKey;
45
46
  };
46
47
 
47
- export { GetAccountServerNamespaceQueryError, GetAccountServerNamespaceQueryResult, GetVersionQueryError, GetVersionQueryResult, getAccountServerNamespace, getGetAccountServerNamespaceQueryKey, getGetVersionQueryKey, getVersion, useGetAccountServerNamespace, useGetVersion };
48
+ export { Awaited, AwaitedInput, GetAccountServerNamespaceQueryError, GetAccountServerNamespaceQueryResult, GetVersionQueryError, GetVersionQueryResult, getAccountServerNamespace, getGetAccountServerNamespaceQueryKey, getGetVersionQueryKey, getVersion, useGetAccountServerNamespace, useGetVersion };
@@ -7,29 +7,31 @@ import {
7
7
  import {
8
8
  useQuery
9
9
  } from "react-query";
10
- var getAccountServerNamespace = (options) => {
11
- return customInstance({ url: `/account-server/namespace`, method: "get" }, options);
10
+ var getAccountServerNamespace = (options, signal) => {
11
+ return customInstance({ url: `/account-server/namespace`, method: "get", signal }, options);
12
12
  };
13
13
  var getGetAccountServerNamespaceQueryKey = () => [
14
14
  `/account-server/namespace`
15
15
  ];
16
16
  var useGetAccountServerNamespace = (options) => {
17
- const { query: queryOptions, request: requestOptions } = options || {};
17
+ const { query: queryOptions, request: requestOptions } = options ?? {};
18
18
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAccountServerNamespaceQueryKey();
19
- const queryFn = () => getAccountServerNamespace(requestOptions);
19
+ const queryFn = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
20
20
  const query = useQuery(queryKey, queryFn, queryOptions);
21
21
  return __spreadValues({
22
22
  queryKey
23
23
  }, query);
24
24
  };
25
- var getVersion = (options) => {
26
- return customInstance({ url: `/version`, method: "get" }, options);
25
+ var getVersion = (options, signal) => {
26
+ return customInstance({ url: `/version`, method: "get", signal }, options);
27
27
  };
28
28
  var getGetVersionQueryKey = () => [`/version`];
29
29
  var useGetVersion = (options) => {
30
- const { query: queryOptions, request: requestOptions } = options || {};
30
+ const { query: queryOptions, request: requestOptions } = options ?? {};
31
31
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetVersionQueryKey();
32
- const queryFn = () => getVersion(requestOptions);
32
+ const queryFn = ({
33
+ signal
34
+ }) => getVersion(requestOptions, signal);
33
35
  const query = useQuery(queryKey, queryFn, queryOptions);
34
36
  return __spreadValues({
35
37
  queryKey
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"sources":["../../src/accounting/accounting.ts"],"sourcesContent":["/**\n * Generated by orval v6.8.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n 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\nexport type AwaitedInput<T> = PromiseLike<T> | T;\n\nexport type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * If an Account Server is configured its namespace, e.g. `account-server`, is returned, otherwise an empty string is returned\n\n * @summary Gets the Account Server cluster namespace\n */\nexport const getAccountServerNamespace = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<AccountServerGetNamespaceResponse>(\n { url: `/account-server/namespace`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetAccountServerNamespaceQueryKey = () => [\n `/account-server/namespace`,\n];\n\nexport type GetAccountServerNamespaceQueryResult = NonNullable<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n>;\nexport type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>;\n\nexport const useGetAccountServerNamespace = <\n TData = Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetAccountServerNamespaceQueryKey();\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getAccountServerNamespace>>\n > = ({ signal }) => getAccountServerNamespace(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getAccountServerNamespace>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\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 signal?: AbortSignal\n) => {\n return customInstance<VersionGetResponse>(\n { url: `/version`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetVersionQueryKey = () => [`/version`];\n\nexport type GetVersionQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersion>>\n>;\nexport type GetVersionQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersion = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({\n signal,\n }) => getVersion(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getVersion>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AA+BO,IAAM,4BAA4B,CACvC,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,6BAA6B,QAAQ,OAAO,OAAO,GAC1D,OACF;AACF;AAEO,IAAM,uCAAuC,MAAM;AAAA,EACxD;AACF;AAOO,IAAM,+BAA+B,CAG1C,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,qCAAqC;AAEjE,QAAM,UAEF,CAAC,EAAE,aAAa,0BAA0B,gBAAgB,MAAM;AAEpE,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAEjC,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAKO,IAAM,aAAa,CACxB,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,OAAO,OAAO,GACzC,OACF;AACF;AAEO,IAAM,wBAAwB,MAAM,CAAC,UAAU;AAO/C,IAAM,gBAAgB,CAG3B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,sBAAsB;AAEjE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,QACI,WAAW,gBAAgB,MAAM;AAEvC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;","names":[]}
package/admin/admin.cjs CHANGED
@@ -8,14 +8,14 @@ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
8
8
 
9
9
 
10
10
  var _reactquery = require('react-query');
11
- var adminGetServiceErrors = (params, options) => {
12
- return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error`, method: "get", params }, options);
11
+ var adminGetServiceErrors = (params, options, signal) => {
12
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error`, method: "get", signal, params }, options);
13
13
  };
14
14
  var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
15
15
  var useAdminGetServiceErrors = (params, options) => {
16
- const { query: queryOptions, request: requestOptions } = options || {};
16
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
17
17
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetServiceErrorsQueryKey(params)));
18
- const queryFn = () => adminGetServiceErrors(params, requestOptions);
18
+ const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
19
19
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
20
20
  return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
21
21
  queryKey
@@ -25,9 +25,9 @@ var adminPatchServiceError = (errorId, options) => {
25
25
  return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "patch" }, options);
26
26
  };
27
27
  var useAdminPatchServiceError = (options) => {
28
- const { mutation: mutationOptions, request: requestOptions } = options || {};
28
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
29
29
  const mutationFn = (props) => {
30
- const { errorId } = props || {};
30
+ const { errorId } = _nullishCoalesce(props, () => ( {}));
31
31
  return adminPatchServiceError(errorId, requestOptions);
32
32
  };
33
33
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -36,9 +36,9 @@ var adminDeleteServiceError = (errorId, options) => {
36
36
  return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/service-error/${errorId}`, method: "delete" }, options);
37
37
  };
38
38
  var useAdminDeleteServiceError = (options) => {
39
- const { mutation: mutationOptions, request: requestOptions } = options || {};
39
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
40
40
  const mutationFn = (props) => {
41
- const { errorId } = props || {};
41
+ const { errorId } = _nullishCoalesce(props, () => ( {}));
42
42
  return adminDeleteServiceError(errorId, requestOptions);
43
43
  };
44
44
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -47,9 +47,9 @@ var adminPutUser = (userId, options) => {
47
47
  return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "put" }, options);
48
48
  };
49
49
  var useAdminPutUser = (options) => {
50
- const { mutation: mutationOptions, request: requestOptions } = options || {};
50
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
51
51
  const mutationFn = (props) => {
52
- const { userId } = props || {};
52
+ const { userId } = _nullishCoalesce(props, () => ( {}));
53
53
  return adminPutUser(userId, requestOptions);
54
54
  };
55
55
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -58,9 +58,9 @@ var adminDeleteUser = (userId, options) => {
58
58
  return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/user/${userId}`, method: "delete" }, options);
59
59
  };
60
60
  var useAdminDeleteUser = (options) => {
61
- const { mutation: mutationOptions, request: requestOptions } = options || {};
61
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
62
62
  const mutationFn = (props) => {
63
- const { userId } = props || {};
63
+ const { userId } = _nullishCoalesce(props, () => ( {}));
64
64
  return adminDeleteUser(userId, requestOptions);
65
65
  };
66
66
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -78,9 +78,9 @@ var adminPatchUser = (userId, userPatchBodyBody, options) => {
78
78
  }, options);
79
79
  };
80
80
  var useAdminPatchUser = (options) => {
81
- const { mutation: mutationOptions, request: requestOptions } = options || {};
81
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
82
82
  const mutationFn = (props) => {
83
- const { userId, data } = props || {};
83
+ const { userId, data } = _nullishCoalesce(props, () => ( {}));
84
84
  return adminPatchUser(userId, data, requestOptions);
85
85
  };
86
86
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -102,9 +102,9 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
102
102
  }, options);
103
103
  };
104
104
  var useAdminJobManifestPut = (options) => {
105
- const { mutation: mutationOptions, request: requestOptions } = options || {};
105
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
106
106
  const mutationFn = (props) => {
107
- const { data } = props || {};
107
+ const { data } = _nullishCoalesce(props, () => ( {}));
108
108
  return adminJobManifestPut(data, requestOptions);
109
109
  };
110
110
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
@@ -113,7 +113,7 @@ var adminJobManifestLoad = (options) => {
113
113
  return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/admin/job-manifest/load`, method: "put" }, options);
114
114
  };
115
115
  var useAdminJobManifestLoad = (options) => {
116
- const { mutation: mutationOptions, request: requestOptions } = options || {};
116
+ const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
117
117
  const mutationFn = () => {
118
118
  return adminJobManifestLoad(requestOptions);
119
119
  };
@@ -1 +1 @@
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"]}
1
+ {"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Generated by orval v6.8.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ServiceErrorsGetResponse,\n DmError,\n AdminGetServiceErrorsParams,\n AdminUserPutResponse,\n UserPatchBodyBody,\n AdminJobManifestLoadPutResponse,\n JobManifestPutBodyBody,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\nexport type AwaitedInput<T> = PromiseLike<T> | T;\n\nexport type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Gets Service Errors\n */\nexport const adminGetServiceErrors = (\n params?: AdminGetServiceErrorsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ServiceErrorsGetResponse>(\n { url: `/admin/service-error`, method: \"get\", signal, params },\n options\n );\n};\n\nexport const getAdminGetServiceErrorsQueryKey = (\n params?: AdminGetServiceErrorsParams\n) => [`/admin/service-error`, ...(params ? [params] : [])];\n\nexport type AdminGetServiceErrorsQueryResult = NonNullable<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n>;\nexport type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;\n\nexport const useAdminGetServiceErrors = <\n TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError = ErrorType<void | DmError>\n>(\n params?: AdminGetServiceErrorsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof adminGetServiceErrors>>\n > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof adminGetServiceErrors>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions);\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Used primarily to 'Acknowledge' but not delete a Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patches a Service Error\n */\nexport const adminPatchServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"patch\" },\n options\n );\n};\n\nexport type AdminPatchServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchServiceError>>\n>;\n\nexport type AdminPatchServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminPatchServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an existing Service Error.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a Service Error\n */\nexport const adminDeleteServiceError = (\n errorId: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/service-error/${errorId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteServiceErrorMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteServiceError>>\n>;\n\nexport type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteServiceError = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n { errorId: number }\n > = (props) => {\n const { errorId } = props ?? {};\n\n return adminDeleteServiceError(errorId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteServiceError>>,\n TError,\n { errorId: number },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Prepares a user account in the Data Manager service\n */\nexport const adminPutUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<AdminUserPutResponse>(\n { url: `/admin/user/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AdminPutUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPutUser>>\n>;\n\nexport type AdminPutUserMutationError = ErrorType<void | DmError>;\n\nexport const useAdminPutUser = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPutUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminPutUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPutUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes a user account, along with all the user's Datasets\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Deletes a user account\n */\nexport const adminDeleteUser = (\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/admin/user/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type AdminDeleteUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminDeleteUser>>\n>;\n\nexport type AdminDeleteUserMutationError = ErrorType<DmError>;\n\nexport const useAdminDeleteUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n { userId: string }\n > = (props) => {\n const { userId } = props ?? {};\n\n return adminDeleteUser(userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminDeleteUser>>,\n TError,\n { userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Patches a user record, typcially to suspend or re-enable a user account\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Patch a given user\n */\nexport const adminPatchUser = (\n userId: string,\n userPatchBodyBody: UserPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userPatchBodyBody.suspend_message !== undefined) {\n formData.append(\"suspend_message\", userPatchBodyBody.suspend_message);\n }\n\n return customInstance<void>(\n {\n url: `/admin/user/${userId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminPatchUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminPatchUser>>\n>;\nexport type AdminPatchUserMutationBody = UserPatchBodyBody;\nexport type AdminPatchUserMutationError = ErrorType<DmError>;\n\nexport const useAdminPatchUser = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminPatchUser>>,\n { userId: string; data: UserPatchBodyBody }\n > = (props) => {\n const { userId, data } = props ?? {};\n\n return adminPatchUser(userId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminPatchUser>>,\n TError,\n { userId: string; data: UserPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to add (or update an existing manifest). Manifests are the soirce of Job defintions. Once added the manifest is inspected and any Jobs it refers to are loaded.\n\nA limited number of manifest origins (URLs) are supported. At the moment we support basic GitHib and GitLab URLs, i.e. those that begin `https://raw.githubusercontent.com/` and `https://gitlab.com/api/v4/projects/`.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Adds a manifest and triggers the download of Job Definitions\n */\nexport const adminJobManifestPut = (\n jobManifestPutBodyBody: JobManifestPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"url\", jobManifestPutBodyBody.url);\n if (jobManifestPutBodyBody.header !== undefined) {\n formData.append(\"header\", jobManifestPutBodyBody.header);\n }\n if (jobManifestPutBodyBody.params !== undefined) {\n formData.append(\"params\", jobManifestPutBodyBody.params);\n }\n\n return customInstance<AdminJobManifestLoadPutResponse>(\n {\n url: `/admin/job-manifest`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AdminJobManifestPutMutationResult = NonNullable<\n Awaited<ReturnType<typeof adminJobManifestPut>>\n>;\nexport type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;\nexport type AdminJobManifestPutMutationError = ErrorType<void | DmError>;\n\nexport const useAdminJobManifestPut = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n { data: JobManifestPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return adminJobManifestPut(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestPut>>,\n TError,\n { data: JobManifestPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * This endpoint is used to trigger the Data Manager to re-inspect the internal Job **Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job defitnions are known to have changed in the referenced repositories.\n\nYou will need **admin** rights to use this endpoint\n\n * @summary Trigger a download of known Job Definitions using the Manifest table\n */\nexport const adminJobManifestLoad = (\n 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 Awaited<ReturnType<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 Awaited<ReturnType<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 Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TVariables\n > = () => {\n return adminJobManifestLoad(requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof adminJobManifestLoad>>,\n TError,\n TVariables,\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
package/admin/admin.d.ts CHANGED
@@ -1,9 +1,10 @@
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-6e6b0801.js';
1
+ import { A as AdminGetServiceErrorsParams, bd as customInstance, aG as ServiceErrorsGetResponse, be as ErrorType, b9 as DmError, Y as UserAccountDetail, U as UserPatchBodyBody, M as JobManifestPutBodyBody, b7 as AdminJobManifestLoadPutResponse } from '../custom-instance-da4fff1f.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
+ declare type AwaitedInput<T> = PromiseLike<T> | T;
7
+ declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
8
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
8
9
  /**
9
10
  * Displays the existing Service Errors, which can also include acnowledged errors, normally excluded from the list.
@@ -12,9 +13,9 @@ You will need **admin** rights to use this endpoint
12
13
 
13
14
  * @summary Gets Service Errors
14
15
  */
15
- declare const adminGetServiceErrors: (params?: AdminGetServiceErrorsParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<ServiceErrorsGetResponse>;
16
+ declare const adminGetServiceErrors: (params?: AdminGetServiceErrorsParams | undefined, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal | undefined) => Promise<ServiceErrorsGetResponse>;
16
17
  declare const getAdminGetServiceErrorsQueryKey: (params?: AdminGetServiceErrorsParams | undefined) => (string | AdminGetServiceErrorsParams)[];
17
- declare type AdminGetServiceErrorsQueryResult = NonNullable<AsyncReturnType<typeof adminGetServiceErrors>>;
18
+ declare type AdminGetServiceErrorsQueryResult = NonNullable<Awaited<ReturnType<typeof adminGetServiceErrors>>>;
18
19
  declare type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;
19
20
  declare const useAdminGetServiceErrors: <TData = ServiceErrorsGetResponse, TError = ErrorType<void | DmError>>(params?: AdminGetServiceErrorsParams | undefined, options?: {
20
21
  query?: UseQueryOptions<ServiceErrorsGetResponse, TError, TData, QueryKey> | undefined;
@@ -30,7 +31,7 @@ You will need **admin** rights to use this endpoint
30
31
  * @summary Patches a Service Error
31
32
  */
32
33
  declare const adminPatchServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
33
- declare type AdminPatchServiceErrorMutationResult = NonNullable<AsyncReturnType<typeof adminPatchServiceError>>;
34
+ declare type AdminPatchServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchServiceError>>>;
34
35
  declare type AdminPatchServiceErrorMutationError = ErrorType<DmError>;
35
36
  declare const useAdminPatchServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
36
37
  mutation?: UseMutationOptions<void, TError, {
@@ -48,7 +49,7 @@ You will need **admin** rights to use this endpoint
48
49
  * @summary Deletes a Service Error
49
50
  */
50
51
  declare const adminDeleteServiceError: (errorId: number, options?: SecondParameter<typeof customInstance>) => Promise<void>;
51
- declare type AdminDeleteServiceErrorMutationResult = NonNullable<AsyncReturnType<typeof adminDeleteServiceError>>;
52
+ declare type AdminDeleteServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteServiceError>>>;
52
53
  declare type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;
53
54
  declare const useAdminDeleteServiceError: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
54
55
  mutation?: UseMutationOptions<void, TError, {
@@ -66,7 +67,7 @@ You will need **admin** rights to use this endpoint
66
67
  * @summary Prepares a user account in the Data Manager service
67
68
  */
68
69
  declare const adminPutUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<UserAccountDetail>;
69
- declare type AdminPutUserMutationResult = NonNullable<AsyncReturnType<typeof adminPutUser>>;
70
+ declare type AdminPutUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPutUser>>>;
70
71
  declare type AdminPutUserMutationError = ErrorType<void | DmError>;
71
72
  declare const useAdminPutUser: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
72
73
  mutation?: UseMutationOptions<UserAccountDetail, TError, {
@@ -84,7 +85,7 @@ You will need **admin** rights to use this endpoint
84
85
  * @summary Deletes a user account
85
86
  */
86
87
  declare const adminDeleteUser: (userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
87
- declare type AdminDeleteUserMutationResult = NonNullable<AsyncReturnType<typeof adminDeleteUser>>;
88
+ declare type AdminDeleteUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteUser>>>;
88
89
  declare type AdminDeleteUserMutationError = ErrorType<DmError>;
89
90
  declare const useAdminDeleteUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
90
91
  mutation?: UseMutationOptions<void, TError, {
@@ -102,7 +103,7 @@ You will need **admin** rights to use this endpoint
102
103
  * @summary Patch a given user
103
104
  */
104
105
  declare const adminPatchUser: (userId: string, userPatchBodyBody: UserPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
105
- declare type AdminPatchUserMutationResult = NonNullable<AsyncReturnType<typeof adminPatchUser>>;
106
+ declare type AdminPatchUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchUser>>>;
106
107
  declare type AdminPatchUserMutationBody = UserPatchBodyBody;
107
108
  declare type AdminPatchUserMutationError = ErrorType<DmError>;
108
109
  declare const useAdminPatchUser: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
@@ -125,7 +126,7 @@ You will need **admin** rights to use this endpoint
125
126
  * @summary Adds a manifest and triggers the download of Job Definitions
126
127
  */
127
128
  declare const adminJobManifestPut: (jobManifestPutBodyBody: JobManifestPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
128
- declare type AdminJobManifestPutMutationResult = NonNullable<AsyncReturnType<typeof adminJobManifestPut>>;
129
+ declare type AdminJobManifestPutMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestPut>>>;
129
130
  declare type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;
130
131
  declare type AdminJobManifestPutMutationError = ErrorType<void | DmError>;
131
132
  declare const useAdminJobManifestPut: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
@@ -144,11 +145,11 @@ You will need **admin** rights to use this endpoint
144
145
  * @summary Trigger a download of known Job Definitions using the Manifest table
145
146
  */
146
147
  declare const adminJobManifestLoad: (options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
147
- declare type AdminJobManifestLoadMutationResult = NonNullable<AsyncReturnType<typeof adminJobManifestLoad>>;
148
+ declare type AdminJobManifestLoadMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestLoad>>>;
148
149
  declare type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;
149
150
  declare const useAdminJobManifestLoad: <TError = ErrorType<void | DmError>, TVariables = void, TContext = unknown>(options?: {
150
151
  mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, TVariables, TContext> | undefined;
151
152
  request?: SecondParameter<typeof customInstance>;
152
153
  } | undefined) => react_query.UseMutationResult<AdminJobManifestLoadPutResponse, TError, TVariables, TContext>;
153
154
 
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 };
155
+ export { AdminDeleteServiceErrorMutationError, AdminDeleteServiceErrorMutationResult, AdminDeleteUserMutationError, AdminDeleteUserMutationResult, AdminGetServiceErrorsQueryError, AdminGetServiceErrorsQueryResult, AdminJobManifestLoadMutationError, AdminJobManifestLoadMutationResult, AdminJobManifestPutMutationBody, AdminJobManifestPutMutationError, AdminJobManifestPutMutationResult, AdminPatchServiceErrorMutationError, AdminPatchServiceErrorMutationResult, AdminPatchUserMutationBody, AdminPatchUserMutationError, AdminPatchUserMutationResult, AdminPutUserMutationError, AdminPutUserMutationResult, Awaited, AwaitedInput, adminDeleteServiceError, adminDeleteUser, adminGetServiceErrors, adminJobManifestLoad, adminJobManifestPut, adminPatchServiceError, adminPatchUser, adminPutUser, getAdminGetServiceErrorsQueryKey, useAdminDeleteServiceError, useAdminDeleteUser, useAdminGetServiceErrors, useAdminJobManifestLoad, useAdminJobManifestPut, useAdminPatchServiceError, useAdminPatchUser, useAdminPutUser };
package/admin/admin.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  useQuery,
9
9
  useMutation
10
10
  } from "react-query";
11
- var adminGetServiceErrors = (params, options) => {
12
- return customInstance({ url: `/admin/service-error`, method: "get", params }, options);
11
+ var adminGetServiceErrors = (params, options, signal) => {
12
+ return customInstance({ url: `/admin/service-error`, method: "get", signal, params }, options);
13
13
  };
14
14
  var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
15
15
  var useAdminGetServiceErrors = (params, options) => {
16
- const { query: queryOptions, request: requestOptions } = options || {};
16
+ const { query: queryOptions, request: requestOptions } = options ?? {};
17
17
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getAdminGetServiceErrorsQueryKey(params);
18
- const queryFn = () => adminGetServiceErrors(params, requestOptions);
18
+ const queryFn = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
19
19
  const query = useQuery(queryKey, queryFn, queryOptions);
20
20
  return __spreadValues({
21
21
  queryKey
@@ -25,9 +25,9 @@ var adminPatchServiceError = (errorId, options) => {
25
25
  return customInstance({ url: `/admin/service-error/${errorId}`, method: "patch" }, options);
26
26
  };
27
27
  var useAdminPatchServiceError = (options) => {
28
- const { mutation: mutationOptions, request: requestOptions } = options || {};
28
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
29
29
  const mutationFn = (props) => {
30
- const { errorId } = props || {};
30
+ const { errorId } = props ?? {};
31
31
  return adminPatchServiceError(errorId, requestOptions);
32
32
  };
33
33
  return useMutation(mutationFn, mutationOptions);
@@ -36,9 +36,9 @@ var adminDeleteServiceError = (errorId, options) => {
36
36
  return customInstance({ url: `/admin/service-error/${errorId}`, method: "delete" }, options);
37
37
  };
38
38
  var useAdminDeleteServiceError = (options) => {
39
- const { mutation: mutationOptions, request: requestOptions } = options || {};
39
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
40
40
  const mutationFn = (props) => {
41
- const { errorId } = props || {};
41
+ const { errorId } = props ?? {};
42
42
  return adminDeleteServiceError(errorId, requestOptions);
43
43
  };
44
44
  return useMutation(mutationFn, mutationOptions);
@@ -47,9 +47,9 @@ var adminPutUser = (userId, options) => {
47
47
  return customInstance({ url: `/admin/user/${userId}`, method: "put" }, options);
48
48
  };
49
49
  var useAdminPutUser = (options) => {
50
- const { mutation: mutationOptions, request: requestOptions } = options || {};
50
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
51
51
  const mutationFn = (props) => {
52
- const { userId } = props || {};
52
+ const { userId } = props ?? {};
53
53
  return adminPutUser(userId, requestOptions);
54
54
  };
55
55
  return useMutation(mutationFn, mutationOptions);
@@ -58,9 +58,9 @@ var adminDeleteUser = (userId, options) => {
58
58
  return customInstance({ url: `/admin/user/${userId}`, method: "delete" }, options);
59
59
  };
60
60
  var useAdminDeleteUser = (options) => {
61
- const { mutation: mutationOptions, request: requestOptions } = options || {};
61
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
62
62
  const mutationFn = (props) => {
63
- const { userId } = props || {};
63
+ const { userId } = props ?? {};
64
64
  return adminDeleteUser(userId, requestOptions);
65
65
  };
66
66
  return useMutation(mutationFn, mutationOptions);
@@ -78,9 +78,9 @@ var adminPatchUser = (userId, userPatchBodyBody, options) => {
78
78
  }, options);
79
79
  };
80
80
  var useAdminPatchUser = (options) => {
81
- const { mutation: mutationOptions, request: requestOptions } = options || {};
81
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
82
82
  const mutationFn = (props) => {
83
- const { userId, data } = props || {};
83
+ const { userId, data } = props ?? {};
84
84
  return adminPatchUser(userId, data, requestOptions);
85
85
  };
86
86
  return useMutation(mutationFn, mutationOptions);
@@ -102,9 +102,9 @@ var adminJobManifestPut = (jobManifestPutBodyBody, options) => {
102
102
  }, options);
103
103
  };
104
104
  var useAdminJobManifestPut = (options) => {
105
- const { mutation: mutationOptions, request: requestOptions } = options || {};
105
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
106
106
  const mutationFn = (props) => {
107
- const { data } = props || {};
107
+ const { data } = props ?? {};
108
108
  return adminJobManifestPut(data, requestOptions);
109
109
  };
110
110
  return useMutation(mutationFn, mutationOptions);
@@ -113,7 +113,7 @@ var adminJobManifestLoad = (options) => {
113
113
  return customInstance({ url: `/admin/job-manifest/load`, method: "put" }, options);
114
114
  };
115
115
  var useAdminJobManifestLoad = (options) => {
116
- const { mutation: mutationOptions, request: requestOptions } = options || {};
116
+ const { mutation: mutationOptions, request: requestOptions } = options ?? {};
117
117
  const mutationFn = () => {
118
118
  return adminJobManifestLoad(requestOptions);
119
119
  };