arky-sdk 0.3.141 → 0.3.143

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":";;;AA4CO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface PaymentRefund {\n\tid: string;\n\tentity: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: number;\n}\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n\trefunds: PaymentRefund[];\n\tzoneId?: string;\n\tpaymentMethodId?: string;\n\tshippingMethodId?: string;\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface PromoCodeValidation {\n\tpromoCodeId: string;\n\tcode: string;\n\tdiscounts: any[];\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tmarket: string;\n\tzone: Zone;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshippingMethod: ShippingMethod | null;\n\tpaymentMethod: PaymentMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | 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}\n\nexport interface ReservationCartItem {\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\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport type ZoneScope = \"ORDER\" | \"RESERVATION\";\n\nexport interface Zone {\n\tid: string;\n\tmarketId: string;\n\tscope: ZoneScope;\n\tcountries: string[];\n\tstates: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Subscription {\n\tid: string;\n\ttarget: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: any;\n\tstatuses: StatusEvent[];\n\tendDate: number;\n\tusage: Record<string, any>;\n\ttoken: string;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tnetworkKey: string | null;\n\ttimezone: string;\n\tconfigs?: BusinessConfig;\n\tsubscriptions?: Subscription[];\n\tstatuses?: StatusEvent[];\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 BlockType =\n\t| \"TEXT\"\n\t| \"LOCALIZED_TEXT\"\n\t| \"NUMBER\"\n\t| \"BOOLEAN\"\n\t| \"BLOCK\"\n\t| \"RELATIONSHIP_ENTRY\"\n\t| \"RELATIONSHIP_MEDIA\"\n\t| \"MARKDOWN\"\n\t| \"EMAIL\"\n\t| \"PHONE\"\n\t| \"ADDRESS\";\n\nexport type AddressType = \"SHIPPING\" | \"BILLING\";\n\nexport interface EmailBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface PhoneBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface AddressBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\taddressType: AddressType;\n}\n\nexport interface GeoLocationValue {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EmailBlock extends Block {\n\ttype: \"EMAIL\";\n\tproperties: EmailBlockProperties;\n\tvalue: string[];\n}\n\nexport interface PhoneBlock extends Block {\n\ttype: \"PHONE\";\n\tproperties: PhoneBlockProperties;\n\tvalue: string[];\n}\n\nexport interface AddressBlock extends Block {\n\ttype: \"ADDRESS\";\n\tproperties: AddressBlockProperties;\n\tvalue: GeoLocationValue[];\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\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\tuploadedAt: string;\n\tseo: Seo;\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 ReservationStoreState {\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\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport interface StatusEvent {\n\tid: string;\n\tchangedBy: 'BUSINESS' | 'USER' | 'SYSTEM';\n\tuserId?: string;\n\tstatus: string;\n\tnote?: string;\n\ttimestamp: number;\n}\n\nexport interface ReservationItem {\n\tid: string;\n\tserviceId: string;\n\tproviderId: string;\n\tbusinessId: string;\n\treservationId: string;\n\tuserId: string;\n\tfrom: number;\n\tto: number;\n\tblocks: Block[];\n\tprice: Price;\n}\n\nexport interface Reservation {\n\tid: string;\n\tnumber: string;\n\tuserId: string;\n\tblocks: Block[];\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tserviceIds: string[];\n\tproviderIds: string[];\n\tpayment: Payment;\n\tbusiness?: Business;\n\tuser?: any;\n\titems: ReservationItem[];\n\temail?: string;\n\tphone?: string;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n\n// ===== CMS Types =====\n\nexport interface NodeNotifications {\n\temails: string[];\n}\n\nexport interface NodeConfig {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n}\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tproviderPriceId?: string;\n\tproviderProductId?: string;\n\tname: string;\n\ttier: number;\n\tamount: number;\n\tcurrency: string;\n\tinterval: string;\n\tintervalCount: number;\n\ttrialPeriodDays: number;\n\tfeatures: Record<string, any>;\n}\n\nexport type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';\n\nexport interface NewsletterSend {\n\tid: string;\n\tscheduledAt: number;\n\tstatus: SendStatus;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tblocks: Block[];\n\tparentId?: string | null;\n\thasChildren: boolean;\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tnotifications: NodeNotifications;\n\tconfig: NodeConfig;\n\temailSubject?: Record<string, string>;\n\tplans?: SubscriptionPlan[];\n\tsends?: NewsletterSend[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n// ===== Reservation Domain Types =====\n\nexport interface ServiceDuration {\n\tduration: number;\n\tisPause?: boolean;\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tproviderId: string;\n\tworkingTime: {\n\t\tworkingDays: Array<{ day: string; workingHours: Array<{ from: number; to: number }> }>;\n\t\toutcastDates: Array<{ month: number; day: number; workingHours: Array<{ from: number; to: number }> }>;\n\t\tspecificDates: Array<{ date: number; workingHours: Array<{ from: number; to: number }> }>;\n\t};\n\tprovider?: Provider;\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\tnodeIds: string[];\n\tisApprovalRequired: boolean;\n\tproviders: ServiceProvider[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tstatuses: StatusEvent[];\n}\n\nexport interface ProviderTimelinePoint {\n\ttimestamp: number;\n\tconcurrent: number;\n}\n\nexport interface Provider {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\tnodeIds: string[];\n\tblocks: Block[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";;;AA4CO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface PaymentRefund {\n\tid: string;\n\tentity: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: number;\n}\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n\trefunds: PaymentRefund[];\n\tzoneId?: string;\n\tpaymentMethodId?: string;\n\tshippingMethodId?: string;\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface PromoCodeValidation {\n\tpromoCodeId: string;\n\tcode: string;\n\tdiscounts: any[];\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tmarket: string;\n\tzone: Zone;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshippingMethod: ShippingMethod | null;\n\tpaymentMethod: PaymentMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | 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}\n\nexport interface ReservationCartItem {\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\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport type ZoneScope = \"ORDER\" | \"RESERVATION\";\n\nexport interface Zone {\n\tid: string;\n\tmarketId: string;\n\tscope: ZoneScope;\n\tcountries: string[];\n\tstates: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Subscription {\n\tid: string;\n\ttarget: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: any;\n\tstatuses: StatusEvent[];\n\tendDate: number;\n\tusage: Record<string, any>;\n\ttoken: string;\n}\n\nexport interface Business {\n\tid: string;\n\tkey: string;\n\tnetworkKey: string | null;\n\ttimezone: string;\n\tconfigs?: BusinessConfig;\n\tsubscriptions?: Subscription[];\n\tstatuses?: StatusEvent[];\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 BlockType =\n\t| \"TEXT\"\n\t| \"LOCALIZED_TEXT\"\n\t| \"NUMBER\"\n\t| \"BOOLEAN\"\n\t| \"BLOCK\"\n\t| \"RELATIONSHIP_ENTRY\"\n\t| \"RELATIONSHIP_MEDIA\"\n\t| \"MARKDOWN\"\n\t| \"EMAIL\"\n\t| \"PHONE\"\n\t| \"ADDRESS\";\n\nexport type AddressType = \"SHIPPING\" | \"BILLING\";\n\nexport interface EmailBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface PhoneBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface AddressBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\taddressType: AddressType;\n}\n\nexport interface GeoLocationValue {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EmailBlock extends Block {\n\ttype: \"EMAIL\";\n\tproperties: EmailBlockProperties;\n\tvalue: string[];\n}\n\nexport interface PhoneBlock extends Block {\n\ttype: \"PHONE\";\n\tproperties: PhoneBlockProperties;\n\tvalue: string[];\n}\n\nexport interface AddressBlock extends Block {\n\ttype: \"ADDRESS\";\n\tproperties: AddressBlockProperties;\n\tvalue: GeoLocationValue[];\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\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\tuploadedAt: string;\n\tseo: Seo;\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 ReservationStoreState {\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\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport interface StatusEvent {\n\tid: string;\n\tchangedBy: 'BUSINESS' | 'USER' | 'SYSTEM';\n\tuserId?: string;\n\tstatus: string;\n\tnote?: string;\n\ttimestamp: number;\n}\n\nexport interface ReservationItem {\n\tid: string;\n\tserviceId: string;\n\tproviderId: string;\n\tbusinessId: string;\n\treservationId: string;\n\tuserId: string;\n\tfrom: number;\n\tto: number;\n\tblocks: Block[];\n\tprice: Price;\n}\n\nexport interface Reservation {\n\tid: string;\n\tnumber: string;\n\tuserId: string;\n\tblocks: Block[];\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tserviceIds: string[];\n\tproviderIds: string[];\n\tpayment: Payment;\n\tbusiness?: Business;\n\tuser?: any;\n\titems: ReservationItem[];\n\temail?: string;\n\tphone?: string;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n\n// ===== CMS Types =====\n\nexport interface NodeNotifications {\n\temails: string[];\n}\n\nexport interface NodeConfig {\n\tparentId?: string | null;\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n}\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tproviderPriceId?: string;\n\tproviderProductId?: string;\n\tname: string;\n\ttier: number;\n\tamount: number;\n\tcurrency: string;\n\tinterval: string;\n\tintervalCount: number;\n\ttrialPeriodDays: number;\n\tfeatures: Record<string, any>;\n}\n\nexport type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';\n\nexport interface NodeSend {\n\tid: string;\n\tscheduledAt: number;\n\tstatus: SendStatus;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tblocks: Block[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tnotifications: NodeNotifications;\n\tconfig: NodeConfig;\n\temailSubject?: Record<string, string>;\n\tplans: SubscriptionPlan[];\n\tsends: NodeSend[];\n\tchildren: Node[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n// ===== Reservation Domain Types =====\n\nexport interface ServiceDuration {\n\tduration: number;\n\tisPause?: boolean;\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tproviderId: string;\n\tworkingTime: {\n\t\tworkingDays: Array<{ day: string; workingHours: Array<{ from: number; to: number }> }>;\n\t\toutcastDates: Array<{ month: number; day: number; workingHours: Array<{ from: number; to: number }> }>;\n\t\tspecificDates: Array<{ date: number; workingHours: Array<{ from: number; to: number }> }>;\n\t};\n\tprovider?: Provider;\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\tnodeIds: string[];\n\tisApprovalRequired: boolean;\n\tproviders: ServiceProvider[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tstatuses: StatusEvent[];\n}\n\nexport interface ProviderTimelinePoint {\n\ttimestamp: number;\n\tconcurrent: number;\n}\n\nexport interface Provider {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\tnodeIds: string[];\n\tblocks: Block[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n"]}
package/dist/types.d.cts CHANGED
@@ -178,7 +178,7 @@ interface Subscription {
178
178
  }
179
179
  interface Business {
180
180
  id: string;
181
- name: string;
181
+ key: string;
182
182
  networkKey: string | null;
183
183
  timezone: string;
184
184
  configs?: BusinessConfig;
@@ -361,6 +361,7 @@ interface NodeNotifications {
361
361
  emails: string[];
362
362
  }
363
363
  interface NodeConfig {
364
+ parentId?: string | null;
364
365
  isPubliclyReadable: boolean;
365
366
  isPubliclyWritable: boolean;
366
367
  }
@@ -378,7 +379,7 @@ interface SubscriptionPlan {
378
379
  features: Record<string, any>;
379
380
  }
380
381
  type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';
381
- interface NewsletterSend {
382
+ interface NodeSend {
382
383
  id: string;
383
384
  scheduledAt: number;
384
385
  status: SendStatus;
@@ -391,15 +392,14 @@ interface Node {
391
392
  key: string;
392
393
  businessId: string;
393
394
  blocks: Block[];
394
- parentId?: string | null;
395
- hasChildren: boolean;
396
395
  statuses: StatusEvent[];
397
396
  seo: Seo;
398
397
  notifications: NodeNotifications;
399
398
  config: NodeConfig;
400
399
  emailSubject?: Record<string, string>;
401
- plans?: SubscriptionPlan[];
402
- sends?: NewsletterSend[];
400
+ plans: SubscriptionPlan[];
401
+ sends: NodeSend[];
402
+ children: Node[];
403
403
  createdAt: number;
404
404
  updatedAt: number;
405
405
  }
@@ -504,7 +504,6 @@ interface GetQuoteParams {
504
504
  paymentMethodId?: string;
505
505
  shippingMethodId?: string;
506
506
  promoCode?: string;
507
- location?: Location;
508
507
  blocks?: any[];
509
508
  }
510
509
  interface OrderCheckoutParams {
@@ -513,9 +512,6 @@ interface OrderCheckoutParams {
513
512
  blocks?: any[];
514
513
  shippingMethodId: string;
515
514
  promoCodeId?: string;
516
- address?: Location;
517
- email?: string;
518
- phone?: string;
519
515
  }
520
516
  interface GetProductsParams {
521
517
  ids?: string[];
@@ -546,19 +542,19 @@ interface GetNodesParams {
546
542
  sortDirection?: string;
547
543
  createdAtFrom?: string;
548
544
  createdAtTo?: string;
545
+ includeChildren?: boolean;
549
546
  }
550
547
  interface CreateNodeParams {
551
548
  businessId?: string;
552
549
  key: string;
553
550
  blocks?: any[];
554
- parentId?: string | null;
555
- hasChildren?: boolean;
556
551
  seo?: any;
557
552
  status?: string;
558
553
  notifications?: {
559
554
  emails?: string[];
560
555
  };
561
556
  config?: {
557
+ parentId?: string | null;
562
558
  isPubliclyReadable?: boolean;
563
559
  isPubliclyWritable?: boolean;
564
560
  };
@@ -570,14 +566,13 @@ interface UpdateNodeParams {
570
566
  businessId?: string;
571
567
  key?: string;
572
568
  blocks?: any[];
573
- parentId?: string | null;
574
- hasChildren?: boolean;
575
569
  seo?: any;
576
570
  status?: string;
577
571
  notifications?: {
578
572
  emails?: string[];
579
573
  };
580
574
  config?: {
575
+ parentId?: string | null;
581
576
  isPubliclyReadable?: boolean;
582
577
  isPubliclyWritable?: boolean;
583
578
  };
@@ -803,7 +798,7 @@ interface GetPromoCodesParams {
803
798
  expiresAtTo?: string;
804
799
  }
805
800
  interface CreateBusinessParams {
806
- name: string;
801
+ key: string;
807
802
  slug?: string;
808
803
  description?: string;
809
804
  email?: string;
@@ -815,7 +810,7 @@ interface CreateBusinessParams {
815
810
  }
816
811
  interface UpdateBusinessParams {
817
812
  id: string;
818
- name: string;
813
+ key: string;
819
814
  networkKey: string | null;
820
815
  timezone: string;
821
816
  statuses: any[];
@@ -1244,4 +1239,4 @@ interface Slot {
1244
1239
  dateText: string;
1245
1240
  }
1246
1241
 
1247
- export { type AddPhoneNumberParams, type AddressBlock, type AddressBlockProperties, type AddressType, type ApiResponse, type Block, type BlockType, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type CancelSendParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateFeatureFlagParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteFeatureFlagParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EmailBlock, type EmailBlockProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GeoLocationValue, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetDeliveryStatsParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscribersParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type NewsletterSend, type Node, type NodeConfig, type NodeNotifications, type OrderCheckoutParams, type OutcastDate, type Paginated, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, type PhoneBlock, type PhoneBlockProperties, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Provider, type ProviderTimelinePoint, type ProviderWithTimeline, type Quote, type RegisterUserParams, type RequestOptions, type Reservation, type ReservationCartItem, type ReservationCheckoutParams, type ReservationItem, type ReservationQuoteItem, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type ScheduleSendParams, type SearchReservationsParams, type SearchUsersParams, type SendStatus, type Seo, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type StatusEvent, type SubscribeParams, type Subscription, type SubscriptionPlan, type SystemTemplateKey, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone, type ZoneScope };
1242
+ export { type AddPhoneNumberParams, type AddressBlock, type AddressBlockProperties, type AddressType, type ApiResponse, type Block, type BlockType, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type CancelSendParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateFeatureFlagParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteFeatureFlagParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EmailBlock, type EmailBlockProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GeoLocationValue, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetDeliveryStatsParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscribersParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type Node, type NodeConfig, type NodeNotifications, type NodeSend, type OrderCheckoutParams, type OutcastDate, type Paginated, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, type PhoneBlock, type PhoneBlockProperties, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Provider, type ProviderTimelinePoint, type ProviderWithTimeline, type Quote, type RegisterUserParams, type RequestOptions, type Reservation, type ReservationCartItem, type ReservationCheckoutParams, type ReservationItem, type ReservationQuoteItem, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type ScheduleSendParams, type SearchReservationsParams, type SearchUsersParams, type SendStatus, type Seo, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type StatusEvent, type SubscribeParams, type Subscription, type SubscriptionPlan, type SystemTemplateKey, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone, type ZoneScope };
package/dist/types.d.ts CHANGED
@@ -178,7 +178,7 @@ interface Subscription {
178
178
  }
179
179
  interface Business {
180
180
  id: string;
181
- name: string;
181
+ key: string;
182
182
  networkKey: string | null;
183
183
  timezone: string;
184
184
  configs?: BusinessConfig;
@@ -361,6 +361,7 @@ interface NodeNotifications {
361
361
  emails: string[];
362
362
  }
363
363
  interface NodeConfig {
364
+ parentId?: string | null;
364
365
  isPubliclyReadable: boolean;
365
366
  isPubliclyWritable: boolean;
366
367
  }
@@ -378,7 +379,7 @@ interface SubscriptionPlan {
378
379
  features: Record<string, any>;
379
380
  }
380
381
  type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';
381
- interface NewsletterSend {
382
+ interface NodeSend {
382
383
  id: string;
383
384
  scheduledAt: number;
384
385
  status: SendStatus;
@@ -391,15 +392,14 @@ interface Node {
391
392
  key: string;
392
393
  businessId: string;
393
394
  blocks: Block[];
394
- parentId?: string | null;
395
- hasChildren: boolean;
396
395
  statuses: StatusEvent[];
397
396
  seo: Seo;
398
397
  notifications: NodeNotifications;
399
398
  config: NodeConfig;
400
399
  emailSubject?: Record<string, string>;
401
- plans?: SubscriptionPlan[];
402
- sends?: NewsletterSend[];
400
+ plans: SubscriptionPlan[];
401
+ sends: NodeSend[];
402
+ children: Node[];
403
403
  createdAt: number;
404
404
  updatedAt: number;
405
405
  }
@@ -504,7 +504,6 @@ interface GetQuoteParams {
504
504
  paymentMethodId?: string;
505
505
  shippingMethodId?: string;
506
506
  promoCode?: string;
507
- location?: Location;
508
507
  blocks?: any[];
509
508
  }
510
509
  interface OrderCheckoutParams {
@@ -513,9 +512,6 @@ interface OrderCheckoutParams {
513
512
  blocks?: any[];
514
513
  shippingMethodId: string;
515
514
  promoCodeId?: string;
516
- address?: Location;
517
- email?: string;
518
- phone?: string;
519
515
  }
520
516
  interface GetProductsParams {
521
517
  ids?: string[];
@@ -546,19 +542,19 @@ interface GetNodesParams {
546
542
  sortDirection?: string;
547
543
  createdAtFrom?: string;
548
544
  createdAtTo?: string;
545
+ includeChildren?: boolean;
549
546
  }
550
547
  interface CreateNodeParams {
551
548
  businessId?: string;
552
549
  key: string;
553
550
  blocks?: any[];
554
- parentId?: string | null;
555
- hasChildren?: boolean;
556
551
  seo?: any;
557
552
  status?: string;
558
553
  notifications?: {
559
554
  emails?: string[];
560
555
  };
561
556
  config?: {
557
+ parentId?: string | null;
562
558
  isPubliclyReadable?: boolean;
563
559
  isPubliclyWritable?: boolean;
564
560
  };
@@ -570,14 +566,13 @@ interface UpdateNodeParams {
570
566
  businessId?: string;
571
567
  key?: string;
572
568
  blocks?: any[];
573
- parentId?: string | null;
574
- hasChildren?: boolean;
575
569
  seo?: any;
576
570
  status?: string;
577
571
  notifications?: {
578
572
  emails?: string[];
579
573
  };
580
574
  config?: {
575
+ parentId?: string | null;
581
576
  isPubliclyReadable?: boolean;
582
577
  isPubliclyWritable?: boolean;
583
578
  };
@@ -803,7 +798,7 @@ interface GetPromoCodesParams {
803
798
  expiresAtTo?: string;
804
799
  }
805
800
  interface CreateBusinessParams {
806
- name: string;
801
+ key: string;
807
802
  slug?: string;
808
803
  description?: string;
809
804
  email?: string;
@@ -815,7 +810,7 @@ interface CreateBusinessParams {
815
810
  }
816
811
  interface UpdateBusinessParams {
817
812
  id: string;
818
- name: string;
813
+ key: string;
819
814
  networkKey: string | null;
820
815
  timezone: string;
821
816
  statuses: any[];
@@ -1244,4 +1239,4 @@ interface Slot {
1244
1239
  dateText: string;
1245
1240
  }
1246
1241
 
1247
- export { type AddPhoneNumberParams, type AddressBlock, type AddressBlockProperties, type AddressType, type ApiResponse, type Block, type BlockType, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type CancelSendParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateFeatureFlagParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteFeatureFlagParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EmailBlock, type EmailBlockProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GeoLocationValue, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetDeliveryStatsParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscribersParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type NewsletterSend, type Node, type NodeConfig, type NodeNotifications, type OrderCheckoutParams, type OutcastDate, type Paginated, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, type PhoneBlock, type PhoneBlockProperties, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Provider, type ProviderTimelinePoint, type ProviderWithTimeline, type Quote, type RegisterUserParams, type RequestOptions, type Reservation, type ReservationCartItem, type ReservationCheckoutParams, type ReservationItem, type ReservationQuoteItem, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type ScheduleSendParams, type SearchReservationsParams, type SearchUsersParams, type SendStatus, type Seo, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type StatusEvent, type SubscribeParams, type Subscription, type SubscriptionPlan, type SystemTemplateKey, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone, type ZoneScope };
1242
+ export { type AddPhoneNumberParams, type AddressBlock, type AddressBlockProperties, type AddressType, type ApiResponse, type Block, type BlockType, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type CancelSendParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateFeatureFlagParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteFeatureFlagParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EmailBlock, type EmailBlockProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GeoLocationValue, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetDeliveryStatsParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscribersParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type Node, type NodeConfig, type NodeNotifications, type NodeSend, type OrderCheckoutParams, type OutcastDate, type Paginated, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, type PhoneBlock, type PhoneBlockProperties, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Provider, type ProviderTimelinePoint, type ProviderWithTimeline, type Quote, type RegisterUserParams, type RequestOptions, type Reservation, type ReservationCartItem, type ReservationCheckoutParams, type ReservationItem, type ReservationQuoteItem, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type ScheduleSendParams, type SearchReservationsParams, type SearchUsersParams, type SendStatus, type Seo, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type StatusEvent, type SubscribeParams, type Subscription, type SubscriptionPlan, type SystemTemplateKey, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone, type ZoneScope };
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA4CO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface PaymentRefund {\n\tid: string;\n\tentity: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: number;\n}\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n\trefunds: PaymentRefund[];\n\tzoneId?: string;\n\tpaymentMethodId?: string;\n\tshippingMethodId?: string;\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface PromoCodeValidation {\n\tpromoCodeId: string;\n\tcode: string;\n\tdiscounts: any[];\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tmarket: string;\n\tzone: Zone;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshippingMethod: ShippingMethod | null;\n\tpaymentMethod: PaymentMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | 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}\n\nexport interface ReservationCartItem {\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\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport type ZoneScope = \"ORDER\" | \"RESERVATION\";\n\nexport interface Zone {\n\tid: string;\n\tmarketId: string;\n\tscope: ZoneScope;\n\tcountries: string[];\n\tstates: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Subscription {\n\tid: string;\n\ttarget: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: any;\n\tstatuses: StatusEvent[];\n\tendDate: number;\n\tusage: Record<string, any>;\n\ttoken: string;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tnetworkKey: string | null;\n\ttimezone: string;\n\tconfigs?: BusinessConfig;\n\tsubscriptions?: Subscription[];\n\tstatuses?: StatusEvent[];\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 BlockType =\n\t| \"TEXT\"\n\t| \"LOCALIZED_TEXT\"\n\t| \"NUMBER\"\n\t| \"BOOLEAN\"\n\t| \"BLOCK\"\n\t| \"RELATIONSHIP_ENTRY\"\n\t| \"RELATIONSHIP_MEDIA\"\n\t| \"MARKDOWN\"\n\t| \"EMAIL\"\n\t| \"PHONE\"\n\t| \"ADDRESS\";\n\nexport type AddressType = \"SHIPPING\" | \"BILLING\";\n\nexport interface EmailBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface PhoneBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface AddressBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\taddressType: AddressType;\n}\n\nexport interface GeoLocationValue {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EmailBlock extends Block {\n\ttype: \"EMAIL\";\n\tproperties: EmailBlockProperties;\n\tvalue: string[];\n}\n\nexport interface PhoneBlock extends Block {\n\ttype: \"PHONE\";\n\tproperties: PhoneBlockProperties;\n\tvalue: string[];\n}\n\nexport interface AddressBlock extends Block {\n\ttype: \"ADDRESS\";\n\tproperties: AddressBlockProperties;\n\tvalue: GeoLocationValue[];\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\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\tuploadedAt: string;\n\tseo: Seo;\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 ReservationStoreState {\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\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport interface StatusEvent {\n\tid: string;\n\tchangedBy: 'BUSINESS' | 'USER' | 'SYSTEM';\n\tuserId?: string;\n\tstatus: string;\n\tnote?: string;\n\ttimestamp: number;\n}\n\nexport interface ReservationItem {\n\tid: string;\n\tserviceId: string;\n\tproviderId: string;\n\tbusinessId: string;\n\treservationId: string;\n\tuserId: string;\n\tfrom: number;\n\tto: number;\n\tblocks: Block[];\n\tprice: Price;\n}\n\nexport interface Reservation {\n\tid: string;\n\tnumber: string;\n\tuserId: string;\n\tblocks: Block[];\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tserviceIds: string[];\n\tproviderIds: string[];\n\tpayment: Payment;\n\tbusiness?: Business;\n\tuser?: any;\n\titems: ReservationItem[];\n\temail?: string;\n\tphone?: string;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n\n// ===== CMS Types =====\n\nexport interface NodeNotifications {\n\temails: string[];\n}\n\nexport interface NodeConfig {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n}\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tproviderPriceId?: string;\n\tproviderProductId?: string;\n\tname: string;\n\ttier: number;\n\tamount: number;\n\tcurrency: string;\n\tinterval: string;\n\tintervalCount: number;\n\ttrialPeriodDays: number;\n\tfeatures: Record<string, any>;\n}\n\nexport type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';\n\nexport interface NewsletterSend {\n\tid: string;\n\tscheduledAt: number;\n\tstatus: SendStatus;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tblocks: Block[];\n\tparentId?: string | null;\n\thasChildren: boolean;\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tnotifications: NodeNotifications;\n\tconfig: NodeConfig;\n\temailSubject?: Record<string, string>;\n\tplans?: SubscriptionPlan[];\n\tsends?: NewsletterSend[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n// ===== Reservation Domain Types =====\n\nexport interface ServiceDuration {\n\tduration: number;\n\tisPause?: boolean;\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tproviderId: string;\n\tworkingTime: {\n\t\tworkingDays: Array<{ day: string; workingHours: Array<{ from: number; to: number }> }>;\n\t\toutcastDates: Array<{ month: number; day: number; workingHours: Array<{ from: number; to: number }> }>;\n\t\tspecificDates: Array<{ date: number; workingHours: Array<{ from: number; to: number }> }>;\n\t};\n\tprovider?: Provider;\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\tnodeIds: string[];\n\tisApprovalRequired: boolean;\n\tproviders: ServiceProvider[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tstatuses: StatusEvent[];\n}\n\nexport interface ProviderTimelinePoint {\n\ttimestamp: number;\n\tconcurrent: number;\n}\n\nexport interface Provider {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\tnodeIds: string[];\n\tblocks: Block[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA4CO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface PaymentRefund {\n\tid: string;\n\tentity: string;\n\ttotal: number;\n\tproviderRefundId?: string;\n\tstatus: string;\n\tcreatedAt: number;\n}\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tpaid: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n\trefunds: PaymentRefund[];\n\tzoneId?: string;\n\tpaymentMethodId?: string;\n\tshippingMethodId?: string;\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface PromoCodeValidation {\n\tpromoCodeId: string;\n\tcode: string;\n\tdiscounts: any[];\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tmarket: string;\n\tzone: Zone;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttax: number;\n\ttotal: number;\n\tshippingMethod: ShippingMethod | null;\n\tpaymentMethod: PaymentMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n\tid?: string;\n\texpiresAt?: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | 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}\n\nexport interface ReservationCartItem {\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\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport type ZoneScope = \"ORDER\" | \"RESERVATION\";\n\nexport interface Zone {\n\tid: string;\n\tmarketId: string;\n\tscope: ZoneScope;\n\tcountries: string[];\n\tstates: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Subscription {\n\tid: string;\n\ttarget: string;\n\tplanId: string;\n\tpendingPlanId: string | null;\n\tpayment: any;\n\tstatuses: StatusEvent[];\n\tendDate: number;\n\tusage: Record<string, any>;\n\ttoken: string;\n}\n\nexport interface Business {\n\tid: string;\n\tkey: string;\n\tnetworkKey: string | null;\n\ttimezone: string;\n\tconfigs?: BusinessConfig;\n\tsubscriptions?: Subscription[];\n\tstatuses?: StatusEvent[];\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 BlockType =\n\t| \"TEXT\"\n\t| \"LOCALIZED_TEXT\"\n\t| \"NUMBER\"\n\t| \"BOOLEAN\"\n\t| \"BLOCK\"\n\t| \"RELATIONSHIP_ENTRY\"\n\t| \"RELATIONSHIP_MEDIA\"\n\t| \"MARKDOWN\"\n\t| \"EMAIL\"\n\t| \"PHONE\"\n\t| \"ADDRESS\";\n\nexport type AddressType = \"SHIPPING\" | \"BILLING\";\n\nexport interface EmailBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface PhoneBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\tisNotificationTarget?: boolean;\n}\n\nexport interface AddressBlockProperties {\n\tminValues?: number;\n\tmaxValues?: number;\n\taddressType: AddressType;\n}\n\nexport interface GeoLocationValue {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tstate?: string | null;\n\tpostalCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EmailBlock extends Block {\n\ttype: \"EMAIL\";\n\tproperties: EmailBlockProperties;\n\tvalue: string[];\n}\n\nexport interface PhoneBlock extends Block {\n\ttype: \"PHONE\";\n\tproperties: PhoneBlockProperties;\n\tvalue: string[];\n}\n\nexport interface AddressBlock extends Block {\n\ttype: \"ADDRESS\";\n\tproperties: AddressBlockProperties;\n\tvalue: GeoLocationValue[];\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\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\tuploadedAt: string;\n\tseo: Seo;\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 ReservationStoreState {\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\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n\nexport interface StatusEvent {\n\tid: string;\n\tchangedBy: 'BUSINESS' | 'USER' | 'SYSTEM';\n\tuserId?: string;\n\tstatus: string;\n\tnote?: string;\n\ttimestamp: number;\n}\n\nexport interface ReservationItem {\n\tid: string;\n\tserviceId: string;\n\tproviderId: string;\n\tbusinessId: string;\n\treservationId: string;\n\tuserId: string;\n\tfrom: number;\n\tto: number;\n\tblocks: Block[];\n\tprice: Price;\n}\n\nexport interface Reservation {\n\tid: string;\n\tnumber: string;\n\tuserId: string;\n\tblocks: Block[];\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tserviceIds: string[];\n\tproviderIds: string[];\n\tpayment: Payment;\n\tbusiness?: Business;\n\tuser?: any;\n\titems: ReservationItem[];\n\temail?: string;\n\tphone?: string;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n\n// ===== CMS Types =====\n\nexport interface NodeNotifications {\n\temails: string[];\n}\n\nexport interface NodeConfig {\n\tparentId?: string | null;\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n}\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tproviderPriceId?: string;\n\tproviderProductId?: string;\n\tname: string;\n\ttier: number;\n\tamount: number;\n\tcurrency: string;\n\tinterval: string;\n\tintervalCount: number;\n\ttrialPeriodDays: number;\n\tfeatures: Record<string, any>;\n}\n\nexport type SendStatus = 'SCHEDULED' | 'SENDING' | 'SENT' | 'CANCELLED' | 'FAILED';\n\nexport interface NodeSend {\n\tid: string;\n\tscheduledAt: number;\n\tstatus: SendStatus;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tkey: string;\n\tbusinessId: string;\n\tblocks: Block[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tnotifications: NodeNotifications;\n\tconfig: NodeConfig;\n\temailSubject?: Record<string, string>;\n\tplans: SubscriptionPlan[];\n\tsends: NodeSend[];\n\tchildren: Node[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n\n// ===== Reservation Domain Types =====\n\nexport interface ServiceDuration {\n\tduration: number;\n\tisPause?: boolean;\n}\n\nexport interface ServiceProvider {\n\tid: string;\n\tproviderId: string;\n\tworkingTime: {\n\t\tworkingDays: Array<{ day: string; workingHours: Array<{ from: number; to: number }> }>;\n\t\toutcastDates: Array<{ month: number; day: number; workingHours: Array<{ from: number; to: number }> }>;\n\t\tspecificDates: Array<{ date: number; workingHours: Array<{ from: number; to: number }> }>;\n\t};\n\tprovider?: Provider;\n}\n\nexport interface Service {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\tnodeIds: string[];\n\tisApprovalRequired: boolean;\n\tproviders: ServiceProvider[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tstatuses: StatusEvent[];\n}\n\nexport interface ProviderTimelinePoint {\n\ttimestamp: number;\n\tconcurrent: number;\n}\n\nexport interface Provider {\n\tid: string;\n\tkey: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\tnodeIds: string[];\n\tblocks: Block[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.3.141",
3
+ "version": "0.3.143",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",