@squonk/account-server-client 4.4.0-4-4.2197069952 → 4.4.0-4-4.2199390673
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/dist/api/actions/actions.cjs +4 -4
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +35 -17
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +35 -17
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.cjs +4 -4
- package/dist/api/actions/actions.fetch.cjs.map +1 -1
- package/dist/api/actions/actions.fetch.d.cts +35 -17
- package/dist/api/actions/actions.fetch.d.cts.map +1 -1
- package/dist/api/actions/actions.fetch.d.ts +35 -17
- package/dist/api/actions/actions.fetch.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.js +4 -4
- package/dist/api/actions/actions.fetch.js.map +1 -1
- package/dist/api/actions/actions.js +4 -4
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/asset/asset.cjs +22 -22
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +76 -40
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +76 -40
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.cjs +22 -22
- package/dist/api/asset/asset.fetch.cjs.map +1 -1
- package/dist/api/asset/asset.fetch.d.cts +76 -40
- package/dist/api/asset/asset.fetch.d.cts.map +1 -1
- package/dist/api/asset/asset.fetch.d.ts +76 -40
- package/dist/api/asset/asset.fetch.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.js +22 -22
- package/dist/api/asset/asset.fetch.js.map +1 -1
- package/dist/api/asset/asset.js +22 -22
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +16 -16
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +137 -65
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +137 -65
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.cjs +16 -16
- package/dist/api/charges/charges.fetch.cjs.map +1 -1
- package/dist/api/charges/charges.fetch.d.cts +137 -65
- package/dist/api/charges/charges.fetch.d.cts.map +1 -1
- package/dist/api/charges/charges.fetch.d.ts +137 -65
- package/dist/api/charges/charges.fetch.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.js +16 -16
- package/dist/api/charges/charges.fetch.js.map +1 -1
- package/dist/api/charges/charges.js +16 -16
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +12 -12
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +71 -35
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +71 -35
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
- package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.js +12 -12
- package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
- package/dist/api/event-stream/event-stream.js +12 -12
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +8 -8
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +69 -33
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +69 -33
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.cjs +8 -8
- package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.cts +69 -33
- package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.ts +69 -33
- package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.js +8 -8
- package/dist/api/merchant/merchant.fetch.js.map +1 -1
- package/dist/api/merchant/merchant.js +8 -8
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +18 -18
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +106 -52
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +106 -52
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.cjs +18 -18
- package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.cts +106 -52
- package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.ts +106 -52
- package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.js +18 -18
- package/dist/api/organisation/organisation.fetch.js.map +1 -1
- package/dist/api/organisation/organisation.js +18 -18
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +30 -30
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +208 -100
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +208 -100
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.fetch.cjs +30 -30
- package/dist/api/product/product.fetch.cjs.map +1 -1
- package/dist/api/product/product.fetch.d.cts +208 -100
- package/dist/api/product/product.fetch.d.cts.map +1 -1
- package/dist/api/product/product.fetch.d.ts +208 -100
- package/dist/api/product/product.fetch.d.ts.map +1 -1
- package/dist/api/product/product.fetch.js +30 -30
- package/dist/api/product/product.fetch.js.map +1 -1
- package/dist/api/product/product.js +30 -30
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +4 -4
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +35 -17
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +35 -17
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.fetch.cjs +4 -4
- package/dist/api/state/state.fetch.cjs.map +1 -1
- package/dist/api/state/state.fetch.d.cts +35 -17
- package/dist/api/state/state.fetch.d.cts.map +1 -1
- package/dist/api/state/state.fetch.d.ts +35 -17
- package/dist/api/state/state.fetch.d.ts.map +1 -1
- package/dist/api/state/state.fetch.js +4 -4
- package/dist/api/state/state.fetch.js.map +1 -1
- package/dist/api/state/state.js +4 -4
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +30 -30
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +144 -72
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +144 -72
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.cjs +30 -30
- package/dist/api/unit/unit.fetch.cjs.map +1 -1
- package/dist/api/unit/unit.fetch.d.cts +144 -72
- package/dist/api/unit/unit.fetch.d.cts.map +1 -1
- package/dist/api/unit/unit.fetch.d.ts +144 -72
- package/dist/api/unit/unit.fetch.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.js +30 -30
- package/dist/api/unit/unit.fetch.js.map +1 -1
- package/dist/api/unit/unit.js +30 -30
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +20 -20
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +107 -53
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +107 -53
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.fetch.cjs +20 -20
- package/dist/api/user/user.fetch.cjs.map +1 -1
- package/dist/api/user/user.fetch.d.cts +107 -53
- package/dist/api/user/user.fetch.d.cts.map +1 -1
- package/dist/api/user/user.fetch.d.ts +107 -53
- package/dist/api/user/user.fetch.d.ts.map +1 -1
- package/dist/api/user/user.fetch.js +20 -20
- package/dist/api/user/user.fetch.js.map +1 -1
- package/dist/api/user/user.js +20 -20
- package/dist/api/user/user.js.map +1 -1
- package/package.json +7 -5
- package/src/api/actions/actions.fetch.ts +103 -12
- package/src/api/actions/actions.ts +103 -12
- package/src/api/asset/asset.fetch.ts +303 -94
- package/src/api/asset/asset.ts +303 -94
- package/src/api/charges/charges.fetch.ts +456 -54
- package/src/api/charges/charges.ts +456 -54
- package/src/api/event-stream/event-stream.fetch.ts +262 -58
- package/src/api/event-stream/event-stream.ts +262 -58
- package/src/api/merchant/merchant.fetch.ts +212 -28
- package/src/api/merchant/merchant.ts +212 -28
- package/src/api/organisation/organisation.fetch.ts +381 -86
- package/src/api/organisation/organisation.ts +381 -86
- package/src/api/product/product.fetch.ts +724 -130
- package/src/api/product/product.ts +724 -130
- package/src/api/state/state.fetch.ts +105 -16
- package/src/api/state/state.ts +105 -16
- package/src/api/unit/unit.fetch.ts +521 -146
- package/src/api/unit/unit.ts +521 -146
- package/src/api/user/user.fetch.ts +401 -101
- package/src/api/user/user.ts +401 -101
- package/tests/README.md +98 -0
- package/tests/component.test.tsx +191 -0
- package/tests/tsconfig.json +7 -0
- package/tests/type-tests.tsx +196 -0
|
@@ -7,7 +7,7 @@ import { ProductsGetTypesResponse } from "../api-schemas/productsGetTypesRespons
|
|
|
7
7
|
import { UnitProductPostBodyBody } from "../api-schemas/unitProductPostBodyBody.js";
|
|
8
8
|
import { UnitProductPostResponse } from "../api-schemas/unitProductPostResponse.js";
|
|
9
9
|
import { ErrorType, customFetch } from "../../custom-fetch.js";
|
|
10
|
-
import { InvalidateOptions, QueryClient, QueryKey, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
10
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, InvalidateOptions, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
11
11
|
|
|
12
12
|
//#region src/api/product/product.fetch.d.ts
|
|
13
13
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -43,42 +43,60 @@ declare const getGetProductTypesUrl: () => string;
|
|
|
43
43
|
declare const getProductTypes: (options?: RequestInit) => Promise<getProductTypesResponse>;
|
|
44
44
|
declare const getGetProductTypesQueryKey: () => readonly ["account-server", "product-type"];
|
|
45
45
|
declare const getGetProductTypesQueryOptions: <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
46
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData
|
|
46
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
47
47
|
request?: SecondParameter<typeof customFetch>;
|
|
48
48
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
49
|
-
queryKey: QueryKey
|
|
49
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
50
50
|
};
|
|
51
51
|
type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
52
52
|
type GetProductTypesQueryError = ErrorType<AsError | void>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options: {
|
|
54
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, Awaited<ReturnType<typeof getProductTypes>>>, "initialData">;
|
|
55
|
+
request?: SecondParameter<typeof customFetch>;
|
|
56
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
57
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
58
|
+
};
|
|
59
|
+
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
60
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, Awaited<ReturnType<typeof getProductTypes>>>, "initialData">;
|
|
61
|
+
request?: SecondParameter<typeof customFetch>;
|
|
62
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
63
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
64
|
+
};
|
|
56
65
|
declare function useGetProductTypes<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
57
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData
|
|
66
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
58
67
|
request?: SecondParameter<typeof customFetch>;
|
|
59
|
-
}): UseQueryResult<TData, TError> & {
|
|
60
|
-
queryKey: QueryKey
|
|
68
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
69
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
61
70
|
};
|
|
62
71
|
/**
|
|
63
72
|
* @summary Gets all Product Types
|
|
64
73
|
*/
|
|
65
74
|
declare const invalidateGetProductTypes: (queryClient: QueryClient, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
66
75
|
declare const getGetProductTypesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
67
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData
|
|
76
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
68
77
|
request?: SecondParameter<typeof customFetch>;
|
|
69
78
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & {
|
|
70
|
-
queryKey: QueryKey
|
|
79
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
71
80
|
};
|
|
72
81
|
type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;
|
|
73
82
|
type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options: {
|
|
84
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
85
|
+
request?: SecondParameter<typeof customFetch>;
|
|
86
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
87
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
88
|
+
};
|
|
89
|
+
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
90
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
91
|
+
request?: SecondParameter<typeof customFetch>;
|
|
92
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
93
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
94
|
+
};
|
|
77
95
|
declare function useGetProductTypesSuspense<TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(options?: {
|
|
78
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData
|
|
96
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;
|
|
79
97
|
request?: SecondParameter<typeof customFetch>;
|
|
80
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
81
|
-
queryKey: QueryKey
|
|
98
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
99
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
82
100
|
};
|
|
83
101
|
/**
|
|
84
102
|
* 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.
|
|
@@ -112,42 +130,60 @@ declare const getGetProductDefaultStorageCostUrl: () => string;
|
|
|
112
130
|
declare const getProductDefaultStorageCost: (options?: RequestInit) => Promise<getProductDefaultStorageCostResponse>;
|
|
113
131
|
declare const getGetProductDefaultStorageCostQueryKey: () => readonly ["account-server", "product-default-storage-cost"];
|
|
114
132
|
declare const getGetProductDefaultStorageCostQueryOptions: <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
115
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData
|
|
133
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
116
134
|
request?: SecondParameter<typeof customFetch>;
|
|
117
135
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
118
|
-
queryKey: QueryKey
|
|
136
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
119
137
|
};
|
|
120
138
|
type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
121
139
|
type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
140
|
+
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options: {
|
|
141
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, Awaited<ReturnType<typeof getProductDefaultStorageCost>>>, "initialData">;
|
|
142
|
+
request?: SecondParameter<typeof customFetch>;
|
|
143
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
144
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
145
|
+
};
|
|
146
|
+
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
147
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, Awaited<ReturnType<typeof getProductDefaultStorageCost>>>, "initialData">;
|
|
148
|
+
request?: SecondParameter<typeof customFetch>;
|
|
149
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
150
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
151
|
+
};
|
|
125
152
|
declare function useGetProductDefaultStorageCost<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
126
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData
|
|
153
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
127
154
|
request?: SecondParameter<typeof customFetch>;
|
|
128
|
-
}): UseQueryResult<TData, TError> & {
|
|
129
|
-
queryKey: QueryKey
|
|
155
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
156
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
130
157
|
};
|
|
131
158
|
/**
|
|
132
159
|
* @summary Gets the default cross-product storage cost
|
|
133
160
|
*/
|
|
134
161
|
declare const invalidateGetProductDefaultStorageCost: (queryClient: QueryClient, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
135
162
|
declare const getGetProductDefaultStorageCostSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
136
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData
|
|
163
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
137
164
|
request?: SecondParameter<typeof customFetch>;
|
|
138
165
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & {
|
|
139
|
-
queryKey: QueryKey
|
|
166
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
140
167
|
};
|
|
141
168
|
type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>;
|
|
142
169
|
type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
170
|
+
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options: {
|
|
171
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
172
|
+
request?: SecondParameter<typeof customFetch>;
|
|
173
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
174
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
175
|
+
};
|
|
176
|
+
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
177
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
178
|
+
request?: SecondParameter<typeof customFetch>;
|
|
179
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
180
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
181
|
+
};
|
|
146
182
|
declare function useGetProductDefaultStorageCostSuspense<TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(options?: {
|
|
147
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData
|
|
183
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>;
|
|
148
184
|
request?: SecondParameter<typeof customFetch>;
|
|
149
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
150
|
-
queryKey: QueryKey
|
|
185
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
186
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
151
187
|
};
|
|
152
188
|
/**
|
|
153
189
|
* Gets Products you have access to, across all **Units** and **Organisations**
|
|
@@ -181,42 +217,60 @@ declare const getGetProductsUrl: () => string;
|
|
|
181
217
|
declare const getProducts: (options?: RequestInit) => Promise<getProductsResponse>;
|
|
182
218
|
declare const getGetProductsQueryKey: () => readonly ["account-server", "product"];
|
|
183
219
|
declare const getGetProductsQueryOptions: <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
184
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData
|
|
220
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
185
221
|
request?: SecondParameter<typeof customFetch>;
|
|
186
222
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
187
|
-
queryKey: QueryKey
|
|
223
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
188
224
|
};
|
|
189
225
|
type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
190
226
|
type GetProductsQueryError = ErrorType<AsError | void>;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
227
|
+
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options: {
|
|
228
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, Awaited<ReturnType<typeof getProducts>>>, "initialData">;
|
|
229
|
+
request?: SecondParameter<typeof customFetch>;
|
|
230
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
231
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
232
|
+
};
|
|
233
|
+
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
234
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProducts>>, TError, Awaited<ReturnType<typeof getProducts>>>, "initialData">;
|
|
235
|
+
request?: SecondParameter<typeof customFetch>;
|
|
236
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
237
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
238
|
+
};
|
|
194
239
|
declare function useGetProducts<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
195
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData
|
|
240
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
196
241
|
request?: SecondParameter<typeof customFetch>;
|
|
197
|
-
}): UseQueryResult<TData, TError> & {
|
|
198
|
-
queryKey: QueryKey
|
|
242
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
243
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
199
244
|
};
|
|
200
245
|
/**
|
|
201
246
|
* @summary Gets all Products
|
|
202
247
|
*/
|
|
203
248
|
declare const invalidateGetProducts: (queryClient: QueryClient, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
204
249
|
declare const getGetProductsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
205
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData
|
|
250
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
206
251
|
request?: SecondParameter<typeof customFetch>;
|
|
207
252
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & {
|
|
208
|
-
queryKey: QueryKey
|
|
253
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
209
254
|
};
|
|
210
255
|
type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;
|
|
211
256
|
type GetProductsSuspenseQueryError = ErrorType<AsError | void>;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
257
|
+
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options: {
|
|
258
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
259
|
+
request?: SecondParameter<typeof customFetch>;
|
|
260
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
261
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
262
|
+
};
|
|
263
|
+
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
264
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
265
|
+
request?: SecondParameter<typeof customFetch>;
|
|
266
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
267
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
268
|
+
};
|
|
215
269
|
declare function useGetProductsSuspense<TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(options?: {
|
|
216
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData
|
|
270
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;
|
|
217
271
|
request?: SecondParameter<typeof customFetch>;
|
|
218
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
219
|
-
queryKey: QueryKey
|
|
272
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
273
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
220
274
|
};
|
|
221
275
|
/**
|
|
222
276
|
* Gets Products you have access to based on an **Organisation**
|
|
@@ -250,42 +304,60 @@ declare const getGetProductsForOrganisationUrl: (orgId: string) => string;
|
|
|
250
304
|
declare const getProductsForOrganisation: (orgId: string, options?: RequestInit) => Promise<getProductsForOrganisationResponse>;
|
|
251
305
|
declare const getGetProductsForOrganisationQueryKey: (orgId?: string) => readonly ["account-server", "product", "organisation", string | undefined];
|
|
252
306
|
declare const getGetProductsForOrganisationQueryOptions: <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
253
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData
|
|
307
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
254
308
|
request?: SecondParameter<typeof customFetch>;
|
|
255
309
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
256
|
-
queryKey: QueryKey
|
|
310
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
257
311
|
};
|
|
258
312
|
type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
259
313
|
type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
314
|
+
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
315
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, Awaited<ReturnType<typeof getProductsForOrganisation>>>, "initialData">;
|
|
316
|
+
request?: SecondParameter<typeof customFetch>;
|
|
317
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
318
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
319
|
+
};
|
|
320
|
+
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
321
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, Awaited<ReturnType<typeof getProductsForOrganisation>>>, "initialData">;
|
|
322
|
+
request?: SecondParameter<typeof customFetch>;
|
|
323
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
324
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
325
|
+
};
|
|
263
326
|
declare function useGetProductsForOrganisation<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
264
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData
|
|
327
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
265
328
|
request?: SecondParameter<typeof customFetch>;
|
|
266
|
-
}): UseQueryResult<TData, TError> & {
|
|
267
|
-
queryKey: QueryKey
|
|
329
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
330
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
268
331
|
};
|
|
269
332
|
/**
|
|
270
333
|
* @summary Gets Products for an Organisation
|
|
271
334
|
*/
|
|
272
335
|
declare const invalidateGetProductsForOrganisation: (queryClient: QueryClient, orgId: string, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
273
336
|
declare const getGetProductsForOrganisationSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
274
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData
|
|
337
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
275
338
|
request?: SecondParameter<typeof customFetch>;
|
|
276
339
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & {
|
|
277
|
-
queryKey: QueryKey
|
|
340
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
278
341
|
};
|
|
279
342
|
type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>;
|
|
280
343
|
type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
344
|
+
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
345
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
346
|
+
request?: SecondParameter<typeof customFetch>;
|
|
347
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
348
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
349
|
+
};
|
|
350
|
+
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
351
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
352
|
+
request?: SecondParameter<typeof customFetch>;
|
|
353
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
354
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
355
|
+
};
|
|
284
356
|
declare function useGetProductsForOrganisationSuspense<TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
285
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData
|
|
357
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>;
|
|
286
358
|
request?: SecondParameter<typeof customFetch>;
|
|
287
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
288
|
-
queryKey: QueryKey
|
|
359
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
360
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
289
361
|
};
|
|
290
362
|
/**
|
|
291
363
|
* Products are **Subscriptions** that you create in a **Unit** that allow you to use services provided by a **Merchant**. To create products you need to be a member of the **Unit** or the Unit's **Organisation**.
|
|
@@ -347,7 +419,7 @@ declare const useCreateUnitProduct: <TError = ErrorType<AsError | void>, TContex
|
|
|
347
419
|
data: UnitProductPostBodyBody;
|
|
348
420
|
}, TContext>;
|
|
349
421
|
request?: SecondParameter<typeof customFetch>;
|
|
350
|
-
}) => UseMutationResult<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
422
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createUnitProduct>>, TError, {
|
|
351
423
|
unitId: string;
|
|
352
424
|
data: UnitProductPostBodyBody;
|
|
353
425
|
}, TContext>;
|
|
@@ -383,42 +455,60 @@ declare const getGetProductsForUnitUrl: (unitId: string) => string;
|
|
|
383
455
|
declare const getProductsForUnit: (unitId: string, options?: RequestInit) => Promise<getProductsForUnitResponse>;
|
|
384
456
|
declare const getGetProductsForUnitQueryKey: (unitId?: string) => readonly ["account-server", "product", "unit", string | undefined];
|
|
385
457
|
declare const getGetProductsForUnitQueryOptions: <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
386
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData
|
|
458
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
387
459
|
request?: SecondParameter<typeof customFetch>;
|
|
388
460
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
389
|
-
queryKey: QueryKey
|
|
461
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
390
462
|
};
|
|
391
463
|
type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
392
464
|
type GetProductsForUnitQueryError = ErrorType<void | AsError>;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
465
|
+
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
466
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, Awaited<ReturnType<typeof getProductsForUnit>>>, "initialData">;
|
|
467
|
+
request?: SecondParameter<typeof customFetch>;
|
|
468
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
469
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
470
|
+
};
|
|
471
|
+
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
472
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, Awaited<ReturnType<typeof getProductsForUnit>>>, "initialData">;
|
|
473
|
+
request?: SecondParameter<typeof customFetch>;
|
|
474
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
475
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
476
|
+
};
|
|
396
477
|
declare function useGetProductsForUnit<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
397
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData
|
|
478
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
398
479
|
request?: SecondParameter<typeof customFetch>;
|
|
399
|
-
}): UseQueryResult<TData, TError> & {
|
|
400
|
-
queryKey: QueryKey
|
|
480
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
481
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
401
482
|
};
|
|
402
483
|
/**
|
|
403
484
|
* @summary Gets Products for an Organisational Unit
|
|
404
485
|
*/
|
|
405
486
|
declare const invalidateGetProductsForUnit: (queryClient: QueryClient, unitId: string, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
406
487
|
declare const getGetProductsForUnitSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
407
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData
|
|
488
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
408
489
|
request?: SecondParameter<typeof customFetch>;
|
|
409
490
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & {
|
|
410
|
-
queryKey: QueryKey
|
|
491
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
411
492
|
};
|
|
412
493
|
type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>;
|
|
413
494
|
type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
495
|
+
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
496
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
497
|
+
request?: SecondParameter<typeof customFetch>;
|
|
498
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
499
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
500
|
+
};
|
|
501
|
+
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
502
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
503
|
+
request?: SecondParameter<typeof customFetch>;
|
|
504
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
505
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
506
|
+
};
|
|
417
507
|
declare function useGetProductsForUnitSuspense<TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
418
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData
|
|
508
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;
|
|
419
509
|
request?: SecondParameter<typeof customFetch>;
|
|
420
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
421
|
-
queryKey: QueryKey
|
|
510
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
511
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
422
512
|
};
|
|
423
513
|
/**
|
|
424
514
|
* Gets details of a specific Product that you have access to.
|
|
@@ -452,42 +542,60 @@ declare const getGetProductUrl: (productId: string) => string;
|
|
|
452
542
|
declare const getProduct: (productId: string, options?: RequestInit) => Promise<getProductResponse>;
|
|
453
543
|
declare const getGetProductQueryKey: (productId?: string) => readonly ["account-server", "product", string | undefined];
|
|
454
544
|
declare const getGetProductQueryOptions: <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
455
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData
|
|
545
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
456
546
|
request?: SecondParameter<typeof customFetch>;
|
|
457
547
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
458
|
-
queryKey: QueryKey
|
|
548
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
459
549
|
};
|
|
460
550
|
type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
461
551
|
type GetProductQueryError = ErrorType<AsError | void>;
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
552
|
+
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options: {
|
|
553
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, Awaited<ReturnType<typeof getProduct>>>, "initialData">;
|
|
554
|
+
request?: SecondParameter<typeof customFetch>;
|
|
555
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
556
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
557
|
+
};
|
|
558
|
+
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
559
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProduct>>, TError, Awaited<ReturnType<typeof getProduct>>>, "initialData">;
|
|
560
|
+
request?: SecondParameter<typeof customFetch>;
|
|
561
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
562
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
563
|
+
};
|
|
465
564
|
declare function useGetProduct<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
466
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData
|
|
565
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
467
566
|
request?: SecondParameter<typeof customFetch>;
|
|
468
|
-
}): UseQueryResult<TData, TError> & {
|
|
469
|
-
queryKey: QueryKey
|
|
567
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
568
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
470
569
|
};
|
|
471
570
|
/**
|
|
472
571
|
* @summary Gets a Product
|
|
473
572
|
*/
|
|
474
573
|
declare const invalidateGetProduct: (queryClient: QueryClient, productId: string, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
475
574
|
declare const getGetProductSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
476
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData
|
|
575
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
477
576
|
request?: SecondParameter<typeof customFetch>;
|
|
478
577
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {
|
|
479
|
-
queryKey: QueryKey
|
|
578
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
480
579
|
};
|
|
481
580
|
type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;
|
|
482
581
|
type GetProductSuspenseQueryError = ErrorType<AsError | void>;
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
582
|
+
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options: {
|
|
583
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
584
|
+
request?: SecondParameter<typeof customFetch>;
|
|
585
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
586
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
587
|
+
};
|
|
588
|
+
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
589
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
590
|
+
request?: SecondParameter<typeof customFetch>;
|
|
591
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
592
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
593
|
+
};
|
|
486
594
|
declare function useGetProductSuspense<TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: {
|
|
487
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData
|
|
595
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;
|
|
488
596
|
request?: SecondParameter<typeof customFetch>;
|
|
489
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
490
|
-
queryKey: QueryKey
|
|
597
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
598
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
491
599
|
};
|
|
492
600
|
/**
|
|
493
601
|
* 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**.
|
|
@@ -537,7 +645,7 @@ declare const useDeleteProduct: <TError = ErrorType<void | AsError>, TContext =
|
|
|
537
645
|
productId: string;
|
|
538
646
|
}, TContext>;
|
|
539
647
|
request?: SecondParameter<typeof customFetch>;
|
|
540
|
-
}) => UseMutationResult<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
648
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteProduct>>, TError, {
|
|
541
649
|
productId: string;
|
|
542
650
|
}, TContext>;
|
|
543
651
|
/**
|
|
@@ -596,7 +704,7 @@ declare const usePatchProduct: <TError = ErrorType<void | AsError>, TContext = u
|
|
|
596
704
|
data: ProductPatchBodyBody;
|
|
597
705
|
}, TContext>;
|
|
598
706
|
request?: SecondParameter<typeof customFetch>;
|
|
599
|
-
}) => UseMutationResult<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
707
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof patchProduct>>, TError, {
|
|
600
708
|
productId: string;
|
|
601
709
|
data: ProductPatchBodyBody;
|
|
602
710
|
}, TContext>;
|