@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.2

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,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,
@@ -84,13 +89,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
84
89
  export type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>
85
90
  export type GetProductTypesQueryError = ErrorType<AsError | void>
86
91
 
92
+
93
+ export function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
94
+ options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<
95
+ DefinedInitialDataOptions<
96
+ Awaited<ReturnType<typeof getProductTypes>>,
97
+ TError,
98
+ TData
99
+ > , 'initialData'
100
+ >, request?: SecondParameter<typeof customInstance>}
101
+
102
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
103
+ export function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
104
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<
105
+ UndefinedInitialDataOptions<
106
+ Awaited<ReturnType<typeof getProductTypes>>,
107
+ TError,
108
+ TData
109
+ > , 'initialData'
110
+ >, request?: SecondParameter<typeof customInstance>}
111
+
112
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
113
+ export function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
114
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
115
+
116
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
87
117
  /**
88
118
  * @summary Gets all Product Types
89
119
  */
90
- export const useGetProductTypes = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
120
+
121
+ export function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
91
122
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
92
123
 
93
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
124
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
94
125
 
95
126
  const queryOptions = getGetProductTypesQueryOptions(options)
96
127
 
@@ -124,13 +155,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
124
155
  export type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>
125
156
  export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>
126
157
 
158
+
159
+ export function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
160
+ options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
161
+
162
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
163
+ export function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
164
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
165
+
166
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
167
+ export function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
168
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
169
+
170
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
127
171
  /**
128
172
  * @summary Gets all Product Types
129
173
  */
130
- export const useGetProductTypesSuspense = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
174
+
175
+ export function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(
131
176
  options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
132
177
 
133
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
178
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
134
179
 
135
180
  const queryOptions = getGetProductTypesSuspenseQueryOptions(options)
136
181
 
@@ -187,13 +232,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
187
232
  export type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>
188
233
  export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>
189
234
 
235
+
236
+ export function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
237
+ options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<
238
+ DefinedInitialDataOptions<
239
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
240
+ TError,
241
+ TData
242
+ > , 'initialData'
243
+ >, request?: SecondParameter<typeof customInstance>}
244
+
245
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
246
+ export function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
247
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<
248
+ UndefinedInitialDataOptions<
249
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
250
+ TError,
251
+ TData
252
+ > , 'initialData'
253
+ >, request?: SecondParameter<typeof customInstance>}
254
+
255
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
256
+ export function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
257
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
258
+
259
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
190
260
  /**
191
261
  * @summary Gets the default cross-product storage cost
192
262
  */
193
- export const useGetProductDefaultStorageCost = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
263
+
264
+ export function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
194
265
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
195
266
 
196
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
267
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
197
268
 
198
269
  const queryOptions = getGetProductDefaultStorageCostQueryOptions(options)
199
270
 
@@ -227,13 +298,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
227
298
  export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>
228
299
  export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>
229
300
 
301
+
302
+ export function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
303
+ options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
304
+
305
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
306
+ export function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
307
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
308
+
309
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
310
+ export function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
311
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
312
+
313
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
230
314
  /**
231
315
  * @summary Gets the default cross-product storage cost
232
316
  */
233
- export const useGetProductDefaultStorageCostSuspense = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
317
+
318
+ export function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(
234
319
  options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
235
320
 
236
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
321
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
237
322
 
238
323
  const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options)
239
324
 
@@ -290,13 +375,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
290
375
  export type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>
291
376
  export type GetProductsQueryError = ErrorType<AsError | void>
292
377
 
378
+
379
+ export function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
380
+ options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<
381
+ DefinedInitialDataOptions<
382
+ Awaited<ReturnType<typeof getProducts>>,
383
+ TError,
384
+ TData
385
+ > , 'initialData'
386
+ >, request?: SecondParameter<typeof customInstance>}
387
+
388
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
389
+ export function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
390
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<
391
+ UndefinedInitialDataOptions<
392
+ Awaited<ReturnType<typeof getProducts>>,
393
+ TError,
394
+ TData
395
+ > , 'initialData'
396
+ >, request?: SecondParameter<typeof customInstance>}
397
+
398
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
399
+ export function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
400
+ options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
401
+
402
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
293
403
  /**
294
404
  * @summary Gets all Products
295
405
  */
296
- export const useGetProducts = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
406
+
407
+ export function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
297
408
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
298
409
 
299
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
410
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
300
411
 
301
412
  const queryOptions = getGetProductsQueryOptions(options)
302
413
 
@@ -330,13 +441,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
330
441
  export type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>
331
442
  export type GetProductsSuspenseQueryError = ErrorType<AsError | void>
332
443
 
444
+
445
+ export function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
446
+ options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
447
+
448
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
449
+ export function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
450
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
451
+
452
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
453
+ export function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
454
+ options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
455
+
456
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
333
457
  /**
334
458
  * @summary Gets all Products
335
459
  */
336
- export const useGetProductsSuspense = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
460
+
461
+ export function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(
337
462
  options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
338
463
 
339
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
464
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
340
465
 
341
466
  const queryOptions = getGetProductsSuspenseQueryOptions(options)
342
467
 
@@ -393,13 +518,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
393
518
  export type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>
394
519
  export type GetProductsForOrganisationQueryError = ErrorType<void | AsError>
395
520
 
521
+
522
+ export function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
523
+ orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<
524
+ DefinedInitialDataOptions<
525
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
526
+ TError,
527
+ TData
528
+ > , 'initialData'
529
+ >, request?: SecondParameter<typeof customInstance>}
530
+
531
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
532
+ export function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
533
+ orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<
534
+ UndefinedInitialDataOptions<
535
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
536
+ TError,
537
+ TData
538
+ > , 'initialData'
539
+ >, request?: SecondParameter<typeof customInstance>}
540
+
541
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
542
+ export function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
543
+ orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
544
+
545
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
396
546
  /**
397
547
  * @summary Gets Products for an Organisation
398
548
  */
399
- export const useGetProductsForOrganisation = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
549
+
550
+ export function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
400
551
  orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
401
552
 
402
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
553
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
403
554
 
404
555
  const queryOptions = getGetProductsForOrganisationQueryOptions(orgId,options)
405
556
 
@@ -433,13 +584,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
433
584
  export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>
434
585
  export type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>
435
586
 
587
+
588
+ export function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
589
+ orgId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
590
+
591
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
592
+ export function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
593
+ orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
594
+
595
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
596
+ export function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
597
+ orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
598
+
599
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
436
600
  /**
437
601
  * @summary Gets Products for an Organisation
438
602
  */
439
- export const useGetProductsForOrganisationSuspense = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
603
+
604
+ export function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(
440
605
  orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
441
606
 
442
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
607
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
443
608
 
444
609
  const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId,options)
445
610
 
@@ -482,7 +647,7 @@ export const createUnitProduct = (
482
647
  export const getCreateUnitProductMutationOptions = <TError = ErrorType<AsError | void>,
483
648
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
484
649
  ): UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext> => {
485
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
650
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
486
651
 
487
652
 
488
653
 
@@ -496,7 +661,7 @@ export const getCreateUnitProductMutationOptions = <TError = ErrorType<AsError |
496
661
 
497
662
 
498
663
 
499
- return { mutationFn, ...mutationOptions }}
664
+ return { mutationFn, ...mutationOptions }}
500
665
 
501
666
  export type CreateUnitProductMutationResult = NonNullable<Awaited<ReturnType<typeof createUnitProduct>>>
502
667
  export type CreateUnitProductMutationBody = UnitProductPostBodyBody
@@ -507,7 +672,12 @@ export const getCreateUnitProductMutationOptions = <TError = ErrorType<AsError |
507
672
  */
508
673
  export const useCreateUnitProduct = <TError = ErrorType<AsError | void>,
509
674
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
510
- ) => {
675
+ ): UseMutationResult<
676
+ Awaited<ReturnType<typeof createUnitProduct>>,
677
+ TError,
678
+ {unitId: string;data: UnitProductPostBodyBody},
679
+ TContext
680
+ > => {
511
681
 
512
682
  const mutationOptions = getCreateUnitProductMutationOptions(options);
513
683
 
@@ -557,13 +727,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
557
727
  export type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>
558
728
  export type GetProductsForUnitQueryError = ErrorType<void | AsError>
559
729
 
730
+
731
+ export function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
732
+ unitId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<
733
+ DefinedInitialDataOptions<
734
+ Awaited<ReturnType<typeof getProductsForUnit>>,
735
+ TError,
736
+ TData
737
+ > , 'initialData'
738
+ >, request?: SecondParameter<typeof customInstance>}
739
+
740
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
741
+ export function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
742
+ unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<
743
+ UndefinedInitialDataOptions<
744
+ Awaited<ReturnType<typeof getProductsForUnit>>,
745
+ TError,
746
+ TData
747
+ > , 'initialData'
748
+ >, request?: SecondParameter<typeof customInstance>}
749
+
750
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
751
+ export function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
752
+ unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
753
+
754
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
560
755
  /**
561
756
  * @summary Gets Products for an Organisational Unit
562
757
  */
563
- export const useGetProductsForUnit = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
758
+
759
+ export function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
564
760
  unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
565
761
 
566
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
762
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
567
763
 
568
764
  const queryOptions = getGetProductsForUnitQueryOptions(unitId,options)
569
765
 
@@ -597,13 +793,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
597
793
  export type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>
598
794
  export type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>
599
795
 
796
+
797
+ export function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
798
+ unitId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
799
+
800
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
801
+ export function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
802
+ unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
803
+
804
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
805
+ export function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
806
+ unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
807
+
808
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
600
809
  /**
601
810
  * @summary Gets Products for an Organisational Unit
602
811
  */
603
- export const useGetProductsForUnitSuspense = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
812
+
813
+ export function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(
604
814
  unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
605
815
 
606
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
816
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
607
817
 
608
818
  const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId,options)
609
819
 
@@ -660,13 +870,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
660
870
  export type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>
661
871
  export type GetProductQueryError = ErrorType<AsError | void>
662
872
 
873
+
874
+ export function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
875
+ productId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<
876
+ DefinedInitialDataOptions<
877
+ Awaited<ReturnType<typeof getProduct>>,
878
+ TError,
879
+ TData
880
+ > , 'initialData'
881
+ >, request?: SecondParameter<typeof customInstance>}
882
+
883
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
884
+ export function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
885
+ productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<
886
+ UndefinedInitialDataOptions<
887
+ Awaited<ReturnType<typeof getProduct>>,
888
+ TError,
889
+ TData
890
+ > , 'initialData'
891
+ >, request?: SecondParameter<typeof customInstance>}
892
+
893
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
894
+ export function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
895
+ productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
896
+
897
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey }
663
898
  /**
664
899
  * @summary Gets a Product
665
900
  */
666
- export const useGetProduct = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
901
+
902
+ export function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
667
903
  productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
668
904
 
669
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
905
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
670
906
 
671
907
  const queryOptions = getGetProductQueryOptions(productId,options)
672
908
 
@@ -700,13 +936,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
700
936
  export type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>
701
937
  export type GetProductSuspenseQueryError = ErrorType<AsError | void>
702
938
 
939
+
940
+ export function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
941
+ productId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
942
+
943
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
944
+ export function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
945
+ productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
946
+
947
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
948
+ export function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
949
+ productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
950
+
951
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
703
952
  /**
704
953
  * @summary Gets a Product
705
954
  */
706
- export const useGetProductSuspense = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
955
+
956
+ export function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(
707
957
  productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
708
958
 
709
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
959
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
710
960
 
711
961
  const queryOptions = getGetProductSuspenseQueryOptions(productId,options)
712
962
 
@@ -737,10 +987,10 @@ export const deleteProduct = (
737
987
 
738
988
 
739
989
 
740
- export const getDeleteProductMutationOptions = <TError = ErrorType<AsError>,
990
+ export const getDeleteProductMutationOptions = <TError = ErrorType<void | AsError>,
741
991
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
742
992
  ): UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext> => {
743
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
993
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
744
994
 
745
995
 
746
996
 
@@ -754,18 +1004,23 @@ export const getDeleteProductMutationOptions = <TError = ErrorType<AsError>,
754
1004
 
755
1005
 
756
1006
 
757
- return { mutationFn, ...mutationOptions }}
1007
+ return { mutationFn, ...mutationOptions }}
758
1008
 
759
1009
  export type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>
760
1010
 
761
- export type DeleteProductMutationError = ErrorType<AsError>
1011
+ export type DeleteProductMutationError = ErrorType<void | AsError>
762
1012
 
763
1013
  /**
764
1014
  * @summary Deletes an existing Product
765
1015
  */
766
- export const useDeleteProduct = <TError = ErrorType<AsError>,
1016
+ export const useDeleteProduct = <TError = ErrorType<void | AsError>,
767
1017
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
768
- ) => {
1018
+ ): UseMutationResult<
1019
+ Awaited<ReturnType<typeof deleteProduct>>,
1020
+ TError,
1021
+ {productId: string},
1022
+ TContext
1023
+ > => {
769
1024
 
770
1025
  const mutationOptions = getDeleteProductMutationOptions(options);
771
1026
 
@@ -796,10 +1051,10 @@ export const patchProduct = (
796
1051
 
797
1052
 
798
1053
 
799
- export const getPatchProductMutationOptions = <TError = ErrorType<AsError>,
1054
+ export const getPatchProductMutationOptions = <TError = ErrorType<void | AsError>,
800
1055
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
801
1056
  ): UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext> => {
802
- const {mutation: mutationOptions, request: requestOptions} = options ?? {};
1057
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
803
1058
 
804
1059
 
805
1060
 
@@ -813,18 +1068,23 @@ export const getPatchProductMutationOptions = <TError = ErrorType<AsError>,
813
1068
 
814
1069
 
815
1070
 
816
- return { mutationFn, ...mutationOptions }}
1071
+ return { mutationFn, ...mutationOptions }}
817
1072
 
818
1073
  export type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>
819
1074
  export type PatchProductMutationBody = ProductPatchBodyBody
820
- export type PatchProductMutationError = ErrorType<AsError>
1075
+ export type PatchProductMutationError = ErrorType<void | AsError>
821
1076
 
822
1077
  /**
823
1078
  * @summary Adjust an existing Product
824
1079
  */
825
- export const usePatchProduct = <TError = ErrorType<AsError>,
1080
+ export const usePatchProduct = <TError = ErrorType<void | AsError>,
826
1081
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
827
- ) => {
1082
+ ): UseMutationResult<
1083
+ Awaited<ReturnType<typeof patchProduct>>,
1084
+ TError,
1085
+ {productId: string;data: ProductPatchBodyBody},
1086
+ TContext
1087
+ > => {
828
1088
 
829
1089
  const mutationOptions = getPatchProductMutationOptions(options);
830
1090