@squonk/account-server-client 4.4.0-4-4.2197467763 → 4.4.0-4-4.2200269934
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/dist/api/actions/actions.cjs +4 -4
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +35 -17
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +35 -17
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.cjs +4 -4
- package/dist/api/actions/actions.fetch.cjs.map +1 -1
- package/dist/api/actions/actions.fetch.d.cts +35 -17
- package/dist/api/actions/actions.fetch.d.cts.map +1 -1
- package/dist/api/actions/actions.fetch.d.ts +35 -17
- package/dist/api/actions/actions.fetch.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.js +4 -4
- package/dist/api/actions/actions.fetch.js.map +1 -1
- package/dist/api/actions/actions.js +4 -4
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/asset/asset.cjs +22 -22
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +76 -40
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +76 -40
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.cjs +22 -22
- package/dist/api/asset/asset.fetch.cjs.map +1 -1
- package/dist/api/asset/asset.fetch.d.cts +76 -40
- package/dist/api/asset/asset.fetch.d.cts.map +1 -1
- package/dist/api/asset/asset.fetch.d.ts +76 -40
- package/dist/api/asset/asset.fetch.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.js +22 -22
- package/dist/api/asset/asset.fetch.js.map +1 -1
- package/dist/api/asset/asset.js +22 -22
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +16 -16
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +137 -65
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +137 -65
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.cjs +16 -16
- package/dist/api/charges/charges.fetch.cjs.map +1 -1
- package/dist/api/charges/charges.fetch.d.cts +137 -65
- package/dist/api/charges/charges.fetch.d.cts.map +1 -1
- package/dist/api/charges/charges.fetch.d.ts +137 -65
- package/dist/api/charges/charges.fetch.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.js +16 -16
- package/dist/api/charges/charges.fetch.js.map +1 -1
- package/dist/api/charges/charges.js +16 -16
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +12 -12
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +71 -35
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +71 -35
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
- package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.js +12 -12
- package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
- package/dist/api/event-stream/event-stream.js +12 -12
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +8 -8
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +69 -33
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +69 -33
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.cjs +8 -8
- package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.cts +69 -33
- package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.ts +69 -33
- package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.js +8 -8
- package/dist/api/merchant/merchant.fetch.js.map +1 -1
- package/dist/api/merchant/merchant.js +8 -8
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +18 -18
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +106 -52
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +106 -52
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.cjs +18 -18
- package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.cts +106 -52
- package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.ts +106 -52
- package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.js +18 -18
- package/dist/api/organisation/organisation.fetch.js.map +1 -1
- package/dist/api/organisation/organisation.js +18 -18
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +30 -30
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +208 -100
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +208 -100
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.fetch.cjs +30 -30
- package/dist/api/product/product.fetch.cjs.map +1 -1
- package/dist/api/product/product.fetch.d.cts +208 -100
- package/dist/api/product/product.fetch.d.cts.map +1 -1
- package/dist/api/product/product.fetch.d.ts +208 -100
- package/dist/api/product/product.fetch.d.ts.map +1 -1
- package/dist/api/product/product.fetch.js +30 -30
- package/dist/api/product/product.fetch.js.map +1 -1
- package/dist/api/product/product.js +30 -30
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +4 -4
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +35 -17
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +35 -17
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.fetch.cjs +4 -4
- package/dist/api/state/state.fetch.cjs.map +1 -1
- package/dist/api/state/state.fetch.d.cts +35 -17
- package/dist/api/state/state.fetch.d.cts.map +1 -1
- package/dist/api/state/state.fetch.d.ts +35 -17
- package/dist/api/state/state.fetch.d.ts.map +1 -1
- package/dist/api/state/state.fetch.js +4 -4
- package/dist/api/state/state.fetch.js.map +1 -1
- package/dist/api/state/state.js +4 -4
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +30 -30
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +144 -72
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +144 -72
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.cjs +30 -30
- package/dist/api/unit/unit.fetch.cjs.map +1 -1
- package/dist/api/unit/unit.fetch.d.cts +144 -72
- package/dist/api/unit/unit.fetch.d.cts.map +1 -1
- package/dist/api/unit/unit.fetch.d.ts +144 -72
- package/dist/api/unit/unit.fetch.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.js +30 -30
- package/dist/api/unit/unit.fetch.js.map +1 -1
- package/dist/api/unit/unit.js +30 -30
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +20 -20
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +107 -53
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +107 -53
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.fetch.cjs +20 -20
- package/dist/api/user/user.fetch.cjs.map +1 -1
- package/dist/api/user/user.fetch.d.cts +107 -53
- package/dist/api/user/user.fetch.d.cts.map +1 -1
- package/dist/api/user/user.fetch.d.ts +107 -53
- package/dist/api/user/user.fetch.d.ts.map +1 -1
- package/dist/api/user/user.fetch.js +20 -20
- package/dist/api/user/user.fetch.js.map +1 -1
- package/dist/api/user/user.js +20 -20
- package/dist/api/user/user.js.map +1 -1
- package/package.json +7 -5
- package/src/api/actions/actions.fetch.ts +103 -12
- package/src/api/actions/actions.ts +103 -12
- package/src/api/asset/asset.fetch.ts +303 -94
- package/src/api/asset/asset.ts +303 -94
- package/src/api/charges/charges.fetch.ts +456 -54
- package/src/api/charges/charges.ts +456 -54
- package/src/api/event-stream/event-stream.fetch.ts +262 -58
- package/src/api/event-stream/event-stream.ts +262 -58
- package/src/api/merchant/merchant.fetch.ts +212 -28
- package/src/api/merchant/merchant.ts +212 -28
- package/src/api/organisation/organisation.fetch.ts +381 -86
- package/src/api/organisation/organisation.ts +381 -86
- package/src/api/product/product.fetch.ts +724 -130
- package/src/api/product/product.ts +724 -130
- package/src/api/state/state.fetch.ts +105 -16
- package/src/api/state/state.ts +105 -16
- package/src/api/unit/unit.fetch.ts +521 -146
- package/src/api/unit/unit.ts +521 -146
- package/src/api/user/user.fetch.ts +401 -101
- package/src/api/user/user.ts +401 -101
- package/tests/README.md +98 -0
- package/tests/component.test.tsx +191 -0
- package/tests/tsconfig.json +7 -0
- package/tests/type-tests.tsx +196 -0
|
@@ -10,10 +10,14 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
10
10
|
*/
|
|
11
11
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
12
12
|
import type {
|
|
13
|
+
DataTag,
|
|
14
|
+
DefinedInitialDataOptions,
|
|
15
|
+
DefinedUseQueryResult,
|
|
13
16
|
InvalidateOptions,
|
|
14
17
|
QueryClient,
|
|
15
18
|
QueryFunction,
|
|
16
19
|
QueryKey,
|
|
20
|
+
UndefinedInitialDataOptions,
|
|
17
21
|
UseQueryOptions,
|
|
18
22
|
UseQueryResult,
|
|
19
23
|
UseSuspenseQueryOptions,
|
|
@@ -78,7 +82,7 @@ export const getGetActionsQueryOptions = <
|
|
|
78
82
|
>(
|
|
79
83
|
params?: GetActionsParams,
|
|
80
84
|
options?: {
|
|
81
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
85
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
82
86
|
request?: SecondParameter<typeof customFetch>;
|
|
83
87
|
},
|
|
84
88
|
) => {
|
|
@@ -93,12 +97,61 @@ export const getGetActionsQueryOptions = <
|
|
|
93
97
|
Awaited<ReturnType<typeof getActions>>,
|
|
94
98
|
TError,
|
|
95
99
|
TData
|
|
96
|
-
> & { queryKey: QueryKey };
|
|
100
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
97
101
|
};
|
|
98
102
|
|
|
99
103
|
export type GetActionsQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
|
|
100
104
|
export type GetActionsQueryError = ErrorType<void>;
|
|
101
105
|
|
|
106
|
+
export function useGetActions<
|
|
107
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
108
|
+
TError = ErrorType<void>,
|
|
109
|
+
>(
|
|
110
|
+
params: undefined | GetActionsParams,
|
|
111
|
+
options: {
|
|
112
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
|
|
113
|
+
Pick<
|
|
114
|
+
DefinedInitialDataOptions<
|
|
115
|
+
Awaited<ReturnType<typeof getActions>>,
|
|
116
|
+
TError,
|
|
117
|
+
Awaited<ReturnType<typeof getActions>>
|
|
118
|
+
>,
|
|
119
|
+
"initialData"
|
|
120
|
+
>;
|
|
121
|
+
request?: SecondParameter<typeof customFetch>;
|
|
122
|
+
},
|
|
123
|
+
queryClient?: QueryClient,
|
|
124
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
125
|
+
export function useGetActions<
|
|
126
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
127
|
+
TError = ErrorType<void>,
|
|
128
|
+
>(
|
|
129
|
+
params?: GetActionsParams,
|
|
130
|
+
options?: {
|
|
131
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
|
|
132
|
+
Pick<
|
|
133
|
+
UndefinedInitialDataOptions<
|
|
134
|
+
Awaited<ReturnType<typeof getActions>>,
|
|
135
|
+
TError,
|
|
136
|
+
Awaited<ReturnType<typeof getActions>>
|
|
137
|
+
>,
|
|
138
|
+
"initialData"
|
|
139
|
+
>;
|
|
140
|
+
request?: SecondParameter<typeof customFetch>;
|
|
141
|
+
},
|
|
142
|
+
queryClient?: QueryClient,
|
|
143
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
144
|
+
export function useGetActions<
|
|
145
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
146
|
+
TError = ErrorType<void>,
|
|
147
|
+
>(
|
|
148
|
+
params?: GetActionsParams,
|
|
149
|
+
options?: {
|
|
150
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
151
|
+
request?: SecondParameter<typeof customFetch>;
|
|
152
|
+
},
|
|
153
|
+
queryClient?: QueryClient,
|
|
154
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
102
155
|
/**
|
|
103
156
|
* @summary Gets Actions held on the Account Server
|
|
104
157
|
*/
|
|
@@ -109,13 +162,16 @@ export function useGetActions<
|
|
|
109
162
|
>(
|
|
110
163
|
params?: GetActionsParams,
|
|
111
164
|
options?: {
|
|
112
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
165
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
113
166
|
request?: SecondParameter<typeof customFetch>;
|
|
114
167
|
},
|
|
115
|
-
|
|
168
|
+
queryClient?: QueryClient,
|
|
169
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
|
|
116
170
|
const queryOptions = getGetActionsQueryOptions(params, options);
|
|
117
171
|
|
|
118
|
-
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
|
|
172
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
173
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
174
|
+
};
|
|
119
175
|
|
|
120
176
|
query.queryKey = queryOptions.queryKey;
|
|
121
177
|
|
|
@@ -141,7 +197,7 @@ export const getGetActionsSuspenseQueryOptions = <
|
|
|
141
197
|
>(
|
|
142
198
|
params?: GetActionsParams,
|
|
143
199
|
options?: {
|
|
144
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
200
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
145
201
|
request?: SecondParameter<typeof customFetch>;
|
|
146
202
|
},
|
|
147
203
|
) => {
|
|
@@ -156,12 +212,45 @@ export const getGetActionsSuspenseQueryOptions = <
|
|
|
156
212
|
Awaited<ReturnType<typeof getActions>>,
|
|
157
213
|
TError,
|
|
158
214
|
TData
|
|
159
|
-
> & { queryKey: QueryKey };
|
|
215
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
160
216
|
};
|
|
161
217
|
|
|
162
218
|
export type GetActionsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
|
|
163
219
|
export type GetActionsSuspenseQueryError = ErrorType<void>;
|
|
164
220
|
|
|
221
|
+
export function useGetActionsSuspense<
|
|
222
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
223
|
+
TError = ErrorType<void>,
|
|
224
|
+
>(
|
|
225
|
+
params: undefined | GetActionsParams,
|
|
226
|
+
options: {
|
|
227
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
228
|
+
request?: SecondParameter<typeof customFetch>;
|
|
229
|
+
},
|
|
230
|
+
queryClient?: QueryClient,
|
|
231
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
232
|
+
export function useGetActionsSuspense<
|
|
233
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
234
|
+
TError = ErrorType<void>,
|
|
235
|
+
>(
|
|
236
|
+
params?: GetActionsParams,
|
|
237
|
+
options?: {
|
|
238
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
239
|
+
request?: SecondParameter<typeof customFetch>;
|
|
240
|
+
},
|
|
241
|
+
queryClient?: QueryClient,
|
|
242
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
243
|
+
export function useGetActionsSuspense<
|
|
244
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
245
|
+
TError = ErrorType<void>,
|
|
246
|
+
>(
|
|
247
|
+
params?: GetActionsParams,
|
|
248
|
+
options?: {
|
|
249
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
250
|
+
request?: SecondParameter<typeof customFetch>;
|
|
251
|
+
},
|
|
252
|
+
queryClient?: QueryClient,
|
|
253
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
165
254
|
/**
|
|
166
255
|
* @summary Gets Actions held on the Account Server
|
|
167
256
|
*/
|
|
@@ -172,15 +261,17 @@ export function useGetActionsSuspense<
|
|
|
172
261
|
>(
|
|
173
262
|
params?: GetActionsParams,
|
|
174
263
|
options?: {
|
|
175
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
264
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
176
265
|
request?: SecondParameter<typeof customFetch>;
|
|
177
266
|
},
|
|
178
|
-
|
|
267
|
+
queryClient?: QueryClient,
|
|
268
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
|
|
179
269
|
const queryOptions = getGetActionsSuspenseQueryOptions(params, options);
|
|
180
270
|
|
|
181
|
-
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<
|
|
182
|
-
|
|
183
|
-
|
|
271
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
272
|
+
TData,
|
|
273
|
+
TError
|
|
274
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
184
275
|
|
|
185
276
|
query.queryKey = queryOptions.queryKey;
|
|
186
277
|
|
|
@@ -10,10 +10,14 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
10
10
|
*/
|
|
11
11
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
12
12
|
import type {
|
|
13
|
+
DataTag,
|
|
14
|
+
DefinedInitialDataOptions,
|
|
15
|
+
DefinedUseQueryResult,
|
|
13
16
|
InvalidateOptions,
|
|
14
17
|
QueryClient,
|
|
15
18
|
QueryFunction,
|
|
16
19
|
QueryKey,
|
|
20
|
+
UndefinedInitialDataOptions,
|
|
17
21
|
UseQueryOptions,
|
|
18
22
|
UseQueryResult,
|
|
19
23
|
UseSuspenseQueryOptions,
|
|
@@ -59,7 +63,7 @@ export const getGetActionsQueryOptions = <
|
|
|
59
63
|
>(
|
|
60
64
|
params?: GetActionsParams,
|
|
61
65
|
options?: {
|
|
62
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
66
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
63
67
|
request?: SecondParameter<typeof customInstance>;
|
|
64
68
|
},
|
|
65
69
|
) => {
|
|
@@ -74,12 +78,61 @@ export const getGetActionsQueryOptions = <
|
|
|
74
78
|
Awaited<ReturnType<typeof getActions>>,
|
|
75
79
|
TError,
|
|
76
80
|
TData
|
|
77
|
-
> & { queryKey: QueryKey };
|
|
81
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
78
82
|
};
|
|
79
83
|
|
|
80
84
|
export type GetActionsQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
|
|
81
85
|
export type GetActionsQueryError = ErrorType<void>;
|
|
82
86
|
|
|
87
|
+
export function useGetActions<
|
|
88
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
89
|
+
TError = ErrorType<void>,
|
|
90
|
+
>(
|
|
91
|
+
params: undefined | GetActionsParams,
|
|
92
|
+
options: {
|
|
93
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
|
|
94
|
+
Pick<
|
|
95
|
+
DefinedInitialDataOptions<
|
|
96
|
+
Awaited<ReturnType<typeof getActions>>,
|
|
97
|
+
TError,
|
|
98
|
+
Awaited<ReturnType<typeof getActions>>
|
|
99
|
+
>,
|
|
100
|
+
"initialData"
|
|
101
|
+
>;
|
|
102
|
+
request?: SecondParameter<typeof customInstance>;
|
|
103
|
+
},
|
|
104
|
+
queryClient?: QueryClient,
|
|
105
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
106
|
+
export function useGetActions<
|
|
107
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
108
|
+
TError = ErrorType<void>,
|
|
109
|
+
>(
|
|
110
|
+
params?: GetActionsParams,
|
|
111
|
+
options?: {
|
|
112
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
|
|
113
|
+
Pick<
|
|
114
|
+
UndefinedInitialDataOptions<
|
|
115
|
+
Awaited<ReturnType<typeof getActions>>,
|
|
116
|
+
TError,
|
|
117
|
+
Awaited<ReturnType<typeof getActions>>
|
|
118
|
+
>,
|
|
119
|
+
"initialData"
|
|
120
|
+
>;
|
|
121
|
+
request?: SecondParameter<typeof customInstance>;
|
|
122
|
+
},
|
|
123
|
+
queryClient?: QueryClient,
|
|
124
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
125
|
+
export function useGetActions<
|
|
126
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
127
|
+
TError = ErrorType<void>,
|
|
128
|
+
>(
|
|
129
|
+
params?: GetActionsParams,
|
|
130
|
+
options?: {
|
|
131
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
132
|
+
request?: SecondParameter<typeof customInstance>;
|
|
133
|
+
},
|
|
134
|
+
queryClient?: QueryClient,
|
|
135
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
83
136
|
/**
|
|
84
137
|
* @summary Gets Actions held on the Account Server
|
|
85
138
|
*/
|
|
@@ -90,13 +143,16 @@ export function useGetActions<
|
|
|
90
143
|
>(
|
|
91
144
|
params?: GetActionsParams,
|
|
92
145
|
options?: {
|
|
93
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
146
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
94
147
|
request?: SecondParameter<typeof customInstance>;
|
|
95
148
|
},
|
|
96
|
-
|
|
149
|
+
queryClient?: QueryClient,
|
|
150
|
+
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
|
|
97
151
|
const queryOptions = getGetActionsQueryOptions(params, options);
|
|
98
152
|
|
|
99
|
-
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
|
|
153
|
+
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
|
|
154
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
155
|
+
};
|
|
100
156
|
|
|
101
157
|
query.queryKey = queryOptions.queryKey;
|
|
102
158
|
|
|
@@ -122,7 +178,7 @@ export const getGetActionsSuspenseQueryOptions = <
|
|
|
122
178
|
>(
|
|
123
179
|
params?: GetActionsParams,
|
|
124
180
|
options?: {
|
|
125
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
181
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
126
182
|
request?: SecondParameter<typeof customInstance>;
|
|
127
183
|
},
|
|
128
184
|
) => {
|
|
@@ -137,12 +193,45 @@ export const getGetActionsSuspenseQueryOptions = <
|
|
|
137
193
|
Awaited<ReturnType<typeof getActions>>,
|
|
138
194
|
TError,
|
|
139
195
|
TData
|
|
140
|
-
> & { queryKey: QueryKey };
|
|
196
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
141
197
|
};
|
|
142
198
|
|
|
143
199
|
export type GetActionsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
|
|
144
200
|
export type GetActionsSuspenseQueryError = ErrorType<void>;
|
|
145
201
|
|
|
202
|
+
export function useGetActionsSuspense<
|
|
203
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
204
|
+
TError = ErrorType<void>,
|
|
205
|
+
>(
|
|
206
|
+
params: undefined | GetActionsParams,
|
|
207
|
+
options: {
|
|
208
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
209
|
+
request?: SecondParameter<typeof customInstance>;
|
|
210
|
+
},
|
|
211
|
+
queryClient?: QueryClient,
|
|
212
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
213
|
+
export function useGetActionsSuspense<
|
|
214
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
215
|
+
TError = ErrorType<void>,
|
|
216
|
+
>(
|
|
217
|
+
params?: GetActionsParams,
|
|
218
|
+
options?: {
|
|
219
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
220
|
+
request?: SecondParameter<typeof customInstance>;
|
|
221
|
+
},
|
|
222
|
+
queryClient?: QueryClient,
|
|
223
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
224
|
+
export function useGetActionsSuspense<
|
|
225
|
+
TData = Awaited<ReturnType<typeof getActions>>,
|
|
226
|
+
TError = ErrorType<void>,
|
|
227
|
+
>(
|
|
228
|
+
params?: GetActionsParams,
|
|
229
|
+
options?: {
|
|
230
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
231
|
+
request?: SecondParameter<typeof customInstance>;
|
|
232
|
+
},
|
|
233
|
+
queryClient?: QueryClient,
|
|
234
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
|
|
146
235
|
/**
|
|
147
236
|
* @summary Gets Actions held on the Account Server
|
|
148
237
|
*/
|
|
@@ -153,15 +242,17 @@ export function useGetActionsSuspense<
|
|
|
153
242
|
>(
|
|
154
243
|
params?: GetActionsParams,
|
|
155
244
|
options?: {
|
|
156
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData
|
|
245
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
|
|
157
246
|
request?: SecondParameter<typeof customInstance>;
|
|
158
247
|
},
|
|
159
|
-
|
|
248
|
+
queryClient?: QueryClient,
|
|
249
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
|
|
160
250
|
const queryOptions = getGetActionsSuspenseQueryOptions(params, options);
|
|
161
251
|
|
|
162
|
-
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<
|
|
163
|
-
|
|
164
|
-
|
|
252
|
+
const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
|
|
253
|
+
TData,
|
|
254
|
+
TError
|
|
255
|
+
> & { queryKey: DataTag<QueryKey, TData> };
|
|
165
256
|
|
|
166
257
|
query.queryKey = queryOptions.queryKey;
|
|
167
258
|
|