@squonk/data-manager-client 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/accounting/accounting.cjs.map +1 -1
  2. package/accounting/accounting.js.map +1 -1
  3. package/admin/admin.cjs.map +1 -1
  4. package/admin/admin.js.map +1 -1
  5. package/application/application.cjs.map +1 -1
  6. package/application/application.js.map +1 -1
  7. package/configuration/configuration.cjs.map +1 -1
  8. package/configuration/configuration.js.map +1 -1
  9. package/dataset/dataset.cjs.map +1 -1
  10. package/dataset/dataset.js.map +1 -1
  11. package/digest/digest.cjs.map +1 -1
  12. package/digest/digest.js.map +1 -1
  13. package/exchange-rate/exchange-rate.cjs.map +1 -1
  14. package/exchange-rate/exchange-rate.js.map +1 -1
  15. package/file-and-path/file-and-path.cjs.map +1 -1
  16. package/file-and-path/file-and-path.js.map +1 -1
  17. package/index.cjs.map +1 -1
  18. package/index.d.cts +4 -1
  19. package/index.d.ts +4 -1
  20. package/index.js.map +1 -1
  21. package/instance/instance.cjs.map +1 -1
  22. package/instance/instance.js.map +1 -1
  23. package/inventory/inventory.cjs.map +1 -1
  24. package/inventory/inventory.js.map +1 -1
  25. package/job/job.cjs.map +1 -1
  26. package/job/job.js.map +1 -1
  27. package/metadata/metadata.cjs.map +1 -1
  28. package/metadata/metadata.js.map +1 -1
  29. package/package.json +1 -1
  30. package/project/project.cjs.map +1 -1
  31. package/project/project.js.map +1 -1
  32. package/src/accounting/accounting.ts +1 -1
  33. package/src/admin/admin.ts +1 -1
  34. package/src/application/application.ts +1 -1
  35. package/src/configuration/configuration.ts +1 -1
  36. package/src/data-manager-api.schemas.ts +4 -1
  37. package/src/dataset/dataset.ts +1 -1
  38. package/src/digest/digest.ts +1 -1
  39. package/src/exchange-rate/exchange-rate.ts +1 -1
  40. package/src/file-and-path/file-and-path.ts +1 -1
  41. package/src/instance/instance.ts +1 -1
  42. package/src/inventory/inventory.ts +1 -1
  43. package/src/job/job.ts +1 -1
  44. package/src/metadata/metadata.ts +1 -1
  45. package/src/project/project.ts +1 -1
  46. package/src/task/task.ts +1 -1
  47. package/src/type/type.ts +1 -1
  48. package/src/user/user.ts +1 -1
  49. package/task/task.cjs.map +1 -1
  50. package/task/task.js.map +1 -1
  51. package/type/type.cjs.map +1 -1
  52. package/type/type.js.map +1 -1
  53. package/user/user.cjs.map +1 -1
  54. package/user/user.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/metadata/metadata.cjs","../../src/metadata/metadata.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAqCA,IAAM,mBAAA,EAAqB,CAC9B,SAAA,EACA,cAAA,EACA,8BAAA,EACH,OAAA,EAAA,GAAsD;AAEjD,EAAA,MAAM,SAAA,EAAW,IAAI,QAAA,CAAS,CAAA;AACpC,EAAA,GAAA,CAAG,8BAAA,CAA+B,gBAAA,IAAoB,KAAA,CAAA,EAAW;AAChE,IAAA,QAAA,CAAS,MAAA,CAAO,iBAAA,EAAmB,8BAAA,CAA+B,eAAe,CAAA;AAAA,EACjF;AACD,EAAA,GAAA,CAAG,8BAAA,CAA+B,YAAA,IAAgB,KAAA,CAAA,EAAW;AAC5D,IAAA,QAAA,CAAS,MAAA,CAAO,aAAA,EAAe,8BAAA,CAA+B,WAAW,CAAA;AAAA,EACzE;AAEK,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,SAAA,EAAY,SAAS,CAAA,MAAA,EAAS,cAAc,CAAA,CAAA;AAAY,MAAA;AACb,MAAA;AAC1C,MAAA;AACT,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAMuK;AAChI,EAAA;AAK4I,EAAA;AACrI,IAAA;AAEH,IAAA;AACvC,EAAA;AAKmC,EAAA;AAAC;AAgBjC;AAEmB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","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/metadata/metadata.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\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 * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadataVersion>>,\n TError,\n {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,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 getGetMetadataVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId,datasetVersion,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 * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadata>>,\n TError,\n {datasetId: string;data: DatasetMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,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 getGetMetadataSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId,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"]}
1
+ {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/metadata/metadata.cjs","../../src/metadata/metadata.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAqCA,IAAM,mBAAA,EAAqB,CAC9B,SAAA,EACA,cAAA,EACA,8BAAA,EACH,OAAA,EAAA,GAAsD;AAEjD,EAAA,MAAM,SAAA,EAAW,IAAI,QAAA,CAAS,CAAA;AACpC,EAAA,GAAA,CAAG,8BAAA,CAA+B,gBAAA,IAAoB,KAAA,CAAA,EAAW;AAChE,IAAA,QAAA,CAAS,MAAA,CAAO,iBAAA,EAAmB,8BAAA,CAA+B,eAAe,CAAA;AAAA,EACjF;AACD,EAAA,GAAA,CAAG,8BAAA,CAA+B,YAAA,IAAgB,KAAA,CAAA,EAAW;AAC5D,IAAA,QAAA,CAAS,MAAA,CAAO,aAAA,EAAe,8BAAA,CAA+B,WAAW,CAAA;AAAA,EACzE;AAEK,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,SAAA,EAAY,SAAS,CAAA,MAAA,EAAS,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IoF,EAAA;AAM7C,EAAA;AAC3D;AAyBqE;AAE9C,EAAA;AAEsB,EAAA;AAEb,EAAA;AAEvB,EAAA;AACT;ADhVwD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/metadata/metadata.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\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 * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadataVersion>>,\n TError,\n {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,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 getGetMetadataVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId,datasetVersion,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 * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadata>>,\n TError,\n {datasetId: string;data: DatasetMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,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 getGetMetadataSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId,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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/metadata/metadata.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\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 * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadataVersion>>,\n TError,\n {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,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 getGetMetadataVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId,datasetVersion,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 * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadata>>,\n TError,\n {datasetId: string;data: DatasetMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,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 getGetMetadataSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId,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":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAqCA,IAAM,qBA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AAc,aAAY,uBAAuB,SAAS;AAI1E,QAAM,UAAkE,CAAC,EAAE,OAAO,MAAM,YAAY,WAAW,gBAAgB,MAAM;AAMtI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY;AACvE;AAsBO,SAAS,uBACf,WAAmB,SAEiD;AAEnE,QAAM,eAAe,mCAAmC,WAAU,OAAO;AAEzE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/metadata/metadata.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetMetaGetResponse,\n DatasetMetaPostBodyBody,\n DatasetVersionMetaPostBodyBody,\n DmError\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 * Update parameters or add new annotations of the specified type(s) and to the Metadata for a **Dataset Version**.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library.\n\n * @summary Update Metadata for the Dataset version\n */\nexport const addMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n datasetVersionMetaPostBodyBody: DatasetVersionMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetVersionMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetVersionMetaPostBodyBody.meta_properties)\n }\nif(datasetVersionMetaPostBodyBody.annotations !== undefined) {\n formData.append('annotations', datasetVersionMetaPostBodyBody.annotations)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataVersionMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadataVersion>>, {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}> = (props) => {\n const {datasetId,datasetVersion,data} = props ?? {};\n\n return addMetadataVersion(datasetId,datasetVersion,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataVersionMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadataVersion>>>\n export type AddMetadataVersionMutationBody = DatasetVersionMetaPostBodyBody\n export type AddMetadataVersionMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset version\n */\nexport const useAddMetadataVersion = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadataVersion>>, TError,{datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadataVersion>>,\n TError,\n {datasetId: string;datasetVersion: number;data: DatasetVersionMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataVersionMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a **Dataset Version** in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset Version\n */\nexport const getMetadataVersion = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta/${datasetVersion}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataVersionQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta/${datasetVersion}`] as const;\n }\n\n \nexport const getGetMetadataVersionQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadataVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersion<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionQueryOptions(datasetId,datasetVersion,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 getGetMetadataVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataVersionQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadataVersion>>> = ({ signal }) => getMetadataVersion(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadataVersion>>>\nexport type GetMetadataVersionSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset Version\n */\n\nexport function useGetMetadataVersionSuspense<TData = Awaited<ReturnType<typeof getMetadataVersion>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadataVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataVersionSuspenseQueryOptions(datasetId,datasetVersion,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 * Update default parameters or add new labels to the Metadata for the Dataset.\n\nThe parameters are provided in a list in keyword/arguments\n\nThe labels are provided in a list in JSON format. For details of the label format, see the data-manager-metadata library,\n\n * @summary Update Metadata for the Dataset\n */\nexport const addMetadata = (\n datasetId: string,\n datasetMetaPostBodyBody: DatasetMetaPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(datasetMetaPostBodyBody.meta_properties !== undefined) {\n formData.append('meta_properties', datasetMetaPostBodyBody.meta_properties)\n }\nif(datasetMetaPostBodyBody.labels !== undefined) {\n formData.append('labels', datasetMetaPostBodyBody.labels)\n }\n\n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAddMetadataMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addMetadata>>, {datasetId: string;data: DatasetMetaPostBodyBody}> = (props) => {\n const {datasetId,data} = props ?? {};\n\n return addMetadata(datasetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddMetadataMutationResult = NonNullable<Awaited<ReturnType<typeof addMetadata>>>\n export type AddMetadataMutationBody = DatasetMetaPostBodyBody\n export type AddMetadataMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Update Metadata for the Dataset\n */\nexport const useAddMetadata = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addMetadata>>, TError,{datasetId: string;data: DatasetMetaPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addMetadata>>,\n TError,\n {datasetId: string;data: DatasetMetaPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAddMetadataMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns the Metadata for a Dataset in JSON format.\n\n * @summary Gets the Metadata for a specific Dataset\n */\nexport const getMetadata = (\n datasetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetMetaGetResponse>(\n {url: `/dataset/${datasetId}/meta`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMetadataQueryKey = (datasetId: string,) => {\n return [\"data-manager-api\", `/dataset/${datasetId}/meta`] as const;\n }\n\n \nexport const getGetMetadataQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMetadata>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadata<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataQueryOptions(datasetId,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 getGetMetadataSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMetadata>>> = ({ signal }) => getMetadata(datasetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMetadataSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMetadata>>>\nexport type GetMetadataSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Metadata for a specific Dataset\n */\n\nexport function useGetMetadataSuspense<TData = Awaited<ReturnType<typeof getMetadata>>, TError = ErrorType<void | DmError>>(\n datasetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMetadata>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetMetadataSuspenseQueryOptions(datasetId,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":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAqCA,IAAM,qBAAqB,CAC9B,WACA,gBACA,gCACH,YAAsD;AAEjD,QAAM,WAAW,IAAI,SAAS;AACpC,MAAG,+BAA+B,oBAAoB,QAAW;AAChE,aAAS,OAAO,mBAAmB,+BAA+B,eAAe;AAAA,EACjF;AACD,MAAG,+BAA+B,gBAAgB,QAAW;AAC5D,aAAS,OAAO,eAAe,+BAA+B,WAAW;AAAA,EACzE;AAEK,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS,SAAS,cAAc;AAAA,MAAI,QAAQ;AAAA,MAC9D,SAAS,EAAC,gBAAgB,sBAAuB;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
  {
2
- "version": "3.1.0",
2
+ "version": "3.3.0",
3
3
  "author": "Oliver Dudgeon",
4
4
  "name": "@squonk/data-manager-client",
5
5
  "private": false,
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/project/project.cjs","../../src/project/project.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAsCA,IAAM,YAAA,EAAc,CACvB,MAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,QAAA,CAAA;AAAA,MAAY,MAAA,EAAQ,KAAA;AAAA,MACxB,MAAA;AAAA,MAAQ;AAAA,IACZ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,uBAAA,EAAyB,CAAC,MAAA,EAAA,GAAgC;AACnE,EAAA,OAAO,CAAC,kBAAA,EAAoB,CAAA,QAAA,CAAA,EAAY,GAAI,OAAA,EAAS,CAAC,MAAM,EAAA,EAAG,CAAC,CAAE,CAAA;AAClE,CAAA;AAGG,IAAM,2BAAA,EAA6B,CAAsF,MAAA,EAA4B,OAAA,EAAA,GACvJ;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,sBAAA,CAAuB,MAAM,GAAA;AAIvE,EAAA,MAAM,QAAA,EAAkE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,WAAA,CAAY,MAAA,EAAQ,cAAA,EAAgB,MAAM,CAAA;AAMnI,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,a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AAKsB,EAAA;AAEE,EAAA;AAEO,EAAA;AAEvB,EAAA;AACT;AAIa;AAIe,EAAA;AAER,EAAA;AAIqE,EAAA;AAMzD,EAAA;AAChC;AAyBgB;AAMO,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;AAYI;AAIgC,EAAA;AACZ,EAAA;AACE,EAAA;AACT,IAAA;AAChB,EAAA;AACyB,EAAA;AACD,IAAA;AACxB,EAAA;AAEY,EAAA;AACP,IAAA;AAA2B,MAAA;AAAiB,MAAA;AAClB,MAAA;AACnB,MAAA;AACT,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAIS;AAGI,EAAA;AAKqI,EAAA;AACnH,IAAA;AAEA,IAAA;AAC3B,EAAA;AAKmB,EAAA;AAAiB;AAUpB;AAQM,EAAA;AAEL,EAAA;AACrB;AAWA;AAMS,EAAA;AACP,IAAA;AAA2B,MAAA;AAA4B,MAAA;AACrD,MAAA;AAAQ,MAAA;AACZ,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGS;AAEmB,EAAA;AAC5B;AAGS;AAIe,EAAA;AAER,EAAA;AAI8E,EAAA;AAMlE,EAAA;AAChC;AAqCgB;AAMO,EAAA;AAEE,EAAA;AAEO,EAAA;AAEvB,EAAA;AACT;AAIa;AAIe,EAAA;AAER,EAAA;AAI8E,EAAA;AAMlE,EAAA;AAChC;AAyBgB;AAMO,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;ADx3BiC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/project/project.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\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\nexport function useGetProjects<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params: undefined | GetProjectsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjects<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Get all Projects available to you\n */\n\nexport function 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\nexport function useGetProjectsSuspense<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params: undefined | GetProjectsParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 }\nexport function 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 * @summary Get all Projects available to you\n */\n\nexport function 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 creator you are also automatically an `administrator` of the Project and can add other users so that they can also see or manipulate data in the Project.\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 within the same Organisational Unit.\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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof createProject>>,\n TError,\n {data: ProjectPostBodyBody},\n TContext\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\nexport function useGetProject<TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProject<TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Get a Project\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Get a Project\n */\n\nexport function 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Adjust an existing Project\n */\nexport const usePatchProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof patchProject>>,\n TError,\n {projectId: string;data: ProjectPatchBodyBody},\n TContext\n > => {\n\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an existing Project.\n\nYou must be an `administrator` 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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof deleteProject>>,\n TError,\n {projectId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a Project as an `administrator`. As well as the ability to edit the project administrators can add and remove other users.\n\nYou must be an `administrator` of the project\n\n * @summary Add a Project Administrator\n */\nexport const addAdministratorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/administrator/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddAdministratorToProjectMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addAdministratorToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addAdministratorToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddAdministratorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addAdministratorToProject>>>\n \n export type AddAdministratorToProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Add a Project Administrator\n */\nexport const useAddAdministratorToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addAdministratorToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getAddAdministratorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `administrator`. The administrator can be you.\n\nA project must always have one `administrator` so you will not be able to delete the last administrator of a project.\n\nYou must be an `administrator` of the project\n\n * @summary Delete a Project Administrator\n */\nexport const removeAdministratorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/administrator/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getRemoveAdministratorFromProjectMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeAdministratorFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeAdministratorFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveAdministratorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeAdministratorFromProject>>>\n \n export type RemoveAdministratorFromProjectMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Delete a Project Administrator\n */\nexport const useRemoveAdministratorFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeAdministratorFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getRemoveAdministratorFromProjectMutationOptions(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 `administrator` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Add a Project Editor\n */\nexport const useAddEditorToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addEditorToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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 `administrator` 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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Delete a Project Editor\n */\nexport const useRemoveEditorFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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 `administrator` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Add a Project Observer\n */\nexport const useAddObserverToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addObserverToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `observer`.\n\nYou must be an `administrator` 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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Delete a Project Observer\n */\nexport const useRemoveObserverFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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` 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<void | 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<void | DmError>\n\n\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(\n projectId: string,\n params: GetProjectFileParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 * @summary Download a Project file\n */\n\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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<void | 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<void | DmError>\n\n\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 }\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 }\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 * @summary Download a Project file\n */\n\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n {projectId: string;data: ProjectFilePutBodyBody},\n TContext\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\nexport function 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>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Download a Project file using a Token\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Download a Project file using a Token\n */\n\nexport function 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"]}
1
+ {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/project/project.cjs","../../src/project/project.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAsCA,IAAM,YAAA,EAAc,CACvB,MAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;A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,EAAA;AAKqI,EAAA;AACnH,IAAA;AAEA,IAAA;AAC3B,EAAA;AAKmB,EAAA;AAAiB;AAUpB;AAQM,EAAA;AAEL,EAAA;AACrB;AAWA;AAMS,EAAA;AACP,IAAA;AAA2B,MAAA;AAA4B,MAAA;AACrD,MAAA;AAAQ,MAAA;AACZ,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGS;AAEmB,EAAA;AAC5B;AAGS;AAIe,EAAA;AAER,EAAA;AAI8E,EAAA;AAMlE,EAAA;AAChC;AAqCgB;AAMO,EAAA;AAEE,EAAA;AAEO,EAAA;AAEvB,EAAA;AACT;AAIa;AAIe,EAAA;AAER,EAAA;AAI8E,EAAA;AAMlE,EAAA;AAChC;AAyBgB;AAMO,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;ADx3BiC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/project/project.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.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: 3.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\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\nexport function useGetProjects<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params: undefined | GetProjectsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjects<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params?: GetProjectsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjects>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Get all Projects available to you\n */\n\nexport function 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\nexport function useGetProjectsSuspense<TData = Awaited<ReturnType<typeof getProjects>>, TError = ErrorType<void | DmError>>(\n params: undefined | GetProjectsParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjects>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 }\nexport function 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 * @summary Get all Projects available to you\n */\n\nexport function 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 creator you are also automatically an `administrator` of the Project and can add other users so that they can also see or manipulate data in the Project.\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 within the same Organisational Unit.\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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof createProject>>,\n TError,\n {data: ProjectPostBodyBody},\n TContext\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\nexport function useGetProject<TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProject<TData = Awaited<ReturnType<typeof getProject>>, TError = ErrorType<void | DmError>>(\n projectId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProject>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProject>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Get a Project\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Get a Project\n */\n\nexport function 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Adjust an existing Project\n */\nexport const usePatchProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProject>>, TError,{projectId: string;data: ProjectPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof patchProject>>,\n TError,\n {projectId: string;data: ProjectPatchBodyBody},\n TContext\n > => {\n\n const mutationOptions = getPatchProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an existing Project.\n\nYou must be an `administrator` 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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof deleteProject>>,\n TError,\n {projectId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Adds a user to a Project as an `administrator`. As well as the ability to edit the project administrators can add and remove other users.\n\nYou must be an `administrator` of the project\n\n * @summary Add a Project Administrator\n */\nexport const addAdministratorToProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/administrator/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddAdministratorToProjectMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addAdministratorToProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return addAdministratorToProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddAdministratorToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addAdministratorToProject>>>\n \n export type AddAdministratorToProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Add a Project Administrator\n */\nexport const useAddAdministratorToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAdministratorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addAdministratorToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getAddAdministratorToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `administrator`. The administrator can be you.\n\nA project must always have one `administrator` so you will not be able to delete the last administrator of a project.\n\nYou must be an `administrator` of the project\n\n * @summary Delete a Project Administrator\n */\nexport const removeAdministratorFromProject = (\n projectId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/project/${projectId}/administrator/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getRemoveAdministratorFromProjectMutationOptions = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeAdministratorFromProject>>, {projectId: string;userId: string}> = (props) => {\n const {projectId,userId} = props ?? {};\n\n return removeAdministratorFromProject(projectId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveAdministratorFromProjectMutationResult = NonNullable<Awaited<ReturnType<typeof removeAdministratorFromProject>>>\n \n export type RemoveAdministratorFromProjectMutationError = ErrorType<DmError | void>\n\n /**\n * @summary Delete a Project Administrator\n */\nexport const useRemoveAdministratorFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeAdministratorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeAdministratorFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getRemoveAdministratorFromProjectMutationOptions(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 `administrator` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Add a Project Editor\n */\nexport const useAddEditorToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addEditorToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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 `administrator` 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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Delete a Project Editor\n */\nexport const useRemoveEditorFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeEditorFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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 `administrator` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Add a Project Observer\n */\nexport const useAddObserverToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addObserverToProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addObserverToProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\n > => {\n\n const mutationOptions = getAddObserverToProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a project `observer`.\n\nYou must be an `administrator` 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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Delete a Project Observer\n */\nexport const useRemoveObserverFromProject = <TError = ErrorType<DmError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeObserverFromProject>>, TError,{projectId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof removeObserverFromProject>>,\n TError,\n {projectId: string;userId: string},\n TContext\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` 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<void | 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<void | DmError>\n\n\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(\n projectId: string,\n params: GetProjectFileParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(\n projectId: string,\n params: GetProjectFileParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 * @summary Download a Project file\n */\n\nexport function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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<void | 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<void | DmError>\n\n\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 }\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 }\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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 * @summary Download a Project file\n */\n\nexport function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | 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` 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<void | 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> => {\nconst {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<void | DmError>\n\n /**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError,{projectId: string;data: ProjectFilePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n {projectId: string;data: ProjectFilePutBodyBody},\n TContext\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\nexport function 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>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Download a Project file using a Token\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Download a Project file using a Token\n */\n\nexport function 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"]}