@squonk/data-manager-client 0.6.28-rc.2 → 0.6.28-rc.6

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 (73) hide show
  1. package/admin/admin.cjs +40 -119
  2. package/admin/admin.cjs.map +1 -1
  3. package/admin/admin.d.ts +1 -1
  4. package/admin/admin.js +9 -46
  5. package/admin/admin.js.map +1 -1
  6. package/application/application.cjs +21 -84
  7. package/application/application.cjs.map +1 -1
  8. package/application/application.d.ts +2 -2
  9. package/application/application.js +4 -33
  10. package/application/application.js.map +1 -1
  11. package/chunk-3DXYUDZH.cjs +46 -0
  12. package/chunk-3DXYUDZH.cjs.map +1 -0
  13. package/chunk-JR7F532L.js +46 -0
  14. package/chunk-JR7F532L.js.map +1 -0
  15. package/{custom-instance-bcf5c383.d.ts → custom-instance-3c2397cc.d.ts} +1 -1
  16. package/dataset/dataset.cjs +80 -178
  17. package/dataset/dataset.cjs.map +1 -1
  18. package/dataset/dataset.d.ts +1 -1
  19. package/dataset/dataset.js +7 -46
  20. package/dataset/dataset.js.map +1 -1
  21. package/file/file.cjs +35 -103
  22. package/file/file.cjs.map +1 -1
  23. package/file/file.d.ts +1 -1
  24. package/file/file.js +6 -35
  25. package/file/file.js.map +1 -1
  26. package/index.cjs +27 -110
  27. package/index.cjs.map +1 -1
  28. package/index.d.ts +1 -1
  29. package/index.js +6 -37
  30. package/index.js.map +1 -1
  31. package/instance/instance.cjs +35 -108
  32. package/instance/instance.cjs.map +1 -1
  33. package/instance/instance.d.ts +1 -1
  34. package/instance/instance.js +6 -40
  35. package/instance/instance.js.map +1 -1
  36. package/job/job.cjs +21 -84
  37. package/job/job.cjs.map +1 -1
  38. package/job/job.d.ts +2 -2
  39. package/job/job.js +4 -33
  40. package/job/job.js.map +1 -1
  41. package/package.json +5 -5
  42. package/project/project.cjs +55 -140
  43. package/project/project.cjs.map +1 -1
  44. package/project/project.d.ts +1 -1
  45. package/project/project.js +7 -44
  46. package/project/project.js.map +1 -1
  47. package/src/admin/admin.ts +8 -14
  48. package/src/application/application.ts +3 -1
  49. package/src/custom-instance.ts +1 -1
  50. package/src/data-manager-api.schemas.ts +1 -1
  51. package/src/dataset/dataset.ts +5 -13
  52. package/src/file/file.ts +5 -3
  53. package/src/instance/instance.ts +5 -8
  54. package/src/job/job.ts +3 -1
  55. package/src/project/project.ts +6 -12
  56. package/src/task/task.ts +4 -2
  57. package/src/type/type.ts +3 -1
  58. package/src/user/user.ts +3 -1
  59. package/task/task.cjs +26 -90
  60. package/task/task.cjs.map +1 -1
  61. package/task/task.d.ts +1 -1
  62. package/task/task.js +5 -34
  63. package/task/task.js.map +1 -1
  64. package/type/type.cjs +14 -74
  65. package/type/type.cjs.map +1 -1
  66. package/type/type.d.ts +2 -2
  67. package/type/type.js +4 -33
  68. package/type/type.js.map +1 -1
  69. package/user/user.cjs +34 -101
  70. package/user/user.cjs.map +1 -1
  71. package/user/user.d.ts +1 -1
  72. package/user/user.js +4 -33
  73. package/user/user.js.map +1 -1
package/admin/admin.cjs CHANGED
@@ -1,101 +1,28 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
- var __export = (target, all) => {
26
- for (var name in all)
27
- __defProp(target, name, { get: all[name], enumerable: true });
28
- };
29
- var __reExport = (target, module2, copyDefault, desc) => {
30
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
31
- for (let key of __getOwnPropNames(module2))
32
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
33
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
34
- }
35
- return target;
36
- };
37
- var __toESM = (module2, isNodeMode) => {
38
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
39
- };
40
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
- return (module2, temp) => {
42
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
- };
44
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
45
2
 
46
- // src/admin/admin.ts
47
- var admin_exports = {};
48
- __export(admin_exports, {
49
- adminDeleteServiceError: () => adminDeleteServiceError,
50
- adminDeleteUser: () => adminDeleteUser,
51
- adminGetServiceErrors: () => adminGetServiceErrors,
52
- adminJobManifestLoad: () => adminJobManifestLoad,
53
- adminPatchServiceError: () => adminPatchServiceError,
54
- adminPatchUser: () => adminPatchUser,
55
- adminPutUser: () => adminPutUser,
56
- getAdminGetServiceErrorsQueryKey: () => getAdminGetServiceErrorsQueryKey,
57
- useAdminDeleteServiceError: () => useAdminDeleteServiceError,
58
- useAdminDeleteUser: () => useAdminDeleteUser,
59
- useAdminGetServiceErrors: () => useAdminGetServiceErrors,
60
- useAdminJobManifestLoad: () => useAdminJobManifestLoad,
61
- useAdminPatchServiceError: () => useAdminPatchServiceError,
62
- useAdminPatchUser: () => useAdminPatchUser,
63
- useAdminPutUser: () => useAdminPutUser
64
- });
65
- var import_react_query = require("react-query");
66
-
67
- // src/custom-instance.ts
68
- var import_axios = __toESM(require("axios"), 1);
69
- var AXIOS_INSTANCE = import_axios.default.create({ baseURL: "" });
70
- var customInstance = (config, options) => {
71
- const source = import_axios.default.CancelToken.source();
72
- const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
73
- promise.cancel = () => {
74
- source.cancel("Query was cancelled by React Query");
75
- };
76
- return promise;
77
- };
3
+
4
+ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
78
5
 
79
6
  // src/admin/admin.ts
7
+
8
+
9
+
10
+ var _reactquery = require('react-query');
80
11
  var adminGetServiceErrors = (params, options) => {
81
- return customInstance({ url: `/admin/service-error`, method: "get", params }, options);
12
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/service-error`, method: "get", params }, options);
82
13
  };
83
14
  var getAdminGetServiceErrorsQueryKey = (params) => [`/admin/service-error`, ...params ? [params] : []];
84
15
  var useAdminGetServiceErrors = (params, options) => {
85
16
  const { query: queryOptions, request: requestOptions } = options || {};
86
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getAdminGetServiceErrorsQueryKey(params);
17
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getAdminGetServiceErrorsQueryKey(params)));
87
18
  const queryFn = () => adminGetServiceErrors(params, requestOptions);
88
- const query = (0, import_react_query.useQuery)(queryKey, queryFn, queryOptions);
89
- return __spreadValues({
19
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
20
+ return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
90
21
  queryKey
91
22
  }, query);
92
23
  };
93
24
  var adminPatchServiceError = (errorid, options) => {
94
- return customInstance({
95
- url: `/admin/service-error/${errorid}`,
96
- method: "patch",
97
- data: void 0
98
- }, options);
25
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/service-error/${errorid}`, method: "patch" }, options);
99
26
  };
100
27
  var useAdminPatchServiceError = (options) => {
101
28
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -103,14 +30,10 @@ var useAdminPatchServiceError = (options) => {
103
30
  const { errorid } = props || {};
104
31
  return adminPatchServiceError(errorid, requestOptions);
105
32
  };
106
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
33
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
107
34
  };
108
35
  var adminDeleteServiceError = (errorid, options) => {
109
- return customInstance({
110
- url: `/admin/service-error/${errorid}`,
111
- method: "delete",
112
- data: void 0
113
- }, options);
36
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/service-error/${errorid}`, method: "delete" }, options);
114
37
  };
115
38
  var useAdminDeleteServiceError = (options) => {
116
39
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -118,10 +41,10 @@ var useAdminDeleteServiceError = (options) => {
118
41
  const { errorid } = props || {};
119
42
  return adminDeleteServiceError(errorid, requestOptions);
120
43
  };
121
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
44
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
122
45
  };
123
46
  var adminPutUser = (userid, options) => {
124
- return customInstance({ url: `/admin/user/${userid}`, method: "put", data: void 0 }, options);
47
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/user/${userid}`, method: "put" }, options);
125
48
  };
126
49
  var useAdminPutUser = (options) => {
127
50
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -129,10 +52,10 @@ var useAdminPutUser = (options) => {
129
52
  const { userid } = props || {};
130
53
  return adminPutUser(userid, requestOptions);
131
54
  };
132
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
55
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
133
56
  };
134
57
  var adminDeleteUser = (userid, options) => {
135
- return customInstance({ url: `/admin/user/${userid}`, method: "delete", data: void 0 }, options);
58
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/user/${userid}`, method: "delete" }, options);
136
59
  };
137
60
  var useAdminDeleteUser = (options) => {
138
61
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -140,14 +63,14 @@ var useAdminDeleteUser = (options) => {
140
63
  const { userid } = props || {};
141
64
  return adminDeleteUser(userid, requestOptions);
142
65
  };
143
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
66
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
144
67
  };
145
68
  var adminPatchUser = (userid, userPatchBodyBody, options) => {
146
69
  const formData = new FormData();
147
70
  if (userPatchBodyBody.suspend_message !== void 0) {
148
71
  formData.append("suspend_message", userPatchBodyBody.suspend_message);
149
72
  }
150
- return customInstance({ url: `/admin/user/${userid}`, method: "patch", data: formData }, options);
73
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/user/${userid}`, method: "patch", data: formData }, options);
151
74
  };
152
75
  var useAdminPatchUser = (options) => {
153
76
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -155,35 +78,33 @@ var useAdminPatchUser = (options) => {
155
78
  const { userid, data } = props || {};
156
79
  return adminPatchUser(userid, data, requestOptions);
157
80
  };
158
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
81
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
159
82
  };
160
83
  var adminJobManifestLoad = (options) => {
161
- return customInstance({ url: `/admin/job-manifest/load`, method: "put", data: void 0 }, options);
84
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/admin/job-manifest/load`, method: "put" }, options);
162
85
  };
163
86
  var useAdminJobManifestLoad = (options) => {
164
87
  const { mutation: mutationOptions, request: requestOptions } = options || {};
165
88
  const mutationFn = () => {
166
89
  return adminJobManifestLoad(requestOptions);
167
90
  };
168
- return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
91
+ return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
169
92
  };
170
- module.exports = __toCommonJS(admin_exports);
171
- // Annotate the CommonJS export names for ESM import in node:
172
- 0 && (module.exports = {
173
- adminDeleteServiceError,
174
- adminDeleteUser,
175
- adminGetServiceErrors,
176
- adminJobManifestLoad,
177
- adminPatchServiceError,
178
- adminPatchUser,
179
- adminPutUser,
180
- getAdminGetServiceErrorsQueryKey,
181
- useAdminDeleteServiceError,
182
- useAdminDeleteUser,
183
- useAdminGetServiceErrors,
184
- useAdminJobManifestLoad,
185
- useAdminPatchServiceError,
186
- useAdminPatchUser,
187
- useAdminPutUser
188
- });
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ exports.adminDeleteServiceError = adminDeleteServiceError; exports.adminDeleteUser = adminDeleteUser; exports.adminGetServiceErrors = adminGetServiceErrors; exports.adminJobManifestLoad = adminJobManifestLoad; exports.adminPatchServiceError = adminPatchServiceError; exports.adminPatchUser = adminPatchUser; exports.adminPutUser = adminPutUser; exports.getAdminGetServiceErrorsQueryKey = getAdminGetServiceErrorsQueryKey; exports.useAdminDeleteServiceError = useAdminDeleteServiceError; exports.useAdminDeleteUser = useAdminDeleteUser; exports.useAdminGetServiceErrors = useAdminGetServiceErrors; exports.useAdminJobManifestLoad = useAdminJobManifestLoad; exports.useAdminPatchServiceError = useAdminPatchServiceError; exports.useAdminPatchUser = useAdminPatchUser; exports.useAdminPutUser = useAdminPutUser;
189
110
  //# sourceMappingURL=admin.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/admin.ts","../../src/custom-instance.ts"],"sourcesContent":["/**\n * Generated by orval v6.4.2 🍺\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.6\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} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\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 {\n url: `/admin/service-error/${errorid}`,\n method: \"patch\",\n data: undefined,\n },\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 {\n url: `/admin/service-error/${errorid}`,\n method: \"delete\",\n data: undefined,\n },\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\", data: undefined },\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\", data: undefined },\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 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\", data: undefined },\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","/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create({ baseURL: '' });\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,yBASO;;;ACTP,mBAAsD;AAE/C,IAAM,iBAAiB,qBAAM,OAAO,EAAE,SAAS;AAmB/C,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,qBAAM,YAAY;AAEjC,QAAM,UAAU,eAAe,gDAAK,SAAW,UAAhB,EAAyB,aAAa,OAAO,UAAS,KACnF,CAAC,EAAE,WAAW;AAKhB,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO;AAAA;AAGhB,SAAO;AAAA;;;ADGF,IAAM,wBAAwB,CACnC,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,UAC9C;AAAA;AAIG,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,UAAU;AAE/C,IAAM,2BAA2B,CAItC,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WACJ,8CAAc,aAAY,iCAAiC;AAE7D,QAAM,UAEF,MAAM,sBAAsB,QAAQ;AAExC,QAAM,QAAQ,iCAIZ,UAAU,SAAS;AAErB,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAWA,IAAM,yBAAyB,CACpC,SACA,YACG;AACH,SAAO,eAC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AAO,YAKL,YAAY;AAAA;AAST,IAAM,iBAAiB,CAC5B,QACA,mBACA,YACG;AACH,QAAM,WAAW,IAAI;AACrB,MAAI,kBAAkB,oBAAoB,QAAW;AACnD,aAAS,OAAO,mBAAmB,kBAAkB;AAAA;AAGvD,SAAO,eACL,EAAE,KAAK,eAAe,UAAU,QAAQ,SAAS,MAAM,YACvD;AAAA;AAIG,IAAM,oBAAoB,CAG/B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,QAAQ,SAAS,SAAS;AAElC,WAAO,eAAe,QAAQ,MAAM;AAAA;AAGtC,SAAO,YAKL,YAAY;AAAA;AAST,IAAM,uBAAuB,CAClC,YACG;AACH,SAAO,eACL,EAAE,KAAK,4BAA4B,QAAQ,SAC3C;AAAA;AAIG,IAAM,0BAA0B,CAIrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,MAAM;AACR,WAAO,qBAAqB;AAAA;AAG9B,SAAO,YAKL,YAAY;AAAA","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.6\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} 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 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"]}
package/admin/admin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AdminGetServiceErrorsParams, b6 as customInstance, aC as ServiceErrorsGetResponse, b7 as ErrorType, b2 as DmError, V as UserAccountDetail, U as UserPatchBodyBody, b1 as AdminJobManifestLoadPutResponse } from '../custom-instance-bcf5c383';
1
+ import { A as AdminGetServiceErrorsParams, b6 as customInstance, aC as ServiceErrorsGetResponse, b7 as ErrorType, b2 as DmError, V as UserAccountDetail, U as UserPatchBodyBody, b1 as AdminJobManifestLoadPutResponse } from '../custom-instance-3c2397cc';
2
2
  import * as react_query from 'react-query';
3
3
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
4
4
  import 'axios';
package/admin/admin.js CHANGED
@@ -1,42 +1,13 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
+ import {
2
+ __spreadValues,
3
+ customInstance
4
+ } from "../chunk-JR7F532L.js";
20
5
 
21
6
  // src/admin/admin.ts
22
7
  import {
23
8
  useQuery,
24
9
  useMutation
25
10
  } from "react-query";
26
-
27
- // src/custom-instance.ts
28
- import Axios from "axios";
29
- var AXIOS_INSTANCE = Axios.create({ baseURL: "" });
30
- var customInstance = (config, options) => {
31
- const source = Axios.CancelToken.source();
32
- const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
33
- promise.cancel = () => {
34
- source.cancel("Query was cancelled by React Query");
35
- };
36
- return promise;
37
- };
38
-
39
- // src/admin/admin.ts
40
11
  var adminGetServiceErrors = (params, options) => {
41
12
  return customInstance({ url: `/admin/service-error`, method: "get", params }, options);
42
13
  };
@@ -51,11 +22,7 @@ var useAdminGetServiceErrors = (params, options) => {
51
22
  }, query);
52
23
  };
53
24
  var adminPatchServiceError = (errorid, options) => {
54
- return customInstance({
55
- url: `/admin/service-error/${errorid}`,
56
- method: "patch",
57
- data: void 0
58
- }, options);
25
+ return customInstance({ url: `/admin/service-error/${errorid}`, method: "patch" }, options);
59
26
  };
60
27
  var useAdminPatchServiceError = (options) => {
61
28
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -66,11 +33,7 @@ var useAdminPatchServiceError = (options) => {
66
33
  return useMutation(mutationFn, mutationOptions);
67
34
  };
68
35
  var adminDeleteServiceError = (errorid, options) => {
69
- return customInstance({
70
- url: `/admin/service-error/${errorid}`,
71
- method: "delete",
72
- data: void 0
73
- }, options);
36
+ return customInstance({ url: `/admin/service-error/${errorid}`, method: "delete" }, options);
74
37
  };
75
38
  var useAdminDeleteServiceError = (options) => {
76
39
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -81,7 +44,7 @@ var useAdminDeleteServiceError = (options) => {
81
44
  return useMutation(mutationFn, mutationOptions);
82
45
  };
83
46
  var adminPutUser = (userid, options) => {
84
- return customInstance({ url: `/admin/user/${userid}`, method: "put", data: void 0 }, options);
47
+ return customInstance({ url: `/admin/user/${userid}`, method: "put" }, options);
85
48
  };
86
49
  var useAdminPutUser = (options) => {
87
50
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -92,7 +55,7 @@ var useAdminPutUser = (options) => {
92
55
  return useMutation(mutationFn, mutationOptions);
93
56
  };
94
57
  var adminDeleteUser = (userid, options) => {
95
- return customInstance({ url: `/admin/user/${userid}`, method: "delete", data: void 0 }, options);
58
+ return customInstance({ url: `/admin/user/${userid}`, method: "delete" }, options);
96
59
  };
97
60
  var useAdminDeleteUser = (options) => {
98
61
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -118,7 +81,7 @@ var useAdminPatchUser = (options) => {
118
81
  return useMutation(mutationFn, mutationOptions);
119
82
  };
120
83
  var adminJobManifestLoad = (options) => {
121
- return customInstance({ url: `/admin/job-manifest/load`, method: "put", data: void 0 }, options);
84
+ return customInstance({ url: `/admin/job-manifest/load`, method: "put" }, options);
122
85
  };
123
86
  var useAdminJobManifestLoad = (options) => {
124
87
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/admin.ts","../../src/custom-instance.ts"],"sourcesContent":["/**\n * Generated by orval v6.4.2 🍺\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.6\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} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\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 {\n url: `/admin/service-error/${errorid}`,\n method: \"patch\",\n data: undefined,\n },\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 {\n url: `/admin/service-error/${errorid}`,\n method: \"delete\",\n data: undefined,\n },\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\", data: undefined },\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\", data: undefined },\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 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\", data: undefined },\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","/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create({ baseURL: '' });\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUA;AAAA;AAAA;AAAA;;;ACAA;AAEO,IAAM,iBAAiB,MAAM,OAAO,EAAE,SAAS;AAmB/C,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY;AAEjC,QAAM,UAAU,eAAe,gDAAK,SAAW,UAAhB,EAAyB,aAAa,OAAO,UAAS,KACnF,CAAC,EAAE,WAAW;AAKhB,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO;AAAA;AAGhB,SAAO;AAAA;;;ADGF,IAAM,wBAA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in.ts"],"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.6\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} 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 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"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AA0CO,IAAM,wBAAwB,CACnC,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,QAAQ,OAAO,UAC9C;AAAA;AAIG,IAAM,mCAAmC,CAC9C,WACG,CAAC,wBAAwB,GAAI,SAAS,CAAC,UAAU;AAE/C,IAAM,2BAA2B,CAItC,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WACJ,8CAAc,aAAY,iCAAiC;AAE7D,QAAM,UAEF,MAAM,sBAAsB,QAAQ;AAExC,QAAM,QAAQ,SAIZ,UAAU,SAAS;AAErB,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAWA,IAAM,yBAAyB,CACpC,SACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,wBAAwB,WAAW,QAAQ,WAClD;AAAA;AAIG,IAAM,4BAA4B,CAGvC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAG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vD;AAAA;AAIG,IAAM,oBAAoB,CAG/B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,QAAQ,SAAS,SAAS;AAElC,WAAO,eAAe,QAAQ,MAAM;AAAA;AAGtC,SAAO,YAKL,YAAY;AAAA;AAST,IAAM,uBAAuB,CAClC,YACG;AACH,SAAO,eACL,EAAE,KAAK,4BAA4B,QAAQ,SAC3C;AAAA;AAIG,IAAM,0BAA0B,CAIrC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,MAAM;AACR,WAAO,qBAAqB;AAAA;AAG9B,SAAO,YAKL,YAAY;AAAA;","names":[]}
@@ -1,109 +1,46 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
- var __export = (target, all) => {
26
- for (var name in all)
27
- __defProp(target, name, { get: all[name], enumerable: true });
28
- };
29
- var __reExport = (target, module2, copyDefault, desc) => {
30
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
31
- for (let key of __getOwnPropNames(module2))
32
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
33
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
34
- }
35
- return target;
36
- };
37
- var __toESM = (module2, isNodeMode) => {
38
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
39
- };
40
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
- return (module2, temp) => {
42
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
- };
44
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
45
2
 
46
- // src/application/application.ts
47
- var application_exports = {};
48
- __export(application_exports, {
49
- getApplication: () => getApplication,
50
- getApplications: () => getApplications,
51
- getGetApplicationQueryKey: () => getGetApplicationQueryKey,
52
- getGetApplicationsQueryKey: () => getGetApplicationsQueryKey,
53
- useGetApplication: () => useGetApplication,
54
- useGetApplications: () => useGetApplications
55
- });
56
- var import_react_query = require("react-query");
57
3
 
58
- // src/custom-instance.ts
59
- var import_axios = __toESM(require("axios"), 1);
60
- var AXIOS_INSTANCE = import_axios.default.create({ baseURL: "" });
61
- var customInstance = (config, options) => {
62
- const source = import_axios.default.CancelToken.source();
63
- const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
64
- promise.cancel = () => {
65
- source.cancel("Query was cancelled by React Query");
66
- };
67
- return promise;
68
- };
4
+ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
69
5
 
70
6
  // src/application/application.ts
7
+
8
+
9
+ var _reactquery = require('react-query');
71
10
  var getApplications = (options) => {
72
- return customInstance({ url: `/application`, method: "get" }, options);
11
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/application`, method: "get" }, options);
73
12
  };
74
13
  var getGetApplicationsQueryKey = () => [`/application`];
75
14
  var useGetApplications = (options) => {
76
15
  const { query: queryOptions, request: requestOptions } = options || {};
77
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationsQueryKey();
16
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetApplicationsQueryKey()));
78
17
  const queryFn = () => getApplications(requestOptions);
79
- const query = (0, import_react_query.useQuery)(queryKey, queryFn, queryOptions);
80
- return __spreadValues({
18
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
19
+ return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
81
20
  queryKey
82
21
  }, query);
83
22
  };
84
23
  var getApplication = (applicationid, options) => {
85
- return customInstance({ url: `/application/${applicationid}`, method: "get" }, options);
24
+ return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/application/${applicationid}`, method: "get" }, options);
86
25
  };
87
26
  var getGetApplicationQueryKey = (applicationid) => [
88
27
  `/application/${applicationid}`
89
28
  ];
90
29
  var useGetApplication = (applicationid, options) => {
91
30
  const { query: queryOptions, request: requestOptions } = options || {};
92
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationQueryKey(applicationid);
31
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetApplicationQueryKey(applicationid)));
93
32
  const queryFn = () => getApplication(applicationid, requestOptions);
94
- const query = (0, import_react_query.useQuery)(queryKey, queryFn, __spreadValues({ enabled: !!applicationid }, queryOptions));
95
- return __spreadValues({
33
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunk3DXYUDZHcjs.__spreadValues.call(void 0, { enabled: !!applicationid }, queryOptions));
34
+ return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
96
35
  queryKey
97
36
  }, query);
98
37
  };
99
- module.exports = __toCommonJS(application_exports);
100
- // Annotate the CommonJS export names for ESM import in node:
101
- 0 && (module.exports = {
102
- getApplication,
103
- getApplications,
104
- getGetApplicationQueryKey,
105
- getGetApplicationsQueryKey,
106
- useGetApplication,
107
- useGetApplications
108
- });
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ exports.getApplication = getApplication; exports.getApplications = getApplications; exports.getGetApplicationQueryKey = getGetApplicationQueryKey; exports.getGetApplicationsQueryKey = getGetApplicationsQueryKey; exports.useGetApplication = useGetApplication; exports.useGetApplications = useGetApplications;
109
46
  //# sourceMappingURL=application.cjs.map