@squonk/account-server-client 2.4.1 → 3.0.0-rc.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 (51) hide show
  1. package/asset/package.json +6 -6
  2. package/charges/charges.cjs +188 -0
  3. package/charges/charges.cjs.map +1 -0
  4. package/charges/charges.d.cts +184 -0
  5. package/charges/charges.d.ts +184 -0
  6. package/charges/charges.js +188 -0
  7. package/charges/charges.js.map +1 -0
  8. package/charges/package.json +7 -0
  9. package/event-stream/package.json +6 -6
  10. package/index.cjs.map +1 -1
  11. package/index.d.cts +2 -2
  12. package/index.d.ts +2 -2
  13. package/index.js.map +1 -1
  14. package/merchant/package.json +6 -6
  15. package/organisation/organisation.cjs +1 -45
  16. package/organisation/organisation.cjs.map +1 -1
  17. package/organisation/organisation.d.cts +5 -48
  18. package/organisation/organisation.d.ts +5 -48
  19. package/organisation/organisation.js +0 -44
  20. package/organisation/organisation.js.map +1 -1
  21. package/organisation/package.json +6 -6
  22. package/package.json +1 -1
  23. package/product/package.json +6 -6
  24. package/product/product.cjs +1 -45
  25. package/product/product.cjs.map +1 -1
  26. package/product/product.d.cts +2 -48
  27. package/product/product.d.ts +2 -48
  28. package/product/product.js +0 -44
  29. package/product/product.js.map +1 -1
  30. package/src/account-server-api.schemas.ts +2 -2
  31. package/src/charges/charges.ts +487 -0
  32. package/src/organisation/organisation.ts +0 -114
  33. package/src/product/product.ts +1 -117
  34. package/src/unit/unit.ts +1 -116
  35. package/state/package.json +6 -6
  36. package/unit/package.json +6 -6
  37. package/unit/unit.cjs +1 -45
  38. package/unit/unit.cjs.map +1 -1
  39. package/unit/unit.d.cts +2 -47
  40. package/unit/unit.d.ts +2 -47
  41. package/unit/unit.js +0 -44
  42. package/unit/unit.js.map +1 -1
  43. package/user/package.json +6 -6
  44. package/admin/admin.cjs +0 -56
  45. package/admin/admin.cjs.map +0 -1
  46. package/admin/admin.d.cts +0 -50
  47. package/admin/admin.d.ts +0 -50
  48. package/admin/admin.js +0 -56
  49. package/admin/admin.js.map +0 -1
  50. package/admin/package.json +0 -7
  51. package/src/admin/admin.ts +0 -140
@@ -1,7 +1,7 @@
1
1
  {
2
- "module": "./asset.js",
3
- "main": "./asset.cjs",
4
- "types": "./asset.d.ts",
5
- "sideEffects": false,
6
- "type": "module"
7
- }
2
+ "module": "./asset.js",
3
+ "main": "./asset.cjs",
4
+ "types": "./asset.d.ts",
5
+ "sideEffects": false,
6
+ "type": "module"
7
+ }
@@ -0,0 +1,188 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
4
+
5
+ // src/charges/charges.ts
6
+
7
+
8
+
9
+ var _reactquery = require('@tanstack/react-query');
10
+ var getCharges = (params, options, signal) => {
11
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
12
+ {
13
+ url: `/charges`,
14
+ method: "GET",
15
+ params,
16
+ signal
17
+ },
18
+ options
19
+ );
20
+ };
21
+ var getGetChargesQueryKey = (params) => {
22
+ return ["account-server-api", `/charges`, ...params ? [params] : []];
23
+ };
24
+ var getGetChargesQueryOptions = (params, options) => {
25
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
26
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetChargesQueryKey(params)));
27
+ const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
28
+ return { queryKey, queryFn, ...queryOptions };
29
+ };
30
+ var useGetCharges = (params, options) => {
31
+ const queryOptions = getGetChargesQueryOptions(params, options);
32
+ const query = _reactquery.useQuery.call(void 0, queryOptions);
33
+ query.queryKey = queryOptions.queryKey;
34
+ return query;
35
+ };
36
+ var getGetChargesSuspenseQueryOptions = (params, options) => {
37
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
38
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetChargesQueryKey(params)));
39
+ const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
40
+ return { queryKey, queryFn, ...queryOptions };
41
+ };
42
+ var useGetChargesSuspense = (params, options) => {
43
+ const queryOptions = getGetChargesSuspenseQueryOptions(params, options);
44
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
45
+ query.queryKey = queryOptions.queryKey;
46
+ return query;
47
+ };
48
+ var getOrganisationCharges = (orgId, params, options, signal) => {
49
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
50
+ {
51
+ url: `/charges/organisation/${orgId}`,
52
+ method: "GET",
53
+ params,
54
+ signal
55
+ },
56
+ options
57
+ );
58
+ };
59
+ var getGetOrganisationChargesQueryKey = (orgId, params) => {
60
+ return ["account-server-api", `/charges/organisation/${orgId}`, ...params ? [params] : []];
61
+ };
62
+ var getGetOrganisationChargesQueryOptions = (orgId, params, options) => {
63
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
64
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationChargesQueryKey(orgId, params)));
65
+ const queryFn = ({ signal }) => getOrganisationCharges(orgId, params, requestOptions, signal);
66
+ return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
67
+ };
68
+ var useGetOrganisationCharges = (orgId, params, options) => {
69
+ const queryOptions = getGetOrganisationChargesQueryOptions(orgId, params, options);
70
+ const query = _reactquery.useQuery.call(void 0, queryOptions);
71
+ query.queryKey = queryOptions.queryKey;
72
+ return query;
73
+ };
74
+ var getGetOrganisationChargesSuspenseQueryOptions = (orgId, params, options) => {
75
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
76
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationChargesQueryKey(orgId, params)));
77
+ const queryFn = ({ signal }) => getOrganisationCharges(orgId, params, requestOptions, signal);
78
+ return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
79
+ };
80
+ var useGetOrganisationChargesSuspense = (orgId, params, options) => {
81
+ const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId, params, options);
82
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
83
+ query.queryKey = queryOptions.queryKey;
84
+ return query;
85
+ };
86
+ var getProductCharges = (productId, params, options, signal) => {
87
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
88
+ {
89
+ url: `/charges/product/${productId}`,
90
+ method: "GET",
91
+ params,
92
+ signal
93
+ },
94
+ options
95
+ );
96
+ };
97
+ var getGetProductChargesQueryKey = (productId, params) => {
98
+ return ["account-server-api", `/charges/product/${productId}`, ...params ? [params] : []];
99
+ };
100
+ var getGetProductChargesQueryOptions = (productId, params, options) => {
101
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
102
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProductChargesQueryKey(productId, params)));
103
+ const queryFn = ({ signal }) => getProductCharges(productId, params, requestOptions, signal);
104
+ return { queryKey, queryFn, enabled: !!productId, ...queryOptions };
105
+ };
106
+ var useGetProductCharges = (productId, params, options) => {
107
+ const queryOptions = getGetProductChargesQueryOptions(productId, params, options);
108
+ const query = _reactquery.useQuery.call(void 0, queryOptions);
109
+ query.queryKey = queryOptions.queryKey;
110
+ return query;
111
+ };
112
+ var getGetProductChargesSuspenseQueryOptions = (productId, params, options) => {
113
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
114
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProductChargesQueryKey(productId, params)));
115
+ const queryFn = ({ signal }) => getProductCharges(productId, params, requestOptions, signal);
116
+ return { queryKey, queryFn, enabled: !!productId, ...queryOptions };
117
+ };
118
+ var useGetProductChargesSuspense = (productId, params, options) => {
119
+ const queryOptions = getGetProductChargesSuspenseQueryOptions(productId, params, options);
120
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
121
+ query.queryKey = queryOptions.queryKey;
122
+ return query;
123
+ };
124
+ var getUnitCharges = (unitId, params, options, signal) => {
125
+ return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
126
+ {
127
+ url: `/charges/unit/${unitId}`,
128
+ method: "GET",
129
+ params,
130
+ signal
131
+ },
132
+ options
133
+ );
134
+ };
135
+ var getGetUnitChargesQueryKey = (unitId, params) => {
136
+ return ["account-server-api", `/charges/unit/${unitId}`, ...params ? [params] : []];
137
+ };
138
+ var getGetUnitChargesQueryOptions = (unitId, params, options) => {
139
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
140
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitChargesQueryKey(unitId, params)));
141
+ const queryFn = ({ signal }) => getUnitCharges(unitId, params, requestOptions, signal);
142
+ return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
143
+ };
144
+ var useGetUnitCharges = (unitId, params, options) => {
145
+ const queryOptions = getGetUnitChargesQueryOptions(unitId, params, options);
146
+ const query = _reactquery.useQuery.call(void 0, queryOptions);
147
+ query.queryKey = queryOptions.queryKey;
148
+ return query;
149
+ };
150
+ var getGetUnitChargesSuspenseQueryOptions = (unitId, params, options) => {
151
+ const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
152
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitChargesQueryKey(unitId, params)));
153
+ const queryFn = ({ signal }) => getUnitCharges(unitId, params, requestOptions, signal);
154
+ return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
155
+ };
156
+ var useGetUnitChargesSuspense = (unitId, params, options) => {
157
+ const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId, params, options);
158
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
159
+ query.queryKey = queryOptions.queryKey;
160
+ return query;
161
+ };
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ exports.getCharges = getCharges; exports.getGetChargesQueryKey = getGetChargesQueryKey; exports.getGetChargesQueryOptions = getGetChargesQueryOptions; exports.getGetChargesSuspenseQueryOptions = getGetChargesSuspenseQueryOptions; exports.getGetOrganisationChargesQueryKey = getGetOrganisationChargesQueryKey; exports.getGetOrganisationChargesQueryOptions = getGetOrganisationChargesQueryOptions; exports.getGetOrganisationChargesSuspenseQueryOptions = getGetOrganisationChargesSuspenseQueryOptions; exports.getGetProductChargesQueryKey = getGetProductChargesQueryKey; exports.getGetProductChargesQueryOptions = getGetProductChargesQueryOptions; exports.getGetProductChargesSuspenseQueryOptions = getGetProductChargesSuspenseQueryOptions; exports.getGetUnitChargesQueryKey = getGetUnitChargesQueryKey; exports.getGetUnitChargesQueryOptions = getGetUnitChargesQueryOptions; exports.getGetUnitChargesSuspenseQueryOptions = getGetUnitChargesSuspenseQueryOptions; exports.getOrganisationCharges = getOrganisationCharges; exports.getProductCharges = getProductCharges; exports.getUnitCharges = getUnitCharges; exports.useGetCharges = useGetCharges; exports.useGetChargesSuspense = useGetChargesSuspense; exports.useGetOrganisationCharges = useGetOrganisationCharges; exports.useGetOrganisationChargesSuspense = useGetOrganisationChargesSuspense; exports.useGetProductCharges = useGetProductCharges; exports.useGetProductChargesSuspense = useGetProductChargesSuspense; exports.useGetUnitCharges = useGetUnitCharges; exports.useGetUnitChargesSuspense = useGetUnitChargesSuspense;
188
+ //# sourceMappingURL=charges.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/charges/charges.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,aAAa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,QAAO,OAAO;AAEhF,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.4\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams,\n GetOrganisationChargesParams,\n GetProductChargesParams,\n GetUnitChargesParams,\n OrganisationChargesGetResponse,\n ProductChargesGetResponse,\n UnitChargesGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ChargesGetResponse>(\n {url: `/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetChargesQueryKey = (params?: GetChargesParams,) => {\n return [\"account-server-api\", `/charges`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetChargesQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetCharges = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetChargesSuspense = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a Organisation charges.\n\nThe Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint\n\n * @summary Gets charges for all Units in an Organisation\n */\nexport const getOrganisationCharges = (\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationChargesGetResponse>(\n {url: `/charges/organisation/${orgId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetOrganisationChargesQueryKey = (orgId: string,\n params?: GetOrganisationChargesParams,) => {\n return [\"account-server-api\", `/charges/organisation/${orgId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetOrganisationChargesQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\nexport const useGetOrganisationCharges = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationChargesQueryOptions(orgId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\nexport const useGetOrganisationChargesSuspense = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Product\n */\nexport const getProductCharges = (\n productId: string,\n params?: GetProductChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductChargesGetResponse>(\n {url: `/charges/product/${productId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProductChargesQueryKey = (productId: string,\n params?: GetProductChargesParams,) => {\n return [\"account-server-api\", `/charges/product/${productId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProductChargesQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Get charges made against a Product\n */\nexport const useGetProductCharges = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductChargesQueryOptions(productId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProductChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Get charges made against a Product\n */\nexport const useGetProductChargesSuspense = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductChargesSuspenseQueryOptions(productId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Unit\n */\nexport const getUnitCharges = (\n unitId: string,\n params?: GetUnitChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitChargesGetResponse>(\n {url: `/charges/unit/${unitId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUnitChargesQueryKey = (unitId: string,\n params?: GetUnitChargesParams,) => {\n return [\"account-server-api\", `/charges/unit/${unitId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUnitChargesQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Get charges made against a Unit\n */\nexport const useGetUnitCharges = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitChargesQueryOptions(unitId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetUnitChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Get charges made against a Unit\n */\nexport const useGetUnitChargesSuspense = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
@@ -0,0 +1,184 @@
1
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
2
+ import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError, GetOrganisationChargesParams, OrganisationChargesGetResponse, GetProductChargesParams, ProductChargesGetResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.cjs';
3
+ import 'axios';
4
+
5
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
6
+ /**
7
+ * Gets global Charges.
8
+
9
+ You need admin rights to use this path.
10
+
11
+ * @summary Gets charges for all Organisations
12
+ */
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?: {
16
+ query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
17
+ request?: SecondParameter<typeof customInstance>;
18
+ } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
19
+ queryKey: QueryKey;
20
+ };
21
+ type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
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;
28
+ request?: SecondParameter<typeof customInstance>;
29
+ } | undefined) => UseQueryResult<TData, TError> & {
30
+ queryKey: QueryKey;
31
+ };
32
+ declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
33
+ query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
34
+ request?: SecondParameter<typeof customInstance>;
35
+ } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
36
+ queryKey: QueryKey;
37
+ };
38
+ type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
39
+ 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;
45
+ request?: SecondParameter<typeof customInstance>;
46
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
47
+ queryKey: QueryKey;
48
+ };
49
+ /**
50
+ * Gets a Organisation charges.
51
+
52
+ The Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint
53
+
54
+ * @summary Gets charges for all Units in an Organisation
55
+ */
56
+ declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
57
+ declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
58
+ declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
59
+ query?: Partial<UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
60
+ request?: SecondParameter<typeof customInstance>;
61
+ } | undefined) => UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
62
+ queryKey: QueryKey;
63
+ };
64
+ type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
65
+ 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;
71
+ request?: SecondParameter<typeof customInstance>;
72
+ } | undefined) => UseQueryResult<TData, TError> & {
73
+ queryKey: QueryKey;
74
+ };
75
+ declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
76
+ query?: Partial<UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
77
+ request?: SecondParameter<typeof customInstance>;
78
+ } | undefined) => UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
79
+ queryKey: QueryKey;
80
+ };
81
+ type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
82
+ 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;
88
+ request?: SecondParameter<typeof customInstance>;
89
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
90
+ queryKey: QueryKey;
91
+ };
92
+ /**
93
+ * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
94
+
95
+ Dates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.
96
+
97
+ **From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.
98
+
99
+ You need to be part of the **Unit** or **Organisation** to use this method
100
+ * @summary Get charges made against a Product
101
+ */
102
+ declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
103
+ declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
104
+ declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
105
+ query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
106
+ request?: SecondParameter<typeof customInstance>;
107
+ } | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
108
+ queryKey: QueryKey;
109
+ };
110
+ type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
111
+ 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;
117
+ request?: SecondParameter<typeof customInstance>;
118
+ } | undefined) => UseQueryResult<TData, TError> & {
119
+ queryKey: QueryKey;
120
+ };
121
+ declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
122
+ query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
123
+ request?: SecondParameter<typeof customInstance>;
124
+ } | undefined) => UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
125
+ queryKey: QueryKey;
126
+ };
127
+ type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
128
+ 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;
134
+ request?: SecondParameter<typeof customInstance>;
135
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
136
+ queryKey: QueryKey;
137
+ };
138
+ /**
139
+ * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
140
+ Dates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.
141
+
142
+ **From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.
143
+
144
+ You need to be part of the **Unit** or **Organisation** to use this method
145
+ * @summary Get charges made against a Unit
146
+ */
147
+ declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
148
+ declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
149
+ declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
150
+ query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
151
+ request?: SecondParameter<typeof customInstance>;
152
+ } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
153
+ queryKey: QueryKey;
154
+ };
155
+ type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
156
+ 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;
162
+ request?: SecondParameter<typeof customInstance>;
163
+ } | undefined) => UseQueryResult<TData, TError> & {
164
+ queryKey: QueryKey;
165
+ };
166
+ declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
167
+ query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
168
+ request?: SecondParameter<typeof customInstance>;
169
+ } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
170
+ queryKey: QueryKey;
171
+ };
172
+ type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
173
+ 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;
179
+ request?: SecondParameter<typeof customInstance>;
180
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
181
+ queryKey: QueryKey;
182
+ };
183
+
184
+ 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 };
@@ -0,0 +1,184 @@
1
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
2
+ import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError, GetOrganisationChargesParams, OrganisationChargesGetResponse, GetProductChargesParams, ProductChargesGetResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.js';
3
+ import 'axios';
4
+
5
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
6
+ /**
7
+ * Gets global Charges.
8
+
9
+ You need admin rights to use this path.
10
+
11
+ * @summary Gets charges for all Organisations
12
+ */
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?: {
16
+ query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
17
+ request?: SecondParameter<typeof customInstance>;
18
+ } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
19
+ queryKey: QueryKey;
20
+ };
21
+ type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
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;
28
+ request?: SecondParameter<typeof customInstance>;
29
+ } | undefined) => UseQueryResult<TData, TError> & {
30
+ queryKey: QueryKey;
31
+ };
32
+ declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
33
+ query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
34
+ request?: SecondParameter<typeof customInstance>;
35
+ } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
36
+ queryKey: QueryKey;
37
+ };
38
+ type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
39
+ 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;
45
+ request?: SecondParameter<typeof customInstance>;
46
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
47
+ queryKey: QueryKey;
48
+ };
49
+ /**
50
+ * Gets a Organisation charges.
51
+
52
+ The Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint
53
+
54
+ * @summary Gets charges for all Units in an Organisation
55
+ */
56
+ declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationChargesGetResponse>;
57
+ declare const getGetOrganisationChargesQueryKey: (orgId: string, params?: GetOrganisationChargesParams) => readonly ["account-server-api", `/charges/organisation/${string}`, ...GetOrganisationChargesParams[]];
58
+ declare const getGetOrganisationChargesQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
59
+ query?: Partial<UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
60
+ request?: SecondParameter<typeof customInstance>;
61
+ } | undefined) => UseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
62
+ queryKey: QueryKey;
63
+ };
64
+ type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
65
+ 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;
71
+ request?: SecondParameter<typeof customInstance>;
72
+ } | undefined) => UseQueryResult<TData, TError> & {
73
+ queryKey: QueryKey;
74
+ };
75
+ declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = OrganisationChargesGetResponse, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
76
+ query?: Partial<UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey>> | undefined;
77
+ request?: SecondParameter<typeof customInstance>;
78
+ } | undefined) => UseSuspenseQueryOptions<OrganisationChargesGetResponse, TError, TData, QueryKey> & {
79
+ queryKey: QueryKey;
80
+ };
81
+ type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
82
+ 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;
88
+ request?: SecondParameter<typeof customInstance>;
89
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
90
+ queryKey: QueryKey;
91
+ };
92
+ /**
93
+ * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
94
+
95
+ Dates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.
96
+
97
+ **From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.
98
+
99
+ You need to be part of the **Unit** or **Organisation** to use this method
100
+ * @summary Get charges made against a Product
101
+ */
102
+ declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ProductChargesGetResponse>;
103
+ declare const getGetProductChargesQueryKey: (productId: string, params?: GetProductChargesParams) => readonly ["account-server-api", `/charges/product/${string}`, ...GetProductChargesParams[]];
104
+ declare const getGetProductChargesQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
105
+ query?: Partial<UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
106
+ request?: SecondParameter<typeof customInstance>;
107
+ } | undefined) => UseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
108
+ queryKey: QueryKey;
109
+ };
110
+ type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
111
+ 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;
117
+ request?: SecondParameter<typeof customInstance>;
118
+ } | undefined) => UseQueryResult<TData, TError> & {
119
+ queryKey: QueryKey;
120
+ };
121
+ declare const getGetProductChargesSuspenseQueryOptions: <TData = ProductChargesGetResponse, TError = ErrorType<void | AsError>>(productId: string, params?: GetProductChargesParams, options?: {
122
+ query?: Partial<UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey>> | undefined;
123
+ request?: SecondParameter<typeof customInstance>;
124
+ } | undefined) => UseSuspenseQueryOptions<ProductChargesGetResponse, TError, TData, QueryKey> & {
125
+ queryKey: QueryKey;
126
+ };
127
+ type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
128
+ 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;
134
+ request?: SecondParameter<typeof customInstance>;
135
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
136
+ queryKey: QueryKey;
137
+ };
138
+ /**
139
+ * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
140
+ Dates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.
141
+
142
+ **From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.
143
+
144
+ You need to be part of the **Unit** or **Organisation** to use this method
145
+ * @summary Get charges made against a Unit
146
+ */
147
+ declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
148
+ declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/charges/unit/${string}`, ...GetUnitChargesParams[]];
149
+ declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
150
+ query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
151
+ request?: SecondParameter<typeof customInstance>;
152
+ } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
153
+ queryKey: QueryKey;
154
+ };
155
+ type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
156
+ 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;
162
+ request?: SecondParameter<typeof customInstance>;
163
+ } | undefined) => UseQueryResult<TData, TError> & {
164
+ queryKey: QueryKey;
165
+ };
166
+ declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
167
+ query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
168
+ request?: SecondParameter<typeof customInstance>;
169
+ } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
170
+ queryKey: QueryKey;
171
+ };
172
+ type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
173
+ 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;
179
+ request?: SecondParameter<typeof customInstance>;
180
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
181
+ queryKey: QueryKey;
182
+ };
183
+
184
+ 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 };