@squonk/account-server-client 4.1.0 → 4.1.1
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/asset/asset.cjs +18 -10
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +60 -60
- package/asset/asset.d.ts +60 -60
- package/asset/asset.js +18 -10
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +3 -3
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +33 -33
- package/charges/charges.d.ts +33 -33
- package/charges/charges.js +3 -3
- package/charges/charges.js.map +1 -1
- package/event-stream/event-stream.cjs +8 -5
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +30 -30
- package/event-stream/event-stream.d.ts +30 -30
- package/event-stream/event-stream.js +8 -5
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +8 -8
- package/index.cjs.map +1 -1
- package/index.d.cts +172 -172
- package/index.d.ts +172 -172
- package/index.js +8 -8
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +1 -1
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +17 -17
- package/merchant/merchant.d.ts +17 -17
- package/merchant/merchant.js +1 -1
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +10 -6
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +44 -44
- package/organisation/organisation.d.ts +44 -44
- package/organisation/organisation.js +10 -6
- package/organisation/organisation.js.map +1 -1
- package/package.json +11 -11
- package/product/product.cjs +12 -8
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +68 -68
- package/product/product.d.ts +68 -68
- package/product/product.js +12 -8
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +180 -180
- package/src/asset/asset.ts +120 -83
- package/src/charges/charges.ts +50 -49
- package/src/event-stream/event-stream.ts +55 -43
- package/src/merchant/merchant.ts +26 -25
- package/src/organisation/organisation.ts +80 -63
- package/src/product/product.ts +116 -99
- package/src/state/state.ts +14 -13
- package/src/unit/unit.ts +106 -79
- package/src/user/user.ts +90 -69
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +9 -9
- package/state/state.d.ts +9 -9
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +15 -9
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +56 -56
- package/unit/unit.d.ts +56 -56
- package/unit/unit.js +15 -9
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +10 -6
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +49 -49
- package/user/user.d.ts +49 -49
- package/user/user.js +10 -6
- package/user/user.js.map +1 -1
package/asset/asset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/asset/asset.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.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.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetDetail,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params: undefined | GetAssetParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets Assets\n */\n\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params: undefined | GetAssetParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets Assets\n */\n\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formUrlEncoded = new URLSearchParams();\nformUrlEncoded.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formUrlEncoded.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formUrlEncoded.append('content_string', assetPostBodyBody.content_string)\n }\nformUrlEncoded.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formUrlEncoded.append('scope_id', assetPostBodyBody.scope_id)\n }\nformUrlEncoded.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formUrlEncoded.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'application/x-www-form-urlencoded', },\n data: formUrlEncoded\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof createAsset>>,\n TError,\n {data: AssetPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a known Asset\n\n * @summary Gets an Asset\n */\nexport const getSpecificAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetDetail>(\n {url: `/asset/${assetId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetSpecificAssetQueryKey = (assetId: string,) => {\n return [\"account-server-api\", `/asset/${assetId}`] as const;\n }\n\n \nexport const getGetSpecificAssetQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetQueryError = ErrorType<AsError | void>\n\n\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getSpecificAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getSpecificAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets an Asset\n */\n\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetSpecificAssetQueryOptions(assetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetSpecificAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets an Asset\n */\n\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formUrlEncoded = new URLSearchParams();\nif(assetPatchBodyBody.content_file !== undefined) {\n formUrlEncoded.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formUrlEncoded.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formUrlEncoded.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/x-www-form-urlencoded', },\n data: formUrlEncoded\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<void | AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof patchAsset>>,\n TError,\n {assetId: string;data: AssetPatchBodyBody},\n TContext\n > => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteAsset>>,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof disableAsset>>,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof enableAsset>>,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof attachAsset>>,\n TError,\n {assetId: string;params?: AttachAssetParams},\n TContext\n > => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext> => {\nconst {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof detachAsset>>,\n TError,\n {assetId: string;params?: DetachAssetParams},\n TContext\n > => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAsCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAU,QAAQ;AAAA,MACtB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAC7D,SAAO,CAAC,sBAAsB,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,MAAM;AAIpE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAkCO,SAAS,YACf,QAAyB,SAEmC;AAE3D,QAAM,eAAe,wBAAwB,QAAO,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,kCAAkC,CAAmF,QAAyB,YACtJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,M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QG,IAAM,cAAc,CACvB,SACA,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,UAAU,OAAO;AAAA,MAAW,QAAQ;AAAA,MACxC;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,gCAAgC,CACrB,YACyG;AACjI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKnE,QAAM,aAAsH,CAAC,UAAU;AACnI,UAAM,EAAC,SAAQ,OAAM,IAAI,SAAS,CAAC;AAEnC,WAAQ,YAAY,SAAQ,QAAO,cAAc;AAAA,EACnD;AAKN,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AASrC,IAAM,iBAAiB,CACN,YAMb;AAEL,QAAM,kBAAkB,8BAA8B,OAAO;AAE7D,SAAO,YAAY,eAAe;AACpC;AAQG,IAAM,cAAc,CACvB,SACA,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,UAAU,OAAO;AAAA,MAAW,QAAQ;AAAA,MACxC;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,gCAAgC,CACrB,YACyG;AACjI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKnE,QAAM,aAAsH,CAAC,UAAU;AACnI,UAAM,EAAC,SAAQ,OAAM,IAAI,SAAS,CAAC;AAEnC,WAAQ,YAAY,SAAQ,QAAO,cAAc;AAAA,EACnD;AAKN,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AASrC,IAAM,iBAAiB,CACN,YAMb;AAEL,QAAM,kBAAkB,8BAA8B,OAAO;AAE7D,SAAO,YAAY,eAAe;AACpC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/asset/asset.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.4.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetDetail,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params: undefined | GetAssetParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets Assets\n */\n\nexport function useGetAsset<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params: undefined | GetAssetParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets Assets\n */\n\nexport function useGetAssetSuspense<TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n const formUrlEncoded = new URLSearchParams();\nformUrlEncoded.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formUrlEncoded.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formUrlEncoded.append('content_string', assetPostBodyBody.content_string)\n }\nformUrlEncoded.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formUrlEncoded.append('scope_id', assetPostBodyBody.scope_id)\n }\nformUrlEncoded.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formUrlEncoded.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'application/x-www-form-urlencoded', },\n data: formUrlEncoded, signal\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TData = Awaited<ReturnType<typeof createAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['createAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{data: AssetPostBodyBody}, TContext>}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TData = Awaited<ReturnType<typeof createAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {data: AssetPostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a known Asset\n\n * @summary Gets an Asset\n */\nexport const getSpecificAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetDetail>(\n {url: `/asset/${assetId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetSpecificAssetQueryKey = (assetId: string,) => {\n return [\"account-server-api\", `/asset/${assetId}`] as const;\n }\n\n \nexport const getGetSpecificAssetQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetQueryError = ErrorType<AsError | void>\n\n\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getSpecificAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getSpecificAsset>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets an Asset\n */\n\nexport function useGetSpecificAsset<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetSpecificAssetQueryOptions(assetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetSpecificAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets an Asset\n */\n\nexport function useGetSpecificAssetSuspense<TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formUrlEncoded = new URLSearchParams();\nif(assetPatchBodyBody.content_file !== undefined) {\n formUrlEncoded.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formUrlEncoded.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formUrlEncoded.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/x-www-form-urlencoded', },\n data: formUrlEncoded\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TData = Awaited<ReturnType<typeof patchAsset>>, TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['patchAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<void | AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TData = Awaited<ReturnType<typeof patchAsset>>, TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string;data: AssetPatchBodyBody},\n TContext\n > => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TData = Awaited<ReturnType<typeof deleteAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deleteAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string}, TContext>}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TData = Awaited<ReturnType<typeof deleteAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TData = Awaited<ReturnType<typeof disableAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['disableAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string}, TContext>}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TData = Awaited<ReturnType<typeof disableAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TData = Awaited<ReturnType<typeof enableAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['enableAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string}, TContext>}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TData = Awaited<ReturnType<typeof enableAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string},\n TContext\n > => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TData = Awaited<ReturnType<typeof attachAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['attachAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string;params?: AttachAssetParams}, TContext>}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TData = Awaited<ReturnType<typeof attachAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string;params?: AttachAssetParams},\n TContext\n > => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TData = Awaited<ReturnType<typeof detachAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['detachAsset'];\nconst {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 \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{assetId: string;params?: DetachAssetParams}, TContext>}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TData = Awaited<ReturnType<typeof detachAsset>>, TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {assetId: string;params?: DetachAssetParams},\n TContext\n > => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAuCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAU,QAAQ;AAAA,MACtB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAC7D,SAAO,CAAC,sBAAsB,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,o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,EAAC,GAAG,SAAS,UAAU,EAAC,GAAG,QAAQ,UAAU,YAAW,EAAC,IACzD,EAAC,UAAU,EAAE,YAAa,GAAG,SAAS,OAAS;AAKjD,QAAM,aAAsH,CAAC,UAAU;AACnI,UAAM,EAAC,SAAQ,OAAM,IAAI,SAAS,CAAC;AAEnC,WAAQ,YAAY,SAAQ,QAAO,cAAc;AAAA,EACnD;AAKN,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAA6F;AASjI,IAAM,iBAAiB,CACN,YAMb;AAEL,QAAM,kBAAkB,8BAA8B,OAAO;AAE7D,SAAO,YAAY,eAAe;AACpC;","names":[]}
|
package/charges/charges.cjs
CHANGED
|
@@ -75,7 +75,7 @@ var getGetOrganisationChargesSuspenseQueryOptions = (orgId, params, options) =>
|
|
|
75
75
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
76
76
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationChargesQueryKey(orgId, params)));
|
|
77
77
|
const queryFn = ({ signal }) => getOrganisationCharges(orgId, params, requestOptions, signal);
|
|
78
|
-
return { queryKey, queryFn,
|
|
78
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
79
79
|
};
|
|
80
80
|
function useGetOrganisationChargesSuspense(orgId, params, options) {
|
|
81
81
|
const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId, params, options);
|
|
@@ -113,7 +113,7 @@ var getGetProductChargesSuspenseQueryOptions = (productId, params, options) => {
|
|
|
113
113
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
114
114
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetProductChargesQueryKey(productId, params)));
|
|
115
115
|
const queryFn = ({ signal }) => getProductCharges(productId, params, requestOptions, signal);
|
|
116
|
-
return { queryKey, queryFn,
|
|
116
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
117
117
|
};
|
|
118
118
|
function useGetProductChargesSuspense(productId, params, options) {
|
|
119
119
|
const queryOptions = getGetProductChargesSuspenseQueryOptions(productId, params, options);
|
|
@@ -151,7 +151,7 @@ var getGetUnitChargesSuspenseQueryOptions = (unitId, params, options) => {
|
|
|
151
151
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
152
152
|
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUnitChargesQueryKey(unitId, params)));
|
|
153
153
|
const queryFn = ({ signal }) => getUnitCharges(unitId, params, requestOptions, signal);
|
|
154
|
-
return { queryKey, queryFn,
|
|
154
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
155
155
|
};
|
|
156
156
|
function useGetUnitChargesSuspense(unitId, params, options) {
|
|
157
157
|
const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId, params, options);
|
package/charges/charges.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/charges/charges.cjs","../../src/charges/charges.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAAA,mDACK;AAqCA,IAAM,WAAA,EAAa,CACtB,MAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,QAAA,CAAA;AAAA,MAAY,MAAA,EAAQ,KAAA;AAAA,MACxB,MAAA;AAAA,MAAQ;AAAA,IACZ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,sBAAA,EAAwB,CAAC,MAAA,EAAA,GAA+B;AACjE,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,QAAA,CAAA,EAAY,GAAI,OAAA,EAAS,CAAC,MAAM,EAAA,EAAG,CAAC,CAAE,CAAA;AACpE,CA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AAEvB,EAAA;AACT;AAgBC;AAIY,EAAA;AACP,IAAA;AAA6B,MAAA;AAAY,MAAA;AACvC,MAAA;AAAQ,MAAA;AACZ,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAIA;AAC8B,EAAA;AAC9B;AAGkI;AAIjG,EAAA;AAEjB,EAAA;AAI2E,EAAA;AAMnD,EAAA;AAC5C;AAuCI;AAImB,EAAA;AAEc,EAAA;AAEL,EAAA;AAEvB,EAAA;AACT;AAIa;AAIwB,EAAA;AAEjB,EAAA;AAI2E,EAAA;AAMnD,EAAA;AAC5C;AA0BC;AAKsB,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;ADxf0C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/charges/charges.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.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.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams,\n GetOrganisationChargesParams,\n GetProductChargesParams,\n GetUnitChargesParams,\n OrganisationChargesGetResponse,\n ProductChargesGetResponse,\n UnitChargesGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ChargesGetResponse>(\n {url: `/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetChargesQueryKey = (params?: GetChargesParams,) => {\n return [\"account-server-api\", `/charges`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetChargesQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesQueryError = ErrorType<void | AsError>\n\n\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetChargesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>\n\n\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetChargesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a Organisation charges.\n\nThe Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint\n\n * @summary Gets charges for all Units in an Organisation\n */\nexport const getOrganisationCharges = (\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationChargesGetResponse>(\n {url: `/charges/organisation/${orgId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetOrganisationChargesQueryKey = (orgId: string,\n params?: GetOrganisationChargesParams,) => {\n return [\"account-server-api\", `/charges/organisation/${orgId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetOrganisationChargesQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesQueryError = ErrorType<void | AsError>\n\n\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetOrganisationChargesQueryOptions(orgId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>\n\n\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Product\n */\nexport const getProductCharges = (\n productId: string,\n params?: GetProductChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductChargesGetResponse>(\n {url: `/charges/product/${productId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProductChargesQueryKey = (productId: string,\n params?: GetProductChargesParams,) => {\n return [\"account-server-api\", `/charges/product/${productId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProductChargesQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesQueryError = ErrorType<AsError | void>\n\n\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params: undefined | GetProductChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetProductChargesQueryOptions(productId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProductChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params: undefined | GetProductChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetProductChargesSuspenseQueryOptions(productId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Unit\n */\nexport const getUnitCharges = (\n unitId: string,\n params?: GetUnitChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitChargesGetResponse>(\n {url: `/charges/unit/${unitId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUnitChargesQueryKey = (unitId: string,\n params?: GetUnitChargesParams,) => {\n return [\"account-server-api\", `/charges/unit/${unitId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUnitChargesQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesQueryError = ErrorType<AsError | void>\n\n\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params: undefined | GetUnitChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetUnitChargesQueryOptions(unitId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetUnitChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params: undefined | GetUnitChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n\n const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/charges/charges.cjs","../../src/charges/charges.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAAA,mDACK;AAsCA,IAAM,WAAA,EAAa,CACtB,MAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,QAAA,CAAA;AAAA,MAAY,MAAA,EAAQ,KAAA;AAAA,MACxB,MAAA;AAAA,MAAQ;AAAA,IACZ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,sBAAA,EAAwB,CAAC,MAAA,EAAA,GAA+B;AACjE,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,QAAA,CAAA,EAAY,GAAI,OAAA,EAAS,CAAC,MAAM,EAAA,EAAG,CAAC,CAAE,CAAA;AACpE,CAAA;AAGG,IAAM,0BAAA,EAA4B,CAAqF,MAAA,EAA2B,OAAA,EAAA,GACpJ;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,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AAuCI;AAImB,EAAA;AAEc,EAAA;AAEL,EAAA;AAEvB,EAAA;AACT;AAIa;AAIwB,EAAA;AAEjB,EAAA;AAI2E,EAAA;AAM5D,EAAA;AACnC;AA0BC;AAKsB,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;ADzf0C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/charges/charges.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.4.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams,\n GetOrganisationChargesParams,\n GetProductChargesParams,\n GetUnitChargesParams,\n OrganisationChargesGetResponse,\n ProductChargesGetResponse,\n UnitChargesGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ChargesGetResponse>(\n {url: `/charges`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetChargesQueryKey = (params?: GetChargesParams,) => {\n return [\"account-server-api\", `/charges`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetChargesQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesQueryError = ErrorType<void | AsError>\n\n\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetChargesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) => getCharges(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>\n\n\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(\n params?: GetChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetChargesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a Organisation charges.\n\nThe Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint\n\n * @summary Gets charges for all Units in an Organisation\n */\nexport const getOrganisationCharges = (\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationChargesGetResponse>(\n {url: `/charges/organisation/${orgId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetOrganisationChargesQueryKey = (orgId: string,\n params?: GetOrganisationChargesParams,) => {\n return [\"account-server-api\", `/charges/organisation/${orgId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetOrganisationChargesQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesQueryError = ErrorType<void | AsError>\n\n\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetOrganisationChargesQueryOptions(orgId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) => getOrganisationCharges(orgId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>\nexport type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>\n\n\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(\n orgId: string,\n params?: GetOrganisationChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Product\n */\nexport const getProductCharges = (\n productId: string,\n params?: GetProductChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductChargesGetResponse>(\n {url: `/charges/product/${productId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProductChargesQueryKey = (productId: string,\n params?: GetProductChargesParams,) => {\n return [\"account-server-api\", `/charges/product/${productId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetProductChargesQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesQueryError = ErrorType<AsError | void>\n\n\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params: undefined | GetProductChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetProductChargesQueryOptions(productId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetProductChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params: undefined | GetProductChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetProductChargesSuspenseQueryOptions(productId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Unit\n */\nexport const getUnitCharges = (\n unitId: string,\n params?: GetUnitChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UnitChargesGetResponse>(\n {url: `/charges/unit/${unitId}`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUnitChargesQueryKey = (unitId: string,\n params?: GetUnitChargesParams,) => {\n return [\"account-server-api\", `/charges/unit/${unitId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUnitChargesQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesQueryError = ErrorType<AsError | void>\n\n\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params: undefined | GetUnitChargesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetUnitChargesQueryOptions(unitId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetUnitChargesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) => getUnitCharges(unitId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>\nexport type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params: undefined | GetUnitChargesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(\n unitId: string,\n params?: GetUnitChargesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId,params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|