export type CreateApiV1ShopsShopIdBlogPostsGenerateArgs = {body: {description?: (string | null) | undefined, count?: (number | null) | undefined, product_ids?: Array | undefined, category_ids?: Array | undefined, tone?: ('professional' | 'casual' | 'technical' | 'enthusiastic' | 'concise' | null) | undefined, language?: (string | null) | undefined, min_words?: (number | null) | undefined, max_words?: (number | null) | undefined, audience?: (string | null) | undefined, category_profile?: ('game_enhancement' | 'gaming_accounts' | 'digital_accounts' | 'software_licenses' | 'ebooks_courses' | 'creative_assets' | 'gift_cards' | 'general' | null) | undefined, posts: Array<{title: string, summary?: (string | null) | undefined, topic_type?: ('product_guide' | 'comparison' | 'buying_guide' | 'competitor_alternative' | 'how_to' | 'faq' | 'news_update' | null) | undefined}>}}; export type CreateApiV1ShopsShopIdBlogPostsGenerateOptions = {baseUrl?: string | undefined, defaultValue?: string | undefined, fetch?: typeof fetch | undefined}; /** * Generate Blog Posts * * POST /v1/shops/{shopId}/blog-posts-generate */ export const createApiV1ShopsShopIdBlogPostsGenerate = async (args: CreateApiV1ShopsShopIdBlogPostsGenerateArgs, options?: CreateApiV1ShopsShopIdBlogPostsGenerateOptions) => { const {baseUrl = "https://api.sellauth.com", fetch: fetchFn = fetch, defaultValue} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (defaultValue !== undefined) headers.set('authorization', `Bearer ${defaultValue}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/shops/${encodeURIComponent(String(args.shopId))}/blog-posts-generate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };