@squonk/data-manager-client 4.2.0 → 4.3.0
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/accounting/accounting.cjs +96 -95
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +47 -47
- package/accounting/accounting.d.ts +47 -47
- package/accounting/accounting.js +102 -101
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +120 -145
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +121 -121
- package/admin/admin.d.ts +121 -121
- package/admin/admin.js +127 -152
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +39 -43
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +25 -25
- package/application/application.d.ts +25 -25
- package/application/application.js +42 -46
- package/application/application.js.map +1 -1
- package/chunk-OYRETEBZ.js +25 -0
- package/chunk-OYRETEBZ.js.map +1 -0
- package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
- package/chunk-RB2KVIEK.cjs.map +1 -0
- package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
- package/chunk-XYDLYMQ2.js.map +1 -0
- package/chunk-ZLY5XEOQ.cjs +25 -0
- package/chunk-ZLY5XEOQ.cjs.map +1 -0
- package/configuration/configuration.cjs +38 -45
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +25 -25
- package/configuration/configuration.d.ts +25 -25
- package/configuration/configuration.js +42 -49
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +126 -141
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +102 -102
- package/dataset/dataset.d.ts +102 -102
- package/dataset/dataset.js +132 -147
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs +22 -24
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.d.cts +14 -14
- package/digest/digest.d.ts +14 -14
- package/digest/digest.js +24 -26
- package/digest/digest.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +111 -109
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +69 -69
- package/exchange-rate/exchange-rate.d.ts +69 -69
- package/exchange-rate/exchange-rate.js +117 -115
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +93 -138
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +102 -102
- package/file-and-path/file-and-path.d.ts +102 -102
- package/file-and-path/file-and-path.js +105 -150
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +80 -102
- package/index.cjs.map +1 -1
- package/index.d.cts +2401 -2326
- package/index.d.ts +2401 -2326
- package/index.js +79 -101
- package/index.js.map +1 -1
- package/instance/instance.cjs +100 -107
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +76 -76
- package/instance/instance.d.ts +76 -76
- package/instance/instance.js +105 -112
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs +22 -25
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.d.cts +14 -14
- package/inventory/inventory.d.ts +14 -14
- package/inventory/inventory.js +24 -27
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs +55 -67
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +36 -36
- package/job/job.d.ts +36 -36
- package/job/job.js +60 -72
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +61 -59
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +47 -47
- package/metadata/metadata.d.ts +47 -47
- package/metadata/metadata.js +65 -63
- package/metadata/metadata.js.map +1 -1
- package/package.json +13 -16
- package/project/project.cjs +165 -186
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +157 -157
- package/project/project.d.ts +157 -157
- package/project/project.js +172 -193
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +767 -461
- package/src/admin/admin.ts +1187 -787
- package/src/application/application.ts +377 -231
- package/src/configuration/configuration.ts +348 -237
- package/src/custom-instance.ts +3 -3
- package/src/data-manager-api.schemas.ts +2538 -2492
- package/src/dataset/dataset.ts +1199 -792
- package/src/digest/digest.ts +198 -122
- package/src/exchange-rate/exchange-rate.ts +1088 -612
- package/src/file-and-path/file-and-path.ts +869 -616
- package/src/index.ts +2 -2
- package/src/instance/instance.ts +804 -539
- package/src/inventory/inventory.ts +200 -122
- package/src/job/job.ts +556 -348
- package/src/metadata/metadata.ts +587 -371
- package/src/options-mutator.ts +27 -0
- package/src/project/project.ts +1576 -1034
- package/src/task/task.ts +434 -295
- package/src/type/type.ts +180 -126
- package/src/user/user.ts +846 -398
- package/src/workflow/workflow.ts +1750 -1089
- package/task/task.cjs +45 -59
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +33 -33
- package/task/task.d.ts +33 -33
- package/task/task.js +51 -65
- package/task/task.js.map +1 -1
- package/type/type.cjs +21 -26
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +14 -14
- package/type/type.d.ts +14 -14
- package/type/type.js +24 -29
- package/type/type.js.map +1 -1
- package/user/user.cjs +114 -80
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +107 -48
- package/user/user.d.ts +107 -48
- package/user/user.js +120 -86
- package/user/user.js.map +1 -1
- package/workflow/workflow.cjs +179 -193
- package/workflow/workflow.cjs.map +1 -1
- package/workflow/workflow.d.cts +146 -146
- package/workflow/workflow.d.ts +146 -146
- package/workflow/workflow.js +187 -201
- package/workflow/workflow.js.map +1 -1
- package/chunk-EBOQPVLG.js.map +0 -1
- package/chunk-TKLTUR4R.cjs.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/**
|
|
3
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
4
3
|
* Do not edit manually.
|
|
5
4
|
* Dataset Manager API
|
|
6
5
|
* The Dataset Manager API service.
|
|
@@ -9,16 +8,13 @@ A service that allows *registered* users to make **Datasets** and associated **M
|
|
|
9
8
|
|
|
10
9
|
* OpenAPI spec version: 4.1
|
|
11
10
|
*/
|
|
12
|
-
import {
|
|
13
|
-
useMutation,
|
|
14
|
-
useQuery,
|
|
15
|
-
useSuspenseQuery
|
|
16
|
-
} from '@tanstack/react-query'
|
|
11
|
+
import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
17
12
|
import type {
|
|
18
13
|
DataTag,
|
|
19
14
|
DefinedInitialDataOptions,
|
|
20
15
|
DefinedUseQueryResult,
|
|
21
16
|
MutationFunction,
|
|
17
|
+
QueryClient,
|
|
22
18
|
QueryFunction,
|
|
23
19
|
QueryKey,
|
|
24
20
|
UndefinedInitialDataOptions,
|
|
@@ -27,8 +23,9 @@ import type {
|
|
|
27
23
|
UseQueryOptions,
|
|
28
24
|
UseQueryResult,
|
|
29
25
|
UseSuspenseQueryOptions,
|
|
30
|
-
UseSuspenseQueryResult
|
|
31
|
-
} from
|
|
26
|
+
UseSuspenseQueryResult,
|
|
27
|
+
} from "@tanstack/react-query";
|
|
28
|
+
|
|
32
29
|
import type {
|
|
33
30
|
DmError,
|
|
34
31
|
ExchangeRatePutBodyBody,
|
|
@@ -37,14 +34,15 @@ import type {
|
|
|
37
34
|
GetAllJobExchangeRatesParams,
|
|
38
35
|
GetApplicationExchangeRatesParams,
|
|
39
36
|
GetExchangeRatesResponse,
|
|
40
|
-
GetJobExchangeRatesParams
|
|
41
|
-
} from
|
|
42
|
-
import { customInstance } from '.././custom-instance';
|
|
43
|
-
import type { ErrorType } from '.././custom-instance';
|
|
44
|
-
|
|
37
|
+
GetJobExchangeRatesParams,
|
|
38
|
+
} from "../data-manager-api.schemas";
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
import { customInstance } from ".././custom-instance";
|
|
41
|
+
import type { ErrorType } from ".././custom-instance";
|
|
42
|
+
import { queryMutator } from ".././options-mutator";
|
|
43
|
+
import { mutationMutator } from ".././options-mutator";
|
|
47
44
|
|
|
45
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
48
46
|
|
|
49
47
|
/**
|
|
50
48
|
* 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.
|
|
@@ -54,144 +52,261 @@ If an Application has no specific rate it adopts the current value of the defaul
|
|
|
54
52
|
* @summary Gets Exchange Rates for all Applications
|
|
55
53
|
*/
|
|
56
54
|
export const getAllApplicationExchangeRates = (
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
56
|
+
options?: SecondParameter<typeof customInstance>,
|
|
57
|
+
signal?: AbortSignal,
|
|
59
58
|
) => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export const getGetAllApplicationExchangeRatesQueryKey = (params?: GetAllApplicationExchangeRatesParams,) => {
|
|
71
|
-
return ["data-manager-api", `/application/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
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>}
|
|
59
|
+
return customInstance<GetAllExchangeRatesResponse>(
|
|
60
|
+
{ url: `/application/exchange-rate`, method: "GET", params, signal },
|
|
61
|
+
options,
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const getGetAllApplicationExchangeRatesQueryKey = (
|
|
66
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
76
67
|
) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
return [`/application/exchange-rate`, ...(params ? [params] : [])] as const;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const useGetAllApplicationExchangeRatesQueryOptions = <
|
|
72
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
73
|
+
TError = ErrorType<void | DmError>,
|
|
74
|
+
>(
|
|
75
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
76
|
+
options?: {
|
|
77
|
+
query?: Partial<
|
|
78
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>
|
|
79
|
+
>;
|
|
80
|
+
request?: SecondParameter<typeof customInstance>;
|
|
81
|
+
},
|
|
82
|
+
) => {
|
|
83
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
84
|
+
|
|
85
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);
|
|
86
|
+
|
|
87
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({
|
|
88
|
+
signal,
|
|
89
|
+
}) => getAllApplicationExchangeRates(params, requestOptions, signal);
|
|
90
|
+
|
|
91
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
92
|
+
|
|
93
|
+
return customOptions as UseQueryOptions<
|
|
94
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
95
|
+
TError,
|
|
96
|
+
TData
|
|
97
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export type GetAllApplicationExchangeRatesQueryResult = NonNullable<
|
|
101
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
|
|
102
|
+
>;
|
|
103
|
+
export type GetAllApplicationExchangeRatesQueryError = ErrorType<void | DmError>;
|
|
104
|
+
|
|
105
|
+
export function useGetAllApplicationExchangeRates<
|
|
106
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
107
|
+
TError = ErrorType<void | DmError>,
|
|
108
|
+
>(
|
|
109
|
+
params: undefined | GetAllApplicationExchangeRatesParams,
|
|
110
|
+
options: {
|
|
111
|
+
query: Partial<
|
|
112
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>
|
|
113
|
+
> &
|
|
114
|
+
Pick<
|
|
99
115
|
DefinedInitialDataOptions<
|
|
100
116
|
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
101
117
|
TError,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
118
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
|
|
119
|
+
>,
|
|
120
|
+
"initialData"
|
|
121
|
+
>;
|
|
122
|
+
request?: SecondParameter<typeof customInstance>;
|
|
123
|
+
},
|
|
124
|
+
queryClient?: QueryClient,
|
|
125
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
126
|
+
export function useGetAllApplicationExchangeRates<
|
|
127
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
128
|
+
TError = ErrorType<void | DmError>,
|
|
129
|
+
>(
|
|
130
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
131
|
+
options?: {
|
|
132
|
+
query?: Partial<
|
|
133
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>
|
|
134
|
+
> &
|
|
135
|
+
Pick<
|
|
109
136
|
UndefinedInitialDataOptions<
|
|
110
137
|
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
111
138
|
TError,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
|
|
140
|
+
>,
|
|
141
|
+
"initialData"
|
|
142
|
+
>;
|
|
143
|
+
request?: SecondParameter<typeof customInstance>;
|
|
144
|
+
},
|
|
145
|
+
queryClient?: QueryClient,
|
|
146
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
147
|
+
export function useGetAllApplicationExchangeRates<
|
|
148
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
149
|
+
TError = ErrorType<void | DmError>,
|
|
150
|
+
>(
|
|
151
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
152
|
+
options?: {
|
|
153
|
+
query?: Partial<
|
|
154
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>
|
|
155
|
+
>;
|
|
156
|
+
request?: SecondParameter<typeof customInstance>;
|
|
157
|
+
},
|
|
158
|
+
queryClient?: QueryClient,
|
|
159
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
121
160
|
/**
|
|
122
161
|
* @summary Gets Exchange Rates for all Applications
|
|
123
162
|
*/
|
|
124
163
|
|
|
125
|
-
export function useGetAllApplicationExchangeRates<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
164
|
+
export function useGetAllApplicationExchangeRates<
|
|
165
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
166
|
+
TError = ErrorType<void | DmError>,
|
|
167
|
+
>(
|
|
168
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
169
|
+
options?: {
|
|
170
|
+
query?: Partial<
|
|
171
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>, TError, TData>
|
|
172
|
+
>;
|
|
173
|
+
request?: SecondParameter<typeof customInstance>;
|
|
174
|
+
},
|
|
175
|
+
queryClient?: QueryClient,
|
|
176
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
177
|
+
const queryOptions = useGetAllApplicationExchangeRatesQueryOptions(params, options);
|
|
178
|
+
|
|
179
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
180
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
query.queryKey = queryOptions.queryKey;
|
|
135
184
|
|
|
136
185
|
return query;
|
|
137
186
|
}
|
|
138
187
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
188
|
+
export const useGetAllApplicationExchangeRatesSuspenseQueryOptions = <
|
|
189
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
190
|
+
TError = ErrorType<void | DmError>,
|
|
191
|
+
>(
|
|
192
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
193
|
+
options?: {
|
|
194
|
+
query?: Partial<
|
|
195
|
+
UseSuspenseQueryOptions<
|
|
196
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
197
|
+
TError,
|
|
198
|
+
TData
|
|
199
|
+
>
|
|
200
|
+
>;
|
|
201
|
+
request?: SecondParameter<typeof customInstance>;
|
|
202
|
+
},
|
|
142
203
|
) => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
export type
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
export
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
204
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
205
|
+
|
|
206
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllApplicationExchangeRatesQueryKey(params);
|
|
207
|
+
|
|
208
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllApplicationExchangeRates>>> = ({
|
|
209
|
+
signal,
|
|
210
|
+
}) => getAllApplicationExchangeRates(params, requestOptions, signal);
|
|
211
|
+
|
|
212
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
213
|
+
|
|
214
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
215
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
216
|
+
TError,
|
|
217
|
+
TData
|
|
218
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export type GetAllApplicationExchangeRatesSuspenseQueryResult = NonNullable<
|
|
222
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>
|
|
223
|
+
>;
|
|
224
|
+
export type GetAllApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>;
|
|
225
|
+
|
|
226
|
+
export function useGetAllApplicationExchangeRatesSuspense<
|
|
227
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
228
|
+
TError = ErrorType<void | DmError>,
|
|
229
|
+
>(
|
|
230
|
+
params: undefined | GetAllApplicationExchangeRatesParams,
|
|
231
|
+
options: {
|
|
232
|
+
query: Partial<
|
|
233
|
+
UseSuspenseQueryOptions<
|
|
234
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
235
|
+
TError,
|
|
236
|
+
TData
|
|
237
|
+
>
|
|
238
|
+
>;
|
|
239
|
+
request?: SecondParameter<typeof customInstance>;
|
|
240
|
+
},
|
|
241
|
+
queryClient?: QueryClient,
|
|
242
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
243
|
+
export function useGetAllApplicationExchangeRatesSuspense<
|
|
244
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
245
|
+
TError = ErrorType<void | DmError>,
|
|
246
|
+
>(
|
|
247
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
248
|
+
options?: {
|
|
249
|
+
query?: Partial<
|
|
250
|
+
UseSuspenseQueryOptions<
|
|
251
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
252
|
+
TError,
|
|
253
|
+
TData
|
|
254
|
+
>
|
|
255
|
+
>;
|
|
256
|
+
request?: SecondParameter<typeof customInstance>;
|
|
257
|
+
},
|
|
258
|
+
queryClient?: QueryClient,
|
|
259
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
260
|
+
export function useGetAllApplicationExchangeRatesSuspense<
|
|
261
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
262
|
+
TError = ErrorType<void | DmError>,
|
|
263
|
+
>(
|
|
264
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
265
|
+
options?: {
|
|
266
|
+
query?: Partial<
|
|
267
|
+
UseSuspenseQueryOptions<
|
|
268
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
269
|
+
TError,
|
|
270
|
+
TData
|
|
271
|
+
>
|
|
272
|
+
>;
|
|
273
|
+
request?: SecondParameter<typeof customInstance>;
|
|
274
|
+
},
|
|
275
|
+
queryClient?: QueryClient,
|
|
276
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
175
277
|
/**
|
|
176
278
|
* @summary Gets Exchange Rates for all Applications
|
|
177
279
|
*/
|
|
178
280
|
|
|
179
|
-
export function useGetAllApplicationExchangeRatesSuspense<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
281
|
+
export function useGetAllApplicationExchangeRatesSuspense<
|
|
282
|
+
TData = Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
283
|
+
TError = ErrorType<void | DmError>,
|
|
284
|
+
>(
|
|
285
|
+
params?: GetAllApplicationExchangeRatesParams,
|
|
286
|
+
options?: {
|
|
287
|
+
query?: Partial<
|
|
288
|
+
UseSuspenseQueryOptions<
|
|
289
|
+
Awaited<ReturnType<typeof getAllApplicationExchangeRates>>,
|
|
290
|
+
TError,
|
|
291
|
+
TData
|
|
292
|
+
>
|
|
293
|
+
>;
|
|
294
|
+
request?: SecondParameter<typeof customInstance>;
|
|
295
|
+
},
|
|
296
|
+
queryClient?: QueryClient,
|
|
297
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
298
|
+
const queryOptions = useGetAllApplicationExchangeRatesSuspenseQueryOptions(params, options);
|
|
299
|
+
|
|
300
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
301
|
+
TData,
|
|
302
|
+
TError
|
|
303
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
304
|
+
|
|
305
|
+
query.queryKey = queryOptions.queryKey;
|
|
189
306
|
|
|
190
307
|
return query;
|
|
191
308
|
}
|
|
192
309
|
|
|
193
|
-
|
|
194
|
-
|
|
195
310
|
/**
|
|
196
311
|
* 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.
|
|
197
312
|
|
|
@@ -202,370 +317,614 @@ You need `admin` privilege to use this method.
|
|
|
202
317
|
* @summary Sets the Exchange Rate for a specific Application
|
|
203
318
|
*/
|
|
204
319
|
export const setApplicationExchangeRate = (
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const formUrlEncoded = new URLSearchParams();
|
|
210
|
-
formUrlEncoded.append('rate', exchangeRatePutBodyBody.rate)
|
|
211
|
-
if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
212
|
-
formUrlEncoded.append('comment', exchangeRatePutBodyBody.comment)
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return customInstance<void>(
|
|
216
|
-
{url: `/application/${applicationId}/exchange-rate`, method: 'PUT',
|
|
217
|
-
headers: {'Content-Type': 'application/x-www-form-urlencoded', },
|
|
218
|
-
data: formUrlEncoded
|
|
219
|
-
},
|
|
220
|
-
options);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
export const getSetApplicationExchangeRateMutationOptions = <TData = Awaited<ReturnType<typeof setApplicationExchangeRate>>, TError = ErrorType<void | DmError>,
|
|
226
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{applicationId: string;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
320
|
+
applicationId: string,
|
|
321
|
+
exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
|
|
322
|
+
options?: SecondParameter<typeof customInstance>,
|
|
227
323
|
) => {
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
324
|
+
const formUrlEncoded = new URLSearchParams();
|
|
325
|
+
formUrlEncoded.append(`rate`, exchangeRatePutBodyBody.rate);
|
|
326
|
+
if (exchangeRatePutBodyBody.comment !== undefined) {
|
|
327
|
+
formUrlEncoded.append(`comment`, exchangeRatePutBodyBody.comment);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return customInstance<void>(
|
|
331
|
+
{
|
|
332
|
+
url: `/application/${applicationId}/exchange-rate`,
|
|
333
|
+
method: "PUT",
|
|
334
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
335
|
+
data: formUrlEncoded,
|
|
336
|
+
},
|
|
337
|
+
options,
|
|
338
|
+
);
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
export const useSetApplicationExchangeRateMutationOptions = <
|
|
342
|
+
TError = ErrorType<void | DmError>,
|
|
343
|
+
TContext = unknown,
|
|
344
|
+
>(options?: {
|
|
345
|
+
mutation?: UseMutationOptions<
|
|
346
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>,
|
|
347
|
+
TError,
|
|
348
|
+
{ applicationId: string; data: ExchangeRatePutBodyBody },
|
|
349
|
+
TContext
|
|
350
|
+
>;
|
|
351
|
+
request?: SecondParameter<typeof customInstance>;
|
|
352
|
+
}): UseMutationOptions<
|
|
353
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>,
|
|
354
|
+
TError,
|
|
355
|
+
{ applicationId: string; data: ExchangeRatePutBodyBody },
|
|
356
|
+
TContext
|
|
357
|
+
> => {
|
|
358
|
+
const mutationKey = ["setApplicationExchangeRate"];
|
|
359
|
+
const { mutation: mutationOptions, request: requestOptions } = options
|
|
360
|
+
? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey
|
|
361
|
+
? options
|
|
362
|
+
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
363
|
+
: { mutation: { mutationKey }, request: undefined };
|
|
364
|
+
|
|
365
|
+
const mutationFn: MutationFunction<
|
|
366
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>,
|
|
367
|
+
{ applicationId: string; data: ExchangeRatePutBodyBody }
|
|
368
|
+
> = (props) => {
|
|
369
|
+
const { applicationId, data } = props ?? {};
|
|
370
|
+
|
|
371
|
+
return setApplicationExchangeRate(applicationId, data, requestOptions);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
const customOptions = mutationMutator({ ...mutationOptions, mutationFn });
|
|
375
|
+
|
|
376
|
+
return customOptions;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export type SetApplicationExchangeRateMutationResult = NonNullable<
|
|
380
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>
|
|
381
|
+
>;
|
|
382
|
+
export type SetApplicationExchangeRateMutationBody = ExchangeRatePutBodyBody;
|
|
383
|
+
export type SetApplicationExchangeRateMutationError = ErrorType<void | DmError>;
|
|
252
384
|
|
|
253
|
-
|
|
385
|
+
/**
|
|
254
386
|
* @summary Sets the Exchange Rate for a specific Application
|
|
255
387
|
*/
|
|
256
|
-
export const useSetApplicationExchangeRate = <
|
|
257
|
-
|
|
388
|
+
export const useSetApplicationExchangeRate = <
|
|
389
|
+
TError = ErrorType<void | DmError>,
|
|
390
|
+
TContext = unknown,
|
|
391
|
+
>(
|
|
392
|
+
options?: {
|
|
393
|
+
mutation?: UseMutationOptions<
|
|
394
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>,
|
|
395
|
+
TError,
|
|
396
|
+
{ applicationId: string; data: ExchangeRatePutBodyBody },
|
|
397
|
+
TContext
|
|
398
|
+
>;
|
|
399
|
+
request?: SecondParameter<typeof customInstance>;
|
|
400
|
+
},
|
|
401
|
+
queryClient?: QueryClient,
|
|
258
402
|
): UseMutationResult<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
/**
|
|
403
|
+
Awaited<ReturnType<typeof setApplicationExchangeRate>>,
|
|
404
|
+
TError,
|
|
405
|
+
{ applicationId: string; data: ExchangeRatePutBodyBody },
|
|
406
|
+
TContext
|
|
407
|
+
> => {
|
|
408
|
+
const mutationOptions = useSetApplicationExchangeRateMutationOptions(options);
|
|
409
|
+
|
|
410
|
+
return useMutation(mutationOptions, queryClient);
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
270
413
|
* 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.
|
|
271
414
|
|
|
272
415
|
* @summary Gets the Application's Exchange Rate history
|
|
273
416
|
*/
|
|
274
417
|
export const getApplicationExchangeRates = (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
418
|
+
applicationId: string,
|
|
419
|
+
params?: GetApplicationExchangeRatesParams,
|
|
420
|
+
options?: SecondParameter<typeof customInstance>,
|
|
421
|
+
signal?: AbortSignal,
|
|
278
422
|
) => {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
export const getGetApplicationExchangeRatesQueryKey = (applicationId: string,
|
|
290
|
-
params?: GetApplicationExchangeRatesParams,) => {
|
|
291
|
-
return ["data-manager-api", `/application/${applicationId}/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
export const getGetApplicationExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError = ErrorType<void | DmError>>(applicationId: string,
|
|
296
|
-
params?: GetApplicationExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
423
|
+
return customInstance<GetExchangeRatesResponse>(
|
|
424
|
+
{ url: `/application/${applicationId}/exchange-rate`, method: "GET", params, signal },
|
|
425
|
+
options,
|
|
426
|
+
);
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export const getGetApplicationExchangeRatesQueryKey = (
|
|
430
|
+
applicationId: string,
|
|
431
|
+
params?: GetApplicationExchangeRatesParams,
|
|
297
432
|
) => {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
433
|
+
return [`/application/${applicationId}/exchange-rate`, ...(params ? [params] : [])] as const;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
export const useGetApplicationExchangeRatesQueryOptions = <
|
|
437
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
438
|
+
TError = ErrorType<void | DmError>,
|
|
439
|
+
>(
|
|
440
|
+
applicationId: string,
|
|
441
|
+
params?: GetApplicationExchangeRatesParams,
|
|
442
|
+
options?: {
|
|
443
|
+
query?: Partial<
|
|
444
|
+
UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>
|
|
445
|
+
>;
|
|
446
|
+
request?: SecondParameter<typeof customInstance>;
|
|
447
|
+
},
|
|
448
|
+
) => {
|
|
449
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
450
|
+
|
|
451
|
+
const queryKey =
|
|
452
|
+
queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId, params);
|
|
453
|
+
|
|
454
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({
|
|
455
|
+
signal,
|
|
456
|
+
}) => getApplicationExchangeRates(applicationId, params, requestOptions, signal);
|
|
457
|
+
|
|
458
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
459
|
+
|
|
460
|
+
return customOptions as UseQueryOptions<
|
|
461
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
462
|
+
TError,
|
|
463
|
+
TData
|
|
464
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
export type GetApplicationExchangeRatesQueryResult = NonNullable<
|
|
468
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>
|
|
469
|
+
>;
|
|
470
|
+
export type GetApplicationExchangeRatesQueryError = ErrorType<void | DmError>;
|
|
471
|
+
|
|
472
|
+
export function useGetApplicationExchangeRates<
|
|
473
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
474
|
+
TError = ErrorType<void | DmError>,
|
|
475
|
+
>(
|
|
476
|
+
applicationId: string,
|
|
477
|
+
params: undefined | GetApplicationExchangeRatesParams,
|
|
478
|
+
options: {
|
|
479
|
+
query: Partial<
|
|
480
|
+
UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>
|
|
481
|
+
> &
|
|
482
|
+
Pick<
|
|
321
483
|
DefinedInitialDataOptions<
|
|
322
484
|
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
323
485
|
TError,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
486
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>
|
|
487
|
+
>,
|
|
488
|
+
"initialData"
|
|
489
|
+
>;
|
|
490
|
+
request?: SecondParameter<typeof customInstance>;
|
|
491
|
+
},
|
|
492
|
+
queryClient?: QueryClient,
|
|
493
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
494
|
+
export function useGetApplicationExchangeRates<
|
|
495
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
496
|
+
TError = ErrorType<void | DmError>,
|
|
497
|
+
>(
|
|
498
|
+
applicationId: string,
|
|
499
|
+
params?: GetApplicationExchangeRatesParams,
|
|
500
|
+
options?: {
|
|
501
|
+
query?: Partial<
|
|
502
|
+
UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>
|
|
503
|
+
> &
|
|
504
|
+
Pick<
|
|
332
505
|
UndefinedInitialDataOptions<
|
|
333
506
|
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
334
507
|
TError,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
508
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>
|
|
509
|
+
>,
|
|
510
|
+
"initialData"
|
|
511
|
+
>;
|
|
512
|
+
request?: SecondParameter<typeof customInstance>;
|
|
513
|
+
},
|
|
514
|
+
queryClient?: QueryClient,
|
|
515
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
516
|
+
export function useGetApplicationExchangeRates<
|
|
517
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
518
|
+
TError = ErrorType<void | DmError>,
|
|
519
|
+
>(
|
|
520
|
+
applicationId: string,
|
|
521
|
+
params?: GetApplicationExchangeRatesParams,
|
|
522
|
+
options?: {
|
|
523
|
+
query?: Partial<
|
|
524
|
+
UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>
|
|
525
|
+
>;
|
|
526
|
+
request?: SecondParameter<typeof customInstance>;
|
|
527
|
+
},
|
|
528
|
+
queryClient?: QueryClient,
|
|
529
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
345
530
|
/**
|
|
346
531
|
* @summary Gets the Application's Exchange Rate history
|
|
347
532
|
*/
|
|
348
533
|
|
|
349
|
-
export function useGetApplicationExchangeRates<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
534
|
+
export function useGetApplicationExchangeRates<
|
|
535
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
536
|
+
TError = ErrorType<void | DmError>,
|
|
537
|
+
>(
|
|
538
|
+
applicationId: string,
|
|
539
|
+
params?: GetApplicationExchangeRatesParams,
|
|
540
|
+
options?: {
|
|
541
|
+
query?: Partial<
|
|
542
|
+
UseQueryOptions<Awaited<ReturnType<typeof getApplicationExchangeRates>>, TError, TData>
|
|
543
|
+
>;
|
|
544
|
+
request?: SecondParameter<typeof customInstance>;
|
|
545
|
+
},
|
|
546
|
+
queryClient?: QueryClient,
|
|
547
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
548
|
+
const queryOptions = useGetApplicationExchangeRatesQueryOptions(applicationId, params, options);
|
|
549
|
+
|
|
550
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
551
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
query.queryKey = queryOptions.queryKey;
|
|
360
555
|
|
|
361
556
|
return query;
|
|
362
557
|
}
|
|
363
558
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
559
|
+
export const useGetApplicationExchangeRatesSuspenseQueryOptions = <
|
|
560
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
561
|
+
TError = ErrorType<void | DmError>,
|
|
562
|
+
>(
|
|
563
|
+
applicationId: string,
|
|
564
|
+
params?: GetApplicationExchangeRatesParams,
|
|
565
|
+
options?: {
|
|
566
|
+
query?: Partial<
|
|
567
|
+
UseSuspenseQueryOptions<
|
|
568
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
569
|
+
TError,
|
|
570
|
+
TData
|
|
571
|
+
>
|
|
572
|
+
>;
|
|
573
|
+
request?: SecondParameter<typeof customInstance>;
|
|
574
|
+
},
|
|
368
575
|
) => {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
576
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
577
|
+
|
|
578
|
+
const queryKey =
|
|
579
|
+
queryOptions?.queryKey ?? getGetApplicationExchangeRatesQueryKey(applicationId, params);
|
|
580
|
+
|
|
581
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplicationExchangeRates>>> = ({
|
|
582
|
+
signal,
|
|
583
|
+
}) => getApplicationExchangeRates(applicationId, params, requestOptions, signal);
|
|
584
|
+
|
|
585
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
586
|
+
|
|
587
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
588
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
589
|
+
TError,
|
|
590
|
+
TData
|
|
591
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
export type GetApplicationExchangeRatesSuspenseQueryResult = NonNullable<
|
|
595
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>
|
|
596
|
+
>;
|
|
597
|
+
export type GetApplicationExchangeRatesSuspenseQueryError = ErrorType<void | DmError>;
|
|
598
|
+
|
|
599
|
+
export function useGetApplicationExchangeRatesSuspense<
|
|
600
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
601
|
+
TError = ErrorType<void | DmError>,
|
|
602
|
+
>(
|
|
603
|
+
applicationId: string,
|
|
604
|
+
params: undefined | GetApplicationExchangeRatesParams,
|
|
605
|
+
options: {
|
|
606
|
+
query: Partial<
|
|
607
|
+
UseSuspenseQueryOptions<
|
|
608
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
609
|
+
TError,
|
|
610
|
+
TData
|
|
611
|
+
>
|
|
612
|
+
>;
|
|
613
|
+
request?: SecondParameter<typeof customInstance>;
|
|
614
|
+
},
|
|
615
|
+
queryClient?: QueryClient,
|
|
616
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
617
|
+
export function useGetApplicationExchangeRatesSuspense<
|
|
618
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
619
|
+
TError = ErrorType<void | DmError>,
|
|
620
|
+
>(
|
|
621
|
+
applicationId: string,
|
|
622
|
+
params?: GetApplicationExchangeRatesParams,
|
|
623
|
+
options?: {
|
|
624
|
+
query?: Partial<
|
|
625
|
+
UseSuspenseQueryOptions<
|
|
626
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
627
|
+
TError,
|
|
628
|
+
TData
|
|
629
|
+
>
|
|
630
|
+
>;
|
|
631
|
+
request?: SecondParameter<typeof customInstance>;
|
|
632
|
+
},
|
|
633
|
+
queryClient?: QueryClient,
|
|
634
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
635
|
+
export function useGetApplicationExchangeRatesSuspense<
|
|
636
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
637
|
+
TError = ErrorType<void | DmError>,
|
|
638
|
+
>(
|
|
639
|
+
applicationId: string,
|
|
640
|
+
params?: GetApplicationExchangeRatesParams,
|
|
641
|
+
options?: {
|
|
642
|
+
query?: Partial<
|
|
643
|
+
UseSuspenseQueryOptions<
|
|
644
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
645
|
+
TError,
|
|
646
|
+
TData
|
|
647
|
+
>
|
|
648
|
+
>;
|
|
649
|
+
request?: SecondParameter<typeof customInstance>;
|
|
650
|
+
},
|
|
651
|
+
queryClient?: QueryClient,
|
|
652
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
404
653
|
/**
|
|
405
654
|
* @summary Gets the Application's Exchange Rate history
|
|
406
655
|
*/
|
|
407
656
|
|
|
408
|
-
export function useGetApplicationExchangeRatesSuspense<
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
657
|
+
export function useGetApplicationExchangeRatesSuspense<
|
|
658
|
+
TData = Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
659
|
+
TError = ErrorType<void | DmError>,
|
|
660
|
+
>(
|
|
661
|
+
applicationId: string,
|
|
662
|
+
params?: GetApplicationExchangeRatesParams,
|
|
663
|
+
options?: {
|
|
664
|
+
query?: Partial<
|
|
665
|
+
UseSuspenseQueryOptions<
|
|
666
|
+
Awaited<ReturnType<typeof getApplicationExchangeRates>>,
|
|
667
|
+
TError,
|
|
668
|
+
TData
|
|
669
|
+
>
|
|
670
|
+
>;
|
|
671
|
+
request?: SecondParameter<typeof customInstance>;
|
|
672
|
+
},
|
|
673
|
+
queryClient?: QueryClient,
|
|
674
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
675
|
+
const queryOptions = useGetApplicationExchangeRatesSuspenseQueryOptions(
|
|
676
|
+
applicationId,
|
|
677
|
+
params,
|
|
678
|
+
options,
|
|
679
|
+
);
|
|
680
|
+
|
|
681
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
682
|
+
TData,
|
|
683
|
+
TError
|
|
684
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
685
|
+
|
|
686
|
+
query.queryKey = queryOptions.queryKey;
|
|
419
687
|
|
|
420
688
|
return query;
|
|
421
689
|
}
|
|
422
690
|
|
|
423
|
-
|
|
424
|
-
|
|
425
691
|
/**
|
|
426
692
|
* 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.
|
|
427
693
|
|
|
428
694
|
* @summary Gets Exchange Rates for all Jobs
|
|
429
695
|
*/
|
|
430
696
|
export const getAllJobExchangeRates = (
|
|
431
|
-
|
|
432
|
-
|
|
697
|
+
params?: GetAllJobExchangeRatesParams,
|
|
698
|
+
options?: SecondParameter<typeof customInstance>,
|
|
699
|
+
signal?: AbortSignal,
|
|
433
700
|
) => {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
export const
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
701
|
+
return customInstance<GetAllExchangeRatesResponse>(
|
|
702
|
+
{ url: `/job/exchange-rate`, method: "GET", params, signal },
|
|
703
|
+
options,
|
|
704
|
+
);
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
export const getGetAllJobExchangeRatesQueryKey = (params?: GetAllJobExchangeRatesParams) => {
|
|
708
|
+
return [`/job/exchange-rate`, ...(params ? [params] : [])] as const;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
export const useGetAllJobExchangeRatesQueryOptions = <
|
|
712
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
713
|
+
TError = ErrorType<void | DmError>,
|
|
714
|
+
>(
|
|
715
|
+
params?: GetAllJobExchangeRatesParams,
|
|
716
|
+
options?: {
|
|
717
|
+
query?: Partial<
|
|
718
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
719
|
+
>;
|
|
720
|
+
request?: SecondParameter<typeof customInstance>;
|
|
721
|
+
},
|
|
450
722
|
) => {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
export type GetAllJobExchangeRatesQueryResult = NonNullable<
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
723
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
724
|
+
|
|
725
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);
|
|
726
|
+
|
|
727
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) =>
|
|
728
|
+
getAllJobExchangeRates(params, requestOptions, signal);
|
|
729
|
+
|
|
730
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
731
|
+
|
|
732
|
+
return customOptions as UseQueryOptions<
|
|
733
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
734
|
+
TError,
|
|
735
|
+
TData
|
|
736
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
export type GetAllJobExchangeRatesQueryResult = NonNullable<
|
|
740
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>
|
|
741
|
+
>;
|
|
742
|
+
export type GetAllJobExchangeRatesQueryError = ErrorType<void | DmError>;
|
|
743
|
+
|
|
744
|
+
export function useGetAllJobExchangeRates<
|
|
745
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
746
|
+
TError = ErrorType<void | DmError>,
|
|
747
|
+
>(
|
|
748
|
+
params: undefined | GetAllJobExchangeRatesParams,
|
|
749
|
+
options: {
|
|
750
|
+
query: Partial<
|
|
751
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
752
|
+
> &
|
|
753
|
+
Pick<
|
|
473
754
|
DefinedInitialDataOptions<
|
|
474
755
|
Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
475
756
|
TError,
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
757
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>
|
|
758
|
+
>,
|
|
759
|
+
"initialData"
|
|
760
|
+
>;
|
|
761
|
+
request?: SecondParameter<typeof customInstance>;
|
|
762
|
+
},
|
|
763
|
+
queryClient?: QueryClient,
|
|
764
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
765
|
+
export function useGetAllJobExchangeRates<
|
|
766
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
767
|
+
TError = ErrorType<void | DmError>,
|
|
768
|
+
>(
|
|
769
|
+
params?: GetAllJobExchangeRatesParams,
|
|
770
|
+
options?: {
|
|
771
|
+
query?: Partial<
|
|
772
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
773
|
+
> &
|
|
774
|
+
Pick<
|
|
483
775
|
UndefinedInitialDataOptions<
|
|
484
776
|
Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
485
777
|
TError,
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
778
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>
|
|
779
|
+
>,
|
|
780
|
+
"initialData"
|
|
781
|
+
>;
|
|
782
|
+
request?: SecondParameter<typeof customInstance>;
|
|
783
|
+
},
|
|
784
|
+
queryClient?: QueryClient,
|
|
785
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
786
|
+
export function useGetAllJobExchangeRates<
|
|
787
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
788
|
+
TError = ErrorType<void | DmError>,
|
|
789
|
+
>(
|
|
790
|
+
params?: GetAllJobExchangeRatesParams,
|
|
791
|
+
options?: {
|
|
792
|
+
query?: Partial<
|
|
793
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
794
|
+
>;
|
|
795
|
+
request?: SecondParameter<typeof customInstance>;
|
|
796
|
+
},
|
|
797
|
+
queryClient?: QueryClient,
|
|
798
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
495
799
|
/**
|
|
496
800
|
* @summary Gets Exchange Rates for all Jobs
|
|
497
801
|
*/
|
|
498
802
|
|
|
499
|
-
export function useGetAllJobExchangeRates<
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
803
|
+
export function useGetAllJobExchangeRates<
|
|
804
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
805
|
+
TError = ErrorType<void | DmError>,
|
|
806
|
+
>(
|
|
807
|
+
params?: GetAllJobExchangeRatesParams,
|
|
808
|
+
options?: {
|
|
809
|
+
query?: Partial<
|
|
810
|
+
UseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
811
|
+
>;
|
|
812
|
+
request?: SecondParameter<typeof customInstance>;
|
|
813
|
+
},
|
|
814
|
+
queryClient?: QueryClient,
|
|
815
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
816
|
+
const queryOptions = useGetAllJobExchangeRatesQueryOptions(params, options);
|
|
817
|
+
|
|
818
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
819
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
query.queryKey = queryOptions.queryKey;
|
|
509
823
|
|
|
510
824
|
return query;
|
|
511
825
|
}
|
|
512
826
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
827
|
+
export const useGetAllJobExchangeRatesSuspenseQueryOptions = <
|
|
828
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
829
|
+
TError = ErrorType<void | DmError>,
|
|
830
|
+
>(
|
|
831
|
+
params?: GetAllJobExchangeRatesParams,
|
|
832
|
+
options?: {
|
|
833
|
+
query?: Partial<
|
|
834
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
835
|
+
>;
|
|
836
|
+
request?: SecondParameter<typeof customInstance>;
|
|
837
|
+
},
|
|
516
838
|
) => {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
export type GetAllJobExchangeRatesSuspenseQueryResult = NonNullable<
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
839
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
840
|
+
|
|
841
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllJobExchangeRatesQueryKey(params);
|
|
842
|
+
|
|
843
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAllJobExchangeRates>>> = ({ signal }) =>
|
|
844
|
+
getAllJobExchangeRates(params, requestOptions, signal);
|
|
845
|
+
|
|
846
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
847
|
+
|
|
848
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
849
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
850
|
+
TError,
|
|
851
|
+
TData
|
|
852
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
export type GetAllJobExchangeRatesSuspenseQueryResult = NonNullable<
|
|
856
|
+
Awaited<ReturnType<typeof getAllJobExchangeRates>>
|
|
857
|
+
>;
|
|
858
|
+
export type GetAllJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>;
|
|
859
|
+
|
|
860
|
+
export function useGetAllJobExchangeRatesSuspense<
|
|
861
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
862
|
+
TError = ErrorType<void | DmError>,
|
|
863
|
+
>(
|
|
864
|
+
params: undefined | GetAllJobExchangeRatesParams,
|
|
865
|
+
options: {
|
|
866
|
+
query: Partial<
|
|
867
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
868
|
+
>;
|
|
869
|
+
request?: SecondParameter<typeof customInstance>;
|
|
870
|
+
},
|
|
871
|
+
queryClient?: QueryClient,
|
|
872
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
873
|
+
export function useGetAllJobExchangeRatesSuspense<
|
|
874
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
875
|
+
TError = ErrorType<void | DmError>,
|
|
876
|
+
>(
|
|
877
|
+
params?: GetAllJobExchangeRatesParams,
|
|
878
|
+
options?: {
|
|
879
|
+
query?: Partial<
|
|
880
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
881
|
+
>;
|
|
882
|
+
request?: SecondParameter<typeof customInstance>;
|
|
883
|
+
},
|
|
884
|
+
queryClient?: QueryClient,
|
|
885
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
886
|
+
export function useGetAllJobExchangeRatesSuspense<
|
|
887
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
888
|
+
TError = ErrorType<void | DmError>,
|
|
889
|
+
>(
|
|
890
|
+
params?: GetAllJobExchangeRatesParams,
|
|
891
|
+
options?: {
|
|
892
|
+
query?: Partial<
|
|
893
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
894
|
+
>;
|
|
895
|
+
request?: SecondParameter<typeof customInstance>;
|
|
896
|
+
},
|
|
897
|
+
queryClient?: QueryClient,
|
|
898
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
549
899
|
/**
|
|
550
900
|
* @summary Gets Exchange Rates for all Jobs
|
|
551
901
|
*/
|
|
552
902
|
|
|
553
|
-
export function useGetAllJobExchangeRatesSuspense<
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
903
|
+
export function useGetAllJobExchangeRatesSuspense<
|
|
904
|
+
TData = Awaited<ReturnType<typeof getAllJobExchangeRates>>,
|
|
905
|
+
TError = ErrorType<void | DmError>,
|
|
906
|
+
>(
|
|
907
|
+
params?: GetAllJobExchangeRatesParams,
|
|
908
|
+
options?: {
|
|
909
|
+
query?: Partial<
|
|
910
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAllJobExchangeRates>>, TError, TData>
|
|
911
|
+
>;
|
|
912
|
+
request?: SecondParameter<typeof customInstance>;
|
|
913
|
+
},
|
|
914
|
+
queryClient?: QueryClient,
|
|
915
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
916
|
+
const queryOptions = useGetAllJobExchangeRatesSuspenseQueryOptions(params, options);
|
|
917
|
+
|
|
918
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
919
|
+
TData,
|
|
920
|
+
TError
|
|
921
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
922
|
+
|
|
923
|
+
query.queryKey = queryOptions.queryKey;
|
|
563
924
|
|
|
564
925
|
return query;
|
|
565
926
|
}
|
|
566
927
|
|
|
567
|
-
|
|
568
|
-
|
|
569
928
|
/**
|
|
570
929
|
* 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.
|
|
571
930
|
|
|
@@ -578,223 +937,340 @@ You need `admin` privilege to use this method.
|
|
|
578
937
|
* @summary Sets the Exchange Rate for a specific Job
|
|
579
938
|
*/
|
|
580
939
|
export const setJobPricing = (
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
const formUrlEncoded = new URLSearchParams();
|
|
586
|
-
formUrlEncoded.append('rate', exchangeRatePutBodyBody.rate)
|
|
587
|
-
if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
588
|
-
formUrlEncoded.append('comment', exchangeRatePutBodyBody.comment)
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
return customInstance<void>(
|
|
592
|
-
{url: `/job/${jobId}/exchange-rate`, method: 'PUT',
|
|
593
|
-
headers: {'Content-Type': 'application/x-www-form-urlencoded', },
|
|
594
|
-
data: formUrlEncoded
|
|
595
|
-
},
|
|
596
|
-
options);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
export const getSetJobPricingMutationOptions = <TData = Awaited<ReturnType<typeof setJobPricing>>, TError = ErrorType<void | DmError>,
|
|
602
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{jobId: number;data: ExchangeRatePutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
940
|
+
jobId: number,
|
|
941
|
+
exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
|
|
942
|
+
options?: SecondParameter<typeof customInstance>,
|
|
603
943
|
) => {
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
944
|
+
const formUrlEncoded = new URLSearchParams();
|
|
945
|
+
formUrlEncoded.append(`rate`, exchangeRatePutBodyBody.rate);
|
|
946
|
+
if (exchangeRatePutBodyBody.comment !== undefined) {
|
|
947
|
+
formUrlEncoded.append(`comment`, exchangeRatePutBodyBody.comment);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
return customInstance<void>(
|
|
951
|
+
{
|
|
952
|
+
url: `/job/${jobId}/exchange-rate`,
|
|
953
|
+
method: "PUT",
|
|
954
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
955
|
+
data: formUrlEncoded,
|
|
956
|
+
},
|
|
957
|
+
options,
|
|
958
|
+
);
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
export const useSetJobPricingMutationOptions = <
|
|
962
|
+
TError = ErrorType<void | DmError>,
|
|
963
|
+
TContext = unknown,
|
|
964
|
+
>(options?: {
|
|
965
|
+
mutation?: UseMutationOptions<
|
|
966
|
+
Awaited<ReturnType<typeof setJobPricing>>,
|
|
967
|
+
TError,
|
|
968
|
+
{ jobId: number; data: ExchangeRatePutBodyBody },
|
|
969
|
+
TContext
|
|
970
|
+
>;
|
|
971
|
+
request?: SecondParameter<typeof customInstance>;
|
|
972
|
+
}): UseMutationOptions<
|
|
973
|
+
Awaited<ReturnType<typeof setJobPricing>>,
|
|
974
|
+
TError,
|
|
975
|
+
{ jobId: number; data: ExchangeRatePutBodyBody },
|
|
976
|
+
TContext
|
|
977
|
+
> => {
|
|
978
|
+
const mutationKey = ["setJobPricing"];
|
|
979
|
+
const { mutation: mutationOptions, request: requestOptions } = options
|
|
980
|
+
? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey
|
|
981
|
+
? options
|
|
982
|
+
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
983
|
+
: { mutation: { mutationKey }, request: undefined };
|
|
984
|
+
|
|
985
|
+
const mutationFn: MutationFunction<
|
|
986
|
+
Awaited<ReturnType<typeof setJobPricing>>,
|
|
987
|
+
{ jobId: number; data: ExchangeRatePutBodyBody }
|
|
988
|
+
> = (props) => {
|
|
989
|
+
const { jobId, data } = props ?? {};
|
|
990
|
+
|
|
991
|
+
return setJobPricing(jobId, data, requestOptions);
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
const customOptions = mutationMutator({ ...mutationOptions, mutationFn });
|
|
995
|
+
|
|
996
|
+
return customOptions;
|
|
997
|
+
};
|
|
998
|
+
|
|
999
|
+
export type SetJobPricingMutationResult = NonNullable<Awaited<ReturnType<typeof setJobPricing>>>;
|
|
1000
|
+
export type SetJobPricingMutationBody = ExchangeRatePutBodyBody;
|
|
1001
|
+
export type SetJobPricingMutationError = ErrorType<void | DmError>;
|
|
628
1002
|
|
|
629
|
-
|
|
1003
|
+
/**
|
|
630
1004
|
* @summary Sets the Exchange Rate for a specific Job
|
|
631
1005
|
*/
|
|
632
|
-
export const useSetJobPricing = <
|
|
633
|
-
|
|
1006
|
+
export const useSetJobPricing = <TError = ErrorType<void | DmError>, TContext = unknown>(
|
|
1007
|
+
options?: {
|
|
1008
|
+
mutation?: UseMutationOptions<
|
|
1009
|
+
Awaited<ReturnType<typeof setJobPricing>>,
|
|
1010
|
+
TError,
|
|
1011
|
+
{ jobId: number; data: ExchangeRatePutBodyBody },
|
|
1012
|
+
TContext
|
|
1013
|
+
>;
|
|
1014
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1015
|
+
},
|
|
1016
|
+
queryClient?: QueryClient,
|
|
634
1017
|
): UseMutationResult<
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
/**
|
|
1018
|
+
Awaited<ReturnType<typeof setJobPricing>>,
|
|
1019
|
+
TError,
|
|
1020
|
+
{ jobId: number; data: ExchangeRatePutBodyBody },
|
|
1021
|
+
TContext
|
|
1022
|
+
> => {
|
|
1023
|
+
const mutationOptions = useSetJobPricingMutationOptions(options);
|
|
1024
|
+
|
|
1025
|
+
return useMutation(mutationOptions, queryClient);
|
|
1026
|
+
};
|
|
1027
|
+
/**
|
|
646
1028
|
* 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.
|
|
647
1029
|
|
|
648
1030
|
* @summary Gets Job Exchange Rates
|
|
649
1031
|
*/
|
|
650
1032
|
export const getJobExchangeRates = (
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
1033
|
+
jobId: number,
|
|
1034
|
+
params?: GetJobExchangeRatesParams,
|
|
1035
|
+
options?: SecondParameter<typeof customInstance>,
|
|
1036
|
+
signal?: AbortSignal,
|
|
654
1037
|
) => {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
export const getGetJobExchangeRatesQueryKey = (jobId: number,
|
|
666
|
-
params?: GetJobExchangeRatesParams,) => {
|
|
667
|
-
return ["data-manager-api", `/job/${jobId}/exchange-rate`, ...(params ? [params]: [])] as const;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
export const getGetJobExchangeRatesQueryOptions = <TData = Awaited<ReturnType<typeof getJobExchangeRates>>, TError = ErrorType<void | DmError>>(jobId: number,
|
|
672
|
-
params?: GetJobExchangeRatesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
1038
|
+
return customInstance<GetExchangeRatesResponse>(
|
|
1039
|
+
{ url: `/job/${jobId}/exchange-rate`, method: "GET", params, signal },
|
|
1040
|
+
options,
|
|
1041
|
+
);
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
export const getGetJobExchangeRatesQueryKey = (
|
|
1045
|
+
jobId: number,
|
|
1046
|
+
params?: GetJobExchangeRatesParams,
|
|
673
1047
|
) => {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
1048
|
+
return [`/job/${jobId}/exchange-rate`, ...(params ? [params] : [])] as const;
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
export const useGetJobExchangeRatesQueryOptions = <
|
|
1052
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1053
|
+
TError = ErrorType<void | DmError>,
|
|
1054
|
+
>(
|
|
1055
|
+
jobId: number,
|
|
1056
|
+
params?: GetJobExchangeRatesParams,
|
|
1057
|
+
options?: {
|
|
1058
|
+
query?: Partial<
|
|
1059
|
+
UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1060
|
+
>;
|
|
1061
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1062
|
+
},
|
|
1063
|
+
) => {
|
|
1064
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1065
|
+
|
|
1066
|
+
const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId, params);
|
|
1067
|
+
|
|
1068
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) =>
|
|
1069
|
+
getJobExchangeRates(jobId, params, requestOptions, signal);
|
|
1070
|
+
|
|
1071
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
1072
|
+
|
|
1073
|
+
return customOptions as UseQueryOptions<
|
|
1074
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1075
|
+
TError,
|
|
1076
|
+
TData
|
|
1077
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
export type GetJobExchangeRatesQueryResult = NonNullable<
|
|
1081
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>
|
|
1082
|
+
>;
|
|
1083
|
+
export type GetJobExchangeRatesQueryError = ErrorType<void | DmError>;
|
|
1084
|
+
|
|
1085
|
+
export function useGetJobExchangeRates<
|
|
1086
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1087
|
+
TError = ErrorType<void | DmError>,
|
|
1088
|
+
>(
|
|
1089
|
+
jobId: number,
|
|
1090
|
+
params: undefined | GetJobExchangeRatesParams,
|
|
1091
|
+
options: {
|
|
1092
|
+
query: Partial<
|
|
1093
|
+
UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1094
|
+
> &
|
|
1095
|
+
Pick<
|
|
697
1096
|
DefinedInitialDataOptions<
|
|
698
1097
|
Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
699
1098
|
TError,
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
1099
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>
|
|
1100
|
+
>,
|
|
1101
|
+
"initialData"
|
|
1102
|
+
>;
|
|
1103
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1104
|
+
},
|
|
1105
|
+
queryClient?: QueryClient,
|
|
1106
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1107
|
+
export function useGetJobExchangeRates<
|
|
1108
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1109
|
+
TError = ErrorType<void | DmError>,
|
|
1110
|
+
>(
|
|
1111
|
+
jobId: number,
|
|
1112
|
+
params?: GetJobExchangeRatesParams,
|
|
1113
|
+
options?: {
|
|
1114
|
+
query?: Partial<
|
|
1115
|
+
UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1116
|
+
> &
|
|
1117
|
+
Pick<
|
|
708
1118
|
UndefinedInitialDataOptions<
|
|
709
1119
|
Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
710
1120
|
TError,
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
1121
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>
|
|
1122
|
+
>,
|
|
1123
|
+
"initialData"
|
|
1124
|
+
>;
|
|
1125
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1126
|
+
},
|
|
1127
|
+
queryClient?: QueryClient,
|
|
1128
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1129
|
+
export function useGetJobExchangeRates<
|
|
1130
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1131
|
+
TError = ErrorType<void | DmError>,
|
|
1132
|
+
>(
|
|
1133
|
+
jobId: number,
|
|
1134
|
+
params?: GetJobExchangeRatesParams,
|
|
1135
|
+
options?: {
|
|
1136
|
+
query?: Partial<
|
|
1137
|
+
UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1138
|
+
>;
|
|
1139
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1140
|
+
},
|
|
1141
|
+
queryClient?: QueryClient,
|
|
1142
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
721
1143
|
/**
|
|
722
1144
|
* @summary Gets Job Exchange Rates
|
|
723
1145
|
*/
|
|
724
1146
|
|
|
725
|
-
export function useGetJobExchangeRates<
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
1147
|
+
export function useGetJobExchangeRates<
|
|
1148
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1149
|
+
TError = ErrorType<void | DmError>,
|
|
1150
|
+
>(
|
|
1151
|
+
jobId: number,
|
|
1152
|
+
params?: GetJobExchangeRatesParams,
|
|
1153
|
+
options?: {
|
|
1154
|
+
query?: Partial<
|
|
1155
|
+
UseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1156
|
+
>;
|
|
1157
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1158
|
+
},
|
|
1159
|
+
queryClient?: QueryClient,
|
|
1160
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
1161
|
+
const queryOptions = useGetJobExchangeRatesQueryOptions(jobId, params, options);
|
|
1162
|
+
|
|
1163
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
1164
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
query.queryKey = queryOptions.queryKey;
|
|
736
1168
|
|
|
737
1169
|
return query;
|
|
738
1170
|
}
|
|
739
1171
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
1172
|
+
export const useGetJobExchangeRatesSuspenseQueryOptions = <
|
|
1173
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1174
|
+
TError = ErrorType<void | DmError>,
|
|
1175
|
+
>(
|
|
1176
|
+
jobId: number,
|
|
1177
|
+
params?: GetJobExchangeRatesParams,
|
|
1178
|
+
options?: {
|
|
1179
|
+
query?: Partial<
|
|
1180
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1181
|
+
>;
|
|
1182
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1183
|
+
},
|
|
744
1184
|
) => {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
export type GetJobExchangeRatesSuspenseQueryResult = NonNullable<
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
1185
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1186
|
+
|
|
1187
|
+
const queryKey = queryOptions?.queryKey ?? getGetJobExchangeRatesQueryKey(jobId, params);
|
|
1188
|
+
|
|
1189
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobExchangeRates>>> = ({ signal }) =>
|
|
1190
|
+
getJobExchangeRates(jobId, params, requestOptions, signal);
|
|
1191
|
+
|
|
1192
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
1193
|
+
|
|
1194
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
1195
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1196
|
+
TError,
|
|
1197
|
+
TData
|
|
1198
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
export type GetJobExchangeRatesSuspenseQueryResult = NonNullable<
|
|
1202
|
+
Awaited<ReturnType<typeof getJobExchangeRates>>
|
|
1203
|
+
>;
|
|
1204
|
+
export type GetJobExchangeRatesSuspenseQueryError = ErrorType<void | DmError>;
|
|
1205
|
+
|
|
1206
|
+
export function useGetJobExchangeRatesSuspense<
|
|
1207
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1208
|
+
TError = ErrorType<void | DmError>,
|
|
1209
|
+
>(
|
|
1210
|
+
jobId: number,
|
|
1211
|
+
params: undefined | GetJobExchangeRatesParams,
|
|
1212
|
+
options: {
|
|
1213
|
+
query: Partial<
|
|
1214
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1215
|
+
>;
|
|
1216
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1217
|
+
},
|
|
1218
|
+
queryClient?: QueryClient,
|
|
1219
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1220
|
+
export function useGetJobExchangeRatesSuspense<
|
|
1221
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1222
|
+
TError = ErrorType<void | DmError>,
|
|
1223
|
+
>(
|
|
1224
|
+
jobId: number,
|
|
1225
|
+
params?: GetJobExchangeRatesParams,
|
|
1226
|
+
options?: {
|
|
1227
|
+
query?: Partial<
|
|
1228
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1229
|
+
>;
|
|
1230
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1231
|
+
},
|
|
1232
|
+
queryClient?: QueryClient,
|
|
1233
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1234
|
+
export function useGetJobExchangeRatesSuspense<
|
|
1235
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1236
|
+
TError = ErrorType<void | DmError>,
|
|
1237
|
+
>(
|
|
1238
|
+
jobId: number,
|
|
1239
|
+
params?: GetJobExchangeRatesParams,
|
|
1240
|
+
options?: {
|
|
1241
|
+
query?: Partial<
|
|
1242
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1243
|
+
>;
|
|
1244
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1245
|
+
},
|
|
1246
|
+
queryClient?: QueryClient,
|
|
1247
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
780
1248
|
/**
|
|
781
1249
|
* @summary Gets Job Exchange Rates
|
|
782
1250
|
*/
|
|
783
1251
|
|
|
784
|
-
export function useGetJobExchangeRatesSuspense<
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1252
|
+
export function useGetJobExchangeRatesSuspense<
|
|
1253
|
+
TData = Awaited<ReturnType<typeof getJobExchangeRates>>,
|
|
1254
|
+
TError = ErrorType<void | DmError>,
|
|
1255
|
+
>(
|
|
1256
|
+
jobId: number,
|
|
1257
|
+
params?: GetJobExchangeRatesParams,
|
|
1258
|
+
options?: {
|
|
1259
|
+
query?: Partial<
|
|
1260
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobExchangeRates>>, TError, TData>
|
|
1261
|
+
>;
|
|
1262
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1263
|
+
},
|
|
1264
|
+
queryClient?: QueryClient,
|
|
1265
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
1266
|
+
const queryOptions = useGetJobExchangeRatesSuspenseQueryOptions(jobId, params, options);
|
|
1267
|
+
|
|
1268
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
1269
|
+
TData,
|
|
1270
|
+
TError
|
|
1271
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1272
|
+
|
|
1273
|
+
query.queryKey = queryOptions.queryKey;
|
|
795
1274
|
|
|
796
1275
|
return query;
|
|
797
1276
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|