@squonk/data-manager-client 0.6.22-rc.1 → 0.6.26-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/admin.cjs +14 -0
- package/admin/admin.cjs.map +2 -2
- package/admin/admin.d.ts +14 -2
- package/admin/admin.js +12 -0
- package/admin/admin.js.map +2 -2
- package/application/application.d.ts +1 -1
- package/{custom-instance-1e09a452.d.ts → custom-instance-76250666.d.ts} +15 -14
- package/dataset/dataset.d.ts +1 -1
- package/file/file.d.ts +1 -1
- package/index.cjs.map +2 -2
- package/index.d.ts +1 -1
- package/index.js.map +2 -2
- package/instance/instance.d.ts +1 -1
- package/job/job.cjs +2 -22
- package/job/job.cjs.map +2 -2
- package/job/job.d.ts +14 -22
- package/job/job.js +2 -21
- package/job/job.js.map +2 -2
- package/package.json +1 -1
- package/project/project.d.ts +1 -1
- package/src/admin/admin.ts +46 -0
- package/src/data-manager-api.schemas.ts +15 -15
- package/src/job/job.ts +0 -63
- package/task/task.d.ts +1 -1
- package/type/type.d.ts +1 -1
- package/user/user.d.ts +1 -1
package/admin/admin.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(exports, {
|
|
|
44
44
|
adminDeleteServiceError: () => adminDeleteServiceError,
|
|
45
45
|
adminDeleteUser: () => adminDeleteUser,
|
|
46
46
|
adminGetServiceErrors: () => adminGetServiceErrors,
|
|
47
|
+
adminJobManifestLoad: () => adminJobManifestLoad,
|
|
47
48
|
adminPatchServiceError: () => adminPatchServiceError,
|
|
48
49
|
adminPatchUser: () => adminPatchUser,
|
|
49
50
|
adminPutUser: () => adminPutUser,
|
|
@@ -51,6 +52,7 @@ __export(exports, {
|
|
|
51
52
|
useAdminDeleteServiceError: () => useAdminDeleteServiceError,
|
|
52
53
|
useAdminDeleteUser: () => useAdminDeleteUser,
|
|
53
54
|
useAdminGetServiceErrors: () => useAdminGetServiceErrors,
|
|
55
|
+
useAdminJobManifestLoad: () => useAdminJobManifestLoad,
|
|
54
56
|
useAdminPatchServiceError: () => useAdminPatchServiceError,
|
|
55
57
|
useAdminPatchUser: () => useAdminPatchUser,
|
|
56
58
|
useAdminPutUser: () => useAdminPutUser
|
|
@@ -150,11 +152,22 @@ var useAdminPatchUser = (options) => {
|
|
|
150
152
|
};
|
|
151
153
|
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
152
154
|
};
|
|
155
|
+
var adminJobManifestLoad = (options) => {
|
|
156
|
+
return customInstance({ url: `/admin/job-manifest/load`, method: "put", data: void 0 }, options);
|
|
157
|
+
};
|
|
158
|
+
var useAdminJobManifestLoad = (options) => {
|
|
159
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
160
|
+
const mutationFn = () => {
|
|
161
|
+
return adminJobManifestLoad(requestOptions);
|
|
162
|
+
};
|
|
163
|
+
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
164
|
+
};
|
|
153
165
|
// Annotate the CommonJS export names for ESM import in node:
|
|
154
166
|
0 && (module.exports = {
|
|
155
167
|
adminDeleteServiceError,
|
|
156
168
|
adminDeleteUser,
|
|
157
169
|
adminGetServiceErrors,
|
|
170
|
+
adminJobManifestLoad,
|
|
158
171
|
adminPatchServiceError,
|
|
159
172
|
adminPatchUser,
|
|
160
173
|
adminPutUser,
|
|
@@ -162,6 +175,7 @@ var useAdminPatchUser = (options) => {
|
|
|
162
175
|
useAdminDeleteServiceError,
|
|
163
176
|
useAdminDeleteUser,
|
|
164
177
|
useAdminGetServiceErrors,
|
|
178
|
+
useAdminJobManifestLoad,
|
|
165
179
|
useAdminPatchServiceError,
|
|
166
180
|
useAdminPatchUser,
|
|
167
181
|
useAdminPutUser
|
package/admin/admin.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/admin/admin.ts", "../../src/custom-instance.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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} 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", "/** 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\n// ? Need the baseUrl or does it default to ''?\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,yBASO;;;ACTP,mBAAsD;AAG/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;;;
|
|
4
|
+
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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\n// ? Need the baseUrl or does it default to ''?\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"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/admin/admin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AdminGetServiceErrorsParams,
|
|
1
|
+
import { A as AdminGetServiceErrorsParams, b5 as customInstance, aB as ServiceErrorsGetResponse, b6 as ErrorType, b1 as DmError, T as UserAccountDetail, U as UserPatchBodyBody, b0 as AdminJobManifestLoadPutResponse } from '../custom-instance-76250666';
|
|
2
2
|
import * as react_query from 'react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
|
|
4
4
|
import 'axios';
|
|
@@ -101,5 +101,17 @@ declare const useAdminPatchUser: <TError = ErrorType<DmError>, TContext = unknow
|
|
|
101
101
|
userid: string;
|
|
102
102
|
data: UserPatchBodyBody;
|
|
103
103
|
}, TContext>;
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
|
|
107
|
+
You will need **admin** rights to use this endpoint
|
|
108
|
+
|
|
109
|
+
* @summary Trigger a download of known Job Definitions using the Manifest table
|
|
110
|
+
*/
|
|
111
|
+
declare const adminJobManifestLoad: (options?: SecondParameter<typeof customInstance>) => Promise<AdminJobManifestLoadPutResponse>;
|
|
112
|
+
declare const useAdminJobManifestLoad: <TError = ErrorType<void | DmError>, TVariables = void, TContext = unknown>(options?: {
|
|
113
|
+
mutation?: UseMutationOptions<AdminJobManifestLoadPutResponse, TError, TVariables, TContext> | undefined;
|
|
114
|
+
request?: SecondParameter<typeof customInstance>;
|
|
115
|
+
} | undefined) => react_query.UseMutationResult<AdminJobManifestLoadPutResponse, TError, TVariables, TContext>;
|
|
104
116
|
|
|
105
|
-
export { adminDeleteServiceError, adminDeleteUser, adminGetServiceErrors, adminPatchServiceError, adminPatchUser, adminPutUser, getAdminGetServiceErrorsQueryKey, useAdminDeleteServiceError, useAdminDeleteUser, useAdminGetServiceErrors, useAdminPatchServiceError, useAdminPatchUser, useAdminPutUser };
|
|
117
|
+
export { adminDeleteServiceError, adminDeleteUser, adminGetServiceErrors, adminJobManifestLoad, adminPatchServiceError, adminPatchUser, adminPutUser, getAdminGetServiceErrorsQueryKey, useAdminDeleteServiceError, useAdminDeleteUser, useAdminGetServiceErrors, useAdminJobManifestLoad, useAdminPatchServiceError, useAdminPatchUser, useAdminPutUser };
|
package/admin/admin.js
CHANGED
|
@@ -117,10 +117,21 @@ var useAdminPatchUser = (options) => {
|
|
|
117
117
|
};
|
|
118
118
|
return useMutation(mutationFn, mutationOptions);
|
|
119
119
|
};
|
|
120
|
+
var adminJobManifestLoad = (options) => {
|
|
121
|
+
return customInstance({ url: `/admin/job-manifest/load`, method: "put", data: void 0 }, options);
|
|
122
|
+
};
|
|
123
|
+
var useAdminJobManifestLoad = (options) => {
|
|
124
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
125
|
+
const mutationFn = () => {
|
|
126
|
+
return adminJobManifestLoad(requestOptions);
|
|
127
|
+
};
|
|
128
|
+
return useMutation(mutationFn, mutationOptions);
|
|
129
|
+
};
|
|
120
130
|
export {
|
|
121
131
|
adminDeleteServiceError,
|
|
122
132
|
adminDeleteUser,
|
|
123
133
|
adminGetServiceErrors,
|
|
134
|
+
adminJobManifestLoad,
|
|
124
135
|
adminPatchServiceError,
|
|
125
136
|
adminPatchUser,
|
|
126
137
|
adminPutUser,
|
|
@@ -128,6 +139,7 @@ export {
|
|
|
128
139
|
useAdminDeleteServiceError,
|
|
129
140
|
useAdminDeleteUser,
|
|
130
141
|
useAdminGetServiceErrors,
|
|
142
|
+
useAdminJobManifestLoad,
|
|
131
143
|
useAdminPatchServiceError,
|
|
132
144
|
useAdminPatchUser,
|
|
133
145
|
useAdminPutUser
|
package/admin/admin.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/admin/admin.ts", "../../src/custom-instance.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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} 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", "/** 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\n// ? Need the baseUrl or does it default to ''?\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAUA;AAAA;AAAA;AAAA;;;ACAA;AAGO,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;;;
|
|
4
|
+
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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\n// ? Need the baseUrl or does it default to ''?\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"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { b5 as customInstance, aZ as ApplicationsGetResponse, b6 as ErrorType, b1 as DmError, a_ as ApplicationGetResponse } from '../custom-instance-76250666';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -208,14 +208,6 @@ declare type ProjectPatchBodyBody = {
|
|
|
208
208
|
*/
|
|
209
209
|
name?: string;
|
|
210
210
|
};
|
|
211
|
-
declare type JobPutBodyBody = {
|
|
212
|
-
/** The URI (typically a GitHib raw URL) of the job definition
|
|
213
|
-
*/
|
|
214
|
-
url: string;
|
|
215
|
-
/** If set any existing Jobs not in the definition will be removed
|
|
216
|
-
*/
|
|
217
|
-
delete_unreferenced?: boolean;
|
|
218
|
-
};
|
|
219
211
|
declare type InstancePostBodyBody = {
|
|
220
212
|
/** A supported application. Applications instances are managed using pre-deployed Kubernetes **Operators**. The application ID is a combination of the operator _plural_ and _group_.
|
|
221
213
|
*/
|
|
@@ -1050,11 +1042,6 @@ interface ProjectPostResponse {
|
|
|
1050
1042
|
}
|
|
1051
1043
|
declare type ProjectGetResponse = ProjectDetail;
|
|
1052
1044
|
declare type ProjectDeleteResponse = TaskIdentity;
|
|
1053
|
-
interface JobPutResponse {
|
|
1054
|
-
/** The number of Jobs loaded
|
|
1055
|
-
*/
|
|
1056
|
-
count: number;
|
|
1057
|
-
}
|
|
1058
1045
|
interface JobsGetResponse {
|
|
1059
1046
|
jobs: JobSummary[];
|
|
1060
1047
|
}
|
|
@@ -1313,6 +1300,20 @@ interface ApplicationGetResponse {
|
|
|
1313
1300
|
versions: string[];
|
|
1314
1301
|
}
|
|
1315
1302
|
declare type AdminUserPutResponse = UserAccountDetail;
|
|
1303
|
+
interface AdminJobManifestLoadPutResponse {
|
|
1304
|
+
/** True if successful, false otherwise
|
|
1305
|
+
*/
|
|
1306
|
+
status: boolean;
|
|
1307
|
+
/** The number of Job Manifests inspected
|
|
1308
|
+
*/
|
|
1309
|
+
manifests_inspected: number;
|
|
1310
|
+
/** The number of Job Definitions inspected
|
|
1311
|
+
*/
|
|
1312
|
+
job_definitions_inspected: number;
|
|
1313
|
+
/** The number of Jobs inspected
|
|
1314
|
+
*/
|
|
1315
|
+
jobs_inspected: number;
|
|
1316
|
+
}
|
|
1316
1317
|
interface DmError {
|
|
1317
1318
|
/** Brief error text that can be presented to the user
|
|
1318
1319
|
*/
|
|
@@ -1334,4 +1335,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
1334
1335
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig<any> | undefined) => Promise<TReturn>;
|
|
1335
1336
|
declare type ErrorType<TError> = AxiosError<TError>;
|
|
1336
1337
|
|
|
1337
|
-
export {
|
|
1338
|
+
export { TaskState as $, AdminGetServiceErrorsParams as A, QEventLimitParameter as B, GetInstanceParams as C, DeleteUnmanagedFileParams as D, QDatasetMimeTypeParameter as E, QDoNotImpersonateParameter as F, GetUserApiLogParams as G, UserAccountPatchBodyBody as H, ProjectPostBodyBody as I, ProjectPatchBodyBody as J, InstancePostBodyBody as K, FilePostBodyBody as L, DatasetPutBodyBody as M, DatasetAnnotationsPostBodyBody as N, DatasetPostBodyBody as O, PatchInstanceParams as P, QEditorsParameter as Q, UserSummary as R, UserDetail as S, UserAccountDetail as T, UserPatchBodyBody as U, TypeSummaryFormatterOptionsType as V, TypeSummaryFormatterOptions as W, TypeSummary as X, TaskSummaryProcessingStage as Y, TaskSummary as Z, TaskStateState as _, GetUserAccountParams as a, AdminUserPutResponse as a$, TaskIdentity as a0, TaskEventLevel as a1, TaskEvent as a2, ServiceErrorSummarySeverity as a3, ServiceErrorSummary as a4, ProjectFileDetail as a5, ProjectDetail as a6, JobOrderDetail as a7, JobVariables as a8, JobSummaryImageType as a9, TaskGetResponse as aA, ServiceErrorsGetResponse as aB, ProjectsGetResponse as aC, ProjectPostResponse as aD, ProjectGetResponse as aE, ProjectDeleteResponse as aF, JobsGetResponse as aG, JobGetResponseImageType as aH, JobGetResponse as aI, InstancesGetResponse as aJ, InstanceGetResponseApplicationType as aK, InstanceGetResponse as aL, FilesGetResponse as aM, FilePostResponse as aN, InstancePostResponse as aO, InstanceDeleteResponse as aP, DatasetsGetResponse as aQ, DatasetVersionsGetResponse as aR, DatasetVersionDeleteResponse as aS, DatasetSchemaGetResponseType as aT, DatasetSchemaGetResponse as aU, DatasetMetaGetResponse as aV, DatasetDigestGetResponse as aW, DatasetPutPostResponse as aX, DatasetAnnotationsPostResponse as aY, ApplicationsGetResponse as aZ, ApplicationGetResponse as a_, JobSummary as aa, JobApplication as ab, InstanceSummaryJobImageType as ac, InstanceSummaryState as ad, InstanceSummaryApplicationType as ae, InstanceSummary as af, FileStat as ag, FilePathFile as ah, DatasetVersionSummaryLabels as ai, DatasetVersionSummaryProcessingStage as aj, DatasetVersionSummary as ak, DatasetVersionProjectFile as al, DatasetVersionDetailLabels as am, DatasetVersionDetailProcessingStage as an, DatasetVersionDetail as ao, DatasetSummary as ap, DatasetDetail as aq, ApplicationSummary as ar, ApiLogDetailMethod as as, ApiLogDetail as at, UsersGetResponse as au, UserApiLogGetResponse as av, UserAccountGetResponse as aw, TypesGetResponse as ax, TasksGetResponse as ay, TaskGetResponsePurpose as az, GetInstancesParams as b, AdminJobManifestLoadPutResponse as b0, DmError as b1, AXIOS_INSTANCE as b2, setAuthToken as b3, setBaseUrl as b4, customInstance as b5, ErrorType as b6, GetTaskParams as c, GetTasksParams as d, DeleteDatasetParams as e, GetVersionsParams as f, GetProjectFileParams as g, QOwnersParameter as h, QUsernameParameter as i, GetDatasetsParams as j, QUntilParameter as k, QProjectIdParameter as l, QLabelsParameter as m, QKeepProjectFilesParameter as n, QInstanceArchiveParameter as o, QIncludeHiddenParameter as p, QIncludeDeletedParameter as q, QIncludeAcknowlegedParameter as r, QFromParameter as s, QFileProjectIdParameter as t, QFilePathParameter as u, GetFilesParams as v, QFileParameter as w, QExcludePurposeParameter as x, QExcludeDoneParameter as y, QEventPriorOrdinalParameter as z };
|
package/dataset/dataset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as DatasetPutBodyBody, b5 as customInstance, aX as DatasetPutPostResponse, b6 as ErrorType, b1 as DmError, O as DatasetPostBodyBody, j as GetDatasetsParams, aQ as DatasetsGetResponse, f as GetVersionsParams, aq as DatasetDetail, e as DeleteDatasetParams, a0 as TaskIdentity, aW as DatasetDigestGetResponse, aV as DatasetMetaGetResponse, N as DatasetAnnotationsPostBodyBody, aY as DatasetAnnotationsPostResponse, aU as DatasetSchemaGetResponse } from '../custom-instance-76250666';
|
|
2
2
|
import * as react_query from 'react-query';
|
|
3
3
|
import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
|
|
4
4
|
import 'axios';
|
package/file/file.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_query from 'react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
|
|
3
|
-
import { v as GetFilesParams,
|
|
3
|
+
import { v as GetFilesParams, b5 as customInstance, aM as FilesGetResponse, b6 as ErrorType, b1 as DmError, L as FilePostBodyBody, aN as FilePostResponse, D as DeleteUnmanagedFileParams } from '../custom-instance-76250666';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|