/** * Shopify Admin REST API client. * * Uses direct HTTP calls instead of the heavy @shopify/shopify-api SDK. * This keeps the package lightweight and avoids the OAuth ceremony that * the official SDK requires -- we only need token-based access. * * Targets Shopify Admin API version 2025-01. */ export interface ShopifyImage { id: number; product_id: number; src: string; alt: string | null; width: number; height: number; position: number; } export interface ShopifyVariant { id: number; product_id: number; title: string; price: string; sku: string; inventory_quantity: number; compare_at_price: string | null; weight: number; weight_unit: string; option1: string | null; option2: string | null; option3: string | null; barcode: string | null; taxable: boolean; requires_shipping: boolean; } export interface ShopifyProduct { id: number; title: string; body_html: string | null; vendor: string; product_type: string; handle: string; status: string; tags: string; created_at: string; updated_at: string; published_at: string | null; template_suffix: string | null; published_scope: string; admin_graphql_api_id: string; variants: ShopifyVariant[]; images: ShopifyImage[]; image: ShopifyImage | null; options: Array<{ id: number; product_id: number; name: string; position: number; values: string[]; }>; } export interface ShopifyMetafield { id: number; namespace: string; key: string; value: string; type: string; owner_id: number; owner_resource: string; } export interface ShopifyCollection { id: number; handle: string; title: string; body_html: string | null; sort_order: string; published_at: string | null; updated_at: string; template_suffix: string | null; published_scope: string; admin_graphql_api_id: string; image?: ShopifyImage | null; } export interface ShopifySmartCollection extends ShopifyCollection { rules: Array<{ column: string; relation: string; condition: string; }>; disjunctive: boolean; } export interface ShopifyCollect { id: number; collection_id: number; product_id: number; position: number; sort_value: string; created_at: string; updated_at: string; } export interface ShopifyOrder { id: number; name: string; email: string; created_at: string; updated_at: string; financial_status: string; fulfillment_status: string | null; total_price: string; subtotal_price: string; total_tax: string; total_discounts: string; currency: string; order_number: number; note: string | null; tags: string; customer: { id: number; first_name: string; last_name: string; email: string; } | null; line_items: Array<{ id: number; title: string; quantity: number; price: string; sku: string; variant_title: string | null; product_id: number | null; variant_id: number | null; }>; shipping_address?: { city: string; province: string; country: string; } | null; billing_address?: { city: string; province: string; country: string; } | null; } export interface ShopifyShop { id: number; name: string; email: string; domain: string; myshopify_domain: string; plan_name: string; plan_display_name: string; currency: string; money_format: string; timezone: string; iana_timezone: string; country_name: string; country_code: string; province: string; city: string; address1: string; phone: string; created_at: string; updated_at: string; weight_unit: string; primary_locale: string; shop_owner: string; customer_email: string; enabled_presentment_currencies: string[]; } export declare class ShopifyClient { private baseUrl; private headers; constructor(storeUrl: string, accessToken: string); private request; private get; private post; private put; listProducts(params?: { limit?: number; status?: string; vendor?: string; product_type?: string; collection_id?: number; since_id?: number; fields?: string; }): Promise; getProduct(productId: number): Promise; updateProduct(productId: number, updates: Partial<{ title: string; body_html: string; tags: string; status: string; vendor: string; product_type: string; metafields_global_title_tag: string; metafields_global_description_tag: string; }>): Promise; searchProducts(query: string): Promise; getProductMetafields(productId: number): Promise; setProductMetafield(productId: number, namespace: string, key: string, value: string, type?: string): Promise; listCustomCollections(params?: { limit?: number; since_id?: number; }): Promise; listSmartCollections(params?: { limit?: number; since_id?: number; }): Promise; createCustomCollection(params: { title: string; body_html?: string; published?: boolean; sort_order?: string; }): Promise; addProductToCollection(collectionId: number, productId: number): Promise; listOrders(params?: { limit?: number; status?: string; financial_status?: string; fulfillment_status?: string; since_id?: number; created_at_min?: string; created_at_max?: string; }): Promise; getShop(): Promise; graphql(query: string, variables?: Record): Promise; /** * Update SEO title and description for a product using the REST API's * metafields_global_title_tag and metafields_global_description_tag fields. */ updateProductSeo(productId: number, seoTitle?: string, seoDescription?: string): Promise; } //# sourceMappingURL=shopify-client.d.ts.map