@squonk/account-server-client 4.4.0-4-4.2197467763 → 4.4.0-4-4.2200269934

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/api/actions/actions.cjs +4 -4
  2. package/dist/api/actions/actions.cjs.map +1 -1
  3. package/dist/api/actions/actions.d.cts +35 -17
  4. package/dist/api/actions/actions.d.cts.map +1 -1
  5. package/dist/api/actions/actions.d.ts +35 -17
  6. package/dist/api/actions/actions.d.ts.map +1 -1
  7. package/dist/api/actions/actions.fetch.cjs +4 -4
  8. package/dist/api/actions/actions.fetch.cjs.map +1 -1
  9. package/dist/api/actions/actions.fetch.d.cts +35 -17
  10. package/dist/api/actions/actions.fetch.d.cts.map +1 -1
  11. package/dist/api/actions/actions.fetch.d.ts +35 -17
  12. package/dist/api/actions/actions.fetch.d.ts.map +1 -1
  13. package/dist/api/actions/actions.fetch.js +4 -4
  14. package/dist/api/actions/actions.fetch.js.map +1 -1
  15. package/dist/api/actions/actions.js +4 -4
  16. package/dist/api/actions/actions.js.map +1 -1
  17. package/dist/api/asset/asset.cjs +22 -22
  18. package/dist/api/asset/asset.cjs.map +1 -1
  19. package/dist/api/asset/asset.d.cts +76 -40
  20. package/dist/api/asset/asset.d.cts.map +1 -1
  21. package/dist/api/asset/asset.d.ts +76 -40
  22. package/dist/api/asset/asset.d.ts.map +1 -1
  23. package/dist/api/asset/asset.fetch.cjs +22 -22
  24. package/dist/api/asset/asset.fetch.cjs.map +1 -1
  25. package/dist/api/asset/asset.fetch.d.cts +76 -40
  26. package/dist/api/asset/asset.fetch.d.cts.map +1 -1
  27. package/dist/api/asset/asset.fetch.d.ts +76 -40
  28. package/dist/api/asset/asset.fetch.d.ts.map +1 -1
  29. package/dist/api/asset/asset.fetch.js +22 -22
  30. package/dist/api/asset/asset.fetch.js.map +1 -1
  31. package/dist/api/asset/asset.js +22 -22
  32. package/dist/api/asset/asset.js.map +1 -1
  33. package/dist/api/charges/charges.cjs +16 -16
  34. package/dist/api/charges/charges.cjs.map +1 -1
  35. package/dist/api/charges/charges.d.cts +137 -65
  36. package/dist/api/charges/charges.d.cts.map +1 -1
  37. package/dist/api/charges/charges.d.ts +137 -65
  38. package/dist/api/charges/charges.d.ts.map +1 -1
  39. package/dist/api/charges/charges.fetch.cjs +16 -16
  40. package/dist/api/charges/charges.fetch.cjs.map +1 -1
  41. package/dist/api/charges/charges.fetch.d.cts +137 -65
  42. package/dist/api/charges/charges.fetch.d.cts.map +1 -1
  43. package/dist/api/charges/charges.fetch.d.ts +137 -65
  44. package/dist/api/charges/charges.fetch.d.ts.map +1 -1
  45. package/dist/api/charges/charges.fetch.js +16 -16
  46. package/dist/api/charges/charges.fetch.js.map +1 -1
  47. package/dist/api/charges/charges.js +16 -16
  48. package/dist/api/charges/charges.js.map +1 -1
  49. package/dist/api/event-stream/event-stream.cjs +12 -12
  50. package/dist/api/event-stream/event-stream.cjs.map +1 -1
  51. package/dist/api/event-stream/event-stream.d.cts +71 -35
  52. package/dist/api/event-stream/event-stream.d.cts.map +1 -1
  53. package/dist/api/event-stream/event-stream.d.ts +71 -35
  54. package/dist/api/event-stream/event-stream.d.ts.map +1 -1
  55. package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
  56. package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
  57. package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
  58. package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
  59. package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
  60. package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
  61. package/dist/api/event-stream/event-stream.fetch.js +12 -12
  62. package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
  63. package/dist/api/event-stream/event-stream.js +12 -12
  64. package/dist/api/event-stream/event-stream.js.map +1 -1
  65. package/dist/api/merchant/merchant.cjs +8 -8
  66. package/dist/api/merchant/merchant.cjs.map +1 -1
  67. package/dist/api/merchant/merchant.d.cts +69 -33
  68. package/dist/api/merchant/merchant.d.cts.map +1 -1
  69. package/dist/api/merchant/merchant.d.ts +69 -33
  70. package/dist/api/merchant/merchant.d.ts.map +1 -1
  71. package/dist/api/merchant/merchant.fetch.cjs +8 -8
  72. package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
  73. package/dist/api/merchant/merchant.fetch.d.cts +69 -33
  74. package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
  75. package/dist/api/merchant/merchant.fetch.d.ts +69 -33
  76. package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
  77. package/dist/api/merchant/merchant.fetch.js +8 -8
  78. package/dist/api/merchant/merchant.fetch.js.map +1 -1
  79. package/dist/api/merchant/merchant.js +8 -8
  80. package/dist/api/merchant/merchant.js.map +1 -1
  81. package/dist/api/organisation/organisation.cjs +18 -18
  82. package/dist/api/organisation/organisation.cjs.map +1 -1
  83. package/dist/api/organisation/organisation.d.cts +106 -52
  84. package/dist/api/organisation/organisation.d.cts.map +1 -1
  85. package/dist/api/organisation/organisation.d.ts +106 -52
  86. package/dist/api/organisation/organisation.d.ts.map +1 -1
  87. package/dist/api/organisation/organisation.fetch.cjs +18 -18
  88. package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
  89. package/dist/api/organisation/organisation.fetch.d.cts +106 -52
  90. package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
  91. package/dist/api/organisation/organisation.fetch.d.ts +106 -52
  92. package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
  93. package/dist/api/organisation/organisation.fetch.js +18 -18
  94. package/dist/api/organisation/organisation.fetch.js.map +1 -1
  95. package/dist/api/organisation/organisation.js +18 -18
  96. package/dist/api/organisation/organisation.js.map +1 -1
  97. package/dist/api/product/product.cjs +30 -30
  98. package/dist/api/product/product.cjs.map +1 -1
  99. package/dist/api/product/product.d.cts +208 -100
  100. package/dist/api/product/product.d.cts.map +1 -1
  101. package/dist/api/product/product.d.ts +208 -100
  102. package/dist/api/product/product.d.ts.map +1 -1
  103. package/dist/api/product/product.fetch.cjs +30 -30
  104. package/dist/api/product/product.fetch.cjs.map +1 -1
  105. package/dist/api/product/product.fetch.d.cts +208 -100
  106. package/dist/api/product/product.fetch.d.cts.map +1 -1
  107. package/dist/api/product/product.fetch.d.ts +208 -100
  108. package/dist/api/product/product.fetch.d.ts.map +1 -1
  109. package/dist/api/product/product.fetch.js +30 -30
  110. package/dist/api/product/product.fetch.js.map +1 -1
  111. package/dist/api/product/product.js +30 -30
  112. package/dist/api/product/product.js.map +1 -1
  113. package/dist/api/state/state.cjs +4 -4
  114. package/dist/api/state/state.cjs.map +1 -1
  115. package/dist/api/state/state.d.cts +35 -17
  116. package/dist/api/state/state.d.cts.map +1 -1
  117. package/dist/api/state/state.d.ts +35 -17
  118. package/dist/api/state/state.d.ts.map +1 -1
  119. package/dist/api/state/state.fetch.cjs +4 -4
  120. package/dist/api/state/state.fetch.cjs.map +1 -1
  121. package/dist/api/state/state.fetch.d.cts +35 -17
  122. package/dist/api/state/state.fetch.d.cts.map +1 -1
  123. package/dist/api/state/state.fetch.d.ts +35 -17
  124. package/dist/api/state/state.fetch.d.ts.map +1 -1
  125. package/dist/api/state/state.fetch.js +4 -4
  126. package/dist/api/state/state.fetch.js.map +1 -1
  127. package/dist/api/state/state.js +4 -4
  128. package/dist/api/state/state.js.map +1 -1
  129. package/dist/api/unit/unit.cjs +30 -30
  130. package/dist/api/unit/unit.cjs.map +1 -1
  131. package/dist/api/unit/unit.d.cts +144 -72
  132. package/dist/api/unit/unit.d.cts.map +1 -1
  133. package/dist/api/unit/unit.d.ts +144 -72
  134. package/dist/api/unit/unit.d.ts.map +1 -1
  135. package/dist/api/unit/unit.fetch.cjs +30 -30
  136. package/dist/api/unit/unit.fetch.cjs.map +1 -1
  137. package/dist/api/unit/unit.fetch.d.cts +144 -72
  138. package/dist/api/unit/unit.fetch.d.cts.map +1 -1
  139. package/dist/api/unit/unit.fetch.d.ts +144 -72
  140. package/dist/api/unit/unit.fetch.d.ts.map +1 -1
  141. package/dist/api/unit/unit.fetch.js +30 -30
  142. package/dist/api/unit/unit.fetch.js.map +1 -1
  143. package/dist/api/unit/unit.js +30 -30
  144. package/dist/api/unit/unit.js.map +1 -1
  145. package/dist/api/user/user.cjs +20 -20
  146. package/dist/api/user/user.cjs.map +1 -1
  147. package/dist/api/user/user.d.cts +107 -53
  148. package/dist/api/user/user.d.cts.map +1 -1
  149. package/dist/api/user/user.d.ts +107 -53
  150. package/dist/api/user/user.d.ts.map +1 -1
  151. package/dist/api/user/user.fetch.cjs +20 -20
  152. package/dist/api/user/user.fetch.cjs.map +1 -1
  153. package/dist/api/user/user.fetch.d.cts +107 -53
  154. package/dist/api/user/user.fetch.d.cts.map +1 -1
  155. package/dist/api/user/user.fetch.d.ts +107 -53
  156. package/dist/api/user/user.fetch.d.ts.map +1 -1
  157. package/dist/api/user/user.fetch.js +20 -20
  158. package/dist/api/user/user.fetch.js.map +1 -1
  159. package/dist/api/user/user.js +20 -20
  160. package/dist/api/user/user.js.map +1 -1
  161. package/package.json +7 -5
  162. package/src/api/actions/actions.fetch.ts +103 -12
  163. package/src/api/actions/actions.ts +103 -12
  164. package/src/api/asset/asset.fetch.ts +303 -94
  165. package/src/api/asset/asset.ts +303 -94
  166. package/src/api/charges/charges.fetch.ts +456 -54
  167. package/src/api/charges/charges.ts +456 -54
  168. package/src/api/event-stream/event-stream.fetch.ts +262 -58
  169. package/src/api/event-stream/event-stream.ts +262 -58
  170. package/src/api/merchant/merchant.fetch.ts +212 -28
  171. package/src/api/merchant/merchant.ts +212 -28
  172. package/src/api/organisation/organisation.fetch.ts +381 -86
  173. package/src/api/organisation/organisation.ts +381 -86
  174. package/src/api/product/product.fetch.ts +724 -130
  175. package/src/api/product/product.ts +724 -130
  176. package/src/api/state/state.fetch.ts +105 -16
  177. package/src/api/state/state.ts +105 -16
  178. package/src/api/unit/unit.fetch.ts +521 -146
  179. package/src/api/unit/unit.ts +521 -146
  180. package/src/api/user/user.fetch.ts +401 -101
  181. package/src/api/user/user.ts +401 -101
  182. package/tests/README.md +98 -0
  183. package/tests/component.test.tsx +191 -0
  184. package/tests/tsconfig.json +7 -0
  185. package/tests/type-tests.tsx +196 -0
@@ -10,11 +10,15 @@ A service that provides access to the Account Server, which gives *registered* u
10
10
  */
11
11
  import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
12
12
  import type {
13
+ DataTag,
14
+ DefinedInitialDataOptions,
15
+ DefinedUseQueryResult,
13
16
  InvalidateOptions,
14
17
  MutationFunction,
15
18
  QueryClient,
16
19
  QueryFunction,
17
20
  QueryKey,
21
+ UndefinedInitialDataOptions,
18
22
  UseMutationOptions,
19
23
  UseMutationResult,
20
24
  UseQueryOptions,
@@ -62,7 +66,7 @@ export const getGetProductTypesQueryOptions = <
62
66
  TData = Awaited<ReturnType<typeof getProductTypes>>,
63
67
  TError = ErrorType<AsError | void>,
64
68
  >(options?: {
65
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
69
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
66
70
  request?: SecondParameter<typeof customInstance>;
67
71
  }) => {
68
72
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -76,12 +80,58 @@ export const getGetProductTypesQueryOptions = <
76
80
  Awaited<ReturnType<typeof getProductTypes>>,
77
81
  TError,
78
82
  TData
79
- > & { queryKey: QueryKey };
83
+ > & { queryKey: DataTag<QueryKey, TData> };
80
84
  };
81
85
 
82
86
  export type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
83
87
  export type GetProductTypesQueryError = ErrorType<AsError | void>;
84
88
 
89
+ export function useGetProductTypes<
90
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
91
+ TError = ErrorType<AsError | void>,
92
+ >(
93
+ options: {
94
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &
95
+ Pick<
96
+ DefinedInitialDataOptions<
97
+ Awaited<ReturnType<typeof getProductTypes>>,
98
+ TError,
99
+ Awaited<ReturnType<typeof getProductTypes>>
100
+ >,
101
+ "initialData"
102
+ >;
103
+ request?: SecondParameter<typeof customInstance>;
104
+ },
105
+ queryClient?: QueryClient,
106
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
107
+ export function useGetProductTypes<
108
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
109
+ TError = ErrorType<AsError | void>,
110
+ >(
111
+ options?: {
112
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &
113
+ Pick<
114
+ UndefinedInitialDataOptions<
115
+ Awaited<ReturnType<typeof getProductTypes>>,
116
+ TError,
117
+ Awaited<ReturnType<typeof getProductTypes>>
118
+ >,
119
+ "initialData"
120
+ >;
121
+ request?: SecondParameter<typeof customInstance>;
122
+ },
123
+ queryClient?: QueryClient,
124
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
125
+ export function useGetProductTypes<
126
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
127
+ TError = ErrorType<AsError | void>,
128
+ >(
129
+ options?: {
130
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
131
+ request?: SecondParameter<typeof customInstance>;
132
+ },
133
+ queryClient?: QueryClient,
134
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
85
135
  /**
86
136
  * @summary Gets all Product Types
87
137
  */
@@ -89,13 +139,18 @@ export type GetProductTypesQueryError = ErrorType<AsError | void>;
89
139
  export function useGetProductTypes<
90
140
  TData = Awaited<ReturnType<typeof getProductTypes>>,
91
141
  TError = ErrorType<AsError | void>,
92
- >(options?: {
93
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
94
- request?: SecondParameter<typeof customInstance>;
95
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
142
+ >(
143
+ options?: {
144
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
145
+ request?: SecondParameter<typeof customInstance>;
146
+ },
147
+ queryClient?: QueryClient,
148
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
96
149
  const queryOptions = getGetProductTypesQueryOptions(options);
97
150
 
98
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
151
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
152
+ queryKey: DataTag<QueryKey, TData>;
153
+ };
99
154
 
100
155
  query.queryKey = queryOptions.queryKey;
101
156
 
@@ -118,7 +173,9 @@ export const getGetProductTypesSuspenseQueryOptions = <
118
173
  TData = Awaited<ReturnType<typeof getProductTypes>>,
119
174
  TError = ErrorType<AsError | void>,
120
175
  >(options?: {
121
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
176
+ query?: Partial<
177
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
178
+ >;
122
179
  request?: SecondParameter<typeof customInstance>;
123
180
  }) => {
124
181
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -132,7 +189,7 @@ export const getGetProductTypesSuspenseQueryOptions = <
132
189
  Awaited<ReturnType<typeof getProductTypes>>,
133
190
  TError,
134
191
  TData
135
- > & { queryKey: QueryKey };
192
+ > & { queryKey: DataTag<QueryKey, TData> };
136
193
  };
137
194
 
138
195
  export type GetProductTypesSuspenseQueryResult = NonNullable<
@@ -140,6 +197,42 @@ export type GetProductTypesSuspenseQueryResult = NonNullable<
140
197
  >;
141
198
  export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
142
199
 
200
+ export function useGetProductTypesSuspense<
201
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
202
+ TError = ErrorType<AsError | void>,
203
+ >(
204
+ options: {
205
+ query: Partial<
206
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
207
+ >;
208
+ request?: SecondParameter<typeof customInstance>;
209
+ },
210
+ queryClient?: QueryClient,
211
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
212
+ export function useGetProductTypesSuspense<
213
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
214
+ TError = ErrorType<AsError | void>,
215
+ >(
216
+ options?: {
217
+ query?: Partial<
218
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
219
+ >;
220
+ request?: SecondParameter<typeof customInstance>;
221
+ },
222
+ queryClient?: QueryClient,
223
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
224
+ export function useGetProductTypesSuspense<
225
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
226
+ TError = ErrorType<AsError | void>,
227
+ >(
228
+ options?: {
229
+ query?: Partial<
230
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
231
+ >;
232
+ request?: SecondParameter<typeof customInstance>;
233
+ },
234
+ queryClient?: QueryClient,
235
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
143
236
  /**
144
237
  * @summary Gets all Product Types
145
238
  */
@@ -147,15 +240,21 @@ export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
147
240
  export function useGetProductTypesSuspense<
148
241
  TData = Awaited<ReturnType<typeof getProductTypes>>,
149
242
  TError = ErrorType<AsError | void>,
150
- >(options?: {
151
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
152
- request?: SecondParameter<typeof customInstance>;
153
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
243
+ >(
244
+ options?: {
245
+ query?: Partial<
246
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
247
+ >;
248
+ request?: SecondParameter<typeof customInstance>;
249
+ },
250
+ queryClient?: QueryClient,
251
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
154
252
  const queryOptions = getGetProductTypesSuspenseQueryOptions(options);
155
253
 
156
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
157
- queryKey: QueryKey;
158
- };
254
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
255
+ TData,
256
+ TError
257
+ > & { queryKey: DataTag<QueryKey, TData> };
159
258
 
160
259
  query.queryKey = queryOptions.queryKey;
161
260
 
@@ -185,7 +284,9 @@ export const getGetProductDefaultStorageCostQueryOptions = <
185
284
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
186
285
  TError = ErrorType<AsError | void>,
187
286
  >(options?: {
188
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
287
+ query?: Partial<
288
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
289
+ >;
189
290
  request?: SecondParameter<typeof customInstance>;
190
291
  }) => {
191
292
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -200,7 +301,7 @@ export const getGetProductDefaultStorageCostQueryOptions = <
200
301
  Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
201
302
  TError,
202
303
  TData
203
- > & { queryKey: QueryKey };
304
+ > & { queryKey: DataTag<QueryKey, TData> };
204
305
  };
205
306
 
206
307
  export type GetProductDefaultStorageCostQueryResult = NonNullable<
@@ -208,6 +309,58 @@ export type GetProductDefaultStorageCostQueryResult = NonNullable<
208
309
  >;
209
310
  export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
210
311
 
312
+ export function useGetProductDefaultStorageCost<
313
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
314
+ TError = ErrorType<AsError | void>,
315
+ >(
316
+ options: {
317
+ query: Partial<
318
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
319
+ > &
320
+ Pick<
321
+ DefinedInitialDataOptions<
322
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
323
+ TError,
324
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>
325
+ >,
326
+ "initialData"
327
+ >;
328
+ request?: SecondParameter<typeof customInstance>;
329
+ },
330
+ queryClient?: QueryClient,
331
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
332
+ export function useGetProductDefaultStorageCost<
333
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
334
+ TError = ErrorType<AsError | void>,
335
+ >(
336
+ options?: {
337
+ query?: Partial<
338
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
339
+ > &
340
+ Pick<
341
+ UndefinedInitialDataOptions<
342
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
343
+ TError,
344
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>
345
+ >,
346
+ "initialData"
347
+ >;
348
+ request?: SecondParameter<typeof customInstance>;
349
+ },
350
+ queryClient?: QueryClient,
351
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
352
+ export function useGetProductDefaultStorageCost<
353
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
354
+ TError = ErrorType<AsError | void>,
355
+ >(
356
+ options?: {
357
+ query?: Partial<
358
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
359
+ >;
360
+ request?: SecondParameter<typeof customInstance>;
361
+ },
362
+ queryClient?: QueryClient,
363
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
211
364
  /**
212
365
  * @summary Gets the default cross-product storage cost
213
366
  */
@@ -215,13 +368,20 @@ export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
215
368
  export function useGetProductDefaultStorageCost<
216
369
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
217
370
  TError = ErrorType<AsError | void>,
218
- >(options?: {
219
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
220
- request?: SecondParameter<typeof customInstance>;
221
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
371
+ >(
372
+ options?: {
373
+ query?: Partial<
374
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
375
+ >;
376
+ request?: SecondParameter<typeof customInstance>;
377
+ },
378
+ queryClient?: QueryClient,
379
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
222
380
  const queryOptions = getGetProductDefaultStorageCostQueryOptions(options);
223
381
 
224
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
382
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
383
+ queryKey: DataTag<QueryKey, TData>;
384
+ };
225
385
 
226
386
  query.queryKey = queryOptions.queryKey;
227
387
 
@@ -247,10 +407,8 @@ export const getGetProductDefaultStorageCostSuspenseQueryOptions = <
247
407
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
248
408
  TError = ErrorType<AsError | void>,
249
409
  >(options?: {
250
- query?: UseSuspenseQueryOptions<
251
- Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
252
- TError,
253
- TData
410
+ query?: Partial<
411
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
254
412
  >;
255
413
  request?: SecondParameter<typeof customInstance>;
256
414
  }) => {
@@ -266,7 +424,7 @@ export const getGetProductDefaultStorageCostSuspenseQueryOptions = <
266
424
  Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
267
425
  TError,
268
426
  TData
269
- > & { queryKey: QueryKey };
427
+ > & { queryKey: DataTag<QueryKey, TData> };
270
428
  };
271
429
 
272
430
  export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
@@ -274,6 +432,54 @@ export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
274
432
  >;
275
433
  export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
276
434
 
435
+ export function useGetProductDefaultStorageCostSuspense<
436
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
437
+ TError = ErrorType<AsError | void>,
438
+ >(
439
+ options: {
440
+ query: Partial<
441
+ UseSuspenseQueryOptions<
442
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
443
+ TError,
444
+ TData
445
+ >
446
+ >;
447
+ request?: SecondParameter<typeof customInstance>;
448
+ },
449
+ queryClient?: QueryClient,
450
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
451
+ export function useGetProductDefaultStorageCostSuspense<
452
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
453
+ TError = ErrorType<AsError | void>,
454
+ >(
455
+ options?: {
456
+ query?: Partial<
457
+ UseSuspenseQueryOptions<
458
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
459
+ TError,
460
+ TData
461
+ >
462
+ >;
463
+ request?: SecondParameter<typeof customInstance>;
464
+ },
465
+ queryClient?: QueryClient,
466
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
467
+ export function useGetProductDefaultStorageCostSuspense<
468
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
469
+ TError = ErrorType<AsError | void>,
470
+ >(
471
+ options?: {
472
+ query?: Partial<
473
+ UseSuspenseQueryOptions<
474
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
475
+ TError,
476
+ TData
477
+ >
478
+ >;
479
+ request?: SecondParameter<typeof customInstance>;
480
+ },
481
+ queryClient?: QueryClient,
482
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
277
483
  /**
278
484
  * @summary Gets the default cross-product storage cost
279
485
  */
@@ -281,19 +487,25 @@ export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError |
281
487
  export function useGetProductDefaultStorageCostSuspense<
282
488
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
283
489
  TError = ErrorType<AsError | void>,
284
- >(options?: {
285
- query?: UseSuspenseQueryOptions<
286
- Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
287
- TError,
288
- TData
289
- >;
290
- request?: SecondParameter<typeof customInstance>;
291
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
490
+ >(
491
+ options?: {
492
+ query?: Partial<
493
+ UseSuspenseQueryOptions<
494
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
495
+ TError,
496
+ TData
497
+ >
498
+ >;
499
+ request?: SecondParameter<typeof customInstance>;
500
+ },
501
+ queryClient?: QueryClient,
502
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
292
503
  const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options);
293
504
 
294
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
295
- queryKey: QueryKey;
296
- };
505
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
506
+ TData,
507
+ TError
508
+ > & { queryKey: DataTag<QueryKey, TData> };
297
509
 
298
510
  query.queryKey = queryOptions.queryKey;
299
511
 
@@ -320,7 +532,7 @@ export const getGetProductsQueryOptions = <
320
532
  TData = Awaited<ReturnType<typeof getProducts>>,
321
533
  TError = ErrorType<AsError | void>,
322
534
  >(options?: {
323
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
535
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
324
536
  request?: SecondParameter<typeof customInstance>;
325
537
  }) => {
326
538
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -334,12 +546,58 @@ export const getGetProductsQueryOptions = <
334
546
  Awaited<ReturnType<typeof getProducts>>,
335
547
  TError,
336
548
  TData
337
- > & { queryKey: QueryKey };
549
+ > & { queryKey: DataTag<QueryKey, TData> };
338
550
  };
339
551
 
340
552
  export type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
341
553
  export type GetProductsQueryError = ErrorType<AsError | void>;
342
554
 
555
+ export function useGetProducts<
556
+ TData = Awaited<ReturnType<typeof getProducts>>,
557
+ TError = ErrorType<AsError | void>,
558
+ >(
559
+ options: {
560
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
561
+ Pick<
562
+ DefinedInitialDataOptions<
563
+ Awaited<ReturnType<typeof getProducts>>,
564
+ TError,
565
+ Awaited<ReturnType<typeof getProducts>>
566
+ >,
567
+ "initialData"
568
+ >;
569
+ request?: SecondParameter<typeof customInstance>;
570
+ },
571
+ queryClient?: QueryClient,
572
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
573
+ export function useGetProducts<
574
+ TData = Awaited<ReturnType<typeof getProducts>>,
575
+ TError = ErrorType<AsError | void>,
576
+ >(
577
+ options?: {
578
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
579
+ Pick<
580
+ UndefinedInitialDataOptions<
581
+ Awaited<ReturnType<typeof getProducts>>,
582
+ TError,
583
+ Awaited<ReturnType<typeof getProducts>>
584
+ >,
585
+ "initialData"
586
+ >;
587
+ request?: SecondParameter<typeof customInstance>;
588
+ },
589
+ queryClient?: QueryClient,
590
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
591
+ export function useGetProducts<
592
+ TData = Awaited<ReturnType<typeof getProducts>>,
593
+ TError = ErrorType<AsError | void>,
594
+ >(
595
+ options?: {
596
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
597
+ request?: SecondParameter<typeof customInstance>;
598
+ },
599
+ queryClient?: QueryClient,
600
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
343
601
  /**
344
602
  * @summary Gets all Products
345
603
  */
@@ -347,13 +605,18 @@ export type GetProductsQueryError = ErrorType<AsError | void>;
347
605
  export function useGetProducts<
348
606
  TData = Awaited<ReturnType<typeof getProducts>>,
349
607
  TError = ErrorType<AsError | void>,
350
- >(options?: {
351
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
352
- request?: SecondParameter<typeof customInstance>;
353
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
608
+ >(
609
+ options?: {
610
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
611
+ request?: SecondParameter<typeof customInstance>;
612
+ },
613
+ queryClient?: QueryClient,
614
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
354
615
  const queryOptions = getGetProductsQueryOptions(options);
355
616
 
356
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
617
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
618
+ queryKey: DataTag<QueryKey, TData>;
619
+ };
357
620
 
358
621
  query.queryKey = queryOptions.queryKey;
359
622
 
@@ -376,7 +639,7 @@ export const getGetProductsSuspenseQueryOptions = <
376
639
  TData = Awaited<ReturnType<typeof getProducts>>,
377
640
  TError = ErrorType<AsError | void>,
378
641
  >(options?: {
379
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
642
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
380
643
  request?: SecondParameter<typeof customInstance>;
381
644
  }) => {
382
645
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -390,12 +653,46 @@ export const getGetProductsSuspenseQueryOptions = <
390
653
  Awaited<ReturnType<typeof getProducts>>,
391
654
  TError,
392
655
  TData
393
- > & { queryKey: QueryKey };
656
+ > & { queryKey: DataTag<QueryKey, TData> };
394
657
  };
395
658
 
396
659
  export type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
397
660
  export type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
398
661
 
662
+ export function useGetProductsSuspense<
663
+ TData = Awaited<ReturnType<typeof getProducts>>,
664
+ TError = ErrorType<AsError | void>,
665
+ >(
666
+ options: {
667
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
668
+ request?: SecondParameter<typeof customInstance>;
669
+ },
670
+ queryClient?: QueryClient,
671
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
672
+ export function useGetProductsSuspense<
673
+ TData = Awaited<ReturnType<typeof getProducts>>,
674
+ TError = ErrorType<AsError | void>,
675
+ >(
676
+ options?: {
677
+ query?: Partial<
678
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
679
+ >;
680
+ request?: SecondParameter<typeof customInstance>;
681
+ },
682
+ queryClient?: QueryClient,
683
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
684
+ export function useGetProductsSuspense<
685
+ TData = Awaited<ReturnType<typeof getProducts>>,
686
+ TError = ErrorType<AsError | void>,
687
+ >(
688
+ options?: {
689
+ query?: Partial<
690
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
691
+ >;
692
+ request?: SecondParameter<typeof customInstance>;
693
+ },
694
+ queryClient?: QueryClient,
695
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
399
696
  /**
400
697
  * @summary Gets all Products
401
698
  */
@@ -403,15 +700,21 @@ export type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
403
700
  export function useGetProductsSuspense<
404
701
  TData = Awaited<ReturnType<typeof getProducts>>,
405
702
  TError = ErrorType<AsError | void>,
406
- >(options?: {
407
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
408
- request?: SecondParameter<typeof customInstance>;
409
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
703
+ >(
704
+ options?: {
705
+ query?: Partial<
706
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
707
+ >;
708
+ request?: SecondParameter<typeof customInstance>;
709
+ },
710
+ queryClient?: QueryClient,
711
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
410
712
  const queryOptions = getGetProductsSuspenseQueryOptions(options);
411
713
 
412
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
413
- queryKey: QueryKey;
414
- };
714
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
715
+ TData,
716
+ TError
717
+ > & { queryKey: DataTag<QueryKey, TData> };
415
718
 
416
719
  query.queryKey = queryOptions.queryKey;
417
720
 
@@ -444,7 +747,9 @@ export const getGetProductsForOrganisationQueryOptions = <
444
747
  >(
445
748
  orgId: string,
446
749
  options?: {
447
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
750
+ query?: Partial<
751
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
752
+ >;
448
753
  request?: SecondParameter<typeof customInstance>;
449
754
  },
450
755
  ) => {
@@ -460,7 +765,7 @@ export const getGetProductsForOrganisationQueryOptions = <
460
765
  Awaited<ReturnType<typeof getProductsForOrganisation>>,
461
766
  TError,
462
767
  TData
463
- > & { queryKey: QueryKey };
768
+ > & { queryKey: DataTag<QueryKey, TData> };
464
769
  };
465
770
 
466
771
  export type GetProductsForOrganisationQueryResult = NonNullable<
@@ -468,6 +773,61 @@ export type GetProductsForOrganisationQueryResult = NonNullable<
468
773
  >;
469
774
  export type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
470
775
 
776
+ export function useGetProductsForOrganisation<
777
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
778
+ TError = ErrorType<void | AsError>,
779
+ >(
780
+ orgId: string,
781
+ options: {
782
+ query: Partial<
783
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
784
+ > &
785
+ Pick<
786
+ DefinedInitialDataOptions<
787
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
788
+ TError,
789
+ Awaited<ReturnType<typeof getProductsForOrganisation>>
790
+ >,
791
+ "initialData"
792
+ >;
793
+ request?: SecondParameter<typeof customInstance>;
794
+ },
795
+ queryClient?: QueryClient,
796
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
797
+ export function useGetProductsForOrganisation<
798
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
799
+ TError = ErrorType<void | AsError>,
800
+ >(
801
+ orgId: string,
802
+ options?: {
803
+ query?: Partial<
804
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
805
+ > &
806
+ Pick<
807
+ UndefinedInitialDataOptions<
808
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
809
+ TError,
810
+ Awaited<ReturnType<typeof getProductsForOrganisation>>
811
+ >,
812
+ "initialData"
813
+ >;
814
+ request?: SecondParameter<typeof customInstance>;
815
+ },
816
+ queryClient?: QueryClient,
817
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
818
+ export function useGetProductsForOrganisation<
819
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
820
+ TError = ErrorType<void | AsError>,
821
+ >(
822
+ orgId: string,
823
+ options?: {
824
+ query?: Partial<
825
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
826
+ >;
827
+ request?: SecondParameter<typeof customInstance>;
828
+ },
829
+ queryClient?: QueryClient,
830
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
471
831
  /**
472
832
  * @summary Gets Products for an Organisation
473
833
  */
@@ -478,13 +838,18 @@ export function useGetProductsForOrganisation<
478
838
  >(
479
839
  orgId: string,
480
840
  options?: {
481
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
841
+ query?: Partial<
842
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
843
+ >;
482
844
  request?: SecondParameter<typeof customInstance>;
483
845
  },
484
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
846
+ queryClient?: QueryClient,
847
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
485
848
  const queryOptions = getGetProductsForOrganisationQueryOptions(orgId, options);
486
849
 
487
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
850
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
851
+ queryKey: DataTag<QueryKey, TData>;
852
+ };
488
853
 
489
854
  query.queryKey = queryOptions.queryKey;
490
855
 
@@ -513,10 +878,8 @@ export const getGetProductsForOrganisationSuspenseQueryOptions = <
513
878
  >(
514
879
  orgId: string,
515
880
  options?: {
516
- query?: UseSuspenseQueryOptions<
517
- Awaited<ReturnType<typeof getProductsForOrganisation>>,
518
- TError,
519
- TData
881
+ query?: Partial<
882
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
520
883
  >;
521
884
  request?: SecondParameter<typeof customInstance>;
522
885
  },
@@ -533,7 +896,7 @@ export const getGetProductsForOrganisationSuspenseQueryOptions = <
533
896
  Awaited<ReturnType<typeof getProductsForOrganisation>>,
534
897
  TError,
535
898
  TData
536
- > & { queryKey: QueryKey };
899
+ > & { queryKey: DataTag<QueryKey, TData> };
537
900
  };
538
901
 
539
902
  export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
@@ -541,6 +904,45 @@ export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
541
904
  >;
542
905
  export type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
543
906
 
907
+ export function useGetProductsForOrganisationSuspense<
908
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
909
+ TError = ErrorType<void | AsError>,
910
+ >(
911
+ orgId: string,
912
+ options: {
913
+ query: Partial<
914
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
915
+ >;
916
+ request?: SecondParameter<typeof customInstance>;
917
+ },
918
+ queryClient?: QueryClient,
919
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
920
+ export function useGetProductsForOrganisationSuspense<
921
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
922
+ TError = ErrorType<void | AsError>,
923
+ >(
924
+ orgId: string,
925
+ options?: {
926
+ query?: Partial<
927
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
928
+ >;
929
+ request?: SecondParameter<typeof customInstance>;
930
+ },
931
+ queryClient?: QueryClient,
932
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
933
+ export function useGetProductsForOrganisationSuspense<
934
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
935
+ TError = ErrorType<void | AsError>,
936
+ >(
937
+ orgId: string,
938
+ options?: {
939
+ query?: Partial<
940
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
941
+ >;
942
+ request?: SecondParameter<typeof customInstance>;
943
+ },
944
+ queryClient?: QueryClient,
945
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
544
946
  /**
545
947
  * @summary Gets Products for an Organisation
546
948
  */
@@ -551,19 +953,19 @@ export function useGetProductsForOrganisationSuspense<
551
953
  >(
552
954
  orgId: string,
553
955
  options?: {
554
- query?: UseSuspenseQueryOptions<
555
- Awaited<ReturnType<typeof getProductsForOrganisation>>,
556
- TError,
557
- TData
956
+ query?: Partial<
957
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
558
958
  >;
559
959
  request?: SecondParameter<typeof customInstance>;
560
960
  },
561
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
961
+ queryClient?: QueryClient,
962
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
562
963
  const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId, options);
563
964
 
564
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
565
- queryKey: QueryKey;
566
- };
965
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
966
+ TData,
967
+ TError
968
+ > & { queryKey: DataTag<QueryKey, TData> };
567
969
 
568
970
  query.queryKey = queryOptions.queryKey;
569
971
 
@@ -646,18 +1048,18 @@ export type CreateUnitProductMutationError = ErrorType<AsError | void>;
646
1048
  /**
647
1049
  * @summary Creates a Product for a Unit
648
1050
  */
649
- export const useCreateUnitProduct = <
650
- TError = ErrorType<AsError | void>,
651
- TContext = unknown,
652
- >(options?: {
653
- mutation?: UseMutationOptions<
654
- Awaited<ReturnType<typeof createUnitProduct>>,
655
- TError,
656
- { unitId: string; data: UnitProductPostBodyBody },
657
- TContext
658
- >;
659
- request?: SecondParameter<typeof customInstance>;
660
- }): UseMutationResult<
1051
+ export const useCreateUnitProduct = <TError = ErrorType<AsError | void>, TContext = unknown>(
1052
+ options?: {
1053
+ mutation?: UseMutationOptions<
1054
+ Awaited<ReturnType<typeof createUnitProduct>>,
1055
+ TError,
1056
+ { unitId: string; data: UnitProductPostBodyBody },
1057
+ TContext
1058
+ >;
1059
+ request?: SecondParameter<typeof customInstance>;
1060
+ },
1061
+ queryClient?: QueryClient,
1062
+ ): UseMutationResult<
661
1063
  Awaited<ReturnType<typeof createUnitProduct>>,
662
1064
  TError,
663
1065
  { unitId: string; data: UnitProductPostBodyBody },
@@ -665,7 +1067,7 @@ export const useCreateUnitProduct = <
665
1067
  > => {
666
1068
  const mutationOptions = getCreateUnitProductMutationOptions(options);
667
1069
 
668
- return useMutation(mutationOptions);
1070
+ return useMutation(mutationOptions, queryClient);
669
1071
  };
670
1072
  /**
671
1073
  * Gets products you have access to based on an Organisational **Unit**
@@ -693,7 +1095,7 @@ export const getGetProductsForUnitQueryOptions = <
693
1095
  >(
694
1096
  unitId: string,
695
1097
  options?: {
696
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1098
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
697
1099
  request?: SecondParameter<typeof customInstance>;
698
1100
  },
699
1101
  ) => {
@@ -708,7 +1110,7 @@ export const getGetProductsForUnitQueryOptions = <
708
1110
  Awaited<ReturnType<typeof getProductsForUnit>>,
709
1111
  TError,
710
1112
  TData
711
- > & { queryKey: QueryKey };
1113
+ > & { queryKey: DataTag<QueryKey, TData> };
712
1114
  };
713
1115
 
714
1116
  export type GetProductsForUnitQueryResult = NonNullable<
@@ -716,6 +1118,57 @@ export type GetProductsForUnitQueryResult = NonNullable<
716
1118
  >;
717
1119
  export type GetProductsForUnitQueryError = ErrorType<void | AsError>;
718
1120
 
1121
+ export function useGetProductsForUnit<
1122
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1123
+ TError = ErrorType<void | AsError>,
1124
+ >(
1125
+ unitId: string,
1126
+ options: {
1127
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> &
1128
+ Pick<
1129
+ DefinedInitialDataOptions<
1130
+ Awaited<ReturnType<typeof getProductsForUnit>>,
1131
+ TError,
1132
+ Awaited<ReturnType<typeof getProductsForUnit>>
1133
+ >,
1134
+ "initialData"
1135
+ >;
1136
+ request?: SecondParameter<typeof customInstance>;
1137
+ },
1138
+ queryClient?: QueryClient,
1139
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1140
+ export function useGetProductsForUnit<
1141
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1142
+ TError = ErrorType<void | AsError>,
1143
+ >(
1144
+ unitId: string,
1145
+ options?: {
1146
+ query?: Partial<
1147
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1148
+ > &
1149
+ Pick<
1150
+ UndefinedInitialDataOptions<
1151
+ Awaited<ReturnType<typeof getProductsForUnit>>,
1152
+ TError,
1153
+ Awaited<ReturnType<typeof getProductsForUnit>>
1154
+ >,
1155
+ "initialData"
1156
+ >;
1157
+ request?: SecondParameter<typeof customInstance>;
1158
+ },
1159
+ queryClient?: QueryClient,
1160
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1161
+ export function useGetProductsForUnit<
1162
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1163
+ TError = ErrorType<void | AsError>,
1164
+ >(
1165
+ unitId: string,
1166
+ options?: {
1167
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
1168
+ request?: SecondParameter<typeof customInstance>;
1169
+ },
1170
+ queryClient?: QueryClient,
1171
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
719
1172
  /**
720
1173
  * @summary Gets Products for an Organisational Unit
721
1174
  */
@@ -726,13 +1179,16 @@ export function useGetProductsForUnit<
726
1179
  >(
727
1180
  unitId: string,
728
1181
  options?: {
729
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1182
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
730
1183
  request?: SecondParameter<typeof customInstance>;
731
1184
  },
732
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
1185
+ queryClient?: QueryClient,
1186
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
733
1187
  const queryOptions = getGetProductsForUnitQueryOptions(unitId, options);
734
1188
 
735
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
1189
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1190
+ queryKey: DataTag<QueryKey, TData>;
1191
+ };
736
1192
 
737
1193
  query.queryKey = queryOptions.queryKey;
738
1194
 
@@ -758,7 +1214,9 @@ export const getGetProductsForUnitSuspenseQueryOptions = <
758
1214
  >(
759
1215
  unitId: string,
760
1216
  options?: {
761
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1217
+ query?: Partial<
1218
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1219
+ >;
762
1220
  request?: SecondParameter<typeof customInstance>;
763
1221
  },
764
1222
  ) => {
@@ -773,7 +1231,7 @@ export const getGetProductsForUnitSuspenseQueryOptions = <
773
1231
  Awaited<ReturnType<typeof getProductsForUnit>>,
774
1232
  TError,
775
1233
  TData
776
- > & { queryKey: QueryKey };
1234
+ > & { queryKey: DataTag<QueryKey, TData> };
777
1235
  };
778
1236
 
779
1237
  export type GetProductsForUnitSuspenseQueryResult = NonNullable<
@@ -781,6 +1239,45 @@ export type GetProductsForUnitSuspenseQueryResult = NonNullable<
781
1239
  >;
782
1240
  export type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
783
1241
 
1242
+ export function useGetProductsForUnitSuspense<
1243
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1244
+ TError = ErrorType<void | AsError>,
1245
+ >(
1246
+ unitId: string,
1247
+ options: {
1248
+ query: Partial<
1249
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1250
+ >;
1251
+ request?: SecondParameter<typeof customInstance>;
1252
+ },
1253
+ queryClient?: QueryClient,
1254
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1255
+ export function useGetProductsForUnitSuspense<
1256
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1257
+ TError = ErrorType<void | AsError>,
1258
+ >(
1259
+ unitId: string,
1260
+ options?: {
1261
+ query?: Partial<
1262
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1263
+ >;
1264
+ request?: SecondParameter<typeof customInstance>;
1265
+ },
1266
+ queryClient?: QueryClient,
1267
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1268
+ export function useGetProductsForUnitSuspense<
1269
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1270
+ TError = ErrorType<void | AsError>,
1271
+ >(
1272
+ unitId: string,
1273
+ options?: {
1274
+ query?: Partial<
1275
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1276
+ >;
1277
+ request?: SecondParameter<typeof customInstance>;
1278
+ },
1279
+ queryClient?: QueryClient,
1280
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
784
1281
  /**
785
1282
  * @summary Gets Products for an Organisational Unit
786
1283
  */
@@ -791,15 +1288,19 @@ export function useGetProductsForUnitSuspense<
791
1288
  >(
792
1289
  unitId: string,
793
1290
  options?: {
794
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1291
+ query?: Partial<
1292
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1293
+ >;
795
1294
  request?: SecondParameter<typeof customInstance>;
796
1295
  },
797
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
1296
+ queryClient?: QueryClient,
1297
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
798
1298
  const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId, options);
799
1299
 
800
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
801
- queryKey: QueryKey;
802
- };
1300
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1301
+ TData,
1302
+ TError
1303
+ > & { queryKey: DataTag<QueryKey, TData> };
803
1304
 
804
1305
  query.queryKey = queryOptions.queryKey;
805
1306
 
@@ -832,7 +1333,7 @@ export const getGetProductQueryOptions = <
832
1333
  >(
833
1334
  productId: string,
834
1335
  options?: {
835
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1336
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
836
1337
  request?: SecondParameter<typeof customInstance>;
837
1338
  },
838
1339
  ) => {
@@ -847,12 +1348,61 @@ export const getGetProductQueryOptions = <
847
1348
  Awaited<ReturnType<typeof getProduct>>,
848
1349
  TError,
849
1350
  TData
850
- > & { queryKey: QueryKey };
1351
+ > & { queryKey: DataTag<QueryKey, TData> };
851
1352
  };
852
1353
 
853
1354
  export type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
854
1355
  export type GetProductQueryError = ErrorType<AsError | void>;
855
1356
 
1357
+ export function useGetProduct<
1358
+ TData = Awaited<ReturnType<typeof getProduct>>,
1359
+ TError = ErrorType<AsError | void>,
1360
+ >(
1361
+ productId: string,
1362
+ options: {
1363
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
1364
+ Pick<
1365
+ DefinedInitialDataOptions<
1366
+ Awaited<ReturnType<typeof getProduct>>,
1367
+ TError,
1368
+ Awaited<ReturnType<typeof getProduct>>
1369
+ >,
1370
+ "initialData"
1371
+ >;
1372
+ request?: SecondParameter<typeof customInstance>;
1373
+ },
1374
+ queryClient?: QueryClient,
1375
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1376
+ export function useGetProduct<
1377
+ TData = Awaited<ReturnType<typeof getProduct>>,
1378
+ TError = ErrorType<AsError | void>,
1379
+ >(
1380
+ productId: string,
1381
+ options?: {
1382
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
1383
+ Pick<
1384
+ UndefinedInitialDataOptions<
1385
+ Awaited<ReturnType<typeof getProduct>>,
1386
+ TError,
1387
+ Awaited<ReturnType<typeof getProduct>>
1388
+ >,
1389
+ "initialData"
1390
+ >;
1391
+ request?: SecondParameter<typeof customInstance>;
1392
+ },
1393
+ queryClient?: QueryClient,
1394
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1395
+ export function useGetProduct<
1396
+ TData = Awaited<ReturnType<typeof getProduct>>,
1397
+ TError = ErrorType<AsError | void>,
1398
+ >(
1399
+ productId: string,
1400
+ options?: {
1401
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1402
+ request?: SecondParameter<typeof customInstance>;
1403
+ },
1404
+ queryClient?: QueryClient,
1405
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
856
1406
  /**
857
1407
  * @summary Gets a Product
858
1408
  */
@@ -863,13 +1413,16 @@ export function useGetProduct<
863
1413
  >(
864
1414
  productId: string,
865
1415
  options?: {
866
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1416
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
867
1417
  request?: SecondParameter<typeof customInstance>;
868
1418
  },
869
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
1419
+ queryClient?: QueryClient,
1420
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
870
1421
  const queryOptions = getGetProductQueryOptions(productId, options);
871
1422
 
872
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
1423
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1424
+ queryKey: DataTag<QueryKey, TData>;
1425
+ };
873
1426
 
874
1427
  query.queryKey = queryOptions.queryKey;
875
1428
 
@@ -895,7 +1448,7 @@ export const getGetProductSuspenseQueryOptions = <
895
1448
  >(
896
1449
  productId: string,
897
1450
  options?: {
898
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1451
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
899
1452
  request?: SecondParameter<typeof customInstance>;
900
1453
  },
901
1454
  ) => {
@@ -910,12 +1463,45 @@ export const getGetProductSuspenseQueryOptions = <
910
1463
  Awaited<ReturnType<typeof getProduct>>,
911
1464
  TError,
912
1465
  TData
913
- > & { queryKey: QueryKey };
1466
+ > & { queryKey: DataTag<QueryKey, TData> };
914
1467
  };
915
1468
 
916
1469
  export type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
917
1470
  export type GetProductSuspenseQueryError = ErrorType<AsError | void>;
918
1471
 
1472
+ export function useGetProductSuspense<
1473
+ TData = Awaited<ReturnType<typeof getProduct>>,
1474
+ TError = ErrorType<AsError | void>,
1475
+ >(
1476
+ productId: string,
1477
+ options: {
1478
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1479
+ request?: SecondParameter<typeof customInstance>;
1480
+ },
1481
+ queryClient?: QueryClient,
1482
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1483
+ export function useGetProductSuspense<
1484
+ TData = Awaited<ReturnType<typeof getProduct>>,
1485
+ TError = ErrorType<AsError | void>,
1486
+ >(
1487
+ productId: string,
1488
+ options?: {
1489
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1490
+ request?: SecondParameter<typeof customInstance>;
1491
+ },
1492
+ queryClient?: QueryClient,
1493
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1494
+ export function useGetProductSuspense<
1495
+ TData = Awaited<ReturnType<typeof getProduct>>,
1496
+ TError = ErrorType<AsError | void>,
1497
+ >(
1498
+ productId: string,
1499
+ options?: {
1500
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1501
+ request?: SecondParameter<typeof customInstance>;
1502
+ },
1503
+ queryClient?: QueryClient,
1504
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
919
1505
  /**
920
1506
  * @summary Gets a Product
921
1507
  */
@@ -926,15 +1512,17 @@ export function useGetProductSuspense<
926
1512
  >(
927
1513
  productId: string,
928
1514
  options?: {
929
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1515
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
930
1516
  request?: SecondParameter<typeof customInstance>;
931
1517
  },
932
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
1518
+ queryClient?: QueryClient,
1519
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
933
1520
  const queryOptions = getGetProductSuspenseQueryOptions(productId, options);
934
1521
 
935
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
936
- queryKey: QueryKey;
937
- };
1522
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1523
+ TData,
1524
+ TError
1525
+ > & { queryKey: DataTag<QueryKey, TData> };
938
1526
 
939
1527
  query.queryKey = queryOptions.queryKey;
940
1528
 
@@ -996,15 +1584,18 @@ export type DeleteProductMutationError = ErrorType<void | AsError>;
996
1584
  /**
997
1585
  * @summary Deletes an existing Product
998
1586
  */
999
- export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
1000
- mutation?: UseMutationOptions<
1001
- Awaited<ReturnType<typeof deleteProduct>>,
1002
- TError,
1003
- { productId: string },
1004
- TContext
1005
- >;
1006
- request?: SecondParameter<typeof customInstance>;
1007
- }): UseMutationResult<
1587
+ export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
1588
+ options?: {
1589
+ mutation?: UseMutationOptions<
1590
+ Awaited<ReturnType<typeof deleteProduct>>,
1591
+ TError,
1592
+ { productId: string },
1593
+ TContext
1594
+ >;
1595
+ request?: SecondParameter<typeof customInstance>;
1596
+ },
1597
+ queryClient?: QueryClient,
1598
+ ): UseMutationResult<
1008
1599
  Awaited<ReturnType<typeof deleteProduct>>,
1009
1600
  TError,
1010
1601
  { productId: string },
@@ -1012,7 +1603,7 @@ export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext =
1012
1603
  > => {
1013
1604
  const mutationOptions = getDeleteProductMutationOptions(options);
1014
1605
 
1015
- return useMutation(mutationOptions);
1606
+ return useMutation(mutationOptions, queryClient);
1016
1607
  };
1017
1608
  /**
1018
1609
  * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
@@ -1082,15 +1673,18 @@ export type PatchProductMutationError = ErrorType<void | AsError>;
1082
1673
  /**
1083
1674
  * @summary Adjust an existing Product
1084
1675
  */
1085
- export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
1086
- mutation?: UseMutationOptions<
1087
- Awaited<ReturnType<typeof patchProduct>>,
1088
- TError,
1089
- { productId: string; data: ProductPatchBodyBody },
1090
- TContext
1091
- >;
1092
- request?: SecondParameter<typeof customInstance>;
1093
- }): UseMutationResult<
1676
+ export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
1677
+ options?: {
1678
+ mutation?: UseMutationOptions<
1679
+ Awaited<ReturnType<typeof patchProduct>>,
1680
+ TError,
1681
+ { productId: string; data: ProductPatchBodyBody },
1682
+ TContext
1683
+ >;
1684
+ request?: SecondParameter<typeof customInstance>;
1685
+ },
1686
+ queryClient?: QueryClient,
1687
+ ): UseMutationResult<
1094
1688
  Awaited<ReturnType<typeof patchProduct>>,
1095
1689
  TError,
1096
1690
  { productId: string; data: ProductPatchBodyBody },
@@ -1098,5 +1692,5 @@ export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = u
1098
1692
  > => {
1099
1693
  const mutationOptions = getPatchProductMutationOptions(options);
1100
1694
 
1101
- return useMutation(mutationOptions);
1695
+ return useMutation(mutationOptions, queryClient);
1102
1696
  };