@squonk/data-manager-client 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/accounting/accounting.cjs.map +1 -1
  2. package/accounting/accounting.d.cts +25 -25
  3. package/accounting/accounting.d.ts +25 -25
  4. package/accounting/accounting.js.map +1 -1
  5. package/admin/admin.cjs +16 -8
  6. package/admin/admin.cjs.map +1 -1
  7. package/admin/admin.d.cts +73 -73
  8. package/admin/admin.d.ts +73 -73
  9. package/admin/admin.js +16 -8
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +1 -1
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.cts +17 -17
  14. package/application/application.d.ts +17 -17
  15. package/application/application.js +1 -1
  16. package/application/application.js.map +1 -1
  17. package/configuration/configuration.cjs.map +1 -1
  18. package/configuration/configuration.d.cts +9 -9
  19. package/configuration/configuration.d.ts +9 -9
  20. package/configuration/configuration.js.map +1 -1
  21. package/dataset/dataset.cjs +16 -10
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.cts +64 -64
  24. package/dataset/dataset.d.ts +64 -64
  25. package/dataset/dataset.js +16 -10
  26. package/dataset/dataset.js.map +1 -1
  27. package/digest/digest.cjs +1 -1
  28. package/digest/digest.cjs.map +1 -1
  29. package/digest/digest.d.cts +9 -9
  30. package/digest/digest.d.ts +9 -9
  31. package/digest/digest.js +1 -1
  32. package/digest/digest.js.map +1 -1
  33. package/exchange-rate/exchange-rate.cjs +6 -4
  34. package/exchange-rate/exchange-rate.cjs.map +1 -1
  35. package/exchange-rate/exchange-rate.d.cts +45 -45
  36. package/exchange-rate/exchange-rate.d.ts +45 -45
  37. package/exchange-rate/exchange-rate.js +6 -4
  38. package/exchange-rate/exchange-rate.js.map +1 -1
  39. package/file-and-path/file-and-path.cjs +18 -10
  40. package/file-and-path/file-and-path.cjs.map +1 -1
  41. package/file-and-path/file-and-path.d.cts +60 -60
  42. package/file-and-path/file-and-path.d.ts +60 -60
  43. package/file-and-path/file-and-path.js +18 -10
  44. package/file-and-path/file-and-path.js.map +1 -1
  45. package/index.cjs +8 -8
  46. package/index.cjs.map +1 -1
  47. package/index.d.cts +537 -537
  48. package/index.d.ts +537 -537
  49. package/index.js +8 -8
  50. package/index.js.map +1 -1
  51. package/instance/instance.cjs +17 -10
  52. package/instance/instance.cjs.map +1 -1
  53. package/instance/instance.d.cts +49 -49
  54. package/instance/instance.d.ts +49 -49
  55. package/instance/instance.js +17 -10
  56. package/instance/instance.js.map +1 -1
  57. package/inventory/inventory.cjs.map +1 -1
  58. package/inventory/inventory.d.cts +9 -9
  59. package/inventory/inventory.d.ts +9 -9
  60. package/inventory/inventory.js.map +1 -1
  61. package/job/job.cjs +1 -1
  62. package/job/job.cjs.map +1 -1
  63. package/job/job.d.cts +25 -25
  64. package/job/job.d.ts +25 -25
  65. package/job/job.js +1 -1
  66. package/job/job.js.map +1 -1
  67. package/metadata/metadata.cjs +12 -8
  68. package/metadata/metadata.cjs.map +1 -1
  69. package/metadata/metadata.d.cts +31 -31
  70. package/metadata/metadata.d.ts +31 -31
  71. package/metadata/metadata.js +12 -8
  72. package/metadata/metadata.js.map +1 -1
  73. package/package.json +11 -11
  74. package/project/project.cjs +26 -15
  75. package/project/project.cjs.map +1 -1
  76. package/project/project.d.cts +94 -94
  77. package/project/project.d.ts +94 -94
  78. package/project/project.js +26 -15
  79. package/project/project.js.map +1 -1
  80. package/src/accounting/accounting.ts +38 -37
  81. package/src/admin/admin.ts +142 -101
  82. package/src/application/application.ts +26 -25
  83. package/src/configuration/configuration.ts +14 -13
  84. package/src/data-manager-api.schemas.ts +545 -545
  85. package/src/dataset/dataset.ts +118 -91
  86. package/src/digest/digest.ts +14 -13
  87. package/src/exchange-rate/exchange-rate.ts +76 -65
  88. package/src/file-and-path/file-and-path.ts +120 -83
  89. package/src/instance/instance.ts +97 -69
  90. package/src/inventory/inventory.ts +14 -13
  91. package/src/job/job.ts +38 -37
  92. package/src/metadata/metadata.ts +58 -45
  93. package/src/project/project.ts +183 -131
  94. package/src/task/task.ts +39 -33
  95. package/src/type/type.ts +14 -13
  96. package/src/user/user.ts +51 -45
  97. package/task/task.cjs +3 -2
  98. package/task/task.cjs.map +1 -1
  99. package/task/task.d.cts +23 -23
  100. package/task/task.d.ts +23 -23
  101. package/task/task.js +3 -2
  102. package/task/task.js.map +1 -1
  103. package/type/type.cjs.map +1 -1
  104. package/type/type.d.cts +9 -9
  105. package/type/type.d.ts +9 -9
  106. package/type/type.js.map +1 -1
  107. package/user/user.cjs +2 -1
  108. package/user/user.cjs.map +1 -1
  109. package/user/user.d.cts +31 -31
  110. package/user/user.d.ts +31 -31
  111. package/user/user.js +2 -1
  112. package/user/user.js.map +1 -1
@@ -19,7 +19,8 @@ var createPath = (params, options) => {
19
19
  );
20
20
  };
21
21
  var getCreatePathMutationOptions = (options) => {
22
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
22
+ const mutationKey = ["createPath"];
23
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
23
24
  const mutationFn = (props) => {
24
25
  const { params } = _nullishCoalesce(props, () => ( {}));
25
26
  return createPath(params, requestOptions);
@@ -41,7 +42,8 @@ var deletePath = (params, options) => {
41
42
  );
42
43
  };
43
44
  var getDeletePathMutationOptions = (options) => {
44
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
45
+ const mutationKey = ["deletePath"];
46
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
45
47
  const mutationFn = (props) => {
46
48
  const { params } = _nullishCoalesce(props, () => ( {}));
47
49
  return deletePath(params, requestOptions);
@@ -63,7 +65,8 @@ var movePath = (params, options) => {
63
65
  );
64
66
  };
65
67
  var getMovePathMutationOptions = (options) => {
66
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
68
+ const mutationKey = ["movePath"];
69
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
67
70
  const mutationFn = (props) => {
68
71
  const { params } = _nullishCoalesce(props, () => ( {}));
69
72
  return movePath(params, requestOptions);
@@ -112,7 +115,7 @@ function useGetFilesSuspense(params, options) {
112
115
  query.queryKey = queryOptions.queryKey;
113
116
  return query;
114
117
  }
115
- var attachFile = (filePostBodyBody, options) => {
118
+ var attachFile = (filePostBodyBody, options, signal) => {
116
119
  const formData = new FormData();
117
120
  formData.append("dataset_id", filePostBodyBody.dataset_id);
118
121
  formData.append("dataset_version", filePostBodyBody.dataset_version.toString());
@@ -132,13 +135,15 @@ var attachFile = (filePostBodyBody, options) => {
132
135
  url: `/file`,
133
136
  method: "POST",
134
137
  headers: { "Content-Type": "multipart/form-data" },
135
- data: formData
138
+ data: formData,
139
+ signal
136
140
  },
137
141
  options
138
142
  );
139
143
  };
140
144
  var getAttachFileMutationOptions = (options) => {
141
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
145
+ const mutationKey = ["attachFile"];
146
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
142
147
  const mutationFn = (props) => {
143
148
  const { data } = _nullishCoalesce(props, () => ( {}));
144
149
  return attachFile(data, requestOptions);
@@ -160,7 +165,8 @@ var deleteUnmanagedFile = (params, options) => {
160
165
  );
161
166
  };
162
167
  var getDeleteUnmanagedFileMutationOptions = (options) => {
163
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
168
+ const mutationKey = ["deleteUnmanagedFile"];
169
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
164
170
  const mutationFn = (props) => {
165
171
  const { params } = _nullishCoalesce(props, () => ( {}));
166
172
  return deleteUnmanagedFile(params, requestOptions);
@@ -182,7 +188,8 @@ var moveFileInProject = (params, options) => {
182
188
  );
183
189
  };
184
190
  var getMoveFileInProjectMutationOptions = (options) => {
185
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
191
+ const mutationKey = ["moveFileInProject"];
192
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
186
193
  const mutationFn = (props) => {
187
194
  const { params } = _nullishCoalesce(props, () => ( {}));
188
195
  return moveFileInProject(params, requestOptions);
@@ -203,7 +210,8 @@ var deleteFile = (fileId, options) => {
203
210
  );
204
211
  };
205
212
  var getDeleteFileMutationOptions = (options) => {
206
- const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
213
+ const mutationKey = ["deleteFile"];
214
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
207
215
  const mutationFn = (props) => {
208
216
  const { fileId } = _nullishCoalesce(props, () => ( {}));
209
217
  return deleteFile(fileId, requestOptions);
@@ -243,7 +251,7 @@ var getDownloadFileSuspenseQueryOptions = (fileId, options) => {
243
251
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
244
252
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadFileQueryKey(fileId)));
245
253
  const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
246
- return { queryKey, queryFn, enabled: !!fileId, ...queryOptions };
254
+ return { queryKey, queryFn, ...queryOptions };
247
255
  };
248
256
  function useDownloadFileSuspense(fileId, options) {
249
257
  const queryOptions = getDownloadFileSuspenseQueryOptions(fileId, options);
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAyCA,IAAM,WAAA,EAAa,CACtB,MAAA,EACH,OAAA,EAAA,GAAsD;AAGjD,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,KAAA,CAAA;AAAA,MAAS,MAAA,EAAQ,KAAA;AAAA,MACrB;AAAA,IACJ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAIG,IAAM,6BAAA,EAA+B,CACpB,OAAA,EAAA,GACsF;AAC9G,EAAA,MAAM,EAAC,QAAA,EAAU,eAAA,EAAiB,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAKnE,EAAA,MAAM,WAAA,EAAmG,CAAC,KAAA,EAAA,GAAU;AAChH,IAAA,MAAM,EAAC,OAAM,EAAA,mBAAI,KAAA,UAAS,CAAC,GAAA;AAE3B,IAAA,OAAQ,UAAA,CAAW,MAAA,EAAO,cAAc,CAAA;AAAA,EAC1C,CAAA;AAKN,EAAA,OAAQ,EAAE,UAAA,EAAY,GAAG,gBAAgB,CAAA;AAAC,CAAA;AASrC,IAAM,cAAA,EAAgB,CACL,OAAA,EAAA,GAMb;AAEL,EAAA,MAAM,gBAAA,EAAkB,4BAAA,CAA6B,OAAO,CAAA;AAE5D,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AC3E,IAAA;AAEE,IAAA;AACrB,EAAA;AAKmB,EAAA;AAAiB;AAUpB;AAQM,EAAA;AAEL,EAAA;AACrB;AASA;AAKS,EAAA;AACP,IAAA;AAAqB,MAAA;AAAY,MAAA;AAAO,MAAA;AAC1C,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGS;AACD,EAAA;AACR;AAGS;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAmCC;AAIsB,EAAA;AAEE,EAAA;AAEN,EAAA;AAEV,EAAA;AACT;AAIa;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAsBgB;AAKO,EAAA;AAEP,EAAA;AAEG,EAAA;AAEV,EAAA;AACT;AD3gB2B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 3.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams,\n MoveFileInProjectParams,\n MovePathParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n {params: CreatePathParams},\n TContext\n > => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in the contents of the Path also being deleted. If there are files in Path or sub-directories, they will all be deleted.\n\nOnly Project editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n {params: DeletePathParams},\n TContext\n > => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Moves and existing Path within a Project. The path will belong to the User and Project. Any ProjectFile instances on the path will be moved to the new path.\n\nOnly Project editors can move Paths.\n\n * @summary Move a Project Path\n */\nexport const movePath = (\n params: MovePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMovePathMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof movePath>>, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof movePath>>, TError,{params: MovePathParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof movePath>>, {params: MovePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return movePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>\n \n export type MovePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof movePath>>, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n {params: MovePathParams},\n TContext\n > => {\n\n const mutationOptions = getMovePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetFilesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetFilesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetFilesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * 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 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` 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();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n {data: FilePostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(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` 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 \n return customInstance<void>(\n {url: `/file`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n {params: DeleteUnmanagedFileParams},\n TContext\n > => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Move an **Unmanaged** file, optionally renaming it, to a new path.\n\nYou must be an `editor` of the project\n\n * @summary Move an unmanaged file in a Project\n */\nexport const moveFileInProject = (\n params: MoveFileInProjectParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMoveFileInProjectMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof moveFileInProject>>, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof moveFileInProject>>, TError,{params: MoveFileInProjectParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof moveFileInProject>>, {params: MoveFileInProjectParams}> = (props) => {\n const {params} = props ?? {};\n\n return moveFileInProject(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type MoveFileInProjectMutationResult = NonNullable<Awaited<ReturnType<typeof moveFileInProject>>>\n \n export type MoveFileInProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof moveFileInProject>>, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n {params: MoveFileInProjectParams},\n TContext\n > => {\n\n const mutationOptions = getMoveFileInProjectMutationOptions(options);\n\n return useMutation(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` 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 \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n {fileId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getDownloadFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getDownloadFileSuspenseQueryOptions(fileId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AA0CA,IAAM,WAAA,EAAa,CACtB,MAAA,EACH,OAAA,EAAA,GAAsD;AAGjD,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,KAAA,CAAA;AAAA,MAAS,MAAA,EAAQ,KAAA;AAAA,MACrB;AAAA,IACJ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAIG,IAAM,6BAAA,EAA+B,CACpB,OAAA,EAAA,GACnB;AACL,EAAA,MAAM,YAAA,EAAc,CAAC,YAAY,CAAA;AACjC,EAAA,MAAM,EAAC,QAAA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ASA;AAKS,EAAA;AACP,IAAA;AAAqB,MAAA;AAAY,MAAA;AAAO,MAAA;AAC1C,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGS;AACD,EAAA;AACR;AAGS;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAmCC;AAIsB,EAAA;AAEE,EAAA;AAEN,EAAA;AAEV,EAAA;AACT;AAIa;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAsBgB;AAKO,EAAA;AAEP,EAAA;AAEG,EAAA;AAEV,EAAA;AACT;ADxiB2B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.4.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: 3.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams,\n MoveFileInProjectParams,\n MovePathParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TData = Awaited<ReturnType<typeof createPath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['createPath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TData = Awaited<ReturnType<typeof createPath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: CreatePathParams},\n TContext\n > => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in the contents of the Path also being deleted. If there are files in Path or sub-directories, they will all be deleted.\n\nOnly Project editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TData = Awaited<ReturnType<typeof deletePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deletePath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TData = Awaited<ReturnType<typeof deletePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: DeletePathParams},\n TContext\n > => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Moves and existing Path within a Project. The path will belong to the User and Project. Any ProjectFile instances on the path will be moved to the new path.\n\nOnly Project editors can move Paths.\n\n * @summary Move a Project Path\n */\nexport const movePath = (\n params: MovePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMovePathMutationOptions = <TData = Awaited<ReturnType<typeof movePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['movePath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof movePath>>, {params: MovePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return movePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>}\n\n export type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>\n \n export type MovePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TData = Awaited<ReturnType<typeof movePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: MovePathParams},\n TContext\n > => {\n\n const mutationOptions = getMovePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetFilesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetFilesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetFilesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\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 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` 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>,signal?: AbortSignal\n) => {\n \n const formData = new FormData();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData, signal\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TData = Awaited<ReturnType<typeof attachFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['attachFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TData = Awaited<ReturnType<typeof attachFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {data: FilePostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(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` 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 \n return customInstance<void>(\n {url: `/file`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TData = Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deleteUnmanagedFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TData = Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: DeleteUnmanagedFileParams},\n TContext\n > => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Move an **Unmanaged** file, optionally renaming it, to a new path.\n\nYou must be an `editor` of the project\n\n * @summary Move an unmanaged file in a Project\n */\nexport const moveFileInProject = (\n params: MoveFileInProjectParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMoveFileInProjectMutationOptions = <TData = Awaited<ReturnType<typeof moveFileInProject>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['moveFileInProject'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof moveFileInProject>>, {params: MoveFileInProjectParams}> = (props) => {\n const {params} = props ?? {};\n\n return moveFileInProject(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>}\n\n export type MoveFileInProjectMutationResult = NonNullable<Awaited<ReturnType<typeof moveFileInProject>>>\n \n export type MoveFileInProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TData = Awaited<ReturnType<typeof moveFileInProject>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: MoveFileInProjectParams},\n TContext\n > => {\n\n const mutationOptions = getMoveFileInProjectMutationOptions(options);\n\n return useMutation(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` 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 \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TData = Awaited<ReturnType<typeof deleteFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deleteFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{fileId: string}, TContext>}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TData = Awaited<ReturnType<typeof deleteFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {fileId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getDownloadFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getDownloadFileSuspenseQueryOptions(fileId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}