@squonk/data-manager-client 1.2.3 → 1.2.4-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-3d66fe97.d.ts} +826 -826
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +941 -942
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,36 +8,41 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery, useMutation } from "@tanstack/react-query";
11
+ import {
12
+ useMutation,
13
+ useQuery
14
+ } from '@tanstack/react-query'
12
15
  import type {
13
- UseQueryOptions,
14
- UseMutationOptions,
15
- QueryFunction,
16
16
  MutationFunction,
17
- UseQueryResult,
17
+ QueryFunction,
18
18
  QueryKey,
19
- } from "@tanstack/react-query";
19
+ UseMutationOptions,
20
+ UseQueryOptions,
21
+ UseQueryResult
22
+ } from '@tanstack/react-query'
20
23
  import type {
21
- GetAllExchangeRatesResponse,
22
24
  DmError,
23
- GetAllApplicationExchangeRatesParams,
24
25
  ExchangeRatePutBodyBody,
25
- GetExchangeRatesResponse,
26
- GetApplicationExchangeRatesParams,
26
+ GetAllApplicationExchangeRatesParams,
27
+ GetAllExchangeRatesResponse,
27
28
  GetAllJobExchangeRatesParams,
28
- GetJobExchangeRatesParams,
29
- } from "../data-manager-api.schemas";
30
- import { customInstance } from ".././custom-instance";
31
- import type { ErrorType } from ".././custom-instance";
29
+ GetApplicationExchangeRatesParams,
30
+ GetExchangeRatesResponse,
31
+ GetJobExchangeRatesParams
32
+ } from '../data-manager-api.schemas'
33
+ import { customInstance } from '.././custom-instance';
34
+ import type { ErrorType } from '.././custom-instance';
35
+
32
36
 
33
37
  // eslint-disable-next-line
34
- type SecondParameter<T extends (...args: any) => any> = T extends (
38
+ type SecondParameter<T extends (...args: any) => any> = T extends (
35
39
  config: any,
36
- args: infer P
40
+ args: infer P,
37
41
  ) => any
38
42
  ? P
39
43
  : never;
40
44
 
45
+
41
46
  /**
42
47
  * 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.
43
48
 
@@ -46,84 +51,64 @@ If an Application has no specific rate it adopts the current value of the defaul
46
51
  * @summary Gets Exchange Rates for all Applications
47
52
  */
48
53
  export const getAllApplicationExchangeRates = (
49
- params?: GetAllApplicationExchangeRatesParams,
50
- options?: SecondParameter<typeof customInstance>,
51
- signal?: AbortSignal
54
+ params?: GetAllApplicationExchangeRatesParams,
55
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
56
+ ) => {
57
+
58
+
59
+ return customInstance<GetAllExchangeRatesResponse>(
60
+ {url: `/application/exchange-rate`, method: 'get',
61
+ params, signal
62
+ },
63
+ options);
64
+ }
65
+
66
+
67
+ export const getGetAllApplicationExchangeRatesQueryKey = (params?: GetAllApplicationExchangeRatesParams,) => {
68
+
69
+ return ["data-manager-api", `/application/exchange-rate`, ...(params ? [params]: [])] as const;
70
+ }
71
+
72
+
73
+ export 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>}
52
74
  ) => {
53
- return customInstance<GetAllExchangeRatesResponse>(
54
- { url: `/application/exchange-rate`, method: "get", params, signal },
55
- options
56
- );
57
- };
58
-
59
- export const getGetAllApplicationExchangeRatesQueryKey = (
60
- params?: GetAllApplicationExchangeRatesParams
61
- ) => ["data-manager-api", `/application/exchange-rate`, ...(params ? [params] : [])] as const;
62
-
63
- export const getGetAllApplicationExchangeRatesQueryOptions = <
64
- TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
65
- TError = ErrorType<void | DmError>
66
- >(
67
- params?: GetAllApplicationExchangeRatesParams,
68
- options?: {
69
- query?: UseQueryOptions<
70
- Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
71
- TError,
72
- TData
73
- >;
74
- request?: SecondParameter<typeof customInstance>;
75
- }
76
- ): UseQueryOptions<
77
- Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
78
- TError,
79
- TData
80
- > & { queryKey: QueryKey } => {
81
- const { query: queryOptions, request: requestOptions } = options ?? {};
82
-
83
- const queryKey =
84
- queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);
85
-
86
- const queryFn: QueryFunction<
87
- Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
88
- > = ({ signal }) =>
89
- getAllApplicationExchangeRates(params, requestOptions, signal);
90
-
91
- return { queryKey, queryFn, ...queryOptions };
92
- };
93
-
94
- export type GetAllApplicationExchangeRatesQueryResult = NonNullable<
95
- Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
96
- >;
97
- export type GetAllApplicationExchangeRatesQueryError =
98
- ErrorType<void | DmError>;
99
-
100
- export const useGetAllApplicationExchangeRates = <
101
- TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
102
- TError = ErrorType<void | DmError>
103
- >(
104
- params?: GetAllApplicationExchangeRatesParams,
105
- options?: {
106
- query?: UseQueryOptions<
107
- Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
108
- TError,
109
- TData
110
- >;
111
- request?: SecondParameter<typeof customInstance>;
112
- }
113
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
114
- const queryOptions = getGetAllApplicationExchangeRatesQueryOptions(
115
- params,
116
- options
117
- );
118
-
119
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
120
- queryKey: QueryKey;
121
- };
122
-
123
- query.queryKey = queryOptions.queryKey;
75
+
76
+ const {query: queryOptions, request: requestOptions} = options ?? {};
77
+
78
+ const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);
79
+
80
+
81
+
82
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);
83
+
84
+
85
+
86
+
87
+
88
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }
89
+ }
90
+
91
+ export type GetAllApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>>
92
+ export type GetAllApplicationExchangeRatesQueryError = ErrorType<void | DmError>
93
+
94
+ /**
95
+ * @summary Gets Exchange Rates for all Applications
96
+ */
97
+ export const useGetAllApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
98
+ params?: GetAllApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
99
+
100
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
101
+
102
+ const queryOptions = getGetAllApplicationExchangeRatesQueryOptions(params,options)
103
+
104
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
105
+
106
+ query.queryKey = queryOptions.queryKey ;
124
107
 
125
108
  return query;
126
- };
109
+ }
110
+
111
+
127
112
 
128
113
  /**
129
114
  * 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.
@@ -135,179 +120,130 @@ You need `admin` privilege to use this method.
135
120
  * @summary Sets the Exchange Rate for a specific Application
136
121
  */
137
122
  export const setApplicationExchangeRate = (
138
- applicationId: string,
139
- exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
140
- options?: SecondParameter<typeof customInstance>
141
- ) => {
142
- const formData = new FormData();
143
- formData.append("rate", exchangeRatePutBodyBody.rate);
144
- if (exchangeRatePutBodyBody.comment !== undefined) {
145
- formData.append("comment", exchangeRatePutBodyBody.comment);
146
- }
147
-
148
- return customInstance<void>(
149
- {
150
- url: `/application/${applicationId}/exchange-rate`,
151
- method: "put",
152
- headers: { "Content-Type": "multipart/form-data" },
153
- data: formData,
123
+ applicationId: string,
124
+ exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
125
+ options?: SecondParameter<typeof customInstance>,) => {
126
+
127
+ const formData = new FormData();
128
+ formData.append('rate', exchangeRatePutBodyBody.rate)
129
+ if(exchangeRatePutBodyBody.comment !== undefined) {
130
+ formData.append('comment', exchangeRatePutBodyBody.comment)
131
+ }
132
+
133
+ return customInstance<void>(
134
+ {url: `/application/${applicationId}/exchange-rate`, method: 'put',
135
+ headers: {'Content-Type': 'multipart/form-data', },
136
+ data: formData
154
137
  },
155
- options
156
- );
157
- };
158
-
159
- export const getSetApplicationExchangeRateMutationOptions = <
160
- TError = ErrorType<DmError>,
161
- TContext = unknown
162
- >(options?: {
163
- mutation?: UseMutationOptions<
164
- Awaited<ReturnType<typeof setApplicationExchangeRate>>,
165
- TError,
166
- { applicationId: string; data: ExchangeRatePutBodyBody },
167
- TContext
168
- >;
169
- request?: SecondParameter<typeof customInstance>;
170
- }): UseMutationOptions<
171
- Awaited<ReturnType<typeof setApplicationExchangeRate>>,
172
- TError,
173
- { applicationId: string; data: ExchangeRatePutBodyBody },
174
- TContext
175
- > => {
176
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
177
-
178
- const mutationFn: MutationFunction<
179
- Awaited<ReturnType<typeof setApplicationExchangeRate>>,
180
- { applicationId: string; data: ExchangeRatePutBodyBody }
181
- > = (props) => {
182
- const { applicationId, data } = props ?? {};
183
-
184
- return setApplicationExchangeRate(applicationId, data, requestOptions);
185
- };
186
-
187
- return { mutationFn, ...mutationOptions };
188
- };
189
-
190
- export type SetApplicationExchangeRateMutationResult = NonNullable<
191
- Awaited<ReturnType<typeof setApplicationExchangeRate>>
192
- >;
193
- export type SetApplicationExchangeRateMutationBody = ExchangeRatePutBodyBody;
194
- export type SetApplicationExchangeRateMutationError = ErrorType<DmError>;
195
-
196
- export const useSetApplicationExchangeRate = <
197
- TError = ErrorType<DmError>,
198
- TContext = unknown
199
- >(options?: {
200
- mutation?: UseMutationOptions<
201
- Awaited<ReturnType<typeof setApplicationExchangeRate>>,
202
- TError,
203
- { applicationId: string; data: ExchangeRatePutBodyBody },
204
- TContext
205
- >;
206
- request?: SecondParameter<typeof customInstance>;
207
- }) => {
208
- const mutationOptions = getSetApplicationExchangeRateMutationOptions(options);
209
-
210
- return useMutation(mutationOptions);
211
- };
212
- /**
138
+ options);
139
+ }
140
+
141
+
142
+
143
+ export const getSetApplicationExchangeRateMutationOptions = <TError = ErrorType<DmError>,
144
+
145
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
146
+ ): UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext> => {
147
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
148
+
149
+
150
+
151
+
152
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof setApplicationExchangeRate>>, {applicationId: string;data: ExchangeRatePutBodyBody}> = (props) => {
153
+ const {applicationId,data} = props ?? {};
154
+
155
+ return setApplicationExchangeRate(applicationId,data,requestOptions)
156
+ }
157
+
158
+
159
+
160
+
161
+ return { mutationFn, ...mutationOptions }}
162
+
163
+ export type SetApplicationExchangeRateMutationResult = NonNullable<Awaited<ReturnType<typeof setApplicationExchangeRate>>>
164
+ export type SetApplicationExchangeRateMutationBody = ExchangeRatePutBodyBody
165
+ export type SetApplicationExchangeRateMutationError = ErrorType<DmError>
166
+
167
+ /**
168
+ * @summary Sets the Exchange Rate for a specific Application
169
+ */
170
+ export const useSetApplicationExchangeRate = <TError = ErrorType<DmError>,
171
+
172
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
173
+ ) => {
174
+
175
+ const mutationOptions = getSetApplicationExchangeRateMutationOptions(options);
176
+
177
+ return useMutation(mutationOptions);
178
+ }
179
+ /**
213
180
  * 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.
214
181
 
215
182
  * @summary Gets the Application's Exchange Rate history
216
183
  */
217
184
  export const getApplicationExchangeRates = (
218
- applicationId: string,
219
- params?: GetApplicationExchangeRatesParams,
220
- options?: SecondParameter<typeof customInstance>,
221
- signal?: AbortSignal
185
+ applicationId: string,
186
+ params?: GetApplicationExchangeRatesParams,
187
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
222
188
  ) => {
223
- return customInstance<GetExchangeRatesResponse>(
224
- {
225
- url: `/application/${applicationId}/exchange-rate`,
226
- method: "get",
227
- params,
228
- signal,
189
+
190
+
191
+ return customInstance<GetExchangeRatesResponse>(
192
+ {url: `/application/${applicationId}/exchange-rate`, method: 'get',
193
+ params, signal
229
194
  },
230
- options
231
- );
232
- };
233
-
234
- export const getGetApplicationExchangeRatesQueryKey = (
235
- applicationId: string,
236
- params?: GetApplicationExchangeRatesParams
237
- ) =>
238
- [
239
- "data-manager-api",
240
- `/application/${applicationId}/exchange-rate`,
241
- ...(params ? [params] : []),
242
- ] as const;
243
-
244
- export const getGetApplicationExchangeRatesQueryOptions = <
245
- TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
246
- TError = ErrorType<void | DmError>
247
- >(
248
- applicationId: string,
249
- params?: GetApplicationExchangeRatesParams,
250
- options?: {
251
- query?: UseQueryOptions<
252
- Awaited<ReturnType<typeof getApplicationExchangeRates>>,
253
- TError,
254
- TData
255
- >;
256
- request?: SecondParameter<typeof customInstance>;
257
- }
258
- ): UseQueryOptions<
259
- Awaited<ReturnType<typeof getApplicationExchangeRates>>,
260
- TError,
261
- TData
262
- > & { queryKey: QueryKey } => {
263
- const { query: queryOptions, request: requestOptions } = options ?? {};
264
-
265
- const queryKey =
266
- queryOptions?.queryKey ??
267
- getGetApplicationExchangeRatesQueryKey(applicationId, params);
268
-
269
- const queryFn: QueryFunction<
270
- Awaited<ReturnType<typeof getApplicationExchangeRates>>
271
- > = ({ signal }) =>
272
- getApplicationExchangeRates(applicationId, params, requestOptions, signal);
273
-
274
- return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
275
- };
276
-
277
- export type GetApplicationExchangeRatesQueryResult = NonNullable<
278
- Awaited<ReturnType<typeof getApplicationExchangeRates>>
279
- >;
280
- export type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>;
281
-
282
- export const useGetApplicationExchangeRates = <
283
- TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
284
- TError = ErrorType<void | DmError>
285
- >(
286
- applicationId: string,
287
- params?: GetApplicationExchangeRatesParams,
288
- options?: {
289
- query?: UseQueryOptions<
290
- Awaited<ReturnType<typeof getApplicationExchangeRates>>,
291
- TError,
292
- TData
293
- >;
294
- request?: SecondParameter<typeof customInstance>;
295
- }
296
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
297
- const queryOptions = getGetApplicationExchangeRatesQueryOptions(
298
- applicationId,
299
- params,
300
- options
301
- );
302
-
303
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
304
- queryKey: QueryKey;
305
- };
306
-
307
- query.queryKey = queryOptions.queryKey;
195
+ options);
196
+ }
197
+
198
+
199
+ export const getGetApplicationExchangeRatesQueryKey = (applicationId: string,
200
+ params?: GetApplicationExchangeRatesParams,) => {
201
+
202
+ return ["data-manager-api", `/application/${applicationId}/exchange-rate`, ...(params ? [params]: [])] as const;
203
+ }
204
+
205
+
206
+ export const getGetApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,
207
+ params?: GetApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
208
+ ) => {
209
+
210
+ const {query: queryOptions, request: requestOptions} = options ?? {};
211
+
212
+ const queryKey = queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId,params);
213
+
214
+
215
+
216
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({ signal }) => getApplicationExchangeRates(applicationId,params, requestOptions, signal);
217
+
218
+
219
+
220
+
221
+
222
+ return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }
223
+ }
224
+
225
+ export type GetApplicationExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getApplicationExchangeRates>>>
226
+ export type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>
227
+
228
+ /**
229
+ * @summary Gets the Application's Exchange Rate history
230
+ */
231
+ export const useGetApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
232
+ applicationId: string,
233
+ params?: GetApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
234
+
235
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
236
+
237
+ const queryOptions = getGetApplicationExchangeRatesQueryOptions(applicationId,params,options)
238
+
239
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
240
+
241
+ query.queryKey = queryOptions.queryKey ;
308
242
 
309
243
  return query;
310
- };
244
+ }
245
+
246
+
311
247
 
312
248
  /**
313
249
  * 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.
@@ -315,79 +251,64 @@ export const useGetApplicationExchangeRates = <
315
251
  * @summary Gets Exchange Rates for all Jobs
316
252
  */
317
253
  export const getAllJobExchangeRates = (
318
- params?: GetAllJobExchangeRatesParams,
319
- options?: SecondParameter<typeof customInstance>,
320
- signal?: AbortSignal
254
+ params?: GetAllJobExchangeRatesParams,
255
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
321
256
  ) => {
322
- return customInstance<GetAllExchangeRatesResponse>(
323
- { url: `/job/exchange-rate`, method: "get", params, signal },
324
- options
325
- );
326
- };
327
-
328
- export const getGetAllJobExchangeRatesQueryKey = (
329
- params?: GetAllJobExchangeRatesParams
330
- ) => ["data-manager-api", `/job/exchange-rate`, ...(params ? [params] : [])] as const;
331
-
332
- export const getGetAllJobExchangeRatesQueryOptions = <
333
- TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
334
- TError = ErrorType<void | DmError>
335
- >(
336
- params?: GetAllJobExchangeRatesParams,
337
- options?: {
338
- query?: UseQueryOptions<
339
- Awaited<ReturnType<typeof getAllJobExchangeRates>>,
340
- TError,
341
- TData
342
- >;
343
- request?: SecondParameter<typeof customInstance>;
344
- }
345
- ): UseQueryOptions<
346
- Awaited<ReturnType<typeof getAllJobExchangeRates>>,
347
- TError,
348
- TData
349
- > & { queryKey: QueryKey } => {
350
- const { query: queryOptions, request: requestOptions } = options ?? {};
351
-
352
- const queryKey =
353
- queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);
354
-
355
- const queryFn: QueryFunction<
356
- Awaited<ReturnType<typeof getAllJobExchangeRates>>
357
- > = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);
358
-
359
- return { queryKey, queryFn, ...queryOptions };
360
- };
361
-
362
- export type GetAllJobExchangeRatesQueryResult = NonNullable<
363
- Awaited<ReturnType<typeof getAllJobExchangeRates>>
364
- >;
365
- export type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>;
366
-
367
- export const useGetAllJobExchangeRates = <
368
- TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
369
- TError = ErrorType<void | DmError>
370
- >(
371
- params?: GetAllJobExchangeRatesParams,
372
- options?: {
373
- query?: UseQueryOptions<
374
- Awaited<ReturnType<typeof getAllJobExchangeRates>>,
375
- TError,
376
- TData
377
- >;
378
- request?: SecondParameter<typeof customInstance>;
379
- }
380
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
381
- const queryOptions = getGetAllJobExchangeRatesQueryOptions(params, options);
382
-
383
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
384
- queryKey: QueryKey;
385
- };
386
-
387
- query.queryKey = queryOptions.queryKey;
257
+
258
+
259
+ return customInstance<GetAllExchangeRatesResponse>(
260
+ {url: `/job/exchange-rate`, method: 'get',
261
+ params, signal
262
+ },
263
+ options);
264
+ }
265
+
266
+
267
+ export const getGetAllJobExchangeRatesQueryKey = (params?: GetAllJobExchangeRatesParams,) => {
268
+
269
+ return ["data-manager-api", `/job/exchange-rate`, ...(params ? [params]: [])] as const;
270
+ }
271
+
272
+
273
+ export 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>}
274
+ ) => {
275
+
276
+ const {query: queryOptions, request: requestOptions} = options ?? {};
277
+
278
+ const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);
279
+
280
+
281
+
282
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);
283
+
284
+
285
+
286
+
287
+
288
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }
289
+ }
290
+
291
+ export type GetAllJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getAllJobExchangeRates>>>
292
+ export type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>
293
+
294
+ /**
295
+ * @summary Gets Exchange Rates for all Jobs
296
+ */
297
+ export const useGetAllJobExchangeRates = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(
298
+ params?: GetAllJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
299
+
300
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
301
+
302
+ const queryOptions = getGetAllJobExchangeRatesQueryOptions(params,options)
303
+
304
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
305
+
306
+ query.queryKey = queryOptions.queryKey ;
388
307
 
389
308
  return query;
390
- };
309
+ }
310
+
311
+
391
312
 
392
313
  /**
393
314
  * 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.
@@ -401,165 +322,128 @@ You need `admin` privilege to use this method.
401
322
  * @summary Sets the Exchange Rate for a specific Job
402
323
  */
403
324
  export const setJobPricing = (
404
- jobId: number,
405
- exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
406
- options?: SecondParameter<typeof customInstance>
407
- ) => {
408
- const formData = new FormData();
409
- formData.append("rate", exchangeRatePutBodyBody.rate);
410
- if (exchangeRatePutBodyBody.comment !== undefined) {
411
- formData.append("comment", exchangeRatePutBodyBody.comment);
412
- }
413
-
414
- return customInstance<void>(
415
- {
416
- url: `/job/${jobId}/exchange-rate`,
417
- method: "put",
418
- headers: { "Content-Type": "multipart/form-data" },
419
- data: formData,
325
+ jobId: number,
326
+ exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
327
+ options?: SecondParameter<typeof customInstance>,) => {
328
+
329
+ const formData = new FormData();
330
+ formData.append('rate', exchangeRatePutBodyBody.rate)
331
+ if(exchangeRatePutBodyBody.comment !== undefined) {
332
+ formData.append('comment', exchangeRatePutBodyBody.comment)
333
+ }
334
+
335
+ return customInstance<void>(
336
+ {url: `/job/${jobId}/exchange-rate`, method: 'put',
337
+ headers: {'Content-Type': 'multipart/form-data', },
338
+ data: formData
420
339
  },
421
- options
422
- );
423
- };
424
-
425
- export const getSetJobPricingMutationOptions = <
426
- TError = ErrorType<DmError>,
427
- TContext = unknown
428
- >(options?: {
429
- mutation?: UseMutationOptions<
430
- Awaited<ReturnType<typeof setJobPricing>>,
431
- TError,
432
- { jobId: number; data: ExchangeRatePutBodyBody },
433
- TContext
434
- >;
435
- request?: SecondParameter<typeof customInstance>;
436
- }): UseMutationOptions<
437
- Awaited<ReturnType<typeof setJobPricing>>,
438
- TError,
439
- { jobId: number; data: ExchangeRatePutBodyBody },
440
- TContext
441
- > => {
442
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
443
-
444
- const mutationFn: MutationFunction<
445
- Awaited<ReturnType<typeof setJobPricing>>,
446
- { jobId: number; data: ExchangeRatePutBodyBody }
447
- > = (props) => {
448
- const { jobId, data } = props ?? {};
449
-
450
- return setJobPricing(jobId, data, requestOptions);
451
- };
452
-
453
- return { mutationFn, ...mutationOptions };
454
- };
455
-
456
- export type SetJobPricingMutationResult = NonNullable<
457
- Awaited<ReturnType<typeof setJobPricing>>
458
- >;
459
- export type SetJobPricingMutationBody = ExchangeRatePutBodyBody;
460
- export type SetJobPricingMutationError = ErrorType<DmError>;
461
-
462
- export const useSetJobPricing = <
463
- TError = ErrorType<DmError>,
464
- TContext = unknown
465
- >(options?: {
466
- mutation?: UseMutationOptions<
467
- Awaited<ReturnType<typeof setJobPricing>>,
468
- TError,
469
- { jobId: number; data: ExchangeRatePutBodyBody },
470
- TContext
471
- >;
472
- request?: SecondParameter<typeof customInstance>;
473
- }) => {
474
- const mutationOptions = getSetJobPricingMutationOptions(options);
475
-
476
- return useMutation(mutationOptions);
477
- };
478
- /**
340
+ options);
341
+ }
342
+
343
+
344
+
345
+ export const getSetJobPricingMutationOptions = <TError = ErrorType<DmError>,
346
+
347
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
348
+ ): UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext> => {
349
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
350
+
351
+
352
+
353
+
354
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof setJobPricing>>, {jobId: number;data: ExchangeRatePutBodyBody}> = (props) => {
355
+ const {jobId,data} = props ?? {};
356
+
357
+ return setJobPricing(jobId,data,requestOptions)
358
+ }
359
+
360
+
361
+
362
+
363
+ return { mutationFn, ...mutationOptions }}
364
+
365
+ export type SetJobPricingMutationResult = NonNullable<Awaited<ReturnType<typeof setJobPricing>>>
366
+ export type SetJobPricingMutationBody = ExchangeRatePutBodyBody
367
+ export type SetJobPricingMutationError = ErrorType<DmError>
368
+
369
+ /**
370
+ * @summary Sets the Exchange Rate for a specific Job
371
+ */
372
+ export const useSetJobPricing = <TError = ErrorType<DmError>,
373
+
374
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
375
+ ) => {
376
+
377
+ const mutationOptions = getSetJobPricingMutationOptions(options);
378
+
379
+ return useMutation(mutationOptions);
380
+ }
381
+ /**
479
382
  * 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.
480
383
 
481
384
  * @summary Gets Job Exchange Rates
482
385
  */
483
386
  export const getJobExchangeRates = (
484
- jobId: number,
485
- params?: GetJobExchangeRatesParams,
486
- options?: SecondParameter<typeof customInstance>,
487
- signal?: AbortSignal
387
+ jobId: number,
388
+ params?: GetJobExchangeRatesParams,
389
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
488
390
  ) => {
489
- return customInstance<GetExchangeRatesResponse>(
490
- { url: `/job/${jobId}/exchange-rate`, method: "get", params, signal },
491
- options
492
- );
493
- };
494
-
495
- export const getGetJobExchangeRatesQueryKey = (
496
- jobId: number,
497
- params?: GetJobExchangeRatesParams
498
- ) => ["data-manager-api", `/job/${jobId}/exchange-rate`, ...(params ? [params] : [])] as const;
499
-
500
- export const getGetJobExchangeRatesQueryOptions = <
501
- TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
502
- TError = ErrorType<void | DmError>
503
- >(
504
- jobId: number,
505
- params?: GetJobExchangeRatesParams,
506
- options?: {
507
- query?: UseQueryOptions<
508
- Awaited<ReturnType<typeof getJobExchangeRates>>,
509
- TError,
510
- TData
511
- >;
512
- request?: SecondParameter<typeof customInstance>;
513
- }
514
- ): UseQueryOptions<
515
- Awaited<ReturnType<typeof getJobExchangeRates>>,
516
- TError,
517
- TData
518
- > & { queryKey: QueryKey } => {
519
- const { query: queryOptions, request: requestOptions } = options ?? {};
520
-
521
- const queryKey =
522
- queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId, params);
523
-
524
- const queryFn: QueryFunction<
525
- Awaited<ReturnType<typeof getJobExchangeRates>>
526
- > = ({ signal }) =>
527
- getJobExchangeRates(jobId, params, requestOptions, signal);
528
-
529
- return { queryKey, queryFn, enabled: !!jobId, ...queryOptions };
530
- };
531
-
532
- export type GetJobExchangeRatesQueryResult = NonNullable<
533
- Awaited<ReturnType<typeof getJobExchangeRates>>
534
- >;
535
- export type GetJobExchangeRatesQueryError = ErrorType<void | DmError>;
536
-
537
- export const useGetJobExchangeRates = <
538
- TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
539
- TError = ErrorType<void | DmError>
540
- >(
541
- jobId: number,
542
- params?: GetJobExchangeRatesParams,
543
- options?: {
544
- query?: UseQueryOptions<
545
- Awaited<ReturnType<typeof getJobExchangeRates>>,
546
- TError,
547
- TData
548
- >;
549
- request?: SecondParameter<typeof customInstance>;
550
- }
551
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
552
- const queryOptions = getGetJobExchangeRatesQueryOptions(
553
- jobId,
554
- params,
555
- options
556
- );
557
-
558
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
559
- queryKey: QueryKey;
560
- };
561
-
562
- query.queryKey = queryOptions.queryKey;
391
+
392
+
393
+ return customInstance<GetExchangeRatesResponse>(
394
+ {url: `/job/${jobId}/exchange-rate`, method: 'get',
395
+ params, signal
396
+ },
397
+ options);
398
+ }
399
+
400
+
401
+ export const getGetJobExchangeRatesQueryKey = (jobId: number,
402
+ params?: GetJobExchangeRatesParams,) => {
403
+
404
+ return ["data-manager-api", `/job/${jobId}/exchange-rate`, ...(params ? [params]: [])] as const;
405
+ }
406
+
407
+
408
+ export const getGetJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,
409
+ params?: GetJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
410
+ ) => {
411
+
412
+ const {query: queryOptions, request: requestOptions} = options ?? {};
413
+
414
+ const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId,params);
415
+
416
+
417
+
418
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) => getJobExchangeRates(jobId,params, requestOptions, signal);
419
+
420
+
421
+
422
+
423
+
424
+ return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }
425
+ }
426
+
427
+ export type GetJobExchangeRatesQueryResult = NonNullable<Awaited<ReturnType<typeof getJobExchangeRates>>>
428
+ export type GetJobExchangeRatesQueryError = ErrorType<void | DmError>
429
+
430
+ /**
431
+ * @summary Gets Job Exchange Rates
432
+ */
433
+ export const useGetJobExchangeRates = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(
434
+ jobId: number,
435
+ params?: GetJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
436
+
437
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
438
+
439
+ const queryOptions = getGetJobExchangeRatesQueryOptions(jobId,params,options)
440
+
441
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
442
+
443
+ query.queryKey = queryOptions.queryKey ;
563
444
 
564
445
  return query;
565
- };
446
+ }
447
+
448
+
449
+