@squonk/account-server-client 4.2.5 → 4.3.1

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 (84) hide show
  1. package/asset/asset.cjs +99 -126
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +99 -99
  4. package/asset/asset.d.ts +99 -99
  5. package/asset/asset.js +107 -134
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +73 -85
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +47 -47
  10. package/charges/charges.d.ts +47 -47
  11. package/charges/charges.js +78 -90
  12. package/charges/charges.js.map +1 -1
  13. package/chunk-3WKSNKHE.js +25 -0
  14. package/chunk-3WKSNKHE.js.map +1 -0
  15. package/chunk-NY2VJJG7.cjs +25 -0
  16. package/chunk-NY2VJJG7.cjs.map +1 -0
  17. package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
  18. package/chunk-RB2KVIEK.cjs.map +1 -0
  19. package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
  20. package/chunk-XYDLYMQ2.js.map +1 -0
  21. package/event-stream/event-stream.cjs +53 -61
  22. package/event-stream/event-stream.cjs.map +1 -1
  23. package/event-stream/event-stream.d.cts +44 -44
  24. package/event-stream/event-stream.d.ts +44 -44
  25. package/event-stream/event-stream.js +58 -66
  26. package/event-stream/event-stream.js.map +1 -1
  27. package/index.cjs +49 -58
  28. package/index.cjs.map +1 -1
  29. package/index.d.cts +783 -765
  30. package/index.d.ts +783 -765
  31. package/index.js +48 -57
  32. package/index.js.map +1 -1
  33. package/merchant/merchant.cjs +38 -45
  34. package/merchant/merchant.cjs.map +1 -1
  35. package/merchant/merchant.d.cts +25 -25
  36. package/merchant/merchant.d.ts +25 -25
  37. package/merchant/merchant.js +42 -49
  38. package/merchant/merchant.js.map +1 -1
  39. package/organisation/organisation.cjs +77 -87
  40. package/organisation/organisation.cjs.map +1 -1
  41. package/organisation/organisation.d.cts +72 -70
  42. package/organisation/organisation.d.ts +72 -70
  43. package/organisation/organisation.js +83 -93
  44. package/organisation/organisation.js.map +1 -1
  45. package/package.json +13 -16
  46. package/product/product.cjs +143 -153
  47. package/product/product.cjs.map +1 -1
  48. package/product/product.d.cts +100 -100
  49. package/product/product.d.ts +100 -100
  50. package/product/product.js +153 -163
  51. package/product/product.js.map +1 -1
  52. package/src/account-server-api.schemas.ts +862 -860
  53. package/src/asset/asset.ts +899 -634
  54. package/src/charges/charges.ts +822 -498
  55. package/src/custom-instance.ts +3 -3
  56. package/src/event-stream/event-stream.ts +530 -344
  57. package/src/index.ts +2 -2
  58. package/src/merchant/merchant.ts +355 -234
  59. package/src/options-mutator.ts +27 -0
  60. package/src/organisation/organisation.ts +812 -504
  61. package/src/product/product.ts +1373 -841
  62. package/src/state/state.ts +174 -127
  63. package/src/unit/unit.ts +1273 -603
  64. package/src/user/user.ts +895 -564
  65. package/state/state.cjs +22 -24
  66. package/state/state.cjs.map +1 -1
  67. package/state/state.d.cts +14 -14
  68. package/state/state.d.ts +14 -14
  69. package/state/state.js +24 -26
  70. package/state/state.js.map +1 -1
  71. package/unit/unit.cjs +171 -106
  72. package/unit/unit.cjs.map +1 -1
  73. package/unit/unit.d.cts +200 -90
  74. package/unit/unit.d.ts +200 -90
  75. package/unit/unit.js +179 -114
  76. package/unit/unit.js.map +1 -1
  77. package/user/user.cjs +94 -110
  78. package/user/user.cjs.map +1 -1
  79. package/user/user.d.cts +77 -77
  80. package/user/user.d.ts +77 -77
  81. package/user/user.js +101 -117
  82. package/user/user.js.map +1 -1
  83. package/chunk-EBOQPVLG.js.map +0 -1
  84. package/chunk-TKLTUR4R.cjs.map +0 -1
@@ -1,8 +1,8 @@
1
- import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
1
+ import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, QueryClient, 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
 
5
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
5
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
6
6
  /**
7
7
  * Gets global Charges.
8
8
 
@@ -11,8 +11,8 @@ You need admin rights to use this path.
11
11
  * @summary Gets charges for all Organisations
12
12
  */
13
13
  declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
14
- declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
15
- declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
14
+ declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["/charges", ...GetChargesParams[]];
15
+ declare const useGetChargesQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
16
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> & {
@@ -21,24 +21,24 @@ declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = E
21
21
  type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
22
22
  type GetChargesQueryError = ErrorType<void | AsError>;
23
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'>;
24
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
25
25
  request?: SecondParameter<typeof customInstance>;
26
- }): DefinedUseQueryResult<TData, TError> & {
26
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
27
27
  queryKey: DataTag<QueryKey, TData, TError>;
28
28
  };
29
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'>;
30
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
31
31
  request?: SecondParameter<typeof customInstance>;
32
- }): UseQueryResult<TData, TError> & {
32
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
33
33
  queryKey: DataTag<QueryKey, TData, TError>;
34
34
  };
35
35
  declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
36
36
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
37
37
  request?: SecondParameter<typeof customInstance>;
38
- }): UseQueryResult<TData, TError> & {
38
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
39
39
  queryKey: DataTag<QueryKey, TData, TError>;
40
40
  };
41
- declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
41
+ declare const useGetChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
42
42
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
43
43
  request?: SecondParameter<typeof customInstance>;
44
44
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
@@ -49,19 +49,19 @@ type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
49
49
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
50
50
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
51
51
  request?: SecondParameter<typeof customInstance>;
52
- }): UseSuspenseQueryResult<TData, TError> & {
52
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
53
53
  queryKey: DataTag<QueryKey, TData, TError>;
54
54
  };
55
55
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
56
56
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
57
57
  request?: SecondParameter<typeof customInstance>;
58
- }): UseSuspenseQueryResult<TData, TError> & {
58
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
59
59
  queryKey: DataTag<QueryKey, TData, TError>;
60
60
  };
61
61
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
62
62
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
63
63
  request?: SecondParameter<typeof customInstance>;
64
- }): UseSuspenseQueryResult<TData, TError> & {
64
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
65
65
  queryKey: DataTag<QueryKey, TData, TError>;
66
66
  };
67
67
  /**
@@ -72,8 +72,8 @@ The Organisation cannot be the **Default Organisation** and you need to be a mem
72
72
  * @summary Gets charges for all Units in an Organisation
73
73
  */
74
74
  declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
75
- declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
76
- declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
75
+ declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly [`/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
76
+ declare const useGetOrganisationChargesQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
77
77
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
78
78
  request?: SecondParameter<typeof customInstance>;
79
79
  }) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
@@ -82,24 +82,24 @@ declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationCharge
82
82
  type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
83
83
  type GetOrganisationChargesQueryError = ErrorType<void | AsError>;
84
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'>;
85
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
86
86
  request?: SecondParameter<typeof customInstance>;
87
- }): DefinedUseQueryResult<TData, TError> & {
87
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
88
88
  queryKey: DataTag<QueryKey, TData, TError>;
89
89
  };
90
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'>;
91
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
92
92
  request?: SecondParameter<typeof customInstance>;
93
- }): UseQueryResult<TData, TError> & {
93
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
94
94
  queryKey: DataTag<QueryKey, TData, TError>;
95
95
  };
96
96
  declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
97
97
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
98
98
  request?: SecondParameter<typeof customInstance>;
99
- }): UseQueryResult<TData, TError> & {
99
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
100
100
  queryKey: DataTag<QueryKey, TData, TError>;
101
101
  };
102
- declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
102
+ declare const useGetOrganisationChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
103
103
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
104
104
  request?: SecondParameter<typeof customInstance>;
105
105
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
@@ -110,19 +110,19 @@ type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;
110
110
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
111
111
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
112
112
  request?: SecondParameter<typeof customInstance>;
113
- }): UseSuspenseQueryResult<TData, TError> & {
113
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
114
114
  queryKey: DataTag<QueryKey, TData, TError>;
115
115
  };
116
116
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
117
117
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
118
118
  request?: SecondParameter<typeof customInstance>;
119
- }): UseSuspenseQueryResult<TData, TError> & {
119
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
120
120
  queryKey: DataTag<QueryKey, TData, TError>;
121
121
  };
122
122
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
123
123
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
124
124
  request?: SecondParameter<typeof customInstance>;
125
- }): UseSuspenseQueryResult<TData, TError> & {
125
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
126
126
  queryKey: DataTag<QueryKey, TData, TError>;
127
127
  };
128
128
  /**
@@ -136,8 +136,8 @@ You need to be part of the **Unit** or **Organisation** to use this method
136
136
  * @summary Get charges made against a Product
137
137
  */
138
138
  declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
139
- declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
140
- declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
139
+ declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly [`/charges/product/${string}`, ...GetProductChargesParams[]];
140
+ declare const useGetProductChargesQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
141
141
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
142
142
  request?: SecondParameter<typeof customInstance>;
143
143
  }) => UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
@@ -146,24 +146,24 @@ declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetRespon
146
146
  type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
147
147
  type GetProductChargesQueryError = ErrorType<AsError | void>;
148
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'>;
149
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
150
150
  request?: SecondParameter<typeof customInstance>;
151
- }): DefinedUseQueryResult<TData, TError> & {
151
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
152
152
  queryKey: DataTag<QueryKey, TData, TError>;
153
153
  };
154
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'>;
155
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
156
156
  request?: SecondParameter<typeof customInstance>;
157
- }): UseQueryResult<TData, TError> & {
157
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
158
158
  queryKey: DataTag<QueryKey, TData, TError>;
159
159
  };
160
160
  declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
161
161
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
162
162
  request?: SecondParameter<typeof customInstance>;
163
- }): UseQueryResult<TData, TError> & {
163
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
164
164
  queryKey: DataTag<QueryKey, TData, TError>;
165
165
  };
166
- declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
166
+ declare const useGetProductChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
167
167
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
168
168
  request?: SecondParameter<typeof customInstance>;
169
169
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
@@ -174,19 +174,19 @@ type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
174
174
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
175
175
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
176
176
  request?: SecondParameter<typeof customInstance>;
177
- }): UseSuspenseQueryResult<TData, TError> & {
177
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
178
178
  queryKey: DataTag<QueryKey, TData, TError>;
179
179
  };
180
180
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
181
181
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
182
182
  request?: SecondParameter<typeof customInstance>;
183
- }): UseSuspenseQueryResult<TData, TError> & {
183
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
184
184
  queryKey: DataTag<QueryKey, TData, TError>;
185
185
  };
186
186
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
187
187
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
188
188
  request?: SecondParameter<typeof customInstance>;
189
- }): UseSuspenseQueryResult<TData, TError> & {
189
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
190
190
  queryKey: DataTag<QueryKey, TData, TError>;
191
191
  };
192
192
  /**
@@ -199,8 +199,8 @@ You need to be part of the **Unit** or **Organisation** to use this method
199
199
  * @summary Get charges made against a Unit
200
200
  */
201
201
  declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
202
- declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
203
- declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
202
+ declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly [`/charges/unit/${string}`, ...GetUnitChargesParams[]];
203
+ declare const useGetUnitChargesQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
204
204
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
205
205
  request?: SecondParameter<typeof customInstance>;
206
206
  }) => UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
@@ -209,24 +209,24 @@ declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TE
209
209
  type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
210
210
  type GetUnitChargesQueryError = ErrorType<AsError | void>;
211
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'>;
212
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
213
213
  request?: SecondParameter<typeof customInstance>;
214
- }): DefinedUseQueryResult<TData, TError> & {
214
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
215
215
  queryKey: DataTag<QueryKey, TData, TError>;
216
216
  };
217
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'>;
218
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
219
219
  request?: SecondParameter<typeof customInstance>;
220
- }): UseQueryResult<TData, TError> & {
220
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
221
221
  queryKey: DataTag<QueryKey, TData, TError>;
222
222
  };
223
223
  declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
224
224
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
225
225
  request?: SecondParameter<typeof customInstance>;
226
- }): UseQueryResult<TData, TError> & {
226
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
227
227
  queryKey: DataTag<QueryKey, TData, TError>;
228
228
  };
229
- declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
229
+ declare const useGetUnitChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
230
230
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
231
231
  request?: SecondParameter<typeof customInstance>;
232
232
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
@@ -237,20 +237,20 @@ type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
237
237
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
238
238
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
239
239
  request?: SecondParameter<typeof customInstance>;
240
- }): UseSuspenseQueryResult<TData, TError> & {
240
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
241
241
  queryKey: DataTag<QueryKey, TData, TError>;
242
242
  };
243
243
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
244
244
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
245
245
  request?: SecondParameter<typeof customInstance>;
246
- }): UseSuspenseQueryResult<TData, TError> & {
246
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
247
247
  queryKey: DataTag<QueryKey, TData, TError>;
248
248
  };
249
249
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
250
250
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
251
251
  request?: SecondParameter<typeof customInstance>;
252
- }): UseSuspenseQueryResult<TData, TError> & {
252
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
253
253
  queryKey: DataTag<QueryKey, TData, TError>;
254
254
  };
255
255
 
256
- export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, type GetOrganisationChargesQueryError, type GetOrganisationChargesQueryResult, type GetOrganisationChargesSuspenseQueryError, type GetOrganisationChargesSuspenseQueryResult, type GetProductChargesQueryError, type GetProductChargesQueryResult, type GetProductChargesSuspenseQueryError, type GetProductChargesSuspenseQueryResult, type GetUnitChargesQueryError, type GetUnitChargesQueryResult, type GetUnitChargesSuspenseQueryError, type GetUnitChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetChargesQueryOptions, getGetChargesSuspenseQueryOptions, getGetOrganisationChargesQueryKey, getGetOrganisationChargesQueryOptions, getGetOrganisationChargesSuspenseQueryOptions, getGetProductChargesQueryKey, getGetProductChargesQueryOptions, getGetProductChargesSuspenseQueryOptions, getGetUnitChargesQueryKey, getGetUnitChargesQueryOptions, getGetUnitChargesSuspenseQueryOptions, getOrganisationCharges, getProductCharges, getUnitCharges, useGetCharges, useGetChargesSuspense, useGetOrganisationCharges, useGetOrganisationChargesSuspense, useGetProductCharges, useGetProductChargesSuspense, useGetUnitCharges, useGetUnitChargesSuspense };
256
+ export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, type GetOrganisationChargesQueryError, type GetOrganisationChargesQueryResult, type GetOrganisationChargesSuspenseQueryError, type GetOrganisationChargesSuspenseQueryResult, type GetProductChargesQueryError, type GetProductChargesQueryResult, type GetProductChargesSuspenseQueryError, type GetProductChargesSuspenseQueryResult, type GetUnitChargesQueryError, type GetUnitChargesQueryResult, type GetUnitChargesSuspenseQueryError, type GetUnitChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetOrganisationChargesQueryKey, getGetProductChargesQueryKey, getGetUnitChargesQueryKey, getOrganisationCharges, getProductCharges, getUnitCharges, useGetCharges, useGetChargesQueryOptions, useGetChargesSuspense, useGetChargesSuspenseQueryOptions, useGetOrganisationCharges, useGetOrganisationChargesQueryOptions, useGetOrganisationChargesSuspense, useGetOrganisationChargesSuspenseQueryOptions, useGetProductCharges, useGetProductChargesQueryOptions, useGetProductChargesSuspense, useGetProductChargesSuspenseQueryOptions, useGetUnitCharges, useGetUnitChargesQueryOptions, useGetUnitChargesSuspense, useGetUnitChargesSuspenseQueryOptions };
@@ -1,8 +1,8 @@
1
- import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
1
+ import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, QueryClient, 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
 
5
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
5
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
6
6
  /**
7
7
  * Gets global Charges.
8
8
 
@@ -11,8 +11,8 @@ You need admin rights to use this path.
11
11
  * @summary Gets charges for all Organisations
12
12
  */
13
13
  declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
14
- declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
15
- declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
14
+ declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["/charges", ...GetChargesParams[]];
15
+ declare const useGetChargesQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
16
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> & {
@@ -21,24 +21,24 @@ declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = E
21
21
  type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
22
22
  type GetChargesQueryError = ErrorType<void | AsError>;
23
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'>;
24
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
25
25
  request?: SecondParameter<typeof customInstance>;
26
- }): DefinedUseQueryResult<TData, TError> & {
26
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
27
27
  queryKey: DataTag<QueryKey, TData, TError>;
28
28
  };
29
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'>;
30
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
31
31
  request?: SecondParameter<typeof customInstance>;
32
- }): UseQueryResult<TData, TError> & {
32
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
33
33
  queryKey: DataTag<QueryKey, TData, TError>;
34
34
  };
35
35
  declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
36
36
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
37
37
  request?: SecondParameter<typeof customInstance>;
38
- }): UseQueryResult<TData, TError> & {
38
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
39
39
  queryKey: DataTag<QueryKey, TData, TError>;
40
40
  };
41
- declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
41
+ declare const useGetChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
42
42
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
43
43
  request?: SecondParameter<typeof customInstance>;
44
44
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
@@ -49,19 +49,19 @@ type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
49
49
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
50
50
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
51
51
  request?: SecondParameter<typeof customInstance>;
52
- }): UseSuspenseQueryResult<TData, TError> & {
52
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
53
53
  queryKey: DataTag<QueryKey, TData, TError>;
54
54
  };
55
55
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
56
56
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
57
57
  request?: SecondParameter<typeof customInstance>;
58
- }): UseSuspenseQueryResult<TData, TError> & {
58
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
59
59
  queryKey: DataTag<QueryKey, TData, TError>;
60
60
  };
61
61
  declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
62
62
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
63
63
  request?: SecondParameter<typeof customInstance>;
64
- }): UseSuspenseQueryResult<TData, TError> & {
64
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
65
65
  queryKey: DataTag<QueryKey, TData, TError>;
66
66
  };
67
67
  /**
@@ -72,8 +72,8 @@ The Organisation cannot be the **Default Organisation** and you need to be a mem
72
72
  * @summary Gets charges for all Units in an Organisation
73
73
  */
74
74
  declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
75
- declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
76
- declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
75
+ declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly [`/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
76
+ declare const useGetOrganisationChargesQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
77
77
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
78
78
  request?: SecondParameter<typeof customInstance>;
79
79
  }) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
@@ -82,24 +82,24 @@ declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationCharge
82
82
  type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
83
83
  type GetOrganisationChargesQueryError = ErrorType<void | AsError>;
84
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'>;
85
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
86
86
  request?: SecondParameter<typeof customInstance>;
87
- }): DefinedUseQueryResult<TData, TError> & {
87
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
88
88
  queryKey: DataTag<QueryKey, TData, TError>;
89
89
  };
90
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'>;
91
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
92
92
  request?: SecondParameter<typeof customInstance>;
93
- }): UseQueryResult<TData, TError> & {
93
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
94
94
  queryKey: DataTag<QueryKey, TData, TError>;
95
95
  };
96
96
  declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
97
97
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
98
98
  request?: SecondParameter<typeof customInstance>;
99
- }): UseQueryResult<TData, TError> & {
99
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
100
100
  queryKey: DataTag<QueryKey, TData, TError>;
101
101
  };
102
- declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
102
+ declare const useGetOrganisationChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
103
103
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
104
104
  request?: SecondParameter<typeof customInstance>;
105
105
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
@@ -110,19 +110,19 @@ type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;
110
110
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
111
111
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
112
112
  request?: SecondParameter<typeof customInstance>;
113
- }): UseSuspenseQueryResult<TData, TError> & {
113
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
114
114
  queryKey: DataTag<QueryKey, TData, TError>;
115
115
  };
116
116
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
117
117
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
118
118
  request?: SecondParameter<typeof customInstance>;
119
- }): UseSuspenseQueryResult<TData, TError> & {
119
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
120
120
  queryKey: DataTag<QueryKey, TData, TError>;
121
121
  };
122
122
  declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
123
123
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
124
124
  request?: SecondParameter<typeof customInstance>;
125
- }): UseSuspenseQueryResult<TData, TError> & {
125
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
126
126
  queryKey: DataTag<QueryKey, TData, TError>;
127
127
  };
128
128
  /**
@@ -136,8 +136,8 @@ You need to be part of the **Unit** or **Organisation** to use this method
136
136
  * @summary Get charges made against a Product
137
137
  */
138
138
  declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
139
- declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
140
- declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
139
+ declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly [`/charges/product/${string}`, ...GetProductChargesParams[]];
140
+ declare const useGetProductChargesQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
141
141
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
142
142
  request?: SecondParameter<typeof customInstance>;
143
143
  }) => UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
@@ -146,24 +146,24 @@ declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetRespon
146
146
  type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
147
147
  type GetProductChargesQueryError = ErrorType<AsError | void>;
148
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'>;
149
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
150
150
  request?: SecondParameter<typeof customInstance>;
151
- }): DefinedUseQueryResult<TData, TError> & {
151
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
152
152
  queryKey: DataTag<QueryKey, TData, TError>;
153
153
  };
154
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'>;
155
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
156
156
  request?: SecondParameter<typeof customInstance>;
157
- }): UseQueryResult<TData, TError> & {
157
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
158
158
  queryKey: DataTag<QueryKey, TData, TError>;
159
159
  };
160
160
  declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
161
161
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
162
162
  request?: SecondParameter<typeof customInstance>;
163
- }): UseQueryResult<TData, TError> & {
163
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
164
164
  queryKey: DataTag<QueryKey, TData, TError>;
165
165
  };
166
- declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
166
+ declare const useGetProductChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
167
167
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
168
168
  request?: SecondParameter<typeof customInstance>;
169
169
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
@@ -174,19 +174,19 @@ type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
174
174
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
175
175
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
176
176
  request?: SecondParameter<typeof customInstance>;
177
- }): UseSuspenseQueryResult<TData, TError> & {
177
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
178
178
  queryKey: DataTag<QueryKey, TData, TError>;
179
179
  };
180
180
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
181
181
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
182
182
  request?: SecondParameter<typeof customInstance>;
183
- }): UseSuspenseQueryResult<TData, TError> & {
183
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
184
184
  queryKey: DataTag<QueryKey, TData, TError>;
185
185
  };
186
186
  declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
187
187
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
188
188
  request?: SecondParameter<typeof customInstance>;
189
- }): UseSuspenseQueryResult<TData, TError> & {
189
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
190
190
  queryKey: DataTag<QueryKey, TData, TError>;
191
191
  };
192
192
  /**
@@ -199,8 +199,8 @@ You need to be part of the **Unit** or **Organisation** to use this method
199
199
  * @summary Get charges made against a Unit
200
200
  */
201
201
  declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
202
- declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
203
- declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
202
+ declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly [`/charges/unit/${string}`, ...GetUnitChargesParams[]];
203
+ declare const useGetUnitChargesQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
204
204
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
205
205
  request?: SecondParameter<typeof customInstance>;
206
206
  }) => UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
@@ -209,24 +209,24 @@ declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TE
209
209
  type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
210
210
  type GetUnitChargesQueryError = ErrorType<AsError | void>;
211
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'>;
212
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
213
213
  request?: SecondParameter<typeof customInstance>;
214
- }): DefinedUseQueryResult<TData, TError> & {
214
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
215
215
  queryKey: DataTag<QueryKey, TData, TError>;
216
216
  };
217
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'>;
218
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
219
219
  request?: SecondParameter<typeof customInstance>;
220
- }): UseQueryResult<TData, TError> & {
220
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
221
221
  queryKey: DataTag<QueryKey, TData, TError>;
222
222
  };
223
223
  declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
224
224
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
225
225
  request?: SecondParameter<typeof customInstance>;
226
- }): UseQueryResult<TData, TError> & {
226
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
227
227
  queryKey: DataTag<QueryKey, TData, TError>;
228
228
  };
229
- declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
229
+ declare const useGetUnitChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
230
230
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
231
231
  request?: SecondParameter<typeof customInstance>;
232
232
  }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
@@ -237,20 +237,20 @@ type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
237
237
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
238
238
  query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
239
239
  request?: SecondParameter<typeof customInstance>;
240
- }): UseSuspenseQueryResult<TData, TError> & {
240
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
241
241
  queryKey: DataTag<QueryKey, TData, TError>;
242
242
  };
243
243
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
244
244
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
245
245
  request?: SecondParameter<typeof customInstance>;
246
- }): UseSuspenseQueryResult<TData, TError> & {
246
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
247
247
  queryKey: DataTag<QueryKey, TData, TError>;
248
248
  };
249
249
  declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
250
250
  query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
251
251
  request?: SecondParameter<typeof customInstance>;
252
- }): UseSuspenseQueryResult<TData, TError> & {
252
+ }, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
253
253
  queryKey: DataTag<QueryKey, TData, TError>;
254
254
  };
255
255
 
256
- export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, type GetOrganisationChargesQueryError, type GetOrganisationChargesQueryResult, type GetOrganisationChargesSuspenseQueryError, type GetOrganisationChargesSuspenseQueryResult, type GetProductChargesQueryError, type GetProductChargesQueryResult, type GetProductChargesSuspenseQueryError, type GetProductChargesSuspenseQueryResult, type GetUnitChargesQueryError, type GetUnitChargesQueryResult, type GetUnitChargesSuspenseQueryError, type GetUnitChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetChargesQueryOptions, getGetChargesSuspenseQueryOptions, getGetOrganisationChargesQueryKey, getGetOrganisationChargesQueryOptions, getGetOrganisationChargesSuspenseQueryOptions, getGetProductChargesQueryKey, getGetProductChargesQueryOptions, getGetProductChargesSuspenseQueryOptions, getGetUnitChargesQueryKey, getGetUnitChargesQueryOptions, getGetUnitChargesSuspenseQueryOptions, getOrganisationCharges, getProductCharges, getUnitCharges, useGetCharges, useGetChargesSuspense, useGetOrganisationCharges, useGetOrganisationChargesSuspense, useGetProductCharges, useGetProductChargesSuspense, useGetUnitCharges, useGetUnitChargesSuspense };
256
+ export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, type GetOrganisationChargesQueryError, type GetOrganisationChargesQueryResult, type GetOrganisationChargesSuspenseQueryError, type GetOrganisationChargesSuspenseQueryResult, type GetProductChargesQueryError, type GetProductChargesQueryResult, type GetProductChargesSuspenseQueryError, type GetProductChargesSuspenseQueryResult, type GetUnitChargesQueryError, type GetUnitChargesQueryResult, type GetUnitChargesSuspenseQueryError, type GetUnitChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetOrganisationChargesQueryKey, getGetProductChargesQueryKey, getGetUnitChargesQueryKey, getOrganisationCharges, getProductCharges, getUnitCharges, useGetCharges, useGetChargesQueryOptions, useGetChargesSuspense, useGetChargesSuspenseQueryOptions, useGetOrganisationCharges, useGetOrganisationChargesQueryOptions, useGetOrganisationChargesSuspense, useGetOrganisationChargesSuspenseQueryOptions, useGetProductCharges, useGetProductChargesQueryOptions, useGetProductChargesSuspense, useGetProductChargesSuspenseQueryOptions, useGetUnitCharges, useGetUnitChargesQueryOptions, useGetUnitChargesSuspense, useGetUnitChargesSuspenseQueryOptions };