@squonk/account-server-client 4.4.0-4-4.2197467763 → 4.4.0-4-4.2200269934

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 (185) hide show
  1. package/dist/api/actions/actions.cjs +4 -4
  2. package/dist/api/actions/actions.cjs.map +1 -1
  3. package/dist/api/actions/actions.d.cts +35 -17
  4. package/dist/api/actions/actions.d.cts.map +1 -1
  5. package/dist/api/actions/actions.d.ts +35 -17
  6. package/dist/api/actions/actions.d.ts.map +1 -1
  7. package/dist/api/actions/actions.fetch.cjs +4 -4
  8. package/dist/api/actions/actions.fetch.cjs.map +1 -1
  9. package/dist/api/actions/actions.fetch.d.cts +35 -17
  10. package/dist/api/actions/actions.fetch.d.cts.map +1 -1
  11. package/dist/api/actions/actions.fetch.d.ts +35 -17
  12. package/dist/api/actions/actions.fetch.d.ts.map +1 -1
  13. package/dist/api/actions/actions.fetch.js +4 -4
  14. package/dist/api/actions/actions.fetch.js.map +1 -1
  15. package/dist/api/actions/actions.js +4 -4
  16. package/dist/api/actions/actions.js.map +1 -1
  17. package/dist/api/asset/asset.cjs +22 -22
  18. package/dist/api/asset/asset.cjs.map +1 -1
  19. package/dist/api/asset/asset.d.cts +76 -40
  20. package/dist/api/asset/asset.d.cts.map +1 -1
  21. package/dist/api/asset/asset.d.ts +76 -40
  22. package/dist/api/asset/asset.d.ts.map +1 -1
  23. package/dist/api/asset/asset.fetch.cjs +22 -22
  24. package/dist/api/asset/asset.fetch.cjs.map +1 -1
  25. package/dist/api/asset/asset.fetch.d.cts +76 -40
  26. package/dist/api/asset/asset.fetch.d.cts.map +1 -1
  27. package/dist/api/asset/asset.fetch.d.ts +76 -40
  28. package/dist/api/asset/asset.fetch.d.ts.map +1 -1
  29. package/dist/api/asset/asset.fetch.js +22 -22
  30. package/dist/api/asset/asset.fetch.js.map +1 -1
  31. package/dist/api/asset/asset.js +22 -22
  32. package/dist/api/asset/asset.js.map +1 -1
  33. package/dist/api/charges/charges.cjs +16 -16
  34. package/dist/api/charges/charges.cjs.map +1 -1
  35. package/dist/api/charges/charges.d.cts +137 -65
  36. package/dist/api/charges/charges.d.cts.map +1 -1
  37. package/dist/api/charges/charges.d.ts +137 -65
  38. package/dist/api/charges/charges.d.ts.map +1 -1
  39. package/dist/api/charges/charges.fetch.cjs +16 -16
  40. package/dist/api/charges/charges.fetch.cjs.map +1 -1
  41. package/dist/api/charges/charges.fetch.d.cts +137 -65
  42. package/dist/api/charges/charges.fetch.d.cts.map +1 -1
  43. package/dist/api/charges/charges.fetch.d.ts +137 -65
  44. package/dist/api/charges/charges.fetch.d.ts.map +1 -1
  45. package/dist/api/charges/charges.fetch.js +16 -16
  46. package/dist/api/charges/charges.fetch.js.map +1 -1
  47. package/dist/api/charges/charges.js +16 -16
  48. package/dist/api/charges/charges.js.map +1 -1
  49. package/dist/api/event-stream/event-stream.cjs +12 -12
  50. package/dist/api/event-stream/event-stream.cjs.map +1 -1
  51. package/dist/api/event-stream/event-stream.d.cts +71 -35
  52. package/dist/api/event-stream/event-stream.d.cts.map +1 -1
  53. package/dist/api/event-stream/event-stream.d.ts +71 -35
  54. package/dist/api/event-stream/event-stream.d.ts.map +1 -1
  55. package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
  56. package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
  57. package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
  58. package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
  59. package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
  60. package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
  61. package/dist/api/event-stream/event-stream.fetch.js +12 -12
  62. package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
  63. package/dist/api/event-stream/event-stream.js +12 -12
  64. package/dist/api/event-stream/event-stream.js.map +1 -1
  65. package/dist/api/merchant/merchant.cjs +8 -8
  66. package/dist/api/merchant/merchant.cjs.map +1 -1
  67. package/dist/api/merchant/merchant.d.cts +69 -33
  68. package/dist/api/merchant/merchant.d.cts.map +1 -1
  69. package/dist/api/merchant/merchant.d.ts +69 -33
  70. package/dist/api/merchant/merchant.d.ts.map +1 -1
  71. package/dist/api/merchant/merchant.fetch.cjs +8 -8
  72. package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
  73. package/dist/api/merchant/merchant.fetch.d.cts +69 -33
  74. package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
  75. package/dist/api/merchant/merchant.fetch.d.ts +69 -33
  76. package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
  77. package/dist/api/merchant/merchant.fetch.js +8 -8
  78. package/dist/api/merchant/merchant.fetch.js.map +1 -1
  79. package/dist/api/merchant/merchant.js +8 -8
  80. package/dist/api/merchant/merchant.js.map +1 -1
  81. package/dist/api/organisation/organisation.cjs +18 -18
  82. package/dist/api/organisation/organisation.cjs.map +1 -1
  83. package/dist/api/organisation/organisation.d.cts +106 -52
  84. package/dist/api/organisation/organisation.d.cts.map +1 -1
  85. package/dist/api/organisation/organisation.d.ts +106 -52
  86. package/dist/api/organisation/organisation.d.ts.map +1 -1
  87. package/dist/api/organisation/organisation.fetch.cjs +18 -18
  88. package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
  89. package/dist/api/organisation/organisation.fetch.d.cts +106 -52
  90. package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
  91. package/dist/api/organisation/organisation.fetch.d.ts +106 -52
  92. package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
  93. package/dist/api/organisation/organisation.fetch.js +18 -18
  94. package/dist/api/organisation/organisation.fetch.js.map +1 -1
  95. package/dist/api/organisation/organisation.js +18 -18
  96. package/dist/api/organisation/organisation.js.map +1 -1
  97. package/dist/api/product/product.cjs +30 -30
  98. package/dist/api/product/product.cjs.map +1 -1
  99. package/dist/api/product/product.d.cts +208 -100
  100. package/dist/api/product/product.d.cts.map +1 -1
  101. package/dist/api/product/product.d.ts +208 -100
  102. package/dist/api/product/product.d.ts.map +1 -1
  103. package/dist/api/product/product.fetch.cjs +30 -30
  104. package/dist/api/product/product.fetch.cjs.map +1 -1
  105. package/dist/api/product/product.fetch.d.cts +208 -100
  106. package/dist/api/product/product.fetch.d.cts.map +1 -1
  107. package/dist/api/product/product.fetch.d.ts +208 -100
  108. package/dist/api/product/product.fetch.d.ts.map +1 -1
  109. package/dist/api/product/product.fetch.js +30 -30
  110. package/dist/api/product/product.fetch.js.map +1 -1
  111. package/dist/api/product/product.js +30 -30
  112. package/dist/api/product/product.js.map +1 -1
  113. package/dist/api/state/state.cjs +4 -4
  114. package/dist/api/state/state.cjs.map +1 -1
  115. package/dist/api/state/state.d.cts +35 -17
  116. package/dist/api/state/state.d.cts.map +1 -1
  117. package/dist/api/state/state.d.ts +35 -17
  118. package/dist/api/state/state.d.ts.map +1 -1
  119. package/dist/api/state/state.fetch.cjs +4 -4
  120. package/dist/api/state/state.fetch.cjs.map +1 -1
  121. package/dist/api/state/state.fetch.d.cts +35 -17
  122. package/dist/api/state/state.fetch.d.cts.map +1 -1
  123. package/dist/api/state/state.fetch.d.ts +35 -17
  124. package/dist/api/state/state.fetch.d.ts.map +1 -1
  125. package/dist/api/state/state.fetch.js +4 -4
  126. package/dist/api/state/state.fetch.js.map +1 -1
  127. package/dist/api/state/state.js +4 -4
  128. package/dist/api/state/state.js.map +1 -1
  129. package/dist/api/unit/unit.cjs +30 -30
  130. package/dist/api/unit/unit.cjs.map +1 -1
  131. package/dist/api/unit/unit.d.cts +144 -72
  132. package/dist/api/unit/unit.d.cts.map +1 -1
  133. package/dist/api/unit/unit.d.ts +144 -72
  134. package/dist/api/unit/unit.d.ts.map +1 -1
  135. package/dist/api/unit/unit.fetch.cjs +30 -30
  136. package/dist/api/unit/unit.fetch.cjs.map +1 -1
  137. package/dist/api/unit/unit.fetch.d.cts +144 -72
  138. package/dist/api/unit/unit.fetch.d.cts.map +1 -1
  139. package/dist/api/unit/unit.fetch.d.ts +144 -72
  140. package/dist/api/unit/unit.fetch.d.ts.map +1 -1
  141. package/dist/api/unit/unit.fetch.js +30 -30
  142. package/dist/api/unit/unit.fetch.js.map +1 -1
  143. package/dist/api/unit/unit.js +30 -30
  144. package/dist/api/unit/unit.js.map +1 -1
  145. package/dist/api/user/user.cjs +20 -20
  146. package/dist/api/user/user.cjs.map +1 -1
  147. package/dist/api/user/user.d.cts +107 -53
  148. package/dist/api/user/user.d.cts.map +1 -1
  149. package/dist/api/user/user.d.ts +107 -53
  150. package/dist/api/user/user.d.ts.map +1 -1
  151. package/dist/api/user/user.fetch.cjs +20 -20
  152. package/dist/api/user/user.fetch.cjs.map +1 -1
  153. package/dist/api/user/user.fetch.d.cts +107 -53
  154. package/dist/api/user/user.fetch.d.cts.map +1 -1
  155. package/dist/api/user/user.fetch.d.ts +107 -53
  156. package/dist/api/user/user.fetch.d.ts.map +1 -1
  157. package/dist/api/user/user.fetch.js +20 -20
  158. package/dist/api/user/user.fetch.js.map +1 -1
  159. package/dist/api/user/user.js +20 -20
  160. package/dist/api/user/user.js.map +1 -1
  161. package/package.json +7 -5
  162. package/src/api/actions/actions.fetch.ts +103 -12
  163. package/src/api/actions/actions.ts +103 -12
  164. package/src/api/asset/asset.fetch.ts +303 -94
  165. package/src/api/asset/asset.ts +303 -94
  166. package/src/api/charges/charges.fetch.ts +456 -54
  167. package/src/api/charges/charges.ts +456 -54
  168. package/src/api/event-stream/event-stream.fetch.ts +262 -58
  169. package/src/api/event-stream/event-stream.ts +262 -58
  170. package/src/api/merchant/merchant.fetch.ts +212 -28
  171. package/src/api/merchant/merchant.ts +212 -28
  172. package/src/api/organisation/organisation.fetch.ts +381 -86
  173. package/src/api/organisation/organisation.ts +381 -86
  174. package/src/api/product/product.fetch.ts +724 -130
  175. package/src/api/product/product.ts +724 -130
  176. package/src/api/state/state.fetch.ts +105 -16
  177. package/src/api/state/state.ts +105 -16
  178. package/src/api/unit/unit.fetch.ts +521 -146
  179. package/src/api/unit/unit.ts +521 -146
  180. package/src/api/user/user.fetch.ts +401 -101
  181. package/src/api/user/user.ts +401 -101
  182. package/tests/README.md +98 -0
  183. package/tests/component.test.tsx +191 -0
  184. package/tests/tsconfig.json +7 -0
  185. package/tests/type-tests.tsx +196 -0
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.fetch.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisation>>,\n { data: OrganisationPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n { orgId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>>"],"sources":["../../../src/api/organisation/organisation.fetch.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 InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetOrganisationsParams,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse,\n} from \".././api-schemas\";\n\nimport { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets all the Organisations that you are a member of, or a specific Organisation by name.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport type getOrganisationsResponse200 = { data: OrganisationsGetResponse; status: 200 };\n\nexport type getOrganisationsResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationsResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationsResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationsResponseSuccess = getOrganisationsResponse200 & { headers: Headers };\nexport type getOrganisationsResponseError = (\n | getOrganisationsResponse401\n | getOrganisationsResponse403\n | getOrganisationsResponse404\n) & { headers: Headers };\n\nexport type getOrganisationsResponse =\n | getOrganisationsResponseSuccess\n | getOrganisationsResponseError;\n\nexport const getGetOrganisationsUrl = (params?: GetOrganisationsParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/organisation?${stringifiedParams}` : `/organisation`;\n};\n\nexport const getOrganisations = async (\n params?: GetOrganisationsParams,\n options?: RequestInit,\n): Promise<getOrganisationsResponse> => {\n return customFetch<getOrganisationsResponse>(getGetOrganisationsUrl(params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationsQueryKey = (params?: GetOrganisationsParams) => {\n return [\"account-server\", \"organisation\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationsQueryOptions(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 * @summary Gets Organisations\n */\nexport const invalidateGetOrganisations = async (\n queryClient: QueryClient,\n params?: GetOrganisationsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisations>>\n>;\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, 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 * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport type createOrganisationResponse201 = { data: OrganisationPostResponse; status: 201 };\n\nexport type createOrganisationResponse400 = { data: AsError; status: 400 };\n\nexport type createOrganisationResponse401 = { data: void; status: 401 };\n\nexport type createOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type createOrganisationResponseSuccess = createOrganisationResponse201 & {\n headers: Headers;\n};\nexport type createOrganisationResponseError = (\n | createOrganisationResponse400\n | createOrganisationResponse401\n | createOrganisationResponse403\n) & { headers: Headers };\n\nexport type createOrganisationResponse =\n | createOrganisationResponseSuccess\n | createOrganisationResponseError;\n\nexport const getCreateOrganisationUrl = () => {\n return `/organisation`;\n};\n\nexport const createOrganisation = async (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: RequestInit,\n): Promise<createOrganisationResponse> => {\n return customFetch<createOrganisationResponse>(getCreateOrganisationUrl(), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationPostBodyBody),\n });\n};\n\nexport const getCreateOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisation\"];\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 createOrganisation>>,\n { data: OrganisationPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createOrganisation(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisation>>\n>;\nexport type CreateOrganisationMutationBody = OrganisationPostBodyBody;\nexport type CreateOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport type getOrganisationResponse200 = { data: OrganisationAllDetail; status: 200 };\n\nexport type getOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationResponseSuccess = getOrganisationResponse200 & { headers: Headers };\nexport type getOrganisationResponseError = (\n | getOrganisationResponse401\n | getOrganisationResponse403\n | getOrganisationResponse404\n) & { headers: Headers };\n\nexport type getOrganisationResponse = getOrganisationResponseSuccess | getOrganisationResponseError;\n\nexport const getGetOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const getOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getOrganisationResponse> => {\n return customFetch<getOrganisationResponse>(getGetOrganisationUrl(orgId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId] as const;\n};\n\nexport const getGetOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;\nexport type GetOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationQueryOptions(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 * @summary Gets an Organisation\n */\nexport const invalidateGetOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationQueryKey(orgId) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisation>>\n>;\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationSuspenseQueryOptions(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 * Used to update existing Organisation. You can change an Organisation's **name** or its **default_product_privacy**.\n\nChanges to the default product privacy may conflict with those settings in any existing Units where the default product privacy of those existing units will be honoured. Any new Organisation value will only apply to new Units.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport type patchOrganisationResponse200 = { data: void; status: 200 };\n\nexport type patchOrganisationResponse401 = { data: void; status: 401 };\n\nexport type patchOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type patchOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type patchOrganisationResponseSuccess = patchOrganisationResponse200 & { headers: Headers };\nexport type patchOrganisationResponseError = (\n | patchOrganisationResponse401\n | patchOrganisationResponse403\n | patchOrganisationResponse404\n) & { headers: Headers };\n\nexport type patchOrganisationResponse =\n | patchOrganisationResponseSuccess\n | patchOrganisationResponseError;\n\nexport const getPatchOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const patchOrganisation = async (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: RequestInit,\n): Promise<patchOrganisationResponse> => {\n return customFetch<patchOrganisationResponse>(getPatchOrganisationUrl(orgId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationPatchBodyBody),\n });\n};\n\nexport const getPatchOrganisationMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchOrganisation\"];\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 patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return patchOrganisation(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchOrganisation>>\n>;\nexport type PatchOrganisationMutationBody = OrganisationPatchBodyBody;\nexport type PatchOrganisationMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport type deleteOrganisationResponse204 = { data: void; status: 204 };\n\nexport type deleteOrganisationResponse400 = { data: AsError; status: 400 };\n\nexport type deleteOrganisationResponse401 = { data: void; status: 401 };\n\nexport type deleteOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type deleteOrganisationResponseSuccess = deleteOrganisationResponse204 & {\n headers: Headers;\n};\nexport type deleteOrganisationResponseError = (\n | deleteOrganisationResponse400\n | deleteOrganisationResponse401\n | deleteOrganisationResponse403\n) & { headers: Headers };\n\nexport type deleteOrganisationResponse =\n | deleteOrganisationResponseSuccess\n | deleteOrganisationResponseError;\n\nexport const getDeleteOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const deleteOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<deleteOrganisationResponse> => {\n return customFetch<deleteOrganisationResponse>(getDeleteOrganisationUrl(orgId), {\n ...options,\n method: \"DELETE\",\n });\n};\n\nexport const getDeleteOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisation\"];\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 deleteOrganisation>>,\n { orgId: string }\n > = (props) => {\n const { orgId } = props ?? {};\n\n return deleteOrganisation(orgId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisation>>\n>;\n\nexport type DeleteOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport type getDefaultOrganisationResponse200 = {\n data: OrganisationGetDefaultResponse;\n status: 200;\n};\n\nexport type getDefaultOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getDefaultOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getDefaultOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getDefaultOrganisationResponseSuccess = getDefaultOrganisationResponse200 & {\n headers: Headers;\n};\nexport type getDefaultOrganisationResponseError = (\n | getDefaultOrganisationResponse401\n | getDefaultOrganisationResponse403\n | getDefaultOrganisationResponse404\n) & { headers: Headers };\n\nexport type getDefaultOrganisationResponse =\n | getDefaultOrganisationResponseSuccess\n | getDefaultOrganisationResponseError;\n\nexport const getGetDefaultOrganisationUrl = () => {\n return `/default/organisation`;\n};\n\nexport const getDefaultOrganisation = async (\n options?: RequestInit,\n): Promise<getDefaultOrganisationResponse> => {\n return customFetch<getDefaultOrganisationResponse>(getGetDefaultOrganisationUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server\", \"default\", \"organisation\"] as const;\n};\n\nexport const getGetDefaultOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetDefaultOrganisationQueryOptions(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 * @summary Gets the Default Organisation\n */\nexport const invalidateGetDefaultOrganisation = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetDefaultOrganisationQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(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"],"mappings":";;;;;;;;;;;;;;AAmEA,MAAa,0BAA0B,WAAoC;CACzE,MAAM,mBAAmB,IAAI,iBAAiB;AAE9C,QAAO,QAAQ,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;AACrD,MAAI,UAAU,OACZ,kBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,MAA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Ac,YAAY,mCAAmC;CAE9E,MAAMC,WAA8E,EAAE,aACpF,uBAAuB;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEvD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAgB/C,SAAgB,0BAGd,SAGyD;CACzD,MAAM,eAAe,sCAAsC,QAAQ;CAEnE,MAAM,QAAQ,SAAS,aAAa;AAEpC,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,mCAAmC,OAC9C,aACA,YACyB;AACzB,OAAM,YAAY,kBAAkB,EAAE,UAAU,mCAAmC,EAAE,EAAE,QAAQ;AAE/F,QAAO;;AAGT,MAAa,iDAGX,YAOI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,mCAAmC;CAE9E,MAAMA,WAA8E,EAAE,aACpF,uBAAuB;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEvD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAgB/C,SAAgB,kCAGd,SAOiE;CACjE,MAAM,eAAe,8CAA8C,QAAQ;CAE3E,MAAM,QAAQ,iBAAiB,aAAa;AAI5C,OAAM,WAAW,aAAa;AAE9B,QAAO"}
1
+ {"version":3,"file":"organisation.fetch.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisation>>,\n { data: OrganisationPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n { orgId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>>"],"sources":["../../../src/api/organisation/organisation.fetch.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 DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n InvalidateOptions,\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 {\n AsError,\n GetOrganisationsParams,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse,\n} from \".././api-schemas\";\n\nimport { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets all the Organisations that you are a member of, or a specific Organisation by name.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport type getOrganisationsResponse200 = { data: OrganisationsGetResponse; status: 200 };\n\nexport type getOrganisationsResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationsResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationsResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationsResponseSuccess = getOrganisationsResponse200 & { headers: Headers };\nexport type getOrganisationsResponseError = (\n | getOrganisationsResponse401\n | getOrganisationsResponse403\n | getOrganisationsResponse404\n) & { headers: Headers };\n\nexport type getOrganisationsResponse =\n | getOrganisationsResponseSuccess\n | getOrganisationsResponseError;\n\nexport const getGetOrganisationsUrl = (params?: GetOrganisationsParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/organisation?${stringifiedParams}` : `/organisation`;\n};\n\nexport const getOrganisations = async (\n params?: GetOrganisationsParams,\n options?: RequestInit,\n): Promise<getOrganisationsResponse> => {\n return customFetch<getOrganisationsResponse>(getGetOrganisationsUrl(params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationsQueryKey = (params?: GetOrganisationsParams) => {\n return [\"account-server\", \"organisation\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetOrganisationsParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n Awaited<ReturnType<typeof getOrganisations>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n Awaited<ReturnType<typeof getOrganisations>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationsQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisations\n */\nexport const invalidateGetOrganisations = async (\n queryClient: QueryClient,\n params?: GetOrganisationsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisations>>\n>;\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetOrganisationsParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport type createOrganisationResponse201 = { data: OrganisationPostResponse; status: 201 };\n\nexport type createOrganisationResponse400 = { data: AsError; status: 400 };\n\nexport type createOrganisationResponse401 = { data: void; status: 401 };\n\nexport type createOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type createOrganisationResponseSuccess = createOrganisationResponse201 & {\n headers: Headers;\n};\nexport type createOrganisationResponseError = (\n | createOrganisationResponse400\n | createOrganisationResponse401\n | createOrganisationResponse403\n) & { headers: Headers };\n\nexport type createOrganisationResponse =\n | createOrganisationResponseSuccess\n | createOrganisationResponseError;\n\nexport const getCreateOrganisationUrl = () => {\n return `/organisation`;\n};\n\nexport const createOrganisation = async (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: RequestInit,\n): Promise<createOrganisationResponse> => {\n return customFetch<createOrganisationResponse>(getCreateOrganisationUrl(), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationPostBodyBody),\n });\n};\n\nexport const getCreateOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisation\"];\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 createOrganisation>>,\n { data: OrganisationPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createOrganisation(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisation>>\n>;\nexport type CreateOrganisationMutationBody = OrganisationPostBodyBody;\nexport type CreateOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport type getOrganisationResponse200 = { data: OrganisationAllDetail; status: 200 };\n\nexport type getOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationResponseSuccess = getOrganisationResponse200 & { headers: Headers };\nexport type getOrganisationResponseError = (\n | getOrganisationResponse401\n | getOrganisationResponse403\n | getOrganisationResponse404\n) & { headers: Headers };\n\nexport type getOrganisationResponse = getOrganisationResponseSuccess | getOrganisationResponseError;\n\nexport const getGetOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const getOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getOrganisationResponse> => {\n return customFetch<getOrganisationResponse>(getGetOrganisationUrl(orgId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId] as const;\n};\n\nexport const getGetOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;\nexport type GetOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisation\n */\nexport const invalidateGetOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationQueryKey(orgId) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisation>>\n>;\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Organisation. You can change an Organisation's **name** or its **default_product_privacy**.\n\nChanges to the default product privacy may conflict with those settings in any existing Units where the default product privacy of those existing units will be honoured. Any new Organisation value will only apply to new Units.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport type patchOrganisationResponse200 = { data: void; status: 200 };\n\nexport type patchOrganisationResponse401 = { data: void; status: 401 };\n\nexport type patchOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type patchOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type patchOrganisationResponseSuccess = patchOrganisationResponse200 & { headers: Headers };\nexport type patchOrganisationResponseError = (\n | patchOrganisationResponse401\n | patchOrganisationResponse403\n | patchOrganisationResponse404\n) & { headers: Headers };\n\nexport type patchOrganisationResponse =\n | patchOrganisationResponseSuccess\n | patchOrganisationResponseError;\n\nexport const getPatchOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const patchOrganisation = async (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: RequestInit,\n): Promise<patchOrganisationResponse> => {\n return customFetch<patchOrganisationResponse>(getPatchOrganisationUrl(orgId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationPatchBodyBody),\n });\n};\n\nexport const getPatchOrganisationMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchOrganisation\"];\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 patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return patchOrganisation(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchOrganisation>>\n>;\nexport type PatchOrganisationMutationBody = OrganisationPatchBodyBody;\nexport type PatchOrganisationMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport type deleteOrganisationResponse204 = { data: void; status: 204 };\n\nexport type deleteOrganisationResponse400 = { data: AsError; status: 400 };\n\nexport type deleteOrganisationResponse401 = { data: void; status: 401 };\n\nexport type deleteOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type deleteOrganisationResponseSuccess = deleteOrganisationResponse204 & {\n headers: Headers;\n};\nexport type deleteOrganisationResponseError = (\n | deleteOrganisationResponse400\n | deleteOrganisationResponse401\n | deleteOrganisationResponse403\n) & { headers: Headers };\n\nexport type deleteOrganisationResponse =\n | deleteOrganisationResponseSuccess\n | deleteOrganisationResponseError;\n\nexport const getDeleteOrganisationUrl = (orgId: string) => {\n return `/organisation/${orgId}`;\n};\n\nexport const deleteOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<deleteOrganisationResponse> => {\n return customFetch<deleteOrganisationResponse>(getDeleteOrganisationUrl(orgId), {\n ...options,\n method: \"DELETE\",\n });\n};\n\nexport const getDeleteOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisation\"];\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 deleteOrganisation>>,\n { orgId: string }\n > = (props) => {\n const { orgId } = props ?? {};\n\n return deleteOrganisation(orgId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisation>>\n>;\n\nexport type DeleteOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport type getDefaultOrganisationResponse200 = {\n data: OrganisationGetDefaultResponse;\n status: 200;\n};\n\nexport type getDefaultOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getDefaultOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getDefaultOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getDefaultOrganisationResponseSuccess = getDefaultOrganisationResponse200 & {\n headers: Headers;\n};\nexport type getDefaultOrganisationResponseError = (\n | getDefaultOrganisationResponse401\n | getDefaultOrganisationResponse403\n | getDefaultOrganisationResponse404\n) & { headers: Headers };\n\nexport type getDefaultOrganisationResponse =\n | getDefaultOrganisationResponseSuccess\n | getDefaultOrganisationResponseError;\n\nexport const getGetDefaultOrganisationUrl = () => {\n return `/default/organisation`;\n};\n\nexport const getDefaultOrganisation = async (\n options?: RequestInit,\n): Promise<getDefaultOrganisationResponse> => {\n return customFetch<getDefaultOrganisationResponse>(getGetDefaultOrganisationUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server\", \"default\", \"organisation\"] as const;\n};\n\nexport const getGetDefaultOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetDefaultOrganisationQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const invalidateGetDefaultOrganisation = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetDefaultOrganisationQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;;;;;;;AAuEA,MAAa,0BAA0B,WAAoC;CACzE,MAAM,mBAAmB,IAAI,iBAAiB;AAE9C,QAAO,QAAQ,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;AACrD,MAAI,UAAU,OACZ,kBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,MAAM,UAAU,CAAC;GAE1E;CAEF,MAAM,oBAAoB,iBAAiB,UAAU;AAErD,QAAO,kBAAkB,SAAS,IAAI,iBAAiB,sBAAsB;;AAG/E,MAAa,mBAAmB,OAC9B,QACA,YACsC;AACtC,QAAO,YAAsC,uBAAuB,OAAO,EAAE;EAC3E,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,MAAa,+BAA+B,WAAoC;AAC9E,QAAO;EAAC;EAAkB;EAAgB,GAAI,SAAS,CAAC,OAAO,GAAG,EAAE;EAAE;;AAGxE,MAAa,mCAIX,QACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B,OAAO;CAE9E,MAAMA,WAAwE,EAAE,aAC9E,iBAAiB,QAAQ;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEzD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AA+D/C,SAAgB,oBAId,QACA,SAIA,aACwE;CACxE,MAAM,eAAe,gCAAgC,QAAQ,QAAQ;CAErE,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,6BAA6B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MAAM,eAAe,8CAA8C,QAAQ;CAE3E,MAAM,QAAQ,iBAAiB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO"}
@@ -47,9 +47,9 @@ const getGetOrganisationsQueryOptions = (params, options) => {
47
47
  /**
48
48
  * @summary Gets Organisations
49
49
  */
50
- function useGetOrganisations(params, options) {
50
+ function useGetOrganisations(params, options, queryClient) {
51
51
  const queryOptions = getGetOrganisationsQueryOptions(params, options);
52
- const query = useQuery(queryOptions);
52
+ const query = useQuery(queryOptions, queryClient);
53
53
  query.queryKey = queryOptions.queryKey;
54
54
  return query;
55
55
  }
@@ -73,9 +73,9 @@ const getGetOrganisationsSuspenseQueryOptions = (params, options) => {
73
73
  /**
74
74
  * @summary Gets Organisations
75
75
  */
76
- function useGetOrganisationsSuspense(params, options) {
76
+ function useGetOrganisationsSuspense(params, options, queryClient) {
77
77
  const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, options);
78
- const query = useSuspenseQuery(queryOptions);
78
+ const query = useSuspenseQuery(queryOptions, queryClient);
79
79
  query.queryKey = queryOptions.queryKey;
80
80
  return query;
81
81
  }
@@ -121,8 +121,8 @@ const getCreateOrganisationMutationOptions = (options) => {
121
121
  /**
122
122
  * @summary Create a new organisation
123
123
  */
124
- const useCreateOrganisation = (options) => {
125
- return useMutation(getCreateOrganisationMutationOptions(options));
124
+ const useCreateOrganisation = (options, queryClient) => {
125
+ return useMutation(getCreateOrganisationMutationOptions(options), queryClient);
126
126
  };
127
127
  /**
128
128
  * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.
@@ -159,9 +159,9 @@ const getGetOrganisationQueryOptions = (orgId, options) => {
159
159
  /**
160
160
  * @summary Gets an Organisation
161
161
  */
162
- function useGetOrganisation(orgId, options) {
162
+ function useGetOrganisation(orgId, options, queryClient) {
163
163
  const queryOptions = getGetOrganisationQueryOptions(orgId, options);
164
- const query = useQuery(queryOptions);
164
+ const query = useQuery(queryOptions, queryClient);
165
165
  query.queryKey = queryOptions.queryKey;
166
166
  return query;
167
167
  }
@@ -185,9 +185,9 @@ const getGetOrganisationSuspenseQueryOptions = (orgId, options) => {
185
185
  /**
186
186
  * @summary Gets an Organisation
187
187
  */
188
- function useGetOrganisationSuspense(orgId, options) {
188
+ function useGetOrganisationSuspense(orgId, options, queryClient) {
189
189
  const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId, options);
190
- const query = useSuspenseQuery(queryOptions);
190
+ const query = useSuspenseQuery(queryOptions, queryClient);
191
191
  query.queryKey = queryOptions.queryKey;
192
192
  return query;
193
193
  }
@@ -232,8 +232,8 @@ const getPatchOrganisationMutationOptions = (options) => {
232
232
  /**
233
233
  * @summary Adjust an existing Organisation
234
234
  */
235
- const usePatchOrganisation = (options) => {
236
- return useMutation(getPatchOrganisationMutationOptions(options));
235
+ const usePatchOrganisation = (options, queryClient) => {
236
+ return useMutation(getPatchOrganisationMutationOptions(options), queryClient);
237
237
  };
238
238
  /**
239
239
  * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.
@@ -272,8 +272,8 @@ const getDeleteOrganisationMutationOptions = (options) => {
272
272
  /**
273
273
  * @summary Deletes an Organisation
274
274
  */
275
- const useDeleteOrganisation = (options) => {
276
- return useMutation(getDeleteOrganisationMutationOptions(options));
275
+ const useDeleteOrganisation = (options, queryClient) => {
276
+ return useMutation(getDeleteOrganisationMutationOptions(options), queryClient);
277
277
  };
278
278
  /**
279
279
  * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.
@@ -309,9 +309,9 @@ const getGetDefaultOrganisationQueryOptions = (options) => {
309
309
  /**
310
310
  * @summary Gets the Default Organisation
311
311
  */
312
- function useGetDefaultOrganisation(options) {
312
+ function useGetDefaultOrganisation(options, queryClient) {
313
313
  const queryOptions = getGetDefaultOrganisationQueryOptions(options);
314
- const query = useQuery(queryOptions);
314
+ const query = useQuery(queryOptions, queryClient);
315
315
  query.queryKey = queryOptions.queryKey;
316
316
  return query;
317
317
  }
@@ -335,9 +335,9 @@ const getGetDefaultOrganisationSuspenseQueryOptions = (options) => {
335
335
  /**
336
336
  * @summary Gets the Default Organisation
337
337
  */
338
- function useGetDefaultOrganisationSuspense(options) {
338
+ function useGetDefaultOrganisationSuspense(options, queryClient) {
339
339
  const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options);
340
- const query = useSuspenseQuery(queryOptions);
340
+ const query = useSuspenseQuery(queryOptions, queryClient);
341
341
  query.queryKey = queryOptions.queryKey;
342
342
  return query;
343
343
  }
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisation>>,\n { data: OrganisationPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n { orgId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>>"],"sources":["../../../src/api/organisation/organisation.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 InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetOrganisationsParams,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets all the Organisations that you are a member of, or a specific Organisation by name.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n params?: GetOrganisationsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationsGetResponse>(\n { url: `/organisation`, method: \"GET\", params, signal },\n options,\n );\n};\n\nexport const getGetOrganisationsQueryKey = (params?: GetOrganisationsParams) => {\n return [\"account-server\", \"organisation\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationsQueryOptions(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 * @summary Gets Organisations\n */\nexport const invalidateGetOrganisations = async (\n queryClient: QueryClient,\n params?: GetOrganisationsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisations>>\n>;\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, 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 * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationPostResponse>(\n {\n url: `/organisation`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisation\"];\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 createOrganisation>>,\n { data: OrganisationPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createOrganisation(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisation>>\n>;\nexport type CreateOrganisationMutationBody = OrganisationPostBodyBody;\nexport type CreateOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationAllDetail>(\n { url: `/organisation/${orgId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId] as const;\n};\n\nexport const getGetOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;\nexport type GetOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationQueryOptions(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 * @summary Gets an Organisation\n */\nexport const invalidateGetOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationQueryKey(orgId) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisation>>\n>;\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationSuspenseQueryOptions(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 * Used to update existing Organisation. You can change an Organisation's **name** or its **default_product_privacy**.\n\nChanges to the default product privacy may conflict with those settings in any existing Units where the default product privacy of those existing units will be honoured. Any new Organisation value will only apply to new Units.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/organisation/${orgId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchOrganisationMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchOrganisation\"];\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 patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return patchOrganisation(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchOrganisation>>\n>;\nexport type PatchOrganisationMutationBody = OrganisationPatchBodyBody;\nexport type PatchOrganisationMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/organisation/${orgId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisation\"];\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 deleteOrganisation>>,\n { orgId: string }\n > = (props) => {\n const { orgId } = props ?? {};\n\n return deleteOrganisation(orgId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisation>>\n>;\n\nexport type DeleteOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationGetDefaultResponse>(\n { url: `/default/organisation`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server\", \"default\", \"organisation\"] as const;\n};\n\nexport const getGetDefaultOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetDefaultOrganisationQueryOptions(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 * @summary Gets the Default Organisation\n */\nexport const invalidateGetDefaultOrganisation = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetDefaultOrganisationQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,oBACX,QACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ;EAAQ,EACvD,QACD;;AAGH,MAAa,+BAA+B,WAAoC;AAC9E,QAAO;EAAC;EAAkB;EAAgB,GAAI,SAAS,CAAC,OAAO,GAAG,EAAE;EAAE;;AAGxE,MAAa,mCAIX,QACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM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awaited<ReturnType<typeof createOrganisation>>,\n { data: OrganisationPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n { orgId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>>"],"sources":["../../../src/api/organisation/organisation.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 DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n InvalidateOptions,\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 {\n AsError,\n GetOrganisationsParams,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets all the Organisations that you are a member of, or a specific Organisation by name.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n params?: GetOrganisationsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationsGetResponse>(\n { url: `/organisation`, method: \"GET\", params, signal },\n options,\n );\n};\n\nexport const getGetOrganisationsQueryKey = (params?: GetOrganisationsParams) => {\n return [\"account-server\", \"organisation\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetOrganisationsParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n Awaited<ReturnType<typeof getOrganisations>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n Awaited<ReturnType<typeof getOrganisations>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisations<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationsQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisations\n */\nexport const invalidateGetOrganisations = async (\n queryClient: QueryClient,\n params?: GetOrganisationsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) =>\n getOrganisations(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisations>>\n>;\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetOrganisationsParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisationsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisations>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetOrganisationsParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationPostResponse>(\n {\n url: `/organisation`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisation\"];\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 createOrganisation>>,\n { data: OrganisationPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createOrganisation(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisation>>\n>;\nexport type CreateOrganisationMutationBody = OrganisationPostBodyBody;\nexport type CreateOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n { data: OrganisationPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationAllDetail>(\n { url: `/organisation/${orgId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId] as const;\n};\n\nexport const getGetOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;\nexport type GetOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisation<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisation\n */\nexport const invalidateGetOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetOrganisationQueryKey(orgId) }, options);\n\n return queryClient;\n};\n\nexport const getGetOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) =>\n getOrganisation(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisation>>\n>;\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisation\n */\n\nexport function useGetOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Organisation. You can change an Organisation's **name** or its **default_product_privacy**.\n\nChanges to the default product privacy may conflict with those settings in any existing Units where the default product privacy of those existing units will be honoured. Any new Organisation value will only apply to new Units.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/organisation/${orgId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchOrganisationMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchOrganisation\"];\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 patchOrganisation>>,\n { orgId: string; data: OrganisationPatchBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return patchOrganisation(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchOrganisation>>\n>;\nexport type PatchOrganisationMutationBody = OrganisationPatchBodyBody;\nexport type PatchOrganisationMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n { orgId: string; data: OrganisationPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/organisation/${orgId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisation\"];\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 deleteOrganisation>>,\n { orgId: string }\n > = (props) => {\n const { orgId } = props ?? {};\n\n return deleteOrganisation(orgId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisation>>\n>;\n\nexport type DeleteOrganisationMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n { orgId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationGetDefaultResponse>(\n { url: `/default/organisation`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server\", \"default\", \"organisation\"] as const;\n};\n\nexport const getGetDefaultOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisation<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetDefaultOrganisationQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const invalidateGetDefaultOrganisation = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetDefaultOrganisationQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) =>\n getDefaultOrganisation(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDefaultOrganisation>>\n>;\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets the Default Organisation\n */\n\nexport function useGetDefaultOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoDA,MAAa,oBACX,QACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ;EAAQ,EACvD,QACD;;AAGH,MAAa,+BAA+B,WAAoC;AAC9E,QAAO;EAAC;EAAkB;EAAgB,GAAI,SAAS,CAAC,OAAO,GAAG,EAAE;EAAE;;AAGxE,MAAa,mCAIX,QACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B,OAAO;CAE9E,MAAMA,WAAwE,EAAE,aAC9E,iBAAiB,QAAQ,gBAAgB,OAAO;AAElD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AA+D/C,SAAgB,oBAId,QACA,SAIA,aACwE;CACxE,MAAM,eAAe,gCAAgC,QAAQ,QAAQ;CAErE,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,6BAA6B,OACxC,aACA,QACA,YACyB;AACzB,OAAM,YAAY,kBAAkB,EAAE,UAAU,4BAA4B,OAAO,EAAE,EAAE,QAAQ;AAE/F,QAAO;;AAGT,MAAa,2CAIX,QACA,YAMG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B,OAAO;CAE9E,MAAMA,WAAwE,EAAE,aAC9E,iBAAiB,QAAQ,gBAAgB,OAAO;AA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