@squonk/account-server-client 2.4.1-rc.1 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/charges/charges.cjs +188 -0
  2. package/charges/charges.cjs.map +1 -0
  3. package/charges/charges.d.cts +184 -0
  4. package/charges/charges.d.ts +184 -0
  5. package/charges/charges.js +188 -0
  6. package/charges/charges.js.map +1 -0
  7. package/index.cjs.map +1 -1
  8. package/index.d.cts +2 -2
  9. package/index.d.ts +2 -2
  10. package/index.js.map +1 -1
  11. package/organisation/organisation.cjs +1 -45
  12. package/organisation/organisation.cjs.map +1 -1
  13. package/organisation/organisation.d.cts +5 -48
  14. package/organisation/organisation.d.ts +5 -48
  15. package/organisation/organisation.js +0 -44
  16. package/organisation/organisation.js.map +1 -1
  17. package/package.json +1 -1
  18. package/product/product.cjs +1 -45
  19. package/product/product.cjs.map +1 -1
  20. package/product/product.d.cts +2 -48
  21. package/product/product.d.ts +2 -48
  22. package/product/product.js +0 -44
  23. package/product/product.js.map +1 -1
  24. package/src/account-server-api.schemas.ts +2 -2
  25. package/src/charges/charges.ts +487 -0
  26. package/src/organisation/organisation.ts +0 -114
  27. package/src/product/product.ts +1 -117
  28. package/src/unit/unit.ts +1 -116
  29. package/unit/unit.cjs +1 -45
  30. package/unit/unit.cjs.map +1 -1
  31. package/unit/unit.d.cts +2 -47
  32. package/unit/unit.d.ts +2 -47
  33. package/unit/unit.js +0 -44
  34. package/unit/unit.js.map +1 -1
  35. package/admin/admin.cjs +0 -56
  36. package/admin/admin.cjs.map +0 -1
  37. package/admin/admin.d.cts +0 -50
  38. package/admin/admin.d.ts +0 -50
  39. package/admin/admin.js +0 -56
  40. package/admin/admin.js.map +0 -1
  41. package/admin/package.json +0 -7
  42. package/src/admin/admin.ts +0 -140
@@ -25,8 +25,6 @@ import type {
25
25
  } from '@tanstack/react-query'
26
26
  import type {
27
27
  AsError,
28
- GetProductChargesParams,
29
- ProductChargesGetResponse,
30
28
  ProductPatchBodyBody,
31
29
  ProductUnitGetResponse,
32
30
  ProductsGetDefaultStorageCost,
@@ -832,118 +830,4 @@ export const usePatchProduct = <TError = ErrorType<AsError>,
832
830
 
833
831
  return useMutation(mutationOptions);
834
832
  }
835
- /**
836
- * 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.
837
-
838
- 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.
839
-
840
- **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.
841
-
842
- You need to be part of the **Unit** or **Organisation** to use this method
843
- * @summary Get charges made against a Product
844
- */
845
- export const getProductCharges = (
846
- productId: string,
847
- params?: GetProductChargesParams,
848
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
849
- ) => {
850
-
851
-
852
- return customInstance<ProductChargesGetResponse>(
853
- {url: `/product/${productId}/charges`, method: 'GET',
854
- params, signal
855
- },
856
- options);
857
- }
858
-
859
-
860
- export const getGetProductChargesQueryKey = (productId: string,
861
- params?: GetProductChargesParams,) => {
862
- return ["account-server-api", `/product/${productId}/charges`, ...(params ? [params]: [])] as const;
863
- }
864
-
865
-
866
- export const getGetProductChargesQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,
867
- params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
868
- ) => {
869
-
870
- const {query: queryOptions, request: requestOptions} = options ?? {};
871
-
872
- const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);
873
-
874
-
875
-
876
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);
877
-
878
-
879
-
880
-
881
-
882
- return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }
883
- }
884
-
885
- export type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>
886
- export type GetProductChargesQueryError = ErrorType<AsError | void>
887
-
888
- /**
889
- * @summary Get charges made against a Product
890
- */
891
- export const useGetProductCharges = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(
892
- productId: string,
893
- params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
894
-
895
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
896
-
897
- const queryOptions = getGetProductChargesQueryOptions(productId,params,options)
898
-
899
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
900
-
901
- query.queryKey = queryOptions.queryKey ;
902
-
903
- return query;
904
- }
905
-
906
-
907
-
908
- export const getGetProductChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,
909
- params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
910
- ) => {
911
-
912
- const {query: queryOptions, request: requestOptions} = options ?? {};
913
-
914
- const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);
915
-
916
-
917
-
918
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);
919
-
920
-
921
-
922
-
923
-
924
- return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }
925
- }
926
-
927
- export type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>
928
- export type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>
929
-
930
- /**
931
- * @summary Get charges made against a Product
932
- */
933
- export const useGetProductChargesSuspense = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(
934
- productId: string,
935
- params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
936
-
937
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
938
-
939
- const queryOptions = getGetProductChargesSuspenseQueryOptions(productId,params,options)
940
-
941
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
942
-
943
- query.queryKey = queryOptions.queryKey ;
944
-
945
- return query;
946
- }
947
-
948
-
949
-
833
+
package/src/unit/unit.ts CHANGED
@@ -25,14 +25,12 @@ import type {
25
25
  } from '@tanstack/react-query'
26
26
  import type {
27
27
  AsError,
28
- GetUnitChargesParams,
29
28
  OrganisationUnitPostBodyBody,
30
29
  OrganisationUnitPostResponse,
31
30
  OrganisationUnitsGetResponse,
32
31
  PersonalUnitPutBodyBody,
33
32
  PersonalUnitPutResponse,
34
33
  UnitAllDetail,
35
- UnitChargesGetResponse,
36
34
  UnitPatchBodyBody,
37
35
  UnitsGetResponse
38
36
  } from '../account-server-api.schemas'
@@ -634,117 +632,4 @@ export const useDeleteDefaultUnit = <TError = ErrorType<AsError>,
634
632
 
635
633
  return useMutation(mutationOptions);
636
634
  }
637
- /**
638
- * 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.
639
- 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.
640
-
641
- **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.
642
-
643
- You need to be part of the **Unit** or **Organisation** to use this method
644
- * @summary Get charges made against a Unit
645
- */
646
- export const getUnitCharges = (
647
- unitId: string,
648
- params?: GetUnitChargesParams,
649
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
650
- ) => {
651
-
652
-
653
- return customInstance<UnitChargesGetResponse>(
654
- {url: `/unit/${unitId}/charges`, method: 'GET',
655
- params, signal
656
- },
657
- options);
658
- }
659
-
660
-
661
- export const getGetUnitChargesQueryKey = (unitId: string,
662
- params?: GetUnitChargesParams,) => {
663
- return ["account-server-api", `/unit/${unitId}/charges`, ...(params ? [params]: [])] as const;
664
- }
665
-
666
-
667
- export const getGetUnitChargesQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,
668
- params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
669
- ) => {
670
-
671
- const {query: queryOptions, request: requestOptions} = options ?? {};
672
-
673
- const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);
674
-
675
-
676
-
677
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);
678
-
679
-
680
-
681
-
682
-
683
- return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }
684
- }
685
-
686
- export type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>
687
- export type GetUnitChargesQueryError = ErrorType<AsError | void>
688
-
689
- /**
690
- * @summary Get charges made against a Unit
691
- */
692
- export const useGetUnitCharges = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(
693
- unitId: string,
694
- params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
695
-
696
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
697
-
698
- const queryOptions = getGetUnitChargesQueryOptions(unitId,params,options)
699
-
700
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
701
-
702
- query.queryKey = queryOptions.queryKey ;
703
-
704
- return query;
705
- }
706
-
707
-
708
-
709
- export const getGetUnitChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,
710
- params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
711
- ) => {
712
-
713
- const {query: queryOptions, request: requestOptions} = options ?? {};
714
-
715
- const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);
716
-
717
-
718
-
719
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);
720
-
721
-
722
-
723
-
724
-
725
- return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }
726
- }
727
-
728
- export type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>
729
- export type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>
730
-
731
- /**
732
- * @summary Get charges made against a Unit
733
- */
734
- export const useGetUnitChargesSuspense = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(
735
- unitId: string,
736
- params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
737
-
738
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
739
-
740
- const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId,params,options)
741
-
742
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
743
-
744
- query.queryKey = queryOptions.queryKey ;
745
-
746
- return query;
747
- }
748
-
749
-
750
-
635
+
package/unit/unit.cjs CHANGED
@@ -229,50 +229,6 @@ var useDeleteDefaultUnit = (options) => {
229
229
  const mutationOptions = getDeleteDefaultUnitMutationOptions(options);
230
230
  return _reactquery.useMutation.call(void 0, mutationOptions);
231
231
  };
232
- var getUnitCharges = (unitId, params, options, signal) => {
233
- return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
234
- {
235
- url: `/unit/${unitId}/charges`,
236
- method: "GET",
237
- params,
238
- signal
239
- },
240
- options
241
- );
242
- };
243
- var getGetUnitChargesQueryKey = (unitId, params) => {
244
- return ["account-server-api", `/unit/${unitId}/charges`, ...params ? [params] : []];
245
- };
246
- var getGetUnitChargesQueryOptions = (unitId, params, options) => {
247
- const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
248
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitChargesQueryKey(unitId, params)));
249
- const queryFn = ({ signal }) => getUnitCharges(unitId, params, requestOptions, signal);
250
- return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
251
- };
252
- var useGetUnitCharges = (unitId, params, options) => {
253
- const queryOptions = getGetUnitChargesQueryOptions(unitId, params, options);
254
- const query = _reactquery.useQuery.call(void 0, queryOptions);
255
- query.queryKey = queryOptions.queryKey;
256
- return query;
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
232
 
277
233
 
278
234
 
@@ -307,5 +263,5 @@ var useGetUnitChargesSuspense = (unitId, params, options) => {
307
263
 
308
264
 
309
265
 
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;
266
+ 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.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.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.useGetUnitSuspense = useGetUnitSuspense; exports.useGetUnits = useGetUnits; exports.useGetUnitsSuspense = useGetUnitsSuspense; exports.usePatchUnit = usePatchUnit;
311
267
  //# 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,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,aAA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AE,OAAO,MAAM,eAAe,QAAO,QAAQ,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,oBAAoB,CAChC,QACG,QAA+B,YAE6B;AAE9D,QAAM,eAAe,8BAA8B,QAAO,QAAO,OAAO;AAExE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,wCAAwC,CAAyF,QAC1I,QAA+B,YAC9B;AAEL,QAAM,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.4\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 UnitAllDetail,\n UnitChargesGetResponse,\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.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou 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. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\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<UnitAllDetail>(\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 a member of the **Unit**, 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 you are a member of.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\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"]}
1
+ {"version":3,"sources":["../../src/unit/unit.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,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,Q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,YAAY,eAAe;AACpC;AAMG,IAAM,oBAAoB,CAEhC,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,IACzB;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAC3B,YACuE;AAC9F,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAoF,MAAM;AAG5F,WAAQ,kBAAkB,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CACZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,YAAY,eAAe;AACpC","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 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 OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitAllDetail,\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.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou 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. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\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<UnitAllDetail>(\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 a member of the **Unit**, 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 you are a member of.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\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 "]}
package/unit/unit.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
- import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.cjs';
3
+ import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse } from '../index.cjs';
4
4
  import 'axios';
5
5
 
6
6
  type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
@@ -279,50 +279,5 @@ declare const useDeleteDefaultUnit: <TError = ErrorType<AsError>, TContext = unk
279
279
  mutation?: UseMutationOptions<void, TError, void, TContext> | undefined;
280
280
  request?: SecondParameter<typeof customInstance>;
281
281
  } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, void, TContext>;
282
- /**
283
- * 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.
284
- 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.
285
-
286
- **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.
287
-
288
- You need to be part of the **Unit** or **Organisation** to use this method
289
- * @summary Get charges made against a Unit
290
- */
291
- declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
292
- declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/unit/${string}/charges`, ...GetUnitChargesParams[]];
293
- declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
294
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
295
- request?: SecondParameter<typeof customInstance>;
296
- } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
297
- queryKey: QueryKey;
298
- };
299
- type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
300
- type GetUnitChargesQueryError = ErrorType<AsError | void>;
301
- /**
302
- * @summary Get charges made against a Unit
303
- */
304
- declare const useGetUnitCharges: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
305
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
306
- request?: SecondParameter<typeof customInstance>;
307
- } | undefined) => UseQueryResult<TData, TError> & {
308
- queryKey: QueryKey;
309
- };
310
- declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
311
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
312
- request?: SecondParameter<typeof customInstance>;
313
- } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
314
- queryKey: QueryKey;
315
- };
316
- type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
317
- type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
318
- /**
319
- * @summary Get charges made against a Unit
320
- */
321
- declare const useGetUnitChargesSuspense: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
322
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
323
- request?: SecondParameter<typeof customInstance>;
324
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
325
- queryKey: QueryKey;
326
- };
327
282
 
328
- 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 };
283
+ 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 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, getGetUnitQueryKey, getGetUnitQueryOptions, getGetUnitSuspenseQueryOptions, getGetUnitsQueryKey, getGetUnitsQueryOptions, getGetUnitsSuspenseQueryOptions, getOrganisationUnits, getPatchUnitMutationOptions, getUnit, getUnits, patchUnit, useCreateDefaultUnit, useCreateOrganisationUnit, useDeleteDefaultUnit, useDeleteOrganisationUnit, useGetOrganisationUnits, useGetOrganisationUnitsSuspense, useGetUnit, useGetUnitSuspense, useGetUnits, useGetUnitsSuspense, usePatchUnit };
package/unit/unit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
- import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse, GetUnitChargesParams, UnitChargesGetResponse } from '../index.js';
3
+ import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse } from '../index.js';
4
4
  import 'axios';
5
5
 
6
6
  type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
@@ -279,50 +279,5 @@ declare const useDeleteDefaultUnit: <TError = ErrorType<AsError>, TContext = unk
279
279
  mutation?: UseMutationOptions<void, TError, void, TContext> | undefined;
280
280
  request?: SecondParameter<typeof customInstance>;
281
281
  } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, void, TContext>;
282
- /**
283
- * 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.
284
- 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.
285
-
286
- **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.
287
-
288
- You need to be part of the **Unit** or **Organisation** to use this method
289
- * @summary Get charges made against a Unit
290
- */
291
- declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitChargesGetResponse>;
292
- declare const getGetUnitChargesQueryKey: (unitId: string, params?: GetUnitChargesParams) => readonly ["account-server-api", `/unit/${string}/charges`, ...GetUnitChargesParams[]];
293
- declare const getGetUnitChargesQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
294
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
295
- request?: SecondParameter<typeof customInstance>;
296
- } | undefined) => UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
297
- queryKey: QueryKey;
298
- };
299
- type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
300
- type GetUnitChargesQueryError = ErrorType<AsError | void>;
301
- /**
302
- * @summary Get charges made against a Unit
303
- */
304
- declare const useGetUnitCharges: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
305
- query?: Partial<UseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
306
- request?: SecondParameter<typeof customInstance>;
307
- } | undefined) => UseQueryResult<TData, TError> & {
308
- queryKey: QueryKey;
309
- };
310
- declare const getGetUnitChargesSuspenseQueryOptions: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
311
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
312
- request?: SecondParameter<typeof customInstance>;
313
- } | undefined) => UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey> & {
314
- queryKey: QueryKey;
315
- };
316
- type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
317
- type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
318
- /**
319
- * @summary Get charges made against a Unit
320
- */
321
- declare const useGetUnitChargesSuspense: <TData = UnitChargesGetResponse, TError = ErrorType<void | AsError>>(unitId: string, params?: GetUnitChargesParams, options?: {
322
- query?: Partial<UseSuspenseQueryOptions<UnitChargesGetResponse, TError, TData, QueryKey>> | undefined;
323
- request?: SecondParameter<typeof customInstance>;
324
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
325
- queryKey: QueryKey;
326
- };
327
282
 
328
- 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 };
283
+ 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 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, getGetUnitQueryKey, getGetUnitQueryOptions, getGetUnitSuspenseQueryOptions, getGetUnitsQueryKey, getGetUnitsQueryOptions, getGetUnitsSuspenseQueryOptions, getOrganisationUnits, getPatchUnitMutationOptions, getUnit, getUnits, patchUnit, useCreateDefaultUnit, useCreateOrganisationUnit, useDeleteDefaultUnit, useDeleteOrganisationUnit, useGetOrganisationUnits, useGetOrganisationUnitsSuspense, useGetUnit, useGetUnitSuspense, useGetUnits, useGetUnitsSuspense, usePatchUnit };