@squonk/data-manager-client 1.2.8 → 1.2.9
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/README.md +1 -1
- package/accounting/accounting.cjs +51 -8
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +61 -10
- package/accounting/accounting.d.ts +61 -10
- package/accounting/accounting.js +49 -6
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -24
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +75 -24
- package/admin/admin.d.ts +75 -24
- package/admin/admin.js +56 -13
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +35 -6
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +42 -8
- package/application/application.d.ts +42 -8
- package/application/application.js +34 -5
- package/application/application.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/configuration/configuration.cjs +19 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +23 -6
- package/configuration/configuration.d.ts +23 -6
- package/configuration/configuration.js +19 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +93 -22
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +105 -20
- package/dataset/dataset.d.ts +105 -20
- package/dataset/dataset.js +83 -12
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +71 -14
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +83 -15
- package/exchange-rate/exchange-rate.d.ts +83 -15
- package/exchange-rate/exchange-rate.js +65 -8
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +45 -16
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +48 -14
- package/file-and-path/file-and-path.d.ts +48 -14
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +9 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2033 -2
- package/index.d.ts +2033 -2
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +45 -16
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +48 -14
- package/instance/instance.d.ts +48 -14
- package/instance/instance.js +38 -9
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +51 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +61 -10
- package/job/job.d.ts +61 -10
- package/job/job.js +49 -6
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +39 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +45 -11
- package/metadata/metadata.d.ts +45 -11
- package/metadata/metadata.js +36 -7
- package/metadata/metadata.js.map +1 -1
- package/package.json +11 -11
- package/project/project.cjs +83 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +89 -21
- package/project/project.d.ts +89 -21
- package/project/project.js +71 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +136 -22
- package/src/admin/admin.ts +148 -50
- package/src/application/application.ts +93 -18
- package/src/configuration/configuration.ts +50 -14
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +59 -33
- package/src/dataset/dataset.ts +233 -45
- package/src/exchange-rate/exchange-rate.ts +185 -32
- package/src/file-and-path/file-and-path.ts +98 -33
- package/src/instance/instance.ts +98 -33
- package/src/job/job.ts +138 -22
- package/src/metadata/metadata.ts +97 -24
- package/src/project/project.ts +191 -50
- package/src/task/task.ts +96 -21
- package/src/type/type.ts +50 -14
- package/src/user/user.ts +137 -25
- package/task/task.cjs +37 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +44 -10
- package/task/task.d.ts +44 -10
- package/task/task.js +35 -6
- package/task/task.js.map +1 -1
- package/type/type.cjs +19 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +23 -6
- package/type/type.d.ts +23 -6
- package/type/type.js +19 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +53 -10
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +63 -12
- package/user/user.d.ts +63 -12
- package/user/user.js +49 -6
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-37ed2460.d.ts +0 -2014
package/project/project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/project/project.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetProjectFileParams,\n GetProjectFileWithTokenParams,\n GetProjectsParams,\n ProjectDetail,\n ProjectFilePutBodyBody,\n ProjectPatchBodyBody,\n ProjectPostBodyBody,\n ProjectPostResponse,\n ProjectsGetResponse,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary Get all Projects available to you\n */\nexport const getProjects = (\n params?: GetProjectsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectsGetResponse>(\n {url: `/project`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectsQueryKey = (params?: GetProjectsParams,) => {\n \n return [\"data-manager-api\", `/project`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectsQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectsQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>\nexport type GetProjectsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get all Projects available to you\n */\nexport const useGetProjects = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Project, assigning and returning a unique **ID**. A persistent volume is created in the cluster and assigned to your Project. It's here you can add **Datasets** as **Files** and run **Applications** and **Jobs**.\n\nTo create a Project when an **Account Server** is configured you will need a **Product**.\n\nAs the Project `owner` (creator) you are also automatically an `editor` of the Project and can add other users as **Editors** so that they can also manipulate the project. An **Editor** of a project can also delete it.\n\nThe name you give the Project is free-form text (can contain spaces etc.) but the name you use must be unique amongst all the Projects you create.\n\n * @summary Create a new Project\n */\nexport const createProject = (\n projectPostBodyBody: ProjectPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', projectPostBodyBody.name)\nif(projectPostBodyBody.private !== undefined) {\n formData.append('private', projectPostBodyBody.private.toString())\n }\nformData.append('tier_product_id', projectPostBodyBody.tier_product_id)\n\n return customInstance<ProjectPostResponse>(\n {url: `/project`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateProjectMutationOptions = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createProject>>, {data: ProjectPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createProject(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateProjectMutationResult = NonNullable<Awaited<ReturnType<typeof createProject>>>\n export type CreateProjectMutationBody = ProjectPostBodyBody\n export type CreateProjectMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Create a new Project\n */\nexport const useCreateProject = <TError = ErrorType<DmError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the details of a Project that is available to you.\n\n * @summary Get a Project\n */\nexport const getProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectDetail>(\n {url: `/project/${projectId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProjectQueryKey = (projectId: string,) => {\n \n return [\"data-manager-api\", `/project/${projectId}`] as const;\n }\n\n \nexport const getGetProjectQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>\nexport type GetProjectQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get a Project\n */\nexport const useGetProject = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectQueryOptions(projectId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update some adjustable parameters of a Project, i.e. to make it `private` or make it `public``. What can be adjusted will depend on the purchased **Product**\n\n * @summary Adjust an existing Project\n */\nexport const patchProject = (\n projectId: string,\n projectPatchBodyBody: ProjectPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(projectPatchBodyBody.private !== undefined) {\n formData.append('private', projectPatchBodyBody.private.toString())\n }\nif(projectPatchBodyBody.name !== undefined) {\n formData.append('name', projectPatchBodyBody.name)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}`, method: 'patch',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProject>>, {projectId: string;data: ProjectPatchBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return patchProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchProjectMutationResult = NonNullable<Awaited<ReturnType<typeof patchProject>>>\n export type PatchProjectMutationBody = ProjectPatchBodyBody\n export type PatchProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Adjust an existing Project\n */\nexport const usePatchProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an existing Project.\n\nYou must be an `editor` or the `owner` of the project.\n\nOnce deleted all **Files**, working directories and material in the Project will also be removed\n\n * @summary Delete a Project\n */\nexport const deleteProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<TaskIdentity>(\n {url: `/project/${projectId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProject>>, {projectId: string}> = (props) => {\n const {projectId} = props ?? {};\n\n return deleteProject(projectId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteProjectMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProject>>>\n \n export type DeleteProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project\n */\nexport const useDeleteProject = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.\n\nAn `editor` of a project is not automatically an `editor` of any datasets the project contains.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Add a Project Editor\n */\nexport const addEditorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addEditorToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToProject>>>\n \n export type AddEditorToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Editor\n */\nexport const useAddEditorToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddEditorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `editor`. The editor can be you.\n\nA project must always have one `editor` so you will not be able to delete the last editor of a project.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Delete a Project Editor\n */\nexport const removeEditorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeEditorFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromProject>>>\n \n export type RemoveEditorFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Editor\n */\nexport const useRemoveEditorFromProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a project as an `observer`. Observers can view Projects and download files but they cannot modify Project data or run **Applications** or **Jobs**.\n\nYou must be an `editor` or the `owner` of the Project to add Observers\n\n * @summary Add a Project Observer\n */\nexport const addObserverToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addObserverToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addObserverToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddObserverToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addObserverToProject>>>\n \n export type AddObserverToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Observer\n */\nexport const useAddObserverToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `observer`.\n\nYou must be an `editor` or the `owner` of the Project to remove Observers\n\n * @summary Delete a Project Observer\n */\nexport const removeObserverFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeObserverFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeObserverFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveObserverFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeObserverFromProject>>>\n \n export type RemoveObserverFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Observer\n */\nexport const useRemoveObserverFromProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nYou must be an `editor` or the `owner` of the Project if the Project is `private`\n\n * @summary Download a Project file\n */\nexport const getProjectFile = (\n projectId: string,\n params: GetProjectFileParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileQueryKey = (projectId: string,\n params: GetProjectFileParams,) => {\n \n return [\"data-manager-api\", `/project/${projectId}/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>\nexport type GetProjectFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file\n */\nexport const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Upload a file into a Project\n */\nexport const addFileToProject = (\n projectId: string,\n projectFilePutBodyBody: ProjectFilePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('file', projectFilePutBodyBody.file)\nif(projectFilePutBodyBody.as_filename !== undefined) {\n formData.append('as_filename', projectFilePutBodyBody.as_filename)\n }\nif(projectFilePutBodyBody.path !== undefined) {\n formData.append('path', projectFilePutBodyBody.path)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addFileToProject>>, {projectId: string;data: ProjectFilePutBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return addFileToProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>\n export type AddFileToProjectMutationBody = ProjectFilePutBodyBody\n export type AddFileToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddFileToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nAs there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.\n\n * @summary Download a Project file using a Token\n */\nexport const getProjectFileWithToken = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file-with-token`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileWithTokenQueryKey = (projectId: string,\n params: GetProjectFileWithTokenParams,) => {\n \n return [\"data-manager-api\", `/project/${projectId}/file-with-token`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileWithTokenQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>\nexport type GetProjectFileWithTokenQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file using a Token\n */\nexport const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAsCA,IAAM,cAAc,CACvB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MACxB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,yBAAyB,CAAC,WAAgC;AAEnE,SAAO,CAAC,oBAAoB,YAAY,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,6BAA6B,CAAsF,QAA4B,YACvJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,uBAAuB,MAAM;AAIvE,QAAM,UAAkE,CAAC,EAAE,OAAO,MAAM,YAAY,QAAQ,gBAAgB,MAAM;AAMnI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,iBAAiB,CAC7B,QAA4B,YAEmC;AAE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,YAEqB;AAE9D,QAAM,eAAe,uCAAuC,WAAU,QAAO,OAAO;AAEpF,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/project/project.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetProjectFileParams,\n GetProjectFileWithTokenParams,\n GetProjectsParams,\n ProjectDetail,\n ProjectFilePutBodyBody,\n ProjectPatchBodyBody,\n ProjectPostBodyBody,\n ProjectPostResponse,\n ProjectsGetResponse,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * @summary Get all Projects available to you\n */\nexport const getProjects = (\n params?: GetProjectsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectsGetResponse>(\n {url: `/project`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectsQueryKey = (params?: GetProjectsParams,) => {\n return [\"data-manager-api\", `/project`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectsQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectsQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>\nexport type GetProjectsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get all Projects available to you\n */\nexport const useGetProjects = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProjectsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(params?: GetProjectsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjects>>> = ({ signal }) => getProjects(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjects>>>\nexport type GetProjectsSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get all Projects available to you\n */\nexport const useGetProjectsSuspense = <TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectsSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Project, assigning and returning a unique **ID**. A persistent volume is created in the cluster and assigned to your Project. It's here you can add **Datasets** as **Files** and run **Applications** and **Jobs**.\n\nTo create a Project when an **Account Server** is configured you will need a **Product**.\n\nAs the Project `owner` (creator) you are also automatically an `editor` of the Project and can add other users as **Editors** so that they can also manipulate the project. An **Editor** of a project can also delete it.\n\nThe name you give the Project is free-form text (can contain spaces etc.) but the name you use must be unique amongst all the Projects you create.\n\n * @summary Create a new Project\n */\nexport const createProject = (\n projectPostBodyBody: ProjectPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', projectPostBodyBody.name)\nif(projectPostBodyBody.private !== undefined) {\n formData.append('private', projectPostBodyBody.private.toString())\n }\nformData.append('tier_product_id', projectPostBodyBody.tier_product_id)\n\n return customInstance<ProjectPostResponse>(\n {url: `/project`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateProjectMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createProject>>, {data: ProjectPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createProject(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateProjectMutationResult = NonNullable<Awaited<ReturnType<typeof createProject>>>\n export type CreateProjectMutationBody = ProjectPostBodyBody\n export type CreateProjectMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Create a new Project\n */\nexport const useCreateProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createProject>>, TError,{data: ProjectPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the details of a Project that is available to you.\n\n * @summary Get a Project\n */\nexport const getProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProjectDetail>(\n {url: `/project/${projectId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProjectQueryKey = (projectId: string,) => {\n return [\"data-manager-api\", `/project/${projectId}`] as const;\n }\n\n \nexport const getGetProjectQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>\nexport type GetProjectQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get a Project\n */\nexport const useGetProject = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectQueryOptions(projectId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProjectSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(projectId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectQueryKey(projectId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProject>>> = ({ signal }) => getProject(projectId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProject>>>\nexport type GetProjectSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get a Project\n */\nexport const useGetProjectSuspense = <TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectSuspenseQueryOptions(projectId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update some adjustable parameters of a Project, i.e. to make it `private` or make it `public``. What can be adjusted will depend on the purchased **Product**\n\n * @summary Adjust an existing Project\n */\nexport const patchProject = (\n projectId: string,\n projectPatchBodyBody: ProjectPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(projectPatchBodyBody.private !== undefined) {\n formData.append('private', projectPatchBodyBody.private.toString())\n }\nif(projectPatchBodyBody.name !== undefined) {\n formData.append('name', projectPatchBodyBody.name)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProject>>, {projectId: string;data: ProjectPatchBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return patchProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchProjectMutationResult = NonNullable<Awaited<ReturnType<typeof patchProject>>>\n export type PatchProjectMutationBody = ProjectPatchBodyBody\n export type PatchProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Adjust an existing Project\n */\nexport const usePatchProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an existing Project.\n\nYou must be an `editor` or the `owner` of the project.\n\nOnce deleted all **Files**, working directories and material in the Project will also be removed\n\n * @summary Delete a Project\n */\nexport const deleteProject = (\n projectId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<TaskIdentity>(\n {url: `/project/${projectId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteProjectMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProject>>, {projectId: string}> = (props) => {\n const {projectId} = props ?? {};\n\n return deleteProject(projectId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteProjectMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProject>>>\n \n export type DeleteProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project\n */\nexport const useDeleteProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProject>>, TError,{projectId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a Project as an `editor`. Editors can add and remove datasets in a project and delete the project.\n\nAn `editor` of a project is not automatically an `editor` of any datasets the project contains.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Add a Project Editor\n */\nexport const addEditorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddEditorToProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addEditorToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToProject>>>\n \n export type AddEditorToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Editor\n */\nexport const useAddEditorToProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddEditorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `editor`. The editor can be you.\n\nA project must always have one `editor` so you will not be able to delete the last editor of a project.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Delete a Project Editor\n */\nexport const removeEditorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/editor/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeEditorFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromProject>>>\n \n export type RemoveEditorFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Editor\n */\nexport const useRemoveEditorFromProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveEditorFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a project as an `observer`. Observers can view Projects and download files but they cannot modify Project data or run **Applications** or **Jobs**.\n\nYou must be an `editor` or the `owner` of the Project to add Observers\n\n * @summary Add a Project Observer\n */\nexport const addObserverToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddObserverToProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addObserverToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addObserverToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddObserverToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addObserverToProject>>>\n \n export type AddObserverToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Add a Project Observer\n */\nexport const useAddObserverToProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `observer`.\n\nYou must be an `editor` or the `owner` of the Project to remove Observers\n\n * @summary Delete a Project Observer\n */\nexport const removeObserverFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/observer/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getRemoveObserverFromProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeObserverFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeObserverFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveObserverFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeObserverFromProject>>>\n \n export type RemoveObserverFromProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Observer\n */\nexport const useRemoveObserverFromProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveObserverFromProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nYou must be an `editor` or the `owner` of the Project if the Project is `private`\n\n * @summary Download a Project file\n */\nexport const getProjectFile = (\n projectId: string,\n params: GetProjectFileParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileQueryKey = (projectId: string,\n params: GetProjectFileParams,) => {\n return [\"data-manager-api\", `/project/${projectId}/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>\nexport type GetProjectFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file\n */\nexport const useGetProjectFile = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProjectFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) => getProjectFile(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>\nexport type GetProjectFileSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file\n */\nexport const useGetProjectFileSuspense = <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileSuspenseQueryOptions(projectId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.\n\nYou must be an `editor` or the `owner` of the project\n\n * @summary Upload a file into a Project\n */\nexport const addFileToProject = (\n projectId: string,\n projectFilePutBodyBody: ProjectFilePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('file', projectFilePutBodyBody.file)\nif(projectFilePutBodyBody.as_filename !== undefined) {\n formData.append('as_filename', projectFilePutBodyBody.as_filename)\n }\nif(projectFilePutBodyBody.path !== undefined) {\n formData.append('path', projectFilePutBodyBody.path)\n }\n\n return customInstance<void>(\n {url: `/project/${projectId}/file`, method: 'PUT',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddFileToProjectMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addFileToProject>>, {projectId: string;data: ProjectFilePutBodyBody}> = (props) => {\n const {projectId,data} = props ?? {};\n\n return addFileToProject(projectId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>\n export type AddFileToProjectMutationBody = ProjectFilePutBodyBody\n export type AddFileToProjectMutationError = ErrorType<DmError>\n\n /**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddFileToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nAs there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.\n\n * @summary Download a Project file using a Token\n */\nexport const getProjectFileWithToken = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/file-with-token`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProjectFileWithTokenQueryKey = (projectId: string,\n params: GetProjectFileWithTokenParams,) => {\n return [\"data-manager-api\", `/project/${projectId}/file-with-token`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProjectFileWithTokenQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>\nexport type GetProjectFileWithTokenQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file using a Token\n */\nexport const useGetProjectFileWithToken = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileWithTokenQueryOptions(projectId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProjectFileWithTokenSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({ signal }) => getProjectFileWithToken(projectId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(projectId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>\nexport type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Project file using a Token\n */\nexport const useGetProjectFileWithTokenSuspense = <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(\n projectId: string,\n params: GetProjectFileWithTokenParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProjectFileWithTokenSuspenseQueryOptions(projectId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,cAAc,CACvB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MACxB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,yBAAyB,CAAC,WAAgC;AACnE,SAAO,CAAC,oBAAoB,YAAY,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,6BAA6B,CAAsF,QAA4B,YACvJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,uBAA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EL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mCAAmC,WAAU,MAAM;AAI7F,QAAM,UAA8E,CAAC,EAAE,OAAO,MAAM,wBAAwB,WAAU,QAAQ,gBAAgB,MAAM;AAMrK,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,6BAA6B,CACzC,WACG,QAAuC,YAEqB;AAE9D,QAAM,eAAe,uCAAuC,WAAU,QAAO,OAAO;AAEpF,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,iDAAiD,CAA2F,WACrJ,QAAuC,YACtC;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mCAAmC,WAAU,MAAM;AAI7F,QAAM,UAA8E,CAAC,EAAE,OAAO,MAAM,wBAAwB,WAAU,QAAQ,gBAAgB,MAAM;AAMrK,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAQO,IAAM,qCAAqC,CACjD,WACG,QAAuC,YAE6B;AAEtE,QAAM,eAAe,+CAA+C,WAAU,QAAO,OAAO;AAE5F,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
2
|
+
* Generated by orval v6.25.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Dataset Manager API
|
|
5
5
|
* The Dataset Manager API service.
|
|
@@ -9,13 +9,16 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
9
9
|
* OpenAPI spec version: 1.2
|
|
10
10
|
*/
|
|
11
11
|
import {
|
|
12
|
-
useQuery
|
|
12
|
+
useQuery,
|
|
13
|
+
useSuspenseQuery
|
|
13
14
|
} from '@tanstack/react-query'
|
|
14
15
|
import type {
|
|
15
16
|
QueryFunction,
|
|
16
17
|
QueryKey,
|
|
17
18
|
UseQueryOptions,
|
|
18
|
-
UseQueryResult
|
|
19
|
+
UseQueryResult,
|
|
20
|
+
UseSuspenseQueryOptions,
|
|
21
|
+
UseSuspenseQueryResult
|
|
19
22
|
} from '@tanstack/react-query'
|
|
20
23
|
import type {
|
|
21
24
|
AccountServerGetNamespaceResponse,
|
|
@@ -27,13 +30,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
27
30
|
import type { ErrorType } from '.././custom-instance';
|
|
28
31
|
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
32
|
-
config: any,
|
|
33
|
-
args: infer P,
|
|
34
|
-
) => any
|
|
35
|
-
? P
|
|
36
|
-
: never;
|
|
33
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
37
34
|
|
|
38
35
|
|
|
39
36
|
/**
|
|
@@ -48,19 +45,18 @@ export const getAccountServerNamespace = (
|
|
|
48
45
|
|
|
49
46
|
|
|
50
47
|
return customInstance<AccountServerGetNamespaceResponse>(
|
|
51
|
-
{url: `/account-server/namespace`, method: '
|
|
48
|
+
{url: `/account-server/namespace`, method: 'GET', signal
|
|
52
49
|
},
|
|
53
50
|
options);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
|
|
57
54
|
export const getGetAccountServerNamespaceQueryKey = () => {
|
|
58
|
-
|
|
59
55
|
return ["data-manager-api", `/account-server/namespace`] as const;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
|
|
63
|
-
export const getGetAccountServerNamespaceQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerNamespace>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData
|
|
59
|
+
export const getGetAccountServerNamespaceQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerNamespace>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
64
60
|
) => {
|
|
65
61
|
|
|
66
62
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -85,7 +81,7 @@ export type GetAccountServerNamespaceQueryError = ErrorType<void | DmError>
|
|
|
85
81
|
* @summary Gets the Account Server cluster namespace
|
|
86
82
|
*/
|
|
87
83
|
export const useGetAccountServerNamespace = <TData = Awaited<ReturnType<typeof getAccountServerNamespace>>, TError = ErrorType<void | DmError>>(
|
|
88
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData
|
|
84
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
89
85
|
|
|
90
86
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
91
87
|
|
|
@@ -100,6 +96,46 @@ export const useGetAccountServerNamespace = <TData = Awaited<ReturnType<typeof g
|
|
|
100
96
|
|
|
101
97
|
|
|
102
98
|
|
|
99
|
+
export const getGetAccountServerNamespaceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerNamespace>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
100
|
+
) => {
|
|
101
|
+
|
|
102
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
103
|
+
|
|
104
|
+
const queryKey = queryOptions?.queryKey ?? getGetAccountServerNamespaceQueryKey();
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAccountServerNamespace>>> = ({ signal }) => getAccountServerNamespace(requestOptions, signal);
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData> & { queryKey: QueryKey }
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type GetAccountServerNamespaceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAccountServerNamespace>>>
|
|
118
|
+
export type GetAccountServerNamespaceSuspenseQueryError = ErrorType<void | DmError>
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @summary Gets the Account Server cluster namespace
|
|
122
|
+
*/
|
|
123
|
+
export const useGetAccountServerNamespaceSuspense = <TData = Awaited<ReturnType<typeof getAccountServerNamespace>>, TError = ErrorType<void | DmError>>(
|
|
124
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerNamespace>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
125
|
+
|
|
126
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
127
|
+
|
|
128
|
+
const queryOptions = getGetAccountServerNamespaceSuspenseQueryOptions(options)
|
|
129
|
+
|
|
130
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
131
|
+
|
|
132
|
+
query.queryKey = queryOptions.queryKey ;
|
|
133
|
+
|
|
134
|
+
return query;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
103
139
|
/**
|
|
104
140
|
* Returns our Account Server Registration information
|
|
105
141
|
|
|
@@ -112,19 +148,18 @@ export const getAccountServerRegistration = (
|
|
|
112
148
|
|
|
113
149
|
|
|
114
150
|
return customInstance<AccountServerGetRegistrationResponse>(
|
|
115
|
-
{url: `/account-server/registration`, method: '
|
|
151
|
+
{url: `/account-server/registration`, method: 'GET', signal
|
|
116
152
|
},
|
|
117
153
|
options);
|
|
118
154
|
}
|
|
119
155
|
|
|
120
156
|
|
|
121
157
|
export const getGetAccountServerRegistrationQueryKey = () => {
|
|
122
|
-
|
|
123
158
|
return ["data-manager-api", `/account-server/registration`] as const;
|
|
124
159
|
}
|
|
125
160
|
|
|
126
161
|
|
|
127
|
-
export const getGetAccountServerRegistrationQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerRegistration>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData
|
|
162
|
+
export const getGetAccountServerRegistrationQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerRegistration>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
128
163
|
) => {
|
|
129
164
|
|
|
130
165
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -149,7 +184,7 @@ export type GetAccountServerRegistrationQueryError = ErrorType<void | DmError>
|
|
|
149
184
|
* @summary Gets the Data Manager Account Server Registration
|
|
150
185
|
*/
|
|
151
186
|
export const useGetAccountServerRegistration = <TData = Awaited<ReturnType<typeof getAccountServerRegistration>>, TError = ErrorType<void | DmError>>(
|
|
152
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData
|
|
187
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
153
188
|
|
|
154
189
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
155
190
|
|
|
@@ -164,6 +199,46 @@ export const useGetAccountServerRegistration = <TData = Awaited<ReturnType<typeo
|
|
|
164
199
|
|
|
165
200
|
|
|
166
201
|
|
|
202
|
+
export const getGetAccountServerRegistrationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAccountServerRegistration>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
203
|
+
) => {
|
|
204
|
+
|
|
205
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
206
|
+
|
|
207
|
+
const queryKey = queryOptions?.queryKey ?? getGetAccountServerRegistrationQueryKey();
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAccountServerRegistration>>> = ({ signal }) => getAccountServerRegistration(requestOptions, signal);
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData> & { queryKey: QueryKey }
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type GetAccountServerRegistrationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAccountServerRegistration>>>
|
|
221
|
+
export type GetAccountServerRegistrationSuspenseQueryError = ErrorType<void | DmError>
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @summary Gets the Data Manager Account Server Registration
|
|
225
|
+
*/
|
|
226
|
+
export const useGetAccountServerRegistrationSuspense = <TData = Awaited<ReturnType<typeof getAccountServerRegistration>>, TError = ErrorType<void | DmError>>(
|
|
227
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAccountServerRegistration>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
228
|
+
|
|
229
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
230
|
+
|
|
231
|
+
const queryOptions = getGetAccountServerRegistrationSuspenseQueryOptions(options)
|
|
232
|
+
|
|
233
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
234
|
+
|
|
235
|
+
query.queryKey = queryOptions.queryKey ;
|
|
236
|
+
|
|
237
|
+
return query;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
167
242
|
/**
|
|
168
243
|
* @summary Gets the Data Manager version that's running behind the API
|
|
169
244
|
*/
|
|
@@ -174,19 +249,18 @@ export const getVersion = (
|
|
|
174
249
|
|
|
175
250
|
|
|
176
251
|
return customInstance<VersionGetResponse>(
|
|
177
|
-
{url: `/version`, method: '
|
|
252
|
+
{url: `/version`, method: 'GET', signal
|
|
178
253
|
},
|
|
179
254
|
options);
|
|
180
255
|
}
|
|
181
256
|
|
|
182
257
|
|
|
183
258
|
export const getGetVersionQueryKey = () => {
|
|
184
|
-
|
|
185
259
|
return ["data-manager-api", `/version`] as const;
|
|
186
260
|
}
|
|
187
261
|
|
|
188
262
|
|
|
189
|
-
export const getGetVersionQueryOptions = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData
|
|
263
|
+
export const getGetVersionQueryOptions = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
190
264
|
) => {
|
|
191
265
|
|
|
192
266
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -211,7 +285,7 @@ export type GetVersionQueryError = ErrorType<void | DmError>
|
|
|
211
285
|
* @summary Gets the Data Manager version that's running behind the API
|
|
212
286
|
*/
|
|
213
287
|
export const useGetVersion = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<void | DmError>>(
|
|
214
|
-
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData
|
|
288
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
215
289
|
|
|
216
290
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
217
291
|
|
|
@@ -226,3 +300,43 @@ export const useGetVersion = <TData = Awaited<ReturnType<typeof getVersion>>, TE
|
|
|
226
300
|
|
|
227
301
|
|
|
228
302
|
|
|
303
|
+
export const getGetVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
304
|
+
) => {
|
|
305
|
+
|
|
306
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
307
|
+
|
|
308
|
+
const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({ signal }) => getVersion(requestOptions, signal);
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & { queryKey: QueryKey }
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>
|
|
322
|
+
export type GetVersionSuspenseQueryError = ErrorType<void | DmError>
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @summary Gets the Data Manager version that's running behind the API
|
|
326
|
+
*/
|
|
327
|
+
export const useGetVersionSuspense = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<void | DmError>>(
|
|
328
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
329
|
+
|
|
330
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
331
|
+
|
|
332
|
+
const queryOptions = getGetVersionSuspenseQueryOptions(options)
|
|
333
|
+
|
|
334
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
335
|
+
|
|
336
|
+
query.queryKey = queryOptions.queryKey ;
|
|
337
|
+
|
|
338
|
+
return query;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|