@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +24 -24
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +137 -102
- package/asset/asset.d.ts +137 -102
- package/asset/asset.js +24 -24
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +16 -16
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +137 -65
- package/charges/charges.d.ts +137 -65
- package/charges/charges.js +16 -16
- package/charges/charges.js.map +1 -1
- package/chunk-TKLTUR4R.cjs.map +1 -1
- package/event-stream/event-stream.cjs +8 -8
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +82 -47
- package/event-stream/event-stream.d.ts +82 -47
- package/event-stream/event-stream.js +8 -8
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +62 -14
- package/index.d.ts +62 -14
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +8 -8
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +69 -33
- package/merchant/merchant.d.ts +69 -33
- package/merchant/merchant.js +8 -8
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +14 -14
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +128 -75
- package/organisation/organisation.d.ts +128 -75
- package/organisation/organisation.js +14 -14
- package/organisation/organisation.js.map +1 -1
- package/package.json +7 -7
- package/product/product.cjs +24 -24
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +229 -122
- package/product/product.d.ts +229 -122
- package/product/product.js +24 -24
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +63 -14
- package/src/asset/asset.ts +185 -65
- package/src/charges/charges.ts +200 -18
- package/src/event-stream/event-stream.ts +114 -19
- package/src/merchant/merchant.ts +94 -10
- package/src/organisation/organisation.ts +171 -31
- package/src/product/product.ts +301 -41
- package/src/state/state.ts +50 -6
- package/src/unit/unit.ts +188 -38
- package/src/user/user.ts +183 -38
- package/state/state.cjs +4 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +35 -17
- package/state/state.d.ts +35 -17
- package/state/state.js +4 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +12 -12
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +140 -87
- package/unit/unit.d.ts +140 -87
- package/unit/unit.js +12 -12
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +12 -12
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +139 -86
- package/user/user.d.ts +139 -86
- package/user/user.js +12 -12
- package/user/user.js.map +1 -1
package/product/product.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
3
2
|
import { customInstance, ProductsGetTypesResponse, ErrorType, AsError, ProductsGetDefaultStorageCost, ProductsGetResponse, UnitProductPostBodyBody, UnitProductPostResponse, ProductUnitGetResponse, ProductPatchBodyBody } from '../index.cjs';
|
|
4
3
|
import 'axios';
|
|
5
4
|
|
|
@@ -12,37 +11,55 @@ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
|
12
11
|
declare const getProductTypes: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetTypesResponse>;
|
|
13
12
|
declare const getGetProductTypesQueryKey: () => readonly ["account-server-api", "/product-type"];
|
|
14
13
|
declare const getGetProductTypesQueryOptions: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
15
|
-
query?: Partial<UseQueryOptions<
|
|
14
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
16
15
|
request?: SecondParameter<typeof customInstance>;
|
|
17
|
-
}
|
|
16
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
18
17
|
queryKey: QueryKey;
|
|
19
18
|
};
|
|
20
19
|
type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
21
20
|
type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options: {
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>, 'initialData'>;
|
|
23
|
+
request?: SecondParameter<typeof customInstance>;
|
|
24
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
+
queryKey: QueryKey;
|
|
26
|
+
};
|
|
27
|
+
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>, 'initialData'>;
|
|
29
|
+
request?: SecondParameter<typeof customInstance>;
|
|
30
|
+
}): UseQueryResult<TData, TError> & {
|
|
31
|
+
queryKey: QueryKey;
|
|
32
|
+
};
|
|
33
|
+
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
34
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
27
35
|
request?: SecondParameter<typeof customInstance>;
|
|
28
|
-
}
|
|
36
|
+
}): UseQueryResult<TData, TError> & {
|
|
29
37
|
queryKey: QueryKey;
|
|
30
38
|
};
|
|
31
39
|
declare const getGetProductTypesSuspenseQueryOptions: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
32
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
40
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
33
41
|
request?: SecondParameter<typeof customInstance>;
|
|
34
|
-
}
|
|
42
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
35
43
|
queryKey: QueryKey;
|
|
36
44
|
};
|
|
37
45
|
type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
38
46
|
type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
declare const useGetProductTypesSuspense: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
43
|
-
query?: Partial<UseSuspenseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
47
|
+
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options: {
|
|
48
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
44
49
|
request?: SecondParameter<typeof customInstance>;
|
|
45
|
-
}
|
|
50
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
51
|
+
queryKey: QueryKey;
|
|
52
|
+
};
|
|
53
|
+
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
54
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
55
|
+
request?: SecondParameter<typeof customInstance>;
|
|
56
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
57
|
+
queryKey: QueryKey;
|
|
58
|
+
};
|
|
59
|
+
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
60
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
61
|
+
request?: SecondParameter<typeof customInstance>;
|
|
62
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
46
63
|
queryKey: QueryKey;
|
|
47
64
|
};
|
|
48
65
|
/**
|
|
@@ -53,37 +70,55 @@ declare const useGetProductTypesSuspense: <TData = ProductsGetTypesResponse, TEr
|
|
|
53
70
|
declare const getProductDefaultStorageCost: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetDefaultStorageCost>;
|
|
54
71
|
declare const getGetProductDefaultStorageCostQueryKey: () => readonly ["account-server-api", "/product-default-storage-cost"];
|
|
55
72
|
declare const getGetProductDefaultStorageCostQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
56
|
-
query?: Partial<UseQueryOptions<
|
|
73
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
57
74
|
request?: SecondParameter<typeof customInstance>;
|
|
58
|
-
}
|
|
75
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
59
76
|
queryKey: QueryKey;
|
|
60
77
|
};
|
|
61
78
|
type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
62
79
|
type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
80
|
+
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options: {
|
|
81
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>, 'initialData'>;
|
|
82
|
+
request?: SecondParameter<typeof customInstance>;
|
|
83
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
84
|
+
queryKey: QueryKey;
|
|
85
|
+
};
|
|
86
|
+
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
87
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>, 'initialData'>;
|
|
88
|
+
request?: SecondParameter<typeof customInstance>;
|
|
89
|
+
}): UseQueryResult<TData, TError> & {
|
|
90
|
+
queryKey: QueryKey;
|
|
91
|
+
};
|
|
92
|
+
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
93
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
68
94
|
request?: SecondParameter<typeof customInstance>;
|
|
69
|
-
}
|
|
95
|
+
}): UseQueryResult<TData, TError> & {
|
|
70
96
|
queryKey: QueryKey;
|
|
71
97
|
};
|
|
72
98
|
declare const getGetProductDefaultStorageCostSuspenseQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
73
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
99
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
74
100
|
request?: SecondParameter<typeof customInstance>;
|
|
75
|
-
}
|
|
101
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
76
102
|
queryKey: QueryKey;
|
|
77
103
|
};
|
|
78
104
|
type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
79
105
|
type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*/
|
|
83
|
-
declare const useGetProductDefaultStorageCostSuspense: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
84
|
-
query?: Partial<UseSuspenseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
106
|
+
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options: {
|
|
107
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
85
108
|
request?: SecondParameter<typeof customInstance>;
|
|
86
|
-
}
|
|
109
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
110
|
+
queryKey: QueryKey;
|
|
111
|
+
};
|
|
112
|
+
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
113
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
114
|
+
request?: SecondParameter<typeof customInstance>;
|
|
115
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
116
|
+
queryKey: QueryKey;
|
|
117
|
+
};
|
|
118
|
+
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
119
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
120
|
+
request?: SecondParameter<typeof customInstance>;
|
|
121
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
87
122
|
queryKey: QueryKey;
|
|
88
123
|
};
|
|
89
124
|
/**
|
|
@@ -94,37 +129,55 @@ declare const useGetProductDefaultStorageCostSuspense: <TData = ProductsGetDefau
|
|
|
94
129
|
declare const getProducts: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
95
130
|
declare const getGetProductsQueryKey: () => readonly ["account-server-api", "/product"];
|
|
96
131
|
declare const getGetProductsQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
97
|
-
query?: Partial<UseQueryOptions<
|
|
132
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
98
133
|
request?: SecondParameter<typeof customInstance>;
|
|
99
|
-
}
|
|
134
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
100
135
|
queryKey: QueryKey;
|
|
101
136
|
};
|
|
102
137
|
type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
103
138
|
type GetProductsQueryError = ErrorType<AsError | void>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
139
|
+
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options: {
|
|
140
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>, 'initialData'>;
|
|
141
|
+
request?: SecondParameter<typeof customInstance>;
|
|
142
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
143
|
+
queryKey: QueryKey;
|
|
144
|
+
};
|
|
145
|
+
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
146
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>, 'initialData'>;
|
|
109
147
|
request?: SecondParameter<typeof customInstance>;
|
|
110
|
-
}
|
|
148
|
+
}): UseQueryResult<TData, TError> & {
|
|
149
|
+
queryKey: QueryKey;
|
|
150
|
+
};
|
|
151
|
+
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
152
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
153
|
+
request?: SecondParameter<typeof customInstance>;
|
|
154
|
+
}): UseQueryResult<TData, TError> & {
|
|
111
155
|
queryKey: QueryKey;
|
|
112
156
|
};
|
|
113
157
|
declare const getGetProductsSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
114
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
158
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
115
159
|
request?: SecondParameter<typeof customInstance>;
|
|
116
|
-
}
|
|
160
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
117
161
|
queryKey: QueryKey;
|
|
118
162
|
};
|
|
119
163
|
type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
120
164
|
type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
165
|
+
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options: {
|
|
166
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
167
|
+
request?: SecondParameter<typeof customInstance>;
|
|
168
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
169
|
+
queryKey: QueryKey;
|
|
170
|
+
};
|
|
171
|
+
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
172
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
173
|
+
request?: SecondParameter<typeof customInstance>;
|
|
174
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
175
|
+
queryKey: QueryKey;
|
|
176
|
+
};
|
|
177
|
+
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
178
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
126
179
|
request?: SecondParameter<typeof customInstance>;
|
|
127
|
-
}
|
|
180
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
128
181
|
queryKey: QueryKey;
|
|
129
182
|
};
|
|
130
183
|
/**
|
|
@@ -135,37 +188,55 @@ declare const useGetProductsSuspense: <TData = ProductsGetResponse, TError = Err
|
|
|
135
188
|
declare const getProductsForOrganisation: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
136
189
|
declare const getGetProductsForOrganisationQueryKey: (orgId: string) => readonly ["account-server-api", `/product/organisation/${string}`];
|
|
137
190
|
declare const getGetProductsForOrganisationQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
138
|
-
query?: Partial<UseQueryOptions<
|
|
191
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
139
192
|
request?: SecondParameter<typeof customInstance>;
|
|
140
|
-
}
|
|
193
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
141
194
|
queryKey: QueryKey;
|
|
142
195
|
};
|
|
143
196
|
type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
144
197
|
type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
198
|
+
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
199
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>, 'initialData'>;
|
|
200
|
+
request?: SecondParameter<typeof customInstance>;
|
|
201
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
202
|
+
queryKey: QueryKey;
|
|
203
|
+
};
|
|
204
|
+
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
205
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>, 'initialData'>;
|
|
150
206
|
request?: SecondParameter<typeof customInstance>;
|
|
151
|
-
}
|
|
207
|
+
}): UseQueryResult<TData, TError> & {
|
|
208
|
+
queryKey: QueryKey;
|
|
209
|
+
};
|
|
210
|
+
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
211
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
212
|
+
request?: SecondParameter<typeof customInstance>;
|
|
213
|
+
}): UseQueryResult<TData, TError> & {
|
|
152
214
|
queryKey: QueryKey;
|
|
153
215
|
};
|
|
154
216
|
declare const getGetProductsForOrganisationSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
155
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
217
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
156
218
|
request?: SecondParameter<typeof customInstance>;
|
|
157
|
-
}
|
|
219
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
158
220
|
queryKey: QueryKey;
|
|
159
221
|
};
|
|
160
222
|
type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
161
223
|
type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
*/
|
|
165
|
-
declare const useGetProductsForOrganisationSuspense: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
166
|
-
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
224
|
+
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
225
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
167
226
|
request?: SecondParameter<typeof customInstance>;
|
|
168
|
-
}
|
|
227
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
228
|
+
queryKey: QueryKey;
|
|
229
|
+
};
|
|
230
|
+
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
231
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
232
|
+
request?: SecondParameter<typeof customInstance>;
|
|
233
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
234
|
+
queryKey: QueryKey;
|
|
235
|
+
};
|
|
236
|
+
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
237
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
238
|
+
request?: SecondParameter<typeof customInstance>;
|
|
239
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
169
240
|
queryKey: QueryKey;
|
|
170
241
|
};
|
|
171
242
|
/**
|
|
@@ -181,12 +252,12 @@ To do this you need to be a member of the **Unit** or the **Organisation**.
|
|
|
181
252
|
*/
|
|
182
253
|
declare const createUnitProduct: (unitId: string, unitProductPostBodyBody: UnitProductPostBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<UnitProductPostResponse>;
|
|
183
254
|
declare const getCreateUnitProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
184
|
-
mutation?: UseMutationOptions<
|
|
255
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
185
256
|
unitId: string;
|
|
186
257
|
data: UnitProductPostBodyBody;
|
|
187
|
-
}, TContext
|
|
258
|
+
}, TContext>;
|
|
188
259
|
request?: SecondParameter<typeof customInstance>;
|
|
189
|
-
}
|
|
260
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
190
261
|
unitId: string;
|
|
191
262
|
data: UnitProductPostBodyBody;
|
|
192
263
|
}, TContext>;
|
|
@@ -197,12 +268,12 @@ type CreateUnitProductMutationError = ErrorType<AsError | void>;
|
|
|
197
268
|
* @summary Creates a Product for an Organisational Unit
|
|
198
269
|
*/
|
|
199
270
|
declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
200
|
-
mutation?: UseMutationOptions<
|
|
271
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
201
272
|
unitId: string;
|
|
202
273
|
data: UnitProductPostBodyBody;
|
|
203
|
-
}, TContext
|
|
274
|
+
}, TContext>;
|
|
204
275
|
request?: SecondParameter<typeof customInstance>;
|
|
205
|
-
}
|
|
276
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
206
277
|
unitId: string;
|
|
207
278
|
data: UnitProductPostBodyBody;
|
|
208
279
|
}, TContext>;
|
|
@@ -214,37 +285,55 @@ declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContex
|
|
|
214
285
|
declare const getProductsForUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
215
286
|
declare const getGetProductsForUnitQueryKey: (unitId: string) => readonly ["account-server-api", `/product/unit/${string}`];
|
|
216
287
|
declare const getGetProductsForUnitQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
217
|
-
query?: Partial<UseQueryOptions<
|
|
288
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
218
289
|
request?: SecondParameter<typeof customInstance>;
|
|
219
|
-
}
|
|
290
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
220
291
|
queryKey: QueryKey;
|
|
221
292
|
};
|
|
222
293
|
type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
223
294
|
type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
295
|
+
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
296
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>, 'initialData'>;
|
|
297
|
+
request?: SecondParameter<typeof customInstance>;
|
|
298
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
299
|
+
queryKey: QueryKey;
|
|
300
|
+
};
|
|
301
|
+
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
302
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>, 'initialData'>;
|
|
303
|
+
request?: SecondParameter<typeof customInstance>;
|
|
304
|
+
}): UseQueryResult<TData, TError> & {
|
|
305
|
+
queryKey: QueryKey;
|
|
306
|
+
};
|
|
307
|
+
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
308
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
229
309
|
request?: SecondParameter<typeof customInstance>;
|
|
230
|
-
}
|
|
310
|
+
}): UseQueryResult<TData, TError> & {
|
|
231
311
|
queryKey: QueryKey;
|
|
232
312
|
};
|
|
233
313
|
declare const getGetProductsForUnitSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
234
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
314
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
235
315
|
request?: SecondParameter<typeof customInstance>;
|
|
236
|
-
}
|
|
316
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
237
317
|
queryKey: QueryKey;
|
|
238
318
|
};
|
|
239
319
|
type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
240
320
|
type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
*/
|
|
244
|
-
declare const useGetProductsForUnitSuspense: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
245
|
-
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
321
|
+
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
322
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
246
323
|
request?: SecondParameter<typeof customInstance>;
|
|
247
|
-
}
|
|
324
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
325
|
+
queryKey: QueryKey;
|
|
326
|
+
};
|
|
327
|
+
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
328
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
329
|
+
request?: SecondParameter<typeof customInstance>;
|
|
330
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
331
|
+
queryKey: QueryKey;
|
|
332
|
+
};
|
|
333
|
+
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
334
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
335
|
+
request?: SecondParameter<typeof customInstance>;
|
|
336
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
248
337
|
queryKey: QueryKey;
|
|
249
338
|
};
|
|
250
339
|
/**
|
|
@@ -255,37 +344,55 @@ declare const useGetProductsForUnitSuspense: <TData = ProductsGetResponse, TErro
|
|
|
255
344
|
declare const getProduct: (productId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductUnitGetResponse>;
|
|
256
345
|
declare const getGetProductQueryKey: (productId: string) => readonly ["account-server-api", `/product/${string}`];
|
|
257
346
|
declare const getGetProductQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
258
|
-
query?: Partial<UseQueryOptions<
|
|
347
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
259
348
|
request?: SecondParameter<typeof customInstance>;
|
|
260
|
-
}
|
|
349
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
261
350
|
queryKey: QueryKey;
|
|
262
351
|
};
|
|
263
352
|
type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
264
353
|
type GetProductQueryError = ErrorType<AsError | void>;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
354
|
+
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options: {
|
|
355
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>, 'initialData'>;
|
|
356
|
+
request?: SecondParameter<typeof customInstance>;
|
|
357
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
358
|
+
queryKey: QueryKey;
|
|
359
|
+
};
|
|
360
|
+
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
361
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>, 'initialData'>;
|
|
362
|
+
request?: SecondParameter<typeof customInstance>;
|
|
363
|
+
}): UseQueryResult<TData, TError> & {
|
|
364
|
+
queryKey: QueryKey;
|
|
365
|
+
};
|
|
366
|
+
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
367
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
270
368
|
request?: SecondParameter<typeof customInstance>;
|
|
271
|
-
}
|
|
369
|
+
}): UseQueryResult<TData, TError> & {
|
|
272
370
|
queryKey: QueryKey;
|
|
273
371
|
};
|
|
274
372
|
declare const getGetProductSuspenseQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
275
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
373
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
276
374
|
request?: SecondParameter<typeof customInstance>;
|
|
277
|
-
}
|
|
375
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
278
376
|
queryKey: QueryKey;
|
|
279
377
|
};
|
|
280
378
|
type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
281
379
|
type GetProductSuspenseQueryError = ErrorType<AsError | void>;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
380
|
+
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options: {
|
|
381
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
382
|
+
request?: SecondParameter<typeof customInstance>;
|
|
383
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
384
|
+
queryKey: QueryKey;
|
|
385
|
+
};
|
|
386
|
+
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
387
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
388
|
+
request?: SecondParameter<typeof customInstance>;
|
|
389
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
390
|
+
queryKey: QueryKey;
|
|
391
|
+
};
|
|
392
|
+
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
393
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
287
394
|
request?: SecondParameter<typeof customInstance>;
|
|
288
|
-
}
|
|
395
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
289
396
|
queryKey: QueryKey;
|
|
290
397
|
};
|
|
291
398
|
/**
|
|
@@ -294,25 +401,25 @@ declare const useGetProductSuspense: <TData = ProductUnitGetResponse, TError = E
|
|
|
294
401
|
* @summary Deletes an existing Product
|
|
295
402
|
*/
|
|
296
403
|
declare const deleteProduct: (productId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
297
|
-
declare const getDeleteProductMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
298
|
-
mutation?: UseMutationOptions<
|
|
404
|
+
declare const getDeleteProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
405
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
299
406
|
productId: string;
|
|
300
|
-
}, TContext
|
|
407
|
+
}, TContext>;
|
|
301
408
|
request?: SecondParameter<typeof customInstance>;
|
|
302
|
-
}
|
|
409
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
303
410
|
productId: string;
|
|
304
411
|
}, TContext>;
|
|
305
412
|
type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;
|
|
306
|
-
type DeleteProductMutationError = ErrorType<AsError>;
|
|
413
|
+
type DeleteProductMutationError = ErrorType<void | AsError>;
|
|
307
414
|
/**
|
|
308
415
|
* @summary Deletes an existing Product
|
|
309
416
|
*/
|
|
310
|
-
declare const useDeleteProduct: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
311
|
-
mutation?: UseMutationOptions<
|
|
417
|
+
declare const useDeleteProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
418
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
312
419
|
productId: string;
|
|
313
|
-
}, TContext
|
|
420
|
+
}, TContext>;
|
|
314
421
|
request?: SecondParameter<typeof customInstance>;
|
|
315
|
-
}
|
|
422
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
316
423
|
productId: string;
|
|
317
424
|
}, TContext>;
|
|
318
425
|
/**
|
|
@@ -325,29 +432,29 @@ At the moment we only support Products associated with the Data Manager, and the
|
|
|
325
432
|
* @summary Adjust an existing Product
|
|
326
433
|
*/
|
|
327
434
|
declare const patchProduct: (productId: string, productPatchBodyBody: ProductPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
328
|
-
declare const getPatchProductMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
329
|
-
mutation?: UseMutationOptions<
|
|
435
|
+
declare const getPatchProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
436
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
330
437
|
productId: string;
|
|
331
438
|
data: ProductPatchBodyBody;
|
|
332
|
-
}, TContext
|
|
439
|
+
}, TContext>;
|
|
333
440
|
request?: SecondParameter<typeof customInstance>;
|
|
334
|
-
}
|
|
441
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
335
442
|
productId: string;
|
|
336
443
|
data: ProductPatchBodyBody;
|
|
337
444
|
}, TContext>;
|
|
338
445
|
type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;
|
|
339
446
|
type PatchProductMutationBody = ProductPatchBodyBody;
|
|
340
|
-
type PatchProductMutationError = ErrorType<AsError>;
|
|
447
|
+
type PatchProductMutationError = ErrorType<void | AsError>;
|
|
341
448
|
/**
|
|
342
449
|
* @summary Adjust an existing Product
|
|
343
450
|
*/
|
|
344
|
-
declare const usePatchProduct: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
345
|
-
mutation?: UseMutationOptions<
|
|
451
|
+
declare const usePatchProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
452
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
346
453
|
productId: string;
|
|
347
454
|
data: ProductPatchBodyBody;
|
|
348
|
-
}, TContext
|
|
455
|
+
}, TContext>;
|
|
349
456
|
request?: SecondParameter<typeof customInstance>;
|
|
350
|
-
}
|
|
457
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
351
458
|
productId: string;
|
|
352
459
|
data: ProductPatchBodyBody;
|
|
353
460
|
}, TContext>;
|