arky-sdk 0.3.55 → 0.3.57

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":";;;AAkCO,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":["// Core type definitions\n// All types are exported individually for better tree-shaking\n\nexport * from './api';\n\n// NEW: Payment structure (matches backend)\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: 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}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\n// Quote line item (from quote engine)\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\n// Promo code validation result\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\n// Quote response from backend (full pricing breakdown)\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\n// Market-based price structure (for product variants)\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\n// Location structure (for shipping addresses, pickup points, etc.)\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\n// Cart types\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; // Minor units (backend format)\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartPart {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\tisMultiDay: boolean;\n\treservationMethod: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\n// Payment provider types\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ZoneDefinition {\n\tid: string;\n\tname: string;\n}\n\nexport interface ZonePaymentMethod {\n\tid: string;\n}\n\nexport interface ZoneShippingMethod {\n\tid: string;\n\tamount: number;\n}\n\nexport interface MarketZone {\n\ttaxBps: number;\n\tzoneId: string;\n\tpaymentMethods: ZonePaymentMethod[];\n\tshippingMethods: ZoneShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n\tzones: MarketZone[];\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n taxable: boolean;\n etaText: string;\n location?: Location;\n}\n\nexport interface ZoneResolvedShippingMethod extends ShippingMethod {\n\tzoneAmount: number;\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\tzones: ZoneDefinition[];\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n\tmarkets: Market[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\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\n// Store state types - Simplified (business data moved to business store)\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\n// SEO types\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\n// Media types\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\n// API Response types\nexport interface ApiResponse<T> {\n success: boolean;\n data?: T;\n error?: string;\n cursor?: string;\n total?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\n// Legacy types - kept for compatibility\nexport interface MarketConfigClient {\n\tcurrency: string;\n\ttaxMode: string;\n\tdefaultTaxRate: number;\n\tpaymentMethods: string[];\n\tshowTaxIncluded: boolean;\n\tshippingMethods?: ShippingMethod[];\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\n\t// Calendar data\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\n\t// Selection state\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedMethod: string | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\n\t// Status flags\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tisMultiDay: boolean;\n\n\t// Phone verification\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\n\t// Service & config\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\tstorageUrl: string;\n\ttimezone: string;\n\ttzGroups: any;\n\tparts: ReservationCartPart[];\n\n\t// Payment configuration\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";;;AAkCO,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":["// Core type definitions\n// All types are exported individually for better tree-shaking\n\nexport * from './api';\n\n// NEW: Payment structure (matches backend)\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: 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}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\n// Quote line item (from quote engine)\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\n// Promo code validation result\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\n// Quote response from backend (full pricing breakdown)\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\n// Market-based price structure (for product variants)\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\n// Location structure (for shipping addresses, pickup points, etc.)\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\n// Cart types\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; // Minor units (backend format)\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\tisMultiDay: boolean;\n\treservationMethod: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\n// Payment provider types\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ZoneDefinition {\n\tid: string;\n\tname: string;\n}\n\nexport interface ZonePaymentMethod {\n\tid: string;\n}\n\nexport interface ZoneShippingMethod {\n\tid: string;\n\tamount: number;\n}\n\nexport interface MarketZone {\n\ttaxBps: number;\n\tzoneId: string;\n\tpaymentMethods: ZonePaymentMethod[];\n\tshippingMethods: ZoneShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n\tzones: MarketZone[];\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n taxable: boolean;\n etaText: string;\n location?: Location;\n}\n\nexport interface ZoneResolvedShippingMethod extends ShippingMethod {\n\tzoneAmount: number;\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\tzones: ZoneDefinition[];\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n\tmarkets: Market[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\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\n// Store state types - Simplified (business data moved to business store)\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\n// SEO types\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\n// Media types\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\n// API Response types\nexport interface ApiResponse<T> {\n success: boolean;\n data?: T;\n error?: string;\n cursor?: string;\n total?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\n// Legacy types - kept for compatibility\nexport interface MarketConfigClient {\n\tcurrency: string;\n\ttaxMode: string;\n\tdefaultTaxRate: number;\n\tpaymentMethods: string[];\n\tshowTaxIncluded: boolean;\n\tshippingMethods?: ShippingMethod[];\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\n\t// Calendar data\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\n\t// Selection state\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedMethod: string | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\n\t// Status flags\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tisMultiDay: boolean;\n\n\t// Phone verification\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\n\t// Service & config\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\tstorageUrl: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\n\t// Payment configuration\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
package/dist/types.d.cts CHANGED
@@ -112,14 +112,14 @@ interface GetServicesParams {
112
112
  cursor?: string;
113
113
  }
114
114
  interface ReservationCheckoutParams {
115
- parts: any[];
115
+ items: any[];
116
116
  paymentMethod?: string;
117
117
  blocks?: any[];
118
118
  promoCode?: string;
119
119
  zoneId?: string;
120
120
  }
121
121
  interface GetReservationQuoteParams {
122
- parts: any[];
122
+ items: any[];
123
123
  currency: string;
124
124
  paymentMethod: string;
125
125
  promoCode?: string;
@@ -485,9 +485,6 @@ interface SearchMyReservationsParams {
485
485
  interface GetReservationParams {
486
486
  id: string;
487
487
  }
488
- interface GetReservationPartsParams {
489
- reservationId?: string;
490
- }
491
488
  interface SearchReservationsParams {
492
489
  serviceIds?: string[];
493
490
  providerIds?: string[];
@@ -680,7 +677,7 @@ interface EshopCartItem {
680
677
  quantity: number;
681
678
  addedAt: number;
682
679
  }
683
- interface ReservationCartPart {
680
+ interface ReservationCartItem {
684
681
  id: string;
685
682
  serviceId: string;
686
683
  serviceName: string;
@@ -871,7 +868,7 @@ interface ReservationStoreState {
871
868
  storageUrl: string;
872
869
  timezone: string;
873
870
  tzGroups: any;
874
- parts: ReservationCartPart[];
871
+ items: ReservationCartItem[];
875
872
  allowedPaymentMethods: string[];
876
873
  paymentConfig: {
877
874
  provider: PaymentProviderConfig | null;
@@ -879,4 +876,4 @@ interface ReservationStoreState {
879
876
  };
880
877
  }
881
878
 
882
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationPartsParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type MarketZone, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RefundItem, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type ZoneDefinition, type ZonePaymentMethod, type ZoneResolvedShippingMethod, type ZoneShippingMethod };
879
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetLoginUrlParams, type GetMeParams, 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 GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type MarketZone, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RefundItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type ZoneDefinition, type ZonePaymentMethod, type ZoneResolvedShippingMethod, type ZoneShippingMethod };
package/dist/types.d.ts CHANGED
@@ -112,14 +112,14 @@ interface GetServicesParams {
112
112
  cursor?: string;
113
113
  }
114
114
  interface ReservationCheckoutParams {
115
- parts: any[];
115
+ items: any[];
116
116
  paymentMethod?: string;
117
117
  blocks?: any[];
118
118
  promoCode?: string;
119
119
  zoneId?: string;
120
120
  }
121
121
  interface GetReservationQuoteParams {
122
- parts: any[];
122
+ items: any[];
123
123
  currency: string;
124
124
  paymentMethod: string;
125
125
  promoCode?: string;
@@ -485,9 +485,6 @@ interface SearchMyReservationsParams {
485
485
  interface GetReservationParams {
486
486
  id: string;
487
487
  }
488
- interface GetReservationPartsParams {
489
- reservationId?: string;
490
- }
491
488
  interface SearchReservationsParams {
492
489
  serviceIds?: string[];
493
490
  providerIds?: string[];
@@ -680,7 +677,7 @@ interface EshopCartItem {
680
677
  quantity: number;
681
678
  addedAt: number;
682
679
  }
683
- interface ReservationCartPart {
680
+ interface ReservationCartItem {
684
681
  id: string;
685
682
  serviceId: string;
686
683
  serviceName: string;
@@ -871,7 +868,7 @@ interface ReservationStoreState {
871
868
  storageUrl: string;
872
869
  timezone: string;
873
870
  tzGroups: any;
874
- parts: ReservationCartPart[];
871
+ items: ReservationCartItem[];
875
872
  allowedPaymentMethods: string[];
876
873
  paymentConfig: {
877
874
  provider: PaymentProviderConfig | null;
@@ -879,4 +876,4 @@ interface ReservationStoreState {
879
876
  };
880
877
  }
881
878
 
882
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationPartsParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type MarketZone, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RefundItem, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type ZoneDefinition, type ZonePaymentMethod, type ZoneResolvedShippingMethod, type ZoneShippingMethod };
879
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetLoginUrlParams, type GetMeParams, 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 GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type MarketZone, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RefundItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type ZoneDefinition, type ZonePaymentMethod, type ZoneResolvedShippingMethod, type ZoneShippingMethod };
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AAkCO,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":["// Core type definitions\n// All types are exported individually for better tree-shaking\n\nexport * from './api';\n\n// NEW: Payment structure (matches backend)\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: 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}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\n// Quote line item (from quote engine)\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\n// Promo code validation result\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\n// Quote response from backend (full pricing breakdown)\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\n// Market-based price structure (for product variants)\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\n// Location structure (for shipping addresses, pickup points, etc.)\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\n// Cart types\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; // Minor units (backend format)\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartPart {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\tisMultiDay: boolean;\n\treservationMethod: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\n// Payment provider types\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ZoneDefinition {\n\tid: string;\n\tname: string;\n}\n\nexport interface ZonePaymentMethod {\n\tid: string;\n}\n\nexport interface ZoneShippingMethod {\n\tid: string;\n\tamount: number;\n}\n\nexport interface MarketZone {\n\ttaxBps: number;\n\tzoneId: string;\n\tpaymentMethods: ZonePaymentMethod[];\n\tshippingMethods: ZoneShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n\tzones: MarketZone[];\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n taxable: boolean;\n etaText: string;\n location?: Location;\n}\n\nexport interface ZoneResolvedShippingMethod extends ShippingMethod {\n\tzoneAmount: number;\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\tzones: ZoneDefinition[];\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n\tmarkets: Market[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\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\n// Store state types - Simplified (business data moved to business store)\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\n// SEO types\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\n// Media types\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\n// API Response types\nexport interface ApiResponse<T> {\n success: boolean;\n data?: T;\n error?: string;\n cursor?: string;\n total?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\n// Legacy types - kept for compatibility\nexport interface MarketConfigClient {\n\tcurrency: string;\n\ttaxMode: string;\n\tdefaultTaxRate: number;\n\tpaymentMethods: string[];\n\tshowTaxIncluded: boolean;\n\tshippingMethods?: ShippingMethod[];\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\n\t// Calendar data\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\n\t// Selection state\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedMethod: string | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\n\t// Status flags\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tisMultiDay: boolean;\n\n\t// Phone verification\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\n\t// Service & config\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\tstorageUrl: string;\n\ttimezone: string;\n\ttzGroups: any;\n\tparts: ReservationCartPart[];\n\n\t// Payment configuration\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AAkCO,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":["// Core type definitions\n// All types are exported individually for better tree-shaking\n\nexport * from './api';\n\n// NEW: Payment structure (matches backend)\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: 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}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\n// Quote line item (from quote engine)\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\n// Promo code validation result\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\n// Quote response from backend (full pricing breakdown)\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\n// Market-based price structure (for product variants)\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\n// Location structure (for shipping addresses, pickup points, etc.)\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\n// Cart types\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; // Minor units (backend format)\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\tisMultiDay: boolean;\n\treservationMethod: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\n// Payment provider types\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ZoneDefinition {\n\tid: string;\n\tname: string;\n}\n\nexport interface ZonePaymentMethod {\n\tid: string;\n}\n\nexport interface ZoneShippingMethod {\n\tid: string;\n\tamount: number;\n}\n\nexport interface MarketZone {\n\ttaxBps: number;\n\tzoneId: string;\n\tpaymentMethods: ZonePaymentMethod[];\n\tshippingMethods: ZoneShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n\tzones: MarketZone[];\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n taxable: boolean;\n etaText: string;\n location?: Location;\n}\n\nexport interface ZoneResolvedShippingMethod extends ShippingMethod {\n\tzoneAmount: number;\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\tzones: ZoneDefinition[];\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n\tmarkets: Market[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\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\n// Store state types - Simplified (business data moved to business store)\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\n// SEO types\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\n// Media types\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\n// API Response types\nexport interface ApiResponse<T> {\n success: boolean;\n data?: T;\n error?: string;\n cursor?: string;\n total?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\n// Legacy types - kept for compatibility\nexport interface MarketConfigClient {\n\tcurrency: string;\n\ttaxMode: string;\n\tdefaultTaxRate: number;\n\tpaymentMethods: string[];\n\tshowTaxIncluded: boolean;\n\tshippingMethods?: ShippingMethod[];\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\n\t// Calendar data\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\n\t// Selection state\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedMethod: string | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\n\t// Status flags\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tisMultiDay: boolean;\n\n\t// Phone verification\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\n\t// Service & config\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\tstorageUrl: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\n\t// Payment configuration\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.3.55",
3
+ "version": "0.3.57",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",