@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,313 +8,425 @@ 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
|
-
useQuery,
|
|
14
|
-
useSuspenseQuery
|
|
15
|
-
} from '@tanstack/react-query'
|
|
11
|
+
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
16
12
|
import type {
|
|
17
13
|
DataTag,
|
|
18
14
|
DefinedInitialDataOptions,
|
|
19
15
|
DefinedUseQueryResult,
|
|
16
|
+
QueryClient,
|
|
20
17
|
QueryFunction,
|
|
21
18
|
QueryKey,
|
|
22
19
|
UndefinedInitialDataOptions,
|
|
23
20
|
UseQueryOptions,
|
|
24
21
|
UseQueryResult,
|
|
25
22
|
UseSuspenseQueryOptions,
|
|
26
|
-
UseSuspenseQueryResult
|
|
27
|
-
} from
|
|
23
|
+
UseSuspenseQueryResult,
|
|
24
|
+
} from "@tanstack/react-query";
|
|
25
|
+
|
|
28
26
|
import type {
|
|
29
27
|
DmError,
|
|
30
28
|
InputHandlerGetResponse,
|
|
31
|
-
ModeGetResponse
|
|
32
|
-
} from
|
|
33
|
-
import { customInstance } from '.././custom-instance';
|
|
34
|
-
import type { ErrorType } from '.././custom-instance';
|
|
35
|
-
|
|
29
|
+
ModeGetResponse,
|
|
30
|
+
} from "../data-manager-api.schemas";
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
import { customInstance } from ".././custom-instance";
|
|
33
|
+
import type { ErrorType } from ".././custom-instance";
|
|
34
|
+
import { queryMutator } from ".././options-mutator";
|
|
38
35
|
|
|
36
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
39
37
|
|
|
40
38
|
/**
|
|
41
39
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
42
40
|
*/
|
|
43
|
-
export const getMode = (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return customInstance<ModeGetResponse>(
|
|
50
|
-
{url: `/mode`, method: 'GET', signal
|
|
51
|
-
},
|
|
52
|
-
options);
|
|
53
|
-
}
|
|
54
|
-
|
|
41
|
+
export const getMode = (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => {
|
|
42
|
+
return customInstance<ModeGetResponse>({ url: `/mode`, method: "GET", signal }, options);
|
|
43
|
+
};
|
|
55
44
|
|
|
56
45
|
export const getGetModeQueryKey = () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
46
|
+
return [`/mode`] as const;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const useGetModeQueryOptions = <
|
|
50
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
51
|
+
TError = ErrorType<void | DmError>,
|
|
52
|
+
>(options?: {
|
|
53
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
54
|
+
request?: SecondParameter<typeof customInstance>;
|
|
55
|
+
}) => {
|
|
56
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
57
|
+
|
|
58
|
+
const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();
|
|
59
|
+
|
|
60
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) =>
|
|
61
|
+
getMode(requestOptions, signal);
|
|
62
|
+
|
|
63
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
64
|
+
|
|
65
|
+
return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & {
|
|
66
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
|
|
71
|
+
export type GetModeQueryError = ErrorType<void | DmError>;
|
|
72
|
+
|
|
73
|
+
export function useGetMode<
|
|
74
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
75
|
+
TError = ErrorType<void | DmError>,
|
|
76
|
+
>(
|
|
77
|
+
options: {
|
|
78
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>> &
|
|
79
|
+
Pick<
|
|
85
80
|
DefinedInitialDataOptions<
|
|
86
81
|
Awaited<ReturnType<typeof getMode>>,
|
|
87
82
|
TError,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
Awaited<ReturnType<typeof getMode>>
|
|
84
|
+
>,
|
|
85
|
+
"initialData"
|
|
86
|
+
>;
|
|
87
|
+
request?: SecondParameter<typeof customInstance>;
|
|
88
|
+
},
|
|
89
|
+
queryClient?: QueryClient,
|
|
90
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
91
|
+
export function useGetMode<
|
|
92
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
93
|
+
TError = ErrorType<void | DmError>,
|
|
94
|
+
>(
|
|
95
|
+
options?: {
|
|
96
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>> &
|
|
97
|
+
Pick<
|
|
95
98
|
UndefinedInitialDataOptions<
|
|
96
99
|
Awaited<ReturnType<typeof getMode>>,
|
|
97
100
|
TError,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
Awaited<ReturnType<typeof getMode>>
|
|
102
|
+
>,
|
|
103
|
+
"initialData"
|
|
104
|
+
>;
|
|
105
|
+
request?: SecondParameter<typeof customInstance>;
|
|
106
|
+
},
|
|
107
|
+
queryClient?: QueryClient,
|
|
108
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
109
|
+
export function useGetMode<
|
|
110
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
111
|
+
TError = ErrorType<void | DmError>,
|
|
112
|
+
>(
|
|
113
|
+
options?: {
|
|
114
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
115
|
+
request?: SecondParameter<typeof customInstance>;
|
|
116
|
+
},
|
|
117
|
+
queryClient?: QueryClient,
|
|
118
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
107
119
|
/**
|
|
108
120
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
109
121
|
*/
|
|
110
122
|
|
|
111
|
-
export function useGetMode<
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
export function useGetMode<
|
|
124
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
125
|
+
TError = ErrorType<void | DmError>,
|
|
126
|
+
>(
|
|
127
|
+
options?: {
|
|
128
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
129
|
+
request?: SecondParameter<typeof customInstance>;
|
|
130
|
+
},
|
|
131
|
+
queryClient?: QueryClient,
|
|
132
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
133
|
+
const queryOptions = useGetModeQueryOptions(options);
|
|
115
134
|
|
|
116
|
-
const
|
|
135
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
136
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
137
|
+
};
|
|
117
138
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
query.queryKey = queryOptions.queryKey ;
|
|
139
|
+
query.queryKey = queryOptions.queryKey;
|
|
121
140
|
|
|
122
141
|
return query;
|
|
123
142
|
}
|
|
124
143
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
export
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
144
|
+
export const useGetModeSuspenseQueryOptions = <
|
|
145
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
146
|
+
TError = ErrorType<void | DmError>,
|
|
147
|
+
>(options?: {
|
|
148
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
149
|
+
request?: SecondParameter<typeof customInstance>;
|
|
150
|
+
}) => {
|
|
151
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
152
|
+
|
|
153
|
+
const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();
|
|
154
|
+
|
|
155
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) =>
|
|
156
|
+
getMode(requestOptions, signal);
|
|
157
|
+
|
|
158
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
159
|
+
|
|
160
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
161
|
+
Awaited<ReturnType<typeof getMode>>,
|
|
162
|
+
TError,
|
|
163
|
+
TData
|
|
164
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export type GetModeSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
|
|
168
|
+
export type GetModeSuspenseQueryError = ErrorType<void | DmError>;
|
|
169
|
+
|
|
170
|
+
export function useGetModeSuspense<
|
|
171
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
172
|
+
TError = ErrorType<void | DmError>,
|
|
173
|
+
>(
|
|
174
|
+
options: {
|
|
175
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
176
|
+
request?: SecondParameter<typeof customInstance>;
|
|
177
|
+
},
|
|
178
|
+
queryClient?: QueryClient,
|
|
179
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
180
|
+
export function useGetModeSuspense<
|
|
181
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
182
|
+
TError = ErrorType<void | DmError>,
|
|
183
|
+
>(
|
|
184
|
+
options?: {
|
|
185
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
186
|
+
request?: SecondParameter<typeof customInstance>;
|
|
187
|
+
},
|
|
188
|
+
queryClient?: QueryClient,
|
|
189
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
190
|
+
export function useGetModeSuspense<
|
|
191
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
192
|
+
TError = ErrorType<void | DmError>,
|
|
193
|
+
>(
|
|
194
|
+
options?: {
|
|
195
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
196
|
+
request?: SecondParameter<typeof customInstance>;
|
|
197
|
+
},
|
|
198
|
+
queryClient?: QueryClient,
|
|
199
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
161
200
|
/**
|
|
162
201
|
* @summary Gets the Data Manager mode that's running behind the API
|
|
163
202
|
*/
|
|
164
203
|
|
|
165
|
-
export function useGetModeSuspense<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
204
|
+
export function useGetModeSuspense<
|
|
205
|
+
TData = Awaited<ReturnType<typeof getMode>>,
|
|
206
|
+
TError = ErrorType<void | DmError>,
|
|
207
|
+
>(
|
|
208
|
+
options?: {
|
|
209
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>>;
|
|
210
|
+
request?: SecondParameter<typeof customInstance>;
|
|
211
|
+
},
|
|
212
|
+
queryClient?: QueryClient,
|
|
213
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
214
|
+
const queryOptions = useGetModeSuspenseQueryOptions(options);
|
|
215
|
+
|
|
216
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
217
|
+
TData,
|
|
218
|
+
TError
|
|
219
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
220
|
+
|
|
221
|
+
query.queryKey = queryOptions.queryKey;
|
|
175
222
|
|
|
176
223
|
return query;
|
|
177
224
|
}
|
|
178
225
|
|
|
179
|
-
|
|
180
|
-
|
|
181
226
|
/**
|
|
182
227
|
* @summary Get information about all Input Handlers that are available.
|
|
183
228
|
*/
|
|
184
229
|
export const getInputHandlers = (
|
|
185
|
-
|
|
186
|
-
|
|
230
|
+
options?: SecondParameter<typeof customInstance>,
|
|
231
|
+
signal?: AbortSignal,
|
|
187
232
|
) => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
options);
|
|
194
|
-
}
|
|
195
|
-
|
|
233
|
+
return customInstance<InputHandlerGetResponse>(
|
|
234
|
+
{ url: `/input-handler`, method: "GET", signal },
|
|
235
|
+
options,
|
|
236
|
+
);
|
|
237
|
+
};
|
|
196
238
|
|
|
197
239
|
export const getGetInputHandlersQueryKey = () => {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
export
|
|
225
|
-
|
|
240
|
+
return [`/input-handler`] as const;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export const useGetInputHandlersQueryOptions = <
|
|
244
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
245
|
+
TError = ErrorType<void | DmError>,
|
|
246
|
+
>(options?: {
|
|
247
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>>;
|
|
248
|
+
request?: SecondParameter<typeof customInstance>;
|
|
249
|
+
}) => {
|
|
250
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
251
|
+
|
|
252
|
+
const queryKey = queryOptions?.queryKey ?? getGetInputHandlersQueryKey();
|
|
253
|
+
|
|
254
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getInputHandlers>>> = ({ signal }) =>
|
|
255
|
+
getInputHandlers(requestOptions, signal);
|
|
256
|
+
|
|
257
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
258
|
+
|
|
259
|
+
return customOptions as UseQueryOptions<
|
|
260
|
+
Awaited<ReturnType<typeof getInputHandlers>>,
|
|
261
|
+
TError,
|
|
262
|
+
TData
|
|
263
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export type GetInputHandlersQueryResult = NonNullable<Awaited<ReturnType<typeof getInputHandlers>>>;
|
|
267
|
+
export type GetInputHandlersQueryError = ErrorType<void | DmError>;
|
|
268
|
+
|
|
269
|
+
export function useGetInputHandlers<
|
|
270
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
271
|
+
TError = ErrorType<void | DmError>,
|
|
272
|
+
>(
|
|
273
|
+
options: {
|
|
274
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>> &
|
|
275
|
+
Pick<
|
|
226
276
|
DefinedInitialDataOptions<
|
|
227
277
|
Awaited<ReturnType<typeof getInputHandlers>>,
|
|
228
278
|
TError,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
279
|
+
Awaited<ReturnType<typeof getInputHandlers>>
|
|
280
|
+
>,
|
|
281
|
+
"initialData"
|
|
282
|
+
>;
|
|
283
|
+
request?: SecondParameter<typeof customInstance>;
|
|
284
|
+
},
|
|
285
|
+
queryClient?: QueryClient,
|
|
286
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
287
|
+
export function useGetInputHandlers<
|
|
288
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
289
|
+
TError = ErrorType<void | DmError>,
|
|
290
|
+
>(
|
|
291
|
+
options?: {
|
|
292
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>> &
|
|
293
|
+
Pick<
|
|
236
294
|
UndefinedInitialDataOptions<
|
|
237
295
|
Awaited<ReturnType<typeof getInputHandlers>>,
|
|
238
296
|
TError,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
297
|
+
Awaited<ReturnType<typeof getInputHandlers>>
|
|
298
|
+
>,
|
|
299
|
+
"initialData"
|
|
300
|
+
>;
|
|
301
|
+
request?: SecondParameter<typeof customInstance>;
|
|
302
|
+
},
|
|
303
|
+
queryClient?: QueryClient,
|
|
304
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
305
|
+
export function useGetInputHandlers<
|
|
306
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
307
|
+
TError = ErrorType<void | DmError>,
|
|
308
|
+
>(
|
|
309
|
+
options?: {
|
|
310
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>>;
|
|
311
|
+
request?: SecondParameter<typeof customInstance>;
|
|
312
|
+
},
|
|
313
|
+
queryClient?: QueryClient,
|
|
314
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
248
315
|
/**
|
|
249
316
|
* @summary Get information about all Input Handlers that are available.
|
|
250
317
|
*/
|
|
251
318
|
|
|
252
|
-
export function useGetInputHandlers<
|
|
253
|
-
|
|
319
|
+
export function useGetInputHandlers<
|
|
320
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
321
|
+
TError = ErrorType<void | DmError>,
|
|
322
|
+
>(
|
|
323
|
+
options?: {
|
|
324
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>>;
|
|
325
|
+
request?: SecondParameter<typeof customInstance>;
|
|
326
|
+
},
|
|
327
|
+
queryClient?: QueryClient,
|
|
328
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
329
|
+
const queryOptions = useGetInputHandlersQueryOptions(options);
|
|
254
330
|
|
|
255
|
-
|
|
331
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
332
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
333
|
+
};
|
|
256
334
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
260
|
-
|
|
261
|
-
query.queryKey = queryOptions.queryKey ;
|
|
335
|
+
query.queryKey = queryOptions.queryKey;
|
|
262
336
|
|
|
263
337
|
return query;
|
|
264
338
|
}
|
|
265
339
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
export
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
340
|
+
export const useGetInputHandlersSuspenseQueryOptions = <
|
|
341
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
342
|
+
TError = ErrorType<void | DmError>,
|
|
343
|
+
>(options?: {
|
|
344
|
+
query?: Partial<
|
|
345
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>
|
|
346
|
+
>;
|
|
347
|
+
request?: SecondParameter<typeof customInstance>;
|
|
348
|
+
}) => {
|
|
349
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
350
|
+
|
|
351
|
+
const queryKey = queryOptions?.queryKey ?? getGetInputHandlersQueryKey();
|
|
352
|
+
|
|
353
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getInputHandlers>>> = ({ signal }) =>
|
|
354
|
+
getInputHandlers(requestOptions, signal);
|
|
355
|
+
|
|
356
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
357
|
+
|
|
358
|
+
return customOptions as UseSuspenseQueryOptions<
|
|
359
|
+
Awaited<ReturnType<typeof getInputHandlers>>,
|
|
360
|
+
TError,
|
|
361
|
+
TData
|
|
362
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
export type GetInputHandlersSuspenseQueryResult = NonNullable<
|
|
366
|
+
Awaited<ReturnType<typeof getInputHandlers>>
|
|
367
|
+
>;
|
|
368
|
+
export type GetInputHandlersSuspenseQueryError = ErrorType<void | DmError>;
|
|
369
|
+
|
|
370
|
+
export function useGetInputHandlersSuspense<
|
|
371
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
372
|
+
TError = ErrorType<void | DmError>,
|
|
373
|
+
>(
|
|
374
|
+
options: {
|
|
375
|
+
query: Partial<
|
|
376
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>
|
|
377
|
+
>;
|
|
378
|
+
request?: SecondParameter<typeof customInstance>;
|
|
379
|
+
},
|
|
380
|
+
queryClient?: QueryClient,
|
|
381
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
382
|
+
export function useGetInputHandlersSuspense<
|
|
383
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
384
|
+
TError = ErrorType<void | DmError>,
|
|
385
|
+
>(
|
|
386
|
+
options?: {
|
|
387
|
+
query?: Partial<
|
|
388
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>
|
|
389
|
+
>;
|
|
390
|
+
request?: SecondParameter<typeof customInstance>;
|
|
391
|
+
},
|
|
392
|
+
queryClient?: QueryClient,
|
|
393
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
394
|
+
export function useGetInputHandlersSuspense<
|
|
395
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
396
|
+
TError = ErrorType<void | DmError>,
|
|
397
|
+
>(
|
|
398
|
+
options?: {
|
|
399
|
+
query?: Partial<
|
|
400
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>
|
|
401
|
+
>;
|
|
402
|
+
request?: SecondParameter<typeof customInstance>;
|
|
403
|
+
},
|
|
404
|
+
queryClient?: QueryClient,
|
|
405
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
302
406
|
/**
|
|
303
407
|
* @summary Get information about all Input Handlers that are available.
|
|
304
408
|
*/
|
|
305
409
|
|
|
306
|
-
export function useGetInputHandlersSuspense<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
410
|
+
export function useGetInputHandlersSuspense<
|
|
411
|
+
TData = Awaited<ReturnType<typeof getInputHandlers>>,
|
|
412
|
+
TError = ErrorType<void | DmError>,
|
|
413
|
+
>(
|
|
414
|
+
options?: {
|
|
415
|
+
query?: Partial<
|
|
416
|
+
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getInputHandlers>>, TError, TData>
|
|
417
|
+
>;
|
|
418
|
+
request?: SecondParameter<typeof customInstance>;
|
|
419
|
+
},
|
|
420
|
+
queryClient?: QueryClient,
|
|
421
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
422
|
+
const queryOptions = useGetInputHandlersSuspenseQueryOptions(options);
|
|
423
|
+
|
|
424
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
425
|
+
TData,
|
|
426
|
+
TError
|
|
427
|
+
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
428
|
+
|
|
429
|
+
query.queryKey = queryOptions.queryKey;
|
|
316
430
|
|
|
317
431
|
return query;
|
|
318
432
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|