arky-sdk 0.3.95 → 0.3.96

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":";;;AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface 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\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\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\tshippingMethods: ShippingMethod[];\n\tpaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: 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\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\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\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\taddress?: Location;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";;;AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface 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\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\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\tshippingMethods: ShippingMethod[];\n\tpaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: 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\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\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\treservationTaxBps: number;\n\treservationPaymentMethods: PaymentMethod[];\n}\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"]}
package/dist/types.d.cts CHANGED
@@ -143,6 +143,8 @@ interface Market {
143
143
  id: string;
144
144
  currency: string;
145
145
  taxMode: "EXCLUSIVE" | "INCLUSIVE";
146
+ reservationTaxBps: number;
147
+ reservationPaymentMethods: PaymentMethod[];
146
148
  }
147
149
  interface Language {
148
150
  id: string;
@@ -318,7 +320,6 @@ interface Reservation {
318
320
  items: ReservationItem[];
319
321
  email?: string;
320
322
  phone?: string;
321
- address?: Location;
322
323
  createdAt: number;
323
324
  lastModified: number;
324
325
  }
@@ -444,10 +445,8 @@ interface ReservationCheckoutParams {
444
445
  paymentMethod?: string;
445
446
  blocks?: any[];
446
447
  promoCodeId?: string;
447
- zoneId?: string;
448
448
  email?: string;
449
449
  phone?: string;
450
- address?: Location;
451
450
  }
452
451
  interface ReservationQuoteItem {
453
452
  serviceId: string;
@@ -460,8 +459,6 @@ interface GetReservationQuoteParams {
460
459
  items: ReservationQuoteItem[];
461
460
  paymentMethod: string;
462
461
  promoCode?: string;
463
- location?: Location;
464
- zoneId?: string;
465
462
  }
466
463
  interface GetServiceProvidersParams {
467
464
  serviceId: string;
package/dist/types.d.ts CHANGED
@@ -143,6 +143,8 @@ interface Market {
143
143
  id: string;
144
144
  currency: string;
145
145
  taxMode: "EXCLUSIVE" | "INCLUSIVE";
146
+ reservationTaxBps: number;
147
+ reservationPaymentMethods: PaymentMethod[];
146
148
  }
147
149
  interface Language {
148
150
  id: string;
@@ -318,7 +320,6 @@ interface Reservation {
318
320
  items: ReservationItem[];
319
321
  email?: string;
320
322
  phone?: string;
321
- address?: Location;
322
323
  createdAt: number;
323
324
  lastModified: number;
324
325
  }
@@ -444,10 +445,8 @@ interface ReservationCheckoutParams {
444
445
  paymentMethod?: string;
445
446
  blocks?: any[];
446
447
  promoCodeId?: string;
447
- zoneId?: string;
448
448
  email?: string;
449
449
  phone?: string;
450
- address?: Location;
451
450
  }
452
451
  interface ReservationQuoteItem {
453
452
  serviceId: string;
@@ -460,8 +459,6 @@ interface GetReservationQuoteParams {
460
459
  items: ReservationQuoteItem[];
461
460
  paymentMethod: string;
462
461
  promoCode?: string;
463
- location?: Location;
464
- zoneId?: string;
465
462
  }
466
463
  interface GetServiceProvidersParams {
467
464
  serviceId: string;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface 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\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\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\tshippingMethods: ShippingMethod[];\n\tpaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: 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\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\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\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\taddress?: Location;\n\tcreatedAt: number;\n\tlastModified: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface 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\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\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\tshippingMethods: ShippingMethod[];\n\tpaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: 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\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\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\treservationTaxBps: number;\n\treservationPaymentMethods: PaymentMethod[];\n}\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.3.95",
3
+ "version": "0.3.96",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",