@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.
Files changed (70) hide show
  1. package/asset/asset.cjs +24 -24
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +137 -102
  4. package/asset/asset.d.ts +137 -102
  5. package/asset/asset.js +24 -24
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +16 -16
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +137 -65
  10. package/charges/charges.d.ts +137 -65
  11. package/charges/charges.js +16 -16
  12. package/charges/charges.js.map +1 -1
  13. package/chunk-TKLTUR4R.cjs.map +1 -1
  14. package/event-stream/event-stream.cjs +8 -8
  15. package/event-stream/event-stream.cjs.map +1 -1
  16. package/event-stream/event-stream.d.cts +82 -47
  17. package/event-stream/event-stream.d.ts +82 -47
  18. package/event-stream/event-stream.js +8 -8
  19. package/event-stream/event-stream.js.map +1 -1
  20. package/index.cjs.map +1 -1
  21. package/index.d.cts +62 -14
  22. package/index.d.ts +62 -14
  23. package/index.js.map +1 -1
  24. package/merchant/merchant.cjs +8 -8
  25. package/merchant/merchant.cjs.map +1 -1
  26. package/merchant/merchant.d.cts +69 -33
  27. package/merchant/merchant.d.ts +69 -33
  28. package/merchant/merchant.js +8 -8
  29. package/merchant/merchant.js.map +1 -1
  30. package/organisation/organisation.cjs +14 -14
  31. package/organisation/organisation.cjs.map +1 -1
  32. package/organisation/organisation.d.cts +128 -75
  33. package/organisation/organisation.d.ts +128 -75
  34. package/organisation/organisation.js +14 -14
  35. package/organisation/organisation.js.map +1 -1
  36. package/package.json +7 -7
  37. package/product/product.cjs +24 -24
  38. package/product/product.cjs.map +1 -1
  39. package/product/product.d.cts +229 -122
  40. package/product/product.d.ts +229 -122
  41. package/product/product.js +24 -24
  42. package/product/product.js.map +1 -1
  43. package/src/account-server-api.schemas.ts +63 -14
  44. package/src/asset/asset.ts +185 -65
  45. package/src/charges/charges.ts +200 -18
  46. package/src/event-stream/event-stream.ts +114 -19
  47. package/src/merchant/merchant.ts +94 -10
  48. package/src/organisation/organisation.ts +171 -31
  49. package/src/product/product.ts +301 -41
  50. package/src/state/state.ts +50 -6
  51. package/src/unit/unit.ts +188 -38
  52. package/src/user/user.ts +183 -38
  53. package/state/state.cjs +4 -4
  54. package/state/state.cjs.map +1 -1
  55. package/state/state.d.cts +35 -17
  56. package/state/state.d.ts +35 -17
  57. package/state/state.js +4 -4
  58. package/state/state.js.map +1 -1
  59. package/unit/unit.cjs +12 -12
  60. package/unit/unit.cjs.map +1 -1
  61. package/unit/unit.d.cts +140 -87
  62. package/unit/unit.d.ts +140 -87
  63. package/unit/unit.js +12 -12
  64. package/unit/unit.js.map +1 -1
  65. package/user/user.cjs +12 -12
  66. package/user/user.cjs.map +1 -1
  67. package/user/user.d.cts +139 -86
  68. package/user/user.d.ts +139 -86
  69. package/user/user.js +12 -12
  70. package/user/user.js.map +1 -1
@@ -1,20 +1,24 @@
1
+ // @ts-nocheck
1
2
  /**
2
- * Generated by orval v6.25.0 🍺
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: 3.1
10
+ * OpenAPI spec version: 4.0
10
11
  */
11
12
  import {
12
13
  useQuery,
13
14
  useSuspenseQuery
14
15
  } from '@tanstack/react-query'
15
16
  import type {
17
+ DefinedInitialDataOptions,
18
+ DefinedUseQueryResult,
16
19
  QueryFunction,
17
20
  QueryKey,
21
+ UndefinedInitialDataOptions,
18
22
  UseQueryOptions,
19
23
  UseQueryResult,
20
24
  UseSuspenseQueryOptions,
@@ -73,13 +77,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
73
77
  export type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>
74
78
  export type GetVersionQueryError = ErrorType<AsError | void>
75
79
 
80
+
81
+ export function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
82
+ options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<
83
+ DefinedInitialDataOptions<
84
+ Awaited<ReturnType<typeof getVersion>>,
85
+ TError,
86
+ TData
87
+ > , 'initialData'
88
+ >, request?: SecondParameter<typeof customInstance>}
89
+
90
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
91
+ export function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
92
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<
93
+ UndefinedInitialDataOptions<
94
+ Awaited<ReturnType<typeof getVersion>>,
95
+ TError,
96
+ TData
97
+ > , 'initialData'
98
+ >, request?: SecondParameter<typeof customInstance>}
99
+
100
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
101
+ export function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
102
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
103
+
104
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
76
105
  /**
77
106
  * @summary Gets the Account Server version
78
107
  */
79
- export const useGetVersion = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
108
+
109
+ export function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
80
110
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
81
111
 
82
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
112
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
83
113
 
84
114
  const queryOptions = getGetVersionQueryOptions(options)
85
115
 
@@ -113,13 +143,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
113
143
  export type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>
114
144
  export type GetVersionSuspenseQueryError = ErrorType<AsError | void>
115
145
 
146
+
147
+ export function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
148
+ options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
149
+
150
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
151
+ export function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
152
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
153
+
154
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
155
+ export function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
156
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
157
+
158
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
116
159
  /**
117
160
  * @summary Gets the Account Server version
118
161
  */
119
- export const useGetVersionSuspense = <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
162
+
163
+ export function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(
120
164
  options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
121
165
 
122
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
166
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
123
167
 
124
168
  const queryOptions = getGetVersionSuspenseQueryOptions(options)
125
169
 
package/src/unit/unit.ts CHANGED
@@ -1,12 +1,13 @@
1
+ // @ts-nocheck
1
2
  /**
2
- * Generated by orval v6.25.0 🍺
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: 3.1
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,
@@ -85,13 +90,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
85
90
  export type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>
86
91
  export type GetOrganisationUnitsQueryError = ErrorType<void | AsError>
87
92
 
93
+
94
+ export function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
95
+ orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<
96
+ DefinedInitialDataOptions<
97
+ Awaited<ReturnType<typeof getOrganisationUnits>>,
98
+ TError,
99
+ TData
100
+ > , 'initialData'
101
+ >, request?: SecondParameter<typeof customInstance>}
102
+
103
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
104
+ export function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
105
+ orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<
106
+ UndefinedInitialDataOptions<
107
+ Awaited<ReturnType<typeof getOrganisationUnits>>,
108
+ TError,
109
+ TData
110
+ > , 'initialData'
111
+ >, request?: SecondParameter<typeof customInstance>}
112
+
113
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
114
+ export function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
115
+ orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
116
+
117
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
88
118
  /**
89
119
  * @summary Gets Organisational Units
90
120
  */
91
- export const useGetOrganisationUnits = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
121
+
122
+ export function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
92
123
  orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
93
124
 
94
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
125
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
95
126
 
96
127
  const queryOptions = getGetOrganisationUnitsQueryOptions(orgId,options)
97
128
 
@@ -125,13 +156,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
125
156
  export type GetOrganisationUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>
126
157
  export type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>
127
158
 
159
+
160
+ export function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
161
+ orgId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
162
+
163
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
164
+ export function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
165
+ orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
166
+
167
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
168
+ export function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
169
+ orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
170
+
171
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
128
172
  /**
129
173
  * @summary Gets Organisational Units
130
174
  */
131
- export const useGetOrganisationUnitsSuspense = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
175
+
176
+ export function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(
132
177
  orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
133
178
 
134
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
179
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
135
180
 
136
181
  const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId,options)
137
182
 
@@ -172,7 +217,7 @@ export const createOrganisationUnit = (
172
217
  export const getCreateOrganisationUnitMutationOptions = <TError = ErrorType<AsError | void>,
173
218
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
174
219
  ): UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext> => {
175
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
220
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
176
221
 
177
222
 
178
223
 
@@ -186,7 +231,7 @@ export const getCreateOrganisationUnitMutationOptions = <TError = ErrorType<AsEr
186
231
 
187
232
 
188
233
 
189
- return { mutationFn, ...mutationOptions }}
234
+ return { mutationFn, ...mutationOptions }}
190
235
 
191
236
  export type CreateOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisationUnit>>>
192
237
  export type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody
@@ -197,7 +242,12 @@ export const getCreateOrganisationUnitMutationOptions = <TError = ErrorType<AsEr
197
242
  */
198
243
  export const useCreateOrganisationUnit = <TError = ErrorType<AsError | void>,
199
244
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
200
- ) => {
245
+ ): UseMutationResult<
246
+ Awaited<ReturnType<typeof createOrganisationUnit>>,
247
+ TError,
248
+ {orgId: string;data: OrganisationUnitPostBodyBody},
249
+ TContext
250
+ > => {
201
251
 
202
252
  const mutationOptions = getCreateOrganisationUnitMutationOptions(options);
203
253
 
@@ -247,13 +297,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
247
297
  export type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>
248
298
  export type GetUnitQueryError = ErrorType<void | AsError>
249
299
 
300
+
301
+ export function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
302
+ unitId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<
303
+ DefinedInitialDataOptions<
304
+ Awaited<ReturnType<typeof getUnit>>,
305
+ TError,
306
+ TData
307
+ > , 'initialData'
308
+ >, request?: SecondParameter<typeof customInstance>}
309
+
310
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
311
+ export function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
312
+ unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<
313
+ UndefinedInitialDataOptions<
314
+ Awaited<ReturnType<typeof getUnit>>,
315
+ TError,
316
+ TData
317
+ > , 'initialData'
318
+ >, request?: SecondParameter<typeof customInstance>}
319
+
320
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
321
+ export function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
322
+ unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
323
+
324
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
250
325
  /**
251
326
  * @summary Gets an Organisational Unit
252
327
  */
253
- export const useGetUnit = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
328
+
329
+ export function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
254
330
  unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
255
331
 
256
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
332
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
257
333
 
258
334
  const queryOptions = getGetUnitQueryOptions(unitId,options)
259
335
 
@@ -287,13 +363,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
287
363
  export type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>
288
364
  export type GetUnitSuspenseQueryError = ErrorType<void | AsError>
289
365
 
366
+
367
+ export function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
368
+ unitId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
369
+
370
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
371
+ export function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
372
+ unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
373
+
374
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
375
+ export function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
376
+ unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
377
+
378
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
290
379
  /**
291
380
  * @summary Gets an Organisational Unit
292
381
  */
293
- export const useGetUnitSuspense = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
382
+
383
+ export function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(
294
384
  unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
295
385
 
296
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
386
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
297
387
 
298
388
  const queryOptions = getGetUnitSuspenseQueryOptions(unitId,options)
299
389
 
@@ -329,10 +419,10 @@ export const patchUnit = (
329
419
 
330
420
 
331
421
 
332
- export const getPatchUnitMutationOptions = <TError = ErrorType<AsError>,
422
+ export const getPatchUnitMutationOptions = <TError = ErrorType<void | AsError>,
333
423
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
334
424
  ): UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext> => {
335
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
425
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
336
426
 
337
427
 
338
428
 
@@ -346,18 +436,23 @@ export const getPatchUnitMutationOptions = <TError = ErrorType<AsError>,
346
436
 
347
437
 
348
438
 
349
- return { mutationFn, ...mutationOptions }}
439
+ return { mutationFn, ...mutationOptions }}
350
440
 
351
441
  export type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>
352
442
  export type PatchUnitMutationBody = UnitPatchBodyBody
353
- export type PatchUnitMutationError = ErrorType<AsError>
443
+ export type PatchUnitMutationError = ErrorType<void | AsError>
354
444
 
355
445
  /**
356
446
  * @summary Adjust an existing Unit
357
447
  */
358
- export const usePatchUnit = <TError = ErrorType<AsError>,
448
+ export const usePatchUnit = <TError = ErrorType<void | AsError>,
359
449
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
360
- ) => {
450
+ ): UseMutationResult<
451
+ Awaited<ReturnType<typeof patchUnit>>,
452
+ TError,
453
+ {unitId: string;data: UnitPatchBodyBody},
454
+ TContext
455
+ > => {
361
456
 
362
457
  const mutationOptions = getPatchUnitMutationOptions(options);
363
458
 
@@ -385,10 +480,10 @@ export const deleteOrganisationUnit = (
385
480
 
386
481
 
387
482
 
388
- export const getDeleteOrganisationUnitMutationOptions = <TError = ErrorType<AsError>,
483
+ export const getDeleteOrganisationUnitMutationOptions = <TError = ErrorType<void | AsError>,
389
484
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
390
485
  ): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext> => {
391
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
486
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
392
487
 
393
488
 
394
489
 
@@ -402,18 +497,23 @@ export const getDeleteOrganisationUnitMutationOptions = <TError = ErrorType<AsEr
402
497
 
403
498
 
404
499
 
405
- return { mutationFn, ...mutationOptions }}
500
+ return { mutationFn, ...mutationOptions }}
406
501
 
407
502
  export type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>
408
503
 
409
- export type DeleteOrganisationUnitMutationError = ErrorType<AsError>
504
+ export type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>
410
505
 
411
506
  /**
412
507
  * @summary Deletes an Organisational Unit
413
508
  */
414
- export const useDeleteOrganisationUnit = <TError = ErrorType<AsError>,
509
+ export const useDeleteOrganisationUnit = <TError = ErrorType<void | AsError>,
415
510
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
416
- ) => {
511
+ ): UseMutationResult<
512
+ Awaited<ReturnType<typeof deleteOrganisationUnit>>,
513
+ TError,
514
+ {unitId: string},
515
+ TContext
516
+ > => {
417
517
 
418
518
  const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);
419
519
 
@@ -465,13 +565,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
465
565
  export type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>
466
566
  export type GetUnitsQueryError = ErrorType<void | AsError>
467
567
 
568
+
569
+ export function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
570
+ options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<
571
+ DefinedInitialDataOptions<
572
+ Awaited<ReturnType<typeof getUnits>>,
573
+ TError,
574
+ TData
575
+ > , 'initialData'
576
+ >, request?: SecondParameter<typeof customInstance>}
577
+
578
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
579
+ export function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
580
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<
581
+ UndefinedInitialDataOptions<
582
+ Awaited<ReturnType<typeof getUnits>>,
583
+ TError,
584
+ TData
585
+ > , 'initialData'
586
+ >, request?: SecondParameter<typeof customInstance>}
587
+
588
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
589
+ export function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
590
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
591
+
592
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
468
593
  /**
469
594
  * @summary Gets Units
470
595
  */
471
- export const useGetUnits = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
596
+
597
+ export function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
472
598
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
473
599
 
474
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
600
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
475
601
 
476
602
  const queryOptions = getGetUnitsQueryOptions(options)
477
603
 
@@ -505,13 +631,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
505
631
  export type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>
506
632
  export type GetUnitsSuspenseQueryError = ErrorType<void | AsError>
507
633
 
634
+
635
+ export function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
636
+ options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
637
+
638
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
639
+ export function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
640
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
641
+
642
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
643
+ export function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
644
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
645
+
646
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
508
647
  /**
509
648
  * @summary Gets Units
510
649
  */
511
- export const useGetUnitsSuspense = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
650
+
651
+ export function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(
512
652
  options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
513
653
 
514
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
654
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
515
655
 
516
656
  const queryOptions = getGetUnitsSuspenseQueryOptions(options)
517
657
 
@@ -549,7 +689,7 @@ export const createDefaultUnit = (
549
689
  export const getCreateDefaultUnitMutationOptions = <TError = ErrorType<AsError | void>,
550
690
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
551
691
  ): UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext> => {
552
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
692
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
553
693
 
554
694
 
555
695
 
@@ -563,7 +703,7 @@ export const getCreateDefaultUnitMutationOptions = <TError = ErrorType<AsError |
563
703
 
564
704
 
565
705
 
566
- return { mutationFn, ...mutationOptions }}
706
+ return { mutationFn, ...mutationOptions }}
567
707
 
568
708
  export type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>
569
709
  export type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody
@@ -574,7 +714,12 @@ export const getCreateDefaultUnitMutationOptions = <TError = ErrorType<AsError |
574
714
  */
575
715
  export const useCreateDefaultUnit = <TError = ErrorType<AsError | void>,
576
716
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
577
- ) => {
717
+ ): UseMutationResult<
718
+ Awaited<ReturnType<typeof createDefaultUnit>>,
719
+ TError,
720
+ {data: PersonalUnitPutBodyBody},
721
+ TContext
722
+ > => {
578
723
 
579
724
  const mutationOptions = getCreateDefaultUnitMutationOptions(options);
580
725
 
@@ -598,10 +743,10 @@ export const deleteDefaultUnit = (
598
743
 
599
744
 
600
745
 
601
- export const getDeleteDefaultUnitMutationOptions = <TError = ErrorType<AsError>,
746
+ export const getDeleteDefaultUnitMutationOptions = <TError = ErrorType<void | AsError>,
602
747
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}
603
748
  ): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext> => {
604
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
749
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
605
750
 
606
751
 
607
752
 
@@ -615,18 +760,23 @@ export const getDeleteDefaultUnitMutationOptions = <TError = ErrorType<AsError>,
615
760
 
616
761
 
617
762
 
618
- return { mutationFn, ...mutationOptions }}
763
+ return { mutationFn, ...mutationOptions }}
619
764
 
620
765
  export type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>
621
766
 
622
- export type DeleteDefaultUnitMutationError = ErrorType<AsError>
767
+ export type DeleteDefaultUnitMutationError = ErrorType<void | AsError>
623
768
 
624
769
  /**
625
770
  * @summary Deletes a Personal Unit
626
771
  */
627
- export const useDeleteDefaultUnit = <TError = ErrorType<AsError>,
772
+ export const useDeleteDefaultUnit = <TError = ErrorType<void | AsError>,
628
773
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}
629
- ) => {
774
+ ): UseMutationResult<
775
+ Awaited<ReturnType<typeof deleteDefaultUnit>>,
776
+ TError,
777
+ void,
778
+ TContext
779
+ > => {
630
780
 
631
781
  const mutationOptions = getDeleteDefaultUnitMutationOptions(options);
632
782