@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +24 -24
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +137 -102
- package/asset/asset.d.ts +137 -102
- package/asset/asset.js +24 -24
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +16 -16
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +137 -65
- package/charges/charges.d.ts +137 -65
- package/charges/charges.js +16 -16
- package/charges/charges.js.map +1 -1
- package/chunk-TKLTUR4R.cjs.map +1 -1
- package/event-stream/event-stream.cjs +8 -8
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +82 -47
- package/event-stream/event-stream.d.ts +82 -47
- package/event-stream/event-stream.js +8 -8
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +62 -14
- package/index.d.ts +62 -14
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +8 -8
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +69 -33
- package/merchant/merchant.d.ts +69 -33
- package/merchant/merchant.js +8 -8
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +14 -14
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +128 -75
- package/organisation/organisation.d.ts +128 -75
- package/organisation/organisation.js +14 -14
- package/organisation/organisation.js.map +1 -1
- package/package.json +7 -7
- package/product/product.cjs +24 -24
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +229 -122
- package/product/product.d.ts +229 -122
- package/product/product.js +24 -24
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +63 -14
- package/src/asset/asset.ts +185 -65
- package/src/charges/charges.ts +200 -18
- package/src/event-stream/event-stream.ts +114 -19
- package/src/merchant/merchant.ts +94 -10
- package/src/organisation/organisation.ts +171 -31
- package/src/product/product.ts +301 -41
- package/src/state/state.ts +50 -6
- package/src/unit/unit.ts +188 -38
- package/src/user/user.ts +183 -38
- package/state/state.cjs +4 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +35 -17
- package/state/state.d.ts +35 -17
- package/state/state.js +4 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +12 -12
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +140 -87
- package/unit/unit.d.ts +140 -87
- package/unit/unit.js +12 -12
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +12 -12
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +139 -86
- package/user/user.d.ts +139 -86
- package/user/user.js +12 -12
- package/user/user.js.map +1 -1
package/charges/charges.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError, GetOrganisationChargesParams, OrganisationChargesGetResponse, GetProductChargesParams, ProductChargesGetResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -13,37 +13,55 @@ You need admin rights to use this path.
|
|
|
13
13
|
declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
|
|
14
14
|
declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
|
|
15
15
|
declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
16
|
-
query?: Partial<UseQueryOptions<
|
|
16
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
|
-
}
|
|
18
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
19
19
|
queryKey: QueryKey;
|
|
20
20
|
};
|
|
21
21
|
type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
22
22
|
type GetChargesQueryError = ErrorType<void | AsError>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
24
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>, 'initialData'>;
|
|
25
|
+
request?: SecondParameter<typeof customInstance>;
|
|
26
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
27
|
+
queryKey: QueryKey;
|
|
28
|
+
};
|
|
29
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
30
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>, 'initialData'>;
|
|
31
|
+
request?: SecondParameter<typeof customInstance>;
|
|
32
|
+
}): UseQueryResult<TData, TError> & {
|
|
33
|
+
queryKey: QueryKey;
|
|
34
|
+
};
|
|
35
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
36
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
28
37
|
request?: SecondParameter<typeof customInstance>;
|
|
29
|
-
}
|
|
38
|
+
}): UseQueryResult<TData, TError> & {
|
|
30
39
|
queryKey: QueryKey;
|
|
31
40
|
};
|
|
32
41
|
declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
33
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
42
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
34
43
|
request?: SecondParameter<typeof customInstance>;
|
|
35
|
-
}
|
|
44
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
36
45
|
queryKey: QueryKey;
|
|
37
46
|
};
|
|
38
47
|
type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
39
48
|
type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
50
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
51
|
+
request?: SecondParameter<typeof customInstance>;
|
|
52
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
53
|
+
queryKey: QueryKey;
|
|
54
|
+
};
|
|
55
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
56
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
57
|
+
request?: SecondParameter<typeof customInstance>;
|
|
58
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
59
|
+
queryKey: QueryKey;
|
|
60
|
+
};
|
|
61
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
62
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
45
63
|
request?: SecondParameter<typeof customInstance>;
|
|
46
|
-
}
|
|
64
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
47
65
|
queryKey: QueryKey;
|
|
48
66
|
};
|
|
49
67
|
/**
|
|
@@ -56,37 +74,55 @@ The Organisation cannot be the **Default Organisation** and you need to be a mem
|
|
|
56
74
|
declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
|
|
57
75
|
declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
|
|
58
76
|
declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
59
|
-
query?: Partial<UseQueryOptions<
|
|
77
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
60
78
|
request?: SecondParameter<typeof customInstance>;
|
|
61
|
-
}
|
|
79
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
62
80
|
queryKey: QueryKey;
|
|
63
81
|
};
|
|
64
82
|
type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
65
83
|
type GetOrganisationChargesQueryError = ErrorType<void | AsError>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
85
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>, 'initialData'>;
|
|
86
|
+
request?: SecondParameter<typeof customInstance>;
|
|
87
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
88
|
+
queryKey: QueryKey;
|
|
89
|
+
};
|
|
90
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
91
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>, 'initialData'>;
|
|
92
|
+
request?: SecondParameter<typeof customInstance>;
|
|
93
|
+
}): UseQueryResult<TData, TError> & {
|
|
94
|
+
queryKey: QueryKey;
|
|
95
|
+
};
|
|
96
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
97
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
71
98
|
request?: SecondParameter<typeof customInstance>;
|
|
72
|
-
}
|
|
99
|
+
}): UseQueryResult<TData, TError> & {
|
|
73
100
|
queryKey: QueryKey;
|
|
74
101
|
};
|
|
75
102
|
declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
76
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
103
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
77
104
|
request?: SecondParameter<typeof customInstance>;
|
|
78
|
-
}
|
|
105
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
79
106
|
queryKey: QueryKey;
|
|
80
107
|
};
|
|
81
108
|
type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
82
109
|
type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
110
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
111
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
112
|
+
request?: SecondParameter<typeof customInstance>;
|
|
113
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
114
|
+
queryKey: QueryKey;
|
|
115
|
+
};
|
|
116
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
117
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
118
|
+
request?: SecondParameter<typeof customInstance>;
|
|
119
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
120
|
+
queryKey: QueryKey;
|
|
121
|
+
};
|
|
122
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
123
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
88
124
|
request?: SecondParameter<typeof customInstance>;
|
|
89
|
-
}
|
|
125
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
90
126
|
queryKey: QueryKey;
|
|
91
127
|
};
|
|
92
128
|
/**
|
|
@@ -102,37 +138,55 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
102
138
|
declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
|
|
103
139
|
declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
|
|
104
140
|
declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
105
|
-
query?: Partial<UseQueryOptions<
|
|
141
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
106
142
|
request?: SecondParameter<typeof customInstance>;
|
|
107
|
-
}
|
|
143
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
108
144
|
queryKey: QueryKey;
|
|
109
145
|
};
|
|
110
146
|
type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
111
147
|
type GetProductChargesQueryError = ErrorType<AsError | void>;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
148
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
149
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>, 'initialData'>;
|
|
150
|
+
request?: SecondParameter<typeof customInstance>;
|
|
151
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
152
|
+
queryKey: QueryKey;
|
|
153
|
+
};
|
|
154
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
155
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>, 'initialData'>;
|
|
156
|
+
request?: SecondParameter<typeof customInstance>;
|
|
157
|
+
}): UseQueryResult<TData, TError> & {
|
|
158
|
+
queryKey: QueryKey;
|
|
159
|
+
};
|
|
160
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
161
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
117
162
|
request?: SecondParameter<typeof customInstance>;
|
|
118
|
-
}
|
|
163
|
+
}): UseQueryResult<TData, TError> & {
|
|
119
164
|
queryKey: QueryKey;
|
|
120
165
|
};
|
|
121
166
|
declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
122
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
167
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
123
168
|
request?: SecondParameter<typeof customInstance>;
|
|
124
|
-
}
|
|
169
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
125
170
|
queryKey: QueryKey;
|
|
126
171
|
};
|
|
127
172
|
type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
128
173
|
type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
174
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
175
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
176
|
+
request?: SecondParameter<typeof customInstance>;
|
|
177
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
178
|
+
queryKey: QueryKey;
|
|
179
|
+
};
|
|
180
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
181
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
182
|
+
request?: SecondParameter<typeof customInstance>;
|
|
183
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
184
|
+
queryKey: QueryKey;
|
|
185
|
+
};
|
|
186
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
187
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
134
188
|
request?: SecondParameter<typeof customInstance>;
|
|
135
|
-
}
|
|
189
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
136
190
|
queryKey: QueryKey;
|
|
137
191
|
};
|
|
138
192
|
/**
|
|
@@ -147,37 +201,55 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
147
201
|
declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
|
|
148
202
|
declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
|
|
149
203
|
declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
150
|
-
query?: Partial<UseQueryOptions<
|
|
204
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
151
205
|
request?: SecondParameter<typeof customInstance>;
|
|
152
|
-
}
|
|
206
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
153
207
|
queryKey: QueryKey;
|
|
154
208
|
};
|
|
155
209
|
type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
156
210
|
type GetUnitChargesQueryError = ErrorType<AsError | void>;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
211
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
212
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>, 'initialData'>;
|
|
213
|
+
request?: SecondParameter<typeof customInstance>;
|
|
214
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
215
|
+
queryKey: QueryKey;
|
|
216
|
+
};
|
|
217
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
218
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>, 'initialData'>;
|
|
219
|
+
request?: SecondParameter<typeof customInstance>;
|
|
220
|
+
}): UseQueryResult<TData, TError> & {
|
|
221
|
+
queryKey: QueryKey;
|
|
222
|
+
};
|
|
223
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
224
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
162
225
|
request?: SecondParameter<typeof customInstance>;
|
|
163
|
-
}
|
|
226
|
+
}): UseQueryResult<TData, TError> & {
|
|
164
227
|
queryKey: QueryKey;
|
|
165
228
|
};
|
|
166
229
|
declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
167
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
230
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
168
231
|
request?: SecondParameter<typeof customInstance>;
|
|
169
|
-
}
|
|
232
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
170
233
|
queryKey: QueryKey;
|
|
171
234
|
};
|
|
172
235
|
type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
173
236
|
type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
237
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
238
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
239
|
+
request?: SecondParameter<typeof customInstance>;
|
|
240
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
241
|
+
queryKey: QueryKey;
|
|
242
|
+
};
|
|
243
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
244
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
245
|
+
request?: SecondParameter<typeof customInstance>;
|
|
246
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
247
|
+
queryKey: QueryKey;
|
|
248
|
+
};
|
|
249
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
250
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
179
251
|
request?: SecondParameter<typeof customInstance>;
|
|
180
|
-
}
|
|
252
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
181
253
|
queryKey: QueryKey;
|
|
182
254
|
};
|
|
183
255
|
|
package/charges/charges.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError, GetOrganisationChargesParams, OrganisationChargesGetResponse, GetProductChargesParams, ProductChargesGetResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -13,37 +13,55 @@ You need admin rights to use this path.
|
|
|
13
13
|
declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
|
|
14
14
|
declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
|
|
15
15
|
declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
16
|
-
query?: Partial<UseQueryOptions<
|
|
16
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
|
-
}
|
|
18
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
19
19
|
queryKey: QueryKey;
|
|
20
20
|
};
|
|
21
21
|
type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
22
22
|
type GetChargesQueryError = ErrorType<void | AsError>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
24
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>, 'initialData'>;
|
|
25
|
+
request?: SecondParameter<typeof customInstance>;
|
|
26
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
27
|
+
queryKey: QueryKey;
|
|
28
|
+
};
|
|
29
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
30
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>, 'initialData'>;
|
|
31
|
+
request?: SecondParameter<typeof customInstance>;
|
|
32
|
+
}): UseQueryResult<TData, TError> & {
|
|
33
|
+
queryKey: QueryKey;
|
|
34
|
+
};
|
|
35
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
36
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
28
37
|
request?: SecondParameter<typeof customInstance>;
|
|
29
|
-
}
|
|
38
|
+
}): UseQueryResult<TData, TError> & {
|
|
30
39
|
queryKey: QueryKey;
|
|
31
40
|
};
|
|
32
41
|
declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
33
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
42
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
34
43
|
request?: SecondParameter<typeof customInstance>;
|
|
35
|
-
}
|
|
44
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
36
45
|
queryKey: QueryKey;
|
|
37
46
|
};
|
|
38
47
|
type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
39
48
|
type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
50
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
51
|
+
request?: SecondParameter<typeof customInstance>;
|
|
52
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
53
|
+
queryKey: QueryKey;
|
|
54
|
+
};
|
|
55
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
56
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
57
|
+
request?: SecondParameter<typeof customInstance>;
|
|
58
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
59
|
+
queryKey: QueryKey;
|
|
60
|
+
};
|
|
61
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
62
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
45
63
|
request?: SecondParameter<typeof customInstance>;
|
|
46
|
-
}
|
|
64
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
47
65
|
queryKey: QueryKey;
|
|
48
66
|
};
|
|
49
67
|
/**
|
|
@@ -56,37 +74,55 @@ The Organisation cannot be the **Default Organisation** and you need to be a mem
|
|
|
56
74
|
declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
|
|
57
75
|
declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
|
|
58
76
|
declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
59
|
-
query?: Partial<UseQueryOptions<
|
|
77
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
60
78
|
request?: SecondParameter<typeof customInstance>;
|
|
61
|
-
}
|
|
79
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
62
80
|
queryKey: QueryKey;
|
|
63
81
|
};
|
|
64
82
|
type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
65
83
|
type GetOrganisationChargesQueryError = ErrorType<void | AsError>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
85
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>, 'initialData'>;
|
|
86
|
+
request?: SecondParameter<typeof customInstance>;
|
|
87
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
88
|
+
queryKey: QueryKey;
|
|
89
|
+
};
|
|
90
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
91
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>, 'initialData'>;
|
|
92
|
+
request?: SecondParameter<typeof customInstance>;
|
|
93
|
+
}): UseQueryResult<TData, TError> & {
|
|
94
|
+
queryKey: QueryKey;
|
|
95
|
+
};
|
|
96
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
97
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
71
98
|
request?: SecondParameter<typeof customInstance>;
|
|
72
|
-
}
|
|
99
|
+
}): UseQueryResult<TData, TError> & {
|
|
73
100
|
queryKey: QueryKey;
|
|
74
101
|
};
|
|
75
102
|
declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
76
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
103
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
77
104
|
request?: SecondParameter<typeof customInstance>;
|
|
78
|
-
}
|
|
105
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
79
106
|
queryKey: QueryKey;
|
|
80
107
|
};
|
|
81
108
|
type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
82
109
|
type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
110
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
111
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
112
|
+
request?: SecondParameter<typeof customInstance>;
|
|
113
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
114
|
+
queryKey: QueryKey;
|
|
115
|
+
};
|
|
116
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
117
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
118
|
+
request?: SecondParameter<typeof customInstance>;
|
|
119
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
120
|
+
queryKey: QueryKey;
|
|
121
|
+
};
|
|
122
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
123
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
88
124
|
request?: SecondParameter<typeof customInstance>;
|
|
89
|
-
}
|
|
125
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
90
126
|
queryKey: QueryKey;
|
|
91
127
|
};
|
|
92
128
|
/**
|
|
@@ -102,37 +138,55 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
102
138
|
declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
|
|
103
139
|
declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
|
|
104
140
|
declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
105
|
-
query?: Partial<UseQueryOptions<
|
|
141
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
106
142
|
request?: SecondParameter<typeof customInstance>;
|
|
107
|
-
}
|
|
143
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
108
144
|
queryKey: QueryKey;
|
|
109
145
|
};
|
|
110
146
|
type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
111
147
|
type GetProductChargesQueryError = ErrorType<AsError | void>;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
148
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
149
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>, 'initialData'>;
|
|
150
|
+
request?: SecondParameter<typeof customInstance>;
|
|
151
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
152
|
+
queryKey: QueryKey;
|
|
153
|
+
};
|
|
154
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
155
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>, 'initialData'>;
|
|
156
|
+
request?: SecondParameter<typeof customInstance>;
|
|
157
|
+
}): UseQueryResult<TData, TError> & {
|
|
158
|
+
queryKey: QueryKey;
|
|
159
|
+
};
|
|
160
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
161
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
117
162
|
request?: SecondParameter<typeof customInstance>;
|
|
118
|
-
}
|
|
163
|
+
}): UseQueryResult<TData, TError> & {
|
|
119
164
|
queryKey: QueryKey;
|
|
120
165
|
};
|
|
121
166
|
declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
122
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
167
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
123
168
|
request?: SecondParameter<typeof customInstance>;
|
|
124
|
-
}
|
|
169
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
125
170
|
queryKey: QueryKey;
|
|
126
171
|
};
|
|
127
172
|
type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
128
173
|
type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
174
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
175
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
176
|
+
request?: SecondParameter<typeof customInstance>;
|
|
177
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
178
|
+
queryKey: QueryKey;
|
|
179
|
+
};
|
|
180
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
181
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
182
|
+
request?: SecondParameter<typeof customInstance>;
|
|
183
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
184
|
+
queryKey: QueryKey;
|
|
185
|
+
};
|
|
186
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
187
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
134
188
|
request?: SecondParameter<typeof customInstance>;
|
|
135
|
-
}
|
|
189
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
136
190
|
queryKey: QueryKey;
|
|
137
191
|
};
|
|
138
192
|
/**
|
|
@@ -147,37 +201,55 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
147
201
|
declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
|
|
148
202
|
declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
|
|
149
203
|
declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
150
|
-
query?: Partial<UseQueryOptions<
|
|
204
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
151
205
|
request?: SecondParameter<typeof customInstance>;
|
|
152
|
-
}
|
|
206
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
153
207
|
queryKey: QueryKey;
|
|
154
208
|
};
|
|
155
209
|
type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
156
210
|
type GetUnitChargesQueryError = ErrorType<AsError | void>;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
211
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
212
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>, 'initialData'>;
|
|
213
|
+
request?: SecondParameter<typeof customInstance>;
|
|
214
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
215
|
+
queryKey: QueryKey;
|
|
216
|
+
};
|
|
217
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
218
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>, 'initialData'>;
|
|
219
|
+
request?: SecondParameter<typeof customInstance>;
|
|
220
|
+
}): UseQueryResult<TData, TError> & {
|
|
221
|
+
queryKey: QueryKey;
|
|
222
|
+
};
|
|
223
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
224
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
162
225
|
request?: SecondParameter<typeof customInstance>;
|
|
163
|
-
}
|
|
226
|
+
}): UseQueryResult<TData, TError> & {
|
|
164
227
|
queryKey: QueryKey;
|
|
165
228
|
};
|
|
166
229
|
declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
167
|
-
query?: Partial<UseSuspenseQueryOptions<
|
|
230
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
168
231
|
request?: SecondParameter<typeof customInstance>;
|
|
169
|
-
}
|
|
232
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
170
233
|
queryKey: QueryKey;
|
|
171
234
|
};
|
|
172
235
|
type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
173
236
|
type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
237
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
238
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
239
|
+
request?: SecondParameter<typeof customInstance>;
|
|
240
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
241
|
+
queryKey: QueryKey;
|
|
242
|
+
};
|
|
243
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
244
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
245
|
+
request?: SecondParameter<typeof customInstance>;
|
|
246
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
247
|
+
queryKey: QueryKey;
|
|
248
|
+
};
|
|
249
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
250
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
179
251
|
request?: SecondParameter<typeof customInstance>;
|
|
180
|
-
}
|
|
252
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
181
253
|
queryKey: QueryKey;
|
|
182
254
|
};
|
|
183
255
|
|