@squonk/account-server-client 2.0.9 → 2.1.0-beta.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.
- package/README.md +1 -1
- package/admin/admin.cjs +19 -4
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +23 -6
- package/admin/admin.d.ts +23 -6
- package/admin/admin.js +19 -4
- package/admin/admin.js.map +1 -1
- package/asset/asset.cjs +33 -18
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +37 -18
- package/asset/asset.d.ts +37 -18
- package/asset/asset.js +25 -10
- package/asset/asset.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/event-stream/event-stream.cjs +146 -0
- package/event-stream/event-stream.cjs.map +1 -0
- package/event-stream/event-stream.d.cts +142 -0
- package/event-stream/event-stream.d.ts +142 -0
- package/event-stream/event-stream.js +146 -0
- package/event-stream/event-stream.js.map +1 -0
- package/event-stream/package.json +7 -0
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +700 -2
- package/index.d.ts +700 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +35 -6
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +42 -8
- package/merchant/merchant.d.ts +42 -8
- package/merchant/merchant.js +34 -5
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +73 -16
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +84 -16
- package/organisation/organisation.d.ts +84 -16
- package/organisation/organisation.js +66 -9
- package/organisation/organisation.js.map +1 -1
- package/package.json +11 -11
- package/product/product.cjs +121 -22
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +141 -22
- package/product/product.d.ts +141 -22
- package/product/product.js +111 -12
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +9 -2
- package/src/admin/admin.ts +51 -15
- package/src/asset/asset.ts +64 -40
- package/src/custom-instance.ts +3 -4
- package/src/event-stream/event-stream.ts +353 -0
- package/src/merchant/merchant.ts +94 -19
- package/src/organisation/organisation.ts +185 -36
- package/src/product/product.ts +314 -48
- package/src/state/state.ts +51 -15
- package/src/unit/unit.ts +191 -46
- package/src/user/user.ts +141 -35
- package/state/state.cjs +19 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +23 -6
- package/state/state.d.ts +23 -6
- package/state/state.js +19 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +77 -20
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +91 -23
- package/unit/unit.d.ts +91 -23
- package/unit/unit.js +68 -11
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +59 -16
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +66 -15
- package/user/user.d.ts +66 -15
- package/user/user.js +53 -10
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-56b86e9f.d.ts +0 -694
package/unit/unit.cjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
4
|
|
|
5
5
|
// src/unit/unit.ts
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
var _reactquery = require('@tanstack/react-query');
|
|
10
11
|
var getOrganisationUnits = (orgId, options, signal) => {
|
|
11
|
-
return
|
|
12
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
12
13
|
{
|
|
13
14
|
url: `/organisation/${orgId}/unit`,
|
|
14
|
-
method: "
|
|
15
|
+
method: "GET",
|
|
15
16
|
signal
|
|
16
17
|
},
|
|
17
18
|
options
|
|
@@ -32,11 +33,23 @@ var useGetOrganisationUnits = (orgId, options) => {
|
|
|
32
33
|
query.queryKey = queryOptions.queryKey;
|
|
33
34
|
return query;
|
|
34
35
|
};
|
|
36
|
+
var getGetOrganisationUnitsSuspenseQueryOptions = (orgId, options) => {
|
|
37
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
38
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationUnitsQueryKey(orgId)));
|
|
39
|
+
const queryFn = ({ signal }) => getOrganisationUnits(orgId, requestOptions, signal);
|
|
40
|
+
return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
|
|
41
|
+
};
|
|
42
|
+
var useGetOrganisationUnitsSuspense = (orgId, options) => {
|
|
43
|
+
const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);
|
|
44
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
45
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
|
+
return query;
|
|
47
|
+
};
|
|
35
48
|
var createOrganisationUnit = (orgId, organisationUnitPostBodyBody, options) => {
|
|
36
|
-
return
|
|
49
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
37
50
|
{
|
|
38
51
|
url: `/organisation/${orgId}/unit`,
|
|
39
|
-
method: "
|
|
52
|
+
method: "POST",
|
|
40
53
|
headers: { "Content-Type": "application/json" },
|
|
41
54
|
data: organisationUnitPostBodyBody
|
|
42
55
|
},
|
|
@@ -56,10 +69,10 @@ var useCreateOrganisationUnit = (options) => {
|
|
|
56
69
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
57
70
|
};
|
|
58
71
|
var getUnit = (unitId, options, signal) => {
|
|
59
|
-
return
|
|
72
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
60
73
|
{
|
|
61
74
|
url: `/unit/${unitId}`,
|
|
62
|
-
method: "
|
|
75
|
+
method: "GET",
|
|
63
76
|
signal
|
|
64
77
|
},
|
|
65
78
|
options
|
|
@@ -80,11 +93,23 @@ var useGetUnit = (unitId, options) => {
|
|
|
80
93
|
query.queryKey = queryOptions.queryKey;
|
|
81
94
|
return query;
|
|
82
95
|
};
|
|
96
|
+
var getGetUnitSuspenseQueryOptions = (unitId, options) => {
|
|
97
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
98
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitQueryKey(unitId)));
|
|
99
|
+
const queryFn = ({ signal }) => getUnit(unitId, requestOptions, signal);
|
|
100
|
+
return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
|
|
101
|
+
};
|
|
102
|
+
var useGetUnitSuspense = (unitId, options) => {
|
|
103
|
+
const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);
|
|
104
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
105
|
+
query.queryKey = queryOptions.queryKey;
|
|
106
|
+
return query;
|
|
107
|
+
};
|
|
83
108
|
var patchUnit = (unitId, unitPatchBodyBody, options) => {
|
|
84
|
-
return
|
|
109
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
85
110
|
{
|
|
86
111
|
url: `/unit/${unitId}`,
|
|
87
|
-
method: "
|
|
112
|
+
method: "PATCH",
|
|
88
113
|
headers: { "Content-Type": "application/json" },
|
|
89
114
|
data: unitPatchBodyBody
|
|
90
115
|
},
|
|
@@ -104,10 +129,10 @@ var usePatchUnit = (options) => {
|
|
|
104
129
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
105
130
|
};
|
|
106
131
|
var deleteOrganisationUnit = (unitId, options) => {
|
|
107
|
-
return
|
|
132
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
108
133
|
{
|
|
109
134
|
url: `/unit/${unitId}`,
|
|
110
|
-
method: "
|
|
135
|
+
method: "DELETE"
|
|
111
136
|
},
|
|
112
137
|
options
|
|
113
138
|
);
|
|
@@ -125,10 +150,10 @@ var useDeleteOrganisationUnit = (options) => {
|
|
|
125
150
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
126
151
|
};
|
|
127
152
|
var getUnits = (options, signal) => {
|
|
128
|
-
return
|
|
153
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
129
154
|
{
|
|
130
155
|
url: `/unit`,
|
|
131
|
-
method: "
|
|
156
|
+
method: "GET",
|
|
132
157
|
signal
|
|
133
158
|
},
|
|
134
159
|
options
|
|
@@ -149,11 +174,23 @@ var useGetUnits = (options) => {
|
|
|
149
174
|
query.queryKey = queryOptions.queryKey;
|
|
150
175
|
return query;
|
|
151
176
|
};
|
|
177
|
+
var getGetUnitsSuspenseQueryOptions = (options) => {
|
|
178
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
179
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitsQueryKey()));
|
|
180
|
+
const queryFn = ({ signal }) => getUnits(requestOptions, signal);
|
|
181
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
182
|
+
};
|
|
183
|
+
var useGetUnitsSuspense = (options) => {
|
|
184
|
+
const queryOptions = getGetUnitsSuspenseQueryOptions(options);
|
|
185
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
186
|
+
query.queryKey = queryOptions.queryKey;
|
|
187
|
+
return query;
|
|
188
|
+
};
|
|
152
189
|
var createDefaultUnit = (personalUnitPutBodyBody, options) => {
|
|
153
|
-
return
|
|
190
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
154
191
|
{
|
|
155
192
|
url: `/unit`,
|
|
156
|
-
method: "
|
|
193
|
+
method: "PUT",
|
|
157
194
|
headers: { "Content-Type": "application/json" },
|
|
158
195
|
data: personalUnitPutBodyBody
|
|
159
196
|
},
|
|
@@ -173,10 +210,10 @@ var useCreateDefaultUnit = (options) => {
|
|
|
173
210
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
174
211
|
};
|
|
175
212
|
var deleteDefaultUnit = (options) => {
|
|
176
|
-
return
|
|
213
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
177
214
|
{
|
|
178
215
|
url: `/unit`,
|
|
179
|
-
method: "
|
|
216
|
+
method: "DELETE"
|
|
180
217
|
},
|
|
181
218
|
options
|
|
182
219
|
);
|
|
@@ -193,10 +230,10 @@ var useDeleteDefaultUnit = (options) => {
|
|
|
193
230
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
194
231
|
};
|
|
195
232
|
var getUnitCharges = (unitId, params, options, signal) => {
|
|
196
|
-
return
|
|
233
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
197
234
|
{
|
|
198
235
|
url: `/unit/${unitId}/charges`,
|
|
199
|
-
method: "
|
|
236
|
+
method: "GET",
|
|
200
237
|
params,
|
|
201
238
|
signal
|
|
202
239
|
},
|
|
@@ -218,6 +255,26 @@ var useGetUnitCharges = (unitId, params, options) => {
|
|
|
218
255
|
query.queryKey = queryOptions.queryKey;
|
|
219
256
|
return query;
|
|
220
257
|
};
|
|
258
|
+
var getGetUnitChargesSuspenseQueryOptions = (unitId, params, options) => {
|
|
259
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
260
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitChargesQueryKey(unitId, params)));
|
|
261
|
+
const queryFn = ({ signal }) => getUnitCharges(unitId, params, requestOptions, signal);
|
|
262
|
+
return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
|
|
263
|
+
};
|
|
264
|
+
var useGetUnitChargesSuspense = (unitId, params, options) => {
|
|
265
|
+
const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId, params, options);
|
|
266
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
267
|
+
query.queryKey = queryOptions.queryKey;
|
|
268
|
+
return query;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
221
278
|
|
|
222
279
|
|
|
223
280
|
|
|
@@ -250,5 +307,5 @@ var useGetUnitCharges = (unitId, params, options) => {
|
|
|
250
307
|
|
|
251
308
|
|
|
252
309
|
|
|
253
|
-
exports.createDefaultUnit = createDefaultUnit; exports.createOrganisationUnit = createOrganisationUnit; exports.deleteDefaultUnit = deleteDefaultUnit; exports.deleteOrganisationUnit = deleteOrganisationUnit; exports.getCreateDefaultUnitMutationOptions = getCreateDefaultUnitMutationOptions; exports.getCreateOrganisationUnitMutationOptions = getCreateOrganisationUnitMutationOptions; exports.getDeleteDefaultUnitMutationOptions = getDeleteDefaultUnitMutationOptions; exports.getDeleteOrganisationUnitMutationOptions = getDeleteOrganisationUnitMutationOptions; exports.getGetOrganisationUnitsQueryKey = getGetOrganisationUnitsQueryKey; exports.getGetOrganisationUnitsQueryOptions = getGetOrganisationUnitsQueryOptions; exports.getGetUnitChargesQueryKey = getGetUnitChargesQueryKey; exports.getGetUnitChargesQueryOptions = getGetUnitChargesQueryOptions; exports.getGetUnitQueryKey = getGetUnitQueryKey; exports.getGetUnitQueryOptions = getGetUnitQueryOptions; exports.getGetUnitsQueryKey = getGetUnitsQueryKey; exports.getGetUnitsQueryOptions = getGetUnitsQueryOptions; exports.getOrganisationUnits = getOrganisationUnits; exports.getPatchUnitMutationOptions = getPatchUnitMutationOptions; exports.getUnit = getUnit; exports.getUnitCharges = getUnitCharges; exports.getUnits = getUnits; exports.patchUnit = patchUnit; exports.useCreateDefaultUnit = useCreateDefaultUnit; exports.useCreateOrganisationUnit = useCreateOrganisationUnit; exports.useDeleteDefaultUnit = useDeleteDefaultUnit; exports.useDeleteOrganisationUnit = useDeleteOrganisationUnit; exports.useGetOrganisationUnits = useGetOrganisationUnits; exports.useGetUnit = useGetUnit; exports.useGetUnitCharges = useGetUnitCharges; exports.useGetUnits = useGetUnits; exports.usePatchUnit = usePatchUnit;
|
|
310
|
+
exports.createDefaultUnit = createDefaultUnit; exports.createOrganisationUnit = createOrganisationUnit; exports.deleteDefaultUnit = deleteDefaultUnit; exports.deleteOrganisationUnit = deleteOrganisationUnit; exports.getCreateDefaultUnitMutationOptions = getCreateDefaultUnitMutationOptions; exports.getCreateOrganisationUnitMutationOptions = getCreateOrganisationUnitMutationOptions; exports.getDeleteDefaultUnitMutationOptions = getDeleteDefaultUnitMutationOptions; exports.getDeleteOrganisationUnitMutationOptions = getDeleteOrganisationUnitMutationOptions; exports.getGetOrganisationUnitsQueryKey = getGetOrganisationUnitsQueryKey; exports.getGetOrganisationUnitsQueryOptions = getGetOrganisationUnitsQueryOptions; exports.getGetOrganisationUnitsSuspenseQueryOptions = getGetOrganisationUnitsSuspenseQueryOptions; exports.getGetUnitChargesQueryKey = getGetUnitChargesQueryKey; exports.getGetUnitChargesQueryOptions = getGetUnitChargesQueryOptions; exports.getGetUnitChargesSuspenseQueryOptions = getGetUnitChargesSuspenseQueryOptions; exports.getGetUnitQueryKey = getGetUnitQueryKey; exports.getGetUnitQueryOptions = getGetUnitQueryOptions; exports.getGetUnitSuspenseQueryOptions = getGetUnitSuspenseQueryOptions; exports.getGetUnitsQueryKey = getGetUnitsQueryKey; exports.getGetUnitsQueryOptions = getGetUnitsQueryOptions; exports.getGetUnitsSuspenseQueryOptions = getGetUnitsSuspenseQueryOptions; exports.getOrganisationUnits = getOrganisationUnits; exports.getPatchUnitMutationOptions = getPatchUnitMutationOptions; exports.getUnit = getUnit; exports.getUnitCharges = getUnitCharges; exports.getUnits = getUnits; exports.patchUnit = patchUnit; exports.useCreateDefaultUnit = useCreateDefaultUnit; exports.useCreateOrganisationUnit = useCreateOrganisationUnit; exports.useDeleteDefaultUnit = useDeleteDefaultUnit; exports.useDeleteOrganisationUnit = useDeleteOrganisationUnit; exports.useGetOrganisationUnits = useGetOrganisationUnits; exports.useGetOrganisationUnitsSuspense = useGetOrganisationUnitsSuspense; exports.useGetUnit = useGetUnit; exports.useGetUnitCharges = useGetUnitCharges; exports.useGetUnitChargesSuspense = useGetUnitChargesSuspense; exports.useGetUnitSuspense = useGetUnitSuspense; exports.useGetUnits = useGetUnits; exports.useGetUnitsSuspense = useGetUnitsSuspense; exports.usePatchUnit = usePatchUnit;
|
|
254
311
|
//# sourceMappingURL=unit.cjs.map
|
package/unit/unit.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/unit/unit.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAwCA,IAAM,uBAAuB,CAChC,OACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IACtD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,kCAAkC,CAAC,UAAmB;AAE/D,SAAO,CAAC,sBAAsB,iBAAiB,KAAK,OAAO;AAC3D;AAGG,IAAM,sCAAsC,CAA+F,OAAe,YAC5J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,gCAAgC,KAAK;AAI/E,QAAM,UAA2E,CAAC,EAAE,OAAO,MAAM,qBAAqB,OAAO,gBAAgB,MAAM;AAMpJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,OAAQ,GAAG,aAAY;AACnE;AAQO,IAAM,0BAA0B,CACtC,OAAe,YAEgD;AAE9D,QAAM,eAAe,oCAAoC,OAAM,OA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generated by orval v6.20.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.0\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n GetUnitChargesParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitChargesGetResponse,\n UnitDetail,\n UnitPatchBodyBody,\n UnitsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Gets Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationUnitsGetResponse>(\n {url: `/organisation/${orgId}/unit`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUnitsQueryKey = (orgId: string,) => {\n \n return [\"account-server-api\", `/organisation/${orgId}/unit`] as const;\n }\n\n \nexport const getGetOrganisationUnitsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) => getOrganisationUnits(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisational Units\n */\nexport const useGetOrganisationUnits = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId,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\n/**\n * Creates a new Organisation Unit. You need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationUnitPostResponse>(\n {url: `/organisation/${orgId}/unit`, method: 'post',\n headers: {'Content-Type': 'application/json', },\n data: organisationUnitPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationUnitMutationOptions = <TError = ErrorType<AsError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisationUnit>>, {orgId: string;data: OrganisationUnitPostBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return createOrganisationUnit(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisationUnit>>>\n export type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody\n export type CreateOrganisationUnitMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <TError = ErrorType<AsError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a Unit, assuming it is public, you are a member of it or its **Organisation**. Admin users have access to all Units\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitDetail>(\n {url: `/unit/${unitId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetUnitQueryKey = (unitId: string,) => {\n \n return [\"account-server-api\", `/unit/${unitId}`] as const;\n }\n\n \nexport const getGetUnitQueryOptions = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) => getUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>\nexport type GetUnitQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const useGetUnit = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitQueryOptions(unitId,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\n/**\n * Used to update existing Unit.\n\nYou have to be the Unit owner, a member of its **Organisation** or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}`, method: 'patch',\n headers: {'Content-Type': 'application/json', },\n data: unitPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchUnitMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUnit>>, {unitId: string;data: UnitPatchBodyBody}> = (props) => {\n const {unitId,data} = props ?? {};\n\n return patchUnit(unitId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>\n export type PatchUnitMutationBody = UnitPatchBodyBody\n export type PatchUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUnitMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUnit>>, {unitId: string}> = (props) => {\n const {unitId} = props ?? {};\n\n return deleteOrganisationUnit(unitId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>\n \n export type DeleteOrganisationUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets all the Units that are public or you are a member of. Admin users can see all Units.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitsGetResponse>(\n {url: `/unit`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetUnitsQueryKey = () => {\n \n return [\"account-server-api\", `/unit`] as const;\n }\n\n \nexport const getGetUnitsQueryOptions = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) => getUnits(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>\nexport type GetUnitsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Units\n */\nexport const useGetUnits = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitsQueryOptions(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\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<PersonalUnitPutResponse>(\n {url: `/unit`, method: 'put',\n headers: {'Content-Type': 'application/json', },\n data: personalUnitPutBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateDefaultUnitMutationOptions = <TError = ErrorType<AsError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createDefaultUnit>>, {data: PersonalUnitPutBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createDefaultUnit(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>\n export type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody\n export type CreateDefaultUnitMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <TError = ErrorType<AsError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteDefaultUnitMutationOptions = <TError = ErrorType<AsError>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,TVariables, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, TVariables> = () => {\n \n\n return deleteDefaultUnit(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>\n \n export type DeleteDefaultUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <TError = ErrorType<AsError>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\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: `/unit/${unitId}/charges`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUnitChargesQueryKey = (unitId: string,\n params?: GetUnitChargesParams,) => {\n \n return [\"account-server-api\", `/unit/${unitId}/charges`, ...(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?: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?: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\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/unit/unit.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoCA,IAAM,uBAAuB,CAChC,OACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IACtD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,kCAAkC,CAAC,UAAmB;AAC/D,SAAO,CAAC,sBAAsB,iBAAiB,KAAK,OAAO;AAC3D;AAGG,IAAM,sCAAsC,CAA+F,OAAe,YAC5J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,gCAAgC,KAAK;AAI/E,QAAM,UAA2E,CAAC,EAAE,OAAO,MAAM,qBAAqB,OAAO,gBAAgB,MAAM;AAMpJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,OAAQ,GAAG,aAAY;AACnE;AAQO,IAAM,0BAA0B,CACtC,OAAe,YAEgD;AAE9D,QAAM,eAAe,oCAAoC,OAAM,OAAO;AAEtE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,8CAA8C,CAA+F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M,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B,QAAO,MAAM;AAIjF,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,QAAO,QAAQ,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,4BAA4B,CACxC,QACG,QAA+B,YAEqC;AAEtE,QAAM,eAAe,sCAAsC,QAAO,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.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n GetUnitChargesParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitChargesGetResponse,\n UnitDetail,\n UnitPatchBodyBody,\n UnitsGetResponse\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 Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationUnitsGetResponse>(\n {url: `/organisation/${orgId}/unit`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUnitsQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}/unit`] as const;\n }\n\n \nexport const getGetOrganisationUnitsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) => getOrganisationUnits(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisational Units\n */\nexport const useGetOrganisationUnits = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId,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 getGetOrganisationUnitsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) => getOrganisationUnits(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>\nexport type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisational Units\n */\nexport const useGetOrganisationUnitsSuspense = <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId,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 * Creates a new Organisation Unit. You need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationUnitPostResponse>(\n {url: `/organisation/${orgId}/unit`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationUnitPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationUnitMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisationUnit>>, {orgId: string;data: OrganisationUnitPostBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return createOrganisationUnit(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisationUnit>>>\n export type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody\n export type CreateOrganisationUnitMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError,{orgId: string;data: OrganisationUnitPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a Unit, assuming it is public, you are a member of it or its **Organisation**. Admin users have access to all Units\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitDetail>(\n {url: `/unit/${unitId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetUnitQueryKey = (unitId: string,) => {\n return [\"account-server-api\", `/unit/${unitId}`] as const;\n }\n\n \nexport const getGetUnitQueryOptions = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) => getUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>\nexport type GetUnitQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const useGetUnit = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitQueryOptions(unitId,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 getGetUnitSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) => getUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>\nexport type GetUnitSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const useGetUnitSuspense = <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitSuspenseQueryOptions(unitId,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 * Used to update existing Unit.\n\nYou have to be the Unit owner, a member of its **Organisation** or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: unitPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchUnitMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUnit>>, {unitId: string;data: UnitPatchBodyBody}> = (props) => {\n const {unitId,data} = props ?? {};\n\n return patchUnit(unitId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>\n export type PatchUnitMutationBody = UnitPatchBodyBody\n export type PatchUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError,{unitId: string;data: UnitPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUnitMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUnit>>, {unitId: string}> = (props) => {\n const {unitId} = props ?? {};\n\n return deleteOrganisationUnit(unitId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>\n \n export type DeleteOrganisationUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError,{unitId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets all the Units that are public or you are a member of. Admin users can see all Units.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitsGetResponse>(\n {url: `/unit`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetUnitsQueryKey = () => {\n return [\"account-server-api\", `/unit`] as const;\n }\n\n \nexport const getGetUnitsQueryOptions = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) => getUnits(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>\nexport type GetUnitsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Units\n */\nexport const useGetUnits = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitsQueryOptions(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 getGetUnitsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) => getUnits(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>\nexport type GetUnitsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Units\n */\nexport const useGetUnitsSuspense = <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUnitsSuspenseQueryOptions(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 * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<PersonalUnitPutResponse>(\n {url: `/unit`, method: 'PUT',\n headers: {'Content-Type': 'application/json', },\n data: personalUnitPutBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateDefaultUnitMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createDefaultUnit>>, {data: PersonalUnitPutBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createDefaultUnit(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>\n export type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody\n export type CreateDefaultUnitMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError,{data: PersonalUnitPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteDefaultUnitMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void> = () => {\n \n\n return deleteDefaultUnit(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>\n \n export type DeleteDefaultUnitMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\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: `/unit/${unitId}/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUnitChargesQueryKey = (unitId: string,\n params?: GetUnitChargesParams,) => {\n return [\"account-server-api\", `/unit/${unitId}/charges`, ...(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"]}
|
package/unit/unit.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
1
|
+
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
+
import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitDetail, UnitPatchBodyBody, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.cjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
6
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
7
7
|
/**
|
|
8
8
|
* Gets Organisational Units you have access to or that are public
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
12
12
|
declare const getOrganisationUnits: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitsGetResponse>;
|
|
13
13
|
declare const getGetOrganisationUnitsQueryKey: (orgId: string) => readonly ["account-server-api", `/organisation/${string}/unit`];
|
|
14
14
|
declare const getGetOrganisationUnitsQueryOptions: <TData = OrganisationUnitsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
15
|
-
query?: UseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey
|
|
15
|
+
query?: Partial<UseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
16
16
|
request?: SecondParameter<typeof customInstance>;
|
|
17
17
|
} | undefined) => UseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey> & {
|
|
18
18
|
queryKey: QueryKey;
|
|
@@ -23,11 +23,28 @@ type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;
|
|
|
23
23
|
* @summary Gets Organisational Units
|
|
24
24
|
*/
|
|
25
25
|
declare const useGetOrganisationUnits: <TData = OrganisationUnitsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
26
|
-
query?: UseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
27
27
|
request?: SecondParameter<typeof customInstance>;
|
|
28
28
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
29
29
|
queryKey: QueryKey;
|
|
30
30
|
};
|
|
31
|
+
declare const getGetOrganisationUnitsSuspenseQueryOptions: <TData = OrganisationUnitsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
32
|
+
query?: Partial<UseSuspenseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
33
|
+
request?: SecondParameter<typeof customInstance>;
|
|
34
|
+
} | undefined) => UseSuspenseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey> & {
|
|
35
|
+
queryKey: QueryKey;
|
|
36
|
+
};
|
|
37
|
+
type GetOrganisationUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
38
|
+
type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Gets Organisational Units
|
|
41
|
+
*/
|
|
42
|
+
declare const useGetOrganisationUnitsSuspense: <TData = OrganisationUnitsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
43
|
+
query?: Partial<UseSuspenseQueryOptions<OrganisationUnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
44
|
+
request?: SecondParameter<typeof customInstance>;
|
|
45
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
46
|
+
queryKey: QueryKey;
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* Creates a new Organisation Unit. You need to be a member of the **Organisation** or have administration rights to use this endpoint
|
|
33
50
|
|
|
@@ -56,7 +73,7 @@ declare const useCreateOrganisationUnit: <TError = ErrorType<void | AsError>, TC
|
|
|
56
73
|
data: OrganisationUnitPostBodyBody;
|
|
57
74
|
}, TContext> | undefined;
|
|
58
75
|
request?: SecondParameter<typeof customInstance>;
|
|
59
|
-
} | undefined) =>
|
|
76
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<OrganisationUnitPostResponse, TError, {
|
|
60
77
|
orgId: string;
|
|
61
78
|
data: OrganisationUnitPostBodyBody;
|
|
62
79
|
}, TContext>;
|
|
@@ -68,7 +85,7 @@ declare const useCreateOrganisationUnit: <TError = ErrorType<void | AsError>, TC
|
|
|
68
85
|
declare const getUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitDetail>;
|
|
69
86
|
declare const getGetUnitQueryKey: (unitId: string) => readonly ["account-server-api", `/unit/${string}`];
|
|
70
87
|
declare const getGetUnitQueryOptions: <TData = UnitDetail, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
71
|
-
query?: UseQueryOptions<UnitDetail, TError, TData, QueryKey
|
|
88
|
+
query?: Partial<UseQueryOptions<UnitDetail, TError, TData, QueryKey>> | undefined;
|
|
72
89
|
request?: SecondParameter<typeof customInstance>;
|
|
73
90
|
} | undefined) => UseQueryOptions<UnitDetail, TError, TData, QueryKey> & {
|
|
74
91
|
queryKey: QueryKey;
|
|
@@ -79,11 +96,28 @@ type GetUnitQueryError = ErrorType<void | AsError>;
|
|
|
79
96
|
* @summary Gets an Organisational Unit
|
|
80
97
|
*/
|
|
81
98
|
declare const useGetUnit: <TData = UnitDetail, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
82
|
-
query?: UseQueryOptions<UnitDetail, TError, TData, QueryKey
|
|
99
|
+
query?: Partial<UseQueryOptions<UnitDetail, TError, TData, QueryKey>> | undefined;
|
|
83
100
|
request?: SecondParameter<typeof customInstance>;
|
|
84
101
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
85
102
|
queryKey: QueryKey;
|
|
86
103
|
};
|
|
104
|
+
declare const getGetUnitSuspenseQueryOptions: <TData = UnitDetail, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
105
|
+
query?: Partial<UseSuspenseQueryOptions<UnitDetail, TError, TData, QueryKey>> | undefined;
|
|
106
|
+
request?: SecondParameter<typeof customInstance>;
|
|
107
|
+
} | undefined) => UseSuspenseQueryOptions<UnitDetail, TError, TData, QueryKey> & {
|
|
108
|
+
queryKey: QueryKey;
|
|
109
|
+
};
|
|
110
|
+
type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
111
|
+
type GetUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
112
|
+
/**
|
|
113
|
+
* @summary Gets an Organisational Unit
|
|
114
|
+
*/
|
|
115
|
+
declare const useGetUnitSuspense: <TData = UnitDetail, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
116
|
+
query?: Partial<UseSuspenseQueryOptions<UnitDetail, TError, TData, QueryKey>> | undefined;
|
|
117
|
+
request?: SecondParameter<typeof customInstance>;
|
|
118
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
119
|
+
queryKey: QueryKey;
|
|
120
|
+
};
|
|
87
121
|
/**
|
|
88
122
|
* Used to update existing Unit.
|
|
89
123
|
|
|
@@ -114,7 +148,7 @@ declare const usePatchUnit: <TError = ErrorType<AsError>, TContext = unknown>(op
|
|
|
114
148
|
data: UnitPatchBodyBody;
|
|
115
149
|
}, TContext> | undefined;
|
|
116
150
|
request?: SecondParameter<typeof customInstance>;
|
|
117
|
-
} | undefined) =>
|
|
151
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
118
152
|
unitId: string;
|
|
119
153
|
data: UnitPatchBodyBody;
|
|
120
154
|
}, TContext>;
|
|
@@ -146,7 +180,7 @@ declare const useDeleteOrganisationUnit: <TError = ErrorType<AsError>, TContext
|
|
|
146
180
|
unitId: string;
|
|
147
181
|
}, TContext> | undefined;
|
|
148
182
|
request?: SecondParameter<typeof customInstance>;
|
|
149
|
-
} | undefined) =>
|
|
183
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
150
184
|
unitId: string;
|
|
151
185
|
}, TContext>;
|
|
152
186
|
/**
|
|
@@ -157,7 +191,7 @@ declare const useDeleteOrganisationUnit: <TError = ErrorType<AsError>, TContext
|
|
|
157
191
|
declare const getUnits: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitsGetResponse>;
|
|
158
192
|
declare const getGetUnitsQueryKey: () => readonly ["account-server-api", "/unit"];
|
|
159
193
|
declare const getGetUnitsQueryOptions: <TData = UnitsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
160
|
-
query?: UseQueryOptions<UnitsGetResponse, TError, TData, QueryKey
|
|
194
|
+
query?: Partial<UseQueryOptions<UnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
161
195
|
request?: SecondParameter<typeof customInstance>;
|
|
162
196
|
} | undefined) => UseQueryOptions<UnitsGetResponse, TError, TData, QueryKey> & {
|
|
163
197
|
queryKey: QueryKey;
|
|
@@ -168,11 +202,28 @@ type GetUnitsQueryError = ErrorType<void | AsError>;
|
|
|
168
202
|
* @summary Gets Units
|
|
169
203
|
*/
|
|
170
204
|
declare const useGetUnits: <TData = UnitsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
171
|
-
query?: UseQueryOptions<UnitsGetResponse, TError, TData, QueryKey
|
|
205
|
+
query?: Partial<UseQueryOptions<UnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
172
206
|
request?: SecondParameter<typeof customInstance>;
|
|
173
207
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
174
208
|
queryKey: QueryKey;
|
|
175
209
|
};
|
|
210
|
+
declare const getGetUnitsSuspenseQueryOptions: <TData = UnitsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
211
|
+
query?: Partial<UseSuspenseQueryOptions<UnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
212
|
+
request?: SecondParameter<typeof customInstance>;
|
|
213
|
+
} | undefined) => UseSuspenseQueryOptions<UnitsGetResponse, TError, TData, QueryKey> & {
|
|
214
|
+
queryKey: QueryKey;
|
|
215
|
+
};
|
|
216
|
+
type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
217
|
+
type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
218
|
+
/**
|
|
219
|
+
* @summary Gets Units
|
|
220
|
+
*/
|
|
221
|
+
declare const useGetUnitsSuspense: <TData = UnitsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
222
|
+
query?: Partial<UseSuspenseQueryOptions<UnitsGetResponse, TError, TData, QueryKey>> | undefined;
|
|
223
|
+
request?: SecondParameter<typeof customInstance>;
|
|
224
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
225
|
+
queryKey: QueryKey;
|
|
226
|
+
};
|
|
176
227
|
/**
|
|
177
228
|
* Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.
|
|
178
229
|
|
|
@@ -200,7 +251,7 @@ declare const useCreateDefaultUnit: <TError = ErrorType<void | AsError>, TContex
|
|
|
200
251
|
data: PersonalUnitPutBodyBody;
|
|
201
252
|
}, TContext> | undefined;
|
|
202
253
|
request?: SecondParameter<typeof customInstance>;
|
|
203
|
-
} | undefined) =>
|
|
254
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<PersonalUnitPutResponse, TError, {
|
|
204
255
|
data: PersonalUnitPutBodyBody;
|
|
205
256
|
}, TContext>;
|
|
206
257
|
/**
|
|
@@ -209,19 +260,19 @@ declare const useCreateDefaultUnit: <TError = ErrorType<void | AsError>, TContex
|
|
|
209
260
|
* @summary Deletes a Personal Unit
|
|
210
261
|
*/
|
|
211
262
|
declare const deleteDefaultUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
212
|
-
declare const getDeleteDefaultUnitMutationOptions: <TError = ErrorType<AsError>,
|
|
213
|
-
mutation?: UseMutationOptions<void, TError,
|
|
263
|
+
declare const getDeleteDefaultUnitMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
264
|
+
mutation?: UseMutationOptions<void, TError, void, TContext> | undefined;
|
|
214
265
|
request?: SecondParameter<typeof customInstance>;
|
|
215
|
-
} | undefined) => UseMutationOptions<void, TError,
|
|
266
|
+
} | undefined) => UseMutationOptions<void, TError, void, TContext>;
|
|
216
267
|
type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>;
|
|
217
268
|
type DeleteDefaultUnitMutationError = ErrorType<AsError>;
|
|
218
269
|
/**
|
|
219
270
|
* @summary Deletes a Personal Unit
|
|
220
271
|
*/
|
|
221
|
-
declare const useDeleteDefaultUnit: <TError = ErrorType<AsError>,
|
|
222
|
-
mutation?: UseMutationOptions<void, TError,
|
|
272
|
+
declare const useDeleteDefaultUnit: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
273
|
+
mutation?: UseMutationOptions<void, TError, void, TContext> | undefined;
|
|
223
274
|
request?: SecondParameter<typeof customInstance>;
|
|
224
|
-
} | undefined) =>
|
|
275
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, void, TContext>;
|
|
225
276
|
/**
|
|
226
277
|
* 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.
|
|
227
278
|
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.
|
|
@@ -234,7 +285,7 @@ You need to be part of the **Unit** or **Organisation** to use this method
|
|
|
234
285
|
declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
|
|
235
286
|
declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/unit/${string}/charges`, ...GetUnitChargesParams[]];
|
|
236
287
|
declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
237
|
-
query?: UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey
|
|
288
|
+
query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
238
289
|
request?: SecondParameter<typeof customInstance>;
|
|
239
290
|
} | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
|
|
240
291
|
queryKey: QueryKey;
|
|
@@ -245,10 +296,27 @@ type GetUnitChargesQueryError = ErrorType<AsError | void>;
|
|
|
245
296
|
* @summary Get charges made against a Unit
|
|
246
297
|
*/
|
|
247
298
|
declare const useGetUnitCharges: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
248
|
-
query?: UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey
|
|
299
|
+
query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
249
300
|
request?: SecondParameter<typeof customInstance>;
|
|
250
301
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
251
302
|
queryKey: QueryKey;
|
|
252
303
|
};
|
|
304
|
+
declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
305
|
+
query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
306
|
+
request?: SecondParameter<typeof customInstance>;
|
|
307
|
+
} | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
|
|
308
|
+
queryKey: QueryKey;
|
|
309
|
+
};
|
|
310
|
+
type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
311
|
+
type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
312
|
+
/**
|
|
313
|
+
* @summary Get charges made against a Unit
|
|
314
|
+
*/
|
|
315
|
+
declare const useGetUnitChargesSuspense: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
316
|
+
query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
317
|
+
request?: SecondParameter<typeof customInstance>;
|
|
318
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
319
|
+
queryKey: QueryKey;
|
|
320
|
+
};
|
|
253
321
|
|
|
254
|
-
export { CreateDefaultUnitMutationBody, CreateDefaultUnitMutationError, CreateDefaultUnitMutationResult, CreateOrganisationUnitMutationBody, CreateOrganisationUnitMutationError, CreateOrganisationUnitMutationResult, DeleteDefaultUnitMutationError, DeleteDefaultUnitMutationResult, DeleteOrganisationUnitMutationError, DeleteOrganisationUnitMutationResult, GetOrganisationUnitsQueryError, GetOrganisationUnitsQueryResult, GetUnitChargesQueryError, GetUnitChargesQueryResult, GetUnitQueryError, GetUnitQueryResult, GetUnitsQueryError, GetUnitsQueryResult, PatchUnitMutationBody, PatchUnitMutationError, PatchUnitMutationResult, createDefaultUnit, createOrganisationUnit, deleteDefaultUnit, deleteOrganisationUnit, getCreateDefaultUnitMutationOptions, getCreateOrganisationUnitMutationOptions, getDeleteDefaultUnitMutationOptions, getDeleteOrganisationUnitMutationOptions, getGetOrganisationUnitsQueryKey, getGetOrganisationUnitsQueryOptions, getGetUnitChargesQueryKey, getGetUnitChargesQueryOptions, getGetUnitQueryKey, getGetUnitQueryOptions, getGetUnitsQueryKey, getGetUnitsQueryOptions, getOrganisationUnits, getPatchUnitMutationOptions, getUnit, getUnitCharges, getUnits, patchUnit, useCreateDefaultUnit, useCreateOrganisationUnit, useDeleteDefaultUnit, useDeleteOrganisationUnit, useGetOrganisationUnits, useGetUnit, useGetUnitCharges, useGetUnits, usePatchUnit };
|
|
322
|
+
export { type CreateDefaultUnitMutationBody, type CreateDefaultUnitMutationError, type CreateDefaultUnitMutationResult, type CreateOrganisationUnitMutationBody, type CreateOrganisationUnitMutationError, type CreateOrganisationUnitMutationResult, type DeleteDefaultUnitMutationError, type DeleteDefaultUnitMutationResult, type DeleteOrganisationUnitMutationError, type DeleteOrganisationUnitMutationResult, type GetOrganisationUnitsQueryError, type GetOrganisationUnitsQueryResult, type GetOrganisationUnitsSuspenseQueryError, type GetOrganisationUnitsSuspenseQueryResult, type GetUnitChargesQueryError, type GetUnitChargesQueryResult, type GetUnitChargesSuspenseQueryError, type GetUnitChargesSuspenseQueryResult, type GetUnitQueryError, type GetUnitQueryResult, type GetUnitSuspenseQueryError, type GetUnitSuspenseQueryResult, type GetUnitsQueryError, type GetUnitsQueryResult, type GetUnitsSuspenseQueryError, type GetUnitsSuspenseQueryResult, type PatchUnitMutationBody, type PatchUnitMutationError, type PatchUnitMutationResult, createDefaultUnit, createOrganisationUnit, deleteDefaultUnit, deleteOrganisationUnit, getCreateDefaultUnitMutationOptions, getCreateOrganisationUnitMutationOptions, getDeleteDefaultUnitMutationOptions, getDeleteOrganisationUnitMutationOptions, getGetOrganisationUnitsQueryKey, getGetOrganisationUnitsQueryOptions, getGetOrganisationUnitsSuspenseQueryOptions, getGetUnitChargesQueryKey, getGetUnitChargesQueryOptions, getGetUnitChargesSuspenseQueryOptions, getGetUnitQueryKey, getGetUnitQueryOptions, getGetUnitSuspenseQueryOptions, getGetUnitsQueryKey, getGetUnitsQueryOptions, getGetUnitsSuspenseQueryOptions, getOrganisationUnits, getPatchUnitMutationOptions, getUnit, getUnitCharges, getUnits, patchUnit, useCreateDefaultUnit, useCreateOrganisationUnit, useDeleteDefaultUnit, useDeleteOrganisationUnit, useGetOrganisationUnits, useGetOrganisationUnitsSuspense, useGetUnit, useGetUnitCharges, useGetUnitChargesSuspense, useGetUnitSuspense, useGetUnits, useGetUnitsSuspense, usePatchUnit };
|