export type PatchApiApiV1AgentsSellerServicesSellerServiceIdArgs = {sellerServiceId: string, body: {name?: string | undefined, description?: string | undefined, tags?: Array | undefined, minimumTokenAmount?: string | undefined, price?: string | undefined, termsOfService?: ({url?: string | undefined, required?: boolean | undefined}) | undefined, acceptedTokens?: (Array<'kya' | 'pay' | 'kya-pay'>) | undefined}}; export type PatchApiApiV1AgentsSellerServicesSellerServiceIdOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update Agent's Service * * PATCH /api/v1/agents/seller-services/{sellerServiceId} */ export const patchApiApiV1AgentsSellerServicesSellerServiceId = async (args: PatchApiApiV1AgentsSellerServicesSellerServiceIdArgs, options?: PatchApiApiV1AgentsSellerServicesSellerServiceIdOptions) => { const {baseUrl = "https://api.skyfire.xyz", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (sec0 !== undefined) headers.set("skyfire-api-key", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/agents/seller-services/${encodeURIComponent(String(args.sellerServiceId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };