@squonk/account-server-client 4.4.0-4-4.2197069952 → 4.4.0-4-4.2199390673
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.
- package/dist/api/actions/actions.cjs +4 -4
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +35 -17
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +35 -17
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.cjs +4 -4
- package/dist/api/actions/actions.fetch.cjs.map +1 -1
- package/dist/api/actions/actions.fetch.d.cts +35 -17
- package/dist/api/actions/actions.fetch.d.cts.map +1 -1
- package/dist/api/actions/actions.fetch.d.ts +35 -17
- package/dist/api/actions/actions.fetch.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.js +4 -4
- package/dist/api/actions/actions.fetch.js.map +1 -1
- package/dist/api/actions/actions.js +4 -4
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/asset/asset.cjs +22 -22
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +76 -40
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +76 -40
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.cjs +22 -22
- package/dist/api/asset/asset.fetch.cjs.map +1 -1
- package/dist/api/asset/asset.fetch.d.cts +76 -40
- package/dist/api/asset/asset.fetch.d.cts.map +1 -1
- package/dist/api/asset/asset.fetch.d.ts +76 -40
- package/dist/api/asset/asset.fetch.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.js +22 -22
- package/dist/api/asset/asset.fetch.js.map +1 -1
- package/dist/api/asset/asset.js +22 -22
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +16 -16
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +137 -65
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +137 -65
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.cjs +16 -16
- package/dist/api/charges/charges.fetch.cjs.map +1 -1
- package/dist/api/charges/charges.fetch.d.cts +137 -65
- package/dist/api/charges/charges.fetch.d.cts.map +1 -1
- package/dist/api/charges/charges.fetch.d.ts +137 -65
- package/dist/api/charges/charges.fetch.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.js +16 -16
- package/dist/api/charges/charges.fetch.js.map +1 -1
- package/dist/api/charges/charges.js +16 -16
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +12 -12
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +71 -35
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +71 -35
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
- package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.js +12 -12
- package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
- package/dist/api/event-stream/event-stream.js +12 -12
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +8 -8
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +69 -33
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +69 -33
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.cjs +8 -8
- package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.cts +69 -33
- package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.ts +69 -33
- package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.js +8 -8
- package/dist/api/merchant/merchant.fetch.js.map +1 -1
- package/dist/api/merchant/merchant.js +8 -8
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +18 -18
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +106 -52
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +106 -52
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.cjs +18 -18
- package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.cts +106 -52
- package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.ts +106 -52
- package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.js +18 -18
- package/dist/api/organisation/organisation.fetch.js.map +1 -1
- package/dist/api/organisation/organisation.js +18 -18
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +30 -30
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +208 -100
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +208 -100
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.fetch.cjs +30 -30
- package/dist/api/product/product.fetch.cjs.map +1 -1
- package/dist/api/product/product.fetch.d.cts +208 -100
- package/dist/api/product/product.fetch.d.cts.map +1 -1
- package/dist/api/product/product.fetch.d.ts +208 -100
- package/dist/api/product/product.fetch.d.ts.map +1 -1
- package/dist/api/product/product.fetch.js +30 -30
- package/dist/api/product/product.fetch.js.map +1 -1
- package/dist/api/product/product.js +30 -30
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +4 -4
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +35 -17
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +35 -17
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.fetch.cjs +4 -4
- package/dist/api/state/state.fetch.cjs.map +1 -1
- package/dist/api/state/state.fetch.d.cts +35 -17
- package/dist/api/state/state.fetch.d.cts.map +1 -1
- package/dist/api/state/state.fetch.d.ts +35 -17
- package/dist/api/state/state.fetch.d.ts.map +1 -1
- package/dist/api/state/state.fetch.js +4 -4
- package/dist/api/state/state.fetch.js.map +1 -1
- package/dist/api/state/state.js +4 -4
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +30 -30
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +144 -72
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +144 -72
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.cjs +30 -30
- package/dist/api/unit/unit.fetch.cjs.map +1 -1
- package/dist/api/unit/unit.fetch.d.cts +144 -72
- package/dist/api/unit/unit.fetch.d.cts.map +1 -1
- package/dist/api/unit/unit.fetch.d.ts +144 -72
- package/dist/api/unit/unit.fetch.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.js +30 -30
- package/dist/api/unit/unit.fetch.js.map +1 -1
- package/dist/api/unit/unit.js +30 -30
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +20 -20
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +107 -53
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +107 -53
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.fetch.cjs +20 -20
- package/dist/api/user/user.fetch.cjs.map +1 -1
- package/dist/api/user/user.fetch.d.cts +107 -53
- package/dist/api/user/user.fetch.d.cts.map +1 -1
- package/dist/api/user/user.fetch.d.ts +107 -53
- package/dist/api/user/user.fetch.d.ts.map +1 -1
- package/dist/api/user/user.fetch.js +20 -20
- package/dist/api/user/user.fetch.js.map +1 -1
- package/dist/api/user/user.js +20 -20
- package/dist/api/user/user.js.map +1 -1
- package/package.json +7 -5
- package/src/api/actions/actions.fetch.ts +103 -12
- package/src/api/actions/actions.ts +103 -12
- package/src/api/asset/asset.fetch.ts +303 -94
- package/src/api/asset/asset.ts +303 -94
- package/src/api/charges/charges.fetch.ts +456 -54
- package/src/api/charges/charges.ts +456 -54
- package/src/api/event-stream/event-stream.fetch.ts +262 -58
- package/src/api/event-stream/event-stream.ts +262 -58
- package/src/api/merchant/merchant.fetch.ts +212 -28
- package/src/api/merchant/merchant.ts +212 -28
- package/src/api/organisation/organisation.fetch.ts +381 -86
- package/src/api/organisation/organisation.ts +381 -86
- package/src/api/product/product.fetch.ts +724 -130
- package/src/api/product/product.ts +724 -130
- package/src/api/state/state.fetch.ts +105 -16
- package/src/api/state/state.ts +105 -16
- package/src/api/unit/unit.fetch.ts +521 -146
- package/src/api/unit/unit.ts +521 -146
- package/src/api/user/user.fetch.ts +401 -101
- package/src/api/user/user.ts +401 -101
- package/tests/README.md +98 -0
- package/tests/component.test.tsx +191 -0
- package/tests/tsconfig.json +7 -0
- package/tests/type-tests.tsx +196 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.fetch.js","names":["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,QAAO,YAAqC,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,MAAMA,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,QAAQ,SAAS,aAAa;AAEpC,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,4BAA4B,OACvC,aACA,YACyB;AACzB,OAAM,YAAY,kBAAkB,EAAE,UAAU,4BAA4B,EAAE,EAAE,QAAQ;AAExF,QAAO;;AAGT,MAAa,0CAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B;CAEvE,MAAMA,WAAuE,EAAE,aAC7E,gBAAgB;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEhD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAgB/C,SAAgB,2BAGd,SAGiE;CACjE,MAAM,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AAU,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,MAAMC,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,QAAO,YAFiB,+BAA+B,QAAQ,CAE5B"}
|
|
1
|
+
{"version":3,"file":"product.fetch.js","names":["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,QAAO,YAAqC,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,MAAMA,WAAuE,EAAE,aAC7E,gBAAgB;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAEhD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AA4D/C,SAAgB,mBAId,SAIA,aACwE;CACxE,MAAM,eAAe,+BAA+B,QAAQ;CAE5D,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,4BAA4B,OACvC,aACA,YACyB;AACzB,OAAM,YAAY,kBAAkB,EAAE,UAAU,4BAA4B,EAAE,EAAE,Q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E,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,cAAc,SAAS,EAAE;AAEjC,SAAO,cAAc,WAAW,eAAe;;AAGjD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAU3C,MAAa,oBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,gCAAgC,QAAQ,EAE5B,YAAY;;AA4BlD,MAAa,sBAAsB,cAAsB;AACvD,QAAO,YAAY;;AAGrB,MAAa,eAAe,OAC1B,WACA,sBACA,YACkC;AAClC,QAAO,YAAkC,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,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,WAAW,SAAS,SAAS,EAAE;AAEvC,SAAO,aAAa,WAAW,MAAM,eAAe;;AAGtD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAU3C,MAAa,mBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,+BAA+B,QAAQ,EAE3B,YAAY"}
|
|
@@ -40,9 +40,9 @@ const getGetProductTypesQueryOptions = (options) => {
|
|
|
40
40
|
/**
|
|
41
41
|
* @summary Gets all Product Types
|
|
42
42
|
*/
|
|
43
|
-
function useGetProductTypes(options) {
|
|
43
|
+
function useGetProductTypes(options, queryClient) {
|
|
44
44
|
const queryOptions = getGetProductTypesQueryOptions(options);
|
|
45
|
-
const query = useQuery(queryOptions);
|
|
45
|
+
const query = useQuery(queryOptions, queryClient);
|
|
46
46
|
query.queryKey = queryOptions.queryKey;
|
|
47
47
|
return query;
|
|
48
48
|
}
|
|
@@ -66,9 +66,9 @@ const getGetProductTypesSuspenseQueryOptions = (options) => {
|
|
|
66
66
|
/**
|
|
67
67
|
* @summary Gets all Product Types
|
|
68
68
|
*/
|
|
69
|
-
function useGetProductTypesSuspense(options) {
|
|
69
|
+
function useGetProductTypesSuspense(options, queryClient) {
|
|
70
70
|
const queryOptions = getGetProductTypesSuspenseQueryOptions(options);
|
|
71
|
-
const query = useSuspenseQuery(queryOptions);
|
|
71
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
72
72
|
query.queryKey = queryOptions.queryKey;
|
|
73
73
|
return query;
|
|
74
74
|
}
|
|
@@ -100,9 +100,9 @@ const getGetProductDefaultStorageCostQueryOptions = (options) => {
|
|
|
100
100
|
/**
|
|
101
101
|
* @summary Gets the default cross-product storage cost
|
|
102
102
|
*/
|
|
103
|
-
function useGetProductDefaultStorageCost(options) {
|
|
103
|
+
function useGetProductDefaultStorageCost(options, queryClient) {
|
|
104
104
|
const queryOptions = getGetProductDefaultStorageCostQueryOptions(options);
|
|
105
|
-
const query = useQuery(queryOptions);
|
|
105
|
+
const query = useQuery(queryOptions, queryClient);
|
|
106
106
|
query.queryKey = queryOptions.queryKey;
|
|
107
107
|
return query;
|
|
108
108
|
}
|
|
@@ -126,9 +126,9 @@ const getGetProductDefaultStorageCostSuspenseQueryOptions = (options) => {
|
|
|
126
126
|
/**
|
|
127
127
|
* @summary Gets the default cross-product storage cost
|
|
128
128
|
*/
|
|
129
|
-
function useGetProductDefaultStorageCostSuspense(options) {
|
|
129
|
+
function useGetProductDefaultStorageCostSuspense(options, queryClient) {
|
|
130
130
|
const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options);
|
|
131
|
-
const query = useSuspenseQuery(queryOptions);
|
|
131
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
132
132
|
query.queryKey = queryOptions.queryKey;
|
|
133
133
|
return query;
|
|
134
134
|
}
|
|
@@ -160,9 +160,9 @@ const getGetProductsQueryOptions = (options) => {
|
|
|
160
160
|
/**
|
|
161
161
|
* @summary Gets all Products
|
|
162
162
|
*/
|
|
163
|
-
function useGetProducts(options) {
|
|
163
|
+
function useGetProducts(options, queryClient) {
|
|
164
164
|
const queryOptions = getGetProductsQueryOptions(options);
|
|
165
|
-
const query = useQuery(queryOptions);
|
|
165
|
+
const query = useQuery(queryOptions, queryClient);
|
|
166
166
|
query.queryKey = queryOptions.queryKey;
|
|
167
167
|
return query;
|
|
168
168
|
}
|
|
@@ -186,9 +186,9 @@ const getGetProductsSuspenseQueryOptions = (options) => {
|
|
|
186
186
|
/**
|
|
187
187
|
* @summary Gets all Products
|
|
188
188
|
*/
|
|
189
|
-
function useGetProductsSuspense(options) {
|
|
189
|
+
function useGetProductsSuspense(options, queryClient) {
|
|
190
190
|
const queryOptions = getGetProductsSuspenseQueryOptions(options);
|
|
191
|
-
const query = useSuspenseQuery(queryOptions);
|
|
191
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
192
192
|
query.queryKey = queryOptions.queryKey;
|
|
193
193
|
return query;
|
|
194
194
|
}
|
|
@@ -226,9 +226,9 @@ const getGetProductsForOrganisationQueryOptions = (orgId, options) => {
|
|
|
226
226
|
/**
|
|
227
227
|
* @summary Gets Products for an Organisation
|
|
228
228
|
*/
|
|
229
|
-
function useGetProductsForOrganisation(orgId, options) {
|
|
229
|
+
function useGetProductsForOrganisation(orgId, options, queryClient) {
|
|
230
230
|
const queryOptions = getGetProductsForOrganisationQueryOptions(orgId, options);
|
|
231
|
-
const query = useQuery(queryOptions);
|
|
231
|
+
const query = useQuery(queryOptions, queryClient);
|
|
232
232
|
query.queryKey = queryOptions.queryKey;
|
|
233
233
|
return query;
|
|
234
234
|
}
|
|
@@ -252,9 +252,9 @@ const getGetProductsForOrganisationSuspenseQueryOptions = (orgId, options) => {
|
|
|
252
252
|
/**
|
|
253
253
|
* @summary Gets Products for an Organisation
|
|
254
254
|
*/
|
|
255
|
-
function useGetProductsForOrganisationSuspense(orgId, options) {
|
|
255
|
+
function useGetProductsForOrganisationSuspense(orgId, options, queryClient) {
|
|
256
256
|
const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId, options);
|
|
257
|
-
const query = useSuspenseQuery(queryOptions);
|
|
257
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
258
258
|
query.queryKey = queryOptions.queryKey;
|
|
259
259
|
return query;
|
|
260
260
|
}
|
|
@@ -304,8 +304,8 @@ const getCreateUnitProductMutationOptions = (options) => {
|
|
|
304
304
|
/**
|
|
305
305
|
* @summary Creates a Product for a Unit
|
|
306
306
|
*/
|
|
307
|
-
const useCreateUnitProduct = (options) => {
|
|
308
|
-
return useMutation(getCreateUnitProductMutationOptions(options));
|
|
307
|
+
const useCreateUnitProduct = (options, queryClient) => {
|
|
308
|
+
return useMutation(getCreateUnitProductMutationOptions(options), queryClient);
|
|
309
309
|
};
|
|
310
310
|
/**
|
|
311
311
|
* Gets products you have access to based on an Organisational **Unit**
|
|
@@ -341,9 +341,9 @@ const getGetProductsForUnitQueryOptions = (unitId, options) => {
|
|
|
341
341
|
/**
|
|
342
342
|
* @summary Gets Products for an Organisational Unit
|
|
343
343
|
*/
|
|
344
|
-
function useGetProductsForUnit(unitId, options) {
|
|
344
|
+
function useGetProductsForUnit(unitId, options, queryClient) {
|
|
345
345
|
const queryOptions = getGetProductsForUnitQueryOptions(unitId, options);
|
|
346
|
-
const query = useQuery(queryOptions);
|
|
346
|
+
const query = useQuery(queryOptions, queryClient);
|
|
347
347
|
query.queryKey = queryOptions.queryKey;
|
|
348
348
|
return query;
|
|
349
349
|
}
|
|
@@ -367,9 +367,9 @@ const getGetProductsForUnitSuspenseQueryOptions = (unitId, options) => {
|
|
|
367
367
|
/**
|
|
368
368
|
* @summary Gets Products for an Organisational Unit
|
|
369
369
|
*/
|
|
370
|
-
function useGetProductsForUnitSuspense(unitId, options) {
|
|
370
|
+
function useGetProductsForUnitSuspense(unitId, options, queryClient) {
|
|
371
371
|
const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId, options);
|
|
372
|
-
const query = useSuspenseQuery(queryOptions);
|
|
372
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
373
373
|
query.queryKey = queryOptions.queryKey;
|
|
374
374
|
return query;
|
|
375
375
|
}
|
|
@@ -406,9 +406,9 @@ const getGetProductQueryOptions = (productId, options) => {
|
|
|
406
406
|
/**
|
|
407
407
|
* @summary Gets a Product
|
|
408
408
|
*/
|
|
409
|
-
function useGetProduct(productId, options) {
|
|
409
|
+
function useGetProduct(productId, options, queryClient) {
|
|
410
410
|
const queryOptions = getGetProductQueryOptions(productId, options);
|
|
411
|
-
const query = useQuery(queryOptions);
|
|
411
|
+
const query = useQuery(queryOptions, queryClient);
|
|
412
412
|
query.queryKey = queryOptions.queryKey;
|
|
413
413
|
return query;
|
|
414
414
|
}
|
|
@@ -432,9 +432,9 @@ const getGetProductSuspenseQueryOptions = (productId, options) => {
|
|
|
432
432
|
/**
|
|
433
433
|
* @summary Gets a Product
|
|
434
434
|
*/
|
|
435
|
-
function useGetProductSuspense(productId, options) {
|
|
435
|
+
function useGetProductSuspense(productId, options, queryClient) {
|
|
436
436
|
const queryOptions = getGetProductSuspenseQueryOptions(productId, options);
|
|
437
|
-
const query = useSuspenseQuery(queryOptions);
|
|
437
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
438
438
|
query.queryKey = queryOptions.queryKey;
|
|
439
439
|
return query;
|
|
440
440
|
}
|
|
@@ -473,8 +473,8 @@ const getDeleteProductMutationOptions = (options) => {
|
|
|
473
473
|
/**
|
|
474
474
|
* @summary Deletes an existing Product
|
|
475
475
|
*/
|
|
476
|
-
const useDeleteProduct = (options) => {
|
|
477
|
-
return useMutation(getDeleteProductMutationOptions(options));
|
|
476
|
+
const useDeleteProduct = (options, queryClient) => {
|
|
477
|
+
return useMutation(getDeleteProductMutationOptions(options), queryClient);
|
|
478
478
|
};
|
|
479
479
|
/**
|
|
480
480
|
* Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
|
|
@@ -517,8 +517,8 @@ const getPatchProductMutationOptions = (options) => {
|
|
|
517
517
|
/**
|
|
518
518
|
* @summary Adjust an existing Product
|
|
519
519
|
*/
|
|
520
|
-
const usePatchProduct = (options) => {
|
|
521
|
-
return useMutation(getPatchProductMutationOptions(options));
|
|
520
|
+
const usePatchProduct = (options, queryClient) => {
|
|
521
|
+
return useMutation(getPatchProductMutationOptions(options), queryClient);
|
|
522
522
|
};
|
|
523
523
|
|
|
524
524
|
//#endregion
|