@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.3
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/asset/asset.cjs +24 -24
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +137 -102
- package/asset/asset.d.ts +137 -102
- package/asset/asset.js +24 -24
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +16 -16
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +137 -65
- package/charges/charges.d.ts +137 -65
- package/charges/charges.js +16 -16
- package/charges/charges.js.map +1 -1
- package/chunk-TKLTUR4R.cjs.map +1 -1
- package/event-stream/event-stream.cjs +8 -8
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +82 -47
- package/event-stream/event-stream.d.ts +82 -47
- package/event-stream/event-stream.js +8 -8
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +62 -14
- package/index.d.ts +62 -14
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +8 -8
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +69 -33
- package/merchant/merchant.d.ts +69 -33
- package/merchant/merchant.js +8 -8
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +14 -14
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +128 -75
- package/organisation/organisation.d.ts +128 -75
- package/organisation/organisation.js +14 -14
- package/organisation/organisation.js.map +1 -1
- package/package.json +7 -7
- package/product/product.cjs +24 -24
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +229 -122
- package/product/product.d.ts +229 -122
- package/product/product.js +24 -24
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +63 -14
- package/src/asset/asset.ts +185 -65
- package/src/charges/charges.ts +200 -18
- package/src/event-stream/event-stream.ts +114 -19
- package/src/merchant/merchant.ts +94 -10
- package/src/organisation/organisation.ts +171 -31
- package/src/product/product.ts +301 -41
- package/src/state/state.ts +50 -6
- package/src/unit/unit.ts +188 -38
- package/src/user/user.ts +183 -38
- package/state/state.cjs +4 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +35 -17
- package/state/state.d.ts +35 -17
- package/state/state.js +4 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +12 -12
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +140 -87
- package/unit/unit.d.ts +140 -87
- package/unit/unit.js +12 -12
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +12 -12
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +139 -86
- package/user/user.d.ts +139 -86
- package/user/user.js +12 -12
- package/user/user.js.map +1 -1
package/src/user/user.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
/**
|
|
2
|
-
* Generated by orval
|
|
3
|
+
* Generated by orval v7.2.0 🍺
|
|
3
4
|
* Do not edit manually.
|
|
4
5
|
* Account Server API
|
|
5
6
|
* The Informatics Matters Account Server API.
|
|
6
7
|
|
|
7
8
|
A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
|
|
8
9
|
|
|
9
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
10
11
|
*/
|
|
11
12
|
import {
|
|
12
13
|
useMutation,
|
|
@@ -14,10 +15,14 @@ import {
|
|
|
14
15
|
useSuspenseQuery
|
|
15
16
|
} from '@tanstack/react-query'
|
|
16
17
|
import type {
|
|
18
|
+
DefinedInitialDataOptions,
|
|
19
|
+
DefinedUseQueryResult,
|
|
17
20
|
MutationFunction,
|
|
18
21
|
QueryFunction,
|
|
19
22
|
QueryKey,
|
|
23
|
+
UndefinedInitialDataOptions,
|
|
20
24
|
UseMutationOptions,
|
|
25
|
+
UseMutationResult,
|
|
21
26
|
UseQueryOptions,
|
|
22
27
|
UseQueryResult,
|
|
23
28
|
UseSuspenseQueryOptions,
|
|
@@ -79,13 +84,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
79
84
|
export type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>
|
|
80
85
|
export type GetUserAccountQueryError = ErrorType<void | AsError>
|
|
81
86
|
|
|
87
|
+
|
|
88
|
+
export function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
89
|
+
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<
|
|
90
|
+
DefinedInitialDataOptions<
|
|
91
|
+
Awaited<ReturnType<typeof getUserAccount>>,
|
|
92
|
+
TError,
|
|
93
|
+
TData
|
|
94
|
+
> , 'initialData'
|
|
95
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
96
|
+
|
|
97
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
98
|
+
export function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
99
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<
|
|
100
|
+
UndefinedInitialDataOptions<
|
|
101
|
+
Awaited<ReturnType<typeof getUserAccount>>,
|
|
102
|
+
TError,
|
|
103
|
+
TData
|
|
104
|
+
> , 'initialData'
|
|
105
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
106
|
+
|
|
107
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
108
|
+
export function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
109
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
110
|
+
|
|
111
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
82
112
|
/**
|
|
83
113
|
* @summary Get information about your account
|
|
84
114
|
*/
|
|
85
|
-
|
|
115
|
+
|
|
116
|
+
export function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
86
117
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
87
118
|
|
|
88
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
119
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
89
120
|
|
|
90
121
|
const queryOptions = getGetUserAccountQueryOptions(options)
|
|
91
122
|
|
|
@@ -119,13 +150,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
119
150
|
export type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>
|
|
120
151
|
export type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>
|
|
121
152
|
|
|
153
|
+
|
|
154
|
+
export function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
155
|
+
options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
156
|
+
|
|
157
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
158
|
+
export function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
159
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
160
|
+
|
|
161
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
162
|
+
export function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
163
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
164
|
+
|
|
165
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
122
166
|
/**
|
|
123
167
|
* @summary Get information about your account
|
|
124
168
|
*/
|
|
125
|
-
|
|
169
|
+
|
|
170
|
+
export function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(
|
|
126
171
|
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
127
172
|
|
|
128
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
173
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
129
174
|
|
|
130
175
|
const queryOptions = getGetUserAccountSuspenseQueryOptions(options)
|
|
131
176
|
|
|
@@ -186,13 +231,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
186
231
|
export type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>
|
|
187
232
|
export type GetOrganisationUsersQueryError = ErrorType<AsError | void>
|
|
188
233
|
|
|
234
|
+
|
|
235
|
+
export function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
236
|
+
orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<
|
|
237
|
+
DefinedInitialDataOptions<
|
|
238
|
+
Awaited<ReturnType<typeof getOrganisationUsers>>,
|
|
239
|
+
TError,
|
|
240
|
+
TData
|
|
241
|
+
> , 'initialData'
|
|
242
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
243
|
+
|
|
244
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
245
|
+
export function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
246
|
+
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<
|
|
247
|
+
UndefinedInitialDataOptions<
|
|
248
|
+
Awaited<ReturnType<typeof getOrganisationUsers>>,
|
|
249
|
+
TError,
|
|
250
|
+
TData
|
|
251
|
+
> , 'initialData'
|
|
252
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
253
|
+
|
|
254
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
255
|
+
export function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
256
|
+
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
257
|
+
|
|
258
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
189
259
|
/**
|
|
190
260
|
* @summary Gets users in an Organisation
|
|
191
261
|
*/
|
|
192
|
-
|
|
262
|
+
|
|
263
|
+
export function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
193
264
|
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
194
265
|
|
|
195
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
266
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
196
267
|
|
|
197
268
|
const queryOptions = getGetOrganisationUsersQueryOptions(orgId,options)
|
|
198
269
|
|
|
@@ -226,13 +297,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
226
297
|
export type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>
|
|
227
298
|
export type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>
|
|
228
299
|
|
|
300
|
+
|
|
301
|
+
export function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
302
|
+
orgId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
303
|
+
|
|
304
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
305
|
+
export function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
306
|
+
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
307
|
+
|
|
308
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
309
|
+
export function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
310
|
+
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
311
|
+
|
|
312
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
229
313
|
/**
|
|
230
314
|
* @summary Gets users in an Organisation
|
|
231
315
|
*/
|
|
232
|
-
|
|
316
|
+
|
|
317
|
+
export function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(
|
|
233
318
|
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
234
319
|
|
|
235
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
320
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
236
321
|
|
|
237
322
|
const queryOptions = getGetOrganisationUsersSuspenseQueryOptions(orgId,options)
|
|
238
323
|
|
|
@@ -266,10 +351,10 @@ export const addOrganisationUser = (
|
|
|
266
351
|
|
|
267
352
|
|
|
268
353
|
|
|
269
|
-
export const getAddOrganisationUserMutationOptions = <TError = ErrorType<AsError>,
|
|
354
|
+
export const getAddOrganisationUserMutationOptions = <TError = ErrorType<AsError | void>,
|
|
270
355
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
271
356
|
): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {
|
|
272
|
-
|
|
357
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
273
358
|
|
|
274
359
|
|
|
275
360
|
|
|
@@ -283,18 +368,23 @@ export const getAddOrganisationUserMutationOptions = <TError = ErrorType<AsError
|
|
|
283
368
|
|
|
284
369
|
|
|
285
370
|
|
|
286
|
-
|
|
371
|
+
return { mutationFn, ...mutationOptions }}
|
|
287
372
|
|
|
288
373
|
export type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>
|
|
289
374
|
|
|
290
|
-
export type AddOrganisationUserMutationError = ErrorType<AsError>
|
|
375
|
+
export type AddOrganisationUserMutationError = ErrorType<AsError | void>
|
|
291
376
|
|
|
292
377
|
/**
|
|
293
378
|
* @summary Adds a User to an Organisation
|
|
294
379
|
*/
|
|
295
|
-
export const useAddOrganisationUser = <TError = ErrorType<AsError>,
|
|
380
|
+
export const useAddOrganisationUser = <TError = ErrorType<AsError | void>,
|
|
296
381
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
297
|
-
)
|
|
382
|
+
): UseMutationResult<
|
|
383
|
+
Awaited<ReturnType<typeof addOrganisationUser>>,
|
|
384
|
+
TError,
|
|
385
|
+
{orgId: string;userId: string},
|
|
386
|
+
TContext
|
|
387
|
+
> => {
|
|
298
388
|
|
|
299
389
|
const mutationOptions = getAddOrganisationUserMutationOptions(options);
|
|
300
390
|
|
|
@@ -321,10 +411,10 @@ export const deleteOrganisationUser = (
|
|
|
321
411
|
|
|
322
412
|
|
|
323
413
|
|
|
324
|
-
export const getDeleteOrganisationUserMutationOptions = <TError = ErrorType<AsError>,
|
|
414
|
+
export const getDeleteOrganisationUserMutationOptions = <TError = ErrorType<AsError | void>,
|
|
325
415
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
326
416
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {
|
|
327
|
-
|
|
417
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
328
418
|
|
|
329
419
|
|
|
330
420
|
|
|
@@ -338,18 +428,23 @@ export const getDeleteOrganisationUserMutationOptions = <TError = ErrorType<AsEr
|
|
|
338
428
|
|
|
339
429
|
|
|
340
430
|
|
|
341
|
-
|
|
431
|
+
return { mutationFn, ...mutationOptions }}
|
|
342
432
|
|
|
343
433
|
export type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>
|
|
344
434
|
|
|
345
|
-
export type DeleteOrganisationUserMutationError = ErrorType<AsError>
|
|
435
|
+
export type DeleteOrganisationUserMutationError = ErrorType<AsError | void>
|
|
346
436
|
|
|
347
437
|
/**
|
|
348
438
|
* @summary Deletes a User from an Organisation
|
|
349
439
|
*/
|
|
350
|
-
export const useDeleteOrganisationUser = <TError = ErrorType<AsError>,
|
|
440
|
+
export const useDeleteOrganisationUser = <TError = ErrorType<AsError | void>,
|
|
351
441
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
352
|
-
)
|
|
442
|
+
): UseMutationResult<
|
|
443
|
+
Awaited<ReturnType<typeof deleteOrganisationUser>>,
|
|
444
|
+
TError,
|
|
445
|
+
{orgId: string;userId: string},
|
|
446
|
+
TContext
|
|
447
|
+
> => {
|
|
353
448
|
|
|
354
449
|
const mutationOptions = getDeleteOrganisationUserMutationOptions(options);
|
|
355
450
|
|
|
@@ -403,13 +498,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
403
498
|
export type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>
|
|
404
499
|
export type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>
|
|
405
500
|
|
|
501
|
+
|
|
502
|
+
export function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
503
|
+
unitId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<
|
|
504
|
+
DefinedInitialDataOptions<
|
|
505
|
+
Awaited<ReturnType<typeof getOrganisationUnitUsers>>,
|
|
506
|
+
TError,
|
|
507
|
+
TData
|
|
508
|
+
> , 'initialData'
|
|
509
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
510
|
+
|
|
511
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
512
|
+
export function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
513
|
+
unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<
|
|
514
|
+
UndefinedInitialDataOptions<
|
|
515
|
+
Awaited<ReturnType<typeof getOrganisationUnitUsers>>,
|
|
516
|
+
TError,
|
|
517
|
+
TData
|
|
518
|
+
> , 'initialData'
|
|
519
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
520
|
+
|
|
521
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
522
|
+
export function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
523
|
+
unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
524
|
+
|
|
525
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
406
526
|
/**
|
|
407
527
|
* @summary Gets users in an Organisational Unit
|
|
408
528
|
*/
|
|
409
|
-
|
|
529
|
+
|
|
530
|
+
export function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
410
531
|
unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
411
532
|
|
|
412
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
533
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
413
534
|
|
|
414
535
|
const queryOptions = getGetOrganisationUnitUsersQueryOptions(unitId,options)
|
|
415
536
|
|
|
@@ -443,13 +564,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
443
564
|
export type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>
|
|
444
565
|
export type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>
|
|
445
566
|
|
|
567
|
+
|
|
568
|
+
export function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
569
|
+
unitId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
570
|
+
|
|
571
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
572
|
+
export function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
573
|
+
unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
574
|
+
|
|
575
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
576
|
+
export function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
577
|
+
unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
578
|
+
|
|
579
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
446
580
|
/**
|
|
447
581
|
* @summary Gets users in an Organisational Unit
|
|
448
582
|
*/
|
|
449
|
-
|
|
583
|
+
|
|
584
|
+
export function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(
|
|
450
585
|
unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
451
586
|
|
|
452
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
587
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
453
588
|
|
|
454
589
|
const queryOptions = getGetOrganisationUnitUsersSuspenseQueryOptions(unitId,options)
|
|
455
590
|
|
|
@@ -485,10 +620,10 @@ export const addOrganisationUnitUser = (
|
|
|
485
620
|
|
|
486
621
|
|
|
487
622
|
|
|
488
|
-
export const getAddOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,
|
|
623
|
+
export const getAddOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError | void>,
|
|
489
624
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
490
625
|
): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {
|
|
491
|
-
|
|
626
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
492
627
|
|
|
493
628
|
|
|
494
629
|
|
|
@@ -502,18 +637,23 @@ export const getAddOrganisationUnitUserMutationOptions = <TError = ErrorType<AsE
|
|
|
502
637
|
|
|
503
638
|
|
|
504
639
|
|
|
505
|
-
|
|
640
|
+
return { mutationFn, ...mutationOptions }}
|
|
506
641
|
|
|
507
642
|
export type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>
|
|
508
643
|
|
|
509
|
-
export type AddOrganisationUnitUserMutationError = ErrorType<AsError>
|
|
644
|
+
export type AddOrganisationUnitUserMutationError = ErrorType<AsError | void>
|
|
510
645
|
|
|
511
646
|
/**
|
|
512
647
|
* @summary Adds a user to an Organisational Unit
|
|
513
648
|
*/
|
|
514
|
-
export const useAddOrganisationUnitUser = <TError = ErrorType<AsError>,
|
|
649
|
+
export const useAddOrganisationUnitUser = <TError = ErrorType<AsError | void>,
|
|
515
650
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
516
|
-
)
|
|
651
|
+
): UseMutationResult<
|
|
652
|
+
Awaited<ReturnType<typeof addOrganisationUnitUser>>,
|
|
653
|
+
TError,
|
|
654
|
+
{unitId: string;userId: string},
|
|
655
|
+
TContext
|
|
656
|
+
> => {
|
|
517
657
|
|
|
518
658
|
const mutationOptions = getAddOrganisationUnitUserMutationOptions(options);
|
|
519
659
|
|
|
@@ -542,10 +682,10 @@ export const deleteOrganisationUnitUser = (
|
|
|
542
682
|
|
|
543
683
|
|
|
544
684
|
|
|
545
|
-
export const getDeleteOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,
|
|
685
|
+
export const getDeleteOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError | void>,
|
|
546
686
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
547
687
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {
|
|
548
|
-
|
|
688
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
549
689
|
|
|
550
690
|
|
|
551
691
|
|
|
@@ -559,18 +699,23 @@ export const getDeleteOrganisationUnitUserMutationOptions = <TError = ErrorType<
|
|
|
559
699
|
|
|
560
700
|
|
|
561
701
|
|
|
562
|
-
|
|
702
|
+
return { mutationFn, ...mutationOptions }}
|
|
563
703
|
|
|
564
704
|
export type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>
|
|
565
705
|
|
|
566
|
-
export type DeleteOrganisationUnitUserMutationError = ErrorType<AsError>
|
|
706
|
+
export type DeleteOrganisationUnitUserMutationError = ErrorType<AsError | void>
|
|
567
707
|
|
|
568
708
|
/**
|
|
569
709
|
* @summary Deletes a User from an Organisational Unit
|
|
570
710
|
*/
|
|
571
|
-
export const useDeleteOrganisationUnitUser = <TError = ErrorType<AsError>,
|
|
711
|
+
export const useDeleteOrganisationUnitUser = <TError = ErrorType<AsError | void>,
|
|
572
712
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
573
|
-
)
|
|
713
|
+
): UseMutationResult<
|
|
714
|
+
Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,
|
|
715
|
+
TError,
|
|
716
|
+
{unitId: string;userId: string},
|
|
717
|
+
TContext
|
|
718
|
+
> => {
|
|
574
719
|
|
|
575
720
|
const mutationOptions = getDeleteOrganisationUnitUserMutationOptions(options);
|
|
576
721
|
|
package/state/state.cjs
CHANGED
|
@@ -26,24 +26,24 @@ var getGetVersionQueryOptions = (options) => {
|
|
|
26
26
|
const queryFn = ({ signal }) => getVersion(requestOptions, signal);
|
|
27
27
|
return { queryKey, queryFn, ...queryOptions };
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
function useGetVersion(options) {
|
|
30
30
|
const queryOptions = getGetVersionQueryOptions(options);
|
|
31
31
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
32
32
|
query.queryKey = queryOptions.queryKey;
|
|
33
33
|
return query;
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
35
|
var getGetVersionSuspenseQueryOptions = (options) => {
|
|
36
36
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
37
37
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionQueryKey()));
|
|
38
38
|
const queryFn = ({ signal }) => getVersion(requestOptions, signal);
|
|
39
39
|
return { queryKey, queryFn, ...queryOptions };
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
function useGetVersionSuspense(options) {
|
|
42
42
|
const queryOptions = getGetVersionSuspenseQueryOptions(options);
|
|
43
43
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
44
44
|
query.queryKey = queryOptions.queryKey;
|
|
45
45
|
return query;
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
package/state/state.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/state/state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/state/state.cjs","../../src/state/state.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAAA,mDACK;AA0BA,IAAM,WAAA,EAAa,CAEzB,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,QAAA,CAAA;AAAA,MAAY,MAAA,EAAQ,KAAA;AAAA,MAAO;AAAA,IACnC,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,sBAAA,EAAwB,CAAA,EAAA,GAAM;AACvC,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,QAAA,CAAU,CAAA;AACxC,CAAA;AAGG,IAAM,0BAAA,EAA4B,CAAsF,OAAA,EAAA,GAC1H;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,qBAAA,CAAsB,GAAA;AAIhE,EAAA,MAAM,QAAA,EAAiE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,UAAA,CAAW,cAAA,EAAgB,MAAM,CAAA;AAMzH,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAkCO,SAAS,aAAA,CACd,OAAA,EAE2D;AAE3D,EAAA,MAAM,aAAA,EAAe,yBAAA,CAA0B,OAAO,CAAA;AAEtD,EAAA,MAAM,MAAA,EAAQ,kCAAA,YAAqB,CAAA;AAEnC,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AAIO,IAAM,kCAAA,EAAoC,CAAsF,OAAA,EAAA,GAClI;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,qBAAA,CAAsB,GAAA;AAIhE,EAAA,MAAM,QAAA,EAAiE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,UAAA,CAAW,cAAA,EAAgB,MAAM,CAAA;AAMzH,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAsBO,SAAS,qBAAA,CACd,OAAA,EAEmE;AAEnE,EAAA,MAAM,aAAA,EAAe,iCAAA,CAAkC,OAAO,CAAA;AAE9D,EAAA,MAAM,MAAA,EAAQ,0CAAA,YAA6B,CAAA;AAE3C,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;ADhIA;AACE;AACA;AACA;AACA;AACA;AACA;AACF,mUAAC","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/state/state.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n StateGetVersionResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * @summary Gets the Account Server version\n */\nexport const getVersion = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<StateGetVersionResponse>(\n {url: `/version`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetVersionQueryKey = () => {\n return [\"account-server-api\", `/version`] as const;\n }\n\n \nexport const getGetVersionQueryOptions = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({ signal }) => getVersion(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>\nexport type GetVersionQueryError = ErrorType<AsError | void>\n\n\nexport function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Account Server version\n */\n\nexport function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetVersionQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({ signal }) => getVersion(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>\nexport type GetVersionSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets the Account Server version\n */\n\nexport function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetVersionSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|
package/state/state.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { customInstance, StateGetVersionResponse, ErrorType, AsError } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -9,37 +9,55 @@ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
|
9
9
|
declare const getVersion: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<StateGetVersionResponse>;
|
|
10
10
|
declare const getGetVersionQueryKey: () => readonly ["account-server-api", "/version"];
|
|
11
11
|
declare const getGetVersionQueryOptions: <TData = StateGetVersionResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
12
|
-
query?: Partial<UseQueryOptions<
|
|
12
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
13
13
|
request?: SecondParameter<typeof customInstance>;
|
|
14
|
-
}
|
|
14
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & {
|
|
15
15
|
queryKey: QueryKey;
|
|
16
16
|
};
|
|
17
17
|
type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
|
|
18
18
|
type GetVersionQueryError = ErrorType<AsError | void>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
declare function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options: {
|
|
20
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>, 'initialData'>;
|
|
21
|
+
request?: SecondParameter<typeof customInstance>;
|
|
22
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
23
|
+
queryKey: QueryKey;
|
|
24
|
+
};
|
|
25
|
+
declare function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
26
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>, 'initialData'>;
|
|
27
|
+
request?: SecondParameter<typeof customInstance>;
|
|
28
|
+
}): UseQueryResult<TData, TError> & {
|
|
29
|
+
queryKey: QueryKey;
|
|
30
|
+
};
|
|
31
|
+
declare function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
32
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
24
33
|
request?: SecondParameter<typeof customInstance>;
|
|
25
|
-
}
|
|
34
|
+
}): UseQueryResult<TData, TError> & {
|
|
26
35
|
queryKey: QueryKey;
|
|
27
36
|
};
|
|
28
37
|
declare const getGetVersionSuspenseQueryOptions: <TData = StateGetVersionResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
29
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
38
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
30
39
|
request?: SecondParameter<typeof customInstance>;
|
|
31
|
-
}
|
|
40
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & {
|
|
32
41
|
queryKey: QueryKey;
|
|
33
42
|
};
|
|
34
43
|
type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
|
|
35
44
|
type GetVersionSuspenseQueryError = ErrorType<AsError | void>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
declare function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options: {
|
|
46
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
47
|
+
request?: SecondParameter<typeof customInstance>;
|
|
48
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
49
|
+
queryKey: QueryKey;
|
|
50
|
+
};
|
|
51
|
+
declare function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
52
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
53
|
+
request?: SecondParameter<typeof customInstance>;
|
|
54
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
55
|
+
queryKey: QueryKey;
|
|
56
|
+
};
|
|
57
|
+
declare function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
58
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
41
59
|
request?: SecondParameter<typeof customInstance>;
|
|
42
|
-
}
|
|
60
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
43
61
|
queryKey: QueryKey;
|
|
44
62
|
};
|
|
45
63
|
|