@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":"product.fetch.cjs","names":["customFetch","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProduct>>,\n { productId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n >"],"sources":["../../../src/api/product/product.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 ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse,\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 Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport type getProductTypesResponse200 = { data: ProductsGetTypesResponse; status: 200 };\n\nexport type getProductTypesResponse400 = { data: AsError; status: 400 };\n\nexport type getProductTypesResponse401 = { data: void; status: 401 };\n\nexport type getProductTypesResponse403 = { data: AsError; status: 403 };\n\nexport type getProductTypesResponseSuccess = getProductTypesResponse200 & { headers: Headers };\nexport type getProductTypesResponseError = (\n | getProductTypesResponse400\n | getProductTypesResponse401\n | getProductTypesResponse403\n) & { headers: Headers };\n\nexport type getProductTypesResponse = getProductTypesResponseSuccess | getProductTypesResponseError;\n\nexport const getGetProductTypesUrl = () => {\n return `/product-type`;\n};\n\nexport const getProductTypes = async (options?: RequestInit): Promise<getProductTypesResponse> => {\n return customFetch<getProductTypesResponse>(getGetProductTypesUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductTypesQueryKey = () => {\n return [\"account-server\", \"product-type\"] as const;\n};\n\nexport const getGetProductTypesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;\nexport type GetProductTypesQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductTypesQueryOptions(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 all Product Types\n */\nexport const invalidateGetProductTypes = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductTypesQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetProductTypesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductTypes>>\n>;\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductTypesSuspenseQueryOptions(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 * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport type getProductDefaultStorageCostResponse200 = {\n data: ProductsGetDefaultStorageCost;\n status: 200;\n};\n\nexport type getProductDefaultStorageCostResponse400 = { data: AsError; status: 400 };\n\nexport type getProductDefaultStorageCostResponse401 = { data: void; status: 401 };\n\nexport type getProductDefaultStorageCostResponse403 = { data: AsError; status: 403 };\n\nexport type getProductDefaultStorageCostResponseSuccess =\n getProductDefaultStorageCostResponse200 & { headers: Headers };\nexport type getProductDefaultStorageCostResponseError = (\n | getProductDefaultStorageCostResponse400\n | getProductDefaultStorageCostResponse401\n | getProductDefaultStorageCostResponse403\n) & { headers: Headers };\n\nexport type getProductDefaultStorageCostResponse =\n | getProductDefaultStorageCostResponseSuccess\n | getProductDefaultStorageCostResponseError;\n\nexport const getGetProductDefaultStorageCostUrl = () => {\n return `/product-default-storage-cost`;\n};\n\nexport const getProductDefaultStorageCost = async (\n options?: RequestInit,\n): Promise<getProductDefaultStorageCostResponse> => {\n return customFetch<getProductDefaultStorageCostResponse>(getGetProductDefaultStorageCostUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [\"account-server\", \"product-default-storage-cost\"] as const;\n};\n\nexport const getGetProductDefaultStorageCostQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductDefaultStorageCostQueryOptions(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 cross-product storage cost\n */\nexport const invalidateGetProductDefaultStorageCost = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductDefaultStorageCostQueryKey() },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductDefaultStorageCostSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport type getProductsResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsResponse400 = { data: AsError; status: 400 };\n\nexport type getProductsResponse401 = { data: void; status: 401 };\n\nexport type getProductsResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsResponseSuccess = getProductsResponse200 & { headers: Headers };\nexport type getProductsResponseError = (\n | getProductsResponse400\n | getProductsResponse401\n | getProductsResponse403\n) & { headers: Headers };\n\nexport type getProductsResponse = getProductsResponseSuccess | getProductsResponseError;\n\nexport const getGetProductsUrl = () => {\n return `/product`;\n};\n\nexport const getProducts = async (options?: RequestInit): Promise<getProductsResponse> => {\n return customFetch<getProductsResponse>(getGetProductsUrl(), { ...options, method: \"GET\" });\n};\n\nexport const getGetProductsQueryKey = () => {\n return [\"account-server\", \"product\"] as const;\n};\n\nexport const getGetProductsQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsQueryOptions(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 all Products\n */\nexport const invalidateGetProducts = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductsQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetProductsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport type getProductsForOrganisationResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsForOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getProductsForOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsForOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getProductsForOrganisationResponseSuccess = getProductsForOrganisationResponse200 & {\n headers: Headers;\n};\nexport type getProductsForOrganisationResponseError = (\n | getProductsForOrganisationResponse401\n | getProductsForOrganisationResponse403\n | getProductsForOrganisationResponse404\n) & { headers: Headers };\n\nexport type getProductsForOrganisationResponse =\n | getProductsForOrganisationResponseSuccess\n | getProductsForOrganisationResponseError;\n\nexport const getGetProductsForOrganisationUrl = (orgId: string) => {\n return `/product/organisation/${orgId}`;\n};\n\nexport const getProductsForOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getProductsForOrganisationResponse> => {\n return customFetch<getProductsForOrganisationResponse>(getGetProductsForOrganisationUrl(orgId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductsForOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"product\", \"organisation\", orgId] as const;\n};\n\nexport const getGetProductsForOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsForOrganisationQueryOptions(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 Products for an Organisation\n */\nexport const invalidateGetProductsForOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductsForOrganisationQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductsForOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(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 * Products are **Subscriptions** that you create in a **Unit** that allow you to use services provided by a **Merchant**. To create products you need to be a member of the **Unit** or the Unit's **Organisation**.\n\nSupported subscription **types** include `DATA_MANAGER_STORAGE_SUBSCRIPTION`, and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nThe `DATA_MANAGER_STORAGE_SUBSCRIPTION` **type** needs a **name**, an **allowance**, and an optional **limit** (that cannot be less than the **allowance**). If no **limit** is provided the **allowance** is used.\n\nThe `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` **type** needs a **name**, and a **flavour**. The **flavour**, a string, should typically be one of `EVALUATION`, `BRONZE`, `SILVER` or `GOLD`.\n\nUsers who are **Evaluators** can only create products in their Personal Unit, and where products support flavours, are restricted to `EVALUATION` flavours .\n\n * @summary Creates a Product for a Unit\n */\nexport type createUnitProductResponse201 = { data: UnitProductPostResponse; status: 201 };\n\nexport type createUnitProductResponse400 = { data: AsError; status: 400 };\n\nexport type createUnitProductResponse401 = { data: void; status: 401 };\n\nexport type createUnitProductResponse403 = { data: AsError; status: 403 };\n\nexport type createUnitProductResponseSuccess = createUnitProductResponse201 & { headers: Headers };\nexport type createUnitProductResponseError = (\n | createUnitProductResponse400\n | createUnitProductResponse401\n | createUnitProductResponse403\n) & { headers: Headers };\n\nexport type createUnitProductResponse =\n | createUnitProductResponseSuccess\n | createUnitProductResponseError;\n\nexport const getCreateUnitProductUrl = (unitId: string) => {\n return `/product/unit/${unitId}`;\n};\n\nexport const createUnitProduct = async (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: RequestInit,\n): Promise<createUnitProductResponse> => {\n return customFetch<createUnitProductResponse>(getCreateUnitProductUrl(unitId), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(unitProductPostBodyBody),\n });\n};\n\nexport const getCreateUnitProductMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createUnitProduct\"];\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 createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return createUnitProduct(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateUnitProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof createUnitProduct>>\n>;\nexport type CreateUnitProductMutationBody = UnitProductPostBodyBody;\nexport type CreateUnitProductMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Creates a Product for a Unit\n */\nexport const useCreateUnitProduct = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport type getProductsForUnitResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsForUnitResponse401 = { data: void; status: 401 };\n\nexport type getProductsForUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsForUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getProductsForUnitResponseSuccess = getProductsForUnitResponse200 & {\n headers: Headers;\n};\nexport type getProductsForUnitResponseError = (\n | getProductsForUnitResponse401\n | getProductsForUnitResponse403\n | getProductsForUnitResponse404\n) & { headers: Headers };\n\nexport type getProductsForUnitResponse =\n | getProductsForUnitResponseSuccess\n | getProductsForUnitResponseError;\n\nexport const getGetProductsForUnitUrl = (unitId: string) => {\n return `/product/unit/${unitId}`;\n};\n\nexport const getProductsForUnit = async (\n unitId: string,\n options?: RequestInit,\n): Promise<getProductsForUnitResponse> => {\n return customFetch<getProductsForUnitResponse>(getGetProductsForUnitUrl(unitId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductsForUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"product\", \"unit\", unitId] as const;\n};\n\nexport const getGetProductsForUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForUnitQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsForUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\nexport const invalidateGetProductsForUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductsForUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetProductsForUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport type getProductResponse200 = { data: ProductUnitGetResponse; status: 200 };\n\nexport type getProductResponse400 = { data: AsError; status: 400 };\n\nexport type getProductResponse401 = { data: void; status: 401 };\n\nexport type getProductResponse403 = { data: AsError; status: 403 };\n\nexport type getProductResponseSuccess = getProductResponse200 & { headers: Headers };\nexport type getProductResponseError = (\n | getProductResponse400\n | getProductResponse401\n | getProductResponse403\n) & { headers: Headers };\n\nexport type getProductResponse = getProductResponseSuccess | getProductResponseError;\n\nexport const getGetProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const getProduct = async (\n productId: string,\n options?: RequestInit,\n): Promise<getProductResponse> => {\n return customFetch<getProductResponse>(getGetProductUrl(productId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductQueryKey = (productId?: string) => {\n return [\"account-server\", \"product\", productId] as const;\n};\n\nexport const getGetProductQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!productId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductQueryOptions(productId, 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 a Product\n */\nexport const invalidateGetProduct = async (\n queryClient: QueryClient,\n productId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductQueryKey(productId) }, options);\n\n return queryClient;\n};\n\nexport const getGetProductSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductSuspenseQueryOptions(productId, 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 * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport type deleteProductResponse204 = { data: void; status: 204 };\n\nexport type deleteProductResponse401 = { data: void; status: 401 };\n\nexport type deleteProductResponse403 = { data: AsError; status: 403 };\n\nexport type deleteProductResponse404 = { data: AsError; status: 404 };\n\nexport type deleteProductResponseSuccess = deleteProductResponse204 & { headers: Headers };\nexport type deleteProductResponseError = (\n | deleteProductResponse401\n | deleteProductResponse403\n | deleteProductResponse404\n) & { headers: Headers };\n\nexport type deleteProductResponse = deleteProductResponseSuccess | deleteProductResponseError;\n\nexport const getDeleteProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const deleteProduct = async (\n productId: string,\n options?: RequestInit,\n): Promise<deleteProductResponse> => {\n return customFetch<deleteProductResponse>(getDeleteProductUrl(productId), {\n ...options,\n method: \"DELETE\",\n });\n};\n\nexport const getDeleteProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationKey = [\"deleteProduct\"];\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 deleteProduct>>,\n { productId: string }\n > = (props) => {\n const { productId } = props ?? {};\n\n return deleteProduct(productId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;\n\nexport type DeleteProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationOptions = getDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport type patchProductResponse200 = { data: void; status: 200 };\n\nexport type patchProductResponse401 = { data: void; status: 401 };\n\nexport type patchProductResponse403 = { data: AsError; status: 403 };\n\nexport type patchProductResponse404 = { data: AsError; status: 404 };\n\nexport type patchProductResponseSuccess = patchProductResponse200 & { headers: Headers };\nexport type patchProductResponseError = (\n | patchProductResponse401\n | patchProductResponse403\n | patchProductResponse404\n) & { headers: Headers };\n\nexport type patchProductResponse = patchProductResponseSuccess | patchProductResponseError;\n\nexport const getPatchProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const patchProduct = async (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: RequestInit,\n): Promise<patchProductResponse> => {\n return customFetch<patchProductResponse>(getPatchProductUrl(productId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(productPatchBodyBody),\n });\n};\n\nexport const getPatchProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchProduct\"];\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 patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n > = (props) => {\n const { productId, data } = props ?? {};\n\n return patchProduct(productId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;\nexport type PatchProductMutationBody = ProductPatchBodyBody;\nexport type PatchProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+DA,MAAa,8BAA8B;AACzC,QAAO;;AAGT,MAAa,kBAAkB,OAAO,YAA4D;AAChG,QAAOA,iCAAqC,uBAAuB,EAAE;EACnE,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,MAAa,mCAAmC;AAC9C,QAAO,CAAC,kBAAkB,eAAe;;AAG3C,MAAa,kCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B;CAEvE,MAAMC,WAAuE,EAAE,aAC7E,gBAAgB;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEhD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAc/C,SAAgB,mBAGd,SAGyD;CACzD,MAAM,eAAe,+BAA+B,QAAQ;CAE5D,MAAM,6CAAiB,a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;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMQ,cAGD,UAAU;EACb,MAAM,EAAE,cAAc,SAAS,EAAE;AAEjC,SAAO,cAAc,WAAW,eAAe;;AAGjD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAU3C,MAAa,oBAA4E,YAapF;AAGH,gDAFwB,gCAAgC,QAAQ,CAE7B;;AA4BrC,MAAa,sBAAsB,cAAsB;AACvD,QAAO,YAAY;;AAGrB,MAAa,eAAe,OAC1B,WACA,sBACA,YACkC;AAClC,QAAOR,iCAAkC,mBAAmB,UAAU,EAAE;EACtE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,SAAS;GAAS;EACpE,MAAM,KAAK,UAAU,qBAAqB;EAC3C,CAAC;;AAGJ,MAAa,kCAGX,YAaG;CACH,MAAM,cAAc,CAAC,eAAe;CACpC,MAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMS,cAGD,UAAU;EACb,MAAM,EAAE,WAAW,SAAS,SAAS,EAAE;AAEvC,SAAO,aAAa,WAAW,MAAM,eAAe;;AAGtD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAU3C,MAAa,mBAA2E,YAanF;AAGH,gDAFwB,+BAA+B,QAAQ,CAE5B"}
1
+ {"version":3,"file":"product.fetch.cjs","names":["customFetch","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProduct>>,\n { productId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n >"],"sources":["../../../src/api/product/product.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 ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse,\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 Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport type getProductTypesResponse200 = { data: ProductsGetTypesResponse; status: 200 };\n\nexport type getProductTypesResponse400 = { data: AsError; status: 400 };\n\nexport type getProductTypesResponse401 = { data: void; status: 401 };\n\nexport type getProductTypesResponse403 = { data: AsError; status: 403 };\n\nexport type getProductTypesResponseSuccess = getProductTypesResponse200 & { headers: Headers };\nexport type getProductTypesResponseError = (\n | getProductTypesResponse400\n | getProductTypesResponse401\n | getProductTypesResponse403\n) & { headers: Headers };\n\nexport type getProductTypesResponse = getProductTypesResponseSuccess | getProductTypesResponseError;\n\nexport const getGetProductTypesUrl = () => {\n return `/product-type`;\n};\n\nexport const getProductTypes = async (options?: RequestInit): Promise<getProductTypesResponse> => {\n return customFetch<getProductTypesResponse>(getGetProductTypesUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductTypesQueryKey = () => {\n return [\"account-server\", \"product-type\"] as const;\n};\n\nexport const getGetProductTypesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;\nexport type GetProductTypesQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n Awaited<ReturnType<typeof getProductTypes>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n Awaited<ReturnType<typeof getProductTypes>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductTypesQueryOptions(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 all Product Types\n */\nexport const invalidateGetProductTypes = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductTypesQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetProductTypesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductTypes>>\n>;\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductTypesSuspenseQueryOptions(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 * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport type getProductDefaultStorageCostResponse200 = {\n data: ProductsGetDefaultStorageCost;\n status: 200;\n};\n\nexport type getProductDefaultStorageCostResponse400 = { data: AsError; status: 400 };\n\nexport type getProductDefaultStorageCostResponse401 = { data: void; status: 401 };\n\nexport type getProductDefaultStorageCostResponse403 = { data: AsError; status: 403 };\n\nexport type getProductDefaultStorageCostResponseSuccess =\n getProductDefaultStorageCostResponse200 & { headers: Headers };\nexport type getProductDefaultStorageCostResponseError = (\n | getProductDefaultStorageCostResponse400\n | getProductDefaultStorageCostResponse401\n | getProductDefaultStorageCostResponse403\n) & { headers: Headers };\n\nexport type getProductDefaultStorageCostResponse =\n | getProductDefaultStorageCostResponseSuccess\n | getProductDefaultStorageCostResponseError;\n\nexport const getGetProductDefaultStorageCostUrl = () => {\n return `/product-default-storage-cost`;\n};\n\nexport const getProductDefaultStorageCost = async (\n options?: RequestInit,\n): Promise<getProductDefaultStorageCostResponse> => {\n return customFetch<getProductDefaultStorageCostResponse>(getGetProductDefaultStorageCostUrl(), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [\"account-server\", \"product-default-storage-cost\"] as const;\n};\n\nexport const getGetProductDefaultStorageCostQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, 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 cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductDefaultStorageCostQueryOptions(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 cross-product storage cost\n */\nexport const invalidateGetProductDefaultStorageCost = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductDefaultStorageCostQueryKey() },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductDefaultStorageCostSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(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 * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport type getProductsResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsResponse400 = { data: AsError; status: 400 };\n\nexport type getProductsResponse401 = { data: void; status: 401 };\n\nexport type getProductsResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsResponseSuccess = getProductsResponse200 & { headers: Headers };\nexport type getProductsResponseError = (\n | getProductsResponse400\n | getProductsResponse401\n | getProductsResponse403\n) & { headers: Headers };\n\nexport type getProductsResponse = getProductsResponseSuccess | getProductsResponseError;\n\nexport const getGetProductsUrl = () => {\n return `/product`;\n};\n\nexport const getProducts = async (options?: RequestInit): Promise<getProductsResponse> => {\n return customFetch<getProductsResponse>(getGetProductsUrl(), { ...options, method: \"GET\" });\n};\n\nexport const getGetProductsQueryKey = () => {\n return [\"account-server\", \"product\"] as const;\n};\n\nexport const getGetProductsQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsQueryError = ErrorType<AsError | void>;\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n Awaited<ReturnType<typeof getProducts>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n Awaited<ReturnType<typeof getProducts>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsQueryOptions(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 all Products\n */\nexport const invalidateGetProducts = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductsQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetProductsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts({ signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsSuspenseQueryOptions(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 * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport type getProductsForOrganisationResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsForOrganisationResponse401 = { data: void; status: 401 };\n\nexport type getProductsForOrganisationResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsForOrganisationResponse404 = { data: AsError; status: 404 };\n\nexport type getProductsForOrganisationResponseSuccess = getProductsForOrganisationResponse200 & {\n headers: Headers;\n};\nexport type getProductsForOrganisationResponseError = (\n | getProductsForOrganisationResponse401\n | getProductsForOrganisationResponse403\n | getProductsForOrganisationResponse404\n) & { headers: Headers };\n\nexport type getProductsForOrganisationResponse =\n | getProductsForOrganisationResponseSuccess\n | getProductsForOrganisationResponseError;\n\nexport const getGetProductsForOrganisationUrl = (orgId: string) => {\n return `/product/organisation/${orgId}`;\n};\n\nexport const getProductsForOrganisation = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getProductsForOrganisationResponse> => {\n return customFetch<getProductsForOrganisationResponse>(getGetProductsForOrganisationUrl(orgId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductsForOrganisationQueryKey = (orgId?: string) => {\n return [\"account-server\", \"product\", \"organisation\", orgId] as const;\n};\n\nexport const getGetProductsForOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsForOrganisationQueryOptions(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 Products for an Organisation\n */\nexport const invalidateGetProductsForOrganisation = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductsForOrganisationQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductsForOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(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 * Products are **Subscriptions** that you create in a **Unit** that allow you to use services provided by a **Merchant**. To create products you need to be a member of the **Unit** or the Unit's **Organisation**.\n\nSupported subscription **types** include `DATA_MANAGER_STORAGE_SUBSCRIPTION`, and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nThe `DATA_MANAGER_STORAGE_SUBSCRIPTION` **type** needs a **name**, an **allowance**, and an optional **limit** (that cannot be less than the **allowance**). If no **limit** is provided the **allowance** is used.\n\nThe `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` **type** needs a **name**, and a **flavour**. The **flavour**, a string, should typically be one of `EVALUATION`, `BRONZE`, `SILVER` or `GOLD`.\n\nUsers who are **Evaluators** can only create products in their Personal Unit, and where products support flavours, are restricted to `EVALUATION` flavours .\n\n * @summary Creates a Product for a Unit\n */\nexport type createUnitProductResponse201 = { data: UnitProductPostResponse; status: 201 };\n\nexport type createUnitProductResponse400 = { data: AsError; status: 400 };\n\nexport type createUnitProductResponse401 = { data: void; status: 401 };\n\nexport type createUnitProductResponse403 = { data: AsError; status: 403 };\n\nexport type createUnitProductResponseSuccess = createUnitProductResponse201 & { headers: Headers };\nexport type createUnitProductResponseError = (\n | createUnitProductResponse400\n | createUnitProductResponse401\n | createUnitProductResponse403\n) & { headers: Headers };\n\nexport type createUnitProductResponse =\n | createUnitProductResponseSuccess\n | createUnitProductResponseError;\n\nexport const getCreateUnitProductUrl = (unitId: string) => {\n return `/product/unit/${unitId}`;\n};\n\nexport const createUnitProduct = async (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: RequestInit,\n): Promise<createUnitProductResponse> => {\n return customFetch<createUnitProductResponse>(getCreateUnitProductUrl(unitId), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(unitProductPostBodyBody),\n });\n};\n\nexport const getCreateUnitProductMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createUnitProduct\"];\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 createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return createUnitProduct(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateUnitProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof createUnitProduct>>\n>;\nexport type CreateUnitProductMutationBody = UnitProductPostBodyBody;\nexport type CreateUnitProductMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Creates a Product for a Unit\n */\nexport const useCreateUnitProduct = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport type getProductsForUnitResponse200 = { data: ProductsGetResponse; status: 200 };\n\nexport type getProductsForUnitResponse401 = { data: void; status: 401 };\n\nexport type getProductsForUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getProductsForUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getProductsForUnitResponseSuccess = getProductsForUnitResponse200 & {\n headers: Headers;\n};\nexport type getProductsForUnitResponseError = (\n | getProductsForUnitResponse401\n | getProductsForUnitResponse403\n | getProductsForUnitResponse404\n) & { headers: Headers };\n\nexport type getProductsForUnitResponse =\n | getProductsForUnitResponseSuccess\n | getProductsForUnitResponseError;\n\nexport const getGetProductsForUnitUrl = (unitId: string) => {\n return `/product/unit/${unitId}`;\n};\n\nexport const getProductsForUnit = async (\n unitId: string,\n options?: RequestInit,\n): Promise<getProductsForUnitResponse> => {\n return customFetch<getProductsForUnitResponse>(getGetProductsForUnitUrl(unitId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductsForUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"product\", \"unit\", unitId] as const;\n};\n\nexport const getGetProductsForUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsForUnitQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n Awaited<ReturnType<typeof getProductsForUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n Awaited<ReturnType<typeof getProductsForUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsForUnitQueryOptions(unitId, 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 Products for an Organisational Unit\n */\nexport const invalidateGetProductsForUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductsForUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetProductsForUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId, 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 * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport type getProductResponse200 = { data: ProductUnitGetResponse; status: 200 };\n\nexport type getProductResponse400 = { data: AsError; status: 400 };\n\nexport type getProductResponse401 = { data: void; status: 401 };\n\nexport type getProductResponse403 = { data: AsError; status: 403 };\n\nexport type getProductResponseSuccess = getProductResponse200 & { headers: Headers };\nexport type getProductResponseError = (\n | getProductResponse400\n | getProductResponse401\n | getProductResponse403\n) & { headers: Headers };\n\nexport type getProductResponse = getProductResponseSuccess | getProductResponseError;\n\nexport const getGetProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const getProduct = async (\n productId: string,\n options?: RequestInit,\n): Promise<getProductResponse> => {\n return customFetch<getProductResponse>(getGetProductUrl(productId), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductQueryKey = (productId?: string) => {\n return [\"account-server\", \"product\", productId] as const;\n};\n\nexport const getGetProductQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!productId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductQueryError = ErrorType<AsError | void>;\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n Awaited<ReturnType<typeof getProduct>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n Awaited<ReturnType<typeof getProduct>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductQueryOptions(productId, 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 a Product\n */\nexport const invalidateGetProduct = async (\n queryClient: QueryClient,\n productId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetProductQueryKey(productId) }, options);\n\n return queryClient;\n};\n\nexport const getGetProductSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductSuspenseQueryOptions(productId, 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 * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport type deleteProductResponse204 = { data: void; status: 204 };\n\nexport type deleteProductResponse401 = { data: void; status: 401 };\n\nexport type deleteProductResponse403 = { data: AsError; status: 403 };\n\nexport type deleteProductResponse404 = { data: AsError; status: 404 };\n\nexport type deleteProductResponseSuccess = deleteProductResponse204 & { headers: Headers };\nexport type deleteProductResponseError = (\n | deleteProductResponse401\n | deleteProductResponse403\n | deleteProductResponse404\n) & { headers: Headers };\n\nexport type deleteProductResponse = deleteProductResponseSuccess | deleteProductResponseError;\n\nexport const getDeleteProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const deleteProduct = async (\n productId: string,\n options?: RequestInit,\n): Promise<deleteProductResponse> => {\n return customFetch<deleteProductResponse>(getDeleteProductUrl(productId), {\n ...options,\n method: \"DELETE\",\n });\n};\n\nexport const getDeleteProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationKey = [\"deleteProduct\"];\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 deleteProduct>>,\n { productId: string }\n > = (props) => {\n const { productId } = props ?? {};\n\n return deleteProduct(productId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;\n\nexport type DeleteProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationOptions = getDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport type patchProductResponse200 = { data: void; status: 200 };\n\nexport type patchProductResponse401 = { data: void; status: 401 };\n\nexport type patchProductResponse403 = { data: AsError; status: 403 };\n\nexport type patchProductResponse404 = { data: AsError; status: 404 };\n\nexport type patchProductResponseSuccess = patchProductResponse200 & { headers: Headers };\nexport type patchProductResponseError = (\n | patchProductResponse401\n | patchProductResponse403\n | patchProductResponse404\n) & { headers: Headers };\n\nexport type patchProductResponse = patchProductResponseSuccess | patchProductResponseError;\n\nexport const getPatchProductUrl = (productId: string) => {\n return `/product/${productId}`;\n};\n\nexport const patchProduct = async (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: RequestInit,\n): Promise<patchProductResponse> => {\n return customFetch<patchProductResponse>(getPatchProductUrl(productId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(productPatchBodyBody),\n });\n};\n\nexport const getPatchProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchProduct\"];\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 patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n > = (props) => {\n const { productId, data } = props ?? {};\n\n return patchProduct(productId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;\nexport type PatchProductMutationBody = ProductPatchBodyBody;\nexport type PatchProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;AAmEA,MAAa,8BAA8B;AACzC,QAAO;;AAGT,MAAa,kBAAkB,OAAO,YAA4D;AAChG,QAAOA,iCAAqC,uBAAuB,EAAE;EACnE,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,MAAa,mCAAmC;AAC9C,QAAO,CAAC,kBAAkB,eAAe;;AAG3C,MAAa,kCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WA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