@squonk/data-manager-client 4.3.0 → 5.0.0-5-0.2173783690

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 (119) hide show
  1. package/accounting/accounting.cjs +55 -10
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +58 -1
  4. package/accounting/accounting.d.ts +58 -1
  5. package/accounting/accounting.js +46 -1
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +15 -15
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +2 -0
  10. package/admin/admin.d.ts +2 -0
  11. package/admin/admin.js +1 -1
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +5 -5
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.js +1 -1
  16. package/application/application.js.map +1 -1
  17. package/{chunk-OYRETEBZ.js → chunk-76ADQBHZ.js} +3 -3
  18. package/chunk-76ADQBHZ.js.map +1 -0
  19. package/{chunk-ZLY5XEOQ.cjs → chunk-KHB5TJT7.cjs} +3 -3
  20. package/chunk-KHB5TJT7.cjs.map +1 -0
  21. package/chunk-RB2KVIEK.cjs.map +1 -1
  22. package/configuration/configuration.cjs +5 -5
  23. package/configuration/configuration.cjs.map +1 -1
  24. package/configuration/configuration.d.cts +1 -1
  25. package/configuration/configuration.d.ts +1 -1
  26. package/configuration/configuration.js +1 -1
  27. package/configuration/configuration.js.map +1 -1
  28. package/dataset/dataset.cjs +14 -14
  29. package/dataset/dataset.cjs.map +1 -1
  30. package/dataset/dataset.js +1 -1
  31. package/dataset/dataset.js.map +1 -1
  32. package/digest/digest.cjs +3 -3
  33. package/digest/digest.cjs.map +1 -1
  34. package/digest/digest.js +1 -1
  35. package/digest/digest.js.map +1 -1
  36. package/file-and-path/file-and-path.cjs +139 -17
  37. package/file-and-path/file-and-path.cjs.map +1 -1
  38. package/file-and-path/file-and-path.d.cts +162 -2
  39. package/file-and-path/file-and-path.d.ts +162 -2
  40. package/file-and-path/file-and-path.js +123 -1
  41. package/file-and-path/file-and-path.js.map +1 -1
  42. package/index.cjs +4 -2
  43. package/index.cjs.map +1 -1
  44. package/index.d.cts +53 -37
  45. package/index.d.ts +53 -37
  46. package/index.js +3 -1
  47. package/index.js.map +1 -1
  48. package/instance/instance.cjs +10 -10
  49. package/instance/instance.cjs.map +1 -1
  50. package/instance/instance.js +1 -1
  51. package/instance/instance.js.map +1 -1
  52. package/inventory/inventory.cjs +3 -3
  53. package/inventory/inventory.cjs.map +1 -1
  54. package/inventory/inventory.js +1 -1
  55. package/inventory/inventory.js.map +1 -1
  56. package/job/job.cjs +124 -8
  57. package/job/job.cjs.map +1 -1
  58. package/job/job.d.cts +159 -3
  59. package/job/job.d.ts +159 -3
  60. package/job/job.js +119 -3
  61. package/job/job.js.map +1 -1
  62. package/metadata/metadata.cjs +7 -7
  63. package/metadata/metadata.cjs.map +1 -1
  64. package/metadata/metadata.js +1 -1
  65. package/metadata/metadata.js.map +1 -1
  66. package/package.json +1 -1
  67. package/project/project.cjs +15 -137
  68. package/project/project.cjs.map +1 -1
  69. package/project/project.d.cts +3 -163
  70. package/project/project.d.ts +3 -163
  71. package/project/project.js +1 -123
  72. package/project/project.js.map +1 -1
  73. package/src/{data-manager-api.schemas.ts → API_TARGET_NAME.schemas.ts} +52 -43
  74. package/src/accounting/accounting.ts +244 -2
  75. package/src/admin/admin.ts +4 -2
  76. package/src/application/application.ts +2 -2
  77. package/src/configuration/configuration.ts +5 -9
  78. package/src/dataset/dataset.ts +2 -2
  79. package/src/digest/digest.ts +2 -2
  80. package/src/file-and-path/file-and-path.ts +602 -2
  81. package/src/index.ts +2 -2
  82. package/src/instance/instance.ts +2 -2
  83. package/src/inventory/inventory.ts +2 -2
  84. package/src/job/job.ts +599 -3
  85. package/src/metadata/metadata.ts +2 -2
  86. package/src/options-mutator.ts +2 -2
  87. package/src/project/project.ts +5 -604
  88. package/src/task/task.ts +2 -2
  89. package/src/type/type.ts +2 -2
  90. package/src/user/user.ts +2 -2
  91. package/src/workflow/workflow.ts +5 -3
  92. package/task/task.cjs +6 -6
  93. package/task/task.cjs.map +1 -1
  94. package/task/task.js +1 -1
  95. package/task/task.js.map +1 -1
  96. package/type/type.cjs +3 -3
  97. package/type/type.cjs.map +1 -1
  98. package/type/type.js +1 -1
  99. package/type/type.js.map +1 -1
  100. package/user/user.cjs +10 -10
  101. package/user/user.cjs.map +1 -1
  102. package/user/user.js +1 -1
  103. package/user/user.js.map +1 -1
  104. package/workflow/workflow.cjs +20 -20
  105. package/workflow/workflow.cjs.map +1 -1
  106. package/workflow/workflow.d.cts +3 -1
  107. package/workflow/workflow.d.ts +3 -1
  108. package/workflow/workflow.js +1 -1
  109. package/workflow/workflow.js.map +1 -1
  110. package/chunk-OYRETEBZ.js.map +0 -1
  111. package/chunk-ZLY5XEOQ.cjs.map +0 -1
  112. package/exchange-rate/exchange-rate.cjs +0 -255
  113. package/exchange-rate/exchange-rate.cjs.map +0 -1
  114. package/exchange-rate/exchange-rate.d.cts +0 -319
  115. package/exchange-rate/exchange-rate.d.ts +0 -319
  116. package/exchange-rate/exchange-rate.js +0 -255
  117. package/exchange-rate/exchange-rate.js.map +0 -1
  118. package/exchange-rate/package.json +0 -7
  119. package/src/exchange-rate/exchange-rate.ts +0 -1276
@@ -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(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkZLY5XEOQcjs = require('../chunk-ZLY5XEOQ.cjs');
4
+ var _chunkKHB5TJT7cjs = require('../chunk-KHB5TJT7.cjs');
5
5
 
6
6
 
7
7
  var _chunkRB2KVIEKcjs = require('../chunk-RB2KVIEK.cjs');
@@ -18,7 +18,7 @@ var useCreatePathMutationOptions = (options) => {
18
18
  const { params } = _nullishCoalesce(props, () => ( {}));
19
19
  return createPath(params, requestOptions);
20
20
  };
21
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
21
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
22
22
  return customOptions;
23
23
  };
24
24
  var useCreatePath = (options, queryClient) => {
@@ -35,7 +35,7 @@ var useDeletePathMutationOptions = (options) => {
35
35
  const { params } = _nullishCoalesce(props, () => ( {}));
36
36
  return deletePath(params, requestOptions);
37
37
  };
38
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
38
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
39
39
  return customOptions;
40
40
  };
41
41
  var useDeletePath = (options, queryClient) => {
@@ -52,13 +52,120 @@ var useMovePathMutationOptions = (options) => {
52
52
  const { params } = _nullishCoalesce(props, () => ( {}));
53
53
  return movePath(params, requestOptions);
54
54
  };
55
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
55
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
56
56
  return customOptions;
57
57
  };
58
58
  var useMovePath = (options, queryClient) => {
59
59
  const mutationOptions = useMovePathMutationOptions(options);
60
60
  return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
61
61
  };
62
+ var getProjectFile = (projectId, params, options, signal) => {
63
+ return _chunkRB2KVIEKcjs.customInstance.call(void 0,
64
+ { url: `/project/${projectId}/file`, method: "GET", params, signal },
65
+ options
66
+ );
67
+ };
68
+ var getGetProjectFileQueryKey = (projectId, params) => {
69
+ return [`/project/${projectId}/file`, ...params ? [params] : []];
70
+ };
71
+ var useGetProjectFileQueryOptions = (projectId, params, options) => {
72
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
73
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _ => _.queryKey]), () => ( getGetProjectFileQueryKey(projectId, params)));
74
+ const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
75
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
76
+ return customOptions;
77
+ };
78
+ function useGetProjectFile(projectId, params, options, queryClient) {
79
+ const queryOptions = useGetProjectFileQueryOptions(projectId, params, options);
80
+ const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
81
+ query.queryKey = queryOptions.queryKey;
82
+ return query;
83
+ }
84
+ var useGetProjectFileSuspenseQueryOptions = (projectId, params, options) => {
85
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
86
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _2 => _2.queryKey]), () => ( getGetProjectFileQueryKey(projectId, params)));
87
+ const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
88
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
89
+ return customOptions;
90
+ };
91
+ function useGetProjectFileSuspense(projectId, params, options, queryClient) {
92
+ const queryOptions = useGetProjectFileSuspenseQueryOptions(projectId, params, options);
93
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
94
+ query.queryKey = queryOptions.queryKey;
95
+ return query;
96
+ }
97
+ var addFileToProject = (projectId, projectFilePutBodyBody, options) => {
98
+ const formData = new FormData();
99
+ formData.append(`file`, projectFilePutBodyBody.file);
100
+ if (projectFilePutBodyBody.as_filename !== void 0) {
101
+ formData.append(`as_filename`, projectFilePutBodyBody.as_filename);
102
+ }
103
+ if (projectFilePutBodyBody.path !== void 0) {
104
+ formData.append(`path`, projectFilePutBodyBody.path);
105
+ }
106
+ return _chunkRB2KVIEKcjs.customInstance.call(void 0,
107
+ {
108
+ url: `/project/${projectId}/file`,
109
+ method: "PUT",
110
+ headers: { "Content-Type": "multipart/form-data" },
111
+ data: formData
112
+ },
113
+ options
114
+ );
115
+ };
116
+ var useAddFileToProjectMutationOptions = (options) => {
117
+ const mutationKey = ["addFileToProject"];
118
+ 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 };
119
+ const mutationFn = (props) => {
120
+ const { projectId, data } = _nullishCoalesce(props, () => ( {}));
121
+ return addFileToProject(projectId, data, requestOptions);
122
+ };
123
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
124
+ return customOptions;
125
+ };
126
+ var useAddFileToProject = (options, queryClient) => {
127
+ const mutationOptions = useAddFileToProjectMutationOptions(options);
128
+ return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
129
+ };
130
+ var getProjectFileWithToken = (projectId, params, options, signal) => {
131
+ return _chunkRB2KVIEKcjs.customInstance.call(void 0,
132
+ { url: `/project/${projectId}/file-with-token`, method: "GET", params, signal },
133
+ options
134
+ );
135
+ };
136
+ var getGetProjectFileWithTokenQueryKey = (projectId, params) => {
137
+ return [`/project/${projectId}/file-with-token`, ...params ? [params] : []];
138
+ };
139
+ var useGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
140
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
141
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _3 => _3.queryKey]), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
142
+ const queryFn = ({
143
+ signal
144
+ }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
145
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
146
+ return customOptions;
147
+ };
148
+ function useGetProjectFileWithToken(projectId, params, options, queryClient) {
149
+ const queryOptions = useGetProjectFileWithTokenQueryOptions(projectId, params, options);
150
+ const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
151
+ query.queryKey = queryOptions.queryKey;
152
+ return query;
153
+ }
154
+ var useGetProjectFileWithTokenSuspenseQueryOptions = (projectId, params, options) => {
155
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
156
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _4 => _4.queryKey]), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
157
+ const queryFn = ({
158
+ signal
159
+ }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
160
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
161
+ return customOptions;
162
+ };
163
+ function useGetProjectFileWithTokenSuspense(projectId, params, options, queryClient) {
164
+ const queryOptions = useGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);
165
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
166
+ query.queryKey = queryOptions.queryKey;
167
+ return query;
168
+ }
62
169
  var getFiles = (params, options, signal) => {
63
170
  return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file`, method: "GET", params, signal }, options);
64
171
  };
@@ -67,9 +174,9 @@ var getGetFilesQueryKey = (params) => {
67
174
  };
68
175
  var useGetFilesQueryOptions = (params, options) => {
69
176
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
70
- const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _ => _.queryKey]), () => ( getGetFilesQueryKey(params)));
177
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _5 => _5.queryKey]), () => ( getGetFilesQueryKey(params)));
71
178
  const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
72
- const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
179
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
73
180
  return customOptions;
74
181
  };
75
182
  function useGetFiles(params, options, queryClient) {
@@ -80,9 +187,9 @@ function useGetFiles(params, options, queryClient) {
80
187
  }
81
188
  var useGetFilesSuspenseQueryOptions = (params, options) => {
82
189
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
83
- const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _2 => _2.queryKey]), () => ( getGetFilesQueryKey(params)));
190
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _6 => _6.queryKey]), () => ( getGetFilesQueryKey(params)));
84
191
  const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
85
- const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
192
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
86
193
  return customOptions;
87
194
  };
88
195
  function useGetFilesSuspense(params, options, queryClient) {
@@ -124,7 +231,7 @@ var useAttachFileMutationOptions = (options) => {
124
231
  const { data } = _nullishCoalesce(props, () => ( {}));
125
232
  return attachFile(data, requestOptions);
126
233
  };
127
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
234
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
128
235
  return customOptions;
129
236
  };
130
237
  var useAttachFile = (options, queryClient) => {
@@ -141,7 +248,7 @@ var useDeleteUnmanagedFileMutationOptions = (options) => {
141
248
  const { params } = _nullishCoalesce(props, () => ( {}));
142
249
  return deleteUnmanagedFile(params, requestOptions);
143
250
  };
144
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
251
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
145
252
  return customOptions;
146
253
  };
147
254
  var useDeleteUnmanagedFile = (options, queryClient) => {
@@ -158,7 +265,7 @@ var useMoveFileInProjectMutationOptions = (options) => {
158
265
  const { params } = _nullishCoalesce(props, () => ( {}));
159
266
  return moveFileInProject(params, requestOptions);
160
267
  };
161
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
268
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
162
269
  return customOptions;
163
270
  };
164
271
  var useMoveFileInProject = (options, queryClient) => {
@@ -175,7 +282,7 @@ var useDeleteFileMutationOptions = (options) => {
175
282
  const { fileId } = _nullishCoalesce(props, () => ( {}));
176
283
  return deleteFile(fileId, requestOptions);
177
284
  };
178
- const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
285
+ const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
179
286
  return customOptions;
180
287
  };
181
288
  var useDeleteFile = (options, queryClient) => {
@@ -190,9 +297,9 @@ var getDownloadFileQueryKey = (fileId) => {
190
297
  };
191
298
  var useDownloadFileQueryOptions = (fileId, options) => {
192
299
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
193
- const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _3 => _3.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
300
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _7 => _7.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
194
301
  const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
195
- const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
302
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
196
303
  return customOptions;
197
304
  };
198
305
  function useDownloadFile(fileId, options, queryClient) {
@@ -203,9 +310,9 @@ function useDownloadFile(fileId, options, queryClient) {
203
310
  }
204
311
  var useDownloadFileSuspenseQueryOptions = (fileId, options) => {
205
312
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
206
- const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _4 => _4.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
313
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _8 => _8.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
207
314
  const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
208
- const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
315
+ const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
209
316
  return customOptions;
210
317
  };
211
318
  function useDownloadFileSuspense(fileId, options, queryClient) {
@@ -248,5 +355,20 @@ function useDownloadFileSuspense(fileId, options, queryClient) {
248
355
 
249
356
 
250
357
 
251
- exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.moveFileInProject = moveFileInProject; exports.movePath = movePath; exports.useAttachFile = useAttachFile; exports.useAttachFileMutationOptions = useAttachFileMutationOptions; exports.useCreatePath = useCreatePath; exports.useCreatePathMutationOptions = useCreatePathMutationOptions; exports.useDeleteFile = useDeleteFile; exports.useDeleteFileMutationOptions = useDeleteFileMutationOptions; exports.useDeletePath = useDeletePath; exports.useDeletePathMutationOptions = useDeletePathMutationOptions; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDeleteUnmanagedFileMutationOptions = useDeleteUnmanagedFileMutationOptions; exports.useDownloadFile = useDownloadFile; exports.useDownloadFileQueryOptions = useDownloadFileQueryOptions; exports.useDownloadFileSuspense = useDownloadFileSuspense; exports.useDownloadFileSuspenseQueryOptions = useDownloadFileSuspenseQueryOptions; exports.useGetFiles = useGetFiles; exports.useGetFilesQueryOptions = useGetFilesQueryOptions; exports.useGetFilesSuspense = useGetFilesSuspense; exports.useGetFilesSuspenseQueryOptions = useGetFilesSuspenseQueryOptions; exports.useMoveFileInProject = useMoveFileInProject; exports.useMoveFileInProjectMutationOptions = useMoveFileInProjectMutationOptions; exports.useMovePath = useMovePath; exports.useMovePathMutationOptions = useMovePathMutationOptions;
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ exports.addFileToProject = addFileToProject; exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.getGetProjectFileQueryKey = getGetProjectFileQueryKey; exports.getGetProjectFileWithTokenQueryKey = getGetProjectFileWithTokenQueryKey; exports.getProjectFile = getProjectFile; exports.getProjectFileWithToken = getProjectFileWithToken; exports.moveFileInProject = moveFileInProject; exports.movePath = movePath; exports.useAddFileToProject = useAddFileToProject; exports.useAddFileToProjectMutationOptions = useAddFileToProjectMutationOptions; exports.useAttachFile = useAttachFile; exports.useAttachFileMutationOptions = useAttachFileMutationOptions; exports.useCreatePath = useCreatePath; exports.useCreatePathMutationOptions = useCreatePathMutationOptions; exports.useDeleteFile = useDeleteFile; exports.useDeleteFileMutationOptions = useDeleteFileMutationOptions; exports.useDeletePath = useDeletePath; exports.useDeletePathMutationOptions = useDeletePathMutationOptions; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDeleteUnmanagedFileMutationOptions = useDeleteUnmanagedFileMutationOptions; exports.useDownloadFile = useDownloadFile; exports.useDownloadFileQueryOptions = useDownloadFileQueryOptions; exports.useDownloadFileSuspense = useDownloadFileSuspense; exports.useDownloadFileSuspenseQueryOptions = useDownloadFileSuspenseQueryOptions; exports.useGetFiles = useGetFiles; exports.useGetFilesQueryOptions = useGetFilesQueryOptions; exports.useGetFilesSuspense = useGetFilesSuspense; exports.useGetFilesSuspenseQueryOptions = useGetFilesSuspenseQueryOptions; exports.useGetProjectFile = useGetProjectFile; exports.useGetProjectFileQueryOptions = useGetProjectFileQueryOptions; exports.useGetProjectFileSuspense = useGetProjectFileSuspense; exports.useGetProjectFileSuspenseQueryOptions = useGetProjectFileSuspenseQueryOptions; exports.useGetProjectFileWithToken = useGetProjectFileWithToken; exports.useGetProjectFileWithTokenQueryOptions = useGetProjectFileWithTokenQueryOptions; exports.useGetProjectFileWithTokenSuspense = useGetProjectFileWithTokenSuspense; exports.useGetProjectFileWithTokenSuspenseQueryOptions = useGetProjectFileWithTokenSuspenseQueryOptions; exports.useMoveFileInProject = useMoveFileInProject; exports.useMoveFileInProjectMutationOptions = useMoveFileInProjectMutationOptions; exports.useMovePath = useMovePath; exports.useMovePathMutationOptions = useMovePathMutationOptions;
252
374
  //# sourceMappingURL=file-and-path.cjs.map
@@ -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;AACA;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACA;ACEA,mDAAwD;AA6CjD,IAAM,WAAA,EAAa,CACxB,MAAA,EACA,OAAA,EAAA,GACG;AACH,EAAA,OA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A,EAAA,GAMG;AACH,EAAA,MAAM,gBAAA,EAAkB,mCAAA,CAAoC,OAAO,CAAA;AAEnE,EAAA,OAAO,qCAAA,eAAY,EAAiB,WAAW,CAAA;AACjD,CAAA;AAUO,IAAM,WAAA,EAAa,CAAC,MAAA,EAAgB,OAAA,EAAA,GAAqD;AAC9F,EAAA,OAAO,8CAAA,EAAuB,GAAA,EAAK,CAAA,MAAA,EAAS,MAAM,CAAA,CAAA;AACpD;AAKE;AAciC,EAAA;AACW,EAAA;AAQvC,EAAA;AAC0B,IAAA;AAEW,IAAA;AAC1C,EAAA;AAE2C,EAAA;AAEpC,EAAA;AACT;AAyBK;AACqB,EAAA;AAEY,EAAA;AACtC;AAWE;AAEkD,EAAA;AACpD;AAE2D;AAChC,EAAA;AAC3B;AAOE;AAKsC,EAAA;AAEK,EAAA;AAG5B,EAAA;AAEyB,EAAA;AAEjC,EAAA;AAKT;AAmEE;AAEqB,EAAA;AAEgB,EAAA;AAIP,EAAA;AAEvB,EAAA;AACT;AAME;AAQsC,EAAA;AAEK,EAAA;AAG5B,EAAA;AAEyB,EAAA;AAEjC,EAAA;AAKT;AAqDE;AAQqB,EAAA;AAEwB,EAAA;AAKf,EAAA;AAEvB,EAAA;AACT;ADr1B+C;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,"/**\n * Generated by orval v7.10.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**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 4.1\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\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\";\n\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { mutationMutator } from \".././options-mutator\";\nimport { queryMutator } from \".././options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\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 return customInstance<void>({ url: `/path`, method: \"PUT\", params }, options);\n};\n\nexport const useCreatePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationKey = [\"createPath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPath>>,\n { params: CreatePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return createPath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>;\n\nexport type CreatePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationOptions = useCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/path`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeletePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationKey = [\"deletePath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deletePath>>,\n { params: DeletePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deletePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>;\n\nexport type DeletePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationOptions = useDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/path/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMovePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationKey = [\"movePath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof movePath>>,\n { params: MovePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return movePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>;\n\nexport type MovePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationOptions = useMovePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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>,\n signal?: AbortSignal,\n) => {\n return customInstance<FilesGetResponse>({ url: `/file`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetFilesQueryKey = (params: GetFilesParams) => {\n return [`/file`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetFilesQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesQueryError = ErrorType<void | DmError>;\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetFilesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\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 signal?: AbortSignal,\n) => {\n const formUrlEncoded = new URLSearchParams();\n formUrlEncoded.append(`dataset_id`, filePostBodyBody.dataset_id);\n formUrlEncoded.append(`dataset_version`, filePostBodyBody.dataset_version.toString());\n formUrlEncoded.append(`project_id`, filePostBodyBody.project_id);\n formUrlEncoded.append(`as_type`, filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formUrlEncoded.append(`path`, filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formUrlEncoded.append(`compress`, filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formUrlEncoded.append(`immutable`, filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n {\n url: `/file`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n data: formUrlEncoded,\n signal,\n },\n options,\n );\n};\n\nexport const useAttachFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationKey = [\"attachFile\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof attachFile>>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return attachFile(data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>;\nexport type AttachFileMutationBody = FilePostBodyBody;\nexport 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>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationOptions = useAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/file`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeleteUnmanagedFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationKey = [\"deleteUnmanagedFile\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n { params: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteUnmanagedFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>\n>;\n\nexport type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationOptions = useDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/file/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMoveFileInProjectMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationKey = [\"moveFileInProject\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof moveFileInProject>>,\n { params: MoveFileInProjectParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return moveFileInProject(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MoveFileInProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof moveFileInProject>>\n>;\n\nexport type MoveFileInProjectMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationOptions = useMoveFileInProjectMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 = (fileId: string, options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationKey = [\"deleteFile\"];\n const { 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 const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, { fileId: string }> = (\n props,\n ) => {\n const { fileId } = props ?? {};\n\n return deleteFile(fileId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>;\n\nexport type DeleteFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationOptions = useDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 signal?: AbortSignal,\n) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"GET\", signal }, options);\n};\n\nexport const getDownloadFileQueryKey = (fileId: string) => {\n return [`/file/${fileId}`] as const;\n};\n\nexport const useDownloadFileQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileQueryOptions(fileId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useDownloadFileSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileSuspenseQueryOptions(fileId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"]}
1
+ {"version":3,"sources":["/builds/informaticsmatters/squonk2-data-manager/openapi-client/dist/file-and-path/file-and-path.cjs","../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACA;ACEA,mDAAwD;AAgDjD,IAAM,WAAA,EAAa,CACxB,MAAA,EACA,OAAA,EAAA,GACG;AACH,EAAA,OAAO,8CAAA,EAAuB,GAAA,EAAK,CAAA,KAAA,CAAA,EAAS,MAAA,EAAQ,KAAA,EAAO,OAAO,CAAA,EAAG,OAAO,CAAA;AAC9E,CAAA;AAEO,IAAM,6BAAA,EAA+B,CAG1C,OAAA,EAAA,GAaG;AACH,EAAA,MAAM,YAAA,EAAc,CAAC,YAAY,CAAA;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAiB,OAAA,EAAS,eAAe,EAAA,EAAI,QAAA,EAC3D,OAAA,CAAQ,SAAA,GAAY,cAAA,GAAiB,OAAA,CAAQ,SAAA,GAAY,OAAA,CAAQ,QAAA,CAAS,YAAA,EACxE,QAAA,EACA,EAAE,GAAG,OAAA,EAAS,QAAA,EAAU,EAAE,GAAG,OAAA,CAAQ,QAAA,EAAU,YAAY,EAAE,EAAA,EAC/D,EAAE,QAAA,EAAU,EAAE,YAAY,CAAA,EAAG,OAAA,EAAS,KAAA,EAAU,CAAA;AAEpD,EAAA,MAAM,WAAA,EAGF,CAAC,KAAA,EAAA,GAAU;AACb,IAAA,MAAM,EAAE,OAAO,EAAA,mBAAI,KAAA,UAAS,CAAC,GAAA;AAE7B,IAAA,OAAO,UAAA,CAAW,MAAA,EAAQ,cAAc,CAAA;AAAA,EAC1C,CAAA;AAEA,EAAA,MAAM,cAAA,EAAgB,+CAAA,EAAkB,GAAG,eAAA,EAAiB,WAAW,CAAC,CAAA;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A;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":"/builds/informaticsmatters/squonk2-data-manager/openapi-client/dist/file-and-path/file-and-path.cjs","sourcesContent":[null,"/**\n * Generated by orval v7.10.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**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 5.0\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams,\n GetProjectFileParams,\n GetProjectFileWithTokenParams,\n MoveFileInProjectParams,\n MovePathParams,\n ProjectFilePutBodyBody,\n} from \"../API_TARGET_NAME.schemas\";\n\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { mutationMutator } from \".././options-mutator\";\nimport { queryMutator } from \".././options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\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 return customInstance<void>({ url: `/path`, method: \"PUT\", params }, options);\n};\n\nexport const useCreatePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationKey = [\"createPath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPath>>,\n { params: CreatePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return createPath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>;\n\nexport type CreatePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationOptions = useCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/path`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeletePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationKey = [\"deletePath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deletePath>>,\n { params: DeletePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deletePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>;\n\nexport type DeletePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationOptions = useDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/path/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMovePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationKey = [\"movePath\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof movePath>>,\n { params: MovePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return movePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>;\n\nexport type MovePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationOptions = useMovePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nYou must be an `editor` of the Project if the Project is `private`\n\n * @summary Download a Project file\n */\nexport const getProjectFile = (\n projectId: string,\n params: GetProjectFileParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/file`, method: \"GET\", params, signal },\n options,\n );\n};\n\nexport const getGetProjectFileQueryKey = (projectId: string, params: GetProjectFileParams) => {\n return [`/project/${projectId}/file`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetProjectFileQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) =>\n getProjectFile(projectId, params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;\nexport type GetProjectFileQueryError = ErrorType<void | DmError>;\n\nexport function useGetProjectFile<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n Awaited<ReturnType<typeof getProjectFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFile<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n Awaited<ReturnType<typeof getProjectFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFile<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a Project file\n */\n\nexport function useGetProjectFile<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProjectFileQueryOptions(projectId, params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProjectFileSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) =>\n getProjectFile(projectId, params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProjectFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProjectFileSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjectFile>>\n>;\nexport type GetProjectFileSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useGetProjectFileSuspense<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileSuspense<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileSuspense<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a Project file\n */\n\nexport function useGetProjectFileSuspense<\n TData = Awaited<ReturnType<typeof getProjectFile>>,\n TError = ErrorType<void | DmError>,\n>(\n projectId: string,\n params: GetProjectFileParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProjectFileSuspenseQueryOptions(projectId, params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.\n\nYou must be an `editor` of the project\n\n * @summary Upload a file into a Project\n */\nexport const addFileToProject = (\n projectId: string,\n projectFilePutBodyBody: ProjectFilePutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n const formData = new FormData();\n formData.append(`file`, projectFilePutBodyBody.file);\n if (projectFilePutBodyBody.as_filename !== undefined) {\n formData.append(`as_filename`, projectFilePutBodyBody.as_filename);\n }\n if (projectFilePutBodyBody.path !== undefined) {\n formData.append(`path`, projectFilePutBodyBody.path);\n }\n\n return customInstance<void>(\n {\n url: `/project/${projectId}/file`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options,\n );\n};\n\nexport const useAddFileToProjectMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n> => {\n const mutationKey = [\"addFileToProject\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addFileToProject>>,\n { projectId: string; data: ProjectFilePutBodyBody }\n > = (props) => {\n const { projectId, data } = props ?? {};\n\n return addFileToProject(projectId, data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AddFileToProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof addFileToProject>>\n>;\nexport type AddFileToProjectMutationBody = ProjectFilePutBodyBody;\nexport type AddFileToProjectMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Upload a file into a Project\n */\nexport const useAddFileToProject = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof addFileToProject>>,\n TError,\n { projectId: string; data: ProjectFilePutBodyBody },\n TContext\n> => {\n const mutationOptions = useAddFileToProjectMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).\n\nFor **managed** files you should consider using the `/file/{file_id}` endpoint.\n\nAs there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.\n\n * @summary Download a Project file using a Token\n */\nexport const getProjectFileWithToken = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<void>(\n { url: `/project/${projectId}/file-with-token`, method: \"GET\", params, signal },\n options,\n );\n};\n\nexport const getGetProjectFileWithTokenQueryKey = (\n projectId: string,\n params: GetProjectFileWithTokenParams,\n) => {\n return [`/project/${projectId}/file-with-token`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetProjectFileWithTokenQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({\n signal,\n }) => getProjectFileWithToken(projectId, params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProjectFileWithTokenQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n>;\nexport type GetProjectFileWithTokenQueryError = ErrorType<DmError>;\n\nexport function useGetProjectFileWithToken<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileWithToken<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileWithToken<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a Project file using a Token\n */\n\nexport function useGetProjectFileWithToken<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProjectFileWithTokenQueryOptions(projectId, params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProjectFileWithTokenSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({\n signal,\n }) => getProjectFileWithToken(projectId, params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProjectFileWithToken>>\n>;\nexport type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>;\n\nexport function useGetProjectFileWithTokenSuspense<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileWithTokenSuspense<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProjectFileWithTokenSuspense<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a Project file using a Token\n */\n\nexport function useGetProjectFileWithTokenSuspense<\n TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,\n TError = ErrorType<DmError>,\n>(\n projectId: string,\n params: GetProjectFileWithTokenParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\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>,\n signal?: AbortSignal,\n) => {\n return customInstance<FilesGetResponse>({ url: `/file`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetFilesQueryKey = (params: GetFilesParams) => {\n return [`/file`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetFilesQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesQueryError = ErrorType<void | DmError>;\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetFilesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\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 signal?: AbortSignal,\n) => {\n const formUrlEncoded = new URLSearchParams();\n formUrlEncoded.append(`dataset_id`, filePostBodyBody.dataset_id);\n formUrlEncoded.append(`dataset_version`, filePostBodyBody.dataset_version.toString());\n formUrlEncoded.append(`project_id`, filePostBodyBody.project_id);\n formUrlEncoded.append(`as_type`, filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formUrlEncoded.append(`path`, filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formUrlEncoded.append(`compress`, filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formUrlEncoded.append(`immutable`, filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n {\n url: `/file`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n data: formUrlEncoded,\n signal,\n },\n options,\n );\n};\n\nexport const useAttachFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationKey = [\"attachFile\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof attachFile>>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return attachFile(data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>;\nexport type AttachFileMutationBody = FilePostBodyBody;\nexport 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>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationOptions = useAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/file`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeleteUnmanagedFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationKey = [\"deleteUnmanagedFile\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n { params: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteUnmanagedFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>\n>;\n\nexport type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationOptions = useDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 return customInstance<void>({ url: `/file/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMoveFileInProjectMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationKey = [\"moveFileInProject\"];\n const { 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 const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof moveFileInProject>>,\n { params: MoveFileInProjectParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return moveFileInProject(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MoveFileInProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof moveFileInProject>>\n>;\n\nexport type MoveFileInProjectMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationOptions = useMoveFileInProjectMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 = (fileId: string, options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationKey = [\"deleteFile\"];\n const { 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 const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, { fileId: string }> = (\n props,\n ) => {\n const { fileId } = props ?? {};\n\n return deleteFile(fileId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>;\n\nexport type DeleteFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationOptions = useDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\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 signal?: AbortSignal,\n) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"GET\", signal }, options);\n};\n\nexport const getDownloadFileQueryKey = (fileId: string) => {\n return [`/file/${fileId}`] as const;\n};\n\nexport const useDownloadFileQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileQueryOptions(fileId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useDownloadFileSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileSuspenseQueryOptions(fileId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"]}