arky-sdk 0.9.0 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AAEO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AAFF,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport enum PaymentMethodType {\n\tCash = \"cash\",\n\tCreditCard = \"credit_card\",\n}\n\nexport interface PaymentTaxLine {\n\trate_bps: number;\n\tamount: number;\n\tlabel?: string;\n\tscope?: string;\n}\n\nexport interface OrderPaymentTax {\n\tamount: number;\n\tmode_snapshot?: string;\n\trate_bps: number;\n\tlines: OrderPaymentTaxLine[];\n}\n\nexport interface OrderPaymentTaxLine {\n\trate_bps: number;\n\tamount: number;\n\tlabel?: string;\n\tscope?: string;\n}\n\nexport interface OrderPaymentPromoCode {\n\tid: string;\n\tcode: string;\n\ttype: string;\n\tvalue: number;\n}\n\n\nexport type OrderPaymentProvider = {\n\ttype: 'stripe';\n\tcustomer_id: string;\n\tpayment_intent_id?: string;\n};\n\nexport interface OrderPaymentRefund {\n\tid: string;\n\ttotal: number;\n\tprovider_refund_id?: string;\n\tstatus: string;\n\tcreated_at: number;\n}\n\nexport interface OrderPayment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: OrderPaymentTax;\n\tpromo_code?: OrderPaymentPromoCode;\n\tprovider?: OrderPaymentProvider;\n\trefunds: OrderPaymentRefund[];\n\tzone_id?: string;\n\tpayment_method_id?: string;\n\tshipping_method_id?: string;\n\tmethod_type: PaymentMethodType;\n}\n\nexport interface PromoCodeValidation {\n\tpromo_code_id: string;\n\tcode: string;\n\tdiscounts: import('./api').Discount[];\n\tconditions: import('./api').Condition[];\n}\n\nexport interface OrderQuote {\n\tid?: string;\n\texpires_at?: number;\n\tmarket: string;\n\tzone: Zone | null;\n\titems: QuoteLine[];\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshipping_method: ShippingMethod | null;\n\tpayment_method: PaymentMethod | null;\n\tpayment_methods: PaymentMethod[];\n\tpromo_code: PromoCodeValidation | null;\n\tpayment: OrderPayment;\n\tcharge_amount: number;\n}\n\n\nexport interface Price {\n\tcurrency: string;\n\tmarket: string;\n\tamount: number;\n\tcompare_at?: number;\n\taudience_id?: string;\n}\n\n\nexport type IntervalPeriod = 'month' | 'year';\n\n\nexport interface SubscriptionInterval {\n\tperiod: IntervalPeriod;\n\tcount: number;\n}\n\n\nexport interface PriceProvider {\n\ttype: string;\n\tid: string;\n}\n\n\nexport interface SubscriptionPrice {\n\tcurrency: string;\n\tamount: number;\n\tcompare_at?: number;\n\tinterval?: SubscriptionInterval;\n\tproviders: PriceProvider[];\n}\n\n\nexport interface Address {\n\tname?: string | null;\n\tcompany?: string | null;\n\tstreet1?: string | null;\n\tstreet2?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostal_code?: string | null;\n\tcountry?: string | null;\n\tphone?: string | null;\n\temail?: string | null;\n}\n\n\nexport interface GeoLocation {\n\tcoordinates?: { lat: number; lon: number } | null;\n\tlabel?: string | null;\n}\n\n\nexport interface ZoneLocation {\n\tcountry?: string | null;\n\tstate?: string | null;\n\tcity?: string | null;\n\tpostal_code?: string | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproduct_id: string;\n\tvariant_id: string;\n\tproduct_name: string;\n\tproduct_slug: string;\n\tvariant_attributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\tadded_at: number;\n\tmax_stock?: number;\n}\n\nexport type CartStatus = 'active' | 'abandoned' | 'converted' | 'expired';\nexport type CartOrigin = 'storefront' | 'admin';\n\nexport interface Cart {\n\tid: string;\n\tstore_id: string;\n\tcustomer_id: string;\n\ttoken: string;\n\tstatus: CartStatus;\n\torigin: CartOrigin;\n\tcreated_by_account_id?: string | null;\n\tmarket: string;\n\titems: import('./api').OrderCheckoutItemInput[];\n\tshipping_address?: Address | null;\n\tbilling_address?: Address | null;\n\tforms: FormEntry[];\n\tpromo_code?: string | null;\n\tpayment_method_id?: string | null;\n\tshipping_method_id?: string | null;\n\tquote_snapshot?: OrderQuote | null;\n\tconverted_order_id?: string | null;\n\titem_count: number;\n\tlast_activity_at: number;\n\tabandoned_at?: number | null;\n\trecovery_sent_at?: number | null;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport type IntegrationProvider =\n\t| { type: 'stripe'; secret_key?: string; publishable_key: string; webhook_secret?: string; currency: string }\n\t| { type: 'shippo'; api_token?: string }\n\t| { type: 'google'; client_id?: string; client_secret?: string; access_token?: string; refresh_token?: string;\n\t\ttoken_expires_at?: number; scopes: string[]; account_email?: string | null; connected_at: number }\n\t| { type: 'telegram_bot'; bot_token?: string }\n\t| { type: 'deep_seek'; api_key?: string; model?: string }\n\n\t| { type: 'open_ai'; api_key?: string; model?: string }\n\t| { type: 'slack'; api_key?: string }\n\t| { type: 'discord'; api_key?: string }\n\t| { type: 'whats_app'; api_key?: string }\n\t| { type: 'resend'; api_key?: string }\n\t| { type: 'send_grid'; api_key?: string }\n\t| { type: 'airtable'; api_key?: string }\n\t| { type: 'linear'; api_key?: string }\n\t| { type: 'git_hub'; api_key?: string }\n\t| { type: 'git_lab'; api_key?: string }\n\t| { type: 'dropbox'; api_key?: string }\n\t| { type: 'hub_spot'; api_key?: string }\n\t| { type: 'monday'; api_key?: string }\n\t| { type: 'click_up'; api_key?: string }\n\t| { type: 'pipedrive'; api_key?: string }\n\t| { type: 'calendly'; api_key?: string }\n\t| { type: 'typeform'; api_key?: string }\n\t| { type: 'webflow'; api_key?: string }\n\t| { type: 'trello'; api_key?: string }\n\t| { type: 'replicate'; api_key?: string }\n\t| { type: 'asana'; api_key?: string }\n\t| { type: 'brevo'; api_key?: string }\n\t| { type: 'intercom'; api_key?: string }\n\t| { type: 'notion'; api_key?: string }\n\t| { type: 'eleven_labs'; api_key?: string }\n\t| { type: 'active_campaign'; api_key?: string; account_url: string }\n\t| { type: 'shopify'; api_key?: string; store_domain: string }\n\t| { type: 'supabase'; api_key?: string; project_url: string }\n\t| { type: 'mailchimp'; api_key?: string }\n\n\t| { type: 'twilio'; account_sid?: string; auth_token?: string }\n\t| { type: 'jira'; email?: string; api_token?: string; domain: string }\n\t| { type: 'woo_commerce'; consumer_key?: string; consumer_secret?: string; store_url: string }\n\t| { type: 'freshdesk'; api_key?: string; domain: string }\n\t| { type: 'zendesk'; api_token?: string; email?: string; subdomain: string }\n\n\t| { type: 'salesforce'; access_token?: string; instance_url: string }\n\t| { type: 'zoom'; api_key?: string }\n\t| { type: 'microsoft_teams'; api_key?: string }\n\t| { type: 'firebase'; api_key?: string }\n\t| { type: 'arky'; api_key?: string }\n\n\t| { type: 'vercel_deploy_hook'; url?: string }\n\t| { type: 'netlify_deploy_hook'; url?: string }\n\t| { type: 'cloudflare_deploy_hook'; url?: string }\n\t| { type: 'custom_deploy_hook'; url?: string };\n\n\nexport interface Integration {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\tprovider: IntegrationProvider;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface ShippingWeightTier {\n\tup_to_grams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\tintegration_id?: string;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\teta_text: string;\n\tlocation_id?: string;\n\tintegration_id?: string;\n\tamount: number;\n\tfree_above?: number;\n\tweight_tiers?: ShippingWeightTier[];\n}\n\nexport interface Location {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\taddress: Address;\n\tis_pickup_location: boolean;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface InventoryLevel {\n\tlocation_id: string;\n\tavailable: number;\n\treserved: number;\n}\n\nexport interface ProductInventory {\n\tid: string;\n\tstore_id: string;\n\tproduct_id: string;\n\tvariant_id: string;\n\tlocation_id: string;\n\tavailable: number;\n\treserved: number;\n\tupdated_at: number;\n}\n\nexport interface ProductVariant {\n\tid: string;\n\tsku?: string;\n\tprices: Price[];\n\tinventory: ProductInventory[];\n\tattributes: Block[];\n\tweight?: number;\n}\n\nexport interface Product {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\tslug: Record<string, string>;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tfilters?: TaxonomyEntry[];\n\tvariants: ProductVariant[];\n\tstatus: ProductStatus;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface GalleryItem {\n\tid: string;\n\turl: string;\n\talt?: string;\n\tcaption?: string;\n}\n\nexport interface ProductLineItemSnapshot {\n\tproduct_key: string;\n\tvariant_sku?: string;\n\tvariant_attributes: Block[];\n\tprice: Price;\n}\n\nexport interface ServiceLineItemSnapshot {\n\tservice_key: string;\n\tprovider_key: string;\n\tprice: Price;\n}\n\nexport type OrderItemSnapshot = ProductLineItemSnapshot | ServiceLineItemSnapshot;\n\nexport type ProductQuoteLineAvailability =\n\t| { ok: true; available?: number }\n\t| { ok: false; reason: string };\n\nexport type ServiceQuoteLineAvailability =\n\t| { ok: true; spots: number }\n\t| { ok: false; reason: string };\n\nexport interface ProductQuoteLine {\n\ttype: 'product';\n\tline_id: string;\n\tproduct_id: string;\n\tvariant_id: string;\n\tquantity: number;\n\tunit_price: number;\n\tsubtotal: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tsnapshot: ProductLineItemSnapshot;\n\tavailability: ProductQuoteLineAvailability;\n}\n\nexport interface ServiceQuoteLine {\n\ttype: 'service';\n\tline_id: string;\n\tservice_id: string;\n\tprovider_id: string;\n\tfrom: number;\n\tto: number;\n\tquantity: 1;\n\tunit_price: number;\n\tsubtotal: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tsnapshot: ServiceLineItemSnapshot;\n\tavailability: ServiceQuoteLineAvailability;\n}\n\nexport type QuoteLine = ProductQuoteLine | ServiceQuoteLine;\n\nexport interface ProductLineItem {\n\ttype: 'product';\n\tid: string;\n\tproduct_id: string;\n\tvariant_id: string;\n\tquantity: number;\n\tlocation_id?: string;\n\tsnapshot: ProductLineItemSnapshot;\n\tstatus: OrderItemStatus;\n}\n\nexport interface ServiceLineItem {\n\ttype: 'service';\n\tid: string;\n\tservice_id: string;\n\tprovider_id: string;\n\tfrom: number;\n\tto: number;\n\tforms: FormEntry[];\n\tsnapshot: ServiceLineItemSnapshot;\n\tstatus: OrderItemStatus;\n}\n\nexport type OrderItem = ProductLineItem | ServiceLineItem;\n\nexport interface HistoryEntry {\n\taction: string;\n\treason?: string;\n\ttimestamp: number;\n}\n\nexport interface Order {\n\tid: string;\n\tnumber: string;\n\tstore_id: string;\n\tsource_cart_id: string;\n\tcustomer_id: string;\n\tstatus: OrderStatus;\n\tverified: boolean;\n\titems: OrderItem[];\n\tpayment: OrderPayment;\n\tshipping_address?: Address;\n\tbilling_address?: Address;\n\tforms: FormEntry[];\n\tshipments: Shipment[];\n\thistory: HistoryEntry[];\n\taudience_id?: string;\n\tfired_reminders: number[];\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface OrderCheckoutResult {\n\torder_id: string;\n\tnumber: string;\n\tclient_secret: string | null;\n\tpayment: OrderPayment;\n}\n\nexport interface Zone {\n\tid: string;\n\tstore_id: string;\n\tmarket_id: string;\n\tcountries: string[];\n\tstates: string[];\n\tpostal_codes: string[];\n\ttax_bps: number;\n\tshipping_methods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\tcurrency: string;\n\ttax_mode: \"exclusive\" | \"inclusive\";\n\tpayment_methods: PaymentMethod[];\n\tzones: Zone[];\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface StoreEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport type WebhookEventSubscription =\n\t| { event: 'node.created'; parent_id?: string }\n\t| { event: 'node.updated'; key?: string }\n\t| { event: 'node.deleted'; key?: string }\n\t| { event: 'order.created' }\n\t| { event: 'order.updated' }\n\t| { event: 'order.confirmed' }\n\t| { event: 'order.payment_received' }\n\t| { event: 'order.payment_failed' }\n\t| { event: 'order.refunded' }\n\t| { event: 'order.cancelled' }\n\t| { event: 'order.reminder' }\n\t| { event: 'order.shipment_created' }\n\t| { event: 'order.shipment_in_transit' }\n\t| { event: 'order.shipment_out_for_delivery' }\n\t| { event: 'order.shipment_delivered' }\n\t| { event: 'order.shipment_failed' }\n\t| { event: 'order.shipment_returned' }\n\t| { event: 'order.shipment_status_changed' }\n\t| { event: 'cart.created' }\n\t| { event: 'cart.updated' }\n\t| { event: 'cart.abandoned' }\n\t| { event: 'cart.converted' }\n\t| { event: 'product.created' }\n\t| { event: 'product.updated' }\n\t| { event: 'product.deleted' }\n\t| { event: 'provider.created' }\n\t| { event: 'provider.updated' }\n\t| { event: 'provider.deleted' }\n\t| { event: 'service.created' }\n\t| { event: 'service.updated' }\n\t| { event: 'service.deleted' }\n\t| { event: 'media.created' }\n\t| { event: 'media.deleted' }\n\t| { event: 'store.created' }\n\t| { event: 'store.updated' }\n\t| { event: 'store.deleted' }\n\t| { event: 'audience.created' }\n\t| { event: 'audience.updated' }\n\t| { event: 'audience.deleted' };\n\nexport interface Webhook {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\turl: string;\n\tevents: WebhookEventSubscription[];\n\theaders: Record<string, string>;\n\tsecret: string;\n\tenabled: boolean;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\n\nexport type StoreSubscriptionStatus =\n\t| 'pending'\n\t| 'active'\n\t| 'cancellation_scheduled'\n\t| 'cancelled'\n\t| 'expired';\n\nexport type StoreSubscriptionSource = 'signup' | 'admin' | 'import';\n\nexport type StoreSubscriptionProvider = {\n\ttype: 'stripe';\n\tcustomer_id: string;\n\tsubscription_id?: string;\n\tprice_id?: string;\n};\n\nexport interface StoreSubscriptionPayment {\n\tcurrency: string;\n\tmarket: string;\n\tprovider?: StoreSubscriptionProvider;\n}\n\nexport interface StoreSubscription {\n\tid: string;\n\ttarget: string;\n\tplan_id: string;\n\tpending_plan_id: string | null;\n\tpayment: StoreSubscriptionPayment;\n\tstatus: StoreSubscriptionStatus;\n\tstart_date: number;\n\tend_date: number;\n\ttoken: string;\n\tsource: StoreSubscriptionSource;\n}\n\nexport type AudienceSubscriptionStatus =\n\t| 'pending'\n\t| 'active'\n\t| 'cancellation_scheduled'\n\t| 'cancelled'\n\t| 'expired';\n\nexport type AudienceSubscriptionSource = 'signup' | 'admin' | 'import';\n\nexport type AudienceSubscriptionProvider = {\n\ttype: 'stripe';\n\tcustomer_id: string;\n\tsubscription_id?: string;\n\tprice_id?: string;\n};\n\nexport interface AudienceSubscriptionPayment {\n\tcurrency: string;\n\tmarket: string;\n\tprovider?: AudienceSubscriptionProvider;\n}\n\nexport interface AudienceSubscription {\n\tid: string;\n\tstore_id: string;\n\tcustomer_id: string;\n\taudience_id: string;\n\tplan_id: string;\n\tpending_plan_id: string | null;\n\tpayment: AudienceSubscriptionPayment;\n\tstatus: AudienceSubscriptionStatus;\n\tstart_date: number;\n\tend_date: number;\n\ttoken: string;\n\tsource: AudienceSubscriptionSource;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface Store {\n\tid: string;\n\tkey: string;\n\ttimezone: string;\n\tlanguages?: Language[];\n\temails?: StoreEmails;\n\tsubscription?: StoreSubscription;\n\tcounts?: Record<string, number>;\n}\n\nexport interface EshopStoreState {\n\tstore_id: string;\n\tselected_shipping_method_id: string | null;\n\tuser_token: string | null;\n\tprocessing_checkout: boolean;\n\tloading: boolean;\n\terror: string | null;\n}\n\nexport interface Block {\n\tid: string;\n\tkey: string;\n\ttype: string;\n\tproperties?: any;\n\tvalue?: any;\n}\n\nexport type TaxonomySchemaType = \"text\" | \"number\" | \"boolean\" | \"geo_location\";\n\nexport interface TaxonomySchema {\n\tid: string;\n\tkey: string;\n\ttype: TaxonomySchemaType;\n\tvalue?: string[];\n\tmin?: number | null;\n\tmax?: number | null;\n}\n\nexport interface TaxonomyField {\n\tid: string;\n\tkey: string;\n\ttype: TaxonomySchemaType;\n\tvalue: any;\n}\n\nexport interface TaxonomyFieldQuery {\n\tkey: string;\n\ttype: TaxonomySchemaType;\n\toperation?: string;\n\tvalue: any;\n\tcenter?: { lat: number; lon: number };\n\tradius?: number;\n}\n\nexport interface TaxonomyEntry {\n\ttaxonomy_id: string;\n\tfields: TaxonomyField[];\n}\n\nexport interface TaxonomyQuery {\n\ttaxonomy_id: string;\n\tquery: TaxonomyFieldQuery[];\n}\n\nexport type FormSchemaType = \"text\" | \"number\" | \"boolean\" | \"date\" | \"geo_location\" | \"select\";\n\nexport interface FormSchema {\n\tid: string;\n\tkey: string;\n\ttype: FormSchemaType;\n\trequired?: boolean;\n\tmin?: number | null;\n\tmax?: number | null;\n\toptions?: string[];\n}\n\nexport type FormFieldType = \"text\" | \"number\" | \"boolean\" | \"date\" | \"geo_location\" | \"select\";\n\nexport interface FormField {\n\tid: string;\n\tkey: string;\n\ttype: FormFieldType;\n\tvalue?: any;\n}\n\nexport interface FormEntry {\n\tform_id: string;\n\tfields: FormField[];\n}\n\nexport type BlockType =\n\t| \"text\"\n\t| \"localized_text\"\n\t| \"number\"\n\t| \"boolean\"\n\t| \"list\"\n\t| \"map\"\n\t| \"relationship_entry\"\n\t| \"relationship_media\"\n\t| \"markdown\"\n\t| \"geo_location\";\n\nexport interface GeoLocationBlockProperties {}\n\n\nexport type GeoLocationValue = GeoLocation;\n\nexport interface GeoLocationBlock extends Block {\n\ttype: \"geo_location\";\n\tproperties: GeoLocationBlockProperties;\n\tvalue: GeoLocation | null;\n}\n\nexport type Access = 'public' | 'private';\n\nexport interface MediaResolution {\n\tid: string;\n\tsize: string;\n\turl: string;\n}\n\nexport interface Media {\n\tid: string;\n\tresolutions: { [key: string]: MediaResolution };\n\tmime_type: string;\n\ttitle?: string | null;\n\tdescription?: string | null;\n\talt?: string | null;\n\tstore_id: string;\n\tentity?: string;\n\tmetadata?: string | null;\n\tcreated_at: number;\n\tslug: Record<string, string>;\n}\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tprovider_price_id?: string | null;\n\tprovider_product_id?: string | null;\n\tname: string;\n\ttier: number;\n\tamount: number;\n\tcurrency: string;\n\tinterval: string;\n\tinterval_count: number;\n\ttrial_period_days: number;\n}\n\nexport interface AccountToken {\n\tid: string;\n\tvalue?: string;\n\tname?: string | null;\n\tcreated_at: number;\n\texpires_at?: number | null;\n\ttype?: string;\n}\n\nexport interface StoreMembership {\n\tstore_id: string;\n\trole: import('./api').StoreRole;\n\tinvitation_token?: AccountToken | null;\n\tjoined_at?: number | null;\n}\n\nexport interface AccountLifecycle {\n\tlast_login_at?: number | null;\n\tonboarding_completed: boolean;\n}\n\nexport interface Account {\n\tid: string;\n\temail: string;\n\tmemberships: StoreMembership[];\n\tapi_tokens: AccountToken[];\n\tauth_tokens?: import('./api').AuthToken[];\n\tverification_codes?: unknown[];\n\tlifecycle?: AccountLifecycle;\n}\n\nexport interface AccountUpdateResponse {\n\tsuccess: boolean;\n\tnewly_created_tokens: AccountToken[];\n}\n\nexport interface ApiResponse<T> {\n\tsuccess: boolean;\n\tdata?: T;\n\terror?: string;\n\tcursor?: string;\n\ttotal?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\titems: T[];\n\tcursor: string | null;\n\tdata?: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\nexport type ServiceStatus = 'active' | 'draft' | 'archived';\nexport type ProviderStatus = 'active' | 'draft' | 'archived';\n\nexport type ProductStatus = 'active' | 'draft' | 'archived';\nexport type CustomerStatus = 'active' | 'archived';\nexport type AudienceStatus = 'active' | 'draft' | 'archived';\nexport type AgentChatStatus = 'active' | 'draft' | 'archived';\nexport type WorkflowStatus = 'active' | 'draft' | 'archived';\nexport type PromoCodeStatus = 'active' | 'draft' | 'archived';\nexport type NodeStatus = 'active' | 'draft' | 'archived';\nexport type EmailTemplateStatus = 'active' | 'draft' | 'archived';\nexport type FormStatus = 'active' | 'draft' | 'archived';\nexport type TaxonomyStatus = 'active' | 'draft' | 'archived';\n\nexport type OrderCancellationReason =\n\t| 'admin_rejected'\n\t| 'customer_cancelled'\n\t| 'payment_failed'\n\t| 'expired'\n\t| 'other';\n\nexport type OrderItemStatus =\n\t| { status: 'pending'; expires_at: number }\n\t| { status: 'confirmed' }\n\t| { status: 'cancelled'; reason: OrderCancellationReason };\n\nexport type OrderStatus =\n\t| 'pending'\n\t| 'partially_confirmed'\n\t| 'confirmed'\n\t| 'partially_cancelled'\n\t| 'cancelled';\n\nexport type OrderPaymentStatus =\n\t| { status: 'pending'; at: number }\n\t| { status: 'authorized'; at: number; amount: number }\n\t| { status: 'captured'; at: number; amount: number }\n\t| { status: 'failed'; at: number; reason?: string };\n\nexport interface TimeRange {\n\tfrom: number;\n\tto: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tstore_id: string;\n\tparent_id?: string | null;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tstatus: NodeStatus;\n\tslug: Record<string, string>;\n\tchildren: Node[];\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface EmailTemplate {\n\tid: string;\n\tkey: string;\n\tstore_id: string;\n\tsubject: Record<string, string>;\n\tbody: string;\n\tfrom_name: string;\n\tfrom_email: string;\n\treply_to?: string;\n\tpreheader?: string;\n\tstatus: EmailTemplateStatus;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface Form {\n\tid: string;\n\tkey: string;\n\tstore_id: string;\n\tschema: FormSchema[];\n\tstatus: FormStatus;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface FormSubmission {\n\tid: string;\n\tform_id: string;\n\tstore_id: string;\n\tcustomer_id: string;\n\tfields: FormField[];\n\tcreated_at: number;\n}\n\nexport interface Taxonomy {\n\tid: string;\n\tkey: string;\n\tstore_id: string;\n\tparent_id?: string | null;\n\tschema?: TaxonomySchema[];\n\tstatus: TaxonomyStatus;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface ServiceDuration {\n\tduration: number;\n\tis_pause: boolean;\n}\n\nexport interface WorkingHour {\n\tfrom: number;\n\tto: number;\n}\n\nexport interface WorkingDay {\n\tday: string;\n\tworking_hours: WorkingHour[];\n}\n\nexport interface SpecificDate {\n\tdate: number;\n\tworking_hours: WorkingHour[];\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tservice_id: string;\n\tprovider_id: string;\n\tstore_id: string;\n\tworking_days: WorkingDay[];\n\tspecific_dates: SpecificDate[];\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tslot_interval: number;\n\tforms: FormEntry[];\n\treminders: number[];\n\tmin_advance: number;\n\tmax_advance: number;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tslug: Record<string, string>;\n\tstore_id: string;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tfilters?: TaxonomyEntry[];\n\tcreated_at: number;\n\tupdated_at: number;\n\tstatus: ServiceStatus;\n}\n\n\nexport interface ProviderTimelinePoint {\n\ttimestamp: number;\n\tbooked: number;\n}\n\nexport interface Provider {\n\tid: string;\n\tkey: string;\n\tslug: Record<string, string>;\n\tstore_id: string;\n\tstatus: ProviderStatus;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tfilters?: TaxonomyEntry[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface WorkflowEdge {\n\tsource: string;\n\ttarget: string;\n\toutput: string;\n\tback_edge: boolean;\n}\n\nexport interface Workflow {\n\tid: string;\n\tkey: string;\n\tstore_id: string;\n\tsecret: string;\n\tstatus: WorkflowStatus;\n\tnodes: Record<string, WorkflowNode>;\n\tedges: WorkflowEdge[];\n\n\tschedule?: string;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport type WorkflowNode =\n\t| WorkflowTriggerNode\n\t| WorkflowHttpNode\n\t| WorkflowSwitchNode\n\t| WorkflowTransformNode\n\t| WorkflowLoopNode;\n\nexport interface WorkflowTriggerNode {\n\ttype: 'trigger';\n\tevent?: string;\n\tdelay_ms?: number;\n\tschema?: Block[];\n}\n\nexport interface WorkflowHttpNode {\n\ttype: 'http';\n\tmethod: WorkflowHttpMethod;\n\turl: string;\n\theaders?: Record<string, string>;\n\tbody?: any;\n\ttimeout_ms?: number;\n\tintegration_id?: string;\n\tintegration_provider_id?: string;\n\tdelay_ms?: number;\n\tretries?: number;\n\tretry_delay_ms?: number;\n}\n\nexport interface WorkflowSwitchRule {\n\tcondition: string;\n}\n\nexport interface WorkflowSwitchNode {\n\ttype: 'switch';\n\trules: WorkflowSwitchRule[];\n\tdelay_ms?: number;\n}\n\nexport interface WorkflowTransformNode {\n\ttype: 'transform';\n\tcode: string;\n\tdelay_ms?: number;\n}\n\nexport interface WorkflowLoopNode {\n\ttype: 'loop';\n\texpression: string;\n\tdelay_ms?: number;\n}\n\nexport type WorkflowHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';\n\nexport type ExecutionStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';\n\nexport interface NodeResult {\n\toutput: any;\n\troute: string;\n\tstarted_at: number;\n\tcompleted_at: number;\n\tduration_ms: number;\n\terror?: string;\n}\n\nexport interface WorkflowExecution {\n\tid: string;\n\tworkflow_id: string;\n\tstore_id: string;\n\tstatus: ExecutionStatus;\n\tinput: Record<string, any>;\n\tresults: Record<string, NodeResult>;\n\terror?: string;\n\tscheduled_at: number;\n\tstarted_at: number;\n\tcompleted_at?: number;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport type AudienceType =\n\t| { type: 'standard' }\n\t| { type: 'confirmation'; confirm_template_id: string }\n\t| { type: 'paid'; prices: SubscriptionPrice[]; payment_integration_id?: string };\n\nexport interface Audience {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\tstatus: AudienceStatus;\n\ttype: AudienceType;\n}\n\nexport interface AudienceAccessResponse {\n\thas_access: boolean;\n\tsubscription?: AudienceSubscription;\n}\n\nexport interface AudienceSubscribeResponse {\n\tcheckout_url?: string;\n\tsubscription?: AudienceSubscription;\n}\n\nexport type EventAction =\n\t\n\t| { action: 'order_created' }\n\t| { action: 'order_updated' }\n\t| { action: 'order_confirmed' }\n\t| { action: 'order_payment_received'; data: { amount: number; currency: string } }\n\t| { action: 'order_payment_failed'; data: { reason?: string } }\n\t| { action: 'order_refunded'; data: { amount: number; currency: string; reason?: string } }\n\t| { action: 'order_cancelled'; data: { reason?: string } }\n\t\n\t| { action: 'order_shipment_created'; data: { shipment_id: string } }\n\t| { action: 'order_shipment_in_transit'; data: { shipment_id: string } }\n\t| { action: 'order_shipment_out_for_delivery'; data: { shipment_id: string } }\n\t| { action: 'order_shipment_delivered'; data: { shipment_id: string } }\n\t| { action: 'order_shipment_failed'; data: { shipment_id: string; reason?: string } }\n\t| { action: 'order_shipment_returned'; data: { shipment_id: string } }\n\t| { action: 'order_shipment_status_changed'; data: { shipment_id: string; from: string; to: string } }\n\t\n\t\t| { action: 'product_created' }\n\t| { action: 'product_updated' }\n\t| { action: 'product_deleted' }\n\t\n\t| { action: 'node_created' }\n\t| { action: 'node_updated' }\n\t| { action: 'node_deleted' }\n\t\n\t| { action: 'provider_created' }\n\t| { action: 'provider_updated' }\n\t| { action: 'provider_deleted' }\n\t\n\t| { action: 'service_created' }\n\t| { action: 'service_updated' }\n\t| { action: 'service_deleted' }\n\t\n\t| { action: 'account_created' }\n\t| { action: 'account_updated' }\n\t| { action: 'account_deleted' }\n\t\n\t| { action: 'media_created' }\n\t| { action: 'media_deleted' }\n\t\n\t| { action: 'store_created' }\n\t| { action: 'store_updated' }\n\t| { action: 'store_deleted' }\n\t\n\t| { action: 'audience_created' }\n\t| { action: 'audience_updated' }\n\t| { action: 'audience_deleted' };\n\nexport interface Event {\n\tid: string;\n\tentity: string;\n\tevent: EventAction;\n\tactor: string;\n\tcreated_at: number;\n}\n\n\nexport type ShippingStatus =\n\t| 'pending'\n\t| 'label_created'\n\t| 'in_transit'\n\t| 'out_for_delivery'\n\t| 'delivered'\n\t| 'failed'\n\t| 'returned';\n\n\nexport interface OrderShipping {\n\tcarrier: string;\n\tservice: string;\n\ttracking_number?: string | null;\n\ttracking_url?: string | null;\n\tlabel_url?: string | null;\n\tstatus: ShippingStatus;\n}\n\n\nexport interface ShipmentLine {\n\torder_item_id: string;\n\tquantity: number;\n}\n\n\nexport interface Shipment {\n\tid: string;\n\tlocation_id: string;\n\tlines: ShipmentLine[];\n\tcarrier?: string | null;\n\tservice?: string | null;\n\ttracking_number?: string | null;\n\ttracking_url?: string | null;\n\tlabel_url?: string | null;\n\tstatus: ShippingStatus;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\n\nexport interface ShippingRate {\n\tid: string;\n\tprovider: string;\n\tcarrier: string;\n\tservice: string;\n\tdisplay_name: string;\n\tamount: number;\n\tcurrency: string;\n\testimated_days?: number | null;\n}\n\n\nexport type ShippingAddress = Address;\n\n\nexport interface Parcel {\n\tlength: number;\n\twidth: number;\n\theight: number;\n\tweight: number;\n\tdistance_unit: 'in' | 'cm';\n\tmass_unit: 'oz' | 'lb' | 'g' | 'kg';\n}\n\n\nexport interface PurchaseLabelResult {\n\ttracking_number: string;\n\ttracking_url?: string | null;\n\tlabel_url: string;\n\tcarrier: string;\n\tservice: string;\n}\n\n\nexport interface ShipResult {\n\tshipment_id: string;\n\ttracking_number: string;\n\ttracking_url?: string | null;\n\tlabel_url: string;\n}\n\n\nexport interface CustomsItem {\n\tdescription: string;\n\tquantity: number;\n\tnet_weight: string;\n\tmass_unit: string;\n\tvalue_amount: string;\n\tvalue_currency: string;\n\torigin_country: string;\n\ttariff_number?: string | null;\n}\n\n\nexport interface CustomsDeclaration {\n\tcontents_type: string;\n\tcontents_explanation?: string | null;\n\tnon_delivery_option: string;\n\tcertify: boolean;\n\tcertify_signer: string;\n\titems: CustomsItem[];\n}\n\nexport interface Agent {\n\tid: string;\n\tstore_id: string;\n\tkey: string;\n\tprompt: string;\n\tstatus: import('./api').AgentStatus;\n\tmodel_id: string;\n\tchannel_ids: string[];\n\ttools: string[];\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface AgentChat {\n\tid: string;\n\tstore_id: string;\n\tagent_id: string;\n\tcustomer_id: string;\n\tstatus: AgentChatStatus;\n\trating?: number;\n\trating_comment?: string;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n\nexport interface AgentChatMessage {\n\tid: string;\n\tstore_id: string;\n\tagent_id?: string;\n\tchat_id?: string;\n\tmessage: string;\n\tcreated_at: number;\n}\n\nexport interface PromoCode {\n\tid: string;\n\tstore_id: string;\n\tcode: string;\n\tdiscounts: import('./api').Discount[];\n\tconditions: import('./api').Condition[];\n\tstatus: PromoCodeStatus;\n\tuses: number;\n\tcreated_at: number;\n\tupdated_at: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AAEO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACL,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AAFH,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from \"./api\";\n\nexport enum PaymentMethodType {\n Cash = \"cash\",\n CreditCard = \"credit_card\",\n}\n\nexport interface PaymentTaxLine {\n rate_bps: number;\n amount: number;\n label?: string;\n scope?: string;\n}\n\nexport interface OrderPaymentTax {\n amount: number;\n mode_snapshot?: string;\n rate_bps: number;\n lines: OrderPaymentTaxLine[];\n}\n\nexport interface OrderPaymentTaxLine {\n rate_bps: number;\n amount: number;\n label?: string;\n scope?: string;\n}\n\nexport interface OrderPaymentPromoCode {\n id: string;\n code: string;\n type: string;\n value: number;\n}\n\nexport type OrderPaymentProvider = {\n type: \"stripe\";\n profile_id: string;\n payment_intent_id?: string;\n};\n\nexport interface OrderPaymentRefund {\n id: string;\n total: number;\n provider_refund_id?: string;\n status: string;\n created_at: number;\n}\n\nexport interface OrderPayment {\n currency: string;\n market: string;\n subtotal: number;\n shipping: number;\n discount: number;\n total: number;\n paid: number;\n tax?: OrderPaymentTax;\n promo_code?: OrderPaymentPromoCode;\n provider?: OrderPaymentProvider;\n refunds: OrderPaymentRefund[];\n zone_id?: string;\n payment_method_id?: string;\n shipping_method_id?: string;\n method_type: PaymentMethodType;\n}\n\nexport interface PromoCodeValidation {\n promo_code_id: string;\n code: string;\n discounts: import(\"./api\").Discount[];\n conditions: import(\"./api\").Condition[];\n}\n\nexport interface OrderQuote {\n id?: string;\n expires_at?: number;\n market: string;\n zone: Zone | null;\n items: QuoteLine[];\n subtotal: number;\n shipping: number;\n discount: number;\n tax: number;\n total: number;\n shipping_method: ShippingMethod | null;\n payment_method: PaymentMethod | null;\n payment_methods: PaymentMethod[];\n promo_code: PromoCodeValidation | null;\n payment: OrderPayment;\n charge_amount: number;\n}\n\nexport interface Price {\n currency: string;\n market: string;\n amount: number;\n compare_at?: number;\n profile_list_id?: string;\n}\n\nexport type IntervalPeriod = \"month\" | \"year\";\n\nexport interface SubscriptionInterval {\n period: IntervalPeriod;\n count: number;\n}\n\nexport interface PriceProvider {\n type: string;\n id: string;\n}\n\nexport interface SubscriptionPrice {\n currency: string;\n amount: number;\n compare_at?: number;\n interval?: SubscriptionInterval;\n providers: PriceProvider[];\n}\n\nexport interface Address {\n name?: string | null;\n company?: string | null;\n street1?: string | null;\n street2?: string | null;\n city?: string | null;\n state?: string | null;\n postal_code?: string | null;\n country?: string | null;\n phone?: string | null;\n email?: string | null;\n}\n\nexport interface GeoLocation {\n coordinates?: { lat: number; lon: number } | null;\n label?: string | null;\n}\n\nexport interface ZoneLocation {\n country?: string | null;\n state?: string | null;\n city?: string | null;\n postal_code?: string | null;\n}\n\nexport interface EshopCartItem {\n id: string;\n product_id: string;\n variant_id: string;\n product_name: string;\n product_slug: string;\n variant_attributes: Record<string, any>;\n price: Price;\n quantity: number;\n added_at: number;\n max_stock?: number;\n}\n\nexport type CartStatus = \"active\" | \"abandoned\" | \"converted\" | \"expired\";\nexport type CartOrigin = \"storefront\" | \"admin\";\n\nexport interface Cart {\n id: string;\n store_id: string;\n profile_id: string;\n token: string;\n status: CartStatus;\n origin: CartOrigin;\n created_by_account_id?: string | null;\n market: string;\n items: import(\"./api\").OrderCheckoutItemInput[];\n shipping_address?: Address | null;\n billing_address?: Address | null;\n forms: FormEntry[];\n promo_code?: string | null;\n payment_method_id?: string | null;\n shipping_method_id?: string | null;\n quote_snapshot?: OrderQuote | null;\n converted_order_id?: string | null;\n item_count: number;\n last_activity_at: number;\n abandoned_at?: number | null;\n recovery_sent_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport type IntegrationProvider =\n | {\n type: \"stripe\";\n secret_key?: string;\n publishable_key: string;\n webhook_secret?: string;\n currency: string;\n }\n | { type: \"shippo\"; api_token?: string }\n | {\n type: \"google\";\n client_id?: string;\n client_secret?: string;\n access_token?: string;\n refresh_token?: string;\n token_expires_at?: number;\n scopes: string[];\n account_email?: string | null;\n connected_at: number;\n }\n | { type: \"telegram_bot\"; bot_token?: string }\n | { type: \"deep_seek\"; api_key?: string; model?: string }\n | { type: \"brave_search\"; api_key?: string }\n | { type: \"open_ai\"; api_key?: string; model?: string }\n | { type: \"slack\"; api_key?: string }\n | { type: \"discord\"; api_key?: string }\n | { type: \"whats_app\"; api_key?: string }\n | { type: \"resend\"; api_key?: string }\n | { type: \"send_grid\"; api_key?: string }\n | { type: \"airtable\"; api_key?: string }\n | { type: \"linear\"; api_key?: string }\n | { type: \"git_hub\"; api_key?: string }\n | { type: \"git_lab\"; api_key?: string }\n | { type: \"dropbox\"; api_key?: string }\n | { type: \"hub_spot\"; api_key?: string }\n | { type: \"monday\"; api_key?: string }\n | { type: \"click_up\"; api_key?: string }\n | { type: \"pipedrive\"; api_key?: string }\n | { type: \"calendly\"; api_key?: string }\n | { type: \"typeform\"; api_key?: string }\n | { type: \"webflow\"; api_key?: string }\n | { type: \"trello\"; api_key?: string }\n | { type: \"replicate\"; api_key?: string }\n | { type: \"asana\"; api_key?: string }\n | { type: \"brevo\"; api_key?: string }\n | { type: \"intercom\"; api_key?: string }\n | { type: \"notion\"; api_key?: string }\n | { type: \"eleven_labs\"; api_key?: string }\n | { type: \"active_campaign\"; api_key?: string; account_url: string }\n | { type: \"shopify\"; api_key?: string; store_domain: string }\n | { type: \"supabase\"; api_key?: string; project_url: string }\n | { type: \"mailchimp\"; api_key?: string }\n | { type: \"twilio\"; account_sid?: string; auth_token?: string }\n | { type: \"jira\"; email?: string; api_token?: string; domain: string }\n | {\n type: \"woo_commerce\";\n consumer_key?: string;\n consumer_secret?: string;\n store_url: string;\n }\n | { type: \"freshdesk\"; api_key?: string; domain: string }\n | { type: \"zendesk\"; api_token?: string; email?: string; subdomain: string }\n | { type: \"salesforce\"; access_token?: string; instance_url: string }\n | { type: \"zoom\"; api_key?: string }\n | { type: \"microsoft_teams\"; api_key?: string }\n | { type: \"firebase\"; api_key?: string }\n | { type: \"arky\"; api_key?: string }\n | { type: \"vercel_deploy_hook\"; url?: string }\n | { type: \"netlify_deploy_hook\"; url?: string }\n | { type: \"cloudflare_deploy_hook\"; url?: string }\n | { type: \"custom_deploy_hook\"; url?: string };\n\nexport interface Integration {\n id: string;\n store_id: string;\n key: string;\n provider: IntegrationProvider;\n created_at: number;\n updated_at: number;\n}\n\nexport interface ShippingWeightTier {\n up_to_grams: number;\n amount: number;\n}\n\nexport interface PaymentMethod {\n id: string;\n integration_id?: string;\n}\n\nexport interface ShippingMethod {\n id: string;\n taxable: boolean;\n eta_text: string;\n location_id?: string;\n integration_id?: string;\n amount: number;\n free_above?: number;\n weight_tiers?: ShippingWeightTier[];\n}\n\nexport interface Location {\n id: string;\n store_id: string;\n key: string;\n address: Address;\n is_pickup_location: boolean;\n created_at: number;\n updated_at: number;\n}\n\nexport interface InventoryLevel {\n location_id: string;\n available: number;\n reserved: number;\n}\n\nexport interface ProductInventory {\n id: string;\n store_id: string;\n product_id: string;\n variant_id: string;\n location_id: string;\n available: number;\n reserved: number;\n updated_at: number;\n}\n\nexport interface ProductVariant {\n id: string;\n sku?: string;\n prices: Price[];\n inventory: ProductInventory[];\n attributes: Block[];\n weight?: number;\n}\n\nexport interface Product {\n id: string;\n store_id: string;\n key: string;\n slug: Record<string, string>;\n blocks: Block[];\n taxonomies: TaxonomyEntry[];\n filters?: TaxonomyEntry[];\n variants: ProductVariant[];\n status: ProductStatus;\n created_at: number;\n updated_at: number;\n}\n\nexport interface GalleryItem {\n id: string;\n url: string;\n alt?: string;\n caption?: string;\n}\n\nexport interface ProductLineItemSnapshot {\n product_key: string;\n variant_sku?: string;\n variant_attributes: Block[];\n price: Price;\n}\n\nexport interface ServiceLineItemSnapshot {\n service_key: string;\n provider_key: string;\n price: Price;\n}\n\nexport type OrderItemSnapshot =\n | ProductLineItemSnapshot\n | ServiceLineItemSnapshot;\n\nexport type ProductQuoteLineAvailability =\n | { ok: true; available?: number }\n | { ok: false; reason: string };\n\nexport type ServiceQuoteLineAvailability =\n | { ok: true; spots: number }\n | { ok: false; reason: string };\n\nexport interface ProductQuoteLine {\n type: \"product\";\n line_id: string;\n product_id: string;\n variant_id: string;\n quantity: number;\n unit_price: number;\n subtotal: number;\n discount: number;\n tax: number;\n total: number;\n snapshot: ProductLineItemSnapshot;\n availability: ProductQuoteLineAvailability;\n}\n\nexport interface ServiceQuoteLine {\n type: \"service\";\n line_id: string;\n service_id: string;\n provider_id: string;\n from: number;\n to: number;\n quantity: 1;\n unit_price: number;\n subtotal: number;\n discount: number;\n tax: number;\n total: number;\n snapshot: ServiceLineItemSnapshot;\n availability: ServiceQuoteLineAvailability;\n}\n\nexport type QuoteLine = ProductQuoteLine | ServiceQuoteLine;\n\nexport interface ProductLineItem {\n type: \"product\";\n id: string;\n product_id: string;\n variant_id: string;\n quantity: number;\n location_id?: string;\n snapshot: ProductLineItemSnapshot;\n status: OrderItemStatus;\n}\n\nexport interface ServiceLineItem {\n type: \"service\";\n id: string;\n service_id: string;\n provider_id: string;\n from: number;\n to: number;\n forms: FormEntry[];\n snapshot: ServiceLineItemSnapshot;\n status: OrderItemStatus;\n}\n\nexport type OrderItem = ProductLineItem | ServiceLineItem;\n\nexport interface HistoryEntry {\n action: string;\n reason?: string;\n timestamp: number;\n}\n\nexport interface Order {\n id: string;\n number: string;\n store_id: string;\n source_cart_id: string;\n profile_id: string;\n status: OrderStatus;\n verified: boolean;\n items: OrderItem[];\n payment: OrderPayment;\n shipping_address?: Address;\n billing_address?: Address;\n forms: FormEntry[];\n shipments: Shipment[];\n history: HistoryEntry[];\n profile_list_id?: string;\n fired_reminders: number[];\n created_at: number;\n updated_at: number;\n}\n\nexport interface OrderCheckoutResult {\n order_id: string;\n number: string;\n client_secret: string | null;\n payment: OrderPayment;\n}\n\nexport interface Zone {\n id: string;\n store_id: string;\n market_id: string;\n countries: string[];\n states: string[];\n postal_codes: string[];\n tax_bps: number;\n shipping_methods: ShippingMethod[];\n}\n\nexport interface Market {\n id: string;\n store_id: string;\n key: string;\n currency: string;\n tax_mode: \"exclusive\" | \"inclusive\";\n payment_methods: PaymentMethod[];\n zones: Zone[];\n created_at: number;\n updated_at: number;\n}\n\nexport interface Language {\n id: string;\n}\n\nexport interface StoreEmails {\n billing: string;\n support: string;\n}\n\nexport type WebhookEventSubscription =\n | { event: \"node.created\"; parent_id?: string }\n | { event: \"node.updated\"; key?: string }\n | { event: \"node.deleted\"; key?: string }\n | { event: \"order.created\" }\n | { event: \"order.updated\" }\n | { event: \"order.confirmed\" }\n | { event: \"order.payment_received\" }\n | { event: \"order.payment_failed\" }\n | { event: \"order.refunded\" }\n | { event: \"order.cancelled\" }\n | { event: \"order.reminder\" }\n | { event: \"order.shipment_created\" }\n | { event: \"order.shipment_in_transit\" }\n | { event: \"order.shipment_out_for_delivery\" }\n | { event: \"order.shipment_delivered\" }\n | { event: \"order.shipment_failed\" }\n | { event: \"order.shipment_returned\" }\n | { event: \"order.shipment_status_changed\" }\n | { event: \"cart.created\" }\n | { event: \"cart.updated\" }\n | { event: \"cart.abandoned\" }\n | { event: \"cart.converted\" }\n | { event: \"product.created\" }\n | { event: \"product.updated\" }\n | { event: \"product.deleted\" }\n | { event: \"provider.created\" }\n | { event: \"provider.updated\" }\n | { event: \"provider.deleted\" }\n | { event: \"service.created\" }\n | { event: \"service.updated\" }\n | { event: \"service.deleted\" }\n | { event: \"media.created\" }\n | { event: \"media.deleted\" }\n | { event: \"store.created\" }\n | { event: \"store.updated\" }\n | { event: \"store.deleted\" }\n | { event: \"profile_list.created\" }\n | { event: \"profile_list.updated\" }\n | { event: \"profile_list.profile_added\" }\n | { event: \"profile_list.profile_pending\" }\n | { event: \"profile_list.profile_confirmed\" }\n | { event: \"profile_list.profile_cancelled\" }\n | { event: \"account.updated\" };\n\nexport interface Webhook {\n id: string;\n store_id: string;\n key: string;\n url: string;\n events: WebhookEventSubscription[];\n headers: Record<string, string>;\n secret: string;\n enabled: boolean;\n created_at: number;\n updated_at: number;\n}\n\nexport type StoreSubscriptionStatus =\n | \"pending\"\n | \"active\"\n | \"cancellation_scheduled\"\n | \"cancelled\"\n | \"expired\";\n\nexport type StoreSubscriptionSource = \"signup\" | \"admin\" | \"import\";\n\nexport type StoreSubscriptionProvider = {\n type: \"stripe\";\n profile_id: string;\n subscription_id?: string;\n price_id?: string;\n};\n\nexport interface StoreSubscriptionPayment {\n currency: string;\n market: string;\n provider?: StoreSubscriptionProvider;\n}\n\nexport interface StoreSubscription {\n id: string;\n target: string;\n plan_id: string;\n pending_plan_id: string | null;\n payment: StoreSubscriptionPayment;\n status: StoreSubscriptionStatus;\n start_date: number;\n end_date: number;\n token: string;\n source: StoreSubscriptionSource;\n}\n\nexport type ProfileListMembershipProvider = {\n type: \"stripe\";\n stripe_customer_id: string;\n subscription_id?: string;\n price_id?: string;\n};\n\nexport interface ProfileListMembershipPayment {\n currency: string;\n market: string;\n provider?: ProfileListMembershipProvider;\n}\n\nexport interface Store {\n id: string;\n key: string;\n timezone: string;\n languages?: Language[];\n emails?: StoreEmails;\n subscription?: StoreSubscription;\n counts?: Record<string, number>;\n}\n\nexport interface EshopStoreState {\n store_id: string;\n selected_shipping_method_id: string | null;\n user_token: string | null;\n processing_checkout: boolean;\n loading: boolean;\n error: string | null;\n}\n\nexport interface Block {\n id: string;\n key: string;\n type: string;\n properties?: any;\n value?: any;\n}\n\nexport type TaxonomySchemaType = \"text\" | \"number\" | \"boolean\" | \"geo_location\";\n\nexport interface TaxonomySchema {\n id: string;\n key: string;\n type: TaxonomySchemaType;\n value?: string[];\n min?: number | null;\n max?: number | null;\n}\n\nexport interface TaxonomyField {\n id: string;\n key: string;\n type: TaxonomySchemaType;\n value: any;\n}\n\nexport interface TaxonomyFieldQuery {\n key: string;\n type: TaxonomySchemaType;\n operation?: string;\n value: any;\n center?: { lat: number; lon: number };\n radius?: number;\n}\n\nexport interface TaxonomyEntry {\n taxonomy_id: string;\n fields: TaxonomyField[];\n}\n\nexport interface TaxonomyQuery {\n taxonomy_id: string;\n query: TaxonomyFieldQuery[];\n}\n\nexport type FormSchemaType =\n | \"text\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"geo_location\"\n | \"select\";\n\nexport interface FormSchema {\n id: string;\n key: string;\n type: FormSchemaType;\n required?: boolean;\n min?: number | null;\n max?: number | null;\n options?: string[];\n}\n\nexport type FormFieldType =\n | \"text\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"geo_location\"\n | \"select\";\n\nexport interface FormField {\n id: string;\n key: string;\n type: FormFieldType;\n value?: any;\n}\n\nexport interface FormEntry {\n form_id: string;\n fields: FormField[];\n}\n\nexport type BlockType =\n | \"text\"\n | \"localized_text\"\n | \"number\"\n | \"boolean\"\n | \"list\"\n | \"map\"\n | \"relationship_entry\"\n | \"relationship_media\"\n | \"markdown\"\n | \"geo_location\";\n\nexport interface GeoLocationBlockProperties {}\n\nexport type GeoLocationValue = GeoLocation;\n\nexport interface GeoLocationBlock extends Block {\n type: \"geo_location\";\n properties: GeoLocationBlockProperties;\n value: GeoLocation | null;\n}\n\nexport type Access = \"public\" | \"private\";\n\nexport interface MediaResolution {\n id: string;\n size: string;\n url: string;\n}\n\nexport interface Media {\n id: string;\n resolutions: { [key: string]: MediaResolution };\n mime_type: string;\n title?: string | null;\n description?: string | null;\n alt?: string | null;\n store_id: string;\n entity?: string;\n metadata?: string | null;\n created_at: number;\n slug: Record<string, string>;\n}\n\nexport interface SubscriptionPlan {\n id: string;\n provider_price_id?: string | null;\n provider_product_id?: string | null;\n name: string;\n tier: number;\n amount: number;\n currency: string;\n interval: string;\n interval_count: number;\n trial_period_days: number;\n}\n\nexport interface AccountToken {\n id: string;\n value?: string;\n name?: string | null;\n created_at: number;\n expires_at?: number | null;\n type?: string;\n}\n\nexport interface StoreMembership {\n store_id: string;\n role: import(\"./api\").StoreRole;\n invitation_token?: AccountToken | null;\n joined_at?: number | null;\n}\n\nexport interface AccountLifecycle {\n last_login_at?: number | null;\n onboarding_completed: boolean;\n}\n\nexport interface Account {\n id: string;\n email: string;\n memberships: StoreMembership[];\n api_tokens: AccountToken[];\n auth_tokens?: import(\"./api\").AuthToken[];\n verification_codes?: unknown[];\n lifecycle?: AccountLifecycle;\n}\n\nexport interface AccountUpdateResponse {\n success: boolean;\n newly_created_tokens: AccountToken[];\n}\n\nexport interface ApiResponse<T> {\n success: boolean;\n data?: T;\n error?: string;\n cursor?: string;\n total?: number;\n}\n\nexport interface PaginatedResponse<T> {\n items: T[];\n cursor: string | null;\n data?: T[];\n meta?: {\n total: number;\n page: number;\n per_page: number;\n };\n}\n\nexport type ServiceStatus = \"active\" | \"draft\" | \"archived\";\nexport type ProviderStatus = \"active\" | \"draft\" | \"archived\";\n\nexport type ProductStatus = \"active\" | \"draft\" | \"archived\";\nexport type ProfileStatus = \"active\" | \"archived\";\nexport type ProfileListStatus = \"active\" | \"draft\" | \"archived\";\nexport type ProfileListSource =\n | \"manual\"\n | \"import\"\n | \"signup\"\n | \"admin\"\n | \"system\"\n | \"lead_research\";\nexport type ProfileListMembershipStatus =\n | \"pending\"\n | \"active\"\n | \"cancellation_scheduled\"\n | \"cancelled\"\n | \"expired\"\n | \"archived\";\nexport type MailboxStatus = \"active\" | \"draft\" | \"archived\";\nexport type MailboxPreset = \"gmail\" | \"zoho\" | \"microsoft\" | \"custom\";\nexport type MailboxConnectionSecurity = \"tls\" | \"start_tls\";\nexport type MailboxSyncStatus = \"not_ready\" | \"ready\" | \"failed\";\nexport type SmtpImapMailboxProvider = {\n type: \"smtp_imap\";\n preset: MailboxPreset;\n smtp_host: string;\n smtp_port: number;\n smtp_security: MailboxConnectionSecurity;\n imap_host: string;\n imap_port: number;\n imap_security: MailboxConnectionSecurity;\n username: string;\n password_configured: boolean;\n sync_enabled: boolean;\n sync_interval_seconds: number;\n sync_status?: MailboxSyncStatus;\n sync_error?: string | null;\n sync_ready_at?: number | null;\n last_synced_at?: number | null;\n last_seen_uid?: number | null;\n};\nexport type MailboxProvider = { type: \"fake\" } | SmtpImapMailboxProvider;\nexport type CampaignStatus =\n | \"draft\"\n | \"active\"\n | \"paused\"\n | \"completed\"\n | \"archived\";\nexport type CampaignRecipientStatus =\n | \"pending\"\n | \"active\"\n | \"replied\"\n | \"completed\"\n | \"suppressed\"\n | \"failed\"\n | \"stopped\";\nexport type CampaignRecipientImportSource =\n | \"profile_list\"\n | \"profile\"\n | \"manual\";\nexport type CampaignMessageStatus =\n | \"pending\"\n | \"sending\"\n | \"sent\"\n | \"received\"\n | \"bounced\"\n | \"failed\"\n | \"skipped\";\nexport type CampaignMessageKind =\n | \"campaign_step\"\n | \"manual_reply\"\n | \"inbound_reply\"\n | \"delivery_failure\"\n | \"activity\";\nexport type CampaignMessageDirection = \"outbound\" | \"inbound\" | \"activity\";\nexport type CampaignMessageCopySource = \"template\" | \"generated\" | \"edited\";\nexport type OutreachThreadMode = \"new_thread\" | \"same_thread\";\nexport type OutreachStepVariantStatus = \"active\" | \"archived\";\nexport type OutreachPersonalizationStatus =\n | \"idle\"\n | \"running\"\n | \"completed\"\n | \"failed\";\nexport type SuppressionStatus = \"active\" | \"archived\";\nexport type SuppressionTargetType = \"email\" | \"domain\" | \"profile\";\nexport type SuppressionScopeType = \"store\" | \"campaign\";\nexport type SuppressionReason =\n | \"manual\"\n | \"unsubscribed\"\n | \"bounced\"\n | \"complained\"\n | \"replied\";\nexport type SuppressionSource = \"admin\" | \"import\" | \"reply\" | \"system\";\nexport type WorkflowStatus = \"active\" | \"draft\" | \"archived\";\nexport type PromoCodeStatus = \"active\" | \"draft\" | \"archived\";\nexport type NodeStatus = \"active\" | \"draft\" | \"archived\";\nexport type EmailTemplateStatus = \"active\" | \"draft\" | \"archived\";\n\nexport type FormStatus = \"active\" | \"draft\" | \"archived\";\nexport type TaxonomyStatus = \"active\" | \"draft\" | \"archived\";\n\nexport type OrderCancellationReason =\n | \"admin_rejected\"\n | \"profile_cancelled\"\n | \"payment_failed\"\n | \"expired\"\n | \"other\";\n\nexport type OrderItemStatus =\n | { status: \"pending\"; expires_at: number }\n | { status: \"confirmed\" }\n | { status: \"cancelled\"; reason: OrderCancellationReason };\n\nexport type OrderStatus =\n | \"pending\"\n | \"partially_confirmed\"\n | \"confirmed\"\n | \"partially_cancelled\"\n | \"cancelled\";\n\nexport type OrderPaymentStatus =\n | { status: \"pending\"; at: number }\n | { status: \"authorized\"; at: number; amount: number }\n | { status: \"captured\"; at: number; amount: number }\n | { status: \"failed\"; at: number; reason?: string };\n\nexport interface TimeRange {\n from: number;\n to: number;\n}\n\nexport interface Node {\n id: string;\n key: string;\n store_id: string;\n parent_id?: string | null;\n blocks: Block[];\n taxonomies: TaxonomyEntry[];\n status: NodeStatus;\n slug: Record<string, string>;\n children: Node[];\n created_at: number;\n updated_at: number;\n}\n\nexport interface EmailTemplate {\n id: string;\n key: string;\n store_id: string;\n subject: Record<string, string>;\n body: string;\n from_name: string;\n from_email: string;\n reply_to?: string;\n preheader?: string;\n variables: EmailTemplateVariable[];\n sample_data: Record<string, unknown>;\n status: EmailTemplateStatus;\n created_at: number;\n updated_at: number;\n}\n\nexport interface EmailTemplateVariable {\n key: string;\n}\n\nexport interface Form {\n id: string;\n key: string;\n store_id: string;\n schema: FormSchema[];\n status: FormStatus;\n created_at: number;\n updated_at: number;\n}\n\nexport interface FormSubmission {\n id: string;\n form_id: string;\n store_id: string;\n profile_id: string;\n fields: FormField[];\n created_at: number;\n}\n\nexport interface Taxonomy {\n id: string;\n key: string;\n store_id: string;\n parent_id?: string | null;\n schema?: TaxonomySchema[];\n status: TaxonomyStatus;\n created_at: number;\n updated_at: number;\n}\n\nexport interface ServiceDuration {\n duration: number;\n is_pause: boolean;\n}\n\nexport interface WorkingHour {\n from: number;\n to: number;\n}\n\nexport interface WorkingDay {\n day: string;\n working_hours: WorkingHour[];\n}\n\nexport interface SpecificDate {\n date: number;\n working_hours: WorkingHour[];\n}\n\nexport interface ServiceProvider {\n id: string;\n service_id: string;\n provider_id: string;\n store_id: string;\n working_days: WorkingDay[];\n specific_dates: SpecificDate[];\n prices: Price[];\n durations: ServiceDuration[];\n slot_interval: number;\n forms: FormEntry[];\n reminders: number[];\n min_advance: number;\n max_advance: number;\n created_at: number;\n updated_at: number;\n}\n\nexport interface Service {\n id: string;\n key: string;\n slug: Record<string, string>;\n store_id: string;\n blocks: Block[];\n taxonomies: TaxonomyEntry[];\n filters?: TaxonomyEntry[];\n created_at: number;\n updated_at: number;\n status: ServiceStatus;\n}\n\nexport interface ProviderTimelinePoint {\n timestamp: number;\n booked: number;\n}\n\nexport interface Provider {\n id: string;\n key: string;\n slug: Record<string, string>;\n store_id: string;\n status: ProviderStatus;\n blocks: Block[];\n taxonomies: TaxonomyEntry[];\n filters?: TaxonomyEntry[];\n timeline: ProviderTimelinePoint[];\n created_at: number;\n updated_at: number;\n}\n\nexport interface WorkflowEdge {\n source: string;\n target: string;\n output: string;\n back_edge: boolean;\n}\n\nexport interface Workflow {\n id: string;\n key: string;\n store_id: string;\n secret: string;\n status: WorkflowStatus;\n nodes: Record<string, WorkflowNode>;\n edges: WorkflowEdge[];\n\n schedule?: string;\n created_at: number;\n updated_at: number;\n}\n\nexport type WorkflowNode =\n | WorkflowTriggerNode\n | WorkflowHttpNode\n | WorkflowSwitchNode\n | WorkflowTransformNode\n | WorkflowLoopNode;\n\nexport interface WorkflowTriggerNode {\n type: \"trigger\";\n event?: string;\n delay_ms?: number;\n schema?: Block[];\n}\n\nexport interface WorkflowHttpNode {\n type: \"http\";\n method: WorkflowHttpMethod;\n url: string;\n headers?: Record<string, string>;\n body?: any;\n timeout_ms?: number;\n integration_id?: string;\n integration_provider_id?: string;\n delay_ms?: number;\n retries?: number;\n retry_delay_ms?: number;\n}\n\nexport interface WorkflowSwitchRule {\n condition: string;\n}\n\nexport interface WorkflowSwitchNode {\n type: \"switch\";\n rules: WorkflowSwitchRule[];\n delay_ms?: number;\n}\n\nexport interface WorkflowTransformNode {\n type: \"transform\";\n code: string;\n delay_ms?: number;\n}\n\nexport interface WorkflowLoopNode {\n type: \"loop\";\n expression: string;\n delay_ms?: number;\n}\n\nexport type WorkflowHttpMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\";\n\nexport type ExecutionStatus =\n | \"pending\"\n | \"running\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\";\n\nexport interface NodeResult {\n output: any;\n route: string;\n started_at: number;\n completed_at: number;\n duration_ms: number;\n error?: string;\n}\n\nexport interface WorkflowExecution {\n id: string;\n workflow_id: string;\n store_id: string;\n status: ExecutionStatus;\n input: Record<string, any>;\n results: Record<string, NodeResult>;\n error?: string;\n scheduled_at: number;\n started_at: number;\n completed_at?: number;\n created_at: number;\n updated_at: number;\n}\n\nexport type ProfileListType =\n | { type: \"standard\" }\n | { type: \"confirmation\"; confirm_template_id?: string | null }\n | {\n type: \"paid\";\n prices: SubscriptionPrice[];\n payment_integration_id?: string | null;\n };\n\nexport interface ProfileAuthToken {\n id: string;\n token: string;\n created_at: number;\n}\n\nexport interface ProfileVerificationCode {\n code: string;\n created_at: number;\n used: boolean;\n store_id?: string | null;\n}\n\nexport interface PromoUsage {\n promo_code_id: string;\n uses: number;\n}\n\nexport interface Profile {\n id: string;\n store_id: string;\n email: string | null;\n verified: boolean;\n status: ProfileStatus;\n promo_usage: PromoUsage[];\n lists: ProfileListMembership[];\n taxonomies: TaxonomyEntry[];\n auth_tokens: ProfileAuthToken[];\n verification_codes: ProfileVerificationCode[];\n created_at: number;\n updated_at: number;\n}\n\nexport interface ProfileListAccessResponse {\n has_access: boolean;\n membership?: ProfileListMembership | null;\n}\n\nexport interface ProfileListSubscribeResponse {\n checkout_url?: string | null;\n membership?: ProfileListMembership | null;\n}\n\nexport interface ProfileList {\n id: string;\n store_id: string;\n key: string;\n name: string;\n description?: string | null;\n status: ProfileListStatus;\n type: ProfileListType;\n source: ProfileListSource;\n member_count: number;\n created_at: number;\n updated_at: number;\n}\n\nexport interface ProfileListMembership {\n id: string;\n store_id: string;\n profile_id: string;\n profile_list_id: string;\n source: ProfileListSource;\n fields: Record<string, unknown>;\n lead_description?: string | null;\n status: ProfileListMembershipStatus;\n plan_id: string;\n pending_plan_id: string | null;\n payment: ProfileListMembershipPayment;\n start_date: number;\n end_date: number;\n token: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface ProfileListMember {\n profile: Profile;\n membership: ProfileListMembership;\n}\n\nexport interface Mailbox {\n id: string;\n store_id: string;\n key: string;\n email: string;\n from_name: string;\n reply_to_email?: string | null;\n provider: MailboxProvider;\n status: MailboxStatus;\n daily_limit: number;\n sent_today: number;\n last_sent_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface OutreachStepVariant {\n id?: string;\n position?: number;\n weight: number;\n name?: string;\n template_id?: string | null;\n template_vars?: Record<string, unknown>;\n status?: OutreachStepVariantStatus;\n}\n\nexport interface OutreachStep {\n id?: string;\n position?: number;\n delay_seconds?: number;\n variants: OutreachStepVariant[];\n thread_mode?: OutreachThreadMode;\n attachments?: string[];\n}\n\nexport interface OutreachPersonalizationCounters {\n total_profiles: number;\n draft_messages: number;\n generated_messages: number;\n template_messages: number;\n failed_messages: number;\n}\n\nexport interface OutreachPersonalizationState {\n status: OutreachPersonalizationStatus;\n model_integration_id?: string | null;\n step_position?: number | null;\n profile_ids: string[];\n overwrite: boolean;\n instructions?: string | null;\n error?: string | null;\n counters: OutreachPersonalizationCounters;\n started_at?: number | null;\n completed_at?: number | null;\n}\n\nexport interface Campaign {\n id: string;\n store_id: string;\n key: string;\n name: string;\n mailbox_ids: string[];\n status: CampaignStatus;\n steps: OutreachStep[];\n personalization: OutreachPersonalizationState;\n launched_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface CampaignLaunchReadiness {\n ready: boolean;\n blockers: string[];\n warnings: string[];\n profile_count: number;\n sender_count: number;\n step_count: number;\n daily_capacity: number;\n expected_drafts: number;\n draft_count: number;\n pending_drafts: number;\n generated_drafts: number;\n template_drafts: number;\n edited_drafts: number;\n personalization_errors: number;\n stale_drafts: number;\n suppression_count: number;\n}\n\nexport interface CampaignRecipientImportResult {\n imported_count: number;\n existing_count: number;\n skipped_count: number;\n draft_count: number;\n}\n\nexport interface CampaignRecipientDraft {\n id: string;\n step_id?: string | null;\n step_position: number;\n step_variant_id?: string | null;\n step_variant_position?: number | null;\n step_variant_name?: string | null;\n template_copy_hash?: string | null;\n copy_source: CampaignMessageCopySource;\n personalized_at?: number | null;\n edited_at?: number | null;\n personalization_error?: string | null;\n mailbox_id?: string | null;\n from_email?: string | null;\n to_email: string;\n subject: string;\n body: string;\n body_html?: string | null;\n template_id?: string | null;\n template_vars: Record<string, unknown>;\n created_at: number;\n updated_at: number;\n}\n\nexport interface CampaignRecipient {\n id: string;\n store_id: string;\n campaign_id: string;\n profile_id: string;\n profile_list_membership_id?: string | null;\n import_source: CampaignRecipientImportSource;\n import_source_id?: string | null;\n imported_at?: number | null;\n mailbox_id?: string | null;\n lead_description?: string | null;\n fields: Record<string, unknown>;\n drafts: CampaignRecipientDraft[];\n status: CampaignRecipientStatus;\n current_step_position: number;\n next_send_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface CampaignMessage {\n id: string;\n store_id: string;\n campaign_id: string;\n campaign_recipient_id: string;\n profile_id: string;\n mailbox_id: string;\n direction: CampaignMessageDirection;\n kind: CampaignMessageKind;\n step_id?: string | null;\n step_position?: number | null;\n step_variant_id?: string | null;\n step_variant_position?: number | null;\n step_variant_name?: string | null;\n template_copy_hash?: string | null;\n copy_source: CampaignMessageCopySource;\n personalized_at?: number | null;\n edited_at?: number | null;\n personalization_error?: string | null;\n in_reply_to_message_id?: string | null;\n status: CampaignMessageStatus;\n to_email: string;\n from_email: string;\n subject: string;\n body: string;\n body_html?: string | null;\n template_id?: string | null;\n template_vars: Record<string, unknown>;\n rendered_subject?: string | null;\n rendered_html?: string | null;\n rendered_text?: string | null;\n attachments: string[];\n provider_message_id?: string | null;\n provider_thread_id?: string | null;\n error?: string | null;\n sent_at?: number | null;\n received_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface CampaignRecipientConversationResponse {\n recipient: CampaignRecipient;\n messages: CampaignMessage[];\n}\n\nexport interface Suppression {\n id: string;\n store_id: string;\n campaign_id?: string | null;\n profile_id?: string | null;\n email?: string | null;\n domain?: string | null;\n target_type: SuppressionTargetType;\n target_key: string;\n scope_type: SuppressionScopeType;\n scope_key: string;\n reason: SuppressionReason;\n status: SuppressionStatus;\n source: SuppressionSource;\n created_at: number;\n updated_at: number;\n}\n\nexport type LeadResearchRunStatus =\n | \"draft\"\n | \"running\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\";\n\nexport type LeadEmailClassification =\n | \"official_domain\"\n | \"role_official\"\n | \"personal_official\"\n | \"free_mail\"\n | \"unusable\"\n | \"unknown\";\n\nexport type LeadValidationCheckStatus =\n | \"passed\"\n | \"warning\"\n | \"failed\"\n | \"unknown\";\n\nexport interface LeadResearchRun {\n id: string;\n store_id: string;\n integration_id: string;\n profile_list_id: string;\n title?: string | null;\n status: LeadResearchRunStatus;\n error?: string | null;\n started_at?: number | null;\n completed_at?: number | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface LeadValidationCheck {\n key: string;\n status: LeadValidationCheckStatus;\n message: string;\n}\n\nexport interface LeadEmailValidationResult {\n email: string;\n normalized_email?: string | null;\n domain?: string | null;\n classification: LeadEmailClassification;\n confidence: number;\n importable: boolean;\n hard_blockers: string[];\n checks: LeadValidationCheck[];\n}\n\nexport interface LeadResearchMessage {\n id: string;\n role: string;\n content: string;\n created_at: number;\n}\n\nexport interface ResearchProfileListMember {\n profile: Profile;\n membership: ProfileListMembership;\n}\n\nexport interface SendLeadResearchMessageResult {\n response: string;\n run: LeadResearchRun;\n profile_list_members: ResearchProfileListMember[];\n}\n\nexport type EventAction =\n | { action: \"order_created\" }\n | { action: \"order_updated\" }\n | { action: \"order_confirmed\" }\n | {\n action: \"order_payment_received\";\n data: { amount: number; currency: string };\n }\n | { action: \"order_payment_failed\"; data: { reason?: string } }\n | {\n action: \"order_refunded\";\n data: { amount: number; currency: string; reason?: string };\n }\n | { action: \"order_cancelled\"; data: { reason?: string } }\n | { action: \"order_shipment_created\"; data: { shipment_id: string } }\n | { action: \"order_shipment_in_transit\"; data: { shipment_id: string } }\n | { action: \"order_shipment_out_for_delivery\"; data: { shipment_id: string } }\n | { action: \"order_shipment_delivered\"; data: { shipment_id: string } }\n | {\n action: \"order_shipment_failed\";\n data: { shipment_id: string; reason?: string };\n }\n | { action: \"order_shipment_returned\"; data: { shipment_id: string } }\n | {\n action: \"order_shipment_status_changed\";\n data: { shipment_id: string; from: string; to: string };\n }\n | { action: \"product_created\" }\n | { action: \"product_updated\" }\n | { action: \"product_deleted\" }\n | { action: \"node_created\" }\n | { action: \"node_updated\" }\n | { action: \"node_deleted\" }\n | { action: \"provider_created\" }\n | { action: \"provider_updated\" }\n | { action: \"provider_deleted\" }\n | { action: \"service_created\" }\n | { action: \"service_updated\" }\n | { action: \"service_deleted\" }\n | { action: \"account_created\" }\n | { action: \"account_updated\" }\n | { action: \"account_deleted\" }\n | { action: \"media_created\" }\n | { action: \"media_deleted\" }\n | { action: \"store_created\" }\n | { action: \"store_updated\" }\n | { action: \"store_deleted\" }\n | { action: \"profile_list_created\" }\n | { action: \"profile_list_updated\" }\n | { action: \"profile_list_profile_added\" }\n | { action: \"profile_list_profile_removed\" }\n | { action: \"profile_list_profile_pending\" }\n | { action: \"profile_list_profile_confirmed\" }\n | { action: \"profile_list_profile_cancelled\" };\n\nexport interface Event {\n id: string;\n entity: string;\n event: EventAction;\n actor: string;\n created_at: number;\n}\n\nexport type ShippingStatus =\n | \"pending\"\n | \"label_created\"\n | \"in_transit\"\n | \"out_for_delivery\"\n | \"delivered\"\n | \"failed\"\n | \"returned\";\n\nexport interface OrderShipping {\n carrier: string;\n service: string;\n tracking_number?: string | null;\n tracking_url?: string | null;\n label_url?: string | null;\n status: ShippingStatus;\n}\n\nexport interface ShipmentLine {\n order_item_id: string;\n quantity: number;\n}\n\nexport interface Shipment {\n id: string;\n location_id: string;\n lines: ShipmentLine[];\n carrier?: string | null;\n service?: string | null;\n tracking_number?: string | null;\n tracking_url?: string | null;\n label_url?: string | null;\n status: ShippingStatus;\n created_at: number;\n updated_at: number;\n}\n\nexport interface ShippingRate {\n id: string;\n provider: string;\n carrier: string;\n service: string;\n display_name: string;\n amount: number;\n currency: string;\n estimated_days?: number | null;\n}\n\nexport type ShippingAddress = Address;\n\nexport interface Parcel {\n length: number;\n width: number;\n height: number;\n weight: number;\n distance_unit: \"in\" | \"cm\";\n mass_unit: \"oz\" | \"lb\" | \"g\" | \"kg\";\n}\n\nexport interface PurchaseLabelResult {\n tracking_number: string;\n tracking_url?: string | null;\n label_url: string;\n carrier: string;\n service: string;\n}\n\nexport interface ShipResult {\n shipment_id: string;\n tracking_number: string;\n tracking_url?: string | null;\n label_url: string;\n}\n\nexport interface CustomsItem {\n description: string;\n quantity: number;\n net_weight: string;\n mass_unit: string;\n value_amount: string;\n value_currency: string;\n origin_country: string;\n tariff_number?: string | null;\n}\n\nexport interface CustomsDeclaration {\n contents_type: string;\n contents_explanation?: string | null;\n non_delivery_option: string;\n certify: boolean;\n certify_signer: string;\n items: CustomsItem[];\n}\n\nexport interface PromoCode {\n id: string;\n store_id: string;\n code: string;\n discounts: import(\"./api\").Discount[];\n conditions: import(\"./api\").Condition[];\n status: PromoCodeStatus;\n uses: number;\n created_at: number;\n updated_at: number;\n}\n"]}
package/dist/utils.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- export { k as convertToMajor, l as convertToMinor, a as formatMinor, c as getAvailableStock, b as getCurrencyName, g as getCurrencySymbol, j as getFirstAvailableFCId, e as getInventoryAt, d as getReservedStock, h as hasStock, i as isValidKey, n as nameToKey, t as toKey, v as validateKey } from './index-C5gikdBg.cjs';
2
- import './types.cjs';
1
+ export { k as convertToMajor, l as convertToMinor, a as formatMinor, c as getAvailableStock, b as getCurrencyName, g as getCurrencySymbol, j as getFirstAvailableFCId, e as getInventoryAt, d as getReservedStock, h as hasStock, i as isValidKey, n as nameToKey, t as toKey, v as validateKey } from './index-nCF3Z6Af.cjs';
2
+ import './api-BbBHcd4p.cjs';
package/dist/utils.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { k as convertToMajor, l as convertToMinor, a as formatMinor, c as getAvailableStock, b as getCurrencyName, g as getCurrencySymbol, j as getFirstAvailableFCId, e as getInventoryAt, d as getReservedStock, h as hasStock, i as isValidKey, n as nameToKey, t as toKey, v as validateKey } from './index-MFMjlIfS.js';
2
- import './types.js';
1
+ export { k as convertToMajor, l as convertToMinor, a as formatMinor, c as getAvailableStock, b as getCurrencyName, g as getCurrencySymbol, j as getFirstAvailableFCId, e as getInventoryAt, d as getReservedStock, h as hasStock, i as isValidKey, n as nameToKey, t as toKey, v as validateKey } from './index-CZxubTDA.js';
2
+ import './api-BbBHcd4p.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.9.6",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one store platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -48,7 +48,8 @@
48
48
  "build": "tsup",
49
49
  "test": "npm run build && node scripts/smoke-store.mjs",
50
50
  "dev": "tsup --watch",
51
- "clean": "rm -rf dist"
51
+ "clean": "rm -rf dist",
52
+ "prepare": "npm run build"
52
53
  },
53
54
  "keywords": [
54
55
  "arky",