@squonk/data-manager-client 0.7.3-rc.4 → 0.7.7

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 (85) hide show
  1. package/accounting/accounting.cjs +5 -5
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +8 -3
  4. package/accounting/accounting.js +1 -1
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +35 -25
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +36 -17
  9. package/admin/admin.js +32 -22
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +12 -12
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +11 -6
  14. package/application/application.js +9 -9
  15. package/application/application.js.map +1 -1
  16. package/{chunk-JR7F532L.js → chunk-6EEIAH4R.js} +1 -1
  17. package/{chunk-JR7F532L.js.map → chunk-6EEIAH4R.js.map} +1 -1
  18. package/{chunk-3DXYUDZH.cjs → chunk-NGBTCJWS.cjs} +1 -1
  19. package/chunk-NGBTCJWS.cjs.map +1 -0
  20. package/{custom-instance-32850190.d.ts → custom-instance-42e56f26.d.ts} +10 -3
  21. package/dataset/dataset.cjs +62 -52
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.ts +52 -29
  24. package/dataset/dataset.js +54 -44
  25. package/dataset/dataset.js.map +1 -1
  26. package/file/file.cjs +22 -17
  27. package/file/file.cjs.map +1 -1
  28. package/file/file.d.ts +20 -8
  29. package/file/file.js +18 -13
  30. package/file/file.js.map +1 -1
  31. package/index.cjs +2 -2
  32. package/index.cjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.js +1 -1
  35. package/index.js.map +1 -1
  36. package/instance/instance.cjs +26 -21
  37. package/instance/instance.cjs.map +1 -1
  38. package/instance/instance.d.ts +23 -11
  39. package/instance/instance.js +23 -18
  40. package/instance/instance.js.map +1 -1
  41. package/job/job.cjs +11 -11
  42. package/job/job.cjs.map +1 -1
  43. package/job/job.d.ts +11 -6
  44. package/job/job.js +8 -8
  45. package/job/job.js.map +1 -1
  46. package/metadata/metadata.cjs +34 -28
  47. package/metadata/metadata.cjs.map +1 -1
  48. package/metadata/metadata.d.ts +27 -16
  49. package/metadata/metadata.js +30 -24
  50. package/metadata/metadata.js.map +1 -1
  51. package/package.json +14 -14
  52. package/project/project.cjs +56 -41
  53. package/project/project.cjs.map +1 -1
  54. package/project/project.d.ts +49 -27
  55. package/project/project.js +52 -37
  56. package/project/project.js.map +1 -1
  57. package/src/accounting/accounting.ts +11 -1
  58. package/src/admin/admin.ts +94 -37
  59. package/src/application/application.ts +19 -9
  60. package/src/data-manager-api.schemas.ts +6 -3
  61. package/src/dataset/dataset.ts +130 -65
  62. package/src/file/file.ts +47 -16
  63. package/src/instance/instance.ts +57 -24
  64. package/src/job/job.ts +14 -8
  65. package/src/metadata/metadata.ts +66 -38
  66. package/src/project/project.ts +121 -55
  67. package/src/task/task.ts +28 -16
  68. package/src/type/type.ts +6 -1
  69. package/src/user/user.ts +26 -2
  70. package/task/task.cjs +16 -16
  71. package/task/task.cjs.map +1 -1
  72. package/task/task.d.ts +15 -8
  73. package/task/task.js +13 -13
  74. package/task/task.js.map +1 -1
  75. package/type/type.cjs +3 -3
  76. package/type/type.cjs.map +1 -1
  77. package/type/type.d.ts +6 -3
  78. package/type/type.js +1 -1
  79. package/type/type.js.map +1 -1
  80. package/user/user.cjs +13 -8
  81. package/user/user.cjs.map +1 -1
  82. package/user/user.d.ts +12 -2
  83. package/user/user.js +7 -2
  84. package/user/user.js.map +1 -1
  85. package/chunk-3DXYUDZH.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dataset/dataset.ts"],"sourcesContent":["/**\n * Generated by orval v6.6.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Using an unmanaged file in a Project as a source a Dataset (or new Dataset version) is created.\n\nThe dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.organisation_id !== undefined) {\n formData.append(\"organisation_id\", datasetPutBodyBody.organisation_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n { url: `/dataset`, method: \"put\", data: formData },\n options\n );\n};\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof createDatasetFromFile>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof createDatasetFromFile>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof createDatasetFromFile>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the **\\/type** endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous `task` after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the **\\/task/{task-id}** endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"organisation_id\", datasetPostBodyBody.organisation_id);\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n { url: `/dataset`, method: \"post\", data: formData },\n options\n );\n};\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof uploadDataset>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof uploadDataset>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof uploadDataset>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by: 1. `owner username`, 2. `mime_type`, 3. a list of `owners` (a subset of the above) 4. a list of `editors` (a subset of the above) 5. `Labels` or `Label/Value` pairs (a subset of the above)\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) => [\n `/dataset`,\n ...(params ? [params] : []),\n];\n\nexport const useGetDatasets = <\n TData = AsyncReturnType<typeof getDatasets>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getDatasets>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getDatasets>> = () =>\n getDatasets(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getDatasets>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns a list of Dataset versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the versions of a specific Dataset\n */\nexport const getVersions = (\n datasetid: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetid}/versions`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetid: string,\n params?: GetVersionsParams\n) => [`/dataset/${datasetid}/versions`, ...(params ? [params] : [])];\n\nexport const useGetVersions = <\n TData = AsyncReturnType<typeof getVersions>,\n TError = ErrorType<void | DmError>\n>(\n datasetid: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getVersions>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetid, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getVersions>> = () =>\n getVersions(datasetid, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getVersions>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!datasetid, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a dataset\n */\nexport const deleteDataset = (\n datasetid: string,\n datasetversion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetid}/${datasetversion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteDataset>,\n TError,\n { datasetid: string; datasetversion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteDataset>,\n { datasetid: string; datasetversion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetid, datasetversion, params } = props || {};\n\n return deleteDataset(datasetid, datasetversion, params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteDataset>,\n TError,\n { datasetid: string; datasetversion: number; params?: DeleteDatasetParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a dataset\n */\nexport const downloadDataset = (\n datasetid: string,\n datasetversion: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetid}/${datasetversion}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetid: string,\n datasetversion: number\n) => [`/dataset/${datasetid}/${datasetversion}`];\n\nexport const useDownloadDataset = <\n TData = AsyncReturnType<typeof downloadDataset>,\n TError = ErrorType<DmError>\n>(\n datasetid: string,\n datasetversion: number,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadDataset>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetid, datasetversion);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadDataset>> = () =>\n downloadDataset(datasetid, datasetversion, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof downloadDataset>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!(datasetid && datasetversion),\n ...queryOptions,\n });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * The user is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetid: string,\n userid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetid}/editor/${userid}`, method: \"delete\" },\n options\n );\n};\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof removeEditorFromDataset>,\n TError,\n { datasetid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof removeEditorFromDataset>,\n { datasetid: string; userid: string }\n > = (props) => {\n const { datasetid, userid } = props || {};\n\n return removeEditorFromDataset(datasetid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof removeEditorFromDataset>,\n TError,\n { datasetid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * The user is added to the dataset's editor list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a dataset\n */\nexport const addEditorToDataset = (\n datasetid: string,\n userid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetid}/editor/${userid}`, method: \"put\" },\n options\n );\n};\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addEditorToDataset>,\n TError,\n { datasetid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addEditorToDataset>,\n { datasetid: string; userid: string }\n > = (props) => {\n const { datasetid, userid } = props || {};\n\n return addEditorToDataset(datasetid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addEditorToDataset>,\n TError,\n { datasetid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-charcater hexstring.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetdigest: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetdigest}`, method: \"get\" },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetdigest: string) => [\n `/dataset/digest/${datasetdigest}`,\n];\n\nexport const useGetDatasetDigest = <\n TData = AsyncReturnType<typeof getDatasetDigest>,\n TError = ErrorType<void | DmError>\n>(\n datasetdigest: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getDatasetDigest>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetdigest);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getDatasetDigest>> = () =>\n getDatasetDigest(datasetdigest, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getDatasetDigest>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!datasetdigest, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetid: string,\n datasetversion: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n { url: `/dataset/${datasetid}/schema/${datasetversion}`, method: \"get\" },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetid: string,\n datasetversion: number\n) => [`/dataset/${datasetid}/schema/${datasetversion}`];\n\nexport const useGetSchema = <\n TData = AsyncReturnType<typeof getSchema>,\n TError = ErrorType<void | DmError>\n>(\n datasetid: string,\n datasetversion: number,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getSchema>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetid, datasetversion);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getSchema>> = () =>\n getSchema(datasetid, datasetversion, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getSchema>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!(datasetid && datasetversion), ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAkDO,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI;AACrB,WAAS,OAAO,gBAAgB,mBAAmB;AACnD,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS,OACP,0BACA,mBAAmB;AAAA;AAGvB,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS,OACP,sBACA,mBAAmB,mBAAmB;AAAA;AAG1C,WAAS,OAAO,cAAc,mBAAmB;AACjD,WAAS,OAAO,QAAQ,mBAAmB;AAC3C,WAAS,OAAO,aAAa,mBAAmB;AAChD,MAAI,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB;AAAA;AAEnD,MAAI,mBAAmB,oBAAoB,QAAW;AACpD,aAAS,OAAO,mBAAmB,mBAAmB;AAAA;AAExD,MAAI,mBAAmB,YAAY,QAAW;AAC5C,aAAS,OAAO,WAAW,mBAAmB;AAAA;AAGhD,SAAO,eACL,EAAE,KAAK,YAAY,QAAQ,OAAO,MAAM,YACxC;AAAA;AAIG,IAAM,2BAA2B,CAGtC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,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S,iBAAE,SAAS,CAAC,CAAC,iBAAkB;AAEpD,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AASA,IAAM,YAAY,CACvB,WACA,gBACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,oBAAoB,kBAAkB,QAAQ,SACjE;AAAA;AAIG,IAAM,uBAAuB,CAClC,WACA,mBACG,CAAC,YAAY,oBAAoB;AAE/B,IAAM,eAAe,CAI1B,WACA,gBACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WACJ,8CAAc,aAAY,qBAAqB,WAAW;AAE5D,QAAM,UAA4D,MAChE,UAAU,WAAW,gBAAgB;AAEvC,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAE,cAAa,mBAAoB;AAGjD,SAAO;AAAA,IACL;AAAA,KACG;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/dataset/dataset.ts"],"sourcesContent":["/**\n * Generated by orval v6.7.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Using an unmanaged file in a Project as a source a Dataset (or new Dataset version) is created.\n\nThe dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.organisation_id !== undefined) {\n formData.append(\"organisation_id\", datasetPutBodyBody.organisation_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n AsyncReturnType<typeof createDatasetFromFile>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof createDatasetFromFile>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof createDatasetFromFile>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof createDatasetFromFile>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the **\\/type** endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.\n\nDatasets undergo some processing in an asynchronous `task` after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the **\\/task/{task-id}** endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"organisation_id\", datasetPostBodyBody.organisation_id);\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n AsyncReturnType<typeof uploadDataset>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof uploadDataset>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof uploadDataset>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof uploadDataset>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by: 1. `owner username`, 2. `mime_type`, 3. a list of `owners` (a subset of the above) 4. a list of `editors` (a subset of the above) 5. `Labels` or `Label/Value` pairs (a subset of the above)\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) => [\n `/dataset`,\n ...(params ? [params] : []),\n];\n\nexport type GetDatasetsQueryResult = NonNullable<\n AsyncReturnType<typeof getDatasets>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = AsyncReturnType<typeof getDatasets>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getDatasets>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getDatasets>> = () =>\n getDatasets(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getDatasets>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns a list of Dataset versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [`/dataset/${datasetId}/versions`, ...(params ? [params] : [])];\n\nexport type GetVersionsQueryResult = NonNullable<\n AsyncReturnType<typeof getVersions>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = AsyncReturnType<typeof getVersions>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getVersions>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getVersions>> = () =>\n getVersions(datasetId, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getVersions>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!datasetId, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n AsyncReturnType<typeof deleteDataset>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteDataset>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteDataset>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props || {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteDataset>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/${datasetVersion}`];\n\nexport type DownloadDatasetQueryResult = NonNullable<\n AsyncReturnType<typeof downloadDataset>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = AsyncReturnType<typeof downloadDataset>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadDataset>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadDataset>> = () =>\n downloadDataset(datasetId, datasetVersion, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof downloadDataset>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * The user is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n AsyncReturnType<typeof removeEditorFromDataset>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof removeEditorFromDataset>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof removeEditorFromDataset>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props || {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof removeEditorFromDataset>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * The user is added to the dataset's editor list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n AsyncReturnType<typeof addEditorToDataset>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addEditorToDataset>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addEditorToDataset>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props || {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addEditorToDataset>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-charcater hexstring.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\" },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) => [\n `/dataset/digest/${datasetDigest}`,\n];\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n AsyncReturnType<typeof getDatasetDigest>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = AsyncReturnType<typeof getDatasetDigest>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getDatasetDigest>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getDatasetDigest>> = () =>\n getDatasetDigest(datasetDigest, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getDatasetDigest>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!datasetDigest, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n { url: `/dataset/${datasetId}/schema/${datasetVersion}`, method: \"get\" },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/schema/${datasetVersion}`];\n\nexport type GetSchemaQueryResult = NonNullable<\n AsyncReturnType<typeof getSchema>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = AsyncReturnType<typeof getSchema>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getSchema>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getSchema>> = () =>\n getSchema(datasetId, datasetVersion, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getSchema>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!(datasetId && datasetVersion), ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAkDO,IAAM,wBAAwB,CACnC,o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,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,4BAA4B,aAAa;AAErE,QAAM,UAAmE,MACvE,iBAAiB,eAAe,cAAc;AAEhD,QAAM,QAAQ,SAIZ,UAAU,SAAS,iBAAE,SAAS,CAAC,CAAC,iBAAkB,aAAc;AAElE,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAOO,IAAM,YAAY,CACvB,WACA,gBACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,YAAY,oBAAoB,kBAAkB,QAAQ,MAAM,GACvE,OACF;AACF;AAEO,IAAM,uBAAuB,CAClC,WACA,mBACG,CAAC,YAAY,oBAAoB,gBAAgB;AAO/C,IAAM,eAAe,CAI1B,WACA,gBACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAA4D,MAChE,UAAU,WAAW,gBAAgB,cAAc;AAErD,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAE,cAAa,mBAAoB,aACjD;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;","names":[]}
package/file/file.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
4
+ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
5
5
 
6
6
  // src/file/file.ts
7
7
 
@@ -9,7 +9,7 @@ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
9
9
 
10
10
  var _reactquery = require('react-query');
11
11
  var getFiles = (params, options) => {
12
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/file`, method: "get", params }, options);
12
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/file`, method: "get", params }, options);
13
13
  };
14
14
  var getGetFilesQueryKey = (params) => [
15
15
  `/file`,
@@ -20,7 +20,7 @@ var useGetFiles = (params, options) => {
20
20
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetFilesQueryKey(params)));
21
21
  const queryFn = () => getFiles(params, requestOptions);
22
22
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
23
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
23
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
24
24
  queryKey
25
25
  }, query);
26
26
  };
@@ -39,7 +39,12 @@ var attachFile = (filePostBodyBody, options) => {
39
39
  if (filePostBodyBody.immutable !== void 0) {
40
40
  formData.append("immutable", filePostBodyBody.immutable.toString());
41
41
  }
42
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/file`, method: "post", data: formData }, options);
42
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, {
43
+ url: `/file`,
44
+ method: "post",
45
+ headers: { "Content-Type": "multipart/form-data" },
46
+ data: formData
47
+ }, options);
43
48
  };
44
49
  var useAttachFile = (options) => {
45
50
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -50,7 +55,7 @@ var useAttachFile = (options) => {
50
55
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
51
56
  };
52
57
  var deleteUnmanagedFile = (params, options) => {
53
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/file`, method: "delete", params }, options);
58
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/file`, method: "delete", params }, options);
54
59
  };
55
60
  var useDeleteUnmanagedFile = (options) => {
56
61
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -60,27 +65,27 @@ var useDeleteUnmanagedFile = (options) => {
60
65
  };
61
66
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
62
67
  };
63
- var deleteFile = (fileid, options) => {
64
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/file/${fileid}`, method: "delete" }, options);
68
+ var deleteFile = (fileId, options) => {
69
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "delete" }, options);
65
70
  };
66
71
  var useDeleteFile = (options) => {
67
72
  const { mutation: mutationOptions, request: requestOptions } = options || {};
68
73
  const mutationFn = (props) => {
69
- const { fileid } = props || {};
70
- return deleteFile(fileid, requestOptions);
74
+ const { fileId } = props || {};
75
+ return deleteFile(fileId, requestOptions);
71
76
  };
72
77
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
73
78
  };
74
- var downloadFile = (fileid, options) => {
75
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/file/${fileid}`, method: "get" }, options);
79
+ var downloadFile = (fileId, options) => {
80
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "get" }, options);
76
81
  };
77
- var getDownloadFileQueryKey = (fileid) => [`/file/${fileid}`];
78
- var useDownloadFile = (fileid, options) => {
82
+ var getDownloadFileQueryKey = (fileId) => [`/file/${fileId}`];
83
+ var useDownloadFile = (fileId, options) => {
79
84
  const { query: queryOptions, request: requestOptions } = options || {};
80
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadFileQueryKey(fileid)));
81
- const queryFn = () => downloadFile(fileid, requestOptions);
82
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunk3DXYUDZHcjs.__spreadValues.call(void 0, { enabled: !!fileid }, queryOptions));
83
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
85
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadFileQueryKey(fileId)));
86
+ const queryFn = () => downloadFile(fileId, requestOptions);
87
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkNGBTCJWScjs.__spreadValues.call(void 0, { enabled: !!fileId }, queryOptions));
88
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
84
89
  queryKey
85
90
  }, query);
86
91
  };
package/file/file.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/file/file.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAwCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,UAC/B;AAAA;AAIG,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA2D,MAC/D,SAAS,QAAQ;AAEnB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAiBA,IAAM,aAAa,CACxB,kBACA,YACG;AACH,QAAM,WAAW,IAAI;AACrB,WAAS,OAAO,cAAc,iBAAiB;AAC/C,WAAS,OACP,mBACA,iBAAiB,gBAAgB;AAEnC,WAAS,OAAO,cAAc,iBAAiB;AAC/C,WAAS,OAAO,WAAW,iBAAiB;AAC5C,MAAI,iBAAiB,SAAS,QAAW;AACvC,aAAS,OAAO,QAAQ,iBAAiB;AAAA;AAE3C,MAAI,iBAAiB,aAAa,QAAW;AAC3C,aAAS,OAAO,YAAY,iBAAiB,SAAS;AAAA;AAExD,MAAI,iBAAiB,cAAc,QAAW;AAC5C,aAAS,OAAO,aAAa,iBAAiB,UAAU;AAAA;AAG1D,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,QAAQ,MAAM,YACtC;AAAA;AAIG,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS;AAE1B,WAAO,WAAW,MAAM;AAAA;AAG1B,SAAO,YAKL,YAAY;AAAA;AAST,IAAM,sBAAsB,CACjC,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,UAAU,UAClC;AAAA;AAIG,IAAM,yBAAyB,CAGpC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS;AAE5B,WAAO,oBAAoB,QAAQ;AAAA;AAGrC,SAAO,YAKL,YAAY;AAAA;AAWT,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,YAClC;AAAA;AAIG,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS;AAE5B,WAAO,WAAW,QAAQ;AAAA;AAG5B,SAAO,YAKL,YAAY;AAAA;AAST,IAAM,eAAe,CAC1B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAClC;AAAA;AAIG,IAAM,0BAA0B,CAAC,WAAmB,CAAC,SAAS;AAE9D,IAAM,kBAAkB,CAI7B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAA+D,MACnE,aAAa,QAAQ;AAEvB,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW;AAG1B,SAAO;AAAA,IACL;AAAA,KACG;AAAA","sourcesContent":["/**\n * Generated by orval v6.6.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n FilesGetResponse,\n DmError,\n GetFilesParams,\n FilePostResponse,\n FilePostBodyBody,\n DeleteUnmanagedFileParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Given a Project and Path the files available to you on that path wil be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params?: GetFilesParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<FilesGetResponse>(\n { url: `/file`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetFilesQueryKey = (params?: GetFilesParams) => [\n `/file`,\n ...(params ? [params] : []),\n];\n\nexport const useGetFiles = <\n TData = AsyncReturnType<typeof getFiles>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetFilesParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFiles>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFiles>> = () =>\n getFiles(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFiles>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **file**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the **\\/task** endpoint to determine when the file is available to the project.\n\nOnly datasets attached to projects are available through the Project API. A dataset that you upload to the **Data Manager** is only available to others (who are not already `editors` of the data) when the dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a dataset to a project. Being an `editor` of the dataset you are attaching does not give you the ability to detach it from the project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_id\", filePostBodyBody.dataset_id);\n formData.append(\n \"dataset_version\",\n filePostBodyBody.dataset_version.toString()\n );\n formData.append(\"project_id\", filePostBodyBody.project_id);\n formData.append(\"as_type\", filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formData.append(\"path\", filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formData.append(\"compress\", filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formData.append(\"immutable\", filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n { url: `/file`, method: \"post\", data: formData },\n options\n );\n};\n\nexport const useAttachFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof attachFile>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return attachFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params?: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file`, method: \"delete\", params },\n options\n );\n};\n\nexport const useDeleteUnmanagedFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n { params?: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props || {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be removed from the project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project. Being an `editor` of the original dataset does not give you the ability to detach it from the project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a project)\n */\nexport const deleteFile = (\n fileid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileid}`, method: \"delete\" },\n options\n );\n};\n\nexport const useDeleteFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteFile>,\n { fileid: string }\n > = (props) => {\n const { fileid } = props || {};\n\n return deleteFile(fileid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileid}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadFileQueryKey = (fileid: string) => [`/file/${fileid}`];\n\nexport const useDownloadFile = <\n TData = AsyncReturnType<typeof downloadFile>,\n TError = ErrorType<DmError>\n>(\n fileid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadFile>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileid);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadFile>> = () =>\n downloadFile(fileid, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof downloadFile>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!fileid, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
1
+ {"version":3,"sources":["../../src/file/file.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAwCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC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AU,OAAO,GACzC,OACF;AACF;AAQO,IAAM,yBAAyB,CAGpC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS,CAAC;AAE7B,WAAO,oBAAoB,QAAQ,cAAc;AAAA,EACnD;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAUO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS,GAC3C,OACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAQO,IAAM,eAAe,CAC1B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,MAAM,GACxC,OACF;AACF;AAEO,IAAM,0BAA0B,CAAC,WAAmB,CAAC,SAAS,QAAQ;AAOtE,IAAM,kBAAkB,CAI7B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB,MAAM;AAEzE,QAAM,UAA+D,MACnE,aAAa,QAAQ,cAAc;AAErC,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW,aAC1B;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP","sourcesContent":["/**\n * Generated by orval v6.7.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n FilesGetResponse,\n DmError,\n GetFilesParams,\n FilePostResponse,\n FilePostBodyBody,\n DeleteUnmanagedFileParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Given a Project and Path the files available to you on that path wil be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params?: GetFilesParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<FilesGetResponse>(\n { url: `/file`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetFilesQueryKey = (params?: GetFilesParams) => [\n `/file`,\n ...(params ? [params] : []),\n];\n\nexport type GetFilesQueryResult = NonNullable<AsyncReturnType<typeof getFiles>>;\nexport type GetFilesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFiles = <\n TData = AsyncReturnType<typeof getFiles>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetFilesParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFiles>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFiles>> = () =>\n getFiles(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFiles>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **file**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the **\\/task** endpoint to determine when the file is available to the project.\n\nOnly datasets attached to projects are available through the Project API. A dataset that you upload to the **Data Manager** is only available to others (who are not already `editors` of the data) when the dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a dataset to a project. Being an `editor` of the dataset you are attaching does not give you the ability to detach it from the project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_id\", filePostBodyBody.dataset_id);\n formData.append(\n \"dataset_version\",\n filePostBodyBody.dataset_version.toString()\n );\n formData.append(\"project_id\", filePostBodyBody.project_id);\n formData.append(\"as_type\", filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formData.append(\"path\", filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formData.append(\"compress\", filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formData.append(\"immutable\", filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n {\n url: `/file`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AttachFileMutationResult = NonNullable<\n AsyncReturnType<typeof attachFile>\n>;\nexport type AttachFileMutationBody = FilePostBodyBody;\nexport type AttachFileMutationError = ErrorType<void | DmError>;\n\nexport const useAttachFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof attachFile>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return attachFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params?: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file`, method: \"delete\", params },\n options\n );\n};\n\nexport type DeleteUnmanagedFileMutationResult = NonNullable<\n AsyncReturnType<typeof deleteUnmanagedFile>\n>;\n\nexport type DeleteUnmanagedFileMutationError = ErrorType<DmError>;\n\nexport const useDeleteUnmanagedFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n { params?: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props || {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be removed from the project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project. Being an `editor` of the original dataset does not give you the ability to detach it from the project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteFileMutationResult = NonNullable<\n AsyncReturnType<typeof deleteFile>\n>;\n\nexport type DeleteFileMutationError = ErrorType<DmError>;\n\nexport const useDeleteFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteFile>,\n { fileId: string }\n > = (props) => {\n const { fileId } = props || {};\n\n return deleteFile(fileId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileId}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadFileQueryKey = (fileId: string) => [`/file/${fileId}`];\n\nexport type DownloadFileQueryResult = NonNullable<\n AsyncReturnType<typeof downloadFile>\n>;\nexport type DownloadFileQueryError = ErrorType<DmError>;\n\nexport const useDownloadFile = <\n TData = AsyncReturnType<typeof downloadFile>,\n TError = ErrorType<DmError>\n>(\n fileId: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadFile>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadFile>> = () =>\n downloadFile(fileId, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof downloadFile>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!fileId, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
package/file/file.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { d as GetFilesParams, bb as customInstance, aS as FilesGetResponse, bc as ErrorType, b7 as DmError, M as FilePostBodyBody, aT as FilePostResponse, D as DeleteUnmanagedFileParams } from '../custom-instance-32850190';
3
+ import { d as GetFilesParams, bb as customInstance, aS as FilesGetResponse, bc as ErrorType, b7 as DmError, M as FilePostBodyBody, aT as FilePostResponse, D as DeleteUnmanagedFileParams } from '../custom-instance-42e56f26.js';
4
4
  import 'axios';
5
5
 
6
+ declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
6
7
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
7
8
  /**
8
9
  * Given a Project and Path the files available to you on that path wil be returned along with any additional paths (sub-directories).
@@ -11,6 +12,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
11
12
  */
12
13
  declare const getFiles: (params?: GetFilesParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<FilesGetResponse>;
13
14
  declare const getGetFilesQueryKey: (params?: GetFilesParams | undefined) => (string | GetFilesParams)[];
15
+ declare type GetFilesQueryResult = NonNullable<AsyncReturnType<typeof getFiles>>;
16
+ declare type GetFilesQueryError = ErrorType<void | DmError>;
14
17
  declare const useGetFiles: <TData = FilesGetResponse, TError = ErrorType<void | DmError>>(params?: GetFilesParams | undefined, options?: {
15
18
  query?: UseQueryOptions<FilesGetResponse, TError, TData, QueryKey> | undefined;
16
19
  request?: SecondParameter<typeof customInstance>;
@@ -31,6 +34,9 @@ You cannot add a Dataset to a Project until its upload is complete.
31
34
  * @summary Attach a Dataset, as a File, to a Project
32
35
  */
33
36
  declare const attachFile: (filePostBodyBody: FilePostBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<FilePostResponse>;
37
+ declare type AttachFileMutationResult = NonNullable<AsyncReturnType<typeof attachFile>>;
38
+ declare type AttachFileMutationBody = FilePostBodyBody;
39
+ declare type AttachFileMutationError = ErrorType<void | DmError>;
34
40
  declare const useAttachFile: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
35
41
  mutation?: UseMutationOptions<FilePostResponse, TError, {
36
42
  data: FilePostBodyBody;
@@ -47,6 +53,8 @@ You must be an `editor` or the `owner` of the project to delete a file from a pr
47
53
  * @summary Delete an unmanaged Project File
48
54
  */
49
55
  declare const deleteUnmanagedFile: (params?: DeleteUnmanagedFileParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<void>;
56
+ declare type DeleteUnmanagedFileMutationResult = NonNullable<AsyncReturnType<typeof deleteUnmanagedFile>>;
57
+ declare type DeleteUnmanagedFileMutationError = ErrorType<DmError>;
50
58
  declare const useDeleteUnmanagedFile: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
51
59
  mutation?: UseMutationOptions<void, TError, {
52
60
  params?: DeleteUnmanagedFileParams | undefined;
@@ -64,14 +72,16 @@ You cannot delete a Project File until the attach is complete.
64
72
 
65
73
  * @summary Delete/detach a File (from a project)
66
74
  */
67
- declare const deleteFile: (fileid: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
75
+ declare const deleteFile: (fileId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
76
+ declare type DeleteFileMutationResult = NonNullable<AsyncReturnType<typeof deleteFile>>;
77
+ declare type DeleteFileMutationError = ErrorType<DmError>;
68
78
  declare const useDeleteFile: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
69
79
  mutation?: UseMutationOptions<void, TError, {
70
- fileid: string;
80
+ fileId: string;
71
81
  }, TContext> | undefined;
72
82
  request?: SecondParameter<typeof customInstance>;
73
83
  } | undefined) => react_query.UseMutationResult<void, TError, {
74
- fileid: string;
84
+ fileId: string;
75
85
  }, TContext>;
76
86
  /**
77
87
  * Given a `file_id` the file will be returned if available.
@@ -80,13 +90,15 @@ You cannot get a Project File until the attach is complete.
80
90
 
81
91
  * @summary Download a File (from a project)
82
92
  */
83
- declare const downloadFile: (fileid: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
84
- declare const getDownloadFileQueryKey: (fileid: string) => string[];
85
- declare const useDownloadFile: <TData = void, TError = ErrorType<DmError>>(fileid: string, options?: {
93
+ declare const downloadFile: (fileId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
94
+ declare const getDownloadFileQueryKey: (fileId: string) => string[];
95
+ declare type DownloadFileQueryResult = NonNullable<AsyncReturnType<typeof downloadFile>>;
96
+ declare type DownloadFileQueryError = ErrorType<DmError>;
97
+ declare const useDownloadFile: <TData = void, TError = ErrorType<DmError>>(fileId: string, options?: {
86
98
  query?: UseQueryOptions<void, TError, TData, QueryKey> | undefined;
87
99
  request?: SecondParameter<typeof customInstance>;
88
100
  } | undefined) => UseQueryResult<TData, TError> & {
89
101
  queryKey: QueryKey;
90
102
  };
91
103
 
92
- export { attachFile, deleteFile, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, useAttachFile, useDeleteFile, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
104
+ export { AttachFileMutationBody, AttachFileMutationError, AttachFileMutationResult, DeleteFileMutationError, DeleteFileMutationResult, DeleteUnmanagedFileMutationError, DeleteUnmanagedFileMutationResult, DownloadFileQueryError, DownloadFileQueryResult, GetFilesQueryError, GetFilesQueryResult, attachFile, deleteFile, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, useAttachFile, useDeleteFile, useDeleteUnmanagedFile, useDownloadFile, useGetFiles };
package/file/file.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues,
3
3
  customInstance
4
- } from "../chunk-JR7F532L.js";
4
+ } from "../chunk-6EEIAH4R.js";
5
5
 
6
6
  // src/file/file.ts
7
7
  import {
@@ -39,7 +39,12 @@ var attachFile = (filePostBodyBody, options) => {
39
39
  if (filePostBodyBody.immutable !== void 0) {
40
40
  formData.append("immutable", filePostBodyBody.immutable.toString());
41
41
  }
42
- return customInstance({ url: `/file`, method: "post", data: formData }, options);
42
+ return customInstance({
43
+ url: `/file`,
44
+ method: "post",
45
+ headers: { "Content-Type": "multipart/form-data" },
46
+ data: formData
47
+ }, options);
43
48
  };
44
49
  var useAttachFile = (options) => {
45
50
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -60,26 +65,26 @@ var useDeleteUnmanagedFile = (options) => {
60
65
  };
61
66
  return useMutation(mutationFn, mutationOptions);
62
67
  };
63
- var deleteFile = (fileid, options) => {
64
- return customInstance({ url: `/file/${fileid}`, method: "delete" }, options);
68
+ var deleteFile = (fileId, options) => {
69
+ return customInstance({ url: `/file/${fileId}`, method: "delete" }, options);
65
70
  };
66
71
  var useDeleteFile = (options) => {
67
72
  const { mutation: mutationOptions, request: requestOptions } = options || {};
68
73
  const mutationFn = (props) => {
69
- const { fileid } = props || {};
70
- return deleteFile(fileid, requestOptions);
74
+ const { fileId } = props || {};
75
+ return deleteFile(fileId, requestOptions);
71
76
  };
72
77
  return useMutation(mutationFn, mutationOptions);
73
78
  };
74
- var downloadFile = (fileid, options) => {
75
- return customInstance({ url: `/file/${fileid}`, method: "get" }, options);
79
+ var downloadFile = (fileId, options) => {
80
+ return customInstance({ url: `/file/${fileId}`, method: "get" }, options);
76
81
  };
77
- var getDownloadFileQueryKey = (fileid) => [`/file/${fileid}`];
78
- var useDownloadFile = (fileid, options) => {
82
+ var getDownloadFileQueryKey = (fileId) => [`/file/${fileId}`];
83
+ var useDownloadFile = (fileId, options) => {
79
84
  const { query: queryOptions, request: requestOptions } = options || {};
80
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getDownloadFileQueryKey(fileid);
81
- const queryFn = () => downloadFile(fileid, requestOptions);
82
- const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!fileid }, queryOptions));
85
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getDownloadFileQueryKey(fileId);
86
+ const queryFn = () => downloadFile(fileId, requestOptions);
87
+ const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!fileId }, queryOptions));
83
88
  return __spreadValues({
84
89
  queryKey
85
90
  }, query);
package/file/file.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/file/file.ts"],"sourcesContent":["/**\n * Generated by orval v6.6.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n FilesGetResponse,\n DmError,\n GetFilesParams,\n FilePostResponse,\n FilePostBodyBody,\n DeleteUnmanagedFileParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Given a Project and Path the files available to you on that path wil be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params?: GetFilesParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<FilesGetResponse>(\n { url: `/file`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetFilesQueryKey = (params?: GetFilesParams) => [\n `/file`,\n ...(params ? [params] : []),\n];\n\nexport const useGetFiles = <\n TData = AsyncReturnType<typeof getFiles>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetFilesParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFiles>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFiles>> = () =>\n getFiles(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFiles>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **file**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the **\\/task** endpoint to determine when the file is available to the project.\n\nOnly datasets attached to projects are available through the Project API. A dataset that you upload to the **Data Manager** is only available to others (who are not already `editors` of the data) when the dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a dataset to a project. Being an `editor` of the dataset you are attaching does not give you the ability to detach it from the project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_id\", filePostBodyBody.dataset_id);\n formData.append(\n \"dataset_version\",\n filePostBodyBody.dataset_version.toString()\n );\n formData.append(\"project_id\", filePostBodyBody.project_id);\n formData.append(\"as_type\", filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formData.append(\"path\", filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formData.append(\"compress\", filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formData.append(\"immutable\", filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n { url: `/file`, method: \"post\", data: formData },\n options\n );\n};\n\nexport const useAttachFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof attachFile>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return attachFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params?: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file`, method: \"delete\", params },\n options\n );\n};\n\nexport const useDeleteUnmanagedFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n { params?: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props || {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be removed from the project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project. Being an `editor` of the original dataset does not give you the ability to detach it from the project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a project)\n */\nexport const deleteFile = (\n fileid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileid}`, method: \"delete\" },\n options\n );\n};\n\nexport const useDeleteFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteFile>,\n { fileid: string }\n > = (props) => {\n const { fileid } = props || {};\n\n return deleteFile(fileid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileid}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadFileQueryKey = (fileid: string) => [`/file/${fileid}`];\n\nexport const useDownloadFile = <\n TData = AsyncReturnType<typeof downloadFile>,\n TError = ErrorType<DmError>\n>(\n fileid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadFile>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileid);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadFile>> = () =>\n downloadFile(fileid, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof downloadFile>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!fileid, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAwCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,UAC/B;AAAA;AAIG,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA2D,MAC/D,SAAS,QAAQ;AAEnB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAiBA,IAAM,aAAa,CACxB,kBACA,YACG;AACH,QAAM,WAAW,IAAI;AACrB,WAAS,OAAO,cAAc,iBAAiB;AAC/C,WAAS,OACP,mBACA,iBAAiB,gBAAgB;AAEnC,WAAS,OAAO,cAAc,iBAAiB;AAC/C,WAAS,OAAO,WAAW,iBAAiB;AAC5C,MAAI,iBAAiB,SAAS,QAAW;AACvC,aAAS,OAAO,QAAQ,iBAAiB;AAAA;AAE3C,MAAI,iBAAiB,aAAa,QAAW;AAC3C,aAAS,OAAO,YAAY,iBAAiB,SAAS;AAAA;AAExD,MAAI,iBAAiB,cAAc,QAAW;AAC5C,aAAS,OAAO,aAAa,iBAAiB,UAAU;AAAA;AAG1D,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,Q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AAO;AAAA,IACL;AAAA,KACG;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/file/file.ts"],"sourcesContent":["/**\n * Generated by orval v6.7.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n FilesGetResponse,\n DmError,\n GetFilesParams,\n FilePostResponse,\n FilePostBodyBody,\n DeleteUnmanagedFileParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Given a Project and Path the files available to you on that path wil be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params?: GetFilesParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<FilesGetResponse>(\n { url: `/file`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetFilesQueryKey = (params?: GetFilesParams) => [\n `/file`,\n ...(params ? [params] : []),\n];\n\nexport type GetFilesQueryResult = NonNullable<AsyncReturnType<typeof getFiles>>;\nexport type GetFilesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFiles = <\n TData = AsyncReturnType<typeof getFiles>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetFilesParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFiles>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFiles>> = () =>\n getFiles(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFiles>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **file**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the **\\/task** endpoint to determine when the file is available to the project.\n\nOnly datasets attached to projects are available through the Project API. A dataset that you upload to the **Data Manager** is only available to others (who are not already `editors` of the data) when the dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a dataset to a project. Being an `editor` of the dataset you are attaching does not give you the ability to detach it from the project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_id\", filePostBodyBody.dataset_id);\n formData.append(\n \"dataset_version\",\n filePostBodyBody.dataset_version.toString()\n );\n formData.append(\"project_id\", filePostBodyBody.project_id);\n formData.append(\"as_type\", filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formData.append(\"path\", filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formData.append(\"compress\", filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formData.append(\"immutable\", filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n {\n url: `/file`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type AttachFileMutationResult = NonNullable<\n AsyncReturnType<typeof attachFile>\n>;\nexport type AttachFileMutationBody = FilePostBodyBody;\nexport type AttachFileMutationError = ErrorType<void | DmError>;\n\nexport const useAttachFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof attachFile>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return attachFile(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof attachFile>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params?: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file`, method: \"delete\", params },\n options\n );\n};\n\nexport type DeleteUnmanagedFileMutationResult = NonNullable<\n AsyncReturnType<typeof deleteUnmanagedFile>\n>;\n\nexport type DeleteUnmanagedFileMutationError = ErrorType<DmError>;\n\nexport const useDeleteUnmanagedFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n { params?: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props || {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteUnmanagedFile>,\n TError,\n { params?: DeleteUnmanagedFileParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be removed from the project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project. Being an `editor` of the original dataset does not give you the ability to detach it from the project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteFileMutationResult = NonNullable<\n AsyncReturnType<typeof deleteFile>\n>;\n\nexport type DeleteFileMutationError = ErrorType<DmError>;\n\nexport const useDeleteFile = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteFile>,\n { fileId: string }\n > = (props) => {\n const { fileId } = props || {};\n\n return deleteFile(fileId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteFile>,\n TError,\n { fileId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/file/${fileId}`, method: \"get\" },\n options\n );\n};\n\nexport const getDownloadFileQueryKey = (fileId: string) => [`/file/${fileId}`];\n\nexport type DownloadFileQueryResult = NonNullable<\n AsyncReturnType<typeof downloadFile>\n>;\nexport type DownloadFileQueryError = ErrorType<DmError>;\n\nexport const useDownloadFile = <\n TData = AsyncReturnType<typeof downloadFile>,\n TError = ErrorType<DmError>\n>(\n fileId: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof downloadFile>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof downloadFile>> = () =>\n downloadFile(fileId, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof downloadFile>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!fileId, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAwCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAKO,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB,MAAM;AAErE,QAAM,UAA2D,MAC/D,SAAS,QAAQ,cAAc;AAEjC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAeO,IAAM,aAAa,CACxB,kBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,cAAc,iBAAiB,UAAU;AACzD,WAAS,OACP,mBACA,iBAAiB,gBAAgB,SAAS,CAC5C;AACA,WAAS,OAAO,cAAc,iBAAiB,UAAU;AACzD,WAAS,OAAO,WAAW,iBAAiB,OAAO;AACnD,MAAI,iBAAiB,SAAS,QAAW;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B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAQO,IAAM,eAAe,CAC1B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,MAAM,GACxC,OACF;AACF;AAEO,IAAM,0BAA0B,CAAC,WAAmB,CAAC,SAAS,QAAQ;AAOtE,IAAM,kBAAkB,CAI7B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB,MAAM;AAEzE,QAAM,UAA+D,MACnE,aAAa,QAAQ,cAAc;AAErC,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW,aAC1B;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;","names":[]}
package/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk3DXYUDZHcjs = require('./chunk-3DXYUDZH.cjs');
6
+ var _chunkNGBTCJWScjs = require('./chunk-NGBTCJWS.cjs');
7
7
 
8
8
  // src/data-manager-api.schemas.ts
9
9
  var TypeSummaryFormatterOptionsType = {
@@ -134,5 +134,5 @@ var DatasetSchemaGetResponseType = {
134
134
 
135
135
 
136
136
 
137
- exports.AXIOS_INSTANCE = _chunk3DXYUDZHcjs.AXIOS_INSTANCE; exports.ApiLogDetailMethod = ApiLogDetailMethod; exports.DatasetSchemaGetResponseType = DatasetSchemaGetResponseType; exports.DatasetVersionDetailProcessingStage = DatasetVersionDetailProcessingStage; exports.DatasetVersionSummaryProcessingStage = DatasetVersionSummaryProcessingStage; exports.InstanceGetResponseApplicationType = InstanceGetResponseApplicationType; exports.InstanceGetResponsePhase = InstanceGetResponsePhase; exports.InstanceSummaryApplicationType = InstanceSummaryApplicationType; exports.InstanceSummaryJobImageType = InstanceSummaryJobImageType; exports.InstanceSummaryPhase = InstanceSummaryPhase; exports.InstanceTaskPurpose = InstanceTaskPurpose; exports.JobGetResponseImageType = JobGetResponseImageType; exports.JobSummaryImageType = JobSummaryImageType; exports.ServiceErrorSummarySeverity = ServiceErrorSummarySeverity; exports.TaskEventLevel = TaskEventLevel; exports.TaskGetResponsePurpose = TaskGetResponsePurpose; exports.TaskStateState = TaskStateState; exports.TaskSummaryProcessingStage = TaskSummaryProcessingStage; exports.TypeSummaryFormatterOptionsType = TypeSummaryFormatterOptionsType; exports.customInstance = _chunk3DXYUDZHcjs.customInstance; exports.setAuthToken = _chunk3DXYUDZHcjs.setAuthToken; exports.setBaseUrl = _chunk3DXYUDZHcjs.setBaseUrl;
137
+ exports.AXIOS_INSTANCE = _chunkNGBTCJWScjs.AXIOS_INSTANCE; exports.ApiLogDetailMethod = ApiLogDetailMethod; exports.DatasetSchemaGetResponseType = DatasetSchemaGetResponseType; exports.DatasetVersionDetailProcessingStage = DatasetVersionDetailProcessingStage; exports.DatasetVersionSummaryProcessingStage = DatasetVersionSummaryProcessingStage; exports.InstanceGetResponseApplicationType = InstanceGetResponseApplicationType; exports.InstanceGetResponsePhase = InstanceGetResponsePhase; exports.InstanceSummaryApplicationType = InstanceSummaryApplicationType; exports.InstanceSummaryJobImageType = InstanceSummaryJobImageType; exports.InstanceSummaryPhase = InstanceSummaryPhase; exports.InstanceTaskPurpose = InstanceTaskPurpose; exports.JobGetResponseImageType = JobGetResponseImageType; exports.JobSummaryImageType = JobSummaryImageType; exports.ServiceErrorSummarySeverity = ServiceErrorSummarySeverity; exports.TaskEventLevel = TaskEventLevel; exports.TaskGetResponsePurpose = TaskGetResponsePurpose; exports.TaskStateState = TaskStateState; exports.TaskSummaryProcessingStage = TaskSummaryProcessingStage; exports.TypeSummaryFormatterOptionsType = TypeSummaryFormatterOptionsType; exports.customInstance = _chunkNGBTCJWScjs.customInstance; exports.setAuthToken = _chunkNGBTCJWScjs.setAuthToken; exports.setBaseUrl = _chunkNGBTCJWScjs.setBaseUrl;
138
138
  //# sourceMappingURL=index.cjs.map