@squonk/account-server-client 4.4.0-4-4.2174798239 → 4.4.0-4-4.2194834412

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 (97) hide show
  1. package/dist/api/actions/actions.cjs +5 -5
  2. package/dist/api/actions/actions.cjs.map +1 -1
  3. package/dist/api/actions/actions.d.cts +17 -35
  4. package/dist/api/actions/actions.d.cts.map +1 -1
  5. package/dist/api/actions/actions.d.ts +17 -35
  6. package/dist/api/actions/actions.d.ts.map +1 -1
  7. package/dist/api/actions/actions.js +5 -5
  8. package/dist/api/actions/actions.js.map +1 -1
  9. package/dist/api/api.schemas.cjs.map +1 -1
  10. package/dist/api/api.schemas.d.cts +1 -1
  11. package/dist/api/api.schemas.d.ts +1 -1
  12. package/dist/api/api.schemas.js.map +1 -1
  13. package/dist/api/asset/asset.cjs +23 -23
  14. package/dist/api/asset/asset.cjs.map +1 -1
  15. package/dist/api/asset/asset.d.cts +40 -76
  16. package/dist/api/asset/asset.d.cts.map +1 -1
  17. package/dist/api/asset/asset.d.ts +40 -76
  18. package/dist/api/asset/asset.d.ts.map +1 -1
  19. package/dist/api/asset/asset.js +23 -23
  20. package/dist/api/asset/asset.js.map +1 -1
  21. package/dist/api/charges/charges.cjs +17 -17
  22. package/dist/api/charges/charges.cjs.map +1 -1
  23. package/dist/api/charges/charges.d.cts +65 -137
  24. package/dist/api/charges/charges.d.cts.map +1 -1
  25. package/dist/api/charges/charges.d.ts +65 -137
  26. package/dist/api/charges/charges.d.ts.map +1 -1
  27. package/dist/api/charges/charges.js +17 -17
  28. package/dist/api/charges/charges.js.map +1 -1
  29. package/dist/api/event-stream/event-stream.cjs +13 -13
  30. package/dist/api/event-stream/event-stream.cjs.map +1 -1
  31. package/dist/api/event-stream/event-stream.d.cts +35 -71
  32. package/dist/api/event-stream/event-stream.d.cts.map +1 -1
  33. package/dist/api/event-stream/event-stream.d.ts +35 -71
  34. package/dist/api/event-stream/event-stream.d.ts.map +1 -1
  35. package/dist/api/event-stream/event-stream.js +13 -13
  36. package/dist/api/event-stream/event-stream.js.map +1 -1
  37. package/dist/api/merchant/merchant.cjs +9 -9
  38. package/dist/api/merchant/merchant.cjs.map +1 -1
  39. package/dist/api/merchant/merchant.d.cts +33 -69
  40. package/dist/api/merchant/merchant.d.cts.map +1 -1
  41. package/dist/api/merchant/merchant.d.ts +33 -69
  42. package/dist/api/merchant/merchant.d.ts.map +1 -1
  43. package/dist/api/merchant/merchant.js +9 -9
  44. package/dist/api/merchant/merchant.js.map +1 -1
  45. package/dist/api/organisation/organisation.cjs +19 -19
  46. package/dist/api/organisation/organisation.cjs.map +1 -1
  47. package/dist/api/organisation/organisation.d.cts +52 -106
  48. package/dist/api/organisation/organisation.d.cts.map +1 -1
  49. package/dist/api/organisation/organisation.d.ts +52 -106
  50. package/dist/api/organisation/organisation.d.ts.map +1 -1
  51. package/dist/api/organisation/organisation.js +19 -19
  52. package/dist/api/organisation/organisation.js.map +1 -1
  53. package/dist/api/product/product.cjs +31 -31
  54. package/dist/api/product/product.cjs.map +1 -1
  55. package/dist/api/product/product.d.cts +100 -208
  56. package/dist/api/product/product.d.cts.map +1 -1
  57. package/dist/api/product/product.d.ts +100 -208
  58. package/dist/api/product/product.d.ts.map +1 -1
  59. package/dist/api/product/product.js +31 -31
  60. package/dist/api/product/product.js.map +1 -1
  61. package/dist/api/state/state.cjs +5 -5
  62. package/dist/api/state/state.cjs.map +1 -1
  63. package/dist/api/state/state.d.cts +17 -35
  64. package/dist/api/state/state.d.cts.map +1 -1
  65. package/dist/api/state/state.d.ts +17 -35
  66. package/dist/api/state/state.d.ts.map +1 -1
  67. package/dist/api/state/state.js +5 -5
  68. package/dist/api/state/state.js.map +1 -1
  69. package/dist/api/unit/unit.cjs +31 -31
  70. package/dist/api/unit/unit.cjs.map +1 -1
  71. package/dist/api/unit/unit.d.cts +72 -144
  72. package/dist/api/unit/unit.d.cts.map +1 -1
  73. package/dist/api/unit/unit.d.ts +72 -144
  74. package/dist/api/unit/unit.d.ts.map +1 -1
  75. package/dist/api/unit/unit.js +31 -31
  76. package/dist/api/unit/unit.js.map +1 -1
  77. package/dist/api/user/user.cjs +21 -21
  78. package/dist/api/user/user.cjs.map +1 -1
  79. package/dist/api/user/user.d.cts +53 -107
  80. package/dist/api/user/user.d.cts.map +1 -1
  81. package/dist/api/user/user.d.ts +53 -107
  82. package/dist/api/user/user.d.ts.map +1 -1
  83. package/dist/api/user/user.js +21 -21
  84. package/dist/api/user/user.js.map +1 -1
  85. package/package.json +4 -7
  86. package/pnpm-workspace.yaml +1 -3
  87. package/src/api/actions/actions.ts +13 -105
  88. package/src/api/api.schemas.ts +1 -1
  89. package/src/api/asset/asset.ts +95 -305
  90. package/src/api/charges/charges.ts +55 -458
  91. package/src/api/event-stream/event-stream.ts +59 -264
  92. package/src/api/merchant/merchant.ts +29 -214
  93. package/src/api/organisation/organisation.ts +87 -383
  94. package/src/api/product/product.ts +131 -726
  95. package/src/api/state/state.ts +17 -107
  96. package/src/api/unit/unit.ts +147 -523
  97. package/src/api/user/user.ts +102 -403
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n { orgId: string; userId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n { orgId: string; userId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n { unitId: string; userId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n { unitId: string; userId: string }\n >"],"sources":["../../../src/api/user/user.ts"],"sourcesContent":["/**\n * Generated by orval v7.16.1 🍺\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: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { AsError, UserAccountDetail, UsersGetResponse } from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UserAccountDetail>(\n { url: `/user/account`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetUserAccountQueryKey = () => {\n return [`/user/account`] as const;\n};\n\nexport const useGetUserAccountQueryOptions = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) =>\n getUserAccount(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;\nexport type GetUserAccountQueryError = ErrorType<void | AsError>;\n\nexport function useGetUserAccount<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n Awaited<ReturnType<typeof getUserAccount>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetUserAccount<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n Awaited<ReturnType<typeof getUserAccount>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetUserAccount<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Get information about your account\n */\n\nexport function useGetUserAccount<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetUserAccountQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetUserAccountSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) =>\n getUserAccount(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetUserAccountSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetUserAccountSuspense<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetUserAccountSuspense<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetUserAccountSuspense<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Get information about your account\n */\n\nexport function useGetUserAccountSuspense<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetUserAccountSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Users in an Organisation.\n\nYou have to be a member of the Organisation or an admin user to use this endpoint\n\n**WARNING**: This endpoint is **DEPRECATED** and will be removed in a future release. Please use the `GET /organisation/{org_id}` endpoint instead.\n\n * @summary Gets users in an Organisation\n */\nexport const getOrganisationUsers = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/organisation/${orgId}/user`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUsersQueryKey = (orgId?: string) => {\n return [`/organisation/${orgId}/user`] as const;\n};\n\nexport const useGetOrganisationUsersQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) =>\n getOrganisationUsers(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetOrganisationUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUsers>>\n>;\nexport type GetOrganisationUsersQueryError = ErrorType<AsError | void>;\n\nexport function useGetOrganisationUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUsers>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUsers>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets users in an Organisation\n */\n\nexport function useGetOrganisationUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetOrganisationUsersQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetOrganisationUsersSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) =>\n getOrganisationUsers(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetOrganisationUsersSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUsers>>\n>;\nexport type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetOrganisationUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets users in an Organisation\n */\n\nexport function useGetOrganisationUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetOrganisationUsersSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Adds a User to an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Adds a User to an Organisation\n */\nexport const addOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n { url: `/organisation/${orgId}/user/${userId}`, method: \"PUT\" },\n options,\n );\n};\n\nexport const useAddOrganisationUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"addOrganisationUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n { orgId: string; userId: string }\n > = (props) => {\n const { orgId, userId } = props ?? {};\n\n return addOrganisationUser(orgId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AddOrganisationUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof addOrganisationUser>>\n>;\n\nexport type AddOrganisationUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Adds a User to an Organisation\n */\nexport const useAddOrganisationUser = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useAddOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Removes a User from an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Deletes a User from an Organisation\n */\nexport const deleteOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n { url: `/organisation/${orgId}/user/${userId}`, method: \"DELETE\" },\n options,\n );\n};\n\nexport const useDeleteOrganisationUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n { orgId: string; userId: string }\n > = (props) => {\n const { orgId, userId } = props ?? {};\n\n return deleteOrganisationUser(orgId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteOrganisationUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUser>>\n>;\n\nexport type DeleteOrganisationUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes a User from an Organisation\n */\nexport const useDeleteOrganisationUser = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useDeleteOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets users in an Organisational Unit.\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n**WARNING**: This endpoint is **DEPRECATED** and will be removed in a future release. Please use the `GET /unit/{unit_id}` endpoint instead.\n\n * @summary Gets users in an Organisational Unit\n */\nexport const getOrganisationUnitUsers = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/unit/${unitId}/user`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitUsersQueryKey = (unitId?: string) => {\n return [`/unit/${unitId}/user`] as const;\n};\n\nexport const useGetOrganisationUnitUsersQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({\n signal,\n }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetOrganisationUnitUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n>;\nexport type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;\n\nexport function useGetOrganisationUnitUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUnitUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUnitUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets users in an Organisational Unit\n */\n\nexport function useGetOrganisationUnitUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetOrganisationUnitUsersQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetOrganisationUnitUsersSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({\n signal,\n }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n>;\nexport type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetOrganisationUnitUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUnitUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetOrganisationUnitUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets users in an Organisational Unit\n */\n\nexport function useGetOrganisationUnitUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetOrganisationUnitUsersSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Adds a user to an Organisational Unit.\n\nUsers cannot be added to **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Adds a user to an Organisational Unit\n */\nexport const addOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}/user/${userId}`, method: \"PUT\" }, options);\n};\n\nexport const useAddOrganisationUnitUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"addOrganisationUnitUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n { unitId: string; userId: string }\n > = (props) => {\n const { unitId, userId } = props ?? {};\n\n return addOrganisationUnitUser(unitId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AddOrganisationUnitUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>\n>;\n\nexport type AddOrganisationUnitUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Adds a user to an Organisational Unit\n */\nexport const useAddOrganisationUnitUser = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useAddOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Removes a User from an Organisational Unit.\n\nUsers cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Deletes a User from an Organisational Unit\n */\nexport const deleteOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}/user/${userId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteOrganisationUnitUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnitUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n { unitId: string; userId: string }\n > = (props) => {\n const { unitId, userId } = props ?? {};\n\n return deleteOrganisationUnitUser(unitId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteOrganisationUnitUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>\n>;\n\nexport type DeleteOrganisationUnitUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes a User from an Organisational Unit\n */\nexport const useDeleteOrganisationUnitUser = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useDeleteOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,kBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ,EAC/C,QACD;;AAGH,MAAa,kCAAkC;AAC7C,QAAO,CAAC,gBAAgB;;AAG1B,MAAa,iCAGX,YA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,MAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,QAAQ,WAAW,SAAS,EAAE;AAEtC,SAAO,2BAA2B,QAAQ,QAAQ,eAAe;;AAKnE,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAc3E,MAAa,iCAIX,SASA,gBAMG;AAGH,QAAO,YAFiB,6CAA6C,QAAQ,EAEzC,YAAY"}
1
+ {"version":3,"file":"user.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n { orgId: string; userId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n { orgId: string; userId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n { unitId: string; userId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n { unitId: string; userId: string }\n >"],"sources":["../../../src/api/user/user.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.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: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { AsError, UserAccountDetail, UsersGetResponse } from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UserAccountDetail>(\n { url: `/user/account`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetUserAccountQueryKey = () => {\n return [`/user/account`] as const;\n};\n\nexport const useGetUserAccountQueryOptions = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) =>\n getUserAccount(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;\nexport type GetUserAccountQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Get information about your account\n */\n\nexport function useGetUserAccount<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetUserAccountQueryOptions(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\nexport const useGetUserAccountSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) =>\n getUserAccount(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUserAccountSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Get information about your account\n */\n\nexport function useGetUserAccountSuspense<\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetUserAccountSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Users in an Organisation.\n\nYou have to be a member of the Organisation or an admin user to use this endpoint\n\n**WARNING**: This endpoint is **DEPRECATED** and will be removed in a future release. Please use the `GET /organisation/{org_id}` endpoint instead.\n\n * @summary Gets users in an Organisation\n */\nexport const getOrganisationUsers = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/organisation/${orgId}/user`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUsersQueryKey = (orgId?: string) => {\n return [`/organisation/${orgId}/user`] as const;\n};\n\nexport const useGetOrganisationUsersQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) =>\n getOrganisationUsers(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUsers>>\n>;\nexport type GetOrganisationUsersQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets users in an Organisation\n */\n\nexport function useGetOrganisationUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetOrganisationUsersQueryOptions(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\nexport const useGetOrganisationUsersSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) =>\n getOrganisationUsers(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUsersSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUsers>>\n>;\nexport type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets users in an Organisation\n */\n\nexport function useGetOrganisationUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUsers>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetOrganisationUsersSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Adds a User to an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Adds a User to an Organisation\n */\nexport const addOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n { url: `/organisation/${orgId}/user/${userId}`, method: \"PUT\" },\n options,\n );\n};\n\nexport const useAddOrganisationUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"addOrganisationUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n { orgId: string; userId: string }\n > = (props) => {\n const { orgId, userId } = props ?? {};\n\n return addOrganisationUser(orgId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AddOrganisationUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof addOrganisationUser>>\n>;\n\nexport type AddOrganisationUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Adds a User to an Organisation\n */\nexport const useAddOrganisationUser = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof addOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useAddOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Removes a User from an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Deletes a User from an Organisation\n */\nexport const deleteOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n { url: `/organisation/${orgId}/user/${userId}`, method: \"DELETE\" },\n options,\n );\n};\n\nexport const useDeleteOrganisationUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n { orgId: string; userId: string }\n > = (props) => {\n const { orgId, userId } = props ?? {};\n\n return deleteOrganisationUser(orgId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteOrganisationUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUser>>\n>;\n\nexport type DeleteOrganisationUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes a User from an Organisation\n */\nexport const useDeleteOrganisationUser = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUser>>,\n TError,\n { orgId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useDeleteOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets users in an Organisational Unit.\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n**WARNING**: This endpoint is **DEPRECATED** and will be removed in a future release. Please use the `GET /unit/{unit_id}` endpoint instead.\n\n * @summary Gets users in an Organisational Unit\n */\nexport const getOrganisationUnitUsers = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/unit/${unitId}/user`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitUsersQueryKey = (unitId?: string) => {\n return [`/unit/${unitId}/user`] as const;\n};\n\nexport const useGetOrganisationUnitUsersQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({\n signal,\n }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n>;\nexport type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets users in an Organisational Unit\n */\n\nexport function useGetOrganisationUnitUsers<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetOrganisationUnitUsersQueryOptions(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\nexport const useGetOrganisationUnitUsersSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({\n signal,\n }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>\n>;\nexport type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets users in an Organisational Unit\n */\n\nexport function useGetOrganisationUnitUsersSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnitUsers>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetOrganisationUnitUsersSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Adds a user to an Organisational Unit.\n\nUsers cannot be added to **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Adds a user to an Organisational Unit\n */\nexport const addOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}/user/${userId}`, method: \"PUT\" }, options);\n};\n\nexport const useAddOrganisationUnitUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"addOrganisationUnitUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n { unitId: string; userId: string }\n > = (props) => {\n const { unitId, userId } = props ?? {};\n\n return addOrganisationUnitUser(unitId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AddOrganisationUnitUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>\n>;\n\nexport type AddOrganisationUnitUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Adds a user to an Organisational Unit\n */\nexport const useAddOrganisationUnitUser = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof addOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useAddOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Removes a User from an Organisational Unit.\n\nUsers cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Deletes a User from an Organisational Unit\n */\nexport const deleteOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}/user/${userId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteOrganisationUnitUserMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnitUser\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n { unitId: string; userId: string }\n > = (props) => {\n const { unitId, userId } = props ?? {};\n\n return deleteOrganisationUnitUser(unitId, userId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteOrganisationUnitUserMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>\n>;\n\nexport type DeleteOrganisationUnitUserMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes a User from an Organisational Unit\n */\nexport const useDeleteOrganisationUnitUser = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnitUser>>,\n TError,\n { unitId: string; userId: string },\n TContext\n> => {\n const mutationOptions = useDeleteOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,kBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ,EAC/C,QACD;;AAGH,MAAa,kCAAkC;AAC7C,QAAO,CAAC,gBAAgB;;AAG1B,MAAa,iCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,2BAA2B;CAEtE,MAAMA,WAAsE,EAAE,aAC5E,eAAe,gBAAgB,OAAO;AAIxC,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAgB5E,SAAgB,kBAGd,SAGyD;CACzD,MAAM,eAAe,8BAA8B,QAAQ;CAE3D,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C;;;;;AAc3E,MAAa,iCAGX,YAaG;AAGH,QAAO,YAFiB,6CAA6C,QAAQ,CAE1C"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.4.0-4-4.2174798239",
2
+ "version": "4.4.0-4-4.2194834412",
3
3
  "author": "Informatics Matters",
4
4
  "name": "@squonk/account-server-client",
5
5
  "private": false,
@@ -11,14 +11,11 @@
11
11
  "license": "MIT",
12
12
  "type": "module",
13
13
  "devDependencies": {
14
- "@tanstack/react-query": "5.90.10",
15
- "@typescript-eslint/eslint-plugin": "8.47.0",
16
- "axios": "1.13.2",
17
14
  "js-yaml": "4.1.1",
18
- "orval": "7.16.1",
19
- "prettier": "3.6.2",
15
+ "orval": "7.17.0",
16
+ "prettier": "3.7.3",
17
+ "tsdown": "0.16.8",
20
18
  "tslib": "2.8.1",
21
- "tsdown": "^0.16.6",
22
19
  "typescript": "5.9.3"
23
20
  },
24
21
  "peerDependencies": {
@@ -1,3 +1 @@
1
- onlyBuiltDependencies:
2
- - esbuild
3
- - msw
1
+ minimumReleaseAge: 2880 # in minutes (2 days)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.16.1 🍺
2
+ * Generated by orval v7.17.0 🍺
3
3
  * Do not edit manually.
4
4
  * Account Server API
5
5
  * The Informatics Matters Account Server API.
@@ -10,13 +10,8 @@ A service that provides access to the Account Server, which gives *registered* u
10
10
  */
11
11
  import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
12
12
  import type {
13
- DataTag,
14
- DefinedInitialDataOptions,
15
- DefinedUseQueryResult,
16
- QueryClient,
17
13
  QueryFunction,
18
14
  QueryKey,
19
- UndefinedInitialDataOptions,
20
15
  UseQueryOptions,
21
16
  UseQueryResult,
22
17
  UseSuspenseQueryOptions,
@@ -63,7 +58,7 @@ export const useGetActionsQueryOptions = <
63
58
  >(
64
59
  params?: GetActionsParams,
65
60
  options?: {
66
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
61
+ query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>;
67
62
  request?: SecondParameter<typeof customInstance>;
68
63
  },
69
64
  ) => {
@@ -77,62 +72,13 @@ export const useGetActionsQueryOptions = <
77
72
  const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
78
73
 
79
74
  return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData> & {
80
- queryKey: DataTag<QueryKey, TData, TError>;
75
+ queryKey: QueryKey;
81
76
  };
82
77
  };
83
78
 
84
79
  export type GetActionsQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
85
80
  export type GetActionsQueryError = ErrorType<void>;
86
81
 
87
- export function useGetActions<
88
- TData = Awaited<ReturnType<typeof getActions>>,
89
- TError = ErrorType<void>,
90
- >(
91
- params: undefined | GetActionsParams,
92
- options: {
93
- query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
94
- Pick<
95
- DefinedInitialDataOptions<
96
- Awaited<ReturnType<typeof getActions>>,
97
- TError,
98
- Awaited<ReturnType<typeof getActions>>
99
- >,
100
- "initialData"
101
- >;
102
- request?: SecondParameter<typeof customInstance>;
103
- },
104
- queryClient?: QueryClient,
105
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
106
- export function useGetActions<
107
- TData = Awaited<ReturnType<typeof getActions>>,
108
- TError = ErrorType<void>,
109
- >(
110
- params?: GetActionsParams,
111
- options?: {
112
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>> &
113
- Pick<
114
- UndefinedInitialDataOptions<
115
- Awaited<ReturnType<typeof getActions>>,
116
- TError,
117
- Awaited<ReturnType<typeof getActions>>
118
- >,
119
- "initialData"
120
- >;
121
- request?: SecondParameter<typeof customInstance>;
122
- },
123
- queryClient?: QueryClient,
124
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
125
- export function useGetActions<
126
- TData = Awaited<ReturnType<typeof getActions>>,
127
- TError = ErrorType<void>,
128
- >(
129
- params?: GetActionsParams,
130
- options?: {
131
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
132
- request?: SecondParameter<typeof customInstance>;
133
- },
134
- queryClient?: QueryClient,
135
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
136
82
  /**
137
83
  * @summary Gets Actions held on the Account Server
138
84
  */
@@ -143,16 +89,13 @@ export function useGetActions<
143
89
  >(
144
90
  params?: GetActionsParams,
145
91
  options?: {
146
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
92
+ query?: UseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>;
147
93
  request?: SecondParameter<typeof customInstance>;
148
94
  },
149
- queryClient?: QueryClient,
150
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
95
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
151
96
  const queryOptions = useGetActionsQueryOptions(params, options);
152
97
 
153
- const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
154
- queryKey: DataTag<QueryKey, TData, TError>;
155
- };
98
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
156
99
 
157
100
  query.queryKey = queryOptions.queryKey;
158
101
 
@@ -165,7 +108,7 @@ export const useGetActionsSuspenseQueryOptions = <
165
108
  >(
166
109
  params?: GetActionsParams,
167
110
  options?: {
168
- query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
111
+ query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>;
169
112
  request?: SecondParameter<typeof customInstance>;
170
113
  },
171
114
  ) => {
@@ -182,45 +125,12 @@ export const useGetActionsSuspenseQueryOptions = <
182
125
  Awaited<ReturnType<typeof getActions>>,
183
126
  TError,
184
127
  TData
185
- > & { queryKey: DataTag<QueryKey, TData, TError> };
128
+ > & { queryKey: QueryKey };
186
129
  };
187
130
 
188
131
  export type GetActionsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getActions>>>;
189
132
  export type GetActionsSuspenseQueryError = ErrorType<void>;
190
133
 
191
- export function useGetActionsSuspense<
192
- TData = Awaited<ReturnType<typeof getActions>>,
193
- TError = ErrorType<void>,
194
- >(
195
- params: undefined | GetActionsParams,
196
- options: {
197
- query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
198
- request?: SecondParameter<typeof customInstance>;
199
- },
200
- queryClient?: QueryClient,
201
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
202
- export function useGetActionsSuspense<
203
- TData = Awaited<ReturnType<typeof getActions>>,
204
- TError = ErrorType<void>,
205
- >(
206
- params?: GetActionsParams,
207
- options?: {
208
- query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
209
- request?: SecondParameter<typeof customInstance>;
210
- },
211
- queryClient?: QueryClient,
212
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
213
- export function useGetActionsSuspense<
214
- TData = Awaited<ReturnType<typeof getActions>>,
215
- TError = ErrorType<void>,
216
- >(
217
- params?: GetActionsParams,
218
- options?: {
219
- query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
220
- request?: SecondParameter<typeof customInstance>;
221
- },
222
- queryClient?: QueryClient,
223
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
224
134
  /**
225
135
  * @summary Gets Actions held on the Account Server
226
136
  */
@@ -231,17 +141,15 @@ export function useGetActionsSuspense<
231
141
  >(
232
142
  params?: GetActionsParams,
233
143
  options?: {
234
- query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>>;
144
+ query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getActions>>, TError, TData>;
235
145
  request?: SecondParameter<typeof customInstance>;
236
146
  },
237
- queryClient?: QueryClient,
238
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
147
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
239
148
  const queryOptions = useGetActionsSuspenseQueryOptions(params, options);
240
149
 
241
- const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
242
- TData,
243
- TError
244
- > & { queryKey: DataTag<QueryKey, TData, TError> };
150
+ const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
151
+ queryKey: QueryKey;
152
+ };
245
153
 
246
154
  query.queryKey = queryOptions.queryKey;
247
155
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.16.1 🍺
2
+ * Generated by orval v7.17.0 🍺
3
3
  * Do not edit manually.
4
4
  * Account Server API
5
5
  * The Informatics Matters Account Server API.