@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.2

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.
Files changed (70) hide show
  1. package/asset/asset.cjs +24 -24
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +137 -102
  4. package/asset/asset.d.ts +137 -102
  5. package/asset/asset.js +24 -24
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +16 -16
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +137 -65
  10. package/charges/charges.d.ts +137 -65
  11. package/charges/charges.js +16 -16
  12. package/charges/charges.js.map +1 -1
  13. package/chunk-TKLTUR4R.cjs.map +1 -1
  14. package/event-stream/event-stream.cjs +8 -8
  15. package/event-stream/event-stream.cjs.map +1 -1
  16. package/event-stream/event-stream.d.cts +82 -47
  17. package/event-stream/event-stream.d.ts +82 -47
  18. package/event-stream/event-stream.js +8 -8
  19. package/event-stream/event-stream.js.map +1 -1
  20. package/index.cjs.map +1 -1
  21. package/index.d.cts +62 -14
  22. package/index.d.ts +62 -14
  23. package/index.js.map +1 -1
  24. package/merchant/merchant.cjs +8 -8
  25. package/merchant/merchant.cjs.map +1 -1
  26. package/merchant/merchant.d.cts +69 -33
  27. package/merchant/merchant.d.ts +69 -33
  28. package/merchant/merchant.js +8 -8
  29. package/merchant/merchant.js.map +1 -1
  30. package/organisation/organisation.cjs +14 -14
  31. package/organisation/organisation.cjs.map +1 -1
  32. package/organisation/organisation.d.cts +128 -75
  33. package/organisation/organisation.d.ts +128 -75
  34. package/organisation/organisation.js +14 -14
  35. package/organisation/organisation.js.map +1 -1
  36. package/package.json +7 -7
  37. package/product/product.cjs +24 -24
  38. package/product/product.cjs.map +1 -1
  39. package/product/product.d.cts +229 -122
  40. package/product/product.d.ts +229 -122
  41. package/product/product.js +24 -24
  42. package/product/product.js.map +1 -1
  43. package/src/account-server-api.schemas.ts +63 -14
  44. package/src/asset/asset.ts +185 -65
  45. package/src/charges/charges.ts +200 -18
  46. package/src/event-stream/event-stream.ts +114 -19
  47. package/src/merchant/merchant.ts +94 -10
  48. package/src/organisation/organisation.ts +171 -31
  49. package/src/product/product.ts +301 -41
  50. package/src/state/state.ts +50 -6
  51. package/src/unit/unit.ts +188 -38
  52. package/src/user/user.ts +183 -38
  53. package/state/state.cjs +4 -4
  54. package/state/state.cjs.map +1 -1
  55. package/state/state.d.cts +35 -17
  56. package/state/state.d.ts +35 -17
  57. package/state/state.js +4 -4
  58. package/state/state.js.map +1 -1
  59. package/unit/unit.cjs +12 -12
  60. package/unit/unit.cjs.map +1 -1
  61. package/unit/unit.d.cts +140 -87
  62. package/unit/unit.d.ts +140 -87
  63. package/unit/unit.js +12 -12
  64. package/unit/unit.js.map +1 -1
  65. package/user/user.cjs +12 -12
  66. package/user/user.cjs.map +1 -1
  67. package/user/user.d.cts +139 -86
  68. package/user/user.d.ts +139 -86
  69. package/user/user.js +12 -12
  70. package/user/user.js.map +1 -1
@@ -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<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
16
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
17
17
  request?: SecondParameter<typeof customInstance>;
18
- } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Organisations
25
- */
26
- declare const useGetCharges: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
27
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
42
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
34
43
  request?: SecondParameter<typeof customInstance>;
35
- } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Organisations
42
- */
43
- declare const useGetChargesSuspense: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
44
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
77
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
60
78
  request?: SecondParameter<typeof customInstance>;
61
- } | undefined) => UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Units in an Organisation
68
- */
69
- declare const useGetOrganisationCharges: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
70
- query?: Partial<UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
103
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
77
104
  request?: SecondParameter<typeof customInstance>;
78
- } | undefined) => UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Units in an Organisation
85
- */
86
- declare const useGetOrganisationChargesSuspense: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
87
- query?: Partial<UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
141
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
106
142
  request?: SecondParameter<typeof customInstance>;
107
- } | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Product
114
- */
115
- declare const useGetProductCharges: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
116
- query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
167
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
123
168
  request?: SecondParameter<typeof customInstance>;
124
- } | undefined) => UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Product
131
- */
132
- declare const useGetProductChargesSuspense: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
133
- query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
204
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
151
205
  request?: SecondParameter<typeof customInstance>;
152
- } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Unit
159
- */
160
- declare const useGetUnitCharges: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
161
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
230
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
168
231
  request?: SecondParameter<typeof customInstance>;
169
- } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Unit
176
- */
177
- declare const useGetUnitChargesSuspense: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
178
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
252
+ }): UseSuspenseQueryResult<TData, TError> & {
181
253
  queryKey: QueryKey;
182
254
  };
183
255
 
@@ -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<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
16
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
17
17
  request?: SecondParameter<typeof customInstance>;
18
- } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Organisations
25
- */
26
- declare const useGetCharges: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
27
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
42
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
34
43
  request?: SecondParameter<typeof customInstance>;
35
- } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Organisations
42
- */
43
- declare const useGetChargesSuspense: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
44
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
77
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
60
78
  request?: SecondParameter<typeof customInstance>;
61
- } | undefined) => UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Units in an Organisation
68
- */
69
- declare const useGetOrganisationCharges: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
70
- query?: Partial<UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
103
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
77
104
  request?: SecondParameter<typeof customInstance>;
78
- } | undefined) => UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Gets charges for all Units in an Organisation
85
- */
86
- declare const useGetOrganisationChargesSuspense: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
87
- query?: Partial<UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
141
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
106
142
  request?: SecondParameter<typeof customInstance>;
107
- } | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Product
114
- */
115
- declare const useGetProductCharges: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
116
- query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
167
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
123
168
  request?: SecondParameter<typeof customInstance>;
124
- } | undefined) => UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Product
131
- */
132
- declare const useGetProductChargesSuspense: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
133
- query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
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<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
204
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
151
205
  request?: SecondParameter<typeof customInstance>;
152
- } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Unit
159
- */
160
- declare const useGetUnitCharges: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
161
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseQueryResult<TData, TError> & {
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<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
230
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
168
231
  request?: SecondParameter<typeof customInstance>;
169
- } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
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
- * @summary Get charges made against a Unit
176
- */
177
- declare const useGetUnitChargesSuspense: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
178
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
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
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
252
+ }): UseSuspenseQueryResult<TData, TError> & {
181
253
  queryKey: QueryKey;
182
254
  };
183
255