@squonk/account-server-client 4.4.0-4-4.2174798239 → 4.4.0-4-4.2194834412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/actions/actions.cjs +5 -5
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +17 -35
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +17 -35
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.js +5 -5
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/api.schemas.cjs.map +1 -1
- package/dist/api/api.schemas.d.cts +1 -1
- package/dist/api/api.schemas.d.ts +1 -1
- package/dist/api/api.schemas.js.map +1 -1
- package/dist/api/asset/asset.cjs +23 -23
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +40 -76
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +40 -76
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.js +23 -23
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +17 -17
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +65 -137
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +65 -137
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.js +17 -17
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +13 -13
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +35 -71
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +35 -71
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.js +13 -13
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +9 -9
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +33 -69
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +33 -69
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.js +9 -9
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +19 -19
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +52 -106
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +52 -106
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.js +19 -19
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +31 -31
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +100 -208
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +100 -208
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.js +31 -31
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +5 -5
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +17 -35
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +17 -35
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.js +5 -5
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +31 -31
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +72 -144
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +72 -144
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.js +31 -31
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +21 -21
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +53 -107
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +53 -107
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.js +21 -21
- package/dist/api/user/user.js.map +1 -1
- package/package.json +4 -7
- package/pnpm-workspace.yaml +1 -3
- package/src/api/actions/actions.ts +13 -105
- package/src/api/api.schemas.ts +1 -1
- package/src/api/asset/asset.ts +95 -305
- package/src/api/charges/charges.ts +55 -458
- package/src/api/event-stream/event-stream.ts +59 -264
- package/src/api/merchant/merchant.ts +29 -214
- package/src/api/organisation/organisation.ts +87 -383
- package/src/api/product/product.ts +131 -726
- package/src/api/state/state.ts +17 -107
- package/src/api/unit/unit.ts +147 -523
- package/src/api/user/user.ts +102 -403
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.17.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Account Server API
|
|
5
5
|
* The Informatics Matters Account Server API.
|
|
@@ -10,14 +10,9 @@ 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,
|
|
16
13
|
MutationFunction,
|
|
17
|
-
QueryClient,
|
|
18
14
|
QueryFunction,
|
|
19
15
|
QueryKey,
|
|
20
|
-
UndefinedInitialDataOptions,
|
|
21
16
|
UseMutationOptions,
|
|
22
17
|
UseMutationResult,
|
|
23
18
|
UseQueryOptions,
|
|
@@ -67,7 +62,7 @@ export const useGetProductTypesQueryOptions = <
|
|
|
67
62
|
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
68
63
|
TError = ErrorType<AsError | void>,
|
|
69
64
|
>(options?: {
|
|
70
|
-
query?:
|
|
65
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
|
|
71
66
|
request?: SecondParameter<typeof customInstance>;
|
|
72
67
|
}) => {
|
|
73
68
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -83,58 +78,12 @@ export const useGetProductTypesQueryOptions = <
|
|
|
83
78
|
Awaited<ReturnType<typeof getProductTypes>>,
|
|
84
79
|
TError,
|
|
85
80
|
TData
|
|
86
|
-
> & { queryKey:
|
|
81
|
+
> & { queryKey: QueryKey };
|
|
87
82
|
};
|
|
88
83
|
|
|
89
84
|
export type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
90
85
|
export type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
91
86
|
|
|
92
|
-
export function useGetProductTypes<
|
|
93
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
94
|
-
TError = ErrorType<AsError | void>,
|
|
95
|
-
>(
|
|
96
|
-
options: {
|
|
97
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &
|
|
98
|
-
Pick<
|
|
99
|
-
DefinedInitialDataOptions<
|
|
100
|
-
Awaited<ReturnType<typeof getProductTypes>>,
|
|
101
|
-
TError,
|
|
102
|
-
Awaited<ReturnType<typeof getProductTypes>>
|
|
103
|
-
>,
|
|
104
|
-
"initialData"
|
|
105
|
-
>;
|
|
106
|
-
request?: SecondParameter<typeof customInstance>;
|
|
107
|
-
},
|
|
108
|
-
queryClient?: QueryClient,
|
|
109
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
110
|
-
export function useGetProductTypes<
|
|
111
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
112
|
-
TError = ErrorType<AsError | void>,
|
|
113
|
-
>(
|
|
114
|
-
options?: {
|
|
115
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &
|
|
116
|
-
Pick<
|
|
117
|
-
UndefinedInitialDataOptions<
|
|
118
|
-
Awaited<ReturnType<typeof getProductTypes>>,
|
|
119
|
-
TError,
|
|
120
|
-
Awaited<ReturnType<typeof getProductTypes>>
|
|
121
|
-
>,
|
|
122
|
-
"initialData"
|
|
123
|
-
>;
|
|
124
|
-
request?: SecondParameter<typeof customInstance>;
|
|
125
|
-
},
|
|
126
|
-
queryClient?: QueryClient,
|
|
127
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
128
|
-
export function useGetProductTypes<
|
|
129
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
130
|
-
TError = ErrorType<AsError | void>,
|
|
131
|
-
>(
|
|
132
|
-
options?: {
|
|
133
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
134
|
-
request?: SecondParameter<typeof customInstance>;
|
|
135
|
-
},
|
|
136
|
-
queryClient?: QueryClient,
|
|
137
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
138
87
|
/**
|
|
139
88
|
* @summary Gets all Product Types
|
|
140
89
|
*/
|
|
@@ -142,18 +91,13 @@ export function useGetProductTypes<
|
|
|
142
91
|
export function useGetProductTypes<
|
|
143
92
|
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
144
93
|
TError = ErrorType<AsError | void>,
|
|
145
|
-
>(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
queryClient?: QueryClient,
|
|
151
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
94
|
+
>(options?: {
|
|
95
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
|
|
96
|
+
request?: SecondParameter<typeof customInstance>;
|
|
97
|
+
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
152
98
|
const queryOptions = useGetProductTypesQueryOptions(options);
|
|
153
99
|
|
|
154
|
-
const query = useQuery(queryOptions
|
|
155
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
156
|
-
};
|
|
100
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
157
101
|
|
|
158
102
|
query.queryKey = queryOptions.queryKey;
|
|
159
103
|
|
|
@@ -164,9 +108,7 @@ export const useGetProductTypesSuspenseQueryOptions = <
|
|
|
164
108
|
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
165
109
|
TError = ErrorType<AsError | void>,
|
|
166
110
|
>(options?: {
|
|
167
|
-
query?:
|
|
168
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
|
|
169
|
-
>;
|
|
111
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
|
|
170
112
|
request?: SecondParameter<typeof customInstance>;
|
|
171
113
|
}) => {
|
|
172
114
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -182,7 +124,7 @@ export const useGetProductTypesSuspenseQueryOptions = <
|
|
|
182
124
|
Awaited<ReturnType<typeof getProductTypes>>,
|
|
183
125
|
TError,
|
|
184
126
|
TData
|
|
185
|
-
> & { queryKey:
|
|
127
|
+
> & { queryKey: QueryKey };
|
|
186
128
|
};
|
|
187
129
|
|
|
188
130
|
export type GetProductTypesSuspenseQueryResult = NonNullable<
|
|
@@ -190,42 +132,6 @@ export type GetProductTypesSuspenseQueryResult = NonNullable<
|
|
|
190
132
|
>;
|
|
191
133
|
export type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
|
|
192
134
|
|
|
193
|
-
export function useGetProductTypesSuspense<
|
|
194
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
195
|
-
TError = ErrorType<AsError | void>,
|
|
196
|
-
>(
|
|
197
|
-
options: {
|
|
198
|
-
query: Partial<
|
|
199
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
|
|
200
|
-
>;
|
|
201
|
-
request?: SecondParameter<typeof customInstance>;
|
|
202
|
-
},
|
|
203
|
-
queryClient?: QueryClient,
|
|
204
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
205
|
-
export function useGetProductTypesSuspense<
|
|
206
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
207
|
-
TError = ErrorType<AsError | void>,
|
|
208
|
-
>(
|
|
209
|
-
options?: {
|
|
210
|
-
query?: Partial<
|
|
211
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
|
|
212
|
-
>;
|
|
213
|
-
request?: SecondParameter<typeof customInstance>;
|
|
214
|
-
},
|
|
215
|
-
queryClient?: QueryClient,
|
|
216
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
217
|
-
export function useGetProductTypesSuspense<
|
|
218
|
-
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
219
|
-
TError = ErrorType<AsError | void>,
|
|
220
|
-
>(
|
|
221
|
-
options?: {
|
|
222
|
-
query?: Partial<
|
|
223
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>
|
|
224
|
-
>;
|
|
225
|
-
request?: SecondParameter<typeof customInstance>;
|
|
226
|
-
},
|
|
227
|
-
queryClient?: QueryClient,
|
|
228
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
229
135
|
/**
|
|
230
136
|
* @summary Gets all Product Types
|
|
231
137
|
*/
|
|
@@ -233,21 +139,15 @@ export function useGetProductTypesSuspense<
|
|
|
233
139
|
export function useGetProductTypesSuspense<
|
|
234
140
|
TData = Awaited<ReturnType<typeof getProductTypes>>,
|
|
235
141
|
TError = ErrorType<AsError | void>,
|
|
236
|
-
>(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
>;
|
|
241
|
-
request?: SecondParameter<typeof customInstance>;
|
|
242
|
-
},
|
|
243
|
-
queryClient?: QueryClient,
|
|
244
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
142
|
+
>(options?: {
|
|
143
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;
|
|
144
|
+
request?: SecondParameter<typeof customInstance>;
|
|
145
|
+
}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
245
146
|
const queryOptions = useGetProductTypesSuspenseQueryOptions(options);
|
|
246
147
|
|
|
247
|
-
const query = useSuspenseQuery(queryOptions
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
148
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
149
|
+
queryKey: QueryKey;
|
|
150
|
+
};
|
|
251
151
|
|
|
252
152
|
query.queryKey = queryOptions.queryKey;
|
|
253
153
|
|
|
@@ -277,9 +177,7 @@ export const useGetProductDefaultStorageCostQueryOptions = <
|
|
|
277
177
|
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
278
178
|
TError = ErrorType<AsError | void>,
|
|
279
179
|
>(options?: {
|
|
280
|
-
query?:
|
|
281
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
|
|
282
|
-
>;
|
|
180
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
|
|
283
181
|
request?: SecondParameter<typeof customInstance>;
|
|
284
182
|
}) => {
|
|
285
183
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -296,7 +194,7 @@ export const useGetProductDefaultStorageCostQueryOptions = <
|
|
|
296
194
|
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
297
195
|
TError,
|
|
298
196
|
TData
|
|
299
|
-
> & { queryKey:
|
|
197
|
+
> & { queryKey: QueryKey };
|
|
300
198
|
};
|
|
301
199
|
|
|
302
200
|
export type GetProductDefaultStorageCostQueryResult = NonNullable<
|
|
@@ -304,58 +202,6 @@ export type GetProductDefaultStorageCostQueryResult = NonNullable<
|
|
|
304
202
|
>;
|
|
305
203
|
export type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
306
204
|
|
|
307
|
-
export function useGetProductDefaultStorageCost<
|
|
308
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
309
|
-
TError = ErrorType<AsError | void>,
|
|
310
|
-
>(
|
|
311
|
-
options: {
|
|
312
|
-
query: Partial<
|
|
313
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
|
|
314
|
-
> &
|
|
315
|
-
Pick<
|
|
316
|
-
DefinedInitialDataOptions<
|
|
317
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
318
|
-
TError,
|
|
319
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>
|
|
320
|
-
>,
|
|
321
|
-
"initialData"
|
|
322
|
-
>;
|
|
323
|
-
request?: SecondParameter<typeof customInstance>;
|
|
324
|
-
},
|
|
325
|
-
queryClient?: QueryClient,
|
|
326
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
327
|
-
export function useGetProductDefaultStorageCost<
|
|
328
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
329
|
-
TError = ErrorType<AsError | void>,
|
|
330
|
-
>(
|
|
331
|
-
options?: {
|
|
332
|
-
query?: Partial<
|
|
333
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
|
|
334
|
-
> &
|
|
335
|
-
Pick<
|
|
336
|
-
UndefinedInitialDataOptions<
|
|
337
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
338
|
-
TError,
|
|
339
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>
|
|
340
|
-
>,
|
|
341
|
-
"initialData"
|
|
342
|
-
>;
|
|
343
|
-
request?: SecondParameter<typeof customInstance>;
|
|
344
|
-
},
|
|
345
|
-
queryClient?: QueryClient,
|
|
346
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
347
|
-
export function useGetProductDefaultStorageCost<
|
|
348
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
349
|
-
TError = ErrorType<AsError | void>,
|
|
350
|
-
>(
|
|
351
|
-
options?: {
|
|
352
|
-
query?: Partial<
|
|
353
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>
|
|
354
|
-
>;
|
|
355
|
-
request?: SecondParameter<typeof customInstance>;
|
|
356
|
-
},
|
|
357
|
-
queryClient?: QueryClient,
|
|
358
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
359
205
|
/**
|
|
360
206
|
* @summary Gets the default cross-product storage cost
|
|
361
207
|
*/
|
|
@@ -363,20 +209,13 @@ export function useGetProductDefaultStorageCost<
|
|
|
363
209
|
export function useGetProductDefaultStorageCost<
|
|
364
210
|
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
365
211
|
TError = ErrorType<AsError | void>,
|
|
366
|
-
>(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
>;
|
|
371
|
-
request?: SecondParameter<typeof customInstance>;
|
|
372
|
-
},
|
|
373
|
-
queryClient?: QueryClient,
|
|
374
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
212
|
+
>(options?: {
|
|
213
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;
|
|
214
|
+
request?: SecondParameter<typeof customInstance>;
|
|
215
|
+
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
375
216
|
const queryOptions = useGetProductDefaultStorageCostQueryOptions(options);
|
|
376
217
|
|
|
377
|
-
const query = useQuery(queryOptions
|
|
378
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
379
|
-
};
|
|
218
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
380
219
|
|
|
381
220
|
query.queryKey = queryOptions.queryKey;
|
|
382
221
|
|
|
@@ -387,8 +226,10 @@ export const useGetProductDefaultStorageCostSuspenseQueryOptions = <
|
|
|
387
226
|
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
388
227
|
TError = ErrorType<AsError | void>,
|
|
389
228
|
>(options?: {
|
|
390
|
-
query?:
|
|
391
|
-
|
|
229
|
+
query?: UseSuspenseQueryOptions<
|
|
230
|
+
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
231
|
+
TError,
|
|
232
|
+
TData
|
|
392
233
|
>;
|
|
393
234
|
request?: SecondParameter<typeof customInstance>;
|
|
394
235
|
}) => {
|
|
@@ -406,7 +247,7 @@ export const useGetProductDefaultStorageCostSuspenseQueryOptions = <
|
|
|
406
247
|
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
407
248
|
TError,
|
|
408
249
|
TData
|
|
409
|
-
> & { queryKey:
|
|
250
|
+
> & { queryKey: QueryKey };
|
|
410
251
|
};
|
|
411
252
|
|
|
412
253
|
export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
|
|
@@ -414,54 +255,6 @@ export type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<
|
|
|
414
255
|
>;
|
|
415
256
|
export type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
|
|
416
257
|
|
|
417
|
-
export function useGetProductDefaultStorageCostSuspense<
|
|
418
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
419
|
-
TError = ErrorType<AsError | void>,
|
|
420
|
-
>(
|
|
421
|
-
options: {
|
|
422
|
-
query: Partial<
|
|
423
|
-
UseSuspenseQueryOptions<
|
|
424
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
425
|
-
TError,
|
|
426
|
-
TData
|
|
427
|
-
>
|
|
428
|
-
>;
|
|
429
|
-
request?: SecondParameter<typeof customInstance>;
|
|
430
|
-
},
|
|
431
|
-
queryClient?: QueryClient,
|
|
432
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
433
|
-
export function useGetProductDefaultStorageCostSuspense<
|
|
434
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
435
|
-
TError = ErrorType<AsError | void>,
|
|
436
|
-
>(
|
|
437
|
-
options?: {
|
|
438
|
-
query?: Partial<
|
|
439
|
-
UseSuspenseQueryOptions<
|
|
440
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
441
|
-
TError,
|
|
442
|
-
TData
|
|
443
|
-
>
|
|
444
|
-
>;
|
|
445
|
-
request?: SecondParameter<typeof customInstance>;
|
|
446
|
-
},
|
|
447
|
-
queryClient?: QueryClient,
|
|
448
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
449
|
-
export function useGetProductDefaultStorageCostSuspense<
|
|
450
|
-
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
451
|
-
TError = ErrorType<AsError | void>,
|
|
452
|
-
>(
|
|
453
|
-
options?: {
|
|
454
|
-
query?: Partial<
|
|
455
|
-
UseSuspenseQueryOptions<
|
|
456
|
-
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
457
|
-
TError,
|
|
458
|
-
TData
|
|
459
|
-
>
|
|
460
|
-
>;
|
|
461
|
-
request?: SecondParameter<typeof customInstance>;
|
|
462
|
-
},
|
|
463
|
-
queryClient?: QueryClient,
|
|
464
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
465
258
|
/**
|
|
466
259
|
* @summary Gets the default cross-product storage cost
|
|
467
260
|
*/
|
|
@@ -469,25 +262,19 @@ export function useGetProductDefaultStorageCostSuspense<
|
|
|
469
262
|
export function useGetProductDefaultStorageCostSuspense<
|
|
470
263
|
TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
471
264
|
TError = ErrorType<AsError | void>,
|
|
472
|
-
>(
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
>;
|
|
481
|
-
request?: SecondParameter<typeof customInstance>;
|
|
482
|
-
},
|
|
483
|
-
queryClient?: QueryClient,
|
|
484
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
265
|
+
>(options?: {
|
|
266
|
+
query?: UseSuspenseQueryOptions<
|
|
267
|
+
Awaited<ReturnType<typeof getProductDefaultStorageCost>>,
|
|
268
|
+
TError,
|
|
269
|
+
TData
|
|
270
|
+
>;
|
|
271
|
+
request?: SecondParameter<typeof customInstance>;
|
|
272
|
+
}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
485
273
|
const queryOptions = useGetProductDefaultStorageCostSuspenseQueryOptions(options);
|
|
486
274
|
|
|
487
|
-
const query = useSuspenseQuery(queryOptions
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
275
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
276
|
+
queryKey: QueryKey;
|
|
277
|
+
};
|
|
491
278
|
|
|
492
279
|
query.queryKey = queryOptions.queryKey;
|
|
493
280
|
|
|
@@ -514,7 +301,7 @@ export const useGetProductsQueryOptions = <
|
|
|
514
301
|
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
515
302
|
TError = ErrorType<AsError | void>,
|
|
516
303
|
>(options?: {
|
|
517
|
-
query?:
|
|
304
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
|
|
518
305
|
request?: SecondParameter<typeof customInstance>;
|
|
519
306
|
}) => {
|
|
520
307
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -530,58 +317,12 @@ export const useGetProductsQueryOptions = <
|
|
|
530
317
|
Awaited<ReturnType<typeof getProducts>>,
|
|
531
318
|
TError,
|
|
532
319
|
TData
|
|
533
|
-
> & { queryKey:
|
|
320
|
+
> & { queryKey: QueryKey };
|
|
534
321
|
};
|
|
535
322
|
|
|
536
323
|
export type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
537
324
|
export type GetProductsQueryError = ErrorType<AsError | void>;
|
|
538
325
|
|
|
539
|
-
export function useGetProducts<
|
|
540
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
541
|
-
TError = ErrorType<AsError | void>,
|
|
542
|
-
>(
|
|
543
|
-
options: {
|
|
544
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
|
|
545
|
-
Pick<
|
|
546
|
-
DefinedInitialDataOptions<
|
|
547
|
-
Awaited<ReturnType<typeof getProducts>>,
|
|
548
|
-
TError,
|
|
549
|
-
Awaited<ReturnType<typeof getProducts>>
|
|
550
|
-
>,
|
|
551
|
-
"initialData"
|
|
552
|
-
>;
|
|
553
|
-
request?: SecondParameter<typeof customInstance>;
|
|
554
|
-
},
|
|
555
|
-
queryClient?: QueryClient,
|
|
556
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
557
|
-
export function useGetProducts<
|
|
558
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
559
|
-
TError = ErrorType<AsError | void>,
|
|
560
|
-
>(
|
|
561
|
-
options?: {
|
|
562
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &
|
|
563
|
-
Pick<
|
|
564
|
-
UndefinedInitialDataOptions<
|
|
565
|
-
Awaited<ReturnType<typeof getProducts>>,
|
|
566
|
-
TError,
|
|
567
|
-
Awaited<ReturnType<typeof getProducts>>
|
|
568
|
-
>,
|
|
569
|
-
"initialData"
|
|
570
|
-
>;
|
|
571
|
-
request?: SecondParameter<typeof customInstance>;
|
|
572
|
-
},
|
|
573
|
-
queryClient?: QueryClient,
|
|
574
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
575
|
-
export function useGetProducts<
|
|
576
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
577
|
-
TError = ErrorType<AsError | void>,
|
|
578
|
-
>(
|
|
579
|
-
options?: {
|
|
580
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
581
|
-
request?: SecondParameter<typeof customInstance>;
|
|
582
|
-
},
|
|
583
|
-
queryClient?: QueryClient,
|
|
584
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
585
326
|
/**
|
|
586
327
|
* @summary Gets all Products
|
|
587
328
|
*/
|
|
@@ -589,18 +330,13 @@ export function useGetProducts<
|
|
|
589
330
|
export function useGetProducts<
|
|
590
331
|
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
591
332
|
TError = ErrorType<AsError | void>,
|
|
592
|
-
>(
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
},
|
|
597
|
-
queryClient?: QueryClient,
|
|
598
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
333
|
+
>(options?: {
|
|
334
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
|
|
335
|
+
request?: SecondParameter<typeof customInstance>;
|
|
336
|
+
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
599
337
|
const queryOptions = useGetProductsQueryOptions(options);
|
|
600
338
|
|
|
601
|
-
const query = useQuery(queryOptions
|
|
602
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
603
|
-
};
|
|
339
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
604
340
|
|
|
605
341
|
query.queryKey = queryOptions.queryKey;
|
|
606
342
|
|
|
@@ -611,7 +347,7 @@ export const useGetProductsSuspenseQueryOptions = <
|
|
|
611
347
|
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
612
348
|
TError = ErrorType<AsError | void>,
|
|
613
349
|
>(options?: {
|
|
614
|
-
query?:
|
|
350
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
|
|
615
351
|
request?: SecondParameter<typeof customInstance>;
|
|
616
352
|
}) => {
|
|
617
353
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -627,46 +363,12 @@ export const useGetProductsSuspenseQueryOptions = <
|
|
|
627
363
|
Awaited<ReturnType<typeof getProducts>>,
|
|
628
364
|
TError,
|
|
629
365
|
TData
|
|
630
|
-
> & { queryKey:
|
|
366
|
+
> & { queryKey: QueryKey };
|
|
631
367
|
};
|
|
632
368
|
|
|
633
369
|
export type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
634
370
|
export type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
|
|
635
371
|
|
|
636
|
-
export function useGetProductsSuspense<
|
|
637
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
638
|
-
TError = ErrorType<AsError | void>,
|
|
639
|
-
>(
|
|
640
|
-
options: {
|
|
641
|
-
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
642
|
-
request?: SecondParameter<typeof customInstance>;
|
|
643
|
-
},
|
|
644
|
-
queryClient?: QueryClient,
|
|
645
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
646
|
-
export function useGetProductsSuspense<
|
|
647
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
648
|
-
TError = ErrorType<AsError | void>,
|
|
649
|
-
>(
|
|
650
|
-
options?: {
|
|
651
|
-
query?: Partial<
|
|
652
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
|
|
653
|
-
>;
|
|
654
|
-
request?: SecondParameter<typeof customInstance>;
|
|
655
|
-
},
|
|
656
|
-
queryClient?: QueryClient,
|
|
657
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
658
|
-
export function useGetProductsSuspense<
|
|
659
|
-
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
660
|
-
TError = ErrorType<AsError | void>,
|
|
661
|
-
>(
|
|
662
|
-
options?: {
|
|
663
|
-
query?: Partial<
|
|
664
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>
|
|
665
|
-
>;
|
|
666
|
-
request?: SecondParameter<typeof customInstance>;
|
|
667
|
-
},
|
|
668
|
-
queryClient?: QueryClient,
|
|
669
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
670
372
|
/**
|
|
671
373
|
* @summary Gets all Products
|
|
672
374
|
*/
|
|
@@ -674,21 +376,15 @@ export function useGetProductsSuspense<
|
|
|
674
376
|
export function useGetProductsSuspense<
|
|
675
377
|
TData = Awaited<ReturnType<typeof getProducts>>,
|
|
676
378
|
TError = ErrorType<AsError | void>,
|
|
677
|
-
>(
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
>;
|
|
682
|
-
request?: SecondParameter<typeof customInstance>;
|
|
683
|
-
},
|
|
684
|
-
queryClient?: QueryClient,
|
|
685
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
379
|
+
>(options?: {
|
|
380
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;
|
|
381
|
+
request?: SecondParameter<typeof customInstance>;
|
|
382
|
+
}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
686
383
|
const queryOptions = useGetProductsSuspenseQueryOptions(options);
|
|
687
384
|
|
|
688
|
-
const query = useSuspenseQuery(queryOptions
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
385
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
386
|
+
queryKey: QueryKey;
|
|
387
|
+
};
|
|
692
388
|
|
|
693
389
|
query.queryKey = queryOptions.queryKey;
|
|
694
390
|
|
|
@@ -721,9 +417,7 @@ export const useGetProductsForOrganisationQueryOptions = <
|
|
|
721
417
|
>(
|
|
722
418
|
orgId: string,
|
|
723
419
|
options?: {
|
|
724
|
-
query?:
|
|
725
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
726
|
-
>;
|
|
420
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
|
|
727
421
|
request?: SecondParameter<typeof customInstance>;
|
|
728
422
|
},
|
|
729
423
|
) => {
|
|
@@ -741,7 +435,7 @@ export const useGetProductsForOrganisationQueryOptions = <
|
|
|
741
435
|
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
742
436
|
TError,
|
|
743
437
|
TData
|
|
744
|
-
> & { queryKey:
|
|
438
|
+
> & { queryKey: QueryKey };
|
|
745
439
|
};
|
|
746
440
|
|
|
747
441
|
export type GetProductsForOrganisationQueryResult = NonNullable<
|
|
@@ -749,61 +443,6 @@ export type GetProductsForOrganisationQueryResult = NonNullable<
|
|
|
749
443
|
>;
|
|
750
444
|
export type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
751
445
|
|
|
752
|
-
export function useGetProductsForOrganisation<
|
|
753
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
754
|
-
TError = ErrorType<void | AsError>,
|
|
755
|
-
>(
|
|
756
|
-
orgId: string,
|
|
757
|
-
options: {
|
|
758
|
-
query: Partial<
|
|
759
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
760
|
-
> &
|
|
761
|
-
Pick<
|
|
762
|
-
DefinedInitialDataOptions<
|
|
763
|
-
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
764
|
-
TError,
|
|
765
|
-
Awaited<ReturnType<typeof getProductsForOrganisation>>
|
|
766
|
-
>,
|
|
767
|
-
"initialData"
|
|
768
|
-
>;
|
|
769
|
-
request?: SecondParameter<typeof customInstance>;
|
|
770
|
-
},
|
|
771
|
-
queryClient?: QueryClient,
|
|
772
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
773
|
-
export function useGetProductsForOrganisation<
|
|
774
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
775
|
-
TError = ErrorType<void | AsError>,
|
|
776
|
-
>(
|
|
777
|
-
orgId: string,
|
|
778
|
-
options?: {
|
|
779
|
-
query?: Partial<
|
|
780
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
781
|
-
> &
|
|
782
|
-
Pick<
|
|
783
|
-
UndefinedInitialDataOptions<
|
|
784
|
-
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
785
|
-
TError,
|
|
786
|
-
Awaited<ReturnType<typeof getProductsForOrganisation>>
|
|
787
|
-
>,
|
|
788
|
-
"initialData"
|
|
789
|
-
>;
|
|
790
|
-
request?: SecondParameter<typeof customInstance>;
|
|
791
|
-
},
|
|
792
|
-
queryClient?: QueryClient,
|
|
793
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
794
|
-
export function useGetProductsForOrganisation<
|
|
795
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
796
|
-
TError = ErrorType<void | AsError>,
|
|
797
|
-
>(
|
|
798
|
-
orgId: string,
|
|
799
|
-
options?: {
|
|
800
|
-
query?: Partial<
|
|
801
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
802
|
-
>;
|
|
803
|
-
request?: SecondParameter<typeof customInstance>;
|
|
804
|
-
},
|
|
805
|
-
queryClient?: QueryClient,
|
|
806
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
807
446
|
/**
|
|
808
447
|
* @summary Gets Products for an Organisation
|
|
809
448
|
*/
|
|
@@ -814,18 +453,13 @@ export function useGetProductsForOrganisation<
|
|
|
814
453
|
>(
|
|
815
454
|
orgId: string,
|
|
816
455
|
options?: {
|
|
817
|
-
query?:
|
|
818
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
819
|
-
>;
|
|
456
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;
|
|
820
457
|
request?: SecondParameter<typeof customInstance>;
|
|
821
458
|
},
|
|
822
|
-
|
|
823
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
459
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
824
460
|
const queryOptions = useGetProductsForOrganisationQueryOptions(orgId, options);
|
|
825
461
|
|
|
826
|
-
const query = useQuery(queryOptions
|
|
827
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
828
|
-
};
|
|
462
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
829
463
|
|
|
830
464
|
query.queryKey = queryOptions.queryKey;
|
|
831
465
|
|
|
@@ -838,8 +472,10 @@ export const useGetProductsForOrganisationSuspenseQueryOptions = <
|
|
|
838
472
|
>(
|
|
839
473
|
orgId: string,
|
|
840
474
|
options?: {
|
|
841
|
-
query?:
|
|
842
|
-
|
|
475
|
+
query?: UseSuspenseQueryOptions<
|
|
476
|
+
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
477
|
+
TError,
|
|
478
|
+
TData
|
|
843
479
|
>;
|
|
844
480
|
request?: SecondParameter<typeof customInstance>;
|
|
845
481
|
},
|
|
@@ -858,7 +494,7 @@ export const useGetProductsForOrganisationSuspenseQueryOptions = <
|
|
|
858
494
|
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
859
495
|
TError,
|
|
860
496
|
TData
|
|
861
|
-
> & { queryKey:
|
|
497
|
+
> & { queryKey: QueryKey };
|
|
862
498
|
};
|
|
863
499
|
|
|
864
500
|
export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
|
|
@@ -866,45 +502,6 @@ export type GetProductsForOrganisationSuspenseQueryResult = NonNullable<
|
|
|
866
502
|
>;
|
|
867
503
|
export type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
868
504
|
|
|
869
|
-
export function useGetProductsForOrganisationSuspense<
|
|
870
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
871
|
-
TError = ErrorType<void | AsError>,
|
|
872
|
-
>(
|
|
873
|
-
orgId: string,
|
|
874
|
-
options: {
|
|
875
|
-
query: Partial<
|
|
876
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
877
|
-
>;
|
|
878
|
-
request?: SecondParameter<typeof customInstance>;
|
|
879
|
-
},
|
|
880
|
-
queryClient?: QueryClient,
|
|
881
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
882
|
-
export function useGetProductsForOrganisationSuspense<
|
|
883
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
884
|
-
TError = ErrorType<void | AsError>,
|
|
885
|
-
>(
|
|
886
|
-
orgId: string,
|
|
887
|
-
options?: {
|
|
888
|
-
query?: Partial<
|
|
889
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
890
|
-
>;
|
|
891
|
-
request?: SecondParameter<typeof customInstance>;
|
|
892
|
-
},
|
|
893
|
-
queryClient?: QueryClient,
|
|
894
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
895
|
-
export function useGetProductsForOrganisationSuspense<
|
|
896
|
-
TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
897
|
-
TError = ErrorType<void | AsError>,
|
|
898
|
-
>(
|
|
899
|
-
orgId: string,
|
|
900
|
-
options?: {
|
|
901
|
-
query?: Partial<
|
|
902
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>
|
|
903
|
-
>;
|
|
904
|
-
request?: SecondParameter<typeof customInstance>;
|
|
905
|
-
},
|
|
906
|
-
queryClient?: QueryClient,
|
|
907
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
908
505
|
/**
|
|
909
506
|
* @summary Gets Products for an Organisation
|
|
910
507
|
*/
|
|
@@ -915,19 +512,19 @@ export function useGetProductsForOrganisationSuspense<
|
|
|
915
512
|
>(
|
|
916
513
|
orgId: string,
|
|
917
514
|
options?: {
|
|
918
|
-
query?:
|
|
919
|
-
|
|
515
|
+
query?: UseSuspenseQueryOptions<
|
|
516
|
+
Awaited<ReturnType<typeof getProductsForOrganisation>>,
|
|
517
|
+
TError,
|
|
518
|
+
TData
|
|
920
519
|
>;
|
|
921
520
|
request?: SecondParameter<typeof customInstance>;
|
|
922
521
|
},
|
|
923
|
-
|
|
924
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
522
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
925
523
|
const queryOptions = useGetProductsForOrganisationSuspenseQueryOptions(orgId, options);
|
|
926
524
|
|
|
927
|
-
const query = useSuspenseQuery(queryOptions
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
525
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
526
|
+
queryKey: QueryKey;
|
|
527
|
+
};
|
|
931
528
|
|
|
932
529
|
query.queryKey = queryOptions.queryKey;
|
|
933
530
|
|
|
@@ -1012,18 +609,18 @@ export type CreateUnitProductMutationError = ErrorType<AsError | void>;
|
|
|
1012
609
|
/**
|
|
1013
610
|
* @summary Creates a Product for a Unit
|
|
1014
611
|
*/
|
|
1015
|
-
export const useCreateUnitProduct = <
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
): UseMutationResult<
|
|
612
|
+
export const useCreateUnitProduct = <
|
|
613
|
+
TError = ErrorType<AsError | void>,
|
|
614
|
+
TContext = unknown,
|
|
615
|
+
>(options?: {
|
|
616
|
+
mutation?: UseMutationOptions<
|
|
617
|
+
Awaited<ReturnType<typeof createUnitProduct>>,
|
|
618
|
+
TError,
|
|
619
|
+
{ unitId: string; data: UnitProductPostBodyBody },
|
|
620
|
+
TContext
|
|
621
|
+
>;
|
|
622
|
+
request?: SecondParameter<typeof customInstance>;
|
|
623
|
+
}): UseMutationResult<
|
|
1027
624
|
Awaited<ReturnType<typeof createUnitProduct>>,
|
|
1028
625
|
TError,
|
|
1029
626
|
{ unitId: string; data: UnitProductPostBodyBody },
|
|
@@ -1031,7 +628,7 @@ export const useCreateUnitProduct = <TError = ErrorType<AsError | void>, TContex
|
|
|
1031
628
|
> => {
|
|
1032
629
|
const mutationOptions = useCreateUnitProductMutationOptions(options);
|
|
1033
630
|
|
|
1034
|
-
return useMutation(mutationOptions
|
|
631
|
+
return useMutation(mutationOptions);
|
|
1035
632
|
};
|
|
1036
633
|
/**
|
|
1037
634
|
* Gets products you have access to based on an Organisational **Unit**
|
|
@@ -1059,7 +656,7 @@ export const useGetProductsForUnitQueryOptions = <
|
|
|
1059
656
|
>(
|
|
1060
657
|
unitId: string,
|
|
1061
658
|
options?: {
|
|
1062
|
-
query?:
|
|
659
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
|
|
1063
660
|
request?: SecondParameter<typeof customInstance>;
|
|
1064
661
|
},
|
|
1065
662
|
) => {
|
|
@@ -1076,7 +673,7 @@ export const useGetProductsForUnitQueryOptions = <
|
|
|
1076
673
|
Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1077
674
|
TError,
|
|
1078
675
|
TData
|
|
1079
|
-
> & { queryKey:
|
|
676
|
+
> & { queryKey: QueryKey };
|
|
1080
677
|
};
|
|
1081
678
|
|
|
1082
679
|
export type GetProductsForUnitQueryResult = NonNullable<
|
|
@@ -1084,57 +681,6 @@ export type GetProductsForUnitQueryResult = NonNullable<
|
|
|
1084
681
|
>;
|
|
1085
682
|
export type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
1086
683
|
|
|
1087
|
-
export function useGetProductsForUnit<
|
|
1088
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1089
|
-
TError = ErrorType<void | AsError>,
|
|
1090
|
-
>(
|
|
1091
|
-
unitId: string,
|
|
1092
|
-
options: {
|
|
1093
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> &
|
|
1094
|
-
Pick<
|
|
1095
|
-
DefinedInitialDataOptions<
|
|
1096
|
-
Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1097
|
-
TError,
|
|
1098
|
-
Awaited<ReturnType<typeof getProductsForUnit>>
|
|
1099
|
-
>,
|
|
1100
|
-
"initialData"
|
|
1101
|
-
>;
|
|
1102
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1103
|
-
},
|
|
1104
|
-
queryClient?: QueryClient,
|
|
1105
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1106
|
-
export function useGetProductsForUnit<
|
|
1107
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1108
|
-
TError = ErrorType<void | AsError>,
|
|
1109
|
-
>(
|
|
1110
|
-
unitId: string,
|
|
1111
|
-
options?: {
|
|
1112
|
-
query?: Partial<
|
|
1113
|
-
UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1114
|
-
> &
|
|
1115
|
-
Pick<
|
|
1116
|
-
UndefinedInitialDataOptions<
|
|
1117
|
-
Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1118
|
-
TError,
|
|
1119
|
-
Awaited<ReturnType<typeof getProductsForUnit>>
|
|
1120
|
-
>,
|
|
1121
|
-
"initialData"
|
|
1122
|
-
>;
|
|
1123
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1124
|
-
},
|
|
1125
|
-
queryClient?: QueryClient,
|
|
1126
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1127
|
-
export function useGetProductsForUnit<
|
|
1128
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1129
|
-
TError = ErrorType<void | AsError>,
|
|
1130
|
-
>(
|
|
1131
|
-
unitId: string,
|
|
1132
|
-
options?: {
|
|
1133
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
1134
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1135
|
-
},
|
|
1136
|
-
queryClient?: QueryClient,
|
|
1137
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1138
684
|
/**
|
|
1139
685
|
* @summary Gets Products for an Organisational Unit
|
|
1140
686
|
*/
|
|
@@ -1145,16 +691,13 @@ export function useGetProductsForUnit<
|
|
|
1145
691
|
>(
|
|
1146
692
|
unitId: string,
|
|
1147
693
|
options?: {
|
|
1148
|
-
query?:
|
|
694
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
|
|
1149
695
|
request?: SecondParameter<typeof customInstance>;
|
|
1150
696
|
},
|
|
1151
|
-
|
|
1152
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
697
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
1153
698
|
const queryOptions = useGetProductsForUnitQueryOptions(unitId, options);
|
|
1154
699
|
|
|
1155
|
-
const query = useQuery(queryOptions
|
|
1156
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1157
|
-
};
|
|
700
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
1158
701
|
|
|
1159
702
|
query.queryKey = queryOptions.queryKey;
|
|
1160
703
|
|
|
@@ -1167,9 +710,7 @@ export const useGetProductsForUnitSuspenseQueryOptions = <
|
|
|
1167
710
|
>(
|
|
1168
711
|
unitId: string,
|
|
1169
712
|
options?: {
|
|
1170
|
-
query?:
|
|
1171
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1172
|
-
>;
|
|
713
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
|
|
1173
714
|
request?: SecondParameter<typeof customInstance>;
|
|
1174
715
|
},
|
|
1175
716
|
) => {
|
|
@@ -1186,7 +727,7 @@ export const useGetProductsForUnitSuspenseQueryOptions = <
|
|
|
1186
727
|
Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1187
728
|
TError,
|
|
1188
729
|
TData
|
|
1189
|
-
> & { queryKey:
|
|
730
|
+
> & { queryKey: QueryKey };
|
|
1190
731
|
};
|
|
1191
732
|
|
|
1192
733
|
export type GetProductsForUnitSuspenseQueryResult = NonNullable<
|
|
@@ -1194,45 +735,6 @@ export type GetProductsForUnitSuspenseQueryResult = NonNullable<
|
|
|
1194
735
|
>;
|
|
1195
736
|
export type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
1196
737
|
|
|
1197
|
-
export function useGetProductsForUnitSuspense<
|
|
1198
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1199
|
-
TError = ErrorType<void | AsError>,
|
|
1200
|
-
>(
|
|
1201
|
-
unitId: string,
|
|
1202
|
-
options: {
|
|
1203
|
-
query: Partial<
|
|
1204
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1205
|
-
>;
|
|
1206
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1207
|
-
},
|
|
1208
|
-
queryClient?: QueryClient,
|
|
1209
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1210
|
-
export function useGetProductsForUnitSuspense<
|
|
1211
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1212
|
-
TError = ErrorType<void | AsError>,
|
|
1213
|
-
>(
|
|
1214
|
-
unitId: string,
|
|
1215
|
-
options?: {
|
|
1216
|
-
query?: Partial<
|
|
1217
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1218
|
-
>;
|
|
1219
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1220
|
-
},
|
|
1221
|
-
queryClient?: QueryClient,
|
|
1222
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1223
|
-
export function useGetProductsForUnitSuspense<
|
|
1224
|
-
TData = Awaited<ReturnType<typeof getProductsForUnit>>,
|
|
1225
|
-
TError = ErrorType<void | AsError>,
|
|
1226
|
-
>(
|
|
1227
|
-
unitId: string,
|
|
1228
|
-
options?: {
|
|
1229
|
-
query?: Partial<
|
|
1230
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1231
|
-
>;
|
|
1232
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1233
|
-
},
|
|
1234
|
-
queryClient?: QueryClient,
|
|
1235
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1236
738
|
/**
|
|
1237
739
|
* @summary Gets Products for an Organisational Unit
|
|
1238
740
|
*/
|
|
@@ -1243,19 +745,15 @@ export function useGetProductsForUnitSuspense<
|
|
|
1243
745
|
>(
|
|
1244
746
|
unitId: string,
|
|
1245
747
|
options?: {
|
|
1246
|
-
query?:
|
|
1247
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>
|
|
1248
|
-
>;
|
|
748
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;
|
|
1249
749
|
request?: SecondParameter<typeof customInstance>;
|
|
1250
750
|
},
|
|
1251
|
-
|
|
1252
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
751
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
1253
752
|
const queryOptions = useGetProductsForUnitSuspenseQueryOptions(unitId, options);
|
|
1254
753
|
|
|
1255
|
-
const query = useSuspenseQuery(queryOptions
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
754
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
755
|
+
queryKey: QueryKey;
|
|
756
|
+
};
|
|
1259
757
|
|
|
1260
758
|
query.queryKey = queryOptions.queryKey;
|
|
1261
759
|
|
|
@@ -1288,7 +786,7 @@ export const useGetProductQueryOptions = <
|
|
|
1288
786
|
>(
|
|
1289
787
|
productId: string,
|
|
1290
788
|
options?: {
|
|
1291
|
-
query?:
|
|
789
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
|
|
1292
790
|
request?: SecondParameter<typeof customInstance>;
|
|
1293
791
|
},
|
|
1294
792
|
) => {
|
|
@@ -1302,62 +800,13 @@ export const useGetProductQueryOptions = <
|
|
|
1302
800
|
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
1303
801
|
|
|
1304
802
|
return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
1305
|
-
queryKey:
|
|
803
|
+
queryKey: QueryKey;
|
|
1306
804
|
};
|
|
1307
805
|
};
|
|
1308
806
|
|
|
1309
807
|
export type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
1310
808
|
export type GetProductQueryError = ErrorType<AsError | void>;
|
|
1311
809
|
|
|
1312
|
-
export function useGetProduct<
|
|
1313
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1314
|
-
TError = ErrorType<AsError | void>,
|
|
1315
|
-
>(
|
|
1316
|
-
productId: string,
|
|
1317
|
-
options: {
|
|
1318
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
|
|
1319
|
-
Pick<
|
|
1320
|
-
DefinedInitialDataOptions<
|
|
1321
|
-
Awaited<ReturnType<typeof getProduct>>,
|
|
1322
|
-
TError,
|
|
1323
|
-
Awaited<ReturnType<typeof getProduct>>
|
|
1324
|
-
>,
|
|
1325
|
-
"initialData"
|
|
1326
|
-
>;
|
|
1327
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1328
|
-
},
|
|
1329
|
-
queryClient?: QueryClient,
|
|
1330
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1331
|
-
export function useGetProduct<
|
|
1332
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1333
|
-
TError = ErrorType<AsError | void>,
|
|
1334
|
-
>(
|
|
1335
|
-
productId: string,
|
|
1336
|
-
options?: {
|
|
1337
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &
|
|
1338
|
-
Pick<
|
|
1339
|
-
UndefinedInitialDataOptions<
|
|
1340
|
-
Awaited<ReturnType<typeof getProduct>>,
|
|
1341
|
-
TError,
|
|
1342
|
-
Awaited<ReturnType<typeof getProduct>>
|
|
1343
|
-
>,
|
|
1344
|
-
"initialData"
|
|
1345
|
-
>;
|
|
1346
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1347
|
-
},
|
|
1348
|
-
queryClient?: QueryClient,
|
|
1349
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1350
|
-
export function useGetProduct<
|
|
1351
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1352
|
-
TError = ErrorType<AsError | void>,
|
|
1353
|
-
>(
|
|
1354
|
-
productId: string,
|
|
1355
|
-
options?: {
|
|
1356
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
1357
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1358
|
-
},
|
|
1359
|
-
queryClient?: QueryClient,
|
|
1360
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1361
810
|
/**
|
|
1362
811
|
* @summary Gets a Product
|
|
1363
812
|
*/
|
|
@@ -1368,16 +817,13 @@ export function useGetProduct<
|
|
|
1368
817
|
>(
|
|
1369
818
|
productId: string,
|
|
1370
819
|
options?: {
|
|
1371
|
-
query?:
|
|
820
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
|
|
1372
821
|
request?: SecondParameter<typeof customInstance>;
|
|
1373
822
|
},
|
|
1374
|
-
|
|
1375
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
823
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
1376
824
|
const queryOptions = useGetProductQueryOptions(productId, options);
|
|
1377
825
|
|
|
1378
|
-
const query = useQuery(queryOptions
|
|
1379
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1380
|
-
};
|
|
826
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
1381
827
|
|
|
1382
828
|
query.queryKey = queryOptions.queryKey;
|
|
1383
829
|
|
|
@@ -1390,7 +836,7 @@ export const useGetProductSuspenseQueryOptions = <
|
|
|
1390
836
|
>(
|
|
1391
837
|
productId: string,
|
|
1392
838
|
options?: {
|
|
1393
|
-
query?:
|
|
839
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
|
|
1394
840
|
request?: SecondParameter<typeof customInstance>;
|
|
1395
841
|
},
|
|
1396
842
|
) => {
|
|
@@ -1407,45 +853,12 @@ export const useGetProductSuspenseQueryOptions = <
|
|
|
1407
853
|
Awaited<ReturnType<typeof getProduct>>,
|
|
1408
854
|
TError,
|
|
1409
855
|
TData
|
|
1410
|
-
> & { queryKey:
|
|
856
|
+
> & { queryKey: QueryKey };
|
|
1411
857
|
};
|
|
1412
858
|
|
|
1413
859
|
export type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
1414
860
|
export type GetProductSuspenseQueryError = ErrorType<AsError | void>;
|
|
1415
861
|
|
|
1416
|
-
export function useGetProductSuspense<
|
|
1417
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1418
|
-
TError = ErrorType<AsError | void>,
|
|
1419
|
-
>(
|
|
1420
|
-
productId: string,
|
|
1421
|
-
options: {
|
|
1422
|
-
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
1423
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1424
|
-
},
|
|
1425
|
-
queryClient?: QueryClient,
|
|
1426
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1427
|
-
export function useGetProductSuspense<
|
|
1428
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1429
|
-
TError = ErrorType<AsError | void>,
|
|
1430
|
-
>(
|
|
1431
|
-
productId: string,
|
|
1432
|
-
options?: {
|
|
1433
|
-
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
1434
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1435
|
-
},
|
|
1436
|
-
queryClient?: QueryClient,
|
|
1437
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1438
|
-
export function useGetProductSuspense<
|
|
1439
|
-
TData = Awaited<ReturnType<typeof getProduct>>,
|
|
1440
|
-
TError = ErrorType<AsError | void>,
|
|
1441
|
-
>(
|
|
1442
|
-
productId: string,
|
|
1443
|
-
options?: {
|
|
1444
|
-
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
1445
|
-
request?: SecondParameter<typeof customInstance>;
|
|
1446
|
-
},
|
|
1447
|
-
queryClient?: QueryClient,
|
|
1448
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
1449
862
|
/**
|
|
1450
863
|
* @summary Gets a Product
|
|
1451
864
|
*/
|
|
@@ -1456,17 +869,15 @@ export function useGetProductSuspense<
|
|
|
1456
869
|
>(
|
|
1457
870
|
productId: string,
|
|
1458
871
|
options?: {
|
|
1459
|
-
query?:
|
|
872
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;
|
|
1460
873
|
request?: SecondParameter<typeof customInstance>;
|
|
1461
874
|
},
|
|
1462
|
-
|
|
1463
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
875
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
1464
876
|
const queryOptions = useGetProductSuspenseQueryOptions(productId, options);
|
|
1465
877
|
|
|
1466
|
-
const query = useSuspenseQuery(queryOptions
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
878
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
879
|
+
queryKey: QueryKey;
|
|
880
|
+
};
|
|
1470
881
|
|
|
1471
882
|
query.queryKey = queryOptions.queryKey;
|
|
1472
883
|
|
|
@@ -1530,18 +941,15 @@ export type DeleteProductMutationError = ErrorType<void | AsError>;
|
|
|
1530
941
|
/**
|
|
1531
942
|
* @summary Deletes an existing Product
|
|
1532
943
|
*/
|
|
1533
|
-
export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
},
|
|
1543
|
-
queryClient?: QueryClient,
|
|
1544
|
-
): UseMutationResult<
|
|
944
|
+
export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
945
|
+
mutation?: UseMutationOptions<
|
|
946
|
+
Awaited<ReturnType<typeof deleteProduct>>,
|
|
947
|
+
TError,
|
|
948
|
+
{ productId: string },
|
|
949
|
+
TContext
|
|
950
|
+
>;
|
|
951
|
+
request?: SecondParameter<typeof customInstance>;
|
|
952
|
+
}): UseMutationResult<
|
|
1545
953
|
Awaited<ReturnType<typeof deleteProduct>>,
|
|
1546
954
|
TError,
|
|
1547
955
|
{ productId: string },
|
|
@@ -1549,7 +957,7 @@ export const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext =
|
|
|
1549
957
|
> => {
|
|
1550
958
|
const mutationOptions = useDeleteProductMutationOptions(options);
|
|
1551
959
|
|
|
1552
|
-
return useMutation(mutationOptions
|
|
960
|
+
return useMutation(mutationOptions);
|
|
1553
961
|
};
|
|
1554
962
|
/**
|
|
1555
963
|
* Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
|
|
@@ -1621,18 +1029,15 @@ export type PatchProductMutationError = ErrorType<void | AsError>;
|
|
|
1621
1029
|
/**
|
|
1622
1030
|
* @summary Adjust an existing Product
|
|
1623
1031
|
*/
|
|
1624
|
-
export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
},
|
|
1634
|
-
queryClient?: QueryClient,
|
|
1635
|
-
): UseMutationResult<
|
|
1032
|
+
export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
1033
|
+
mutation?: UseMutationOptions<
|
|
1034
|
+
Awaited<ReturnType<typeof patchProduct>>,
|
|
1035
|
+
TError,
|
|
1036
|
+
{ productId: string; data: ProductPatchBodyBody },
|
|
1037
|
+
TContext
|
|
1038
|
+
>;
|
|
1039
|
+
request?: SecondParameter<typeof customInstance>;
|
|
1040
|
+
}): UseMutationResult<
|
|
1636
1041
|
Awaited<ReturnType<typeof patchProduct>>,
|
|
1637
1042
|
TError,
|
|
1638
1043
|
{ productId: string; data: ProductPatchBodyBody },
|
|
@@ -1640,5 +1045,5 @@ export const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = u
|
|
|
1640
1045
|
> => {
|
|
1641
1046
|
const mutationOptions = usePatchProductMutationOptions(options);
|
|
1642
1047
|
|
|
1643
|
-
return useMutation(mutationOptions
|
|
1048
|
+
return useMutation(mutationOptions);
|
|
1644
1049
|
};
|