@squonk/account-server-client 4.1.0 → 4.1.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.
- package/asset/asset.cjs +18 -10
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +60 -60
- package/asset/asset.d.ts +60 -60
- package/asset/asset.js +18 -10
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +3 -3
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +33 -33
- package/charges/charges.d.ts +33 -33
- package/charges/charges.js +3 -3
- package/charges/charges.js.map +1 -1
- package/event-stream/event-stream.cjs +8 -5
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +30 -30
- package/event-stream/event-stream.d.ts +30 -30
- package/event-stream/event-stream.js +8 -5
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +8 -8
- package/index.cjs.map +1 -1
- package/index.d.cts +172 -172
- package/index.d.ts +172 -172
- package/index.js +8 -8
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +1 -1
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +17 -17
- package/merchant/merchant.d.ts +17 -17
- package/merchant/merchant.js +1 -1
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +10 -6
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +44 -44
- package/organisation/organisation.d.ts +44 -44
- package/organisation/organisation.js +10 -6
- package/organisation/organisation.js.map +1 -1
- package/package.json +11 -11
- package/product/product.cjs +12 -8
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +68 -68
- package/product/product.d.ts +68 -68
- package/product/product.js +12 -8
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +180 -180
- package/src/asset/asset.ts +120 -83
- package/src/charges/charges.ts +50 -49
- package/src/event-stream/event-stream.ts +55 -43
- package/src/merchant/merchant.ts +26 -25
- package/src/organisation/organisation.ts +80 -63
- package/src/product/product.ts +116 -99
- package/src/state/state.ts +14 -13
- package/src/unit/unit.ts +106 -79
- package/src/user/user.ts +90 -69
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +9 -9
- package/state/state.d.ts +9 -9
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +15 -9
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +56 -56
- package/unit/unit.d.ts +56 -56
- package/unit/unit.js +15 -9
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +10 -6
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +49 -49
- package/user/user.d.ts +49 -49
- package/user/user.js +10 -6
- package/user/user.js.map +1 -1
package/product/product.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
2
|
import { customInstance, ProductsGetTypesResponse, ErrorType, AsError, ProductsGetDefaultStorageCost, ProductsGetResponse, UnitProductPostBodyBody, UnitProductPostResponse, ProductUnitGetResponse, ProductPatchBodyBody } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ declare const getGetProductTypesQueryOptions: <TData = ProductsGetTypesResponse,
|
|
|
14
14
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
15
15
|
request?: SecondParameter<typeof customInstance>;
|
|
16
16
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
17
|
-
queryKey: QueryKey
|
|
17
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
18
18
|
};
|
|
19
19
|
type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
20
20
|
type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
@@ -22,25 +22,25 @@ declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProduct
|
|
|
22
22
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>, 'initialData'>;
|
|
23
23
|
request?: SecondParameter<typeof customInstance>;
|
|
24
24
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
-
queryKey: QueryKey
|
|
25
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
26
|
};
|
|
27
27
|
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
28
28
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>, 'initialData'>;
|
|
29
29
|
request?: SecondParameter<typeof customInstance>;
|
|
30
30
|
}): UseQueryResult<TData, TError> & {
|
|
31
|
-
queryKey: QueryKey
|
|
31
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
32
|
};
|
|
33
33
|
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
34
34
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
35
35
|
request?: SecondParameter<typeof customInstance>;
|
|
36
36
|
}): UseQueryResult<TData, TError> & {
|
|
37
|
-
queryKey: QueryKey
|
|
37
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
38
|
};
|
|
39
39
|
declare const getGetProductTypesSuspenseQueryOptions: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
40
40
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
41
41
|
request?: SecondParameter<typeof customInstance>;
|
|
42
42
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
43
|
-
queryKey: QueryKey
|
|
43
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
44
44
|
};
|
|
45
45
|
type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
46
46
|
type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
|
|
@@ -48,19 +48,19 @@ declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof ge
|
|
|
48
48
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
49
49
|
request?: SecondParameter<typeof customInstance>;
|
|
50
50
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
51
|
-
queryKey: QueryKey
|
|
51
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
52
52
|
};
|
|
53
53
|
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
54
54
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
55
55
|
request?: SecondParameter<typeof customInstance>;
|
|
56
56
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
57
|
-
queryKey: QueryKey
|
|
57
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
58
58
|
};
|
|
59
59
|
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
60
60
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
61
61
|
request?: SecondParameter<typeof customInstance>;
|
|
62
62
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
63
|
-
queryKey: QueryKey
|
|
63
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.
|
|
@@ -73,7 +73,7 @@ declare const getGetProductDefaultStorageCostQueryOptions: <TData = ProductsGetD
|
|
|
73
73
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
74
74
|
request?: SecondParameter<typeof customInstance>;
|
|
75
75
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
76
|
-
queryKey: QueryKey
|
|
76
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
77
77
|
};
|
|
78
78
|
type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
79
79
|
type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
@@ -81,25 +81,25 @@ declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<type
|
|
|
81
81
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>, 'initialData'>;
|
|
82
82
|
request?: SecondParameter<typeof customInstance>;
|
|
83
83
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
84
|
-
queryKey: QueryKey
|
|
84
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
85
85
|
};
|
|
86
86
|
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
87
87
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>, 'initialData'>;
|
|
88
88
|
request?: SecondParameter<typeof customInstance>;
|
|
89
89
|
}): UseQueryResult<TData, TError> & {
|
|
90
|
-
queryKey: QueryKey
|
|
90
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
91
91
|
};
|
|
92
92
|
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
93
93
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
94
94
|
request?: SecondParameter<typeof customInstance>;
|
|
95
95
|
}): UseQueryResult<TData, TError> & {
|
|
96
|
-
queryKey: QueryKey
|
|
96
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
97
97
|
};
|
|
98
98
|
declare const getGetProductDefaultStorageCostSuspenseQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
99
99
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
100
100
|
request?: SecondParameter<typeof customInstance>;
|
|
101
101
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
102
|
-
queryKey: QueryKey
|
|
102
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
103
103
|
};
|
|
104
104
|
type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
105
105
|
type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
|
|
@@ -107,19 +107,19 @@ declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnT
|
|
|
107
107
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
108
108
|
request?: SecondParameter<typeof customInstance>;
|
|
109
109
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
110
|
-
queryKey: QueryKey
|
|
110
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
111
111
|
};
|
|
112
112
|
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
113
113
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
114
114
|
request?: SecondParameter<typeof customInstance>;
|
|
115
115
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
116
|
-
queryKey: QueryKey
|
|
116
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
117
117
|
};
|
|
118
118
|
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
119
119
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
120
120
|
request?: SecondParameter<typeof customInstance>;
|
|
121
121
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
122
|
-
queryKey: QueryKey
|
|
122
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
125
|
* Gets Products you have access to, across all **Units** and **Organisations**
|
|
@@ -132,7 +132,7 @@ declare const getGetProductsQueryOptions: <TData = ProductsGetResponse, TError =
|
|
|
132
132
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
133
133
|
request?: SecondParameter<typeof customInstance>;
|
|
134
134
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
135
|
-
queryKey: QueryKey
|
|
135
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
136
136
|
};
|
|
137
137
|
type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
138
138
|
type GetProductsQueryError = ErrorType<AsError | void>;
|
|
@@ -140,25 +140,25 @@ declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>,
|
|
|
140
140
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>, 'initialData'>;
|
|
141
141
|
request?: SecondParameter<typeof customInstance>;
|
|
142
142
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
143
|
-
queryKey: QueryKey
|
|
143
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
144
144
|
};
|
|
145
145
|
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
146
146
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>, 'initialData'>;
|
|
147
147
|
request?: SecondParameter<typeof customInstance>;
|
|
148
148
|
}): UseQueryResult<TData, TError> & {
|
|
149
|
-
queryKey: QueryKey
|
|
149
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
150
150
|
};
|
|
151
151
|
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
152
152
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
153
153
|
request?: SecondParameter<typeof customInstance>;
|
|
154
154
|
}): UseQueryResult<TData, TError> & {
|
|
155
|
-
queryKey: QueryKey
|
|
155
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
156
156
|
};
|
|
157
157
|
declare const getGetProductsSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
158
158
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
159
159
|
request?: SecondParameter<typeof customInstance>;
|
|
160
160
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
161
|
-
queryKey: QueryKey
|
|
161
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
162
162
|
};
|
|
163
163
|
type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
164
164
|
type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
|
|
@@ -166,19 +166,19 @@ declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getPro
|
|
|
166
166
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
167
167
|
request?: SecondParameter<typeof customInstance>;
|
|
168
168
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
169
|
-
queryKey: QueryKey
|
|
169
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
170
170
|
};
|
|
171
171
|
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
172
172
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
173
173
|
request?: SecondParameter<typeof customInstance>;
|
|
174
174
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
175
|
-
queryKey: QueryKey
|
|
175
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
176
176
|
};
|
|
177
177
|
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
178
178
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
179
179
|
request?: SecondParameter<typeof customInstance>;
|
|
180
180
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
181
|
-
queryKey: QueryKey
|
|
181
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
184
184
|
* Gets Products you have access to based on an **Organisation**
|
|
@@ -191,7 +191,7 @@ declare const getGetProductsForOrganisationQueryOptions: <TData = ProductsGetRes
|
|
|
191
191
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
192
192
|
request?: SecondParameter<typeof customInstance>;
|
|
193
193
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
194
|
-
queryKey: QueryKey
|
|
194
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
195
195
|
};
|
|
196
196
|
type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
197
197
|
type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
@@ -199,25 +199,25 @@ declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof
|
|
|
199
199
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>, 'initialData'>;
|
|
200
200
|
request?: SecondParameter<typeof customInstance>;
|
|
201
201
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
202
|
-
queryKey: QueryKey
|
|
202
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
203
203
|
};
|
|
204
204
|
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
205
205
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>, 'initialData'>;
|
|
206
206
|
request?: SecondParameter<typeof customInstance>;
|
|
207
207
|
}): UseQueryResult<TData, TError> & {
|
|
208
|
-
queryKey: QueryKey
|
|
208
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
209
209
|
};
|
|
210
210
|
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
211
211
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
212
212
|
request?: SecondParameter<typeof customInstance>;
|
|
213
213
|
}): UseQueryResult<TData, TError> & {
|
|
214
|
-
queryKey: QueryKey
|
|
214
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
215
215
|
};
|
|
216
216
|
declare const getGetProductsForOrganisationSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
217
217
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
218
218
|
request?: SecondParameter<typeof customInstance>;
|
|
219
219
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
220
|
-
queryKey: QueryKey
|
|
220
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
221
221
|
};
|
|
222
222
|
type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
223
223
|
type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
@@ -225,19 +225,19 @@ declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnTyp
|
|
|
225
225
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
226
226
|
request?: SecondParameter<typeof customInstance>;
|
|
227
227
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
228
|
-
queryKey: QueryKey
|
|
228
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
229
229
|
};
|
|
230
230
|
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
231
231
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
232
232
|
request?: SecondParameter<typeof customInstance>;
|
|
233
233
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
234
|
-
queryKey: QueryKey
|
|
234
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
235
235
|
};
|
|
236
236
|
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
237
237
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
238
238
|
request?: SecondParameter<typeof customInstance>;
|
|
239
239
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
240
|
-
queryKey: QueryKey
|
|
240
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
241
241
|
};
|
|
242
242
|
/**
|
|
243
243
|
* Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.
|
|
@@ -250,14 +250,14 @@ To do this you need to be a member of the **Unit** or the **Organisation**.
|
|
|
250
250
|
|
|
251
251
|
* @summary Creates a Product for an Organisational Unit
|
|
252
252
|
*/
|
|
253
|
-
declare const createUnitProduct: (unitId: string, unitProductPostBodyBody: UnitProductPostBodyBody, options?: SecondParameter<typeof customInstance
|
|
254
|
-
declare const getCreateUnitProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
255
|
-
mutation?: UseMutationOptions<
|
|
253
|
+
declare const createUnitProduct: (unitId: string, unitProductPostBodyBody: UnitProductPostBodyBody, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitProductPostResponse>;
|
|
254
|
+
declare const getCreateUnitProductMutationOptions: <TData = UnitProductPostResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
255
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
256
256
|
unitId: string;
|
|
257
257
|
data: UnitProductPostBodyBody;
|
|
258
258
|
}, TContext>;
|
|
259
259
|
request?: SecondParameter<typeof customInstance>;
|
|
260
|
-
}) => UseMutationOptions<
|
|
260
|
+
}) => UseMutationOptions<TData, TError, {
|
|
261
261
|
unitId: string;
|
|
262
262
|
data: UnitProductPostBodyBody;
|
|
263
263
|
}, TContext>;
|
|
@@ -267,13 +267,13 @@ type CreateUnitProductMutationError = ErrorType<AsError | void>;
|
|
|
267
267
|
/**
|
|
268
268
|
* @summary Creates a Product for an Organisational Unit
|
|
269
269
|
*/
|
|
270
|
-
declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
271
|
-
mutation?: UseMutationOptions<
|
|
270
|
+
declare const useCreateUnitProduct: <TData = UnitProductPostResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
271
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
272
272
|
unitId: string;
|
|
273
273
|
data: UnitProductPostBodyBody;
|
|
274
274
|
}, TContext>;
|
|
275
275
|
request?: SecondParameter<typeof customInstance>;
|
|
276
|
-
}) => UseMutationResult<
|
|
276
|
+
}) => UseMutationResult<TData, TError, {
|
|
277
277
|
unitId: string;
|
|
278
278
|
data: UnitProductPostBodyBody;
|
|
279
279
|
}, TContext>;
|
|
@@ -288,7 +288,7 @@ declare const getGetProductsForUnitQueryOptions: <TData = ProductsGetResponse, T
|
|
|
288
288
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
289
289
|
request?: SecondParameter<typeof customInstance>;
|
|
290
290
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
291
|
-
queryKey: QueryKey
|
|
291
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
292
292
|
};
|
|
293
293
|
type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
294
294
|
type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
@@ -296,25 +296,25 @@ declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProd
|
|
|
296
296
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>, 'initialData'>;
|
|
297
297
|
request?: SecondParameter<typeof customInstance>;
|
|
298
298
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
299
|
-
queryKey: QueryKey
|
|
299
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
300
300
|
};
|
|
301
301
|
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
302
302
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>, 'initialData'>;
|
|
303
303
|
request?: SecondParameter<typeof customInstance>;
|
|
304
304
|
}): UseQueryResult<TData, TError> & {
|
|
305
|
-
queryKey: QueryKey
|
|
305
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
306
306
|
};
|
|
307
307
|
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
308
308
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
309
309
|
request?: SecondParameter<typeof customInstance>;
|
|
310
310
|
}): UseQueryResult<TData, TError> & {
|
|
311
|
-
queryKey: QueryKey
|
|
311
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
312
312
|
};
|
|
313
313
|
declare const getGetProductsForUnitSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
314
314
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
315
315
|
request?: SecondParameter<typeof customInstance>;
|
|
316
316
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
317
|
-
queryKey: QueryKey
|
|
317
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
318
318
|
};
|
|
319
319
|
type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
320
320
|
type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
@@ -322,19 +322,19 @@ declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof
|
|
|
322
322
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
323
323
|
request?: SecondParameter<typeof customInstance>;
|
|
324
324
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
325
|
-
queryKey: QueryKey
|
|
325
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
326
326
|
};
|
|
327
327
|
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
328
328
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
329
329
|
request?: SecondParameter<typeof customInstance>;
|
|
330
330
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
331
|
-
queryKey: QueryKey
|
|
331
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
332
332
|
};
|
|
333
333
|
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
334
334
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
335
335
|
request?: SecondParameter<typeof customInstance>;
|
|
336
336
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
337
|
-
queryKey: QueryKey
|
|
337
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
338
338
|
};
|
|
339
339
|
/**
|
|
340
340
|
* Gets details of a specific Product that you have access to.
|
|
@@ -347,7 +347,7 @@ declare const getGetProductQueryOptions: <TData = ProductUnitGetResponse, TError
|
|
|
347
347
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
348
348
|
request?: SecondParameter<typeof customInstance>;
|
|
349
349
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
350
|
-
queryKey: QueryKey
|
|
350
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
351
351
|
};
|
|
352
352
|
type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
353
353
|
type GetProductQueryError = ErrorType<AsError | void>;
|
|
@@ -355,25 +355,25 @@ declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, T
|
|
|
355
355
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>, 'initialData'>;
|
|
356
356
|
request?: SecondParameter<typeof customInstance>;
|
|
357
357
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
358
|
-
queryKey: QueryKey
|
|
358
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
359
359
|
};
|
|
360
360
|
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
361
361
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>, 'initialData'>;
|
|
362
362
|
request?: SecondParameter<typeof customInstance>;
|
|
363
363
|
}): UseQueryResult<TData, TError> & {
|
|
364
|
-
queryKey: QueryKey
|
|
364
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
365
365
|
};
|
|
366
366
|
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
367
367
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
368
368
|
request?: SecondParameter<typeof customInstance>;
|
|
369
369
|
}): UseQueryResult<TData, TError> & {
|
|
370
|
-
queryKey: QueryKey
|
|
370
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
371
371
|
};
|
|
372
372
|
declare const getGetProductSuspenseQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
373
373
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
374
374
|
request?: SecondParameter<typeof customInstance>;
|
|
375
375
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
376
|
-
queryKey: QueryKey
|
|
376
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
377
377
|
};
|
|
378
378
|
type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
379
379
|
type GetProductSuspenseQueryError = ErrorType<AsError | void>;
|
|
@@ -381,19 +381,19 @@ declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProd
|
|
|
381
381
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
382
382
|
request?: SecondParameter<typeof customInstance>;
|
|
383
383
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
384
|
-
queryKey: QueryKey
|
|
384
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
385
385
|
};
|
|
386
386
|
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
387
387
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
388
388
|
request?: SecondParameter<typeof customInstance>;
|
|
389
389
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
390
|
-
queryKey: QueryKey
|
|
390
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
391
391
|
};
|
|
392
392
|
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
393
393
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
394
394
|
request?: SecondParameter<typeof customInstance>;
|
|
395
395
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
396
|
-
queryKey: QueryKey
|
|
396
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
397
397
|
};
|
|
398
398
|
/**
|
|
399
399
|
* You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.
|
|
@@ -401,12 +401,12 @@ declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProd
|
|
|
401
401
|
* @summary Deletes an existing Product
|
|
402
402
|
*/
|
|
403
403
|
declare const deleteProduct: (productId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
404
|
-
declare const getDeleteProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
405
|
-
mutation?: UseMutationOptions<
|
|
404
|
+
declare const getDeleteProductMutationOptions: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
405
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
406
406
|
productId: string;
|
|
407
407
|
}, TContext>;
|
|
408
408
|
request?: SecondParameter<typeof customInstance>;
|
|
409
|
-
}) => UseMutationOptions<
|
|
409
|
+
}) => UseMutationOptions<TData, TError, {
|
|
410
410
|
productId: string;
|
|
411
411
|
}, TContext>;
|
|
412
412
|
type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;
|
|
@@ -414,12 +414,12 @@ type DeleteProductMutationError = ErrorType<void | AsError>;
|
|
|
414
414
|
/**
|
|
415
415
|
* @summary Deletes an existing Product
|
|
416
416
|
*/
|
|
417
|
-
declare const useDeleteProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
418
|
-
mutation?: UseMutationOptions<
|
|
417
|
+
declare const useDeleteProduct: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
418
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
419
419
|
productId: string;
|
|
420
420
|
}, TContext>;
|
|
421
421
|
request?: SecondParameter<typeof customInstance>;
|
|
422
|
-
}) => UseMutationResult<
|
|
422
|
+
}) => UseMutationResult<TData, TError, {
|
|
423
423
|
productId: string;
|
|
424
424
|
}, TContext>;
|
|
425
425
|
/**
|
|
@@ -432,13 +432,13 @@ At the moment we only support Products associated with the Data Manager, and the
|
|
|
432
432
|
* @summary Adjust an existing Product
|
|
433
433
|
*/
|
|
434
434
|
declare const patchProduct: (productId: string, productPatchBodyBody: ProductPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
435
|
-
declare const getPatchProductMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
436
|
-
mutation?: UseMutationOptions<
|
|
435
|
+
declare const getPatchProductMutationOptions: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
436
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
437
437
|
productId: string;
|
|
438
438
|
data: ProductPatchBodyBody;
|
|
439
439
|
}, TContext>;
|
|
440
440
|
request?: SecondParameter<typeof customInstance>;
|
|
441
|
-
}) => UseMutationOptions<
|
|
441
|
+
}) => UseMutationOptions<TData, TError, {
|
|
442
442
|
productId: string;
|
|
443
443
|
data: ProductPatchBodyBody;
|
|
444
444
|
}, TContext>;
|
|
@@ -448,13 +448,13 @@ type PatchProductMutationError = ErrorType<void | AsError>;
|
|
|
448
448
|
/**
|
|
449
449
|
* @summary Adjust an existing Product
|
|
450
450
|
*/
|
|
451
|
-
declare const usePatchProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
452
|
-
mutation?: UseMutationOptions<
|
|
451
|
+
declare const usePatchProduct: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
452
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
453
453
|
productId: string;
|
|
454
454
|
data: ProductPatchBodyBody;
|
|
455
455
|
}, TContext>;
|
|
456
456
|
request?: SecondParameter<typeof customInstance>;
|
|
457
|
-
}) => UseMutationResult<
|
|
457
|
+
}) => UseMutationResult<TData, TError, {
|
|
458
458
|
productId: string;
|
|
459
459
|
data: ProductPatchBodyBody;
|
|
460
460
|
}, TContext>;
|