@squonk/account-server-client 4.4.0-4-4.2174798239 → 4.4.0-4-4.2194834412
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 +5 -5
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +17 -35
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +17 -35
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.js +5 -5
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/api.schemas.cjs.map +1 -1
- package/dist/api/api.schemas.d.cts +1 -1
- package/dist/api/api.schemas.d.ts +1 -1
- package/dist/api/api.schemas.js.map +1 -1
- package/dist/api/asset/asset.cjs +23 -23
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +40 -76
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +40 -76
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.js +23 -23
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +17 -17
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +65 -137
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +65 -137
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.js +17 -17
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +13 -13
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +35 -71
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +35 -71
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.js +13 -13
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +9 -9
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +33 -69
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +33 -69
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.js +9 -9
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +19 -19
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +52 -106
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +52 -106
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.js +19 -19
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +31 -31
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +100 -208
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +100 -208
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.js +31 -31
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +5 -5
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +17 -35
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +17 -35
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.js +5 -5
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +31 -31
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +72 -144
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +72 -144
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.js +31 -31
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +21 -21
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +53 -107
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +53 -107
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.js +21 -21
- package/dist/api/user/user.js.map +1 -1
- package/package.json +4 -7
- package/pnpm-workspace.yaml +1 -3
- package/src/api/actions/actions.ts +13 -105
- package/src/api/api.schemas.ts +1 -1
- package/src/api/asset/asset.ts +95 -305
- package/src/api/charges/charges.ts +55 -458
- package/src/api/event-stream/event-stream.ts +59 -264
- package/src/api/merchant/merchant.ts +29 -214
- package/src/api/organisation/organisation.ts +87 -383
- package/src/api/product/product.ts +131 -726
- package/src/api/state/state.ts +17 -107
- package/src/api/unit/unit.ts +147 -523
- package/src/api/user/user.ts +102 -403
package/src/api/asset/asset.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.17.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Account Server API
|
|
5
5
|
* The Informatics Matters Account Server API.
|
|
@@ -10,14 +10,9 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
10
10
|
*/
|
|
11
11
|
import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
12
12
|
import type {
|
|
13
|
-
DataTag,
|
|
14
|
-
DefinedInitialDataOptions,
|
|
15
|
-
DefinedUseQueryResult,
|
|
16
13
|
MutationFunction,
|
|
17
|
-
QueryClient,
|
|
18
14
|
QueryFunction,
|
|
19
15
|
QueryKey,
|
|
20
|
-
UndefinedInitialDataOptions,
|
|
21
16
|
UseMutationOptions,
|
|
22
17
|
UseMutationResult,
|
|
23
18
|
UseQueryOptions,
|
|
@@ -71,7 +66,7 @@ export const useGetAssetQueryOptions = <
|
|
|
71
66
|
>(
|
|
72
67
|
params?: GetAssetParams,
|
|
73
68
|
options?: {
|
|
74
|
-
query?:
|
|
69
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>;
|
|
75
70
|
request?: SecondParameter<typeof customInstance>;
|
|
76
71
|
},
|
|
77
72
|
) => {
|
|
@@ -85,62 +80,13 @@ export const useGetAssetQueryOptions = <
|
|
|
85
80
|
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
86
81
|
|
|
87
82
|
return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & {
|
|
88
|
-
queryKey:
|
|
83
|
+
queryKey: QueryKey;
|
|
89
84
|
};
|
|
90
85
|
};
|
|
91
86
|
|
|
92
87
|
export type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>;
|
|
93
88
|
export type GetAssetQueryError = ErrorType<AsError | void>;
|
|
94
89
|
|
|
95
|
-
export function useGetAsset<
|
|
96
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
97
|
-
TError = ErrorType<AsError | void>,
|
|
98
|
-
>(
|
|
99
|
-
params: undefined | GetAssetParams,
|
|
100
|
-
options: {
|
|
101
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> &
|
|
102
|
-
Pick<
|
|
103
|
-
DefinedInitialDataOptions<
|
|
104
|
-
Awaited<ReturnType<typeof getAsset>>,
|
|
105
|
-
TError,
|
|
106
|
-
Awaited<ReturnType<typeof getAsset>>
|
|
107
|
-
>,
|
|
108
|
-
"initialData"
|
|
109
|
-
>;
|
|
110
|
-
request?: SecondParameter<typeof customInstance>;
|
|
111
|
-
},
|
|
112
|
-
queryClient?: QueryClient,
|
|
113
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
114
|
-
export function useGetAsset<
|
|
115
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
116
|
-
TError = ErrorType<AsError | void>,
|
|
117
|
-
>(
|
|
118
|
-
params?: GetAssetParams,
|
|
119
|
-
options?: {
|
|
120
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> &
|
|
121
|
-
Pick<
|
|
122
|
-
UndefinedInitialDataOptions<
|
|
123
|
-
Awaited<ReturnType<typeof getAsset>>,
|
|
124
|
-
TError,
|
|
125
|
-
Awaited<ReturnType<typeof getAsset>>
|
|
126
|
-
>,
|
|
127
|
-
"initialData"
|
|
128
|
-
>;
|
|
129
|
-
request?: SecondParameter<typeof customInstance>;
|
|
130
|
-
},
|
|
131
|
-
queryClient?: QueryClient,
|
|
132
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
133
|
-
export function useGetAsset<
|
|
134
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
135
|
-
TError = ErrorType<AsError | void>,
|
|
136
|
-
>(
|
|
137
|
-
params?: GetAssetParams,
|
|
138
|
-
options?: {
|
|
139
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>;
|
|
140
|
-
request?: SecondParameter<typeof customInstance>;
|
|
141
|
-
},
|
|
142
|
-
queryClient?: QueryClient,
|
|
143
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
144
90
|
/**
|
|
145
91
|
* @summary Gets Assets
|
|
146
92
|
*/
|
|
@@ -151,16 +97,13 @@ export function useGetAsset<
|
|
|
151
97
|
>(
|
|
152
98
|
params?: GetAssetParams,
|
|
153
99
|
options?: {
|
|
154
|
-
query?:
|
|
100
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>;
|
|
155
101
|
request?: SecondParameter<typeof customInstance>;
|
|
156
102
|
},
|
|
157
|
-
|
|
158
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
103
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
159
104
|
const queryOptions = useGetAssetQueryOptions(params, options);
|
|
160
105
|
|
|
161
|
-
const query = useQuery(queryOptions
|
|
162
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
163
|
-
};
|
|
106
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
164
107
|
|
|
165
108
|
query.queryKey = queryOptions.queryKey;
|
|
166
109
|
|
|
@@ -173,7 +116,7 @@ export const useGetAssetSuspenseQueryOptions = <
|
|
|
173
116
|
>(
|
|
174
117
|
params?: GetAssetParams,
|
|
175
118
|
options?: {
|
|
176
|
-
query?:
|
|
119
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>;
|
|
177
120
|
request?: SecondParameter<typeof customInstance>;
|
|
178
121
|
},
|
|
179
122
|
) => {
|
|
@@ -190,45 +133,12 @@ export const useGetAssetSuspenseQueryOptions = <
|
|
|
190
133
|
Awaited<ReturnType<typeof getAsset>>,
|
|
191
134
|
TError,
|
|
192
135
|
TData
|
|
193
|
-
> & { queryKey:
|
|
136
|
+
> & { queryKey: QueryKey };
|
|
194
137
|
};
|
|
195
138
|
|
|
196
139
|
export type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>;
|
|
197
140
|
export type GetAssetSuspenseQueryError = ErrorType<AsError | void>;
|
|
198
141
|
|
|
199
|
-
export function useGetAssetSuspense<
|
|
200
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
201
|
-
TError = ErrorType<AsError | void>,
|
|
202
|
-
>(
|
|
203
|
-
params: undefined | GetAssetParams,
|
|
204
|
-
options: {
|
|
205
|
-
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>;
|
|
206
|
-
request?: SecondParameter<typeof customInstance>;
|
|
207
|
-
},
|
|
208
|
-
queryClient?: QueryClient,
|
|
209
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
210
|
-
export function useGetAssetSuspense<
|
|
211
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
212
|
-
TError = ErrorType<AsError | void>,
|
|
213
|
-
>(
|
|
214
|
-
params?: GetAssetParams,
|
|
215
|
-
options?: {
|
|
216
|
-
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>;
|
|
217
|
-
request?: SecondParameter<typeof customInstance>;
|
|
218
|
-
},
|
|
219
|
-
queryClient?: QueryClient,
|
|
220
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
221
|
-
export function useGetAssetSuspense<
|
|
222
|
-
TData = Awaited<ReturnType<typeof getAsset>>,
|
|
223
|
-
TError = ErrorType<AsError | void>,
|
|
224
|
-
>(
|
|
225
|
-
params?: GetAssetParams,
|
|
226
|
-
options?: {
|
|
227
|
-
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>;
|
|
228
|
-
request?: SecondParameter<typeof customInstance>;
|
|
229
|
-
},
|
|
230
|
-
queryClient?: QueryClient,
|
|
231
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
232
142
|
/**
|
|
233
143
|
* @summary Gets Assets
|
|
234
144
|
*/
|
|
@@ -239,17 +149,15 @@ export function useGetAssetSuspense<
|
|
|
239
149
|
>(
|
|
240
150
|
params?: GetAssetParams,
|
|
241
151
|
options?: {
|
|
242
|
-
query?:
|
|
152
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>;
|
|
243
153
|
request?: SecondParameter<typeof customInstance>;
|
|
244
154
|
},
|
|
245
|
-
|
|
246
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
155
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
247
156
|
const queryOptions = useGetAssetSuspenseQueryOptions(params, options);
|
|
248
157
|
|
|
249
|
-
const query = useSuspenseQuery(queryOptions
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
158
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
159
|
+
queryKey: QueryKey;
|
|
160
|
+
};
|
|
253
161
|
|
|
254
162
|
query.queryKey = queryOptions.queryKey;
|
|
255
163
|
|
|
@@ -346,18 +254,15 @@ export type CreateAssetMutationError = ErrorType<AsError | void>;
|
|
|
346
254
|
/**
|
|
347
255
|
* @summary Create an Asset
|
|
348
256
|
*/
|
|
349
|
-
export const useCreateAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
queryClient?: QueryClient,
|
|
360
|
-
): UseMutationResult<
|
|
257
|
+
export const useCreateAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
258
|
+
mutation?: UseMutationOptions<
|
|
259
|
+
Awaited<ReturnType<typeof createAsset>>,
|
|
260
|
+
TError,
|
|
261
|
+
{ data: AssetPostBodyBody },
|
|
262
|
+
TContext
|
|
263
|
+
>;
|
|
264
|
+
request?: SecondParameter<typeof customInstance>;
|
|
265
|
+
}): UseMutationResult<
|
|
361
266
|
Awaited<ReturnType<typeof createAsset>>,
|
|
362
267
|
TError,
|
|
363
268
|
{ data: AssetPostBodyBody },
|
|
@@ -365,7 +270,7 @@ export const useCreateAsset = <TError = ErrorType<AsError | void>, TContext = un
|
|
|
365
270
|
> => {
|
|
366
271
|
const mutationOptions = useCreateAssetMutationOptions(options);
|
|
367
272
|
|
|
368
|
-
return useMutation(mutationOptions
|
|
273
|
+
return useMutation(mutationOptions);
|
|
369
274
|
};
|
|
370
275
|
/**
|
|
371
276
|
* Gets a known Asset
|
|
@@ -390,7 +295,7 @@ export const useGetSpecificAssetQueryOptions = <
|
|
|
390
295
|
>(
|
|
391
296
|
assetId: string,
|
|
392
297
|
options?: {
|
|
393
|
-
query?:
|
|
298
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>;
|
|
394
299
|
request?: SecondParameter<typeof customInstance>;
|
|
395
300
|
},
|
|
396
301
|
) => {
|
|
@@ -407,61 +312,12 @@ export const useGetSpecificAssetQueryOptions = <
|
|
|
407
312
|
Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
408
313
|
TError,
|
|
409
314
|
TData
|
|
410
|
-
> & { queryKey:
|
|
315
|
+
> & { queryKey: QueryKey };
|
|
411
316
|
};
|
|
412
317
|
|
|
413
318
|
export type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>;
|
|
414
319
|
export type GetSpecificAssetQueryError = ErrorType<AsError | void>;
|
|
415
320
|
|
|
416
|
-
export function useGetSpecificAsset<
|
|
417
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
418
|
-
TError = ErrorType<AsError | void>,
|
|
419
|
-
>(
|
|
420
|
-
assetId: string,
|
|
421
|
-
options: {
|
|
422
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> &
|
|
423
|
-
Pick<
|
|
424
|
-
DefinedInitialDataOptions<
|
|
425
|
-
Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
426
|
-
TError,
|
|
427
|
-
Awaited<ReturnType<typeof getSpecificAsset>>
|
|
428
|
-
>,
|
|
429
|
-
"initialData"
|
|
430
|
-
>;
|
|
431
|
-
request?: SecondParameter<typeof customInstance>;
|
|
432
|
-
},
|
|
433
|
-
queryClient?: QueryClient,
|
|
434
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
435
|
-
export function useGetSpecificAsset<
|
|
436
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
437
|
-
TError = ErrorType<AsError | void>,
|
|
438
|
-
>(
|
|
439
|
-
assetId: string,
|
|
440
|
-
options?: {
|
|
441
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> &
|
|
442
|
-
Pick<
|
|
443
|
-
UndefinedInitialDataOptions<
|
|
444
|
-
Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
445
|
-
TError,
|
|
446
|
-
Awaited<ReturnType<typeof getSpecificAsset>>
|
|
447
|
-
>,
|
|
448
|
-
"initialData"
|
|
449
|
-
>;
|
|
450
|
-
request?: SecondParameter<typeof customInstance>;
|
|
451
|
-
},
|
|
452
|
-
queryClient?: QueryClient,
|
|
453
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
454
|
-
export function useGetSpecificAsset<
|
|
455
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
456
|
-
TError = ErrorType<AsError | void>,
|
|
457
|
-
>(
|
|
458
|
-
assetId: string,
|
|
459
|
-
options?: {
|
|
460
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>;
|
|
461
|
-
request?: SecondParameter<typeof customInstance>;
|
|
462
|
-
},
|
|
463
|
-
queryClient?: QueryClient,
|
|
464
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
465
321
|
/**
|
|
466
322
|
* @summary Gets an Asset
|
|
467
323
|
*/
|
|
@@ -472,16 +328,13 @@ export function useGetSpecificAsset<
|
|
|
472
328
|
>(
|
|
473
329
|
assetId: string,
|
|
474
330
|
options?: {
|
|
475
|
-
query?:
|
|
331
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>;
|
|
476
332
|
request?: SecondParameter<typeof customInstance>;
|
|
477
333
|
},
|
|
478
|
-
|
|
479
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
334
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
480
335
|
const queryOptions = useGetSpecificAssetQueryOptions(assetId, options);
|
|
481
336
|
|
|
482
|
-
const query = useQuery(queryOptions
|
|
483
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
484
|
-
};
|
|
337
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
485
338
|
|
|
486
339
|
query.queryKey = queryOptions.queryKey;
|
|
487
340
|
|
|
@@ -494,9 +347,7 @@ export const useGetSpecificAssetSuspenseQueryOptions = <
|
|
|
494
347
|
>(
|
|
495
348
|
assetId: string,
|
|
496
349
|
options?: {
|
|
497
|
-
query?:
|
|
498
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>
|
|
499
|
-
>;
|
|
350
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>;
|
|
500
351
|
request?: SecondParameter<typeof customInstance>;
|
|
501
352
|
},
|
|
502
353
|
) => {
|
|
@@ -513,7 +364,7 @@ export const useGetSpecificAssetSuspenseQueryOptions = <
|
|
|
513
364
|
Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
514
365
|
TError,
|
|
515
366
|
TData
|
|
516
|
-
> & { queryKey:
|
|
367
|
+
> & { queryKey: QueryKey };
|
|
517
368
|
};
|
|
518
369
|
|
|
519
370
|
export type GetSpecificAssetSuspenseQueryResult = NonNullable<
|
|
@@ -521,45 +372,6 @@ export type GetSpecificAssetSuspenseQueryResult = NonNullable<
|
|
|
521
372
|
>;
|
|
522
373
|
export type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>;
|
|
523
374
|
|
|
524
|
-
export function useGetSpecificAssetSuspense<
|
|
525
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
526
|
-
TError = ErrorType<AsError | void>,
|
|
527
|
-
>(
|
|
528
|
-
assetId: string,
|
|
529
|
-
options: {
|
|
530
|
-
query: Partial<
|
|
531
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>
|
|
532
|
-
>;
|
|
533
|
-
request?: SecondParameter<typeof customInstance>;
|
|
534
|
-
},
|
|
535
|
-
queryClient?: QueryClient,
|
|
536
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
537
|
-
export function useGetSpecificAssetSuspense<
|
|
538
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
539
|
-
TError = ErrorType<AsError | void>,
|
|
540
|
-
>(
|
|
541
|
-
assetId: string,
|
|
542
|
-
options?: {
|
|
543
|
-
query?: Partial<
|
|
544
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>
|
|
545
|
-
>;
|
|
546
|
-
request?: SecondParameter<typeof customInstance>;
|
|
547
|
-
},
|
|
548
|
-
queryClient?: QueryClient,
|
|
549
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
550
|
-
export function useGetSpecificAssetSuspense<
|
|
551
|
-
TData = Awaited<ReturnType<typeof getSpecificAsset>>,
|
|
552
|
-
TError = ErrorType<AsError | void>,
|
|
553
|
-
>(
|
|
554
|
-
assetId: string,
|
|
555
|
-
options?: {
|
|
556
|
-
query?: Partial<
|
|
557
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>
|
|
558
|
-
>;
|
|
559
|
-
request?: SecondParameter<typeof customInstance>;
|
|
560
|
-
},
|
|
561
|
-
queryClient?: QueryClient,
|
|
562
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
563
375
|
/**
|
|
564
376
|
* @summary Gets an Asset
|
|
565
377
|
*/
|
|
@@ -570,19 +382,15 @@ export function useGetSpecificAssetSuspense<
|
|
|
570
382
|
>(
|
|
571
383
|
assetId: string,
|
|
572
384
|
options?: {
|
|
573
|
-
query?:
|
|
574
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>
|
|
575
|
-
>;
|
|
385
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>;
|
|
576
386
|
request?: SecondParameter<typeof customInstance>;
|
|
577
387
|
},
|
|
578
|
-
|
|
579
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
388
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
580
389
|
const queryOptions = useGetSpecificAssetSuspenseQueryOptions(assetId, options);
|
|
581
390
|
|
|
582
|
-
const query = useSuspenseQuery(queryOptions
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
391
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
392
|
+
queryKey: QueryKey;
|
|
393
|
+
};
|
|
586
394
|
|
|
587
395
|
query.queryKey = queryOptions.queryKey;
|
|
588
396
|
|
|
@@ -670,18 +478,15 @@ export type PatchAssetMutationError = ErrorType<void | AsError>;
|
|
|
670
478
|
/**
|
|
671
479
|
* @summary Adjust an existing Asset
|
|
672
480
|
*/
|
|
673
|
-
export const usePatchAsset = <TError = ErrorType<void | AsError>, TContext = unknown>(
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
},
|
|
683
|
-
queryClient?: QueryClient,
|
|
684
|
-
): UseMutationResult<
|
|
481
|
+
export const usePatchAsset = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
482
|
+
mutation?: UseMutationOptions<
|
|
483
|
+
Awaited<ReturnType<typeof patchAsset>>,
|
|
484
|
+
TError,
|
|
485
|
+
{ assetId: string; data: AssetPatchBodyBody },
|
|
486
|
+
TContext
|
|
487
|
+
>;
|
|
488
|
+
request?: SecondParameter<typeof customInstance>;
|
|
489
|
+
}): UseMutationResult<
|
|
685
490
|
Awaited<ReturnType<typeof patchAsset>>,
|
|
686
491
|
TError,
|
|
687
492
|
{ assetId: string; data: AssetPatchBodyBody },
|
|
@@ -689,7 +494,7 @@ export const usePatchAsset = <TError = ErrorType<void | AsError>, TContext = unk
|
|
|
689
494
|
> => {
|
|
690
495
|
const mutationOptions = usePatchAssetMutationOptions(options);
|
|
691
496
|
|
|
692
|
-
return useMutation(mutationOptions
|
|
497
|
+
return useMutation(mutationOptions);
|
|
693
498
|
};
|
|
694
499
|
/**
|
|
695
500
|
* Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted
|
|
@@ -747,18 +552,15 @@ export type DeleteAssetMutationError = ErrorType<AsError | void>;
|
|
|
747
552
|
/**
|
|
748
553
|
* @summary Deletes an Asset
|
|
749
554
|
*/
|
|
750
|
-
export const useDeleteAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
},
|
|
760
|
-
queryClient?: QueryClient,
|
|
761
|
-
): UseMutationResult<
|
|
555
|
+
export const useDeleteAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
556
|
+
mutation?: UseMutationOptions<
|
|
557
|
+
Awaited<ReturnType<typeof deleteAsset>>,
|
|
558
|
+
TError,
|
|
559
|
+
{ assetId: string },
|
|
560
|
+
TContext
|
|
561
|
+
>;
|
|
562
|
+
request?: SecondParameter<typeof customInstance>;
|
|
563
|
+
}): UseMutationResult<
|
|
762
564
|
Awaited<ReturnType<typeof deleteAsset>>,
|
|
763
565
|
TError,
|
|
764
566
|
{ assetId: string },
|
|
@@ -766,7 +568,7 @@ export const useDeleteAsset = <TError = ErrorType<AsError | void>, TContext = un
|
|
|
766
568
|
> => {
|
|
767
569
|
const mutationOptions = useDeleteAssetMutationOptions(options);
|
|
768
570
|
|
|
769
|
-
return useMutation(mutationOptions
|
|
571
|
+
return useMutation(mutationOptions);
|
|
770
572
|
};
|
|
771
573
|
/**
|
|
772
574
|
* Disables a known Asset
|
|
@@ -824,18 +626,15 @@ export type DisableAssetMutationError = ErrorType<AsError | void>;
|
|
|
824
626
|
/**
|
|
825
627
|
* @summary Disables an Asset
|
|
826
628
|
*/
|
|
827
|
-
export const useDisableAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
},
|
|
837
|
-
queryClient?: QueryClient,
|
|
838
|
-
): UseMutationResult<
|
|
629
|
+
export const useDisableAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
630
|
+
mutation?: UseMutationOptions<
|
|
631
|
+
Awaited<ReturnType<typeof disableAsset>>,
|
|
632
|
+
TError,
|
|
633
|
+
{ assetId: string },
|
|
634
|
+
TContext
|
|
635
|
+
>;
|
|
636
|
+
request?: SecondParameter<typeof customInstance>;
|
|
637
|
+
}): UseMutationResult<
|
|
839
638
|
Awaited<ReturnType<typeof disableAsset>>,
|
|
840
639
|
TError,
|
|
841
640
|
{ assetId: string },
|
|
@@ -843,7 +642,7 @@ export const useDisableAsset = <TError = ErrorType<AsError | void>, TContext = u
|
|
|
843
642
|
> => {
|
|
844
643
|
const mutationOptions = useDisableAssetMutationOptions(options);
|
|
845
644
|
|
|
846
|
-
return useMutation(mutationOptions
|
|
645
|
+
return useMutation(mutationOptions);
|
|
847
646
|
};
|
|
848
647
|
/**
|
|
849
648
|
* Enables a known Asset
|
|
@@ -901,18 +700,15 @@ export type EnableAssetMutationError = ErrorType<AsError | void>;
|
|
|
901
700
|
/**
|
|
902
701
|
* @summary Enables an Asset
|
|
903
702
|
*/
|
|
904
|
-
export const useEnableAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
queryClient?: QueryClient,
|
|
915
|
-
): UseMutationResult<
|
|
703
|
+
export const useEnableAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
704
|
+
mutation?: UseMutationOptions<
|
|
705
|
+
Awaited<ReturnType<typeof enableAsset>>,
|
|
706
|
+
TError,
|
|
707
|
+
{ assetId: string },
|
|
708
|
+
TContext
|
|
709
|
+
>;
|
|
710
|
+
request?: SecondParameter<typeof customInstance>;
|
|
711
|
+
}): UseMutationResult<
|
|
916
712
|
Awaited<ReturnType<typeof enableAsset>>,
|
|
917
713
|
TError,
|
|
918
714
|
{ assetId: string },
|
|
@@ -920,7 +716,7 @@ export const useEnableAsset = <TError = ErrorType<AsError | void>, TContext = un
|
|
|
920
716
|
> => {
|
|
921
717
|
const mutationOptions = useEnableAssetMutationOptions(options);
|
|
922
718
|
|
|
923
|
-
return useMutation(mutationOptions
|
|
719
|
+
return useMutation(mutationOptions);
|
|
924
720
|
};
|
|
925
721
|
/**
|
|
926
722
|
* Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.
|
|
@@ -985,18 +781,15 @@ export type AttachAssetMutationError = ErrorType<AsError | void>;
|
|
|
985
781
|
/**
|
|
986
782
|
* @summary Attaches an Asset to a Merchant
|
|
987
783
|
*/
|
|
988
|
-
export const useAttachAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
},
|
|
998
|
-
queryClient?: QueryClient,
|
|
999
|
-
): UseMutationResult<
|
|
784
|
+
export const useAttachAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
785
|
+
mutation?: UseMutationOptions<
|
|
786
|
+
Awaited<ReturnType<typeof attachAsset>>,
|
|
787
|
+
TError,
|
|
788
|
+
{ assetId: string; params?: AttachAssetParams },
|
|
789
|
+
TContext
|
|
790
|
+
>;
|
|
791
|
+
request?: SecondParameter<typeof customInstance>;
|
|
792
|
+
}): UseMutationResult<
|
|
1000
793
|
Awaited<ReturnType<typeof attachAsset>>,
|
|
1001
794
|
TError,
|
|
1002
795
|
{ assetId: string; params?: AttachAssetParams },
|
|
@@ -1004,7 +797,7 @@ export const useAttachAsset = <TError = ErrorType<AsError | void>, TContext = un
|
|
|
1004
797
|
> => {
|
|
1005
798
|
const mutationOptions = useAttachAssetMutationOptions(options);
|
|
1006
799
|
|
|
1007
|
-
return useMutation(mutationOptions
|
|
800
|
+
return useMutation(mutationOptions);
|
|
1008
801
|
};
|
|
1009
802
|
/**
|
|
1010
803
|
* Detaches an Asset from a **Merchant**
|
|
@@ -1069,18 +862,15 @@ export type DetachAssetMutationError = ErrorType<AsError | void>;
|
|
|
1069
862
|
/**
|
|
1070
863
|
* @summary Detaches an Asset from a Merchant
|
|
1071
864
|
*/
|
|
1072
|
-
export const useDetachAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1082
|
-
queryClient?: QueryClient,
|
|
1083
|
-
): UseMutationResult<
|
|
865
|
+
export const useDetachAsset = <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
866
|
+
mutation?: UseMutationOptions<
|
|
867
|
+
Awaited<ReturnType<typeof detachAsset>>,
|
|
868
|
+
TError,
|
|
869
|
+
{ assetId: string; params?: DetachAssetParams },
|
|
870
|
+
TContext
|
|
871
|
+
>;
|
|
872
|
+
request?: SecondParameter<typeof customInstance>;
|
|
873
|
+
}): UseMutationResult<
|
|
1084
874
|
Awaited<ReturnType<typeof detachAsset>>,
|
|
1085
875
|
TError,
|
|
1086
876
|
{ assetId: string; params?: DetachAssetParams },
|
|
@@ -1088,5 +878,5 @@ export const useDetachAsset = <TError = ErrorType<AsError | void>, TContext = un
|
|
|
1088
878
|
> => {
|
|
1089
879
|
const mutationOptions = useDetachAssetMutationOptions(options);
|
|
1090
880
|
|
|
1091
|
-
return useMutation(mutationOptions
|
|
881
|
+
return useMutation(mutationOptions);
|
|
1092
882
|
};
|