@squonk/data-manager-client 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +1 -1
  2. package/accounting/accounting.cjs +51 -8
  3. package/accounting/accounting.cjs.map +1 -1
  4. package/accounting/accounting.d.cts +61 -10
  5. package/accounting/accounting.d.ts +61 -10
  6. package/accounting/accounting.js +49 -6
  7. package/accounting/accounting.js.map +1 -1
  8. package/admin/admin.cjs +67 -24
  9. package/admin/admin.cjs.map +1 -1
  10. package/admin/admin.d.cts +75 -24
  11. package/admin/admin.d.ts +75 -24
  12. package/admin/admin.js +56 -13
  13. package/admin/admin.js.map +1 -1
  14. package/application/application.cjs +35 -6
  15. package/application/application.cjs.map +1 -1
  16. package/application/application.d.cts +42 -8
  17. package/application/application.d.ts +42 -8
  18. package/application/application.js +34 -5
  19. package/application/application.js.map +1 -1
  20. package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
  21. package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
  22. package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
  23. package/chunk-TKLTUR4R.cjs.map +1 -0
  24. package/configuration/configuration.cjs +19 -4
  25. package/configuration/configuration.cjs.map +1 -1
  26. package/configuration/configuration.d.cts +23 -6
  27. package/configuration/configuration.d.ts +23 -6
  28. package/configuration/configuration.js +19 -4
  29. package/configuration/configuration.js.map +1 -1
  30. package/dataset/dataset.cjs +93 -22
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +105 -20
  33. package/dataset/dataset.d.ts +105 -20
  34. package/dataset/dataset.js +83 -12
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +71 -14
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +83 -15
  39. package/exchange-rate/exchange-rate.d.ts +83 -15
  40. package/exchange-rate/exchange-rate.js +65 -8
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file-and-path/file-and-path.cjs +45 -16
  43. package/file-and-path/file-and-path.cjs.map +1 -1
  44. package/file-and-path/file-and-path.d.cts +48 -14
  45. package/file-and-path/file-and-path.d.ts +48 -14
  46. package/file-and-path/file-and-path.js +39 -10
  47. package/file-and-path/file-and-path.js.map +1 -1
  48. package/index.cjs +9 -2
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2033 -2
  51. package/index.d.ts +2033 -2
  52. package/index.js +8 -1
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +45 -16
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +48 -14
  57. package/instance/instance.d.ts +48 -14
  58. package/instance/instance.js +38 -9
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +51 -8
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +61 -10
  63. package/job/job.d.ts +61 -10
  64. package/job/job.js +49 -6
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +39 -10
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +45 -11
  69. package/metadata/metadata.d.ts +45 -11
  70. package/metadata/metadata.js +36 -7
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +11 -11
  73. package/project/project.cjs +83 -26
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +89 -21
  76. package/project/project.d.ts +89 -21
  77. package/project/project.js +71 -14
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +136 -22
  80. package/src/admin/admin.ts +148 -50
  81. package/src/application/application.ts +93 -18
  82. package/src/configuration/configuration.ts +50 -14
  83. package/src/custom-instance.ts +3 -4
  84. package/src/data-manager-api.schemas.ts +59 -33
  85. package/src/dataset/dataset.ts +233 -45
  86. package/src/exchange-rate/exchange-rate.ts +185 -32
  87. package/src/file-and-path/file-and-path.ts +98 -33
  88. package/src/instance/instance.ts +98 -33
  89. package/src/job/job.ts +138 -22
  90. package/src/metadata/metadata.ts +97 -24
  91. package/src/project/project.ts +191 -50
  92. package/src/task/task.ts +96 -21
  93. package/src/type/type.ts +50 -14
  94. package/src/user/user.ts +137 -25
  95. package/task/task.cjs +37 -8
  96. package/task/task.cjs.map +1 -1
  97. package/task/task.d.cts +44 -10
  98. package/task/task.d.ts +44 -10
  99. package/task/task.js +35 -6
  100. package/task/task.js.map +1 -1
  101. package/type/type.cjs +19 -4
  102. package/type/type.cjs.map +1 -1
  103. package/type/type.d.cts +23 -6
  104. package/type/type.d.ts +23 -6
  105. package/type/type.js +19 -4
  106. package/type/type.js.map +1 -1
  107. package/user/user.cjs +53 -10
  108. package/user/user.cjs.map +1 -1
  109. package/user/user.d.cts +63 -12
  110. package/user/user.d.ts +63 -12
  111. package/user/user.js +49 -6
  112. package/user/user.js.map +1 -1
  113. package/chunk-J22A7LHX.cjs.map +0 -1
  114. package/custom-instance-37ed2460.d.ts +0 -2014
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-UKA7G3OB.js";
3
+ } from "../chunk-EBOQPVLG.js";
4
4
 
5
5
  // src/exchange-rate/exchange-rate.ts
6
6
  import {
7
7
  useMutation,
8
- useQuery
8
+ useQuery,
9
+ useSuspenseQuery
9
10
  } from "@tanstack/react-query";
10
11
  var getAllApplicationExchangeRates = (params, options, signal) => {
11
12
  return customInstance(
12
13
  {
13
14
  url: `/application/exchange-rate`,
14
- method: "get",
15
+ method: "GET",
15
16
  params,
16
17
  signal
17
18
  },
@@ -33,6 +34,18 @@ var useGetAllApplicationExchangeRates = (params, options) => {
33
34
  query.queryKey = queryOptions.queryKey;
34
35
  return query;
35
36
  };
37
+ var getGetAllApplicationExchangeRatesSuspenseQueryOptions = (params, options) => {
38
+ const { query: queryOptions, request: requestOptions } = options ?? {};
39
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAllApplicationExchangeRatesQueryKey(params);
40
+ const queryFn = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);
41
+ return { queryKey, queryFn, ...queryOptions };
42
+ };
43
+ var useGetAllApplicationExchangeRatesSuspense = (params, options) => {
44
+ const queryOptions = getGetAllApplicationExchangeRatesSuspenseQueryOptions(params, options);
45
+ const query = useSuspenseQuery(queryOptions);
46
+ query.queryKey = queryOptions.queryKey;
47
+ return query;
48
+ };
36
49
  var setApplicationExchangeRate = (applicationId, exchangeRatePutBodyBody, options) => {
37
50
  const formData = new FormData();
38
51
  formData.append("rate", exchangeRatePutBodyBody.rate);
@@ -42,7 +55,7 @@ var setApplicationExchangeRate = (applicationId, exchangeRatePutBodyBody, option
42
55
  return customInstance(
43
56
  {
44
57
  url: `/application/${applicationId}/exchange-rate`,
45
- method: "put",
58
+ method: "PUT",
46
59
  headers: { "Content-Type": "multipart/form-data" },
47
60
  data: formData
48
61
  },
@@ -65,7 +78,7 @@ var getApplicationExchangeRates = (applicationId, params, options, signal) => {
65
78
  return customInstance(
66
79
  {
67
80
  url: `/application/${applicationId}/exchange-rate`,
68
- method: "get",
81
+ method: "GET",
69
82
  params,
70
83
  signal
71
84
  },
@@ -87,11 +100,23 @@ var useGetApplicationExchangeRates = (applicationId, params, options) => {
87
100
  query.queryKey = queryOptions.queryKey;
88
101
  return query;
89
102
  };
103
+ var getGetApplicationExchangeRatesSuspenseQueryOptions = (applicationId, params, options) => {
104
+ const { query: queryOptions, request: requestOptions } = options ?? {};
105
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationExchangeRatesQueryKey(applicationId, params);
106
+ const queryFn = ({ signal }) => getApplicationExchangeRates(applicationId, params, requestOptions, signal);
107
+ return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
108
+ };
109
+ var useGetApplicationExchangeRatesSuspense = (applicationId, params, options) => {
110
+ const queryOptions = getGetApplicationExchangeRatesSuspenseQueryOptions(applicationId, params, options);
111
+ const query = useSuspenseQuery(queryOptions);
112
+ query.queryKey = queryOptions.queryKey;
113
+ return query;
114
+ };
90
115
  var getAllJobExchangeRates = (params, options, signal) => {
91
116
  return customInstance(
92
117
  {
93
118
  url: `/job/exchange-rate`,
94
- method: "get",
119
+ method: "GET",
95
120
  params,
96
121
  signal
97
122
  },
@@ -113,6 +138,18 @@ var useGetAllJobExchangeRates = (params, options) => {
113
138
  query.queryKey = queryOptions.queryKey;
114
139
  return query;
115
140
  };
141
+ var getGetAllJobExchangeRatesSuspenseQueryOptions = (params, options) => {
142
+ const { query: queryOptions, request: requestOptions } = options ?? {};
143
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetAllJobExchangeRatesQueryKey(params);
144
+ const queryFn = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);
145
+ return { queryKey, queryFn, ...queryOptions };
146
+ };
147
+ var useGetAllJobExchangeRatesSuspense = (params, options) => {
148
+ const queryOptions = getGetAllJobExchangeRatesSuspenseQueryOptions(params, options);
149
+ const query = useSuspenseQuery(queryOptions);
150
+ query.queryKey = queryOptions.queryKey;
151
+ return query;
152
+ };
116
153
  var setJobPricing = (jobId, exchangeRatePutBodyBody, options) => {
117
154
  const formData = new FormData();
118
155
  formData.append("rate", exchangeRatePutBodyBody.rate);
@@ -122,7 +159,7 @@ var setJobPricing = (jobId, exchangeRatePutBodyBody, options) => {
122
159
  return customInstance(
123
160
  {
124
161
  url: `/job/${jobId}/exchange-rate`,
125
- method: "put",
162
+ method: "PUT",
126
163
  headers: { "Content-Type": "multipart/form-data" },
127
164
  data: formData
128
165
  },
@@ -145,7 +182,7 @@ var getJobExchangeRates = (jobId, params, options, signal) => {
145
182
  return customInstance(
146
183
  {
147
184
  url: `/job/${jobId}/exchange-rate`,
148
- method: "get",
185
+ method: "GET",
149
186
  params,
150
187
  signal
151
188
  },
@@ -167,27 +204,47 @@ var useGetJobExchangeRates = (jobId, params, options) => {
167
204
  query.queryKey = queryOptions.queryKey;
168
205
  return query;
169
206
  };
207
+ var getGetJobExchangeRatesSuspenseQueryOptions = (jobId, params, options) => {
208
+ const { query: queryOptions, request: requestOptions } = options ?? {};
209
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetJobExchangeRatesQueryKey(jobId, params);
210
+ const queryFn = ({ signal }) => getJobExchangeRates(jobId, params, requestOptions, signal);
211
+ return { queryKey, queryFn, enabled: !!jobId, ...queryOptions };
212
+ };
213
+ var useGetJobExchangeRatesSuspense = (jobId, params, options) => {
214
+ const queryOptions = getGetJobExchangeRatesSuspenseQueryOptions(jobId, params, options);
215
+ const query = useSuspenseQuery(queryOptions);
216
+ query.queryKey = queryOptions.queryKey;
217
+ return query;
218
+ };
170
219
  export {
171
220
  getAllApplicationExchangeRates,
172
221
  getAllJobExchangeRates,
173
222
  getApplicationExchangeRates,
174
223
  getGetAllApplicationExchangeRatesQueryKey,
175
224
  getGetAllApplicationExchangeRatesQueryOptions,
225
+ getGetAllApplicationExchangeRatesSuspenseQueryOptions,
176
226
  getGetAllJobExchangeRatesQueryKey,
177
227
  getGetAllJobExchangeRatesQueryOptions,
228
+ getGetAllJobExchangeRatesSuspenseQueryOptions,
178
229
  getGetApplicationExchangeRatesQueryKey,
179
230
  getGetApplicationExchangeRatesQueryOptions,
231
+ getGetApplicationExchangeRatesSuspenseQueryOptions,
180
232
  getGetJobExchangeRatesQueryKey,
181
233
  getGetJobExchangeRatesQueryOptions,
234
+ getGetJobExchangeRatesSuspenseQueryOptions,
182
235
  getJobExchangeRates,
183
236
  getSetApplicationExchangeRateMutationOptions,
184
237
  getSetJobPricingMutationOptions,
185
238
  setApplicationExchangeRate,
186
239
  setJobPricing,
187
240
  useGetAllApplicationExchangeRates,
241
+ useGetAllApplicationExchangeRatesSuspense,
188
242
  useGetAllJobExchangeRates,
243
+ useGetAllJobExchangeRatesSuspense,
189
244
  useGetApplicationExchangeRates,
245
+ useGetApplicationExchangeRatesSuspense,
190
246
  useGetJobExchangeRates,
247
+ useGetJobExchangeRatesSuspense,
191
248
  useSetApplicationExchangeRate,
192
249
  useSetJobPricing
193
250
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exchange-rate/exchange-rate.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n ExchangeRatePutBodyBody,\n GetAllApplicationExchangeRatesParams,\n GetAllExchangeRatesResponse,\n GetAllJobExchangeRatesParams,\n GetApplicationExchangeRatesParams,\n GetExchangeRatesResponse,\n GetJobExchangeRatesParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * For every Application that has an exchange rate the current rate is returned. If you want a list of all Applications that have no exchange rate, set the `only_undefined` query option.\n\nIf an Application has no specific rate it adopts the current value of the default Application Exchange Rate.\n\n * @summary Gets Exchange Rates for all Applications\n */\nexport const getAllApplicationExchangeRates = (\n params?: GetAllApplicationExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetAllExchangeRatesResponse>(\n {url: `/application/exchange-rate`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAllApplicationExchangeRatesQueryKey = (params?: GetAllApplicationExchangeRatesParams,) => {\n \n return [\"data-manager-api\", `/application/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAllApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>>\nexport type GetAllApplicationExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Applications\n */\nexport const useGetAllApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllApplicationExchangeRatesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Sets the Exchange Rate for a specific Application. The rate replaces any existing rate for the Application and applies to all future executions of the Application.\n\nIf an Application has no specific rate it adopts the current value of the default Application Exchange Rate.\n\nYou need `admin` privilege to use this method.\n\n * @summary Sets the Exchange Rate for a specific Application\n */\nexport const setApplicationExchangeRate = (\n applicationId: string,\n exchangeRatePutBodyBody: ExchangeRatePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('rate', exchangeRatePutBodyBody.rate)\nif(exchangeRatePutBodyBody.comment !== undefined) {\n formData.append('comment', exchangeRatePutBodyBody.comment)\n }\n\n return customInstance<void>(\n {url: `/application/${applicationId}/exchange-rate`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getSetApplicationExchangeRateMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof setApplicationExchangeRate>>, {applicationId: string;data: ExchangeRatePutBodyBody}> = (props) => {\n const {applicationId,data} = props ?? {};\n\n return setApplicationExchangeRate(applicationId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetApplicationExchangeRateMutationResult = NonNullable<Awaited<ReturnType<typeof setApplicationExchangeRate>>>\n export type SetApplicationExchangeRateMutationBody = ExchangeRatePutBodyBody\n export type SetApplicationExchangeRateMutationError = ErrorType<DmError>\n\n /**\n * @summary Sets the Exchange Rate for a specific Application\n */\nexport const useSetApplicationExchangeRate = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getSetApplicationExchangeRateMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the exchange rate history for a specific Application. Rates are returned in reverse chronological order, with the most recent rate, the current rate, as the first entry in the list.\n\n * @summary Gets the Application's Exchange Rate history\n */\nexport const getApplicationExchangeRates = (\n applicationId: string,\n params?: GetApplicationExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetExchangeRatesResponse>(\n {url: `/application/${applicationId}/exchange-rate`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetApplicationExchangeRatesQueryKey = (applicationId: string,\n params?: GetApplicationExchangeRatesParams,) => {\n \n return [\"data-manager-api\", `/application/${applicationId}/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({ signal }) => getApplicationExchangeRates(applicationId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getApplicationExchangeRates>>>\nexport type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Application's Exchange Rate history\n */\nexport const useGetApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationExchangeRatesQueryOptions(applicationId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * For every Job that has an exchange rate the current rate is returned. If you want a list of all Jobs that have no exchange rate, set the `only_undefined` query option.\n\n * @summary Gets Exchange Rates for all Jobs\n */\nexport const getAllJobExchangeRates = (\n params?: GetAllJobExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetAllExchangeRatesResponse>(\n {url: `/job/exchange-rate`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAllJobExchangeRatesQueryKey = (params?: GetAllJobExchangeRatesParams,) => {\n \n return [\"data-manager-api\", `/job/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAllJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllJobExchangeRates>>>\nexport type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Jobs\n */\nexport const useGetAllJobExchangeRates = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllJobExchangeRatesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Sets the Exchange Rate for a specific job. The rate replaces any existing rate for the Job and applies immediately and future job executions for this Job will inherit this rate.\n\nExchange rates are divided by an internal **scale factor** prior to being applied. The scale factor has a value of 1,000. The scale factor is used to make the exchange rates a little easier to digest, because without this on some jobs we would need to support values ike '0.00001'. With a scale factor of `1,000` the exchange rate is a much more humanly-digestible, e.g. '0.00001' becomes '0.01'.\n\nIf a Job has no specific rate it adopts the current value of the default Job Exchange Rate.\n\nYou need `admin` privilege to use this method.\n\n * @summary Sets the Exchange Rate for a specific Job\n */\nexport const setJobPricing = (\n jobId: number,\n exchangeRatePutBodyBody: ExchangeRatePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('rate', exchangeRatePutBodyBody.rate)\nif(exchangeRatePutBodyBody.comment !== undefined) {\n formData.append('comment', exchangeRatePutBodyBody.comment)\n }\n\n return customInstance<void>(\n {url: `/job/${jobId}/exchange-rate`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getSetJobPricingMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof setJobPricing>>, {jobId: number;data: ExchangeRatePutBodyBody}> = (props) => {\n const {jobId,data} = props ?? {};\n\n return setJobPricing(jobId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetJobPricingMutationResult = NonNullable<Awaited<ReturnType<typeof setJobPricing>>>\n export type SetJobPricingMutationBody = ExchangeRatePutBodyBody\n export type SetJobPricingMutationError = ErrorType<DmError>\n\n /**\n * @summary Sets the Exchange Rate for a specific Job\n */\nexport const useSetJobPricing = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getSetJobPricingMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets all the exchange rate history for a specific Job. Rates are returned in reverse chronological order, with the most recent rate, the current rate, as the first entry in the list.\n\n * @summary Gets Job Exchange Rates\n */\nexport const getJobExchangeRates = (\n jobId: number,\n params?: GetJobExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetExchangeRatesResponse>(\n {url: `/job/${jobId}/exchange-rate`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobExchangeRatesQueryKey = (jobId: number,\n params?: GetJobExchangeRatesParams,) => {\n \n return [\"data-manager-api\", `/job/${jobId}/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) => getJobExchangeRates(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getJobExchangeRates>>>\nexport type GetJobExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Job Exchange Rates\n */\nexport const useGetJobExchangeRates = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobExchangeRatesQueryOptions(jobId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAuCA,IAAM,iCAAiC,CAC1C,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAA8B,QAAQ;AAAA,MAC1C;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,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Q;AAAA,MAC3C;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,iCAAiC,CAAC,OAC3C,WAAwC;AAExC,SAAO,CAAC,oBAAoB,QAAQ,KAAK,kBAAkB,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AACrF;AAGG,IAAM,qCAAqC,CAA8F,OAC5I,QAAoC,YACnC;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,+BAA+B,OAAM,MAAM;AAIrF,QAAM,UAA0E,CAAC,EAAE,OAAO,MAAM,oBAAoB,OAAM,QAAQ,gBAAgB,MAAM;AAMzJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,OAAQ,GAAG,aAAY;AACnE;AAQO,IAAM,yBAAyB,CACrC,OACG,QAAoC,YAEwB;AAE9D,QAAM,eAAe,mCAAmC,OAAM,QAAO,OAAO;AAE5E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/exchange-rate/exchange-rate.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n ExchangeRatePutBodyBody,\n GetAllApplicationExchangeRatesParams,\n GetAllExchangeRatesResponse,\n GetAllJobExchangeRatesParams,\n GetApplicationExchangeRatesParams,\n GetExchangeRatesResponse,\n GetJobExchangeRatesParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * For every Application that has an exchange rate the current rate is returned. If you want a list of all Applications that have no exchange rate, set the `only_undefined` query option.\n\nIf an Application has no specific rate it adopts the current value of the default Application Exchange Rate.\n\n * @summary Gets Exchange Rates for all Applications\n */\nexport const getAllApplicationExchangeRates = (\n params?: GetAllApplicationExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetAllExchangeRatesResponse>(\n {url: `/application/exchange-rate`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAllApplicationExchangeRatesQueryKey = (params?: GetAllApplicationExchangeRatesParams,) => {\n return [\"data-manager-api\", `/application/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAllApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>>\nexport type GetAllApplicationExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Applications\n */\nexport const useGetAllApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllApplicationExchangeRatesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAllApplicationExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllApplicationExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>>\nexport type GetAllApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Applications\n */\nexport const useGetAllApplicationExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllApplicationExchangeRatesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Sets the Exchange Rate for a specific Application. The rate replaces any existing rate for the Application and applies to all future executions of the Application.\n\nIf an Application has no specific rate it adopts the current value of the default Application Exchange Rate.\n\nYou need `admin` privilege to use this method.\n\n * @summary Sets the Exchange Rate for a specific Application\n */\nexport const setApplicationExchangeRate = (\n applicationId: string,\n exchangeRatePutBodyBody: ExchangeRatePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('rate', exchangeRatePutBodyBody.rate)\nif(exchangeRatePutBodyBody.comment !== undefined) {\n formData.append('comment', exchangeRatePutBodyBody.comment)\n }\n\n return customInstance<void>(\n {url: `/application/${applicationId}/exchange-rate`, method: 'PUT',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getSetApplicationExchangeRateMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof setApplicationExchangeRate>>, {applicationId: string;data: ExchangeRatePutBodyBody}> = (props) => {\n const {applicationId,data} = props ?? {};\n\n return setApplicationExchangeRate(applicationId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetApplicationExchangeRateMutationResult = NonNullable<Awaited<ReturnType<typeof setApplicationExchangeRate>>>\n export type SetApplicationExchangeRateMutationBody = ExchangeRatePutBodyBody\n export type SetApplicationExchangeRateMutationError = ErrorType<DmError>\n\n /**\n * @summary Sets the Exchange Rate for a specific Application\n */\nexport const useSetApplicationExchangeRate = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getSetApplicationExchangeRateMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the exchange rate history for a specific Application. Rates are returned in reverse chronological order, with the most recent rate, the current rate, as the first entry in the list.\n\n * @summary Gets the Application's Exchange Rate history\n */\nexport const getApplicationExchangeRates = (\n applicationId: string,\n params?: GetApplicationExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetExchangeRatesResponse>(\n {url: `/application/${applicationId}/exchange-rate`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetApplicationExchangeRatesQueryKey = (applicationId: string,\n params?: GetApplicationExchangeRatesParams,) => {\n return [\"data-manager-api\", `/application/${applicationId}/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({ signal }) => getApplicationExchangeRates(applicationId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getApplicationExchangeRates>>>\nexport type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Application's Exchange Rate history\n */\nexport const useGetApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationExchangeRatesQueryOptions(applicationId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetApplicationExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({ signal }) => getApplicationExchangeRates(applicationId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getApplicationExchangeRates>>>\nexport type GetApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Application's Exchange Rate history\n */\nexport const useGetApplicationExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(\n applicationId: string,\n params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationExchangeRatesSuspenseQueryOptions(applicationId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * For every Job that has an exchange rate the current rate is returned. If you want a list of all Jobs that have no exchange rate, set the `only_undefined` query option.\n\n * @summary Gets Exchange Rates for all Jobs\n */\nexport const getAllJobExchangeRates = (\n params?: GetAllJobExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetAllExchangeRatesResponse>(\n {url: `/job/exchange-rate`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAllJobExchangeRatesQueryKey = (params?: GetAllJobExchangeRatesParams,) => {\n return [\"data-manager-api\", `/job/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAllJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllJobExchangeRates>>>\nexport type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Jobs\n */\nexport const useGetAllJobExchangeRates = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllJobExchangeRatesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAllJobExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAllJobExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAllJobExchangeRates>>>\nexport type GetAllJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Exchange Rates for all Jobs\n */\nexport const useGetAllJobExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAllJobExchangeRatesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Sets the Exchange Rate for a specific job. The rate replaces any existing rate for the Job and applies immediately and future job executions for this Job will inherit this rate.\n\nExchange rates are divided by an internal **scale factor** prior to being applied. The scale factor has a value of 1,000. The scale factor is used to make the exchange rates a little easier to digest, because without this on some jobs we would need to support values ike '0.00001'. With a scale factor of `1,000` the exchange rate is a much more humanly-digestible, e.g. '0.00001' becomes '0.01'.\n\nIf a Job has no specific rate it adopts the current value of the default Job Exchange Rate.\n\nYou need `admin` privilege to use this method.\n\n * @summary Sets the Exchange Rate for a specific Job\n */\nexport const setJobPricing = (\n jobId: number,\n exchangeRatePutBodyBody: ExchangeRatePutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('rate', exchangeRatePutBodyBody.rate)\nif(exchangeRatePutBodyBody.comment !== undefined) {\n formData.append('comment', exchangeRatePutBodyBody.comment)\n }\n\n return customInstance<void>(\n {url: `/job/${jobId}/exchange-rate`, method: 'PUT',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getSetJobPricingMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof setJobPricing>>, {jobId: number;data: ExchangeRatePutBodyBody}> = (props) => {\n const {jobId,data} = props ?? {};\n\n return setJobPricing(jobId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetJobPricingMutationResult = NonNullable<Awaited<ReturnType<typeof setJobPricing>>>\n export type SetJobPricingMutationBody = ExchangeRatePutBodyBody\n export type SetJobPricingMutationError = ErrorType<DmError>\n\n /**\n * @summary Sets the Exchange Rate for a specific Job\n */\nexport const useSetJobPricing = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getSetJobPricingMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets all the exchange rate history for a specific Job. Rates are returned in reverse chronological order, with the most recent rate, the current rate, as the first entry in the list.\n\n * @summary Gets Job Exchange Rates\n */\nexport const getJobExchangeRates = (\n jobId: number,\n params?: GetJobExchangeRatesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<GetExchangeRatesResponse>(\n {url: `/job/${jobId}/exchange-rate`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetJobExchangeRatesQueryKey = (jobId: number,\n params?: GetJobExchangeRatesParams,) => {\n return [\"data-manager-api\", `/job/${jobId}/exchange-rate`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) => getJobExchangeRates(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getJobExchangeRates>>>\nexport type GetJobExchangeRatesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Job Exchange Rates\n */\nexport const useGetJobExchangeRates = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobExchangeRatesQueryOptions(jobId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetJobExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) => getJobExchangeRates(jobId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetJobExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobExchangeRates>>>\nexport type GetJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets Job Exchange Rates\n */\nexport const useGetJobExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(\n jobId: number,\n params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetJobExchangeRatesSuspenseQueryOptions(jobId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryK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AM,YAAY,6CAAc,aAAY,+BAA+B,OAAM,MAAM;AAIrF,QAAM,UAA0E,CAAC,EAAE,OAAO,MAAM,oBAAoB,OAAM,QAAQ,gBAAgB,MAAM;AAMzJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,OAAQ,GAAG,aAAY;AACnE;AAQO,IAAM,iCAAiC,CAC7C,OACG,QAAoC,YAEgC;AAEtE,QAAM,eAAe,2CAA2C,OAAM,QAAO,OAAO;AAEpF,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
@@ -1,17 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
3
+ var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
4
4
 
5
5
  // src/file-and-path/file-and-path.ts
6
6
 
7
7
 
8
8
 
9
+
9
10
  var _reactquery = require('@tanstack/react-query');
10
11
  var createPath = (params, options) => {
11
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
12
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
12
13
  {
13
14
  url: `/path`,
14
- method: "put",
15
+ method: "PUT",
15
16
  params
16
17
  },
17
18
  options
@@ -30,10 +31,10 @@ var useCreatePath = (options) => {
30
31
  return _reactquery.useMutation.call(void 0, mutationOptions);
31
32
  };
32
33
  var deletePath = (params, options) => {
33
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
34
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
34
35
  {
35
36
  url: `/path`,
36
- method: "delete",
37
+ method: "DELETE",
37
38
  params
38
39
  },
39
40
  options
@@ -52,10 +53,10 @@ var useDeletePath = (options) => {
52
53
  return _reactquery.useMutation.call(void 0, mutationOptions);
53
54
  };
54
55
  var getFiles = (params, options, signal) => {
55
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
56
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
56
57
  {
57
58
  url: `/file`,
58
- method: "get",
59
+ method: "GET",
59
60
  params,
60
61
  signal
61
62
  },
@@ -77,6 +78,18 @@ var useGetFiles = (params, options) => {
77
78
  query.queryKey = queryOptions.queryKey;
78
79
  return query;
79
80
  };
81
+ var getGetFilesSuspenseQueryOptions = (params, options) => {
82
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
83
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetFilesQueryKey(params)));
84
+ const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
85
+ return { queryKey, queryFn, ...queryOptions };
86
+ };
87
+ var useGetFilesSuspense = (params, options) => {
88
+ const queryOptions = getGetFilesSuspenseQueryOptions(params, options);
89
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
90
+ query.queryKey = queryOptions.queryKey;
91
+ return query;
92
+ };
80
93
  var attachFile = (filePostBodyBody, options) => {
81
94
  const formData = new FormData();
82
95
  formData.append("dataset_id", filePostBodyBody.dataset_id);
@@ -92,10 +105,10 @@ var attachFile = (filePostBodyBody, options) => {
92
105
  if (filePostBodyBody.immutable !== void 0) {
93
106
  formData.append("immutable", filePostBodyBody.immutable.toString());
94
107
  }
95
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
108
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
96
109
  {
97
110
  url: `/file`,
98
- method: "post",
111
+ method: "POST",
99
112
  headers: { "Content-Type": "multipart/form-data" },
100
113
  data: formData
101
114
  },
@@ -115,10 +128,10 @@ var useAttachFile = (options) => {
115
128
  return _reactquery.useMutation.call(void 0, mutationOptions);
116
129
  };
117
130
  var deleteUnmanagedFile = (params, options) => {
118
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
131
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
119
132
  {
120
133
  url: `/file`,
121
- method: "delete",
134
+ method: "DELETE",
122
135
  params
123
136
  },
124
137
  options
@@ -137,10 +150,10 @@ var useDeleteUnmanagedFile = (options) => {
137
150
  return _reactquery.useMutation.call(void 0, mutationOptions);
138
151
  };
139
152
  var deleteFile = (fileId, options) => {
140
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
153
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
141
154
  {
142
155
  url: `/file/${fileId}`,
143
- method: "delete"
156
+ method: "DELETE"
144
157
  },
145
158
  options
146
159
  );
@@ -158,10 +171,10 @@ var useDeleteFile = (options) => {
158
171
  return _reactquery.useMutation.call(void 0, mutationOptions);
159
172
  };
160
173
  var downloadFile = (fileId, options, signal) => {
161
- return _chunkJ22A7LHXcjs.customInstance.call(void 0,
174
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
162
175
  {
163
176
  url: `/file/${fileId}`,
164
- method: "get",
177
+ method: "GET",
165
178
  signal
166
179
  },
167
180
  options
@@ -182,6 +195,22 @@ var useDownloadFile = (fileId, options) => {
182
195
  query.queryKey = queryOptions.queryKey;
183
196
  return query;
184
197
  };
198
+ var getDownloadFileSuspenseQueryOptions = (fileId, options) => {
199
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
200
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadFileQueryKey(fileId)));
201
+ const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
202
+ return { queryKey, queryFn, enabled: !!fileId, ...queryOptions };
203
+ };
204
+ var useDownloadFileSuspense = (fileId, options) => {
205
+ const queryOptions = getDownloadFileSuspenseQueryOptions(fileId, options);
206
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
207
+ query.queryKey = queryOptions.queryKey;
208
+ return query;
209
+ };
210
+
211
+
212
+
213
+
185
214
 
186
215
 
187
216
 
@@ -206,5 +235,5 @@ var useDownloadFile = (fileId, options) => {
206
235
 
207
236
 
208
237
 
209
- exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getAttachFileMutationOptions = getAttachFileMutationOptions; exports.getCreatePathMutationOptions = getCreatePathMutationOptions; exports.getDeleteFileMutationOptions = getDeleteFileMutationOptions; exports.getDeletePathMutationOptions = getDeletePathMutationOptions; exports.getDeleteUnmanagedFileMutationOptions = getDeleteUnmanagedFileMutationOptions; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getDownloadFileQueryOptions = getDownloadFileQueryOptions; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.getGetFilesQueryOptions = getGetFilesQueryOptions; exports.useAttachFile = useAttachFile; exports.useCreatePath = useCreatePath; exports.useDeleteFile = useDeleteFile; exports.useDeletePath = useDeletePath; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDownloadFile = useDownloadFile; exports.useGetFiles = useGetFiles;
238
+ exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getAttachFileMutationOptions = getAttachFileMutationOptions; exports.getCreatePathMutationOptions = getCreatePathMutationOptions; exports.getDeleteFileMutationOptions = getDeleteFileMutationOptions; exports.getDeletePathMutationOptions = getDeletePathMutationOptions; exports.getDeleteUnmanagedFileMutationOptions = getDeleteUnmanagedFileMutationOptions; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getDownloadFileQueryOptions = getDownloadFileQueryOptions; exports.getDownloadFileSuspenseQueryOptions = getDownloadFileSuspenseQueryOptions; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.getGetFilesQueryOptions = getGetFilesQueryOptions; exports.getGetFilesSuspenseQueryOptions = getGetFilesSuspenseQueryOptions; exports.useAttachFile = useAttachFile; exports.useCreatePath = useCreatePath; exports.useDeleteFile = useDeleteFile; exports.useDeletePath = useDeletePath; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDownloadFile = useDownloadFile; exports.useDownloadFileSuspense = useDownloadFileSuspense; exports.useGetFiles = useGetFiles; exports.useGetFilesSuspense = useGetFilesSuspense;
210
239
  //# sourceMappingURL=file-and-path.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAuCA,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YACsF;AAC7G,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAmG,CAAC,UAAU;AAChH,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC;AAQG,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YACsF;AAC7G,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAmG,CAAC,UAAU;AAChH,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QA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ually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * 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 owners or editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'put',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.\n\nOnly Project owners or editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n \n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Files on a Project Path\n */\nexport const useGetFiles = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFilesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\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` or the `owner` of the project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n \n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a File (from a project)\n */\nexport const useDownloadFile = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(\n fileId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"version":3,"sources":["../../src/file-and-path/file-and-path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E/D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,sCAAsC,CAAgF,QAAgB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB,MAAM;AAIxE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,QAAQ,gBAAgB,MAAM;AAMrI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,0BAA0B,CACtC,QAAgB,YAEuD;AAEtE,QAAM,eAAe,oCAAoC,QAAO,OAAO;AAEvE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project owners or editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPath>>, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in te contents of the Path also being deleted. If There are files in Path or sub-directories, they will all be deleted.\n\nOnly Project owners or editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deletePath>>, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Files on a Project Path\n */\nexport const useGetFiles = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFilesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetFilesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Files on a Project Path\n */\nexport const useGetFilesSuspense = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFilesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **File**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the `/task` endpoint to determine when the file is available to the project.\n\nOnly Datasets attached to projects are available through the Project API. A Dataset that you upload is only available to others (who are not already `editors` of the data) when the Dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` or the `owner` of the project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('dataset_id', filePostBodyBody.dataset_id)\nformData.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformData.append('project_id', filePostBodyBody.project_id)\nformData.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formData.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formData.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formData.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachFile>>, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` or the `owner` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteFile>>, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a File (from a project)\n */\nexport const useDownloadFile = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getDownloadFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileSuspenseQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a File (from a project)\n */\nexport const useDownloadFileSuspense = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadFileSuspenseQueryOptions(fileId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}