arky-sdk 0.7.78 → 0.7.84

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.
@@ -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.cjs","sourcesContent":["export * from './api';\n\nexport enum PaymentMethodType {\n\tCash = \"cash\",\n\tCreditCard = \"credit_card\",\n}\n\nexport interface PaymentTaxLine {\n\trateBps: number;\n\tamount: number;\n\tlabel?: string;\n\tscope?: string;\n}\n\nexport interface BookingPaymentTax {\n\tamount: number;\n\tmodeSnapshot?: string;\n\trateBps: number;\n\tlines: BookingPaymentTaxLine[];\n}\n\nexport interface BookingPaymentTaxLine {\n\trateBps: number;\n\tamount: number;\n\tlabel?: string;\n\tscope?: string;\n}\n\nexport interface BookingPaymentPromoCode {\n\tid: string;\n\tcode: string;\n\ttype: string;\n\tvalue: number;\n}\n\nexport type BookingPaymentProvider = {\n\ttype: 'stripe';\n\tcustomerId: string;\n\tpaymentIntentId?: string;\n};\n\nexport interface BookingPaymentRefund {\n\tid: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: number;\n}\n\nexport interface BookingPayment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: BookingPaymentTax;\n\tpromoCode?: BookingPaymentPromoCode;\n\tprovider?: BookingPaymentProvider;\n\trefunds: BookingPaymentRefund[];\n\tpaymentMethodId?: string;\n\tmethodType: PaymentMethodType;\n}\n\nexport interface OrderPaymentTax {\n\tamount: number;\n\tmodeSnapshot?: string;\n\trateBps: number;\n\tlines: OrderPaymentTaxLine[];\n}\n\nexport interface OrderPaymentTaxLine {\n\trateBps: 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\nexport type OrderPaymentProvider = {\n\ttype: 'stripe';\n\tcustomerId: string;\n\tpaymentIntentId?: string;\n};\n\nexport interface OrderPaymentRefund {\n\tid: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: 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\tpromoCode?: OrderPaymentPromoCode;\n\tprovider?: OrderPaymentProvider;\n\trefunds: OrderPaymentRefund[];\n\tzoneId?: string;\n\tpaymentMethodId?: string;\n\tshippingMethodId?: string;\n\tmethodType: PaymentMethodType;\n}\n\nexport interface PromoCodeValidation {\n\tpromoCodeId: string;\n\tcode: string;\n\tdiscounts: any[];\n\tconditions: any[];\n}\n\nexport interface BookingQuote {\n\tmarket: string;\n\tzone: Zone | null;\n\tsubtotal: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tpaymentMethod: PaymentMethod | null;\n\tpaymentMethods: PaymentMethod[];\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: BookingPayment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\nexport interface OrderQuote {\n\tmarket: string;\n\tzone: Zone | null;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshippingMethod: ShippingMethod | null;\n\tpaymentMethod: PaymentMethod | null;\n\tpaymentMethods: PaymentMethod[];\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: OrderPayment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\n\nexport interface Price {\n\tcurrency: string;\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n\taudienceId?: 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\tcompareAt?: number;\n\tinterval?: SubscriptionInterval;\n\tproviders: PriceProvider[];\n}\n\n\nexport interface Address {\n\tname: string;\n\tcompany?: string | null;\n\tstreet1: string;\n\tstreet2?: string | null;\n\tcity: string;\n\tstate: string;\n\tpostalCode: string;\n\tcountry: string;\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\tpostalCode?: string | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproductId: string;\n\tvariantId: string;\n\tproductName: string;\n\tproductSlug: string;\n\tvariantAttributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\taddedAt: number;\n\tmaxStock?: number;\n}\n\nexport interface BookingCartItem {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\tproviderId?: string;\n\tforms: any[];\n}\n\n\nexport type IntegrationProvider =\n\t| { type: 'stripe'; secretKey?: string; publishableKey: string; webhookSecret?: string; currency: string }\n\t| { type: 'shippo'; apiToken?: string }\n\t| { type: 'google'; clientId?: string; clientSecret?: string; accessToken?: string; refreshToken?: string;\n\t\ttokenExpiresAt?: number; scopes: string[]; accountEmail?: string | null; connectedAt: number }\n\t| { type: 'google_analytics4'; measurementId: string }\n\t| { type: 'telegram_bot'; botToken?: string }\n\t| { type: 'deep_seek'; apiKey?: string; model?: string }\n\t\n\t| { type: 'open_ai'; apiKey?: string; model?: string }\n\t| { type: 'slack'; apiKey?: string }\n\t| { type: 'discord'; apiKey?: string }\n\t| { type: 'whats_app'; apiKey?: string }\n\t| { type: 'resend'; apiKey?: string }\n\t| { type: 'send_grid'; apiKey?: string }\n\t| { type: 'airtable'; apiKey?: string }\n\t| { type: 'linear'; apiKey?: string }\n\t| { type: 'git_hub'; apiKey?: string }\n\t| { type: 'git_lab'; apiKey?: string }\n\t| { type: 'dropbox'; apiKey?: string }\n\t| { type: 'hub_spot'; apiKey?: string }\n\t| { type: 'monday'; apiKey?: string }\n\t| { type: 'click_up'; apiKey?: string }\n\t| { type: 'pipedrive'; apiKey?: string }\n\t| { type: 'calendly'; apiKey?: string }\n\t| { type: 'typeform'; apiKey?: string }\n\t| { type: 'webflow'; apiKey?: string }\n\t| { type: 'trello'; apiKey?: string }\n\t| { type: 'replicate'; apiKey?: string }\n\t| { type: 'asana'; apiKey?: string }\n\t| { type: 'brevo'; apiKey?: string }\n\t| { type: 'intercom'; apiKey?: string }\n\t| { type: 'notion'; apiKey?: string }\n\t| { type: 'eleven_labs'; apiKey?: string }\n\t| { type: 'active_campaign'; apiKey?: string; accountUrl: string }\n\t| { type: 'shopify'; apiKey?: string; storeDomain: string }\n\t| { type: 'supabase'; apiKey?: string; projectUrl: string }\n\t| { type: 'mailchimp'; apiKey?: string }\n\t\n\t| { type: 'twilio'; accountSid?: string; authToken?: string }\n\t| { type: 'jira'; email?: string; apiToken?: string; domain: string }\n\t| { type: 'woo_commerce'; consumerKey?: string; consumerSecret?: string; storeUrl: string }\n\t| { type: 'freshdesk'; apiKey?: string; domain: string }\n\t| { type: 'zendesk'; apiToken?: string; email?: string; subdomain: string }\n\t\n\t| { type: 'salesforce'; accessToken?: string; instanceUrl: string }\n\t| { type: 'zoom'; apiKey?: string }\n\t| { type: 'microsoft_teams'; apiKey?: string }\n\t| { type: 'firebase'; apiKey?: string }\n\t| { type: 'arky'; apiKey?: string }\n\t\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\tbusinessId: string;\n\tkey: string;\n\tprovider: IntegrationProvider;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\tintegrationId?: string;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\tetaText: string;\n\tlocationId?: string;\n\tintegrationId?: string;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Location {\n\tid: string;\n\tbusinessId: string;\n\tkey: string;\n\taddress: Address;\n\tisPickupLocation: boolean;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface InventoryLevel {\n\tlocationId: string;\n\tavailable: number;\n\treserved: number;\n}\n\nexport interface Zone {\n\tid: string;\n\tbusinessId: string;\n\tmarketId: string;\n\tcountries: string[];\n\tstates: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tbusinessId: string;\n\tkey: string;\n\tcurrency: string;\n\ttaxMode: \"exclusive\" | \"inclusive\";\n\tpaymentMethods: PaymentMethod[];\n\tzones: Zone[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport type WebhookEventSubscription =\n\t| { event: 'node.created'; parentId?: 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.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: 'booking.created' }\n\t| { event: 'booking.updated' }\n\t| { event: 'booking.payment_received' }\n\t| { event: 'booking.payment_failed' }\n\t| { event: 'booking.refunded' }\n\t| { event: 'booking.cancelled' }\n\t| { event: 'booking.item_cancelled' }\n\t| { event: 'booking.reminder' }\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: 'business.created' }\n\t| { event: 'business.updated' }\n\t| { event: 'business.deleted' }\n\t| { event: 'audience.created' }\n\t| { event: 'audience.updated' }\n\t| { event: 'audience.deleted' };\n\nexport interface Webhook {\n\tid: string;\n\tbusinessId: string;\n\tkey: string;\n\turl: string;\n\tevents: WebhookEventSubscription[];\n\theaders: Record<string, string>;\n\tsecret: string;\n\tenabled: boolean;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n\nexport type BusinessSubscriptionStatus =\n\t| 'pending'\n\t| 'active'\n\t| 'cancellation_scheduled'\n\t| 'cancelled'\n\t| 'expired';\n\nexport type BusinessSubscriptionSource = 'signup' | 'admin' | 'import';\n\nexport type BusinessSubscriptionProvider = {\n\ttype: 'stripe';\n\tcustomerId: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n};\n\nexport interface BusinessSubscriptionPayment {\n\tcurrency: string;\n\tmarket: string;\n\tprovider?: BusinessSubscriptionProvider;\n}\n\nexport interface BusinessSubscription {\n\tid: string;\n\ttarget: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: BusinessSubscriptionPayment;\n\tstatus: BusinessSubscriptionStatus;\n\tstartDate: number;\n\tendDate: number;\n\ttoken: string;\n\tsource: BusinessSubscriptionSource;\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\tcustomerId: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n};\n\nexport interface AudienceSubscriptionPayment {\n\tcurrency: string;\n\tmarket: string;\n\tprovider?: AudienceSubscriptionProvider;\n}\n\nexport interface AudienceSubscription {\n\tid: string;\n\tbusinessId: string;\n\tcustomerId: string;\n\taudienceId: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: AudienceSubscriptionPayment;\n\tstatus: AudienceSubscriptionStatus;\n\tstartDate: number;\n\tendDate: number;\n\ttoken: string;\n\tsource: AudienceSubscriptionSource;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface Business {\n\tid: string;\n\tkey: string;\n\ttimezone: string;\n\tlanguages?: Language[];\n\temails?: BusinessEmails;\n\tsubscription?: BusinessSubscription;\n\tcounts?: Record<string, number>;\n}\n\nexport interface EshopStoreState {\n\tbusinessId: string;\n\tselectedShippingMethodId: string | null;\n\tuserToken: string | null;\n\tprocessingCheckout: 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\ttaxonomyId: string;\n\tfields: TaxonomyField[];\n}\n\nexport interface TaxonomyQuery {\n\ttaxonomyId: 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\tformId: 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\tmimeType: string;\n\ttitle?: string | null;\n\tdescription?: string | null;\n\talt?: string | null;\n\tentity: string;\n\tmetadata?: string | null;\n\tcreatedAt: number;\n\tslug: Record<string, string>;\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\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\nexport interface BookingStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tguestToken: string | null;\n\tservice: any | null;\n\tbusiness: Business | null;\n\tcurrency: string;\n\tbookingForms: FormEntry[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: BookingCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: { publishableKey: string; currency: string } | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport type BookingServiceStatus = 'active' | 'draft' | 'archived';\nexport type BookingProviderStatus = 'active' | 'draft' | 'archived';\n\nexport type ProductStatus = 'active' | 'draft' | 'archived';\nexport type CustomerStatus = 'active' | 'draft' | '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 BookingCancellationReason =\n\t| 'admin_rejected'\n\t| 'customer_cancelled'\n\t| 'payment_failed'\n\t| 'expired'\n\t| 'other';\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 BookingItemStatus =\n\t| { status: 'pending'; expires_at: number }\n\t| { status: 'confirmed' }\n\t| { status: 'cancelled'; reason: BookingCancellationReason };\n\nexport type OrderItemStatus =\n\t| { status: 'pending'; expires_at: number }\n\t| { status: 'confirmed' }\n\t| { status: 'cancelled'; reason: OrderCancellationReason };\n\nexport type BookingPaymentStatus =\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 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 BookingItemSnapshot {\n\tserviceKey: string;\n\tproviderKey: string;\n\tprice: Price;\n}\n\nexport interface TimeRange {\n\tfrom: number;\n\tto: number;\n}\n\nexport interface BookingItem {\n\tid: string;\n\tserviceId: string;\n\tproviderId: string;\n\tbusinessId: string;\n\tbookingId: string;\n\tfrom: number;\n\tto: number;\n\tforms: FormEntry[];\n\tsnapshot: BookingItemSnapshot;\n\tstatus: BookingItemStatus;\n}\n\nexport interface Booking {\n\tid: string;\n\tnumber: string;\n\tcustomerId: string;\n\tverified: boolean;\n\tforms: FormEntry[];\n\tbusinessId: string;\n\tserviceIds: string[];\n\tproviderIds: string[];\n\tpayment: BookingPayment;\n\tbusiness?: Business;\n\taccount?: any;\n\titems: BookingItem[];\n\taudienceId?: string;\n\thistory?: { action: string; reason?: string; timestamp: number }[];\n\tfiredReminders: number[];\n\tcreatedAt: number;\n\tlastModified: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tparentId?: string | null;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tstatus: NodeStatus;\n\tslug: Record<string, string>;\n\tchildren: Node[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface EmailTemplate {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tsubject: Record<string, string>;\n\tbody: string;\n\tfromName: string;\n\tfromEmail: string;\n\treplyTo?: string;\n\tpreheader?: string;\n\tstatus: EmailTemplateStatus;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface Form {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tschema: FormSchema[];\n\tstatus: FormStatus;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface FormSubmission {\n\tid: string;\n\tformId: string;\n\tbusinessId: string;\n\tfields: FormField[];\n\tcreatedAt: number;\n}\n\nexport interface Taxonomy {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tparentId?: string | null;\n\tschema?: TaxonomySchema[];\n\tstatus: TaxonomyStatus;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface ServiceDuration {\n\tduration: number;\n\tisPause?: boolean;\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tproviderId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\taudienceIds: string[];\n\tworkingDays: Array<{ day: string; workingHours: Array<{ from: number; to: number }> }>;\n\tspecificDates: Array<{ date: number; workingHours: Array<{ from: number; to: number }> }>;\n\tslotInterval: number;\n\tminAdvance: number;\n\tmaxAdvance: number;\n\treminders: number[];\n\tforms?: FormEntry[];\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tslug: Record<string, string>;\n\tbusinessId: string;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tstatus: BookingServiceStatus;\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\tbusinessId: string;\n\tstatus: BookingProviderStatus;\n\taudienceIds: string[];\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport interface WorkflowEdge {\n\tsource: string;\n\ttarget: string;\n\toutput: string;\n\tbackEdge: boolean;\n}\n\nexport interface Workflow {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tsecret: string;\n\tstatus: WorkflowStatus;\n\tnodes: Record<string, WorkflowNode>;\n\tedges: WorkflowEdge[];\n\n\tschedule?: string;\n\tcreatedAt: number;\n\tupdatedAt: 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\tdelayMs?: 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\ttimeoutMs?: number;\n\tintegrationId?: string;\n\tintegrationProviderId?: string;\n\tdelayMs?: number;\n\tretries?: number;\n\tretryDelayMs?: number;\n}\n\nexport interface WorkflowSwitchRule {\n\tcondition: string;\n}\n\nexport interface WorkflowSwitchNode {\n\ttype: 'switch';\n\trules: WorkflowSwitchRule[];\n\tdelayMs?: number;\n}\n\nexport interface WorkflowTransformNode {\n\ttype: 'transform';\n\tcode: string;\n\tdelayMs?: number;\n}\n\nexport interface WorkflowLoopNode {\n\ttype: 'loop';\n\texpression: string;\n\tdelayMs?: 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\tstartedAt: number;\n\tcompletedAt: number;\n\tdurationMs: number;\n\terror?: string;\n}\n\nexport interface WorkflowExecution {\n\tid: string;\n\tworkflowId: string;\n\tbusinessId: string;\n\tstatus: ExecutionStatus;\n\tinput: Record<string, any>;\n\tresults: Record<string, NodeResult>;\n\terror?: string;\n\tscheduledAt: number;\n\tstartedAt: number;\n\tcompletedAt?: number;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\nexport type AudienceType =\n\t| { type: 'standard' }\n\t| { type: 'confirmation'; confirmTemplateId: string }\n\t| { type: 'paid'; prices: SubscriptionPrice[]; paymentIntegrationId?: string };\n\nexport interface Audience {\n\tid: string;\n\tbusinessId: string;\n\tkey: string;\n\tstatus: AudienceStatus;\n\ttype: AudienceType;\n}\n\nexport interface AudienceAccessResponse {\n\thasAccess: boolean;\n\tsubscription?: AudienceSubscription;\n}\n\nexport interface AudienceSubscribeResponse {\n\tcheckoutUrl?: 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| { action: 'booking_created' }\n\t| { action: 'booking_updated' }\n\t| { action: 'booking_payment_received'; data: { amount: number; currency: string } }\n\t| { action: 'booking_payment_failed'; data: { reason?: string } }\n\t| { action: 'booking_refunded'; data: { amount: number; currency: string; reason?: string } }\n\t| { action: 'booking_cancelled'; data: { reason?: string } }\n\t| { action: 'booking_item_cancelled'; data: { itemId: string; refundAmount: number } }\n\t\n\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: 'business_created' }\n\t| { action: 'business_updated' }\n\t| { action: 'business_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\tcreatedAt: 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\ttrackingNumber?: string | null;\n\ttrackingUrl?: string | null;\n\tlabelUrl?: string | null;\n\tstatus: ShippingStatus;\n}\n\n\nexport interface ShipmentLine {\n\torderItemId: string;\n\tquantity: number;\n}\n\n\nexport interface Shipment {\n\tid: string;\n\tlocationId: string;\n\tlines: ShipmentLine[];\n\tcarrier?: string | null;\n\tservice?: string | null;\n\ttrackingNumber?: string | null;\n\ttrackingUrl?: string | null;\n\tlabelUrl?: string | null;\n\tstatus: ShippingStatus;\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n\nexport interface ShippingRate {\n\tid: string;\n\tprovider: string;\n\tcarrier: string;\n\tservice: string;\n\tdisplayName: string;\n\tamount: number;\n\tcurrency: string;\n\testimatedDays?: 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\tdistanceUnit: 'in' | 'cm';\n\tmassUnit: 'oz' | 'lb' | 'g' | 'kg';\n}\n\n\nexport interface PurchaseLabelResult {\n\ttrackingNumber: string;\n\ttrackingUrl?: string | null;\n\tlabelUrl: string;\n\tcarrier: string;\n\tservice: string;\n}\n\n\nexport interface ShipResult {\n\tshipmentId: string;\n\ttrackingNumber: string;\n\ttrackingUrl?: string | null;\n\tlabelUrl: string;\n}\n\n\nexport interface CustomsItem {\n\tdescription: string;\n\tquantity: number;\n\tnetWeight: string;\n\tmassUnit: string;\n\tvalueAmount: string;\n\tvalueCurrency: string;\n\toriginCountry: string;\n\ttariffNumber?: string | null;\n}\n\n\nexport interface CustomsDeclaration {\n\tcontentsType: string;\n\tcontentsExplanation?: string | null;\n\tnonDeliveryOption: string;\n\tcertify: boolean;\n\tcertifySigner: string;\n\titems: CustomsItem[];\n}\n"]}
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.cjs","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 BookingPaymentTax {\n\tamount: number;\n\tmode_snapshot?: string;\n\trate_bps: number;\n\tlines: BookingPaymentTaxLine[];\n}\n\nexport interface BookingPaymentTaxLine {\n\trate_bps: number;\n\tamount: number;\n\tlabel?: string;\n\tscope?: string;\n}\n\nexport interface BookingPaymentPromoCode {\n\tid: string;\n\tcode: string;\n\ttype: string;\n\tvalue: number;\n}\n\n\nexport type BookingPaymentProvider = {\n\ttype: 'stripe';\n\tcustomer_id: string;\n\tpayment_intent_id?: string;\n};\n\nexport interface BookingPaymentRefund {\n\tid: string;\n\ttotal: number;\n\tprovider_refund_id?: string;\n\tstatus: string;\n\tcreated_at: number;\n}\n\nexport interface BookingPayment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: BookingPaymentTax;\n\tpromo_code?: BookingPaymentPromoCode;\n\tprovider?: BookingPaymentProvider;\n\trefunds: BookingPaymentRefund[];\n\tpayment_method_id?: string;\n\tmethod_type: PaymentMethodType;\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: any[];\n\tconditions: any[];\n}\n\nexport interface BookingQuote {\n\tmarket: string;\n\tzone: Zone | null;\n\tsubtotal: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tpayment_method: PaymentMethod | null;\n\tpayment_methods: PaymentMethod[];\n\tpromo_code: PromoCodeValidation | null;\n\tpayment: BookingPayment;\n\tcharge_amount: number;\n\tid?: string;\n\texpires_at?: number;\n}\n\nexport interface OrderQuote {\n\tmarket: string;\n\tzone: Zone | null;\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\tid?: string;\n\texpires_at?: 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;\n\tcompany?: string | null;\n\tstreet1: string;\n\tstreet2?: string | null;\n\tcity: string;\n\tstate: string;\n\tpostal_code: string;\n\tcountry: string;\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 interface BookingCartItem {\n\tid: string;\n\tservice_id: string;\n\tservice_name: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttime_text: string;\n\tprovider_id?: string;\n\tforms: any[];\n}\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\tbusiness_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\tbusiness_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 Zone {\n\tid: string;\n\tbusiness_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\tbusiness_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 BusinessEmails {\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.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: 'booking.created' }\n\t| { event: 'booking.updated' }\n\t| { event: 'booking.payment_received' }\n\t| { event: 'booking.payment_failed' }\n\t| { event: 'booking.refunded' }\n\t| { event: 'booking.cancelled' }\n\t| { event: 'booking.item_cancelled' }\n\t| { event: 'booking.reminder' }\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: 'business.created' }\n\t| { event: 'business.updated' }\n\t| { event: 'business.deleted' }\n\t| { event: 'audience.created' }\n\t| { event: 'audience.updated' }\n\t| { event: 'audience.deleted' };\n\nexport interface Webhook {\n\tid: string;\n\tbusiness_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 BusinessSubscriptionStatus =\n\t| 'pending'\n\t| 'active'\n\t| 'cancellation_scheduled'\n\t| 'cancelled'\n\t| 'expired';\n\nexport type BusinessSubscriptionSource = 'signup' | 'admin' | 'import';\n\nexport type BusinessSubscriptionProvider = {\n\ttype: 'stripe';\n\tcustomer_id: string;\n\tsubscription_id?: string;\n\tprice_id?: string;\n};\n\nexport interface BusinessSubscriptionPayment {\n\tcurrency: string;\n\tmarket: string;\n\tprovider?: BusinessSubscriptionProvider;\n}\n\nexport interface BusinessSubscription {\n\tid: string;\n\ttarget: string;\n\tplan_id: string;\n\tpending_plan_id: string | null;\n\tpayment: BusinessSubscriptionPayment;\n\tstatus: BusinessSubscriptionStatus;\n\tstart_date: number;\n\tend_date: number;\n\ttoken: string;\n\tsource: BusinessSubscriptionSource;\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\tbusiness_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 Business {\n\tid: string;\n\tkey: string;\n\ttimezone: string;\n\tlanguages?: Language[];\n\temails?: BusinessEmails;\n\tsubscription?: BusinessSubscription;\n\tcounts?: Record<string, number>;\n}\n\nexport interface EshopStoreState {\n\tbusiness_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\tentity: string;\n\tmetadata?: string | null;\n\tcreated_at: number;\n\tslug: Record<string, string>;\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\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\nexport interface BookingStoreState {\n\tcurrent_step: number;\n\ttotal_steps: number;\n\tsteps: Record<number, { name: string; label_key: string }>;\n\tweekdays: string[];\n\tmonth_year: string;\n\tdays: any[];\n\tcurrent: Date;\n\tselected_date: string | null;\n\tslots: any[];\n\tselected_slot: any | null;\n\tselected_provider: any | null;\n\tproviders: any[];\n\tloading: boolean;\n\tstart_date: string | null;\n\tend_date: string | null;\n\tguest_token: string | null;\n\tservice: any | null;\n\tbusiness: Business | null;\n\tcurrency: string;\n\tbooking_forms: FormEntry[];\n\tapi_url: string;\n\tbusiness_id: string;\n\ttimezone: string;\n\ttz_groups: any;\n\titems: BookingCartItem[];\n\tallowed_payment_methods: string[];\n\tpayment_config: {\n\t\tprovider: { publishable_key: string; currency: string } | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport type BookingServiceStatus = 'active' | 'draft' | 'archived';\nexport type BookingProviderStatus = 'active' | 'draft' | 'archived';\n\nexport type ProductStatus = 'active' | 'draft' | 'archived';\nexport type CustomerStatus = 'active' | 'draft' | '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 BookingCancellationReason =\n\t| 'admin_rejected'\n\t| 'customer_cancelled'\n\t| 'payment_failed'\n\t| 'expired'\n\t| 'other';\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 BookingItemStatus =\n\t| { status: 'pending'; expires_at: number }\n\t| { status: 'confirmed' }\n\t| { status: 'cancelled'; reason: BookingCancellationReason };\n\nexport type OrderItemStatus =\n\t| { status: 'pending'; expires_at: number }\n\t| { status: 'confirmed' }\n\t| { status: 'cancelled'; reason: OrderCancellationReason };\n\nexport type BookingPaymentStatus =\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 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 BookingItemSnapshot {\n\tservice_key: string;\n\tprovider_key: string;\n\tprice: Price;\n}\n\nexport interface TimeRange {\n\tfrom: number;\n\tto: number;\n}\n\nexport interface BookingItem {\n\tid: string;\n\tservice_id: string;\n\tprovider_id: string;\n\tbusiness_id: string;\n\tbooking_id: string;\n\tfrom: number;\n\tto: number;\n\tforms: FormEntry[];\n\tsnapshot: BookingItemSnapshot;\n\tstatus: BookingItemStatus;\n}\n\nexport interface Booking {\n\tid: string;\n\tnumber: string;\n\tcustomer_id: string;\n\tverified: boolean;\n\tforms: FormEntry[];\n\tbusiness_id: string;\n\tservice_ids: string[];\n\tprovider_ids: string[];\n\tpayment: BookingPayment;\n\tbusiness?: Business;\n\taccount?: any;\n\titems: BookingItem[];\n\taudience_id?: string;\n\thistory?: { action: string; reason?: string; timestamp: number }[];\n\tfired_reminders: number[];\n\tcreated_at: number;\n\tlast_modified: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusiness_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\tbusiness_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\tbusiness_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\tbusiness_id: string;\n\tfields: FormField[];\n\tcreated_at: number;\n}\n\nexport interface Taxonomy {\n\tid: string;\n\tkey: string;\n\tbusiness_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 ServiceProvider {\n\tid: string;\n\tprovider_id: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\taudience_ids: string[];\n\tworking_days: Array<{ day: string; working_hours: Array<{ from: number; to: number }> }>;\n\tspecific_dates: Array<{ date: number; working_hours: Array<{ from: number; to: number }> }>;\n\tslot_interval: number;\n\tmin_advance: number;\n\tmax_advance: number;\n\treminders: number[];\n\tforms?: FormEntry[];\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tslug: Record<string, string>;\n\tbusiness_id: string;\n\tblocks: Block[];\n\ttaxonomies: TaxonomyEntry[];\n\tcreated_at: number;\n\tupdated_at: number;\n\tstatus: BookingServiceStatus;\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\tbusiness_id: string;\n\tstatus: BookingProviderStatus;\n\taudience_ids: string[];\n\tblocks: Block[];\n\ttaxonomies: 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\tbusiness_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\tbusiness_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\tbusiness_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| { action: 'booking_created' }\n\t| { action: 'booking_updated' }\n\t| { action: 'booking_payment_received'; data: { amount: number; currency: string } }\n\t| { action: 'booking_payment_failed'; data: { reason?: string } }\n\t| { action: 'booking_refunded'; data: { amount: number; currency: string; reason?: string } }\n\t| { action: 'booking_cancelled'; data: { reason?: string } }\n\t| { action: 'booking_item_cancelled'; data: { item_id: string; refund_amount: number } }\n\t\n\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: 'business_created' }\n\t| { action: 'business_updated' }\n\t| { action: 'business_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"]}