@squonk/account-server-client 2.1.0-rc.8 → 2.1.0
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/README.md +1 -1
- package/admin/admin.cjs +19 -4
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +23 -6
- package/admin/admin.d.ts +23 -6
- package/admin/admin.js +19 -4
- package/admin/admin.js.map +1 -1
- package/asset/asset.cjs +33 -18
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +31 -14
- package/asset/asset.d.ts +31 -14
- package/asset/asset.js +25 -10
- package/asset/asset.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/event-stream/event-stream.cjs +39 -10
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +51 -17
- package/event-stream/event-stream.d.ts +51 -17
- package/event-stream/event-stream.js +36 -7
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +702 -2
- package/index.d.ts +702 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +35 -6
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +42 -8
- package/merchant/merchant.d.ts +42 -8
- package/merchant/merchant.js +34 -5
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +73 -16
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +84 -16
- package/organisation/organisation.d.ts +84 -16
- package/organisation/organisation.js +66 -9
- package/organisation/organisation.js.map +1 -1
- package/package.json +12 -12
- package/product/product.cjs +121 -22
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +141 -22
- package/product/product.d.ts +141 -22
- package/product/product.js +111 -12
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +4 -2
- package/src/admin/admin.ts +50 -14
- package/src/asset/asset.ts +57 -35
- package/src/custom-instance.ts +3 -4
- package/src/event-stream/event-stream.ts +100 -29
- package/src/merchant/merchant.ts +93 -18
- package/src/organisation/organisation.ts +184 -35
- package/src/product/product.ts +313 -47
- package/src/state/state.ts +50 -14
- package/src/unit/unit.ts +190 -45
- package/src/user/user.ts +140 -34
- package/state/state.cjs +19 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +23 -6
- package/state/state.d.ts +23 -6
- package/state/state.js +19 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +77 -20
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +91 -23
- package/unit/unit.d.ts +91 -23
- package/unit/unit.js +68 -11
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +59 -16
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +66 -15
- package/user/user.d.ts +66 -15
- package/user/user.js +53 -10
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-6780910b.d.ts +0 -700
package/product/product.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
1
|
+
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
+
import { customInstance, ProductsGetTypesResponse, ErrorType, AsError, ProductsGetDefaultStorageCost, ProductsGetResponse, UnitProductPostBodyBody, UnitProductPostResponse, ProductUnitGetResponse, ProductPatchBodyBody, GetProductChargesParams, ProductChargesGetResponse } from '../index.cjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
6
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
7
7
|
/**
|
|
8
8
|
* Gets Product Types you can purchase (subscribe to)
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
12
12
|
declare const getProductTypes: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetTypesResponse>;
|
|
13
13
|
declare const getGetProductTypesQueryKey: () => readonly ["account-server-api", "/product-type"];
|
|
14
14
|
declare const getGetProductTypesQueryOptions: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
15
|
-
query?: UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey
|
|
15
|
+
query?: Partial<UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
16
16
|
request?: SecondParameter<typeof customInstance>;
|
|
17
17
|
} | undefined) => UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey> & {
|
|
18
18
|
queryKey: QueryKey;
|
|
@@ -23,11 +23,28 @@ type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
|
23
23
|
* @summary Gets all Product Types
|
|
24
24
|
*/
|
|
25
25
|
declare const useGetProductTypes: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
26
|
-
query?: UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
27
27
|
request?: SecondParameter<typeof customInstance>;
|
|
28
28
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
29
29
|
queryKey: QueryKey;
|
|
30
30
|
};
|
|
31
|
+
declare const getGetProductTypesSuspenseQueryOptions: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
32
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
33
|
+
request?: SecondParameter<typeof customInstance>;
|
|
34
|
+
} | undefined) => UseSuspenseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey> & {
|
|
35
|
+
queryKey: QueryKey;
|
|
36
|
+
};
|
|
37
|
+
type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
38
|
+
type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Gets all Product Types
|
|
41
|
+
*/
|
|
42
|
+
declare const useGetProductTypesSuspense: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
43
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
44
|
+
request?: SecondParameter<typeof customInstance>;
|
|
45
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
46
|
+
queryKey: QueryKey;
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* 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.
|
|
33
50
|
|
|
@@ -36,7 +53,7 @@ declare const useGetProductTypes: <TData = ProductsGetTypesResponse, TError = Er
|
|
|
36
53
|
declare const getProductDefaultStorageCost: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetDefaultStorageCost>;
|
|
37
54
|
declare const getGetProductDefaultStorageCostQueryKey: () => readonly ["account-server-api", "/product-default-storage-cost"];
|
|
38
55
|
declare const getGetProductDefaultStorageCostQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
39
|
-
query?: UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey
|
|
56
|
+
query?: Partial<UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
40
57
|
request?: SecondParameter<typeof customInstance>;
|
|
41
58
|
} | undefined) => UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey> & {
|
|
42
59
|
queryKey: QueryKey;
|
|
@@ -47,11 +64,28 @@ type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
|
47
64
|
* @summary Gets the default cross-product storage cost
|
|
48
65
|
*/
|
|
49
66
|
declare const useGetProductDefaultStorageCost: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
50
|
-
query?: UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey
|
|
67
|
+
query?: Partial<UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
51
68
|
request?: SecondParameter<typeof customInstance>;
|
|
52
69
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
53
70
|
queryKey: QueryKey;
|
|
54
71
|
};
|
|
72
|
+
declare const getGetProductDefaultStorageCostSuspenseQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
73
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
74
|
+
request?: SecondParameter<typeof customInstance>;
|
|
75
|
+
} | undefined) => UseSuspenseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey> & {
|
|
76
|
+
queryKey: QueryKey;
|
|
77
|
+
};
|
|
78
|
+
type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
79
|
+
type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
|
|
80
|
+
/**
|
|
81
|
+
* @summary Gets the default cross-product storage cost
|
|
82
|
+
*/
|
|
83
|
+
declare const useGetProductDefaultStorageCostSuspense: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
84
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
85
|
+
request?: SecondParameter<typeof customInstance>;
|
|
86
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
87
|
+
queryKey: QueryKey;
|
|
88
|
+
};
|
|
55
89
|
/**
|
|
56
90
|
* Gets Products you have access to, across all **Units** and **Organisations**
|
|
57
91
|
|
|
@@ -60,7 +94,7 @@ declare const useGetProductDefaultStorageCost: <TData = ProductsGetDefaultStorag
|
|
|
60
94
|
declare const getProducts: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
61
95
|
declare const getGetProductsQueryKey: () => readonly ["account-server-api", "/product"];
|
|
62
96
|
declare const getGetProductsQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
63
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
97
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
64
98
|
request?: SecondParameter<typeof customInstance>;
|
|
65
99
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
66
100
|
queryKey: QueryKey;
|
|
@@ -71,11 +105,28 @@ type GetProductsQueryError = ErrorType<AsError | void>;
|
|
|
71
105
|
* @summary Gets all Products
|
|
72
106
|
*/
|
|
73
107
|
declare const useGetProducts: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
74
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
108
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
75
109
|
request?: SecondParameter<typeof customInstance>;
|
|
76
110
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
77
111
|
queryKey: QueryKey;
|
|
78
112
|
};
|
|
113
|
+
declare const getGetProductsSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
114
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
115
|
+
request?: SecondParameter<typeof customInstance>;
|
|
116
|
+
} | undefined) => UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
117
|
+
queryKey: QueryKey;
|
|
118
|
+
};
|
|
119
|
+
type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
120
|
+
type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
|
|
121
|
+
/**
|
|
122
|
+
* @summary Gets all Products
|
|
123
|
+
*/
|
|
124
|
+
declare const useGetProductsSuspense: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
125
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
126
|
+
request?: SecondParameter<typeof customInstance>;
|
|
127
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
128
|
+
queryKey: QueryKey;
|
|
129
|
+
};
|
|
79
130
|
/**
|
|
80
131
|
* Gets Products you have access to based on an **Organisation**
|
|
81
132
|
|
|
@@ -84,7 +135,7 @@ declare const useGetProducts: <TData = ProductsGetResponse, TError = ErrorType<v
|
|
|
84
135
|
declare const getProductsForOrganisation: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
85
136
|
declare const getGetProductsForOrganisationQueryKey: (orgId: string) => readonly ["account-server-api", `/product/organisation/${string}`];
|
|
86
137
|
declare const getGetProductsForOrganisationQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
87
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
138
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
88
139
|
request?: SecondParameter<typeof customInstance>;
|
|
89
140
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
90
141
|
queryKey: QueryKey;
|
|
@@ -95,11 +146,28 @@ type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
|
95
146
|
* @summary Gets Products for an Organisation
|
|
96
147
|
*/
|
|
97
148
|
declare const useGetProductsForOrganisation: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
98
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
149
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
99
150
|
request?: SecondParameter<typeof customInstance>;
|
|
100
151
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
101
152
|
queryKey: QueryKey;
|
|
102
153
|
};
|
|
154
|
+
declare const getGetProductsForOrganisationSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
155
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
156
|
+
request?: SecondParameter<typeof customInstance>;
|
|
157
|
+
} | undefined) => UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
158
|
+
queryKey: QueryKey;
|
|
159
|
+
};
|
|
160
|
+
type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
161
|
+
type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
162
|
+
/**
|
|
163
|
+
* @summary Gets Products for an Organisation
|
|
164
|
+
*/
|
|
165
|
+
declare const useGetProductsForOrganisationSuspense: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
166
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
167
|
+
request?: SecondParameter<typeof customInstance>;
|
|
168
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
169
|
+
queryKey: QueryKey;
|
|
170
|
+
};
|
|
103
171
|
/**
|
|
104
172
|
* Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.
|
|
105
173
|
|
|
@@ -134,7 +202,7 @@ declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContex
|
|
|
134
202
|
data: UnitProductPostBodyBody;
|
|
135
203
|
}, TContext> | undefined;
|
|
136
204
|
request?: SecondParameter<typeof customInstance>;
|
|
137
|
-
} | undefined) =>
|
|
205
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<UnitProductPostResponse, TError, {
|
|
138
206
|
unitId: string;
|
|
139
207
|
data: UnitProductPostBodyBody;
|
|
140
208
|
}, TContext>;
|
|
@@ -146,7 +214,7 @@ declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContex
|
|
|
146
214
|
declare const getProductsForUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
147
215
|
declare const getGetProductsForUnitQueryKey: (unitId: string) => readonly ["account-server-api", `/product/unit/${string}`];
|
|
148
216
|
declare const getGetProductsForUnitQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
149
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
217
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
150
218
|
request?: SecondParameter<typeof customInstance>;
|
|
151
219
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
152
220
|
queryKey: QueryKey;
|
|
@@ -157,11 +225,28 @@ type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
|
157
225
|
* @summary Gets Products for an Organisational Unit
|
|
158
226
|
*/
|
|
159
227
|
declare const useGetProductsForUnit: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
160
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
228
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
161
229
|
request?: SecondParameter<typeof customInstance>;
|
|
162
230
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
163
231
|
queryKey: QueryKey;
|
|
164
232
|
};
|
|
233
|
+
declare const getGetProductsForUnitSuspenseQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
234
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
235
|
+
request?: SecondParameter<typeof customInstance>;
|
|
236
|
+
} | undefined) => UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
237
|
+
queryKey: QueryKey;
|
|
238
|
+
};
|
|
239
|
+
type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
240
|
+
type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
241
|
+
/**
|
|
242
|
+
* @summary Gets Products for an Organisational Unit
|
|
243
|
+
*/
|
|
244
|
+
declare const useGetProductsForUnitSuspense: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
245
|
+
query?: Partial<UseSuspenseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
246
|
+
request?: SecondParameter<typeof customInstance>;
|
|
247
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
248
|
+
queryKey: QueryKey;
|
|
249
|
+
};
|
|
165
250
|
/**
|
|
166
251
|
* Gets details of a specific Product that you have access to.
|
|
167
252
|
|
|
@@ -170,7 +255,7 @@ declare const useGetProductsForUnit: <TData = ProductsGetResponse, TError = Erro
|
|
|
170
255
|
declare const getProduct: (productId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductUnitGetResponse>;
|
|
171
256
|
declare const getGetProductQueryKey: (productId: string) => readonly ["account-server-api", `/product/${string}`];
|
|
172
257
|
declare const getGetProductQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
173
|
-
query?: UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey
|
|
258
|
+
query?: Partial<UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
174
259
|
request?: SecondParameter<typeof customInstance>;
|
|
175
260
|
} | undefined) => UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey> & {
|
|
176
261
|
queryKey: QueryKey;
|
|
@@ -181,11 +266,28 @@ type GetProductQueryError = ErrorType<AsError | void>;
|
|
|
181
266
|
* @summary Gets a Product
|
|
182
267
|
*/
|
|
183
268
|
declare const useGetProduct: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
184
|
-
query?: UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey
|
|
269
|
+
query?: Partial<UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
185
270
|
request?: SecondParameter<typeof customInstance>;
|
|
186
271
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
187
272
|
queryKey: QueryKey;
|
|
188
273
|
};
|
|
274
|
+
declare const getGetProductSuspenseQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
275
|
+
query?: Partial<UseSuspenseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
276
|
+
request?: SecondParameter<typeof customInstance>;
|
|
277
|
+
} | undefined) => UseSuspenseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey> & {
|
|
278
|
+
queryKey: QueryKey;
|
|
279
|
+
};
|
|
280
|
+
type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
281
|
+
type GetProductSuspenseQueryError = ErrorType<AsError | void>;
|
|
282
|
+
/**
|
|
283
|
+
* @summary Gets a Product
|
|
284
|
+
*/
|
|
285
|
+
declare const useGetProductSuspense: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
286
|
+
query?: Partial<UseSuspenseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
287
|
+
request?: SecondParameter<typeof customInstance>;
|
|
288
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
289
|
+
queryKey: QueryKey;
|
|
290
|
+
};
|
|
189
291
|
/**
|
|
190
292
|
* 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**.
|
|
191
293
|
|
|
@@ -210,7 +312,7 @@ declare const useDeleteProduct: <TError = ErrorType<AsError>, TContext = unknown
|
|
|
210
312
|
productId: string;
|
|
211
313
|
}, TContext> | undefined;
|
|
212
314
|
request?: SecondParameter<typeof customInstance>;
|
|
213
|
-
} | undefined) =>
|
|
315
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
214
316
|
productId: string;
|
|
215
317
|
}, TContext>;
|
|
216
318
|
/**
|
|
@@ -243,7 +345,7 @@ declare const usePatchProduct: <TError = ErrorType<AsError>, TContext = unknown>
|
|
|
243
345
|
data: ProductPatchBodyBody;
|
|
244
346
|
}, TContext> | undefined;
|
|
245
347
|
request?: SecondParameter<typeof customInstance>;
|
|
246
|
-
} | undefined) =>
|
|
348
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
247
349
|
productId: string;
|
|
248
350
|
data: ProductPatchBodyBody;
|
|
249
351
|
}, TContext>;
|
|
@@ -260,7 +362,7 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
260
362
|
declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
|
|
261
363
|
declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/product/${string}/charges`, ...GetProductChargesParams[]];
|
|
262
364
|
declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
263
|
-
query?: UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey
|
|
365
|
+
query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
264
366
|
request?: SecondParameter<typeof customInstance>;
|
|
265
367
|
} | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
|
|
266
368
|
queryKey: QueryKey;
|
|
@@ -271,10 +373,27 @@ type GetProductChargesQueryError = ErrorType<AsError | void>;
|
|
|
271
373
|
* @summary Get charges made against a Product
|
|
272
374
|
*/
|
|
273
375
|
declare const useGetProductCharges: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
274
|
-
query?: UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey
|
|
376
|
+
query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
275
377
|
request?: SecondParameter<typeof customInstance>;
|
|
276
378
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
277
379
|
queryKey: QueryKey;
|
|
278
380
|
};
|
|
381
|
+
declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
382
|
+
query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
383
|
+
request?: SecondParameter<typeof customInstance>;
|
|
384
|
+
} | undefined) => UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
|
|
385
|
+
queryKey: QueryKey;
|
|
386
|
+
};
|
|
387
|
+
type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
388
|
+
type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
389
|
+
/**
|
|
390
|
+
* @summary Get charges made against a Product
|
|
391
|
+
*/
|
|
392
|
+
declare const useGetProductChargesSuspense: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
393
|
+
query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
394
|
+
request?: SecondParameter<typeof customInstance>;
|
|
395
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
396
|
+
queryKey: QueryKey;
|
|
397
|
+
};
|
|
279
398
|
|
|
280
|
-
export { CreateUnitProductMutationBody, CreateUnitProductMutationError, CreateUnitProductMutationResult, DeleteProductMutationError, DeleteProductMutationResult, GetProductChargesQueryError, GetProductChargesQueryResult, GetProductDefaultStorageCostQueryError, GetProductDefaultStorageCostQueryResult, GetProductQueryError, GetProductQueryResult, GetProductTypesQueryError, GetProductTypesQueryResult, GetProductsForOrganisationQueryError, GetProductsForOrganisationQueryResult, GetProductsForUnitQueryError, GetProductsForUnitQueryResult, GetProductsQueryError, GetProductsQueryResult, PatchProductMutationBody, PatchProductMutationError, PatchProductMutationResult, createUnitProduct, deleteProduct, getCreateUnitProductMutationOptions, getDeleteProductMutationOptions, getGetProductChargesQueryKey, getGetProductChargesQueryOptions, getGetProductDefaultStorageCostQueryKey, getGetProductDefaultStorageCostQueryOptions, getGetProductQueryKey, getGetProductQueryOptions, getGetProductTypesQueryKey, getGetProductTypesQueryOptions, getGetProductsForOrganisationQueryKey, getGetProductsForOrganisationQueryOptions, getGetProductsForUnitQueryKey, getGetProductsForUnitQueryOptions, getGetProductsQueryKey, getGetProductsQueryOptions, getPatchProductMutationOptions, getProduct, getProductCharges, getProductDefaultStorageCost, getProductTypes, getProducts, getProductsForOrganisation, getProductsForUnit, patchProduct, useCreateUnitProduct, useDeleteProduct, useGetProduct, useGetProductCharges, useGetProductDefaultStorageCost, useGetProductTypes, useGetProducts, useGetProductsForOrganisation, useGetProductsForUnit, usePatchProduct };
|
|
399
|
+
export { type CreateUnitProductMutationBody, type CreateUnitProductMutationError, type CreateUnitProductMutationResult, type DeleteProductMutationError, type DeleteProductMutationResult, type GetProductChargesQueryError, type GetProductChargesQueryResult, type GetProductChargesSuspenseQueryError, type GetProductChargesSuspenseQueryResult, type GetProductDefaultStorageCostQueryError, type GetProductDefaultStorageCostQueryResult, type GetProductDefaultStorageCostSuspenseQueryError, type GetProductDefaultStorageCostSuspenseQueryResult, type GetProductQueryError, type GetProductQueryResult, type GetProductSuspenseQueryError, type GetProductSuspenseQueryResult, type GetProductTypesQueryError, type GetProductTypesQueryResult, type GetProductTypesSuspenseQueryError, type GetProductTypesSuspenseQueryResult, type GetProductsForOrganisationQueryError, type GetProductsForOrganisationQueryResult, type GetProductsForOrganisationSuspenseQueryError, type GetProductsForOrganisationSuspenseQueryResult, type GetProductsForUnitQueryError, type GetProductsForUnitQueryResult, type GetProductsForUnitSuspenseQueryError, type GetProductsForUnitSuspenseQueryResult, type GetProductsQueryError, type GetProductsQueryResult, type GetProductsSuspenseQueryError, type GetProductsSuspenseQueryResult, type PatchProductMutationBody, type PatchProductMutationError, type PatchProductMutationResult, createUnitProduct, deleteProduct, getCreateUnitProductMutationOptions, getDeleteProductMutationOptions, getGetProductChargesQueryKey, getGetProductChargesQueryOptions, getGetProductChargesSuspenseQueryOptions, getGetProductDefaultStorageCostQueryKey, getGetProductDefaultStorageCostQueryOptions, getGetProductDefaultStorageCostSuspenseQueryOptions, getGetProductQueryKey, getGetProductQueryOptions, getGetProductSuspenseQueryOptions, getGetProductTypesQueryKey, getGetProductTypesQueryOptions, getGetProductTypesSuspenseQueryOptions, getGetProductsForOrganisationQueryKey, getGetProductsForOrganisationQueryOptions, getGetProductsForOrganisationSuspenseQueryOptions, getGetProductsForUnitQueryKey, getGetProductsForUnitQueryOptions, getGetProductsForUnitSuspenseQueryOptions, getGetProductsQueryKey, getGetProductsQueryOptions, getGetProductsSuspenseQueryOptions, getPatchProductMutationOptions, getProduct, getProductCharges, getProductDefaultStorageCost, getProductTypes, getProducts, getProductsForOrganisation, getProductsForUnit, patchProduct, useCreateUnitProduct, useDeleteProduct, useGetProduct, useGetProductCharges, useGetProductChargesSuspense, useGetProductDefaultStorageCost, useGetProductDefaultStorageCostSuspense, useGetProductSuspense, useGetProductTypes, useGetProductTypesSuspense, useGetProducts, useGetProductsForOrganisation, useGetProductsForOrganisationSuspense, useGetProductsForUnit, useGetProductsForUnitSuspense, useGetProductsSuspense, usePatchProduct };
|