@squonk/account-server-client 2.1.0-rc.1 → 2.1.0-rc.11
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 +30 -8
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +50 -0
- package/admin/admin.d.ts +26 -6
- package/admin/admin.js +30 -8
- package/admin/admin.js.map +1 -1
- package/asset/asset.cjs +62 -22
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +260 -0
- package/asset/asset.d.ts +79 -36
- package/asset/asset.js +54 -14
- package/asset/asset.js.map +1 -1
- package/{chunk-3RNIDX7T.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-3RNIDX7T.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-UZTHSGDT.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/event-stream/event-stream.cjs +64 -19
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +142 -0
- package/event-stream/event-stream.d.ts +66 -20
- package/event-stream/event-stream.js +61 -16
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +10 -10
- package/index.cjs.map +1 -1
- package/{custom-instance-35e5d4fd.d.ts → index.d.cts} +163 -163
- package/index.d.ts +700 -2
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +53 -14
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +91 -0
- package/merchant/merchant.d.ts +48 -8
- package/merchant/merchant.js +52 -13
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +110 -28
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +271 -0
- package/organisation/organisation.d.ts +114 -25
- package/organisation/organisation.js +103 -21
- package/organisation/organisation.js.map +1 -1
- package/package.json +12 -12
- package/product/product.cjs +182 -47
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +399 -0
- package/product/product.d.ts +180 -31
- package/product/product.js +172 -37
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +272 -280
- package/src/admin/admin.ts +114 -84
- package/src/asset/asset.ts +480 -565
- package/src/custom-instance.ts +3 -4
- package/src/event-stream/event-stream.ts +300 -275
- package/src/merchant/merchant.ts +206 -142
- package/src/organisation/organisation.ts +549 -490
- package/src/product/product.ts +829 -688
- package/src/state/state.ts +112 -75
- package/src/unit/unit.ts +645 -599
- package/src/user/user.ts +489 -469
- package/state/state.cjs +29 -8
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +46 -0
- package/state/state.d.ts +26 -6
- package/state/state.js +29 -8
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +120 -32
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +322 -0
- package/unit/unit.d.ts +133 -38
- package/unit/unit.js +112 -24
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +96 -22
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +271 -0
- package/user/user.d.ts +96 -24
- package/user/user.js +90 -16
- package/user/user.js.map +1 -1
- package/chunk-UZTHSGDT.cjs.map +0 -1
package/product/product.d.ts
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.js';
|
|
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,19 +12,39 @@ 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;
|
|
19
19
|
};
|
|
20
20
|
type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
21
21
|
type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
22
|
+
/**
|
|
23
|
+
* @summary Gets all Product Types
|
|
24
|
+
*/
|
|
22
25
|
declare const useGetProductTypes: <TData = ProductsGetTypesResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
23
|
-
query?: UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<ProductsGetTypesResponse, TError, TData, QueryKey>> | undefined;
|
|
24
27
|
request?: SecondParameter<typeof customInstance>;
|
|
25
28
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
26
29
|
queryKey: QueryKey;
|
|
27
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
|
+
};
|
|
28
48
|
/**
|
|
29
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.
|
|
30
50
|
|
|
@@ -33,19 +53,39 @@ declare const useGetProductTypes: <TData = ProductsGetTypesResponse, TError = Er
|
|
|
33
53
|
declare const getProductDefaultStorageCost: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetDefaultStorageCost>;
|
|
34
54
|
declare const getGetProductDefaultStorageCostQueryKey: () => readonly ["account-server-api", "/product-default-storage-cost"];
|
|
35
55
|
declare const getGetProductDefaultStorageCostQueryOptions: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
36
|
-
query?: UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey
|
|
56
|
+
query?: Partial<UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
37
57
|
request?: SecondParameter<typeof customInstance>;
|
|
38
58
|
} | undefined) => UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey> & {
|
|
39
59
|
queryKey: QueryKey;
|
|
40
60
|
};
|
|
41
61
|
type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
42
62
|
type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
63
|
+
/**
|
|
64
|
+
* @summary Gets the default cross-product storage cost
|
|
65
|
+
*/
|
|
43
66
|
declare const useGetProductDefaultStorageCost: <TData = ProductsGetDefaultStorageCost, TError = ErrorType<void | AsError>>(options?: {
|
|
44
|
-
query?: UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey
|
|
67
|
+
query?: Partial<UseQueryOptions<ProductsGetDefaultStorageCost, TError, TData, QueryKey>> | undefined;
|
|
45
68
|
request?: SecondParameter<typeof customInstance>;
|
|
46
69
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
47
70
|
queryKey: QueryKey;
|
|
48
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
|
+
};
|
|
49
89
|
/**
|
|
50
90
|
* Gets Products you have access to, across all **Units** and **Organisations**
|
|
51
91
|
|
|
@@ -54,19 +94,39 @@ declare const useGetProductDefaultStorageCost: <TData = ProductsGetDefaultStorag
|
|
|
54
94
|
declare const getProducts: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
55
95
|
declare const getGetProductsQueryKey: () => readonly ["account-server-api", "/product"];
|
|
56
96
|
declare const getGetProductsQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
57
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
97
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
58
98
|
request?: SecondParameter<typeof customInstance>;
|
|
59
99
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
60
100
|
queryKey: QueryKey;
|
|
61
101
|
};
|
|
62
102
|
type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
63
103
|
type GetProductsQueryError = ErrorType<AsError | void>;
|
|
104
|
+
/**
|
|
105
|
+
* @summary Gets all Products
|
|
106
|
+
*/
|
|
64
107
|
declare const useGetProducts: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
65
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
108
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
66
109
|
request?: SecondParameter<typeof customInstance>;
|
|
67
110
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
68
111
|
queryKey: QueryKey;
|
|
69
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
|
+
};
|
|
70
130
|
/**
|
|
71
131
|
* Gets Products you have access to based on an **Organisation**
|
|
72
132
|
|
|
@@ -75,19 +135,39 @@ declare const useGetProducts: <TData = ProductsGetResponse, TError = ErrorType<v
|
|
|
75
135
|
declare const getProductsForOrganisation: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
76
136
|
declare const getGetProductsForOrganisationQueryKey: (orgId: string) => readonly ["account-server-api", `/product/organisation/${string}`];
|
|
77
137
|
declare const getGetProductsForOrganisationQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
78
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
138
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
79
139
|
request?: SecondParameter<typeof customInstance>;
|
|
80
140
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
81
141
|
queryKey: QueryKey;
|
|
82
142
|
};
|
|
83
143
|
type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
84
144
|
type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
145
|
+
/**
|
|
146
|
+
* @summary Gets Products for an Organisation
|
|
147
|
+
*/
|
|
85
148
|
declare const useGetProductsForOrganisation: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
86
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
149
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
87
150
|
request?: SecondParameter<typeof customInstance>;
|
|
88
151
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
89
152
|
queryKey: QueryKey;
|
|
90
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
|
+
};
|
|
91
171
|
/**
|
|
92
172
|
* Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.
|
|
93
173
|
|
|
@@ -113,37 +193,60 @@ declare const getCreateUnitProductMutationOptions: <TError = ErrorType<void | As
|
|
|
113
193
|
type CreateUnitProductMutationResult = NonNullable<Awaited<ReturnType<typeof createUnitProduct>>>;
|
|
114
194
|
type CreateUnitProductMutationBody = UnitProductPostBodyBody;
|
|
115
195
|
type CreateUnitProductMutationError = ErrorType<AsError | void>;
|
|
196
|
+
/**
|
|
197
|
+
* @summary Creates a Product for an Organisational Unit
|
|
198
|
+
*/
|
|
116
199
|
declare const useCreateUnitProduct: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
117
200
|
mutation?: UseMutationOptions<UnitProductPostResponse, TError, {
|
|
118
201
|
unitId: string;
|
|
119
202
|
data: UnitProductPostBodyBody;
|
|
120
203
|
}, TContext> | undefined;
|
|
121
204
|
request?: SecondParameter<typeof customInstance>;
|
|
122
|
-
} | undefined) =>
|
|
205
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<UnitProductPostResponse, TError, {
|
|
123
206
|
unitId: string;
|
|
124
207
|
data: UnitProductPostBodyBody;
|
|
125
208
|
}, TContext>;
|
|
126
209
|
/**
|
|
127
|
-
|
|
210
|
+
* Gets products you have access to based on an Organisational **Unit**
|
|
128
211
|
|
|
129
|
-
|
|
130
|
-
|
|
212
|
+
* @summary Gets Products for an Organisational Unit
|
|
213
|
+
*/
|
|
131
214
|
declare const getProductsForUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductsGetResponse>;
|
|
132
215
|
declare const getGetProductsForUnitQueryKey: (unitId: string) => readonly ["account-server-api", `/product/unit/${string}`];
|
|
133
216
|
declare const getGetProductsForUnitQueryOptions: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
134
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
217
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
135
218
|
request?: SecondParameter<typeof customInstance>;
|
|
136
219
|
} | undefined) => UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey> & {
|
|
137
220
|
queryKey: QueryKey;
|
|
138
221
|
};
|
|
139
222
|
type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
140
223
|
type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
224
|
+
/**
|
|
225
|
+
* @summary Gets Products for an Organisational Unit
|
|
226
|
+
*/
|
|
141
227
|
declare const useGetProductsForUnit: <TData = ProductsGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
142
|
-
query?: UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey
|
|
228
|
+
query?: Partial<UseQueryOptions<ProductsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
143
229
|
request?: SecondParameter<typeof customInstance>;
|
|
144
230
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
145
231
|
queryKey: QueryKey;
|
|
146
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
|
+
};
|
|
147
250
|
/**
|
|
148
251
|
* Gets details of a specific Product that you have access to.
|
|
149
252
|
|
|
@@ -152,19 +255,39 @@ declare const useGetProductsForUnit: <TData = ProductsGetResponse, TError = Erro
|
|
|
152
255
|
declare const getProduct: (productId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductUnitGetResponse>;
|
|
153
256
|
declare const getGetProductQueryKey: (productId: string) => readonly ["account-server-api", `/product/${string}`];
|
|
154
257
|
declare const getGetProductQueryOptions: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
155
|
-
query?: UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey
|
|
258
|
+
query?: Partial<UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
156
259
|
request?: SecondParameter<typeof customInstance>;
|
|
157
260
|
} | undefined) => UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey> & {
|
|
158
261
|
queryKey: QueryKey;
|
|
159
262
|
};
|
|
160
263
|
type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
161
264
|
type GetProductQueryError = ErrorType<AsError | void>;
|
|
265
|
+
/**
|
|
266
|
+
* @summary Gets a Product
|
|
267
|
+
*/
|
|
162
268
|
declare const useGetProduct: <TData = ProductUnitGetResponse, TError = ErrorType<void | AsError>>(productId: string, options?: {
|
|
163
|
-
query?: UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey
|
|
269
|
+
query?: Partial<UseQueryOptions<ProductUnitGetResponse, TError, TData, QueryKey>> | undefined;
|
|
164
270
|
request?: SecondParameter<typeof customInstance>;
|
|
165
271
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
166
272
|
queryKey: QueryKey;
|
|
167
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
|
+
};
|
|
168
291
|
/**
|
|
169
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**.
|
|
170
293
|
|
|
@@ -181,21 +304,24 @@ declare const getDeleteProductMutationOptions: <TError = ErrorType<AsError>, TCo
|
|
|
181
304
|
}, TContext>;
|
|
182
305
|
type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;
|
|
183
306
|
type DeleteProductMutationError = ErrorType<AsError>;
|
|
307
|
+
/**
|
|
308
|
+
* @summary Deletes an existing Product
|
|
309
|
+
*/
|
|
184
310
|
declare const useDeleteProduct: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
185
311
|
mutation?: UseMutationOptions<void, TError, {
|
|
186
312
|
productId: string;
|
|
187
313
|
}, TContext> | undefined;
|
|
188
314
|
request?: SecondParameter<typeof customInstance>;
|
|
189
|
-
} | undefined) =>
|
|
315
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
190
316
|
productId: string;
|
|
191
317
|
}, TContext>;
|
|
192
318
|
/**
|
|
193
|
-
|
|
319
|
+
* Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
|
|
194
320
|
|
|
195
321
|
At the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`
|
|
196
322
|
|
|
197
|
-
|
|
198
|
-
|
|
323
|
+
* @summary Adjust an existing Product
|
|
324
|
+
*/
|
|
199
325
|
declare const patchProduct: (productId: string, productPatchBodyBody: ProductPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
200
326
|
declare const getPatchProductMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
201
327
|
mutation?: UseMutationOptions<void, TError, {
|
|
@@ -210,41 +336,64 @@ declare const getPatchProductMutationOptions: <TError = ErrorType<AsError>, TCon
|
|
|
210
336
|
type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;
|
|
211
337
|
type PatchProductMutationBody = ProductPatchBodyBody;
|
|
212
338
|
type PatchProductMutationError = ErrorType<AsError>;
|
|
339
|
+
/**
|
|
340
|
+
* @summary Adjust an existing Product
|
|
341
|
+
*/
|
|
213
342
|
declare const usePatchProduct: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
214
343
|
mutation?: UseMutationOptions<void, TError, {
|
|
215
344
|
productId: string;
|
|
216
345
|
data: ProductPatchBodyBody;
|
|
217
346
|
}, TContext> | undefined;
|
|
218
347
|
request?: SecondParameter<typeof customInstance>;
|
|
219
|
-
} | undefined) =>
|
|
348
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
220
349
|
productId: string;
|
|
221
350
|
data: ProductPatchBodyBody;
|
|
222
351
|
}, TContext>;
|
|
223
352
|
/**
|
|
224
|
-
|
|
353
|
+
* Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
|
|
225
354
|
|
|
226
355
|
Dates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.
|
|
227
356
|
|
|
228
357
|
**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.
|
|
229
358
|
|
|
230
359
|
You need to be part of the **Unit** or **Organisation** to use this method
|
|
231
|
-
|
|
232
|
-
|
|
360
|
+
* @summary Get charges made against a Product
|
|
361
|
+
*/
|
|
233
362
|
declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
|
|
234
363
|
declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/product/${string}/charges`, ...GetProductChargesParams[]];
|
|
235
364
|
declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
236
|
-
query?: UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey
|
|
365
|
+
query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
237
366
|
request?: SecondParameter<typeof customInstance>;
|
|
238
367
|
} | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
|
|
239
368
|
queryKey: QueryKey;
|
|
240
369
|
};
|
|
241
370
|
type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
242
371
|
type GetProductChargesQueryError = ErrorType<AsError | void>;
|
|
372
|
+
/**
|
|
373
|
+
* @summary Get charges made against a Product
|
|
374
|
+
*/
|
|
243
375
|
declare const useGetProductCharges: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
244
|
-
query?: UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey
|
|
376
|
+
query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
245
377
|
request?: SecondParameter<typeof customInstance>;
|
|
246
378
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
247
379
|
queryKey: QueryKey;
|
|
248
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
|
+
};
|
|
249
398
|
|
|
250
|
-
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 };
|