@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.
- package/README.md +1 -1
- package/accounting/accounting.cjs +51 -8
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +61 -10
- package/accounting/accounting.d.ts +61 -10
- package/accounting/accounting.js +49 -6
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -24
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +75 -24
- package/admin/admin.d.ts +75 -24
- package/admin/admin.js +56 -13
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +35 -6
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +42 -8
- package/application/application.d.ts +42 -8
- package/application/application.js +34 -5
- package/application/application.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/configuration/configuration.cjs +19 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +23 -6
- package/configuration/configuration.d.ts +23 -6
- package/configuration/configuration.js +19 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +93 -22
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +105 -20
- package/dataset/dataset.d.ts +105 -20
- package/dataset/dataset.js +83 -12
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +71 -14
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +83 -15
- package/exchange-rate/exchange-rate.d.ts +83 -15
- package/exchange-rate/exchange-rate.js +65 -8
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +45 -16
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +48 -14
- package/file-and-path/file-and-path.d.ts +48 -14
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +9 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2033 -2
- package/index.d.ts +2033 -2
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +45 -16
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +48 -14
- package/instance/instance.d.ts +48 -14
- package/instance/instance.js +38 -9
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +51 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +61 -10
- package/job/job.d.ts +61 -10
- package/job/job.js +49 -6
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +39 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +45 -11
- package/metadata/metadata.d.ts +45 -11
- package/metadata/metadata.js +36 -7
- package/metadata/metadata.js.map +1 -1
- package/package.json +11 -11
- package/project/project.cjs +83 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +89 -21
- package/project/project.d.ts +89 -21
- package/project/project.js +71 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +136 -22
- package/src/admin/admin.ts +148 -50
- package/src/application/application.ts +93 -18
- package/src/configuration/configuration.ts +50 -14
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +59 -33
- package/src/dataset/dataset.ts +233 -45
- package/src/exchange-rate/exchange-rate.ts +185 -32
- package/src/file-and-path/file-and-path.ts +98 -33
- package/src/instance/instance.ts +98 -33
- package/src/job/job.ts +138 -22
- package/src/metadata/metadata.ts +97 -24
- package/src/project/project.ts +191 -50
- package/src/task/task.ts +96 -21
- package/src/type/type.ts +50 -14
- package/src/user/user.ts +137 -25
- package/task/task.cjs +37 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +44 -10
- package/task/task.d.ts +44 -10
- package/task/task.js +35 -6
- package/task/task.js.map +1 -1
- package/type/type.cjs +19 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +23 -6
- package/type/type.d.ts +23 -6
- package/type/type.js +19 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +53 -10
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +63 -12
- package/user/user.d.ts +63 -12
- package/user/user.js +49 -6
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-37ed2460.d.ts +0 -2014
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v6.
|
|
2
|
+
* Generated by orval v6.25.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Dataset Manager API
|
|
5
5
|
* The Dataset Manager API service.
|
|
@@ -10,7 +10,8 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
10
10
|
*/
|
|
11
11
|
import {
|
|
12
12
|
useMutation,
|
|
13
|
-
useQuery
|
|
13
|
+
useQuery,
|
|
14
|
+
useSuspenseQuery
|
|
14
15
|
} from '@tanstack/react-query'
|
|
15
16
|
import type {
|
|
16
17
|
MutationFunction,
|
|
@@ -18,7 +19,9 @@ import type {
|
|
|
18
19
|
QueryKey,
|
|
19
20
|
UseMutationOptions,
|
|
20
21
|
UseQueryOptions,
|
|
21
|
-
UseQueryResult
|
|
22
|
+
UseQueryResult,
|
|
23
|
+
UseSuspenseQueryOptions,
|
|
24
|
+
UseSuspenseQueryResult
|
|
22
25
|
} from '@tanstack/react-query'
|
|
23
26
|
import type {
|
|
24
27
|
DmError,
|
|
@@ -34,13 +37,7 @@ import { customInstance } from '.././custom-instance';
|
|
|
34
37
|
import type { ErrorType } from '.././custom-instance';
|
|
35
38
|
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
39
|
-
config: any,
|
|
40
|
-
args: infer P,
|
|
41
|
-
) => any
|
|
42
|
-
? P
|
|
43
|
-
: never;
|
|
40
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
44
41
|
|
|
45
42
|
|
|
46
43
|
/**
|
|
@@ -57,7 +54,7 @@ export const getAllApplicationExchangeRates = (
|
|
|
57
54
|
|
|
58
55
|
|
|
59
56
|
return customInstance<GetAllExchangeRatesResponse>(
|
|
60
|
-
{url: `/application/exchange-rate`, method: '
|
|
57
|
+
{url: `/application/exchange-rate`, method: 'GET',
|
|
61
58
|
params, signal
|
|
62
59
|
},
|
|
63
60
|
options);
|
|
@@ -65,12 +62,11 @@ export const getAllApplicationExchangeRates = (
|
|
|
65
62
|
|
|
66
63
|
|
|
67
64
|
export const getGetAllApplicationExchangeRatesQueryKey = (params?: GetAllApplicationExchangeRatesParams,) => {
|
|
68
|
-
|
|
69
65
|
return ["data-manager-api", `/application/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
70
66
|
}
|
|
71
67
|
|
|
72
68
|
|
|
73
|
-
export const getGetAllApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData
|
|
69
|
+
export 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>}
|
|
74
70
|
) => {
|
|
75
71
|
|
|
76
72
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -95,7 +91,7 @@ export type GetAllApplicationExchangeRatesQueryError = ErrorType<void | DmError>
|
|
|
95
91
|
* @summary Gets Exchange Rates for all Applications
|
|
96
92
|
*/
|
|
97
93
|
export const useGetAllApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
98
|
-
params?: GetAllApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData
|
|
94
|
+
params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
99
95
|
|
|
100
96
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
101
97
|
|
|
@@ -110,6 +106,46 @@ export const useGetAllApplicationExchangeRates = <TData = Awaited<ReturnType<typ
|
|
|
110
106
|
|
|
111
107
|
|
|
112
108
|
|
|
109
|
+
export 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>}
|
|
110
|
+
) => {
|
|
111
|
+
|
|
112
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
113
|
+
|
|
114
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({ signal }) => getAllApplicationExchangeRates(params, requestOptions, signal);
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type GetAllApplicationExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>>
|
|
128
|
+
export type GetAllApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @summary Gets Exchange Rates for all Applications
|
|
132
|
+
*/
|
|
133
|
+
export const useGetAllApplicationExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
134
|
+
params?: GetAllApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
135
|
+
|
|
136
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
137
|
+
|
|
138
|
+
const queryOptions = getGetAllApplicationExchangeRatesSuspenseQueryOptions(params,options)
|
|
139
|
+
|
|
140
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
141
|
+
|
|
142
|
+
query.queryKey = queryOptions.queryKey ;
|
|
143
|
+
|
|
144
|
+
return query;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
113
149
|
/**
|
|
114
150
|
* 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.
|
|
115
151
|
|
|
@@ -131,7 +167,7 @@ if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
|
131
167
|
}
|
|
132
168
|
|
|
133
169
|
return customInstance<void>(
|
|
134
|
-
{url: `/application/${applicationId}/exchange-rate`, method: '
|
|
170
|
+
{url: `/application/${applicationId}/exchange-rate`, method: 'PUT',
|
|
135
171
|
headers: {'Content-Type': 'multipart/form-data', },
|
|
136
172
|
data: formData
|
|
137
173
|
},
|
|
@@ -141,7 +177,6 @@ if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
|
141
177
|
|
|
142
178
|
|
|
143
179
|
export const getSetApplicationExchangeRateMutationOptions = <TError = ErrorType<DmError>,
|
|
144
|
-
|
|
145
180
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
146
181
|
): UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext> => {
|
|
147
182
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
@@ -168,7 +203,6 @@ export const getSetApplicationExchangeRateMutationOptions = <TError = ErrorType<
|
|
|
168
203
|
* @summary Sets the Exchange Rate for a specific Application
|
|
169
204
|
*/
|
|
170
205
|
export const useSetApplicationExchangeRate = <TError = ErrorType<DmError>,
|
|
171
|
-
|
|
172
206
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
173
207
|
) => {
|
|
174
208
|
|
|
@@ -189,7 +223,7 @@ export const getApplicationExchangeRates = (
|
|
|
189
223
|
|
|
190
224
|
|
|
191
225
|
return customInstance<GetExchangeRatesResponse>(
|
|
192
|
-
{url: `/application/${applicationId}/exchange-rate`, method: '
|
|
226
|
+
{url: `/application/${applicationId}/exchange-rate`, method: 'GET',
|
|
193
227
|
params, signal
|
|
194
228
|
},
|
|
195
229
|
options);
|
|
@@ -198,13 +232,12 @@ export const getApplicationExchangeRates = (
|
|
|
198
232
|
|
|
199
233
|
export const getGetApplicationExchangeRatesQueryKey = (applicationId: string,
|
|
200
234
|
params?: GetApplicationExchangeRatesParams,) => {
|
|
201
|
-
|
|
202
235
|
return ["data-manager-api", `/application/${applicationId}/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
203
236
|
}
|
|
204
237
|
|
|
205
238
|
|
|
206
239
|
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
|
|
240
|
+
params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
208
241
|
) => {
|
|
209
242
|
|
|
210
243
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -230,7 +263,7 @@ export type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>
|
|
|
230
263
|
*/
|
|
231
264
|
export const useGetApplicationExchangeRates = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
232
265
|
applicationId: string,
|
|
233
|
-
params?: GetApplicationExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData
|
|
266
|
+
params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
234
267
|
|
|
235
268
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
236
269
|
|
|
@@ -245,6 +278,48 @@ export const useGetApplicationExchangeRates = <TData = Awaited<ReturnType<typeof
|
|
|
245
278
|
|
|
246
279
|
|
|
247
280
|
|
|
281
|
+
export const getGetApplicationExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,
|
|
282
|
+
params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
283
|
+
) => {
|
|
284
|
+
|
|
285
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
286
|
+
|
|
287
|
+
const queryKey = queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId,params);
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({ signal }) => getApplicationExchangeRates(applicationId,params, requestOptions, signal);
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData> & { queryKey: QueryKey }
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export type GetApplicationExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getApplicationExchangeRates>>>
|
|
301
|
+
export type GetApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @summary Gets the Application's Exchange Rate history
|
|
305
|
+
*/
|
|
306
|
+
export const useGetApplicationExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
307
|
+
applicationId: string,
|
|
308
|
+
params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
309
|
+
|
|
310
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
311
|
+
|
|
312
|
+
const queryOptions = getGetApplicationExchangeRatesSuspenseQueryOptions(applicationId,params,options)
|
|
313
|
+
|
|
314
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
315
|
+
|
|
316
|
+
query.queryKey = queryOptions.queryKey ;
|
|
317
|
+
|
|
318
|
+
return query;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
248
323
|
/**
|
|
249
324
|
* 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.
|
|
250
325
|
|
|
@@ -257,7 +332,7 @@ export const getAllJobExchangeRates = (
|
|
|
257
332
|
|
|
258
333
|
|
|
259
334
|
return customInstance<GetAllExchangeRatesResponse>(
|
|
260
|
-
{url: `/job/exchange-rate`, method: '
|
|
335
|
+
{url: `/job/exchange-rate`, method: 'GET',
|
|
261
336
|
params, signal
|
|
262
337
|
},
|
|
263
338
|
options);
|
|
@@ -265,12 +340,11 @@ export const getAllJobExchangeRates = (
|
|
|
265
340
|
|
|
266
341
|
|
|
267
342
|
export const getGetAllJobExchangeRatesQueryKey = (params?: GetAllJobExchangeRatesParams,) => {
|
|
268
|
-
|
|
269
343
|
return ["data-manager-api", `/job/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
270
344
|
}
|
|
271
345
|
|
|
272
346
|
|
|
273
|
-
export const getGetAllJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(params?: GetAllJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData
|
|
347
|
+
export 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>}
|
|
274
348
|
) => {
|
|
275
349
|
|
|
276
350
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -295,7 +369,7 @@ export type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>
|
|
|
295
369
|
* @summary Gets Exchange Rates for all Jobs
|
|
296
370
|
*/
|
|
297
371
|
export const useGetAllJobExchangeRates = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
298
|
-
params?: GetAllJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData
|
|
372
|
+
params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
299
373
|
|
|
300
374
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
301
375
|
|
|
@@ -310,6 +384,46 @@ export const useGetAllJobExchangeRates = <TData = Awaited<ReturnType<typeof getA
|
|
|
310
384
|
|
|
311
385
|
|
|
312
386
|
|
|
387
|
+
export 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>}
|
|
388
|
+
) => {
|
|
389
|
+
|
|
390
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
391
|
+
|
|
392
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) => getAllJobExchangeRates(params, requestOptions, signal);
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export type GetAllJobExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAllJobExchangeRates>>>
|
|
406
|
+
export type GetAllJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* @summary Gets Exchange Rates for all Jobs
|
|
410
|
+
*/
|
|
411
|
+
export const useGetAllJobExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
412
|
+
params?: GetAllJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
413
|
+
|
|
414
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
415
|
+
|
|
416
|
+
const queryOptions = getGetAllJobExchangeRatesSuspenseQueryOptions(params,options)
|
|
417
|
+
|
|
418
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
419
|
+
|
|
420
|
+
query.queryKey = queryOptions.queryKey ;
|
|
421
|
+
|
|
422
|
+
return query;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
313
427
|
/**
|
|
314
428
|
* 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.
|
|
315
429
|
|
|
@@ -333,7 +447,7 @@ if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
|
333
447
|
}
|
|
334
448
|
|
|
335
449
|
return customInstance<void>(
|
|
336
|
-
{url: `/job/${jobId}/exchange-rate`, method: '
|
|
450
|
+
{url: `/job/${jobId}/exchange-rate`, method: 'PUT',
|
|
337
451
|
headers: {'Content-Type': 'multipart/form-data', },
|
|
338
452
|
data: formData
|
|
339
453
|
},
|
|
@@ -343,7 +457,6 @@ if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
|
343
457
|
|
|
344
458
|
|
|
345
459
|
export const getSetJobPricingMutationOptions = <TError = ErrorType<DmError>,
|
|
346
|
-
|
|
347
460
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
348
461
|
): UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext> => {
|
|
349
462
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
@@ -370,7 +483,6 @@ export const getSetJobPricingMutationOptions = <TError = ErrorType<DmError>,
|
|
|
370
483
|
* @summary Sets the Exchange Rate for a specific Job
|
|
371
484
|
*/
|
|
372
485
|
export const useSetJobPricing = <TError = ErrorType<DmError>,
|
|
373
|
-
|
|
374
486
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setJobPricing>>, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
375
487
|
) => {
|
|
376
488
|
|
|
@@ -391,7 +503,7 @@ export const getJobExchangeRates = (
|
|
|
391
503
|
|
|
392
504
|
|
|
393
505
|
return customInstance<GetExchangeRatesResponse>(
|
|
394
|
-
{url: `/job/${jobId}/exchange-rate`, method: '
|
|
506
|
+
{url: `/job/${jobId}/exchange-rate`, method: 'GET',
|
|
395
507
|
params, signal
|
|
396
508
|
},
|
|
397
509
|
options);
|
|
@@ -400,13 +512,12 @@ export const getJobExchangeRates = (
|
|
|
400
512
|
|
|
401
513
|
export const getGetJobExchangeRatesQueryKey = (jobId: number,
|
|
402
514
|
params?: GetJobExchangeRatesParams,) => {
|
|
403
|
-
|
|
404
515
|
return ["data-manager-api", `/job/${jobId}/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
405
516
|
}
|
|
406
517
|
|
|
407
518
|
|
|
408
519
|
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
|
|
520
|
+
params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
410
521
|
) => {
|
|
411
522
|
|
|
412
523
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
@@ -432,7 +543,7 @@ export type GetJobExchangeRatesQueryError = ErrorType<void | DmError>
|
|
|
432
543
|
*/
|
|
433
544
|
export const useGetJobExchangeRates = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
434
545
|
jobId: number,
|
|
435
|
-
params?: GetJobExchangeRatesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData
|
|
546
|
+
params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
436
547
|
|
|
437
548
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
438
549
|
|
|
@@ -447,3 +558,45 @@ export const useGetJobExchangeRates = <TData = Awaited<ReturnType<typeof getJobE
|
|
|
447
558
|
|
|
448
559
|
|
|
449
560
|
|
|
561
|
+
export const getGetJobExchangeRatesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,
|
|
562
|
+
params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
563
|
+
) => {
|
|
564
|
+
|
|
565
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
566
|
+
|
|
567
|
+
const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId,params);
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) => getJobExchangeRates(jobId,params, requestOptions, signal);
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData> & { queryKey: QueryKey }
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export type GetJobExchangeRatesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobExchangeRates>>>
|
|
581
|
+
export type GetJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* @summary Gets Job Exchange Rates
|
|
585
|
+
*/
|
|
586
|
+
export const useGetJobExchangeRatesSuspense = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(
|
|
587
|
+
jobId: number,
|
|
588
|
+
params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
589
|
+
|
|
590
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
591
|
+
|
|
592
|
+
const queryOptions = getGetJobExchangeRatesSuspenseQueryOptions(jobId,params,options)
|
|
593
|
+
|
|
594
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
595
|
+
|
|
596
|
+
query.queryKey = queryOptions.queryKey ;
|
|
597
|
+
|
|
598
|
+
return query;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|