arky-sdk 0.3.124 → 0.3.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.cjs CHANGED
@@ -23,7 +23,6 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
23
23
  NodeType2["NEWSLETTER"] = "NEWSLETTER";
24
24
  NodeType2["NEWSLETTER_POST"] = "NEWSLETTER_POST";
25
25
  NodeType2["NEWSLETTER_SEGMENT"] = "NEWSLETTER_SEGMENT";
26
- NodeType2["NEWSLETTER_ENTRY"] = "NEWSLETTER_ENTRY";
27
26
  NodeType2["FORM"] = "FORM";
28
27
  return NodeType2;
29
28
  })(NodeType || {});
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType","NodeType"],"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;AAmTL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACN,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,UAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,2BAAA,CAAA,GAA4B,2BAAA;AAC5B,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AAjBI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,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 OrderConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessReservationConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\torderConfigs: OrderConfigs;\n\treservationConfigs: BusinessReservationConfigs;\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\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\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: 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 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\towner: 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\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | 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 enum NodeType {\n\tCONTENT = 'CONTENT',\n\tCATEGORY = 'CATEGORY',\n\tTAXONOMY_SERVICE = 'TAXONOMY_SERVICE',\n\tTAXONOMY_PROVIDER = 'TAXONOMY_PROVIDER',\n\tTAXONOMY_PRODUCT = 'TAXONOMY_PRODUCT',\n\tEMAIL_TEMPLATE = 'EMAIL_TEMPLATE',\n\tEMAIL_FORGOT_PASSWORD = 'EMAIL_FORGOT_PASSWORD',\n\tEMAIL_USER_CONFIRM = 'EMAIL_USER_CONFIRM',\n\tEMAIL_USER_INVITATION = 'EMAIL_USER_INVITATION',\n\tEMAIL_ORDER_STATUS_UPDATE = 'EMAIL_ORDER_STATUS_UPDATE',\n\tEMAIL_RESERVATION_BUSINESS_STATUS_UPDATE = 'EMAIL_RESERVATION_BUSINESS_STATUS_UPDATE',\n\tEMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE = 'EMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE',\n\tNEWSLETTER = 'NEWSLETTER',\n\tNEWSLETTER_POST = 'NEWSLETTER_POST',\n\tNEWSLETTER_SEGMENT = 'NEWSLETTER_SEGMENT',\n\tNEWSLETTER_ENTRY = 'NEWSLETTER_ENTRY',\n\tFORM = 'FORM',\n}\n\nexport interface NodeConfig {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n\tisSubmissionEnabled: boolean;\n\tisCaptchaRequired: boolean;\n\tnotificationEmails: string[];\n\tunsubscribeUrl: string | null;\n}\n\nexport interface EmailProperties {\n\tsubject: string;\n\tfromName: string;\n\tfromEmail: string;\n}\n\nexport interface TaxonomyProperties {\n\tparentId: string | null;\n\thasChildren: boolean;\n}\n\nexport type NodeProps =\n\t| { type: 'EMAIL'; subject: string; fromName: string; fromEmail: string }\n\t| { type: 'TAXONOMY'; parentId: string | null; hasChildren: boolean };\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\tproviderPriceId?: string;\n\tprices: Price[];\n}\n\nexport interface NodeSend {\n\tid: string;\n\trecipientSource: string;\n\tscheduledAt: number;\n\tstatus: string;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tname: string;\n\tbusinessId: string;\n\tentity: string;\n\ttype: NodeType;\n\tblocks: Block[];\n\tconfig?: NodeConfig;\n\tprops?: NodeProps;\n\tplans: SubscriptionPlan[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tsends: NodeSend[];\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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\ttaxonomyIds: 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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\ttaxonomyIds: 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","NodeType"],"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;AAmTL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACN,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,UAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,2BAAA,CAAA,GAA4B,2BAAA;AAC5B,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AAhBI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,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 OrderConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessReservationConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\torderConfigs: OrderConfigs;\n\treservationConfigs: BusinessReservationConfigs;\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\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\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: 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 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\towner: 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\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | 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 enum NodeType {\n\tCONTENT = 'CONTENT',\n\tCATEGORY = 'CATEGORY',\n\tTAXONOMY_SERVICE = 'TAXONOMY_SERVICE',\n\tTAXONOMY_PROVIDER = 'TAXONOMY_PROVIDER',\n\tTAXONOMY_PRODUCT = 'TAXONOMY_PRODUCT',\n\tEMAIL_TEMPLATE = 'EMAIL_TEMPLATE',\n\tEMAIL_FORGOT_PASSWORD = 'EMAIL_FORGOT_PASSWORD',\n\tEMAIL_USER_CONFIRM = 'EMAIL_USER_CONFIRM',\n\tEMAIL_USER_INVITATION = 'EMAIL_USER_INVITATION',\n\tEMAIL_ORDER_STATUS_UPDATE = 'EMAIL_ORDER_STATUS_UPDATE',\n\tEMAIL_RESERVATION_BUSINESS_STATUS_UPDATE = 'EMAIL_RESERVATION_BUSINESS_STATUS_UPDATE',\n\tEMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE = 'EMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE',\n\tNEWSLETTER = 'NEWSLETTER',\n\tNEWSLETTER_POST = 'NEWSLETTER_POST',\n\tNEWSLETTER_SEGMENT = 'NEWSLETTER_SEGMENT',\n\tFORM = 'FORM',\n}\n\nexport interface EmailProperties {\n\tsubject: string;\n\tfromName: string;\n\tfromEmail: string;\n}\n\nexport interface FormProperties {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n\tisSubmissionEnabled: boolean;\n\tisCaptchaRequired: boolean;\n\tnotificationEmails: string[];\n}\n\nexport interface NewsletterPostProperties {\n\tunsubscribeUrl: string | null;\n}\n\nexport type NodeProps =\n\t| { type: 'NONE' }\n\t| { type: 'EMAIL'; subject: string; fromName: string; fromEmail: string }\n\t| { type: 'FORM'; isPubliclyReadable: boolean; isPubliclyWritable: boolean; isSubmissionEnabled: boolean; isCaptchaRequired: boolean; notificationEmails: string[] }\n\t| { type: 'NEWSLETTER_POST'; unsubscribeUrl: string | null };\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\tproviderPriceId?: string;\n\tprices: Price[];\n}\n\nexport interface NodeSend {\n\tid: string;\n\trecipientSource: string;\n\tscheduledAt: number;\n\tstatus: string;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tname: string;\n\tbusinessId: string;\n\tentity: string;\n\ttype: NodeType;\n\tblocks: Block[];\n\tparentId?: string | null;\n\thasChildren: boolean;\n\tprops: NodeProps;\n\tplans: SubscriptionPlan[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tsends: NodeSend[];\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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\ttaxonomyIds: 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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\ttaxonomyIds: string[];\n\tblocks: Block[];\n\ttimeline: ProviderTimelinePoint[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n}\n"]}
package/dist/types.d.cts CHANGED
@@ -341,35 +341,40 @@ declare enum NodeType {
341
341
  NEWSLETTER = "NEWSLETTER",
342
342
  NEWSLETTER_POST = "NEWSLETTER_POST",
343
343
  NEWSLETTER_SEGMENT = "NEWSLETTER_SEGMENT",
344
- NEWSLETTER_ENTRY = "NEWSLETTER_ENTRY",
345
344
  FORM = "FORM"
346
345
  }
347
- interface NodeConfig {
346
+ interface EmailProperties {
347
+ subject: string;
348
+ fromName: string;
349
+ fromEmail: string;
350
+ }
351
+ interface FormProperties {
348
352
  isPubliclyReadable: boolean;
349
353
  isPubliclyWritable: boolean;
350
354
  isSubmissionEnabled: boolean;
351
355
  isCaptchaRequired: boolean;
352
356
  notificationEmails: string[];
353
- unsubscribeUrl: string | null;
354
357
  }
355
- interface EmailProperties {
356
- subject: string;
357
- fromName: string;
358
- fromEmail: string;
359
- }
360
- interface TaxonomyProperties {
361
- parentId: string | null;
362
- hasChildren: boolean;
358
+ interface NewsletterPostProperties {
359
+ unsubscribeUrl: string | null;
363
360
  }
364
361
  type NodeProps = {
362
+ type: 'NONE';
363
+ } | {
365
364
  type: 'EMAIL';
366
365
  subject: string;
367
366
  fromName: string;
368
367
  fromEmail: string;
369
368
  } | {
370
- type: 'TAXONOMY';
371
- parentId: string | null;
372
- hasChildren: boolean;
369
+ type: 'FORM';
370
+ isPubliclyReadable: boolean;
371
+ isPubliclyWritable: boolean;
372
+ isSubmissionEnabled: boolean;
373
+ isCaptchaRequired: boolean;
374
+ notificationEmails: string[];
375
+ } | {
376
+ type: 'NEWSLETTER_POST';
377
+ unsubscribeUrl: string | null;
373
378
  };
374
379
  interface SubscriptionPlan {
375
380
  id: string;
@@ -394,8 +399,9 @@ interface Node {
394
399
  entity: string;
395
400
  type: NodeType;
396
401
  blocks: Block[];
397
- config?: NodeConfig;
398
- props?: NodeProps;
402
+ parentId?: string | null;
403
+ hasChildren: boolean;
404
+ props: NodeProps;
399
405
  plans: SubscriptionPlan[];
400
406
  statuses: StatusEvent[];
401
407
  seo: Seo;
@@ -547,10 +553,10 @@ interface GetNodesParams {
547
553
  }
548
554
  interface CreateNodeParams {
549
555
  name: string;
550
- parentId?: string;
551
556
  type?: string;
552
557
  blocks?: any[];
553
- config?: any;
558
+ parentId?: string | null;
559
+ hasChildren?: boolean;
554
560
  entity?: string;
555
561
  plans?: any[];
556
562
  props?: any;
@@ -560,10 +566,10 @@ interface CreateNodeParams {
560
566
  interface UpdateNodeParams {
561
567
  id: string;
562
568
  name?: string;
563
- parentId?: string;
564
569
  type?: string;
565
570
  blocks?: any[];
566
- config?: any;
571
+ parentId?: string | null;
572
+ hasChildren?: boolean;
567
573
  entity?: string;
568
574
  plans?: any[];
569
575
  props?: any;
@@ -826,12 +832,14 @@ interface HandleInvitationParams {
826
832
  interface TestWebhookParams {
827
833
  webhook: any;
828
834
  }
829
- interface NodeConfigParams {
835
+ interface FormPropsParams {
830
836
  isPubliclyReadable?: boolean;
831
837
  isPubliclyWritable?: boolean;
832
838
  isSubmissionEnabled?: boolean;
833
839
  isCaptchaRequired?: boolean;
834
840
  notificationEmails?: string[];
841
+ }
842
+ interface NewsletterPostPropsParams {
835
843
  unsubscribeUrl?: string | null;
836
844
  }
837
845
  interface GenerateBlocksParams {
@@ -1198,4 +1206,4 @@ interface Slot {
1198
1206
  dateText: string;
1199
1207
  }
1200
1208
 
1201
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type BusinessReservationConfigs, 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 EmailProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, 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 GetNodeSubscribersParams, 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 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 NodeConfigParams, type NodeProps, type NodeSend, NodeType, type OrderCheckoutParams, type OrderConfigs, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, 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 SearchReservationsParams, type SearchUsersParams, type SendNodeParams, 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 SubscriptionPlan, type TaxonomyProperties, 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 };
1209
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type BusinessReservationConfigs, 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 EmailProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type FormProperties, type FormPropsParams, type GenerateBlocksParams, 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 GetNodeSubscribersParams, 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 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 NewsletterPostProperties, type NewsletterPostPropsParams, type Node, type NodeProps, type NodeSend, NodeType, type OrderCheckoutParams, type OrderConfigs, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, 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 SearchReservationsParams, type SearchUsersParams, type SendNodeParams, 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 SubscriptionPlan, 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
@@ -341,35 +341,40 @@ declare enum NodeType {
341
341
  NEWSLETTER = "NEWSLETTER",
342
342
  NEWSLETTER_POST = "NEWSLETTER_POST",
343
343
  NEWSLETTER_SEGMENT = "NEWSLETTER_SEGMENT",
344
- NEWSLETTER_ENTRY = "NEWSLETTER_ENTRY",
345
344
  FORM = "FORM"
346
345
  }
347
- interface NodeConfig {
346
+ interface EmailProperties {
347
+ subject: string;
348
+ fromName: string;
349
+ fromEmail: string;
350
+ }
351
+ interface FormProperties {
348
352
  isPubliclyReadable: boolean;
349
353
  isPubliclyWritable: boolean;
350
354
  isSubmissionEnabled: boolean;
351
355
  isCaptchaRequired: boolean;
352
356
  notificationEmails: string[];
353
- unsubscribeUrl: string | null;
354
357
  }
355
- interface EmailProperties {
356
- subject: string;
357
- fromName: string;
358
- fromEmail: string;
359
- }
360
- interface TaxonomyProperties {
361
- parentId: string | null;
362
- hasChildren: boolean;
358
+ interface NewsletterPostProperties {
359
+ unsubscribeUrl: string | null;
363
360
  }
364
361
  type NodeProps = {
362
+ type: 'NONE';
363
+ } | {
365
364
  type: 'EMAIL';
366
365
  subject: string;
367
366
  fromName: string;
368
367
  fromEmail: string;
369
368
  } | {
370
- type: 'TAXONOMY';
371
- parentId: string | null;
372
- hasChildren: boolean;
369
+ type: 'FORM';
370
+ isPubliclyReadable: boolean;
371
+ isPubliclyWritable: boolean;
372
+ isSubmissionEnabled: boolean;
373
+ isCaptchaRequired: boolean;
374
+ notificationEmails: string[];
375
+ } | {
376
+ type: 'NEWSLETTER_POST';
377
+ unsubscribeUrl: string | null;
373
378
  };
374
379
  interface SubscriptionPlan {
375
380
  id: string;
@@ -394,8 +399,9 @@ interface Node {
394
399
  entity: string;
395
400
  type: NodeType;
396
401
  blocks: Block[];
397
- config?: NodeConfig;
398
- props?: NodeProps;
402
+ parentId?: string | null;
403
+ hasChildren: boolean;
404
+ props: NodeProps;
399
405
  plans: SubscriptionPlan[];
400
406
  statuses: StatusEvent[];
401
407
  seo: Seo;
@@ -547,10 +553,10 @@ interface GetNodesParams {
547
553
  }
548
554
  interface CreateNodeParams {
549
555
  name: string;
550
- parentId?: string;
551
556
  type?: string;
552
557
  blocks?: any[];
553
- config?: any;
558
+ parentId?: string | null;
559
+ hasChildren?: boolean;
554
560
  entity?: string;
555
561
  plans?: any[];
556
562
  props?: any;
@@ -560,10 +566,10 @@ interface CreateNodeParams {
560
566
  interface UpdateNodeParams {
561
567
  id: string;
562
568
  name?: string;
563
- parentId?: string;
564
569
  type?: string;
565
570
  blocks?: any[];
566
- config?: any;
571
+ parentId?: string | null;
572
+ hasChildren?: boolean;
567
573
  entity?: string;
568
574
  plans?: any[];
569
575
  props?: any;
@@ -826,12 +832,14 @@ interface HandleInvitationParams {
826
832
  interface TestWebhookParams {
827
833
  webhook: any;
828
834
  }
829
- interface NodeConfigParams {
835
+ interface FormPropsParams {
830
836
  isPubliclyReadable?: boolean;
831
837
  isPubliclyWritable?: boolean;
832
838
  isSubmissionEnabled?: boolean;
833
839
  isCaptchaRequired?: boolean;
834
840
  notificationEmails?: string[];
841
+ }
842
+ interface NewsletterPostPropsParams {
835
843
  unsubscribeUrl?: string | null;
836
844
  }
837
845
  interface GenerateBlocksParams {
@@ -1198,4 +1206,4 @@ interface Slot {
1198
1206
  dateText: string;
1199
1207
  }
1200
1208
 
1201
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type BusinessReservationConfigs, 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 EmailProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, 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 GetNodeSubscribersParams, 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 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 NodeConfigParams, type NodeProps, type NodeSend, NodeType, type OrderCheckoutParams, type OrderConfigs, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, 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 SearchReservationsParams, type SearchUsersParams, type SendNodeParams, 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 SubscriptionPlan, type TaxonomyProperties, 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 };
1209
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type BulkScheduleParams, type Business, type BusinessConfig, type BusinessEmails, type BusinessReservationConfigs, 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 EmailProperties, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type FormProperties, type FormPropsParams, type GenerateBlocksParams, 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 GetNodeSubscribersParams, 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 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 NewsletterPostProperties, type NewsletterPostPropsParams, type Node, type NodeProps, type NodeSend, NodeType, type OrderCheckoutParams, type OrderConfigs, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PaymentRefund, 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 SearchReservationsParams, type SearchUsersParams, type SendNodeParams, 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 SubscriptionPlan, 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 CHANGED
@@ -21,7 +21,6 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
21
21
  NodeType2["NEWSLETTER"] = "NEWSLETTER";
22
22
  NodeType2["NEWSLETTER_POST"] = "NEWSLETTER_POST";
23
23
  NodeType2["NEWSLETTER_SEGMENT"] = "NEWSLETTER_SEGMENT";
24
- NodeType2["NEWSLETTER_ENTRY"] = "NEWSLETTER_ENTRY";
25
24
  NodeType2["FORM"] = "FORM";
26
25
  return NodeType2;
27
26
  })(NodeType || {});
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType","NodeType"],"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;AAmTL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACN,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,UAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,2BAAA,CAAA,GAA4B,2BAAA;AAC5B,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AAjBI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,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 OrderConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessReservationConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\torderConfigs: OrderConfigs;\n\treservationConfigs: BusinessReservationConfigs;\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\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\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: 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 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\towner: 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\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | 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 enum NodeType {\n\tCONTENT = 'CONTENT',\n\tCATEGORY = 'CATEGORY',\n\tTAXONOMY_SERVICE = 'TAXONOMY_SERVICE',\n\tTAXONOMY_PROVIDER = 'TAXONOMY_PROVIDER',\n\tTAXONOMY_PRODUCT = 'TAXONOMY_PRODUCT',\n\tEMAIL_TEMPLATE = 'EMAIL_TEMPLATE',\n\tEMAIL_FORGOT_PASSWORD = 'EMAIL_FORGOT_PASSWORD',\n\tEMAIL_USER_CONFIRM = 'EMAIL_USER_CONFIRM',\n\tEMAIL_USER_INVITATION = 'EMAIL_USER_INVITATION',\n\tEMAIL_ORDER_STATUS_UPDATE = 'EMAIL_ORDER_STATUS_UPDATE',\n\tEMAIL_RESERVATION_BUSINESS_STATUS_UPDATE = 'EMAIL_RESERVATION_BUSINESS_STATUS_UPDATE',\n\tEMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE = 'EMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE',\n\tNEWSLETTER = 'NEWSLETTER',\n\tNEWSLETTER_POST = 'NEWSLETTER_POST',\n\tNEWSLETTER_SEGMENT = 'NEWSLETTER_SEGMENT',\n\tNEWSLETTER_ENTRY = 'NEWSLETTER_ENTRY',\n\tFORM = 'FORM',\n}\n\nexport interface NodeConfig {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n\tisSubmissionEnabled: boolean;\n\tisCaptchaRequired: boolean;\n\tnotificationEmails: string[];\n\tunsubscribeUrl: string | null;\n}\n\nexport interface EmailProperties {\n\tsubject: string;\n\tfromName: string;\n\tfromEmail: string;\n}\n\nexport interface TaxonomyProperties {\n\tparentId: string | null;\n\thasChildren: boolean;\n}\n\nexport type NodeProps =\n\t| { type: 'EMAIL'; subject: string; fromName: string; fromEmail: string }\n\t| { type: 'TAXONOMY'; parentId: string | null; hasChildren: boolean };\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\tproviderPriceId?: string;\n\tprices: Price[];\n}\n\nexport interface NodeSend {\n\tid: string;\n\trecipientSource: string;\n\tscheduledAt: number;\n\tstatus: string;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tname: string;\n\tbusinessId: string;\n\tentity: string;\n\ttype: NodeType;\n\tblocks: Block[];\n\tconfig?: NodeConfig;\n\tprops?: NodeProps;\n\tplans: SubscriptionPlan[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tsends: NodeSend[];\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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\ttaxonomyIds: 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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\ttaxonomyIds: 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","NodeType"],"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;AAmTL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACN,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,UAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,UAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,UAAA,2BAAA,CAAA,GAA4B,2BAAA;AAC5B,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,0CAAA,CAAA,GAA2C,0CAAA;AAC3C,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,UAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AAhBI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,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 OrderConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessReservationConfigs {\n\tisEmailRequired: boolean;\n\tisPhoneRequired: boolean;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\torderConfigs: OrderConfigs;\n\treservationConfigs: BusinessReservationConfigs;\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\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\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: 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 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\towner: 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\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | 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 enum NodeType {\n\tCONTENT = 'CONTENT',\n\tCATEGORY = 'CATEGORY',\n\tTAXONOMY_SERVICE = 'TAXONOMY_SERVICE',\n\tTAXONOMY_PROVIDER = 'TAXONOMY_PROVIDER',\n\tTAXONOMY_PRODUCT = 'TAXONOMY_PRODUCT',\n\tEMAIL_TEMPLATE = 'EMAIL_TEMPLATE',\n\tEMAIL_FORGOT_PASSWORD = 'EMAIL_FORGOT_PASSWORD',\n\tEMAIL_USER_CONFIRM = 'EMAIL_USER_CONFIRM',\n\tEMAIL_USER_INVITATION = 'EMAIL_USER_INVITATION',\n\tEMAIL_ORDER_STATUS_UPDATE = 'EMAIL_ORDER_STATUS_UPDATE',\n\tEMAIL_RESERVATION_BUSINESS_STATUS_UPDATE = 'EMAIL_RESERVATION_BUSINESS_STATUS_UPDATE',\n\tEMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE = 'EMAIL_RESERVATION_CUSTOMER_STATUS_UPDATE',\n\tNEWSLETTER = 'NEWSLETTER',\n\tNEWSLETTER_POST = 'NEWSLETTER_POST',\n\tNEWSLETTER_SEGMENT = 'NEWSLETTER_SEGMENT',\n\tFORM = 'FORM',\n}\n\nexport interface EmailProperties {\n\tsubject: string;\n\tfromName: string;\n\tfromEmail: string;\n}\n\nexport interface FormProperties {\n\tisPubliclyReadable: boolean;\n\tisPubliclyWritable: boolean;\n\tisSubmissionEnabled: boolean;\n\tisCaptchaRequired: boolean;\n\tnotificationEmails: string[];\n}\n\nexport interface NewsletterPostProperties {\n\tunsubscribeUrl: string | null;\n}\n\nexport type NodeProps =\n\t| { type: 'NONE' }\n\t| { type: 'EMAIL'; subject: string; fromName: string; fromEmail: string }\n\t| { type: 'FORM'; isPubliclyReadable: boolean; isPubliclyWritable: boolean; isSubmissionEnabled: boolean; isCaptchaRequired: boolean; notificationEmails: string[] }\n\t| { type: 'NEWSLETTER_POST'; unsubscribeUrl: string | null };\n\nexport interface SubscriptionPlan {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\tproviderPriceId?: string;\n\tprices: Price[];\n}\n\nexport interface NodeSend {\n\tid: string;\n\trecipientSource: string;\n\tscheduledAt: number;\n\tstatus: string;\n\tsentCount: number;\n\tfailedCount: number;\n\tcreatedAt: number;\n}\n\nexport interface Node {\n\tid: string;\n\tname: string;\n\tbusinessId: string;\n\tentity: string;\n\ttype: NodeType;\n\tblocks: Block[];\n\tparentId?: string | null;\n\thasChildren: boolean;\n\tprops: NodeProps;\n\tplans: SubscriptionPlan[];\n\tstatuses: StatusEvent[];\n\tseo: Seo;\n\tsends: NodeSend[];\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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tprices: Price[];\n\tdurations: ServiceDuration[];\n\tblocks: Block[];\n\ttaxonomyIds: 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\tname: string;\n\tseo: Seo;\n\tbusinessId: string;\n\tstatuses: StatusEvent[];\n\tconcurrentLimit: number;\n\ttaxonomyIds: 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.124",
3
+ "version": "0.3.126",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -27,6 +27,11 @@
27
27
  "dist",
28
28
  "README.md"
29
29
  ],
30
+ "scripts": {
31
+ "build": "tsup",
32
+ "dev": "tsup --watch",
33
+ "clean": "rm -rf dist"
34
+ },
30
35
  "keywords": [
31
36
  "arky",
32
37
  "sdk",
@@ -49,10 +54,5 @@
49
54
  "devDependencies": {
50
55
  "tsup": "^8.5.0",
51
56
  "typescript": "^5.8.3"
52
- },
53
- "scripts": {
54
- "build": "tsup",
55
- "dev": "tsup --watch",
56
- "clean": "rm -rf dist"
57
57
  }
58
- }
58
+ }