@squonk/account-server-client 4.4.0-4-4.2197069952 → 4.4.0-4-4.2199390673

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,
@@ -80,7 +84,7 @@ export const getGetProductTypesQueryOptions = <
80
84
  TData = Awaited<ReturnType<typeof getProductTypes>>,
81
85
  TError = ErrorType<AsError | void>,
82
86
  >(options?: {
83
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
87
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
84
88
  request?: SecondParameter<typeof customFetch>;
85
89
  }) => {
86
90
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -94,12 +98,58 @@ export const getGetProductTypesQueryOptions = <
94
98
  Awaited<ReturnType<typeof getProductTypes>>,
95
99
  TError,
96
100
  TData
97
- > & { queryKey: QueryKey };
101
+ > & { queryKey: DataTag<QueryKey, TData> };
98
102
  };
99
103
 
100
104
  export type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
101
105
  export type GetProductTypesQueryError = ErrorType<AsError | void>;
102
106
 
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
+ DefinedInitialDataOptions<
115
+ Awaited<ReturnType<typeof getProductTypes>>,
116
+ TError,
117
+ Awaited<ReturnType<typeof getProductTypes>>
118
+ >,
119
+ "initialData"
120
+ >;
121
+ request?: SecondParameter<typeof customFetch>;
122
+ },
123
+ queryClient?: QueryClient,
124
+ ): DefinedUseQueryResult<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
+ Pick<
132
+ UndefinedInitialDataOptions<
133
+ Awaited<ReturnType<typeof getProductTypes>>,
134
+ TError,
135
+ Awaited<ReturnType<typeof getProductTypes>>
136
+ >,
137
+ "initialData"
138
+ >;
139
+ request?: SecondParameter<typeof customFetch>;
140
+ },
141
+ queryClient?: QueryClient,
142
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
143
+ export function useGetProductTypes<
144
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
145
+ TError = ErrorType<AsError | void>,
146
+ >(
147
+ options?: {
148
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
149
+ request?: SecondParameter<typeof customFetch>;
150
+ },
151
+ queryClient?: QueryClient,
152
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
103
153
  /**
104
154
  * @summary Gets all Product Types
105
155
  */
@@ -107,13 +157,18 @@ export type GetProductTypesQueryError = ErrorType<AsError | void>;
107
157
  export function useGetProductTypes<
108
158
  TData = Awaited<ReturnType<typeof getProductTypes>>,
109
159
  TError = ErrorType<AsError | void>,
110
- >(options?: {
111
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
112
- request?: SecondParameter<typeof customFetch>;
113
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
160
+ >(
161
+ options?: {
162
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
163
+ request?: SecondParameter<typeof customFetch>;
164
+ },
165
+ queryClient?: QueryClient,
166
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
114
167
  const queryOptions = getGetProductTypesQueryOptions(options);
115
168
 
116
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
169
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
170
+ queryKey: DataTag<QueryKey, TData>;
171
+ };
117
172
 
118
173
  query.queryKey = queryOptions.queryKey;
119
174
 
@@ -136,7 +191,9 @@ export const getGetProductTypesSuspenseQueryOptions = <
136
191
  TData = Awaited<ReturnType<typeof getProductTypes>>,
137
192
  TError = ErrorType<AsError | void>,
138
193
  >(options?: {
139
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
194
+ query?: Partial<
195
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
196
+ >;
140
197
  request?: SecondParameter<typeof customFetch>;
141
198
  }) => {
142
199
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -150,7 +207,7 @@ export const getGetProductTypesSuspenseQueryOptions = <
150
207
  Awaited<ReturnType<typeof getProductTypes>>,
151
208
  TError,
152
209
  TData
153
- > & { queryKey: QueryKey };
210
+ > & { queryKey: DataTag<QueryKey, TData> };
154
211
  };
155
212
 
156
213
  export type GetProductTypesSuspenseQueryResult = NonNullable<
@@ -158,6 +215,42 @@ export type GetProductTypesSuspenseQueryResult = NonNullable<
158
215
  >;
159
216
  export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
160
217
 
218
+ export function useGetProductTypesSuspense<
219
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
220
+ TError = ErrorType<AsError | void>,
221
+ >(
222
+ options: {
223
+ query: Partial<
224
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
225
+ >;
226
+ request?: SecondParameter<typeof customFetch>;
227
+ },
228
+ queryClient?: QueryClient,
229
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
230
+ export function useGetProductTypesSuspense<
231
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
232
+ TError = ErrorType<AsError | void>,
233
+ >(
234
+ options?: {
235
+ query?: Partial<
236
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
237
+ >;
238
+ request?: SecondParameter<typeof customFetch>;
239
+ },
240
+ queryClient?: QueryClient,
241
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
242
+ export function useGetProductTypesSuspense<
243
+ TData = Awaited<ReturnType<typeof getProductTypes>>,
244
+ TError = ErrorType<AsError | void>,
245
+ >(
246
+ options?: {
247
+ query?: Partial<
248
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
249
+ >;
250
+ request?: SecondParameter<typeof customFetch>;
251
+ },
252
+ queryClient?: QueryClient,
253
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
161
254
  /**
162
255
  * @summary Gets all Product Types
163
256
  */
@@ -165,15 +258,21 @@ export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
165
258
  export function useGetProductTypesSuspense<
166
259
  TData = Awaited<ReturnType<typeof getProductTypes>>,
167
260
  TError = ErrorType<AsError | void>,
168
- >(options?: {
169
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
170
- request?: SecondParameter<typeof customFetch>;
171
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
261
+ >(
262
+ options?: {
263
+ query?: Partial<
264
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
265
+ >;
266
+ request?: SecondParameter<typeof customFetch>;
267
+ },
268
+ queryClient?: QueryClient,
269
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
172
270
  const queryOptions = getGetProductTypesSuspenseQueryOptions(options);
173
271
 
174
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
175
- queryKey: QueryKey;
176
- };
272
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
273
+ TData,
274
+ TError
275
+ > & { queryKey: DataTag<QueryKey, TData> };
177
276
 
178
277
  query.queryKey = queryOptions.queryKey;
179
278
 
@@ -229,7 +328,9 @@ export const getGetProductDefaultStorageCostQueryOptions = <
229
328
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
230
329
  TError = ErrorType<AsError | void>,
231
330
  >(options?: {
232
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
331
+ query?: Partial<
332
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
333
+ >;
233
334
  request?: SecondParameter<typeof customFetch>;
234
335
  }) => {
235
336
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -244,7 +345,7 @@ export const getGetProductDefaultStorageCostQueryOptions = <
244
345
  Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
245
346
  TError,
246
347
  TData
247
- > & { queryKey: QueryKey };
348
+ > & { queryKey: DataTag<QueryKey, TData> };
248
349
  };
249
350
 
250
351
  export type GetProductDefaultStorageCostQueryResult = NonNullable<
@@ -252,6 +353,58 @@ export type GetProductDefaultStorageCostQueryResult = NonNullable<
252
353
  >;
253
354
  export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
254
355
 
356
+ export function useGetProductDefaultStorageCost<
357
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
358
+ TError = ErrorType<AsError | void>,
359
+ >(
360
+ options: {
361
+ query: Partial<
362
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
363
+ > &
364
+ Pick<
365
+ DefinedInitialDataOptions<
366
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
367
+ TError,
368
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>
369
+ >,
370
+ "initialData"
371
+ >;
372
+ request?: SecondParameter<typeof customFetch>;
373
+ },
374
+ queryClient?: QueryClient,
375
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
376
+ export function useGetProductDefaultStorageCost<
377
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
378
+ TError = ErrorType<AsError | void>,
379
+ >(
380
+ options?: {
381
+ query?: Partial<
382
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
383
+ > &
384
+ Pick<
385
+ UndefinedInitialDataOptions<
386
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
387
+ TError,
388
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>
389
+ >,
390
+ "initialData"
391
+ >;
392
+ request?: SecondParameter<typeof customFetch>;
393
+ },
394
+ queryClient?: QueryClient,
395
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
396
+ export function useGetProductDefaultStorageCost<
397
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
398
+ TError = ErrorType<AsError | void>,
399
+ >(
400
+ options?: {
401
+ query?: Partial<
402
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
403
+ >;
404
+ request?: SecondParameter<typeof customFetch>;
405
+ },
406
+ queryClient?: QueryClient,
407
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
255
408
  /**
256
409
  * @summary Gets the default cross-product storage cost
257
410
  */
@@ -259,13 +412,20 @@ export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
259
412
  export function useGetProductDefaultStorageCost<
260
413
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
261
414
  TError = ErrorType<AsError | void>,
262
- >(options?: {
263
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
264
- request?: SecondParameter<typeof customFetch>;
265
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
415
+ >(
416
+ options?: {
417
+ query?: Partial<
418
+ UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
419
+ >;
420
+ request?: SecondParameter<typeof customFetch>;
421
+ },
422
+ queryClient?: QueryClient,
423
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
266
424
  const queryOptions = getGetProductDefaultStorageCostQueryOptions(options);
267
425
 
268
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
426
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
427
+ queryKey: DataTag<QueryKey, TData>;
428
+ };
269
429
 
270
430
  query.queryKey = queryOptions.queryKey;
271
431
 
@@ -291,10 +451,8 @@ export const getGetProductDefaultStorageCostSuspenseQueryOptions = <
291
451
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
292
452
  TError = ErrorType<AsError | void>,
293
453
  >(options?: {
294
- query?: UseSuspenseQueryOptions<
295
- Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
296
- TError,
297
- TData
454
+ query?: Partial<
455
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
298
456
  >;
299
457
  request?: SecondParameter<typeof customFetch>;
300
458
  }) => {
@@ -310,7 +468,7 @@ export const getGetProductDefaultStorageCostSuspenseQueryOptions = <
310
468
  Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
311
469
  TError,
312
470
  TData
313
- > & { queryKey: QueryKey };
471
+ > & { queryKey: DataTag<QueryKey, TData> };
314
472
  };
315
473
 
316
474
  export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
@@ -318,6 +476,54 @@ export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
318
476
  >;
319
477
  export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
320
478
 
479
+ export function useGetProductDefaultStorageCostSuspense<
480
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
481
+ TError = ErrorType<AsError | void>,
482
+ >(
483
+ options: {
484
+ query: Partial<
485
+ UseSuspenseQueryOptions<
486
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
487
+ TError,
488
+ TData
489
+ >
490
+ >;
491
+ request?: SecondParameter<typeof customFetch>;
492
+ },
493
+ queryClient?: QueryClient,
494
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
495
+ export function useGetProductDefaultStorageCostSuspense<
496
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
497
+ TError = ErrorType<AsError | void>,
498
+ >(
499
+ options?: {
500
+ query?: Partial<
501
+ UseSuspenseQueryOptions<
502
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
503
+ TError,
504
+ TData
505
+ >
506
+ >;
507
+ request?: SecondParameter<typeof customFetch>;
508
+ },
509
+ queryClient?: QueryClient,
510
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
511
+ export function useGetProductDefaultStorageCostSuspense<
512
+ TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
513
+ TError = ErrorType<AsError | void>,
514
+ >(
515
+ options?: {
516
+ query?: Partial<
517
+ UseSuspenseQueryOptions<
518
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
519
+ TError,
520
+ TData
521
+ >
522
+ >;
523
+ request?: SecondParameter<typeof customFetch>;
524
+ },
525
+ queryClient?: QueryClient,
526
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
321
527
  /**
322
528
  * @summary Gets the default cross-product storage cost
323
529
  */
@@ -325,19 +531,25 @@ export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError |
325
531
  export function useGetProductDefaultStorageCostSuspense<
326
532
  TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
327
533
  TError = ErrorType<AsError | void>,
328
- >(options?: {
329
- query?: UseSuspenseQueryOptions<
330
- Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
331
- TError,
332
- TData
333
- >;
334
- request?: SecondParameter<typeof customFetch>;
335
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
534
+ >(
535
+ options?: {
536
+ query?: Partial<
537
+ UseSuspenseQueryOptions<
538
+ Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
539
+ TError,
540
+ TData
541
+ >
542
+ >;
543
+ request?: SecondParameter<typeof customFetch>;
544
+ },
545
+ queryClient?: QueryClient,
546
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
336
547
  const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options);
337
548
 
338
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
339
- queryKey: QueryKey;
340
- };
549
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
550
+ TData,
551
+ TError
552
+ > & { queryKey: DataTag<QueryKey, TData> };
341
553
 
342
554
  query.queryKey = queryOptions.queryKey;
343
555
 
@@ -382,7 +594,7 @@ export const getGetProductsQueryOptions = <
382
594
  TData = Awaited<ReturnType<typeof getProducts>>,
383
595
  TError = ErrorType<AsError | void>,
384
596
  >(options?: {
385
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
597
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
386
598
  request?: SecondParameter<typeof customFetch>;
387
599
  }) => {
388
600
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -396,12 +608,58 @@ export const getGetProductsQueryOptions = <
396
608
  Awaited<ReturnType<typeof getProducts>>,
397
609
  TError,
398
610
  TData
399
- > & { queryKey: QueryKey };
611
+ > & { queryKey: DataTag<QueryKey, TData> };
400
612
  };
401
613
 
402
614
  export type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
403
615
  export type GetProductsQueryError = ErrorType<AsError | void>;
404
616
 
617
+ export function useGetProducts<
618
+ TData = Awaited<ReturnType<typeof getProducts>>,
619
+ TError = ErrorType<AsError | void>,
620
+ >(
621
+ options: {
622
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
623
+ Pick<
624
+ DefinedInitialDataOptions<
625
+ Awaited<ReturnType<typeof getProducts>>,
626
+ TError,
627
+ Awaited<ReturnType<typeof getProducts>>
628
+ >,
629
+ "initialData"
630
+ >;
631
+ request?: SecondParameter<typeof customFetch>;
632
+ },
633
+ queryClient?: QueryClient,
634
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
635
+ export function useGetProducts<
636
+ TData = Awaited<ReturnType<typeof getProducts>>,
637
+ TError = ErrorType<AsError | void>,
638
+ >(
639
+ options?: {
640
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
641
+ Pick<
642
+ UndefinedInitialDataOptions<
643
+ Awaited<ReturnType<typeof getProducts>>,
644
+ TError,
645
+ Awaited<ReturnType<typeof getProducts>>
646
+ >,
647
+ "initialData"
648
+ >;
649
+ request?: SecondParameter<typeof customFetch>;
650
+ },
651
+ queryClient?: QueryClient,
652
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
653
+ export function useGetProducts<
654
+ TData = Awaited<ReturnType<typeof getProducts>>,
655
+ TError = ErrorType<AsError | void>,
656
+ >(
657
+ options?: {
658
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
659
+ request?: SecondParameter<typeof customFetch>;
660
+ },
661
+ queryClient?: QueryClient,
662
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
405
663
  /**
406
664
  * @summary Gets all Products
407
665
  */
@@ -409,13 +667,18 @@ export type GetProductsQueryError = ErrorType<AsError | void>;
409
667
  export function useGetProducts<
410
668
  TData = Awaited<ReturnType<typeof getProducts>>,
411
669
  TError = ErrorType<AsError | void>,
412
- >(options?: {
413
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
414
- request?: SecondParameter<typeof customFetch>;
415
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
670
+ >(
671
+ options?: {
672
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
673
+ request?: SecondParameter<typeof customFetch>;
674
+ },
675
+ queryClient?: QueryClient,
676
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
416
677
  const queryOptions = getGetProductsQueryOptions(options);
417
678
 
418
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
679
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
680
+ queryKey: DataTag<QueryKey, TData>;
681
+ };
419
682
 
420
683
  query.queryKey = queryOptions.queryKey;
421
684
 
@@ -438,7 +701,7 @@ export const getGetProductsSuspenseQueryOptions = <
438
701
  TData = Awaited<ReturnType<typeof getProducts>>,
439
702
  TError = ErrorType<AsError | void>,
440
703
  >(options?: {
441
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
704
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
442
705
  request?: SecondParameter<typeof customFetch>;
443
706
  }) => {
444
707
  const { query: queryOptions, request: requestOptions } = options ?? {};
@@ -452,12 +715,46 @@ export const getGetProductsSuspenseQueryOptions = <
452
715
  Awaited<ReturnType<typeof getProducts>>,
453
716
  TError,
454
717
  TData
455
- > & { queryKey: QueryKey };
718
+ > & { queryKey: DataTag<QueryKey, TData> };
456
719
  };
457
720
 
458
721
  export type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
459
722
  export type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
460
723
 
724
+ export function useGetProductsSuspense<
725
+ TData = Awaited<ReturnType<typeof getProducts>>,
726
+ TError = ErrorType<AsError | void>,
727
+ >(
728
+ options: {
729
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
730
+ request?: SecondParameter<typeof customFetch>;
731
+ },
732
+ queryClient?: QueryClient,
733
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
734
+ export function useGetProductsSuspense<
735
+ TData = Awaited<ReturnType<typeof getProducts>>,
736
+ TError = ErrorType<AsError | void>,
737
+ >(
738
+ options?: {
739
+ query?: Partial<
740
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
741
+ >;
742
+ request?: SecondParameter<typeof customFetch>;
743
+ },
744
+ queryClient?: QueryClient,
745
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
746
+ export function useGetProductsSuspense<
747
+ TData = Awaited<ReturnType<typeof getProducts>>,
748
+ TError = ErrorType<AsError | void>,
749
+ >(
750
+ options?: {
751
+ query?: Partial<
752
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
753
+ >;
754
+ request?: SecondParameter<typeof customFetch>;
755
+ },
756
+ queryClient?: QueryClient,
757
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
461
758
  /**
462
759
  * @summary Gets all Products
463
760
  */
@@ -465,15 +762,21 @@ export type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
465
762
  export function useGetProductsSuspense<
466
763
  TData = Awaited<ReturnType<typeof getProducts>>,
467
764
  TError = ErrorType<AsError | void>,
468
- >(options?: {
469
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
470
- request?: SecondParameter<typeof customFetch>;
471
- }): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
765
+ >(
766
+ options?: {
767
+ query?: Partial<
768
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
769
+ >;
770
+ request?: SecondParameter<typeof customFetch>;
771
+ },
772
+ queryClient?: QueryClient,
773
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
472
774
  const queryOptions = getGetProductsSuspenseQueryOptions(options);
473
775
 
474
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
475
- queryKey: QueryKey;
476
- };
776
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
777
+ TData,
778
+ TError
779
+ > & { queryKey: DataTag<QueryKey, TData> };
477
780
 
478
781
  query.queryKey = queryOptions.queryKey;
479
782
 
@@ -530,7 +833,9 @@ export const getGetProductsForOrganisationQueryOptions = <
530
833
  >(
531
834
  orgId: string,
532
835
  options?: {
533
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
836
+ query?: Partial<
837
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
838
+ >;
534
839
  request?: SecondParameter<typeof customFetch>;
535
840
  },
536
841
  ) => {
@@ -546,7 +851,7 @@ export const getGetProductsForOrganisationQueryOptions = <
546
851
  Awaited<ReturnType<typeof getProductsForOrganisation>>,
547
852
  TError,
548
853
  TData
549
- > & { queryKey: QueryKey };
854
+ > & { queryKey: DataTag<QueryKey, TData> };
550
855
  };
551
856
 
552
857
  export type GetProductsForOrganisationQueryResult = NonNullable<
@@ -554,6 +859,61 @@ export type GetProductsForOrganisationQueryResult = NonNullable<
554
859
  >;
555
860
  export type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
556
861
 
862
+ export function useGetProductsForOrganisation<
863
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
864
+ TError = ErrorType<void | AsError>,
865
+ >(
866
+ orgId: string,
867
+ options: {
868
+ query: Partial<
869
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
870
+ > &
871
+ Pick<
872
+ DefinedInitialDataOptions<
873
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
874
+ TError,
875
+ Awaited<ReturnType<typeof getProductsForOrganisation>>
876
+ >,
877
+ "initialData"
878
+ >;
879
+ request?: SecondParameter<typeof customFetch>;
880
+ },
881
+ queryClient?: QueryClient,
882
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
883
+ export function useGetProductsForOrganisation<
884
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
885
+ TError = ErrorType<void | AsError>,
886
+ >(
887
+ orgId: string,
888
+ options?: {
889
+ query?: Partial<
890
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
891
+ > &
892
+ Pick<
893
+ UndefinedInitialDataOptions<
894
+ Awaited<ReturnType<typeof getProductsForOrganisation>>,
895
+ TError,
896
+ Awaited<ReturnType<typeof getProductsForOrganisation>>
897
+ >,
898
+ "initialData"
899
+ >;
900
+ request?: SecondParameter<typeof customFetch>;
901
+ },
902
+ queryClient?: QueryClient,
903
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
904
+ export function useGetProductsForOrganisation<
905
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
906
+ TError = ErrorType<void | AsError>,
907
+ >(
908
+ orgId: string,
909
+ options?: {
910
+ query?: Partial<
911
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
912
+ >;
913
+ request?: SecondParameter<typeof customFetch>;
914
+ },
915
+ queryClient?: QueryClient,
916
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
557
917
  /**
558
918
  * @summary Gets Products for an Organisation
559
919
  */
@@ -564,13 +924,18 @@ export function useGetProductsForOrganisation<
564
924
  >(
565
925
  orgId: string,
566
926
  options?: {
567
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
927
+ query?: Partial<
928
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
929
+ >;
568
930
  request?: SecondParameter<typeof customFetch>;
569
931
  },
570
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
932
+ queryClient?: QueryClient,
933
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
571
934
  const queryOptions = getGetProductsForOrganisationQueryOptions(orgId, options);
572
935
 
573
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
936
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
937
+ queryKey: DataTag<QueryKey, TData>;
938
+ };
574
939
 
575
940
  query.queryKey = queryOptions.queryKey;
576
941
 
@@ -599,10 +964,8 @@ export const getGetProductsForOrganisationSuspenseQueryOptions = <
599
964
  >(
600
965
  orgId: string,
601
966
  options?: {
602
- query?: UseSuspenseQueryOptions<
603
- Awaited<ReturnType<typeof getProductsForOrganisation>>,
604
- TError,
605
- TData
967
+ query?: Partial<
968
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
606
969
  >;
607
970
  request?: SecondParameter<typeof customFetch>;
608
971
  },
@@ -619,7 +982,7 @@ export const getGetProductsForOrganisationSuspenseQueryOptions = <
619
982
  Awaited<ReturnType<typeof getProductsForOrganisation>>,
620
983
  TError,
621
984
  TData
622
- > & { queryKey: QueryKey };
985
+ > & { queryKey: DataTag<QueryKey, TData> };
623
986
  };
624
987
 
625
988
  export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
@@ -627,6 +990,45 @@ export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
627
990
  >;
628
991
  export type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
629
992
 
993
+ export function useGetProductsForOrganisationSuspense<
994
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
995
+ TError = ErrorType<void | AsError>,
996
+ >(
997
+ orgId: string,
998
+ options: {
999
+ query: Partial<
1000
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
1001
+ >;
1002
+ request?: SecondParameter<typeof customFetch>;
1003
+ },
1004
+ queryClient?: QueryClient,
1005
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1006
+ export function useGetProductsForOrganisationSuspense<
1007
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
1008
+ TError = ErrorType<void | AsError>,
1009
+ >(
1010
+ orgId: string,
1011
+ options?: {
1012
+ query?: Partial<
1013
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
1014
+ >;
1015
+ request?: SecondParameter<typeof customFetch>;
1016
+ },
1017
+ queryClient?: QueryClient,
1018
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1019
+ export function useGetProductsForOrganisationSuspense<
1020
+ TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
1021
+ TError = ErrorType<void | AsError>,
1022
+ >(
1023
+ orgId: string,
1024
+ options?: {
1025
+ query?: Partial<
1026
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
1027
+ >;
1028
+ request?: SecondParameter<typeof customFetch>;
1029
+ },
1030
+ queryClient?: QueryClient,
1031
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
630
1032
  /**
631
1033
  * @summary Gets Products for an Organisation
632
1034
  */
@@ -637,19 +1039,19 @@ export function useGetProductsForOrganisationSuspense<
637
1039
  >(
638
1040
  orgId: string,
639
1041
  options?: {
640
- query?: UseSuspenseQueryOptions<
641
- Awaited<ReturnType<typeof getProductsForOrganisation>>,
642
- TError,
643
- TData
1042
+ query?: Partial<
1043
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
644
1044
  >;
645
1045
  request?: SecondParameter<typeof customFetch>;
646
1046
  },
647
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
1047
+ queryClient?: QueryClient,
1048
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
648
1049
  const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId, options);
649
1050
 
650
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
651
- queryKey: QueryKey;
652
- };
1051
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1052
+ TData,
1053
+ TError
1054
+ > & { queryKey: DataTag<QueryKey, TData> };
653
1055
 
654
1056
  query.queryKey = queryOptions.queryKey;
655
1057
 
@@ -750,18 +1152,18 @@ export type CreateUnitProductMutationError = ErrorType<AsError | void>;
750
1152
  /**
751
1153
  * @summary Creates a Product for a Unit
752
1154
  */
753
- export const useCreateUnitProduct = <
754
- TError = ErrorType<AsError | void>,
755
- TContext = unknown,
756
- >(options?: {
757
- mutation?: UseMutationOptions<
758
- Awaited<ReturnType<typeof createUnitProduct>>,
759
- TError,
760
- { unitId: string; data: UnitProductPostBodyBody },
761
- TContext
762
- >;
763
- request?: SecondParameter<typeof customFetch>;
764
- }): UseMutationResult<
1155
+ export const useCreateUnitProduct = <TError = ErrorType<AsError | void>, TContext = unknown>(
1156
+ options?: {
1157
+ mutation?: UseMutationOptions<
1158
+ Awaited<ReturnType<typeof createUnitProduct>>,
1159
+ TError,
1160
+ { unitId: string; data: UnitProductPostBodyBody },
1161
+ TContext
1162
+ >;
1163
+ request?: SecondParameter<typeof customFetch>;
1164
+ },
1165
+ queryClient?: QueryClient,
1166
+ ): UseMutationResult<
765
1167
  Awaited<ReturnType<typeof createUnitProduct>>,
766
1168
  TError,
767
1169
  { unitId: string; data: UnitProductPostBodyBody },
@@ -769,7 +1171,7 @@ export const useCreateUnitProduct = <
769
1171
  > => {
770
1172
  const mutationOptions = getCreateUnitProductMutationOptions(options);
771
1173
 
772
- return useMutation(mutationOptions);
1174
+ return useMutation(mutationOptions, queryClient);
773
1175
  };
774
1176
  /**
775
1177
  * Gets products you have access to based on an Organisational **Unit**
@@ -821,7 +1223,7 @@ export const getGetProductsForUnitQueryOptions = <
821
1223
  >(
822
1224
  unitId: string,
823
1225
  options?: {
824
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1226
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
825
1227
  request?: SecondParameter<typeof customFetch>;
826
1228
  },
827
1229
  ) => {
@@ -836,7 +1238,7 @@ export const getGetProductsForUnitQueryOptions = <
836
1238
  Awaited<ReturnType<typeof getProductsForUnit>>,
837
1239
  TError,
838
1240
  TData
839
- > & { queryKey: QueryKey };
1241
+ > & { queryKey: DataTag<QueryKey, TData> };
840
1242
  };
841
1243
 
842
1244
  export type GetProductsForUnitQueryResult = NonNullable<
@@ -844,6 +1246,57 @@ export type GetProductsForUnitQueryResult = NonNullable<
844
1246
  >;
845
1247
  export type GetProductsForUnitQueryError = ErrorType<void | AsError>;
846
1248
 
1249
+ export function useGetProductsForUnit<
1250
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1251
+ TError = ErrorType<void | AsError>,
1252
+ >(
1253
+ unitId: string,
1254
+ options: {
1255
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> &
1256
+ Pick<
1257
+ DefinedInitialDataOptions<
1258
+ Awaited<ReturnType<typeof getProductsForUnit>>,
1259
+ TError,
1260
+ Awaited<ReturnType<typeof getProductsForUnit>>
1261
+ >,
1262
+ "initialData"
1263
+ >;
1264
+ request?: SecondParameter<typeof customFetch>;
1265
+ },
1266
+ queryClient?: QueryClient,
1267
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1268
+ export function useGetProductsForUnit<
1269
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1270
+ TError = ErrorType<void | AsError>,
1271
+ >(
1272
+ unitId: string,
1273
+ options?: {
1274
+ query?: Partial<
1275
+ UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1276
+ > &
1277
+ Pick<
1278
+ UndefinedInitialDataOptions<
1279
+ Awaited<ReturnType<typeof getProductsForUnit>>,
1280
+ TError,
1281
+ Awaited<ReturnType<typeof getProductsForUnit>>
1282
+ >,
1283
+ "initialData"
1284
+ >;
1285
+ request?: SecondParameter<typeof customFetch>;
1286
+ },
1287
+ queryClient?: QueryClient,
1288
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1289
+ export function useGetProductsForUnit<
1290
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1291
+ TError = ErrorType<void | AsError>,
1292
+ >(
1293
+ unitId: string,
1294
+ options?: {
1295
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
1296
+ request?: SecondParameter<typeof customFetch>;
1297
+ },
1298
+ queryClient?: QueryClient,
1299
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
847
1300
  /**
848
1301
  * @summary Gets Products for an Organisational Unit
849
1302
  */
@@ -854,13 +1307,16 @@ export function useGetProductsForUnit<
854
1307
  >(
855
1308
  unitId: string,
856
1309
  options?: {
857
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1310
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
858
1311
  request?: SecondParameter<typeof customFetch>;
859
1312
  },
860
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
1313
+ queryClient?: QueryClient,
1314
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
861
1315
  const queryOptions = getGetProductsForUnitQueryOptions(unitId, options);
862
1316
 
863
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
1317
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1318
+ queryKey: DataTag<QueryKey, TData>;
1319
+ };
864
1320
 
865
1321
  query.queryKey = queryOptions.queryKey;
866
1322
 
@@ -886,7 +1342,9 @@ export const getGetProductsForUnitSuspenseQueryOptions = <
886
1342
  >(
887
1343
  unitId: string,
888
1344
  options?: {
889
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1345
+ query?: Partial<
1346
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1347
+ >;
890
1348
  request?: SecondParameter<typeof customFetch>;
891
1349
  },
892
1350
  ) => {
@@ -901,7 +1359,7 @@ export const getGetProductsForUnitSuspenseQueryOptions = <
901
1359
  Awaited<ReturnType<typeof getProductsForUnit>>,
902
1360
  TError,
903
1361
  TData
904
- > & { queryKey: QueryKey };
1362
+ > & { queryKey: DataTag<QueryKey, TData> };
905
1363
  };
906
1364
 
907
1365
  export type GetProductsForUnitSuspenseQueryResult = NonNullable<
@@ -909,6 +1367,45 @@ export type GetProductsForUnitSuspenseQueryResult = NonNullable<
909
1367
  >;
910
1368
  export type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
911
1369
 
1370
+ export function useGetProductsForUnitSuspense<
1371
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1372
+ TError = ErrorType<void | AsError>,
1373
+ >(
1374
+ unitId: string,
1375
+ options: {
1376
+ query: Partial<
1377
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1378
+ >;
1379
+ request?: SecondParameter<typeof customFetch>;
1380
+ },
1381
+ queryClient?: QueryClient,
1382
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1383
+ export function useGetProductsForUnitSuspense<
1384
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1385
+ TError = ErrorType<void | AsError>,
1386
+ >(
1387
+ unitId: string,
1388
+ options?: {
1389
+ query?: Partial<
1390
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1391
+ >;
1392
+ request?: SecondParameter<typeof customFetch>;
1393
+ },
1394
+ queryClient?: QueryClient,
1395
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1396
+ export function useGetProductsForUnitSuspense<
1397
+ TData = Awaited<ReturnType<typeof getProductsForUnit>>,
1398
+ TError = ErrorType<void | AsError>,
1399
+ >(
1400
+ unitId: string,
1401
+ options?: {
1402
+ query?: Partial<
1403
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1404
+ >;
1405
+ request?: SecondParameter<typeof customFetch>;
1406
+ },
1407
+ queryClient?: QueryClient,
1408
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
912
1409
  /**
913
1410
  * @summary Gets Products for an Organisational Unit
914
1411
  */
@@ -919,15 +1416,19 @@ export function useGetProductsForUnitSuspense<
919
1416
  >(
920
1417
  unitId: string,
921
1418
  options?: {
922
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
1419
+ query?: Partial<
1420
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
1421
+ >;
923
1422
  request?: SecondParameter<typeof customFetch>;
924
1423
  },
925
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
1424
+ queryClient?: QueryClient,
1425
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
926
1426
  const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId, options);
927
1427
 
928
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
929
- queryKey: QueryKey;
930
- };
1428
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1429
+ TData,
1430
+ TError
1431
+ > & { queryKey: DataTag<QueryKey, TData> };
931
1432
 
932
1433
  query.queryKey = queryOptions.queryKey;
933
1434
 
@@ -980,7 +1481,7 @@ export const getGetProductQueryOptions = <
980
1481
  >(
981
1482
  productId: string,
982
1483
  options?: {
983
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1484
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
984
1485
  request?: SecondParameter<typeof customFetch>;
985
1486
  },
986
1487
  ) => {
@@ -995,12 +1496,61 @@ export const getGetProductQueryOptions = <
995
1496
  Awaited<ReturnType<typeof getProduct>>,
996
1497
  TError,
997
1498
  TData
998
- > & { queryKey: QueryKey };
1499
+ > & { queryKey: DataTag<QueryKey, TData> };
999
1500
  };
1000
1501
 
1001
1502
  export type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
1002
1503
  export type GetProductQueryError = ErrorType<AsError | void>;
1003
1504
 
1505
+ export function useGetProduct<
1506
+ TData = Awaited<ReturnType<typeof getProduct>>,
1507
+ TError = ErrorType<AsError | void>,
1508
+ >(
1509
+ productId: string,
1510
+ options: {
1511
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
1512
+ Pick<
1513
+ DefinedInitialDataOptions<
1514
+ Awaited<ReturnType<typeof getProduct>>,
1515
+ TError,
1516
+ Awaited<ReturnType<typeof getProduct>>
1517
+ >,
1518
+ "initialData"
1519
+ >;
1520
+ request?: SecondParameter<typeof customFetch>;
1521
+ },
1522
+ queryClient?: QueryClient,
1523
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1524
+ export function useGetProduct<
1525
+ TData = Awaited<ReturnType<typeof getProduct>>,
1526
+ TError = ErrorType<AsError | void>,
1527
+ >(
1528
+ productId: string,
1529
+ options?: {
1530
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
1531
+ Pick<
1532
+ UndefinedInitialDataOptions<
1533
+ Awaited<ReturnType<typeof getProduct>>,
1534
+ TError,
1535
+ Awaited<ReturnType<typeof getProduct>>
1536
+ >,
1537
+ "initialData"
1538
+ >;
1539
+ request?: SecondParameter<typeof customFetch>;
1540
+ },
1541
+ queryClient?: QueryClient,
1542
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1543
+ export function useGetProduct<
1544
+ TData = Awaited<ReturnType<typeof getProduct>>,
1545
+ TError = ErrorType<AsError | void>,
1546
+ >(
1547
+ productId: string,
1548
+ options?: {
1549
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1550
+ request?: SecondParameter<typeof customFetch>;
1551
+ },
1552
+ queryClient?: QueryClient,
1553
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1004
1554
  /**
1005
1555
  * @summary Gets a Product
1006
1556
  */
@@ -1011,13 +1561,16 @@ export function useGetProduct<
1011
1561
  >(
1012
1562
  productId: string,
1013
1563
  options?: {
1014
- query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1564
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1015
1565
  request?: SecondParameter<typeof customFetch>;
1016
1566
  },
1017
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
1567
+ queryClient?: QueryClient,
1568
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
1018
1569
  const queryOptions = getGetProductQueryOptions(productId, options);
1019
1570
 
1020
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
1571
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1572
+ queryKey: DataTag<QueryKey, TData>;
1573
+ };
1021
1574
 
1022
1575
  query.queryKey = queryOptions.queryKey;
1023
1576
 
@@ -1043,7 +1596,7 @@ export const getGetProductSuspenseQueryOptions = <
1043
1596
  >(
1044
1597
  productId: string,
1045
1598
  options?: {
1046
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1599
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1047
1600
  request?: SecondParameter<typeof customFetch>;
1048
1601
  },
1049
1602
  ) => {
@@ -1058,12 +1611,45 @@ export const getGetProductSuspenseQueryOptions = <
1058
1611
  Awaited<ReturnType<typeof getProduct>>,
1059
1612
  TError,
1060
1613
  TData
1061
- > & { queryKey: QueryKey };
1614
+ > & { queryKey: DataTag<QueryKey, TData> };
1062
1615
  };
1063
1616
 
1064
1617
  export type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
1065
1618
  export type GetProductSuspenseQueryError = ErrorType<AsError | void>;
1066
1619
 
1620
+ export function useGetProductSuspense<
1621
+ TData = Awaited<ReturnType<typeof getProduct>>,
1622
+ TError = ErrorType<AsError | void>,
1623
+ >(
1624
+ productId: string,
1625
+ options: {
1626
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1627
+ request?: SecondParameter<typeof customFetch>;
1628
+ },
1629
+ queryClient?: QueryClient,
1630
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1631
+ export function useGetProductSuspense<
1632
+ TData = Awaited<ReturnType<typeof getProduct>>,
1633
+ TError = ErrorType<AsError | void>,
1634
+ >(
1635
+ productId: string,
1636
+ options?: {
1637
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1638
+ request?: SecondParameter<typeof customFetch>;
1639
+ },
1640
+ queryClient?: QueryClient,
1641
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1642
+ export function useGetProductSuspense<
1643
+ TData = Awaited<ReturnType<typeof getProduct>>,
1644
+ TError = ErrorType<AsError | void>,
1645
+ >(
1646
+ productId: string,
1647
+ options?: {
1648
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1649
+ request?: SecondParameter<typeof customFetch>;
1650
+ },
1651
+ queryClient?: QueryClient,
1652
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
1067
1653
  /**
1068
1654
  * @summary Gets a Product
1069
1655
  */
@@ -1074,15 +1660,17 @@ export function useGetProductSuspense<
1074
1660
  >(
1075
1661
  productId: string,
1076
1662
  options?: {
1077
- query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
1663
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
1078
1664
  request?: SecondParameter<typeof customFetch>;
1079
1665
  },
1080
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
1666
+ queryClient?: QueryClient,
1667
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
1081
1668
  const queryOptions = getGetProductSuspenseQueryOptions(productId, options);
1082
1669
 
1083
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
1084
- queryKey: QueryKey;
1085
- };
1670
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1671
+ TData,
1672
+ TError
1673
+ > & { queryKey: DataTag<QueryKey, TData> };
1086
1674
 
1087
1675
  query.queryKey = queryOptions.queryKey;
1088
1676
 
@@ -1168,15 +1756,18 @@ export type DeleteProductMutationError = ErrorType<void | AsError>;
1168
1756
  /**
1169
1757
  * @summary Deletes an existing Product
1170
1758
  */
1171
- export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
1172
- mutation?: UseMutationOptions<
1173
- Awaited<ReturnType<typeof deleteProduct>>,
1174
- TError,
1175
- { productId: string },
1176
- TContext
1177
- >;
1178
- request?: SecondParameter<typeof customFetch>;
1179
- }): UseMutationResult<
1759
+ export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
1760
+ options?: {
1761
+ mutation?: UseMutationOptions<
1762
+ Awaited<ReturnType<typeof deleteProduct>>,
1763
+ TError,
1764
+ { productId: string },
1765
+ TContext
1766
+ >;
1767
+ request?: SecondParameter<typeof customFetch>;
1768
+ },
1769
+ queryClient?: QueryClient,
1770
+ ): UseMutationResult<
1180
1771
  Awaited<ReturnType<typeof deleteProduct>>,
1181
1772
  TError,
1182
1773
  { productId: string },
@@ -1184,7 +1775,7 @@ export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext =
1184
1775
  > => {
1185
1776
  const mutationOptions = getDeleteProductMutationOptions(options);
1186
1777
 
1187
- return useMutation(mutationOptions);
1778
+ return useMutation(mutationOptions, queryClient);
1188
1779
  };
1189
1780
  /**
1190
1781
  * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
@@ -1272,15 +1863,18 @@ export type PatchProductMutationError = ErrorType<void | AsError>;
1272
1863
  /**
1273
1864
  * @summary Adjust an existing Product
1274
1865
  */
1275
- export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
1276
- mutation?: UseMutationOptions<
1277
- Awaited<ReturnType<typeof patchProduct>>,
1278
- TError,
1279
- { productId: string; data: ProductPatchBodyBody },
1280
- TContext
1281
- >;
1282
- request?: SecondParameter<typeof customFetch>;
1283
- }): UseMutationResult<
1866
+ export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
1867
+ options?: {
1868
+ mutation?: UseMutationOptions<
1869
+ Awaited<ReturnType<typeof patchProduct>>,
1870
+ TError,
1871
+ { productId: string; data: ProductPatchBodyBody },
1872
+ TContext
1873
+ >;
1874
+ request?: SecondParameter<typeof customFetch>;
1875
+ },
1876
+ queryClient?: QueryClient,
1877
+ ): UseMutationResult<
1284
1878
  Awaited<ReturnType<typeof patchProduct>>,
1285
1879
  TError,
1286
1880
  { productId: string; data: ProductPatchBodyBody },
@@ -1288,5 +1882,5 @@ export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = u
1288
1882
  > => {
1289
1883
  const mutationOptions = getPatchProductMutationOptions(options);
1290
1884
 
1291
- return useMutation(mutationOptions);
1885
+ return useMutation(mutationOptions, queryClient);
1292
1886
  };