@squonk/account-server-client 0.1.24-rc.1 → 0.1.27-rc.1

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 (51) hide show
  1. package/{custom-instance-4a108741.d.ts → account-server-api.schemas-e6c5f956.d.ts} +15 -20
  2. package/{chunk-JR7F532L.js → chunk-GWBPVOL2.js} +2 -23
  3. package/chunk-GWBPVOL2.js.map +1 -0
  4. package/chunk-N3RLW53G.cjs +25 -0
  5. package/chunk-N3RLW53G.cjs.map +1 -0
  6. package/index.cjs +21 -5
  7. package/index.cjs.map +1 -1
  8. package/index.d.ts +20 -2
  9. package/index.js +21 -5
  10. package/index.js.map +1 -1
  11. package/organisation/organisation.cjs +31 -31
  12. package/organisation/organisation.cjs.map +1 -1
  13. package/organisation/organisation.d.ts +37 -28
  14. package/organisation/organisation.js +38 -38
  15. package/organisation/organisation.js.map +1 -1
  16. package/package.json +14 -14
  17. package/product/product.cjs +64 -61
  18. package/product/product.cjs.map +1 -1
  19. package/product/product.d.ts +70 -40
  20. package/product/product.js +75 -72
  21. package/product/product.js.map +1 -1
  22. package/service/service.cjs +23 -21
  23. package/service/service.cjs.map +1 -1
  24. package/service/service.d.ts +19 -15
  25. package/service/service.js +26 -24
  26. package/service/service.js.map +1 -1
  27. package/src/account-server-api.schemas.ts +14 -1
  28. package/src/organisation/organisation.ts +86 -83
  29. package/src/product/product.ts +210 -145
  30. package/src/service/service.ts +64 -56
  31. package/src/state/state.ts +31 -32
  32. package/src/unit/unit.ts +170 -149
  33. package/src/user/user.ts +171 -160
  34. package/state/state.cjs +12 -12
  35. package/state/state.cjs.map +1 -1
  36. package/state/state.d.ts +12 -10
  37. package/state/state.js +13 -13
  38. package/state/state.js.map +1 -1
  39. package/unit/unit.cjs +54 -58
  40. package/unit/unit.cjs.map +1 -1
  41. package/unit/unit.d.ts +64 -49
  42. package/unit/unit.js +67 -71
  43. package/unit/unit.js.map +1 -1
  44. package/user/user.cjs +56 -56
  45. package/user/user.cjs.map +1 -1
  46. package/user/user.d.ts +69 -55
  47. package/user/user.js +69 -69
  48. package/user/user.js.map +1 -1
  49. package/chunk-3DXYUDZH.cjs +0 -46
  50. package/chunk-3DXYUDZH.cjs.map +0 -1
  51. package/chunk-JR7F532L.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.6.0 🍺
2
+ * Generated by orval v6.7.1 🍺
3
3
  * Do not edit manually.
4
4
  * Account Server API
5
5
  * The Informatics Matters Account Server API.
@@ -8,6 +8,7 @@ A service that provides access to the Account Server, which gives *registered* u
8
8
 
9
9
  * OpenAPI spec version: 0.1
10
10
  */
11
+ import axios, { AxiosRequestConfig, AxiosResponse, AxiosError } from "axios";
11
12
  import {
12
13
  useQuery,
13
14
  useMutation,
@@ -27,7 +28,6 @@ import type {
27
28
  ProductUnitGetResponse,
28
29
  ProductPatchBodyBody,
29
30
  } from "../account-server-api.schemas";
30
- import { customInstance, ErrorType } from ".././custom-instance";
31
31
 
32
32
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
33
  type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (
@@ -36,50 +36,45 @@ type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (
36
36
  ? R
37
37
  : any;
38
38
 
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- type SecondParameter<T extends (...args: any) => any> = T extends (
41
- config: any,
42
- args: infer P
43
- ) => any
44
- ? P
45
- : never;
46
-
47
39
  /**
48
40
  * Gets product types you can purchase
49
41
 
50
42
  * @summary Gets all Product Types
51
43
  */
52
- export const getProductTypes = (
53
- options?: SecondParameter<typeof customInstance>
54
- ) => {
55
- return customInstance<ProductsGetTypesResponse>(
56
- { url: `/product-type`, method: "get" },
57
- options
58
- );
44
+ export const appApiProductGetTypes = (
45
+ options?: AxiosRequestConfig
46
+ ): Promise<AxiosResponse<ProductsGetTypesResponse>> => {
47
+ return axios.get(`/product-type`, options);
59
48
  };
60
49
 
61
- export const getGetProductTypesQueryKey = () => [`/product-type`];
50
+ export const getAppApiProductGetTypesQueryKey = () => [`/product-type`];
62
51
 
63
- export const useGetProductTypes = <
64
- TData = AsyncReturnType<typeof getProductTypes>,
65
- TError = ErrorType<AsError | void>
52
+ export type AppApiProductGetTypesQueryResult = NonNullable<
53
+ AsyncReturnType<typeof appApiProductGetTypes>
54
+ >;
55
+ export type AppApiProductGetTypesQueryError = AxiosError<AsError | void>;
56
+
57
+ export const useAppApiProductGetTypes = <
58
+ TData = AsyncReturnType<typeof appApiProductGetTypes>,
59
+ TError = AxiosError<AsError | void>
66
60
  >(options?: {
67
61
  query?: UseQueryOptions<
68
- AsyncReturnType<typeof getProductTypes>,
62
+ AsyncReturnType<typeof appApiProductGetTypes>,
69
63
  TError,
70
64
  TData
71
65
  >;
72
- request?: SecondParameter<typeof customInstance>;
66
+ axios?: AxiosRequestConfig;
73
67
  }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
74
- const { query: queryOptions, request: requestOptions } = options || {};
68
+ const { query: queryOptions, axios: axiosOptions } = options || {};
75
69
 
76
- const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();
70
+ const queryKey = queryOptions?.queryKey ?? getAppApiProductGetTypesQueryKey();
77
71
 
78
- const queryFn: QueryFunction<AsyncReturnType<typeof getProductTypes>> = () =>
79
- getProductTypes(requestOptions);
72
+ const queryFn: QueryFunction<
73
+ AsyncReturnType<typeof appApiProductGetTypes>
74
+ > = () => appApiProductGetTypes(axiosOptions);
80
75
 
81
76
  const query = useQuery<
82
- AsyncReturnType<typeof getProductTypes>,
77
+ AsyncReturnType<typeof appApiProductGetTypes>,
83
78
  TError,
84
79
  TData
85
80
  >(queryKey, queryFn, queryOptions);
@@ -95,36 +90,42 @@ export const useGetProductTypes = <
95
90
 
96
91
  * @summary Gets all Products
97
92
  */
98
- export const getProducts = (
99
- options?: SecondParameter<typeof customInstance>
100
- ) => {
101
- return customInstance<ProductsGetResponse>(
102
- { url: `/product`, method: "get" },
103
- options
104
- );
93
+ export const appApiProductGet = (
94
+ options?: AxiosRequestConfig
95
+ ): Promise<AxiosResponse<ProductsGetResponse>> => {
96
+ return axios.get(`/product`, options);
105
97
  };
106
98
 
107
- export const getGetProductsQueryKey = () => [`/product`];
99
+ export const getAppApiProductGetQueryKey = () => [`/product`];
108
100
 
109
- export const useGetProducts = <
110
- TData = AsyncReturnType<typeof getProducts>,
111
- TError = ErrorType<AsError | void>
101
+ export type AppApiProductGetQueryResult = NonNullable<
102
+ AsyncReturnType<typeof appApiProductGet>
103
+ >;
104
+ export type AppApiProductGetQueryError = AxiosError<AsError | void>;
105
+
106
+ export const useAppApiProductGet = <
107
+ TData = AsyncReturnType<typeof appApiProductGet>,
108
+ TError = AxiosError<AsError | void>
112
109
  >(options?: {
113
- query?: UseQueryOptions<AsyncReturnType<typeof getProducts>, TError, TData>;
114
- request?: SecondParameter<typeof customInstance>;
110
+ query?: UseQueryOptions<
111
+ AsyncReturnType<typeof appApiProductGet>,
112
+ TError,
113
+ TData
114
+ >;
115
+ axios?: AxiosRequestConfig;
115
116
  }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
116
- const { query: queryOptions, request: requestOptions } = options || {};
117
+ const { query: queryOptions, axios: axiosOptions } = options || {};
117
118
 
118
- const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();
119
+ const queryKey = queryOptions?.queryKey ?? getAppApiProductGetQueryKey();
119
120
 
120
- const queryFn: QueryFunction<AsyncReturnType<typeof getProducts>> = () =>
121
- getProducts(requestOptions);
121
+ const queryFn: QueryFunction<AsyncReturnType<typeof appApiProductGet>> = () =>
122
+ appApiProductGet(axiosOptions);
122
123
 
123
- const query = useQuery<AsyncReturnType<typeof getProducts>, TError, TData>(
124
- queryKey,
125
- queryFn,
126
- queryOptions
127
- );
124
+ const query = useQuery<
125
+ AsyncReturnType<typeof appApiProductGet>,
126
+ TError,
127
+ TData
128
+ >(queryKey, queryFn, queryOptions);
128
129
 
129
130
  return {
130
131
  queryKey,
@@ -135,48 +136,51 @@ export const useGetProducts = <
135
136
  /**
136
137
  * @summary Creates a Product for an Organisational Unit
137
138
  */
138
- export const createUnitProduct = (
139
- unitid: string,
139
+ export const appApiProductPost = (
140
+ unitId: string,
140
141
  unitProductPostBodyBody: UnitProductPostBodyBody,
141
- options?: SecondParameter<typeof customInstance>
142
- ) => {
143
- return customInstance<UnitProductPostResponse>(
144
- {
145
- url: `/product/unit/${unitid}`,
146
- method: "post",
147
- data: unitProductPostBodyBody,
148
- },
142
+ options?: AxiosRequestConfig
143
+ ): Promise<AxiosResponse<UnitProductPostResponse>> => {
144
+ return axios.post(
145
+ `/product/unit/${unitId}`,
146
+ unitProductPostBodyBody,
149
147
  options
150
148
  );
151
149
  };
152
150
 
153
- export const useCreateUnitProduct = <
154
- TError = ErrorType<AsError | void>,
151
+ export type AppApiProductPostMutationResult = NonNullable<
152
+ AsyncReturnType<typeof appApiProductPost>
153
+ >;
154
+ export type AppApiProductPostMutationBody = UnitProductPostBodyBody;
155
+ export type AppApiProductPostMutationError = AxiosError<AsError | void>;
156
+
157
+ export const useAppApiProductPost = <
158
+ TError = AxiosError<AsError | void>,
155
159
  TContext = unknown
156
160
  >(options?: {
157
161
  mutation?: UseMutationOptions<
158
- AsyncReturnType<typeof createUnitProduct>,
162
+ AsyncReturnType<typeof appApiProductPost>,
159
163
  TError,
160
- { unitid: string; data: UnitProductPostBodyBody },
164
+ { unitId: string; data: UnitProductPostBodyBody },
161
165
  TContext
162
166
  >;
163
- request?: SecondParameter<typeof customInstance>;
167
+ axios?: AxiosRequestConfig;
164
168
  }) => {
165
- const { mutation: mutationOptions, request: requestOptions } = options || {};
169
+ const { mutation: mutationOptions, axios: axiosOptions } = options || {};
166
170
 
167
171
  const mutationFn: MutationFunction<
168
- AsyncReturnType<typeof createUnitProduct>,
169
- { unitid: string; data: UnitProductPostBodyBody }
172
+ AsyncReturnType<typeof appApiProductPost>,
173
+ { unitId: string; data: UnitProductPostBodyBody }
170
174
  > = (props) => {
171
- const { unitid, data } = props || {};
175
+ const { unitId, data } = props || {};
172
176
 
173
- return createUnitProduct(unitid, data, requestOptions);
177
+ return appApiProductPost(unitId, data, axiosOptions);
174
178
  };
175
179
 
176
180
  return useMutation<
177
- AsyncReturnType<typeof createUnitProduct>,
181
+ AsyncReturnType<typeof appApiProductPost>,
178
182
  TError,
179
- { unitid: string; data: UnitProductPostBodyBody },
183
+ { unitId: string; data: UnitProductPostBodyBody },
180
184
  TContext
181
185
  >(mutationFn, mutationOptions);
182
186
  };
@@ -185,48 +189,50 @@ export const useCreateUnitProduct = <
185
189
 
186
190
  * @summary Gets Products for an Organisational Unit
187
191
  */
188
- export const getProductsForUnit = (
189
- unitid: string,
190
- options?: SecondParameter<typeof customInstance>
191
- ) => {
192
- return customInstance<ProductsGetResponse>(
193
- { url: `/product/unit/${unitid}`, method: "get" },
194
- options
195
- );
192
+ export const appApiProductGetForUnit = (
193
+ unitId: string,
194
+ options?: AxiosRequestConfig
195
+ ): Promise<AxiosResponse<ProductsGetResponse>> => {
196
+ return axios.get(`/product/unit/${unitId}`, options);
196
197
  };
197
198
 
198
- export const getGetProductsForUnitQueryKey = (unitid: string) => [
199
- `/product/unit/${unitid}`,
199
+ export const getAppApiProductGetForUnitQueryKey = (unitId: string) => [
200
+ `/product/unit/${unitId}`,
200
201
  ];
201
202
 
202
- export const useGetProductsForUnit = <
203
- TData = AsyncReturnType<typeof getProductsForUnit>,
204
- TError = ErrorType<void | AsError>
203
+ export type AppApiProductGetForUnitQueryResult = NonNullable<
204
+ AsyncReturnType<typeof appApiProductGetForUnit>
205
+ >;
206
+ export type AppApiProductGetForUnitQueryError = AxiosError<void | AsError>;
207
+
208
+ export const useAppApiProductGetForUnit = <
209
+ TData = AsyncReturnType<typeof appApiProductGetForUnit>,
210
+ TError = AxiosError<void | AsError>
205
211
  >(
206
- unitid: string,
212
+ unitId: string,
207
213
  options?: {
208
214
  query?: UseQueryOptions<
209
- AsyncReturnType<typeof getProductsForUnit>,
215
+ AsyncReturnType<typeof appApiProductGetForUnit>,
210
216
  TError,
211
217
  TData
212
218
  >;
213
- request?: SecondParameter<typeof customInstance>;
219
+ axios?: AxiosRequestConfig;
214
220
  }
215
221
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
216
- const { query: queryOptions, request: requestOptions } = options || {};
222
+ const { query: queryOptions, axios: axiosOptions } = options || {};
217
223
 
218
224
  const queryKey =
219
- queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitid);
225
+ queryOptions?.queryKey ?? getAppApiProductGetForUnitQueryKey(unitId);
220
226
 
221
227
  const queryFn: QueryFunction<
222
- AsyncReturnType<typeof getProductsForUnit>
223
- > = () => getProductsForUnit(unitid, requestOptions);
228
+ AsyncReturnType<typeof appApiProductGetForUnit>
229
+ > = () => appApiProductGetForUnit(unitId, axiosOptions);
224
230
 
225
231
  const query = useQuery<
226
- AsyncReturnType<typeof getProductsForUnit>,
232
+ AsyncReturnType<typeof appApiProductGetForUnit>,
227
233
  TError,
228
234
  TData
229
- >(queryKey, queryFn, { enabled: !!unitid, ...queryOptions });
235
+ >(queryKey, queryFn, { enabled: !!unitId, ...queryOptions });
230
236
 
231
237
  return {
232
238
  queryKey,
@@ -239,45 +245,54 @@ export const useGetProductsForUnit = <
239
245
 
240
246
  * @summary Gets a Unit's Product
241
247
  */
242
- export const getProduct = (
243
- unitid: string,
244
- productid: string,
245
- options?: SecondParameter<typeof customInstance>
246
- ) => {
247
- return customInstance<ProductUnitGetResponse>(
248
- { url: `/product/unit/${unitid}/product/${productid}`, method: "get" },
249
- options
250
- );
248
+ export const appApiProductGetUnitProduct = (
249
+ unitId: string,
250
+ productId: string,
251
+ options?: AxiosRequestConfig
252
+ ): Promise<AxiosResponse<ProductUnitGetResponse>> => {
253
+ return axios.get(`/product/unit/${unitId}/product/${productId}`, options);
251
254
  };
252
255
 
253
- export const getGetProductQueryKey = (unitid: string, productid: string) => [
254
- `/product/unit/${unitid}/product/${productid}`,
255
- ];
256
+ export const getAppApiProductGetUnitProductQueryKey = (
257
+ unitId: string,
258
+ productId: string
259
+ ) => [`/product/unit/${unitId}/product/${productId}`];
256
260
 
257
- export const useGetProduct = <
258
- TData = AsyncReturnType<typeof getProduct>,
259
- TError = ErrorType<AsError | void>
261
+ export type AppApiProductGetUnitProductQueryResult = NonNullable<
262
+ AsyncReturnType<typeof appApiProductGetUnitProduct>
263
+ >;
264
+ export type AppApiProductGetUnitProductQueryError = AxiosError<AsError | void>;
265
+
266
+ export const useAppApiProductGetUnitProduct = <
267
+ TData = AsyncReturnType<typeof appApiProductGetUnitProduct>,
268
+ TError = AxiosError<AsError | void>
260
269
  >(
261
- unitid: string,
262
- productid: string,
270
+ unitId: string,
271
+ productId: string,
263
272
  options?: {
264
- query?: UseQueryOptions<AsyncReturnType<typeof getProduct>, TError, TData>;
265
- request?: SecondParameter<typeof customInstance>;
273
+ query?: UseQueryOptions<
274
+ AsyncReturnType<typeof appApiProductGetUnitProduct>,
275
+ TError,
276
+ TData
277
+ >;
278
+ axios?: AxiosRequestConfig;
266
279
  }
267
280
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
268
- const { query: queryOptions, request: requestOptions } = options || {};
281
+ const { query: queryOptions, axios: axiosOptions } = options || {};
269
282
 
270
283
  const queryKey =
271
- queryOptions?.queryKey ?? getGetProductQueryKey(unitid, productid);
284
+ queryOptions?.queryKey ??
285
+ getAppApiProductGetUnitProductQueryKey(unitId, productId);
272
286
 
273
- const queryFn: QueryFunction<AsyncReturnType<typeof getProduct>> = () =>
274
- getProduct(unitid, productid, requestOptions);
287
+ const queryFn: QueryFunction<
288
+ AsyncReturnType<typeof appApiProductGetUnitProduct>
289
+ > = () => appApiProductGetUnitProduct(unitId, productId, axiosOptions);
275
290
 
276
- const query = useQuery<AsyncReturnType<typeof getProduct>, TError, TData>(
277
- queryKey,
278
- queryFn,
279
- { enabled: !!(unitid && productid), ...queryOptions }
280
- );
291
+ const query = useQuery<
292
+ AsyncReturnType<typeof appApiProductGetUnitProduct>,
293
+ TError,
294
+ TData
295
+ >(queryKey, queryFn, { enabled: !!(unitId && productId), ...queryOptions });
281
296
 
282
297
  return {
283
298
  queryKey,
@@ -285,54 +300,104 @@ export const useGetProduct = <
285
300
  };
286
301
  };
287
302
 
303
+ /**
304
+ * @summary Deletes an existing Product
305
+ */
306
+ export const appApiProductDelete = (
307
+ unitId: string,
308
+ productId: string,
309
+ options?: AxiosRequestConfig
310
+ ): Promise<AxiosResponse<void>> => {
311
+ return axios.delete(`/product/unit/${unitId}/product/${productId}`, options);
312
+ };
313
+
314
+ export type AppApiProductDeleteMutationResult = NonNullable<
315
+ AsyncReturnType<typeof appApiProductDelete>
316
+ >;
317
+
318
+ export type AppApiProductDeleteMutationError = AxiosError<AsError>;
319
+
320
+ export const useAppApiProductDelete = <
321
+ TError = AxiosError<AsError>,
322
+ TContext = unknown
323
+ >(options?: {
324
+ mutation?: UseMutationOptions<
325
+ AsyncReturnType<typeof appApiProductDelete>,
326
+ TError,
327
+ { unitId: string; productId: string },
328
+ TContext
329
+ >;
330
+ axios?: AxiosRequestConfig;
331
+ }) => {
332
+ const { mutation: mutationOptions, axios: axiosOptions } = options || {};
333
+
334
+ const mutationFn: MutationFunction<
335
+ AsyncReturnType<typeof appApiProductDelete>,
336
+ { unitId: string; productId: string }
337
+ > = (props) => {
338
+ const { unitId, productId } = props || {};
339
+
340
+ return appApiProductDelete(unitId, productId, axiosOptions);
341
+ };
342
+
343
+ return useMutation<
344
+ AsyncReturnType<typeof appApiProductDelete>,
345
+ TError,
346
+ { unitId: string; productId: string },
347
+ TContext
348
+ >(mutationFn, mutationOptions);
349
+ };
288
350
  /**
289
351
  * Used to update some adjustable parameters of a Product, i.e. to extend the Allowance or Limit. At the moment Data Manager products can be patched by changing the `name`, it's coin `allowance` or `limit`
290
352
 
291
353
  * @summary Adjust an existing Product
292
354
  */
293
- export const patchProduct = (
294
- unitid: string,
295
- productid: string,
355
+ export const appApiProductPatch = (
356
+ unitId: string,
357
+ productId: string,
296
358
  productPatchBodyBody: ProductPatchBodyBody,
297
- options?: SecondParameter<typeof customInstance>
298
- ) => {
299
- return customInstance<void>(
300
- {
301
- url: `/product/unit/${unitid}/product/${productid}`,
302
- method: "patch",
303
- data: productPatchBodyBody,
304
- },
359
+ options?: AxiosRequestConfig
360
+ ): Promise<AxiosResponse<void>> => {
361
+ return axios.patch(
362
+ `/product/unit/${unitId}/product/${productId}`,
363
+ productPatchBodyBody,
305
364
  options
306
365
  );
307
366
  };
308
367
 
309
- export const usePatchProduct = <
310
- TError = ErrorType<AsError>,
368
+ export type AppApiProductPatchMutationResult = NonNullable<
369
+ AsyncReturnType<typeof appApiProductPatch>
370
+ >;
371
+ export type AppApiProductPatchMutationBody = ProductPatchBodyBody;
372
+ export type AppApiProductPatchMutationError = AxiosError<AsError>;
373
+
374
+ export const useAppApiProductPatch = <
375
+ TError = AxiosError<AsError>,
311
376
  TContext = unknown
312
377
  >(options?: {
313
378
  mutation?: UseMutationOptions<
314
- AsyncReturnType<typeof patchProduct>,
379
+ AsyncReturnType<typeof appApiProductPatch>,
315
380
  TError,
316
- { unitid: string; productid: string; data: ProductPatchBodyBody },
381
+ { unitId: string; productId: string; data: ProductPatchBodyBody },
317
382
  TContext
318
383
  >;
319
- request?: SecondParameter<typeof customInstance>;
384
+ axios?: AxiosRequestConfig;
320
385
  }) => {
321
- const { mutation: mutationOptions, request: requestOptions } = options || {};
386
+ const { mutation: mutationOptions, axios: axiosOptions } = options || {};
322
387
 
323
388
  const mutationFn: MutationFunction<
324
- AsyncReturnType<typeof patchProduct>,
325
- { unitid: string; productid: string; data: ProductPatchBodyBody }
389
+ AsyncReturnType<typeof appApiProductPatch>,
390
+ { unitId: string; productId: string; data: ProductPatchBodyBody }
326
391
  > = (props) => {
327
- const { unitid, productid, data } = props || {};
392
+ const { unitId, productId, data } = props || {};
328
393
 
329
- return patchProduct(unitid, productid, data, requestOptions);
394
+ return appApiProductPatch(unitId, productId, data, axiosOptions);
330
395
  };
331
396
 
332
397
  return useMutation<
333
- AsyncReturnType<typeof patchProduct>,
398
+ AsyncReturnType<typeof appApiProductPatch>,
334
399
  TError,
335
- { unitid: string; productid: string; data: ProductPatchBodyBody },
400
+ { unitId: string; productId: string; data: ProductPatchBodyBody },
336
401
  TContext
337
402
  >(mutationFn, mutationOptions);
338
403
  };