arky-sdk 0.3.21 → 0.3.23
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/index.cjs +33 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -14
- package/dist/index.d.ts +6 -14
- package/dist/index.js +33 -55
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +13 -55
- package/dist/types.d.ts +13 -55
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethod"],"mappings":";;;AAyBO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,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\ttax: number;\n\ttotal: number;\n\tpromoCodeId?: string;\n\tpromoCode?: string;\n\tpromoType?: string;\n\tpromoValue?: number;\n\tmethod: PaymentMethod;\n\tcustomerId?: string;\n\tpaymentIntentId?: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n}\n\nexport enum PaymentMethod {\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\ttax: 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// Zone structure (logistics grouping - countries, tax rates, shipping methods)\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tcountries: string[]; // Empty array = \"All Countries\"\n\ttaxBps: number;\n\tshippingMethods: ShippingMethod[];\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\n// Market types (business-owned) - camelCase for frontend\nexport interface Market {\n\tid: string;\n\tname: string;\n\tcurrency: string;\n\ttaxMode: \"INCLUSIVE\" | \"EXCLUSIVE\";\n\ttaxBps: number;\n\tpaymentMethods: BusinessPaymentMethod[];\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n prices: Price[]; // Market-based pricing with free thresholds\n taxable: boolean;\n etaText: string; // e.g., \"3-5 business days\"\n location?: Location; // Pickup address (only for PICKUP type)\n}\n\nexport interface BusinessPaymentMethod {\n\tmethod: PaymentMethod;\n}\n\n// Business types\nexport interface BusinessConfig {\n\torderBlocks?: any[];\n\treservationBlocks?: any[];\n\tmarkets?: Market[];\n\tzones?: Zone[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\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// 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//
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethod"],"mappings":";;;AAyBO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,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\ttax: number;\n\ttotal: number;\n\tpromoCodeId?: string;\n\tpromoCode?: string;\n\tpromoType?: string;\n\tpromoValue?: number;\n\tmethod: PaymentMethod;\n\tcustomerId?: string;\n\tpaymentIntentId?: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n}\n\nexport enum PaymentMethod {\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\ttax: 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// Zone structure (logistics grouping - countries, tax rates, shipping methods)\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tcountries: string[]; // Empty array = \"All Countries\"\n\ttaxBps: number;\n\tshippingMethods: ShippingMethod[];\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\n// Market types (business-owned) - camelCase for frontend\nexport interface Market {\n\tid: string;\n\tname: string;\n\tcurrency: string;\n\ttaxMode: \"INCLUSIVE\" | \"EXCLUSIVE\";\n\ttaxBps: number;\n\tpaymentMethods: BusinessPaymentMethod[];\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n prices: Price[]; // Market-based pricing with free thresholds\n taxable: boolean;\n etaText: string; // e.g., \"3-5 business days\"\n location?: Location; // Pickup address (only for PICKUP type)\n}\n\nexport interface BusinessPaymentMethod {\n\tmethod: PaymentMethod;\n}\n\n// Business types\nexport interface BusinessConfig {\n\torderBlocks?: any[];\n\treservationBlocks?: any[];\n\tmarkets?: Market[];\n\tzones?: Zone[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\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// 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"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -57,17 +57,6 @@ interface GetBusinessMediaParams {
|
|
|
57
57
|
cursor?: string | null;
|
|
58
58
|
limit?: number;
|
|
59
59
|
}
|
|
60
|
-
interface NewsletterSubscribeParams {
|
|
61
|
-
newsletterId: string;
|
|
62
|
-
email: string;
|
|
63
|
-
customerId?: string;
|
|
64
|
-
payment?: any;
|
|
65
|
-
}
|
|
66
|
-
interface NewsletterFindParams {
|
|
67
|
-
}
|
|
68
|
-
interface NewsletterGetParams {
|
|
69
|
-
id: string;
|
|
70
|
-
}
|
|
71
60
|
interface LoginUserParams {
|
|
72
61
|
email?: string;
|
|
73
62
|
password?: string;
|
|
@@ -145,7 +134,7 @@ interface GetRoleParams {
|
|
|
145
134
|
id: string;
|
|
146
135
|
}
|
|
147
136
|
interface GetRolesParams {
|
|
148
|
-
action
|
|
137
|
+
action: string;
|
|
149
138
|
}
|
|
150
139
|
interface CreatePromoCodeParams {
|
|
151
140
|
code?: string;
|
|
@@ -329,6 +318,17 @@ interface SendEntryParams {
|
|
|
329
318
|
entryId: string;
|
|
330
319
|
scheduledAt?: number;
|
|
331
320
|
}
|
|
321
|
+
interface GetCollectionSubscribersParams {
|
|
322
|
+
id: string;
|
|
323
|
+
}
|
|
324
|
+
interface SubscribeToCollectionParams {
|
|
325
|
+
collectionId: string;
|
|
326
|
+
email: string;
|
|
327
|
+
planId: string;
|
|
328
|
+
}
|
|
329
|
+
interface UnsubscribeFromCollectionParams {
|
|
330
|
+
token: string;
|
|
331
|
+
}
|
|
332
332
|
interface CreateProductParams {
|
|
333
333
|
name: string;
|
|
334
334
|
description?: string;
|
|
@@ -380,33 +380,6 @@ interface UpdateOrderParams {
|
|
|
380
380
|
interface CreateOrderParams {
|
|
381
381
|
[key: string]: any;
|
|
382
382
|
}
|
|
383
|
-
interface CreateNewsletterParams {
|
|
384
|
-
name: string;
|
|
385
|
-
description: string;
|
|
386
|
-
newsletterType: 'FREE' | 'PAID';
|
|
387
|
-
prices?: any[];
|
|
388
|
-
unsubscribeRedirectUrl: string;
|
|
389
|
-
[key: string]: any;
|
|
390
|
-
}
|
|
391
|
-
interface UpdateNewsletterParams {
|
|
392
|
-
id: string;
|
|
393
|
-
name?: string;
|
|
394
|
-
description?: string;
|
|
395
|
-
newsletterType?: 'FREE' | 'PAID';
|
|
396
|
-
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
|
|
397
|
-
prices?: any[];
|
|
398
|
-
unsubscribeRedirectUrl?: string;
|
|
399
|
-
[key: string]: any;
|
|
400
|
-
}
|
|
401
|
-
interface DeleteNewsletterParams {
|
|
402
|
-
id: string;
|
|
403
|
-
}
|
|
404
|
-
interface GetSubscribersParams {
|
|
405
|
-
id: string;
|
|
406
|
-
}
|
|
407
|
-
interface UnsubscribeParams {
|
|
408
|
-
token: string;
|
|
409
|
-
}
|
|
410
383
|
interface CreateReservationParams {
|
|
411
384
|
[key: string]: any;
|
|
412
385
|
}
|
|
@@ -740,21 +713,6 @@ interface PaginatedResponse<T> {
|
|
|
740
713
|
per_page: number;
|
|
741
714
|
};
|
|
742
715
|
}
|
|
743
|
-
interface Newsletter {
|
|
744
|
-
id: string;
|
|
745
|
-
businessId: string;
|
|
746
|
-
name: string;
|
|
747
|
-
description: string;
|
|
748
|
-
newsletterType: "FREE" | "PAID";
|
|
749
|
-
statuses: any[];
|
|
750
|
-
prices: Price[];
|
|
751
|
-
paymentProduct?: {
|
|
752
|
-
priceId: string;
|
|
753
|
-
};
|
|
754
|
-
unsubscribeRedirectUrl: string;
|
|
755
|
-
createdAt: number;
|
|
756
|
-
updatedAt: number;
|
|
757
|
-
}
|
|
758
716
|
interface MarketConfigClient {
|
|
759
717
|
currency: string;
|
|
760
718
|
taxMode: string;
|
|
@@ -812,4 +770,4 @@ interface ReservationStoreState {
|
|
|
812
770
|
};
|
|
813
771
|
}
|
|
814
772
|
|
|
815
|
-
export { type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type
|
|
773
|
+
export { type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, 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 CreateSubscriptionParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetNotificationsParams, 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 HandleStripeWebhookParams, type InviteUserParams, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type PaginatedResponse, type Payment, PaymentMethod, type PaymentProviderConfig, type Price, type PromoCodeValidation, type Quote, type QuoteLineItem, type ReactivateSubscriptionParams, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeToCollectionParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UnsubscribeFromCollectionParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdateProfilePhoneParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateSubscriptionParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type VerifyPhoneCodeParams, type Zone };
|
package/dist/types.d.ts
CHANGED
|
@@ -57,17 +57,6 @@ interface GetBusinessMediaParams {
|
|
|
57
57
|
cursor?: string | null;
|
|
58
58
|
limit?: number;
|
|
59
59
|
}
|
|
60
|
-
interface NewsletterSubscribeParams {
|
|
61
|
-
newsletterId: string;
|
|
62
|
-
email: string;
|
|
63
|
-
customerId?: string;
|
|
64
|
-
payment?: any;
|
|
65
|
-
}
|
|
66
|
-
interface NewsletterFindParams {
|
|
67
|
-
}
|
|
68
|
-
interface NewsletterGetParams {
|
|
69
|
-
id: string;
|
|
70
|
-
}
|
|
71
60
|
interface LoginUserParams {
|
|
72
61
|
email?: string;
|
|
73
62
|
password?: string;
|
|
@@ -145,7 +134,7 @@ interface GetRoleParams {
|
|
|
145
134
|
id: string;
|
|
146
135
|
}
|
|
147
136
|
interface GetRolesParams {
|
|
148
|
-
action
|
|
137
|
+
action: string;
|
|
149
138
|
}
|
|
150
139
|
interface CreatePromoCodeParams {
|
|
151
140
|
code?: string;
|
|
@@ -329,6 +318,17 @@ interface SendEntryParams {
|
|
|
329
318
|
entryId: string;
|
|
330
319
|
scheduledAt?: number;
|
|
331
320
|
}
|
|
321
|
+
interface GetCollectionSubscribersParams {
|
|
322
|
+
id: string;
|
|
323
|
+
}
|
|
324
|
+
interface SubscribeToCollectionParams {
|
|
325
|
+
collectionId: string;
|
|
326
|
+
email: string;
|
|
327
|
+
planId: string;
|
|
328
|
+
}
|
|
329
|
+
interface UnsubscribeFromCollectionParams {
|
|
330
|
+
token: string;
|
|
331
|
+
}
|
|
332
332
|
interface CreateProductParams {
|
|
333
333
|
name: string;
|
|
334
334
|
description?: string;
|
|
@@ -380,33 +380,6 @@ interface UpdateOrderParams {
|
|
|
380
380
|
interface CreateOrderParams {
|
|
381
381
|
[key: string]: any;
|
|
382
382
|
}
|
|
383
|
-
interface CreateNewsletterParams {
|
|
384
|
-
name: string;
|
|
385
|
-
description: string;
|
|
386
|
-
newsletterType: 'FREE' | 'PAID';
|
|
387
|
-
prices?: any[];
|
|
388
|
-
unsubscribeRedirectUrl: string;
|
|
389
|
-
[key: string]: any;
|
|
390
|
-
}
|
|
391
|
-
interface UpdateNewsletterParams {
|
|
392
|
-
id: string;
|
|
393
|
-
name?: string;
|
|
394
|
-
description?: string;
|
|
395
|
-
newsletterType?: 'FREE' | 'PAID';
|
|
396
|
-
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
|
|
397
|
-
prices?: any[];
|
|
398
|
-
unsubscribeRedirectUrl?: string;
|
|
399
|
-
[key: string]: any;
|
|
400
|
-
}
|
|
401
|
-
interface DeleteNewsletterParams {
|
|
402
|
-
id: string;
|
|
403
|
-
}
|
|
404
|
-
interface GetSubscribersParams {
|
|
405
|
-
id: string;
|
|
406
|
-
}
|
|
407
|
-
interface UnsubscribeParams {
|
|
408
|
-
token: string;
|
|
409
|
-
}
|
|
410
383
|
interface CreateReservationParams {
|
|
411
384
|
[key: string]: any;
|
|
412
385
|
}
|
|
@@ -740,21 +713,6 @@ interface PaginatedResponse<T> {
|
|
|
740
713
|
per_page: number;
|
|
741
714
|
};
|
|
742
715
|
}
|
|
743
|
-
interface Newsletter {
|
|
744
|
-
id: string;
|
|
745
|
-
businessId: string;
|
|
746
|
-
name: string;
|
|
747
|
-
description: string;
|
|
748
|
-
newsletterType: "FREE" | "PAID";
|
|
749
|
-
statuses: any[];
|
|
750
|
-
prices: Price[];
|
|
751
|
-
paymentProduct?: {
|
|
752
|
-
priceId: string;
|
|
753
|
-
};
|
|
754
|
-
unsubscribeRedirectUrl: string;
|
|
755
|
-
createdAt: number;
|
|
756
|
-
updatedAt: number;
|
|
757
|
-
}
|
|
758
716
|
interface MarketConfigClient {
|
|
759
717
|
currency: string;
|
|
760
718
|
taxMode: string;
|
|
@@ -812,4 +770,4 @@ interface ReservationStoreState {
|
|
|
812
770
|
};
|
|
813
771
|
}
|
|
814
772
|
|
|
815
|
-
export { type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type
|
|
773
|
+
export { type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, 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 CreateSubscriptionParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetNotificationsParams, 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 HandleStripeWebhookParams, type InviteUserParams, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type PaginatedResponse, type Payment, PaymentMethod, type PaymentProviderConfig, type Price, type PromoCodeValidation, type Quote, type QuoteLineItem, type ReactivateSubscriptionParams, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeToCollectionParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UnsubscribeFromCollectionParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdateProfilePhoneParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateSubscriptionParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type VerifyPhoneCodeParams, type Zone };
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethod"],"mappings":";AAyBO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,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\ttax: number;\n\ttotal: number;\n\tpromoCodeId?: string;\n\tpromoCode?: string;\n\tpromoType?: string;\n\tpromoValue?: number;\n\tmethod: PaymentMethod;\n\tcustomerId?: string;\n\tpaymentIntentId?: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n}\n\nexport enum PaymentMethod {\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\ttax: 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// Zone structure (logistics grouping - countries, tax rates, shipping methods)\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tcountries: string[]; // Empty array = \"All Countries\"\n\ttaxBps: number;\n\tshippingMethods: ShippingMethod[];\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\n// Market types (business-owned) - camelCase for frontend\nexport interface Market {\n\tid: string;\n\tname: string;\n\tcurrency: string;\n\ttaxMode: \"INCLUSIVE\" | \"EXCLUSIVE\";\n\ttaxBps: number;\n\tpaymentMethods: BusinessPaymentMethod[];\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n prices: Price[]; // Market-based pricing with free thresholds\n taxable: boolean;\n etaText: string; // e.g., \"3-5 business days\"\n location?: Location; // Pickup address (only for PICKUP type)\n}\n\nexport interface BusinessPaymentMethod {\n\tmethod: PaymentMethod;\n}\n\n// Business types\nexport interface BusinessConfig {\n\torderBlocks?: any[];\n\treservationBlocks?: any[];\n\tmarkets?: Market[];\n\tzones?: Zone[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\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// 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//
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethod"],"mappings":";AAyBO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,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\ttax: number;\n\ttotal: number;\n\tpromoCodeId?: string;\n\tpromoCode?: string;\n\tpromoType?: string;\n\tpromoValue?: number;\n\tmethod: PaymentMethod;\n\tcustomerId?: string;\n\tpaymentIntentId?: string;\n\tsubscriptionId?: string;\n\tpriceId?: string;\n}\n\nexport enum PaymentMethod {\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\ttax: 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// Zone structure (logistics grouping - countries, tax rates, shipping methods)\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tcountries: string[]; // Empty array = \"All Countries\"\n\ttaxBps: number;\n\tshippingMethods: ShippingMethod[];\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\n// Market types (business-owned) - camelCase for frontend\nexport interface Market {\n\tid: string;\n\tname: string;\n\tcurrency: string;\n\ttaxMode: \"INCLUSIVE\" | \"EXCLUSIVE\";\n\ttaxBps: number;\n\tpaymentMethods: BusinessPaymentMethod[];\n}\n\nexport interface ShippingMethod {\n id: string;\n type: 'SHIPPING' | 'PICKUP';\n prices: Price[]; // Market-based pricing with free thresholds\n taxable: boolean;\n etaText: string; // e.g., \"3-5 business days\"\n location?: Location; // Pickup address (only for PICKUP type)\n}\n\nexport interface BusinessPaymentMethod {\n\tmethod: PaymentMethod;\n}\n\n// Business types\nexport interface BusinessConfig {\n\torderBlocks?: any[];\n\treservationBlocks?: any[];\n\tmarkets?: Market[];\n\tzones?: Zone[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\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// 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"]}
|