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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/asset/package.json +6 -6
  2. package/charges/charges.cjs +188 -0
  3. package/charges/charges.cjs.map +1 -0
  4. package/charges/charges.d.cts +184 -0
  5. package/charges/charges.d.ts +184 -0
  6. package/charges/charges.js +188 -0
  7. package/charges/charges.js.map +1 -0
  8. package/charges/package.json +7 -0
  9. package/event-stream/package.json +6 -6
  10. package/index.cjs.map +1 -1
  11. package/index.d.cts +2 -2
  12. package/index.d.ts +2 -2
  13. package/index.js.map +1 -1
  14. package/merchant/package.json +6 -6
  15. package/organisation/organisation.cjs +1 -45
  16. package/organisation/organisation.cjs.map +1 -1
  17. package/organisation/organisation.d.cts +5 -48
  18. package/organisation/organisation.d.ts +5 -48
  19. package/organisation/organisation.js +0 -44
  20. package/organisation/organisation.js.map +1 -1
  21. package/organisation/package.json +6 -6
  22. package/package.json +1 -1
  23. package/product/package.json +6 -6
  24. package/product/product.cjs +1 -45
  25. package/product/product.cjs.map +1 -1
  26. package/product/product.d.cts +2 -48
  27. package/product/product.d.ts +2 -48
  28. package/product/product.js +0 -44
  29. package/product/product.js.map +1 -1
  30. package/src/account-server-api.schemas.ts +2 -2
  31. package/src/charges/charges.ts +487 -0
  32. package/src/organisation/organisation.ts +0 -114
  33. package/src/product/product.ts +1 -117
  34. package/src/unit/unit.ts +1 -116
  35. package/state/package.json +6 -6
  36. package/unit/package.json +6 -6
  37. package/unit/unit.cjs +1 -45
  38. package/unit/unit.cjs.map +1 -1
  39. package/unit/unit.d.cts +2 -47
  40. package/unit/unit.d.ts +2 -47
  41. package/unit/unit.js +0 -44
  42. package/unit/unit.js.map +1 -1
  43. package/user/package.json +6 -6
  44. package/admin/admin.cjs +0 -56
  45. package/admin/admin.cjs.map +0 -1
  46. package/admin/admin.d.cts +0 -50
  47. package/admin/admin.d.ts +0 -50
  48. package/admin/admin.js +0 -56
  49. package/admin/admin.js.map +0 -1
  50. package/admin/package.json +0 -7
  51. package/src/admin/admin.ts +0 -140
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 };
package/unit/unit.js CHANGED
@@ -229,44 +229,6 @@ var useDeleteDefaultUnit = (options) => {
229
229
  const mutationOptions = getDeleteDefaultUnitMutationOptions(options);
230
230
  return useMutation(mutationOptions);
231
231
  };
232
- var getUnitCharges = (unitId, params, options, signal) => {
233
- return customInstance(
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 } = options ?? {};
248
- const queryKey = (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 = useQuery(queryOptions);
255
- query.queryKey = queryOptions.queryKey;
256
- return query;
257
- };
258
- var getGetUnitChargesSuspenseQueryOptions = (unitId, params, options) => {
259
- const { query: queryOptions, request: requestOptions } = options ?? {};
260
- const queryKey = (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 = useSuspenseQuery(queryOptions);
267
- query.queryKey = queryOptions.queryKey;
268
- return query;
269
- };
270
232
  export {
271
233
  createDefaultUnit,
272
234
  createOrganisationUnit,
@@ -279,9 +241,6 @@ export {
279
241
  getGetOrganisationUnitsQueryKey,
280
242
  getGetOrganisationUnitsQueryOptions,
281
243
  getGetOrganisationUnitsSuspenseQueryOptions,
282
- getGetUnitChargesQueryKey,
283
- getGetUnitChargesQueryOptions,
284
- getGetUnitChargesSuspenseQueryOptions,
285
244
  getGetUnitQueryKey,
286
245
  getGetUnitQueryOptions,
287
246
  getGetUnitSuspenseQueryOptions,
@@ -291,7 +250,6 @@ export {
291
250
  getOrganisationUnits,
292
251
  getPatchUnitMutationOptions,
293
252
  getUnit,
294
- getUnitCharges,
295
253
  getUnits,
296
254
  patchUnit,
297
255
  useCreateDefaultUnit,
@@ -301,8 +259,6 @@ export {
301
259
  useGetOrganisationUnits,
302
260
  useGetOrganisationUnitsSuspense,
303
261
  useGetUnit,
304
- useGetUnitCharges,
305
- useGetUnitChargesSuspense,
306
262
  useGetUnitSuspense,
307
263
  useGetUnits,
308
264
  useGetUnitsSuspense,
package/unit/unit.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/unit/unit.ts"],"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"],"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,8CAA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;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;","names":[]}
1
+ {"version":3,"sources":["../../src/unit/unit.ts"],"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 "],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,uBAAuB,CAChC,OACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,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W,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,oBAAoB,CAC7B,yBACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACvB,SAAS,EAAC,gBAAgB,mBAAoB;AAAA,MAC9C,MAAM;AAAA,IACR;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAC3B,YACkG;AACzH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAA+G,CAAC,UAAU;AAC5H,UAAM,EAAC,KAAI,IAAI,SAAS,CAAC;AAEzB,WAAQ,kBAAkB,MAAK,cAAc;AAAA,EAC/C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CACZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,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;","names":[]}
package/user/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "module": "./user.js",
3
- "main": "./user.cjs",
4
- "types": "./user.d.ts",
5
- "sideEffects": false,
6
- "type": "module"
7
- }
2
+ "module": "./user.js",
3
+ "main": "./user.cjs",
4
+ "types": "./user.d.ts",
5
+ "sideEffects": false,
6
+ "type": "module"
7
+ }
package/admin/admin.cjs DELETED
@@ -1,56 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
- var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
4
-
5
- // src/admin/admin.ts
6
-
7
-
8
-
9
- var _reactquery = require('@tanstack/react-query');
10
- var getCharges = (params, options, signal) => {
11
- return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
12
- {
13
- url: `/charges`,
14
- method: "GET",
15
- params,
16
- signal
17
- },
18
- options
19
- );
20
- };
21
- var getGetChargesQueryKey = (params) => {
22
- return ["account-server-api", `/charges`, ...params ? [params] : []];
23
- };
24
- var getGetChargesQueryOptions = (params, options) => {
25
- const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
26
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetChargesQueryKey(params)));
27
- const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
28
- return { queryKey, queryFn, ...queryOptions };
29
- };
30
- var useGetCharges = (params, options) => {
31
- const queryOptions = getGetChargesQueryOptions(params, options);
32
- const query = _reactquery.useQuery.call(void 0, queryOptions);
33
- query.queryKey = queryOptions.queryKey;
34
- return query;
35
- };
36
- var getGetChargesSuspenseQueryOptions = (params, options) => {
37
- const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
38
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetChargesQueryKey(params)));
39
- const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
40
- return { queryKey, queryFn, ...queryOptions };
41
- };
42
- var useGetChargesSuspense = (params, options) => {
43
- const queryOptions = getGetChargesSuspenseQueryOptions(params, options);
44
- const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
45
- query.queryKey = queryOptions.queryKey;
46
- return query;
47
- };
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
- exports.getCharges = getCharges; exports.getGetChargesQueryKey = getGetChargesQueryKey; exports.getGetChargesQueryOptions = getGetChargesQueryOptions; exports.getGetChargesSuspenseQueryOptions = getGetChargesSuspenseQueryOptions; exports.useGetCharges = useGetCharges; exports.useGetChargesSuspense = useGetChargesSuspense;
56
- //# sourceMappingURL=admin.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,aAAa,CACtB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MACxB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,wBAAwB,CAAC,WAA+B;AACjE,SAAO,CAAC,sBAAsB,YAAY,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AACpE;AAGG,IAAM,4BAA4B,CAAqF,QAA2B,YACpJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,MAAM;AAItE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,QAAQ,gBAAgB,MAAM;AAMjI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,gBAAgB,CAC5B,QAA2B,YAEoC;AAE9D,QAAM,eAAe,0BAA0B,QAAO,OAAO;AAE7D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,oCAAoC,CAAqF,QAA2B,YAC5J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,MAAM;AAItE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,QAAQ,gBAAgB,MAAM;AAMjI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,wBAAwB,CACpC,QAA2B,YAE4C;AAEtE,QAAM,eAAe,kCAAkC,QAAO,OAAO;AAErE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.4\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ChargesGetResponse>(\n {url: `/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetChargesQueryKey = (params?: GetChargesParams,) => {\n return [\"account-server-api\", `/charges`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetChargesQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetCharges = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetChargesSuspense = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
package/admin/admin.d.cts DELETED
@@ -1,50 +0,0 @@
1
- import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
2
- import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError } from '../index.cjs';
3
- import 'axios';
4
-
5
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
6
- /**
7
- * Gets global Charges.
8
-
9
- You need admin rights to use this path.
10
-
11
- * @summary Gets charges for all Organisations
12
- */
13
- declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
14
- declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
15
- declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
16
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
17
- request?: SecondParameter<typeof customInstance>;
18
- } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
19
- queryKey: QueryKey;
20
- };
21
- type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
22
- type GetChargesQueryError = ErrorType<void | AsError>;
23
- /**
24
- * @summary Gets charges for all Organisations
25
- */
26
- declare const useGetCharges: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
27
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
28
- request?: SecondParameter<typeof customInstance>;
29
- } | undefined) => UseQueryResult<TData, TError> & {
30
- queryKey: QueryKey;
31
- };
32
- declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
33
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
34
- request?: SecondParameter<typeof customInstance>;
35
- } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
36
- queryKey: QueryKey;
37
- };
38
- type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
39
- type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
40
- /**
41
- * @summary Gets charges for all Organisations
42
- */
43
- declare const useGetChargesSuspense: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
44
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
45
- request?: SecondParameter<typeof customInstance>;
46
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
47
- queryKey: QueryKey;
48
- };
49
-
50
- export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetChargesQueryOptions, getGetChargesSuspenseQueryOptions, useGetCharges, useGetChargesSuspense };
package/admin/admin.d.ts DELETED
@@ -1,50 +0,0 @@
1
- import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
2
- import { GetChargesParams, customInstance, ChargesGetResponse, ErrorType, AsError } from '../index.js';
3
- import 'axios';
4
-
5
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
6
- /**
7
- * Gets global Charges.
8
-
9
- You need admin rights to use this path.
10
-
11
- * @summary Gets charges for all Organisations
12
- */
13
- declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
14
- declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server-api", "/charges", ...GetChargesParams[]];
15
- declare const getGetChargesQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
16
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
17
- request?: SecondParameter<typeof customInstance>;
18
- } | undefined) => UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
19
- queryKey: QueryKey;
20
- };
21
- type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
22
- type GetChargesQueryError = ErrorType<void | AsError>;
23
- /**
24
- * @summary Gets charges for all Organisations
25
- */
26
- declare const useGetCharges: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
27
- query?: Partial<UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
28
- request?: SecondParameter<typeof customInstance>;
29
- } | undefined) => UseQueryResult<TData, TError> & {
30
- queryKey: QueryKey;
31
- };
32
- declare const getGetChargesSuspenseQueryOptions: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
33
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
34
- request?: SecondParameter<typeof customInstance>;
35
- } | undefined) => UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> & {
36
- queryKey: QueryKey;
37
- };
38
- type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
39
- type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
40
- /**
41
- * @summary Gets charges for all Organisations
42
- */
43
- declare const useGetChargesSuspense: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
44
- query?: Partial<UseSuspenseQueryOptions<ChargesGetResponse, TError, TData, QueryKey>> | undefined;
45
- request?: SecondParameter<typeof customInstance>;
46
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
47
- queryKey: QueryKey;
48
- };
49
-
50
- export { type GetChargesQueryError, type GetChargesQueryResult, type GetChargesSuspenseQueryError, type GetChargesSuspenseQueryResult, getCharges, getGetChargesQueryKey, getGetChargesQueryOptions, getGetChargesSuspenseQueryOptions, useGetCharges, useGetChargesSuspense };
package/admin/admin.js DELETED
@@ -1,56 +0,0 @@
1
- import {
2
- customInstance
3
- } from "../chunk-EBOQPVLG.js";
4
-
5
- // src/admin/admin.ts
6
- import {
7
- useQuery,
8
- useSuspenseQuery
9
- } from "@tanstack/react-query";
10
- var getCharges = (params, options, signal) => {
11
- return customInstance(
12
- {
13
- url: `/charges`,
14
- method: "GET",
15
- params,
16
- signal
17
- },
18
- options
19
- );
20
- };
21
- var getGetChargesQueryKey = (params) => {
22
- return ["account-server-api", `/charges`, ...params ? [params] : []];
23
- };
24
- var getGetChargesQueryOptions = (params, options) => {
25
- const { query: queryOptions, request: requestOptions } = options ?? {};
26
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetChargesQueryKey(params);
27
- const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
28
- return { queryKey, queryFn, ...queryOptions };
29
- };
30
- var useGetCharges = (params, options) => {
31
- const queryOptions = getGetChargesQueryOptions(params, options);
32
- const query = useQuery(queryOptions);
33
- query.queryKey = queryOptions.queryKey;
34
- return query;
35
- };
36
- var getGetChargesSuspenseQueryOptions = (params, options) => {
37
- const { query: queryOptions, request: requestOptions } = options ?? {};
38
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetChargesQueryKey(params);
39
- const queryFn = ({ signal }) => getCharges(params, requestOptions, signal);
40
- return { queryKey, queryFn, ...queryOptions };
41
- };
42
- var useGetChargesSuspense = (params, options) => {
43
- const queryOptions = getGetChargesSuspenseQueryOptions(params, options);
44
- const query = useSuspenseQuery(queryOptions);
45
- query.queryKey = queryOptions.queryKey;
46
- return query;
47
- };
48
- export {
49
- getCharges,
50
- getGetChargesQueryKey,
51
- getGetChargesQueryOptions,
52
- getGetChargesSuspenseQueryOptions,
53
- useGetCharges,
54
- useGetChargesSuspense
55
- };
56
- //# sourceMappingURL=admin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/admin/admin.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.4\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ChargesGetResponse>(\n {url: `/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetChargesQueryKey = (params?: GetChargesParams,) => {\n return [\"account-server-api\", `/charges`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetChargesQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetCharges = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const useGetChargesSuspense = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetChargesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,aAAa,CACtB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAY,QAAQ;AAAA,MACxB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,wBAAwB,CAAC,WAA+B;AACjE,SAAO,CAAC,sBAAsB,YAAY,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AACpE;AAGG,IAAM,4BAA4B,CAAqF,QAA2B,YACpJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,MAAM;AAItE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,QAAQ,gBAAgB,MAAM;AAMjI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,gBAAgB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