import { c as CimplifyError, b1 as ClaimedCustomer, an as Cart, eM as UICart, ar as CartItem, bE as DestinationQuoteInput, bC as DestinationQuote, aw as CartSummary, v as AddToCartInput, at as CartMutationResult, eT as UpdateCartItemInput, bI as DiscountDetails, cJ as Money, a as ChosenPrice, C as CurrencyCode, cs as LineConfiguration, cN as NextAction, ad as CHECKOUT_NEXT_ACTION, ca as ErrorCode, aE as CheckoutCollectionOptions, aK as CheckoutFormData, aW as CheckoutResult, dn as PaymentMethod, cj as InitializePaymentResult, eA as SubmitAuthorizationInput, dy as PaymentStatusResponse, aI as CheckoutCustomerInfo, dJ as ProcessAndResolveOptions, dL as ProcessCheckoutResult, i as ConfirmPurchaseIntentRequest, g as ConfirmPurchaseIntentResponse, d8 as PURCHASE_INTENT_RESOLVE_STATUS, e0 as PurchaseIntentActionResponse, d0 as PURCHASE_INTENT_ACTION_DECISION, eB as SubmitPurchaseIntentActionRequest, h as PURCHASE_INTENT_CONFIRM_STATUS, e7 as PurchaseIntentResolution, cE as MintPurchaseIntentRequest, ee as PurchaseIntentView, dC as PreparePurchaseIntentRequest, e_ as VariantDetails, e$ as VariantDetailsDTO, p as AddOnDetails, s as AddOnOptionDetails, q as AddOnGroupDetails, a2 as BundleSelectionData, bh as CompositeSelectionData, br as CustomerInputValue, em as RequestOtpInput, en as RequestOtpResult$1, f4 as VerifyOtpInput, J as AuthResponse, cw as LinkStatusResult, ct as LinkData, bq as CustomerAddress, bt as CustomerMobileMoney, bs as CustomerLinkPreferences, bp as Customer, c9 as EnrollmentData, cu as LinkEnrollResult, c7 as EnrollAndLinkOrderInput, c8 as EnrollAndLinkOrderResult, bl as CreateAddressInput, eS as UpdateAddressInput, bm as CreateMobileMoneyInput, cv as LinkSession, ep as RevokeSessionResult, eo as RevokeAllSessionsResult, fh as components, et as SchedulingMode, D as DurationUnit, P as Product, eC as Subscription, eG as SubscriptionWithDetails, c5 as ElementsOptions, bZ as ElementType, bY as ElementOptions, bX as ElementEventType, bW as ElementEventHandler, aA as CheckoutCartData, dg as ParentToIframeMessage, ci as IframeToParentMessage, L as AuthenticatedData, c2 as ElementsCheckoutData, c3 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, n as AbortablePromise, y as AddressInfo, dp as PaymentMethodInfo, b_ as ElementsAuthContactType, b as Category, u as AddOnWithOptions, de as Pagination, e as ProductWithDetails, dX as ProductVariant, eU as VariantAxis, eV as VariantAxisSelection, o as AddOn, d as Collection, a5 as BundleSummary, X as Bundle, ba as Composite, b8 as ComponentSelectionInput, bf as CompositePriceResult, S as SaleInfo, dU as ProductTaxonomy, eL as TaxonomyWithChildren, c6 as EligiblePlansQuery, dP as ProductBillingPlan, dV as ProductTimeProfile, dO as ProductAvailabilityNow, bz as Deal, dQ as ProductDealInfo, bJ as DiscountValidation, eI as TagsResponse, bn as CustomAttributeDefinition, bo as CustomAttributeValue, dZ as PropertyFacet, eK as TaxonomyAttributeTemplate, cn as KnowledgeArticle } from './elements-Bty6Qs_N.js'; interface RequestContext { method: "GET" | "POST" | "PATCH" | "DELETE"; path: string; url: string; body?: unknown; startTime: number; } interface RequestStartEvent extends RequestContext { } interface RequestSuccessEvent extends RequestContext { status: number; durationMs: number; } interface RequestErrorEvent extends RequestContext { error: Error; status?: number; durationMs: number; retryCount: number; retryable: boolean; } interface RetryEvent extends RequestContext { attempt: number; delayMs: number; error: Error; } declare const SESSION_CHANGE_SOURCE: { readonly RESPONSE: "response"; readonly MANUAL: "manual"; readonly CLEAR: "clear"; }; type SessionChangeSource = (typeof SESSION_CHANGE_SOURCE)[keyof typeof SESSION_CHANGE_SOURCE]; interface SessionChangeEvent { previousToken: string | null; newToken: string | null; source: SessionChangeSource; } interface ObservabilityHooks { onRequestStart?: (event: RequestStartEvent) => void; onRequestSuccess?: (event: RequestSuccessEvent) => void; onRequestError?: (event: RequestErrorEvent) => void; onRetry?: (event: RetryEvent) => void; onSessionChange?: (event: SessionChangeEvent) => void; } interface MutationErrorEvent { service: string; operation: string; error: CimplifyError; opId?: string; idempotencyKey?: string; } interface OutboxEntrySnapshot { id: string; idempotencyKey: string; service: string; operation: string; attemptCount: number; } interface OutboxReplayEvent { entry: OutboxEntrySnapshot; } interface OutboxReplayErrorEvent { entry: OutboxEntrySnapshot; error: CimplifyError; } interface OutboxFullEvent { service: string; operation: string; idempotencyKey: string; } interface TokenChangedEvent { token: string | null; } interface SessionClaimedEvent { sessionToken: string; customerName: string; customer: ClaimedCustomer | null; cart: Cart | null; } declare const MUTATION_ERROR: "mutation:error"; declare const OUTBOX_REPLAY_SUCCESS: "outbox:replay-success"; declare const OUTBOX_REPLAY_ERROR: "outbox:replay-error"; declare const OUTBOX_DEAD_LETTER: "outbox:dead-letter"; declare const OUTBOX_FULL: "outbox:full"; declare const AUTH_TOKEN_CHANGED: "auth:token-changed"; declare const SESSION_CLAIMED: "session:claimed"; declare const SESSION_CLEARED: "session:cleared"; interface ClientEventMap { [MUTATION_ERROR]: MutationErrorEvent; [OUTBOX_REPLAY_SUCCESS]: OutboxReplayEvent; [OUTBOX_REPLAY_ERROR]: OutboxReplayErrorEvent; [OUTBOX_DEAD_LETTER]: OutboxReplayEvent; [OUTBOX_FULL]: OutboxFullEvent; [AUTH_TOKEN_CHANGED]: TokenChangedEvent; /** * The anonymous session was claimed for a verified Link identity: the * session token rotated (already adopted by the client) and server-side * state — conversation, cart, orders — now resolves customer-first. * Consumers should refetch anything session-derived. */ [SESSION_CLAIMED]: SessionClaimedEvent; /** * The session was cleared (sign-out): the access token is gone and a * fresh anonymous session token was minted. Everything keyed to the old * session — conversation, cart, identity — must reset, not linger for * the next person at this browser. */ [SESSION_CLEARED]: Record; } type ClientEventName = keyof ClientEventMap; type ClientEventListener = (payload: ClientEventMap[K]) => void; interface ClientEvents { on(name: K, listener: ClientEventListener): () => void; off(name: K, listener: ClientEventListener): void; emit(name: K, payload: ClientEventMap[K]): void; } type Result = Ok | Err; interface Ok { readonly ok: true; readonly value: T; } interface Err { readonly ok: false; readonly error: E; } declare function ok(value: T): Ok; declare function err(error: E): Err; declare function isOk(result: Result): result is Ok; declare function isErr(result: Result): result is Err; declare function mapResult(result: Result, fn: (value: T) => U): Result; declare function mapError(result: Result, fn: (error: E) => F): Result; declare function flatMap(result: Result, fn: (value: T) => Result): Result; declare function getOrElse(result: Result, defaultFn: () => T): T; declare function unwrap(result: Result): T; declare function toNullable(result: Result): T | undefined; declare function fromPromise(promise: Promise, mapError: (error: unknown) => E): Promise>; declare function tryCatch(fn: () => T, mapError: (error: unknown) => E): Result; declare function combine(results: Result[]): Result; declare function combineObject>>(results: T): Result<{ [K in keyof T]: T[K] extends Result ? V : never; }, T[keyof T] extends Result ? E : never>; interface IdempotencyOption$9 { idempotencyKey?: string; } interface ReorderResult { added: { item_id: string; }[]; failed: { item_id: string; error: CimplifyError; }[]; } declare class CartOperations { private client; constructor(client: CimplifyClient); get(): Promise>; getItems(): Promise>; getCount(): Promise>; getTotal(): Promise>; quoteDestination(input: DestinationQuoteInput): Promise>; getSummary(): Promise>; addItem(input: AddToCartInput, opts?: IdempotencyOption$9): Promise>; updateItem(cartItemId: string, updates: UpdateCartItemInput): Promise>; updateQuantity(cartItemId: string, quantity: number): Promise>; removeItem(cartItemId: string): Promise>; clear(): Promise>; applyCoupon(code: string, opts?: IdempotencyOption$9): Promise>; removeCoupon(): Promise>; reorderFromOrder(orderId: string): Promise>; isEmpty(): Promise>; hasItem(productId: string, variantId?: string): Promise>; findItem(productId: string, variantId?: string): Promise>; } type OrderStatus = "pending" | "created" | "confirmed" | "in_preparation" | "ready_to_serve" | "partially_served" | "served" | "delivered" | "picked_up" | "completed" | "cancelled"; type PaymentState = "not_paid" | "partially_paid" | "paid" | "partially_refunded" | "refunded"; type OriginChannel = "web" | "qr" | "desk" | "tap" | "chat" | "whatsapp" | "instagram" | "telegram" | "messenger" | "sms" | "email" | "agent"; type OriginActor = "customer" | "staff" | "agent" | "system"; interface Origin { channel: OriginChannel; channel_ref?: string; actor: OriginActor; } type LifecyclePhase = "draft" | "open" | "completed" | "cancelled"; type LineType = "product" | "service" | "bundle" | "composite" | "digital"; type OrderLineState = "pending" | "in_preparation" | "checked_out" | "ready" | "served" | "completed" | { partially_served: { served_quantity: number; }; } | { cancelled: { reason?: string; }; }; interface OrderLineStatus { state: OrderLineState; quantity_ordered: number; quantity_prepared: number; quantity_served: number; last_modified: string; modified_by: string; } type FulfillmentType = "booking" | "shipment" | "order" | "digital"; type FulfillmentStatus = "pending" | "in_progress" | "completed" | "cancelled"; interface FulfillmentLink { fulfillment_type: FulfillmentType; fulfillment_id: string; } interface OrderFulfillmentSummary { total_items: number; pending_items: number; in_progress_items: number; completed_items: number; cancelled_items: number; all_complete: boolean; any_in_progress: boolean; } type FeeBearerType = "customer" | "business" | "split"; interface AmountToPay { customer_pays: Money; business_receives: Money; cimplify_receives: Money; provider_receives: Money; fee_bearer: FeeBearerType; } interface LineItem { id: string; order_id: string; product_id: string; line_key: string; quantity: number; configuration: LineConfiguration; price: Money; add_ons_price: Money; price_info: ChosenPrice; item_discount_amount: Money; discount_details?: DiscountDetails; created_at: string; updated_at: string; line_state: OrderLineStatus; metadata?: Record; fulfillment_type?: FulfillmentType; fulfillment_id?: string; } interface Order { id: string; business_id: string; origin: Origin; status: OrderStatus; lifecycle_phase: LifecyclePhase; payment_state: PaymentState; order_type: string; placed_by?: string; user_friendly_id: string; customer_id?: string; customer_name?: string; customer_email?: string; customer_phone?: string; customer_notes?: string[]; discount_code?: string; applied_discount_ids: string[]; applied_discount_codes: string[]; discount_details?: DiscountDetails; delivery_address?: string; delivery_fee: Money; delivery_fee_details?: DeliveryFeeDetails; tracking_token?: string; tracking_link?: string; pickup_time?: string; created_at: string; updated_at: string; delivered_at?: string; fulfilled_at?: string; confirmed_at?: string; served_at?: string; completed_at?: string; cancelled_at?: string; table_number?: string; room_number?: string; resource_id?: string; location_id?: string; modified_by_staff: boolean; delivery_required: boolean; customer_will_pick_up: boolean; total_price: Money; subtotal: Money; total_discount: Money; service_charge?: Money; tax?: Money; price_info: ChosenPrice; currency: CurrencyCode; bill_token?: string; order_group_id?: string; subscription_id?: string; paid_via_group: boolean; amount_to_pay: AmountToPay; served_by?: string; metadata?: Record; requires_scheduling: boolean; all_items_scheduled: boolean; earliest_service_time?: string; latest_service_time?: string; deposit_required: boolean; deposit_amount: Money; balance_due: Money; deposit_due_date?: string; final_payment_due_date?: string; payment_terms_id?: string; price_list_id?: string; approval_status?: string; fulfillment_rollup?: OrderFulfillmentSummary | null; version: number; total_quantity: number; items: LineItem[]; computed_payment_status?: string; is_service_only?: boolean; source_proposal_id?: string; } interface OrderHistory { id: string; order_id: string; modified_by: string; modification_type: string; modification_details: string; modified_at: string; metadata?: Record; } type OrderGroupStatus = "open" | "in_progress" | "ready_to_pay" | "split" | "partially_paid" | "paid" | "closed"; type OrderGroupPaymentState = "not_paid" | "partially_paid" | "fully_paid" | "partially_refunded" | "refunded"; type OrderGroupPaymentStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "cancelled" | "requires_action" | "disputed"; interface OrderGroup { id: string; business_id: string; location_id: string; table_number: string; created_at: string; updated_at: string; status: OrderGroupStatus; is_split: boolean; is_closed: boolean; total_amount?: Money; paid_amount?: Money; payment_status: OrderGroupPaymentState; split_method?: string; max_orders?: number; currency?: CurrencyCode; amount_to_pay: AmountToPay; metadata?: Record; } interface OrderGroupPayment { id: string; order_group_id: string; order_id?: string; amount: Money; payment_method: string; status: OrderGroupPaymentStatus; created_at: string; updated_at: string; metadata?: Record; } interface OrderSplitDetail { order_id: string; amount: Money; paid_amount?: Money; remaining_amount?: Money; } interface OrderGroupPaymentSummary { total_amount: Money; paid_amount: Money; remaining_amount: Money; split_details?: OrderSplitDetail[]; } interface OrderGroupDetails { order_group: OrderGroup; orders: Order[]; total: Money; payments: OrderGroupPayment[]; payment_summary: OrderGroupPaymentSummary; } interface OrderPaymentEvent { id: string; order_id: string; amount: Money; reference: string; created_at: string; event_type: string; provider?: string; metadata?: Record; } interface OrderFilter { location_id?: string; table_number?: string; order_type?: string; status?: string; from?: string; to?: string; search?: string; limit?: number; offset?: number; } interface CheckoutInput { customer_name?: string; customer_email?: string; customer_phone?: string; delivery_address?: string; order_type?: string; notes?: string; table_number?: string; room_number?: string; } interface UpdateOrderStatusInput { status: OrderStatus; notes?: string; } interface CancelOrderInput { reason?: string; } interface RefundOrderInput { amount?: Money; reason?: string; } type ServiceStatus = "awaiting_scheduling" | "scheduled" | "deposit_paid" | "confirmed" | "in_progress" | "checked_in" | "checked_out" | "overstay" | "completed" | "rescheduled" | "no_show" | "cancelled"; type StaffRole = "primary" | "assistant" | "specialist" | "supervisor"; type ReminderMethod = "sms" | "email" | "push" | "call" | "whatsapp"; interface CustomerServicePreferences { preferred_staff_ids: string[]; avoid_staff_ids: string[]; room_type?: string; accessibility_needs: string[]; temperature_preference?: string; music_preference?: string; special_requests?: string; previous_service_history: string[]; } interface BufferTimes { before_minutes: number; after_minutes: number; travel_time_minutes?: number; setup_time_minutes?: number; cleanup_time_minutes?: number; } interface ReminderSettings { send_24h_reminder: boolean; send_2h_reminder: boolean; send_30min_reminder: boolean; reminder_phone?: string; reminder_email?: string; reminder_method: ReminderMethod; custom_reminder_message?: string; } interface CancellationPolicy { cancellation_window_minutes: number; no_show_deadline_minutes?: number; cancellation_notice_days?: number; no_show_fee: Money; partial_refund_percentage: number; max_free_reschedules: number; reschedule_fee: Money; early_termination_fee?: Money; pro_rata_refund: boolean; } interface ServiceNotes { preparation_notes?: string; staff_notes?: string; internal_notes?: string; customer_history: string[]; allergies_warnings: string[]; } interface PricingOverrides { custom_duration_minutes?: number; price_adjustment?: Money; discount_reason?: string; surge_pricing_multiplier?: Money; loyalty_discount?: Money; package_deal_reference?: string; } interface SchedulingMetadata { customer_preferences?: CustomerServicePreferences; buffer_times?: BufferTimes; reminder_settings?: ReminderSettings; cancellation_policy?: CancellationPolicy; service_notes?: ServiceNotes; pricing_overrides?: PricingOverrides; } interface StaffAssignment { staff_id: string; role: StaffRole; assigned_at: string; notes?: string; } interface ResourceAssignment { resource_id: string; quantity: number; assigned_at: string; notes?: string; } interface SchedulingResult { confirmation_code: string; assigned_staff: StaffAssignment[]; assigned_resources: ResourceAssignment[]; deposit_required: boolean; deposit_amount?: Money; total_duration_minutes: number; } interface DepositResult { order_confirmed: boolean; balance_due: Money; final_payment_due?: string; confirmation_sent: boolean; } interface ServiceScheduleRequest { line_item_id: string; start_time: string; end_time: string; preferred_staff_ids?: string[]; resource_requirements?: string[]; customer_notes?: string; } interface StaffScheduleItem { line_item_id: string; order_id: string; customer_name: string; service_name: string; start_time: string; end_time: string; confirmation_code: string; service_status: ServiceStatus; notes?: string; } interface LocationBooking { line_item_id: string; order_id: string; customer_name: string; service_name: string; start_time: string; end_time: string; assigned_staff: string[]; assigned_resources: string[]; service_status: ServiceStatus; } type ProviderResolutionSource = "zone" | "hint" | "fallback" | "rate" | "best_price"; type DeliveryFeeStatus$1 = "priced" | "arranged"; interface DeliveryFeeDetails { zone_id?: string; zone_name?: string; provider: string; provider_resolved_from: ProviderResolutionSource; fee_status?: DeliveryFeeStatus$1; /** Named rate this fee was priced under, if any. */ rate_id?: string; rate_name?: string; distance_km?: Money; base_fee?: Money; per_km_fee?: Money; surge_multiplier?: Money; calculated_fee: Money; currency: string; free_delivery_applied?: boolean; } type RelationType = "upsell" | "cross_sell"; interface RelatedProduct { id: string; business_id: string; source_product_id: string; target_product_id: string; relation_type: RelationType; is_enabled: boolean; display_order: number; created_at: string; updated_at: string; metadata?: Record; } interface RelatedCandidate { product_id: string; relation_type: RelationType; source: string; score: number; is_enabled: boolean; display_order: number; } interface RelatedProductsEnrichment { upsells: RelatedCandidate[]; cross_sells: RelatedCandidate[]; } declare const PAYMENT_AUTHORIZATION_OUTCOME_STATUS: { readonly SUBMITTED: "submitted"; readonly CANCELLED: "cancelled"; readonly FAILED: "failed"; }; declare const PAYMENT_AUTHORIZATION_PROVIDER: { readonly PAYSTACK: "paystack"; readonly STRIPE: "stripe"; }; type CardPopupAction = Extract; interface PaymentAuthorizationContext { action: CardPopupAction; email: string; currency: CurrencyCode; reference?: string; returnUrl?: string; signal?: AbortSignal; } type AuthorizeCardPopupOptions = Omit; /** * Provider UI completed or handed control to a provider. This is deliberately * not named "success": only the Cimplify payment-status endpoint can establish * that money was collected. */ type PaymentAuthorizationOutcome = { status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.SUBMITTED; reference?: string; } | { status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.CANCELLED; } | { status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.FAILED; code: typeof ErrorCode.POPUP_BLOCKED | typeof ErrorCode.PROVIDER_UNAVAILABLE | typeof ErrorCode.AUTHORIZATION_FAILED | typeof ErrorCode.PAYMENT_FAILED; message: string; recoverable: boolean; }; /** Provider-specific browser UI for one `card_popup` action. */ interface PaymentAuthorizationAdapter { readonly provider: string; authorize(context: PaymentAuthorizationContext): Promise; } /** * Per-client adapter registry. It contains no process-global state, so tests, * storefronts, and concurrently-rendered tenants cannot affect each other. */ declare class PaymentAuthorizationAdapterRegistry { private readonly adapters; constructor(adapters?: Iterable); register(adapter: PaymentAuthorizationAdapter): this; unregister(provider: string): boolean; get(provider: string): PaymentAuthorizationAdapter | undefined; supports(provider: string): boolean; providers(): string[]; authorize(action: CardPopupAction, options: AuthorizeCardPopupOptions): Promise; } declare function createDefaultPaymentAuthorizationAdapterRegistry(): PaymentAuthorizationAdapterRegistry; declare class CheckoutService { private client; /** Raw checkout material is component-lifetime only, never browser storage. */ private readonly intentCommands; /** Opaque owner/attempt authority for deprecated action submission. */ private readonly actionAuthorities; constructor(client: CimplifyClient); private validateCheckoutData; private orderTokenParam; /** Available storefront collection methods for one presentment currency. */ collectionOptions(currency: CurrencyCode): Promise>; /** * Run provider-owned UI for a backend `card_popup` action. A submitted * outcome is not proof of payment; callers must poll/verify with Cimplify. */ authorizeCardPopup(action: CardPopupAction, options: AuthorizeCardPopupOptions): Promise; private startIntentCheckout; /** @deprecated Use `client.purchaseIntents.mint()` then `confirm()`. */ process(data: CheckoutFormData, options?: RequestOptions): Promise>; initializePayment(_orderId: string, _method: PaymentMethod): Promise>; /** * @deprecated Use `client.purchaseIntents.submitAction()`. This adapter works * only while this CheckoutService instance retains the opaque authority * returned by its own `process()` call; it never falls back to a payment-id * mutation. */ submitAuthorization(input: SubmitAuthorizationInput, options?: RequestOptions): Promise>; private reconcileActionAuthority; pollPaymentStatus(orderId: string, options?: ReadRequestOptions): Promise>; updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise>; verifyPayment(orderId: string): Promise>; private maybeEnrollResolvedOrder; /** @deprecated Use `client.purchaseIntents.resolve()`. */ processAndResolve(data: CheckoutFormData & ProcessAndResolveOptions): Promise>; } type PurchaseIntentResolveStatus = (typeof PURCHASE_INTENT_RESOLVE_STATUS)[keyof typeof PURCHASE_INTENT_RESOLVE_STATUS]; type PurchaseIntentActionDecision = typeof PURCHASE_INTENT_ACTION_DECISION.CONTINUE | typeof PURCHASE_INTENT_ACTION_DECISION.STOP | { kind: typeof PURCHASE_INTENT_ACTION_DECISION.SUBMIT; request: SubmitPurchaseIntentActionRequest; }; interface PurchaseIntentResolveOptions { confirmation: ConfirmPurchaseIntentRequest; initialResponse?: ConfirmPurchaseIntentResponse; pollIntervalMs?: number; maxPollAttempts?: number; maxActionSteps?: number; maxTermsReviewSteps?: number; signal?: AbortSignal; requestTimeoutMs?: number; onStatusChange?: (status: PurchaseIntentResolveStatus, response?: ConfirmPurchaseIntentResponse) => void; /** * Run provider-owned UI, then return `continue` to replay the same durable * attempt. For a typed provider challenge, return `submit` with only the * requested authorization value; the SDK sends it through the owner-fenced * attempt endpoint. Neither arm can alter the accepted terms. */ onActionRequired?: (action: PurchaseIntentActionResponse) => PurchaseIntentActionDecision | Promise; /** Returning a request is explicit consent to replacement terms. */ onTermsChanged?: (response: Extract) => ConfirmPurchaseIntentRequest | null | Promise; } interface PurchaseIntentConfirmationPort { confirm(intentId: string, request: ConfirmPurchaseIntentRequest, options?: { signal?: AbortSignal; timeoutMs?: number; }): Promise>; submitAction?(intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: { signal?: AbortSignal; timeoutMs?: number; }): Promise>; } interface PurchaseIntentResolverDependencies { confirmation: PurchaseIntentConfirmationPort; wait?: (milliseconds: number, signal?: AbortSignal) => Promise; } /** * Pure purchase-intent state machine. Transport stays behind the narrow * confirmation port, while UI policy is supplied through callbacks. */ declare class PurchaseIntentResolver { private readonly confirmation; private readonly wait; constructor(dependencies: PurchaseIntentResolverDependencies); resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise>; private ensureActive; private notify; } declare const PURCHASE_INTENT_ROUTE: { readonly DIRECT_COLLECTION: "/api/v1/purchase-intents"; readonly HOSTED_SESSION_COLLECTION: "/v1/checkout/sessions"; readonly PREPARE: "prepare"; readonly REFRESH: "refresh"; readonly CONFIRM: "confirm"; readonly REPLAY: "replay"; readonly ATTEMPTS: "attempts"; readonly ACTIONS: "actions"; }; /** Narrow transport port keeps the service independent of client internals. */ interface PurchaseIntentTransport { get(path: string, opts?: ReadRequestOptions): Promise; post(path: string, body?: unknown, opts?: RequestOptions): Promise; } interface PurchaseIntentRequestOptions { signal?: AbortSignal; timeoutMs?: number; } declare class PurchaseIntentService { private readonly transport; private readonly resolver; constructor(transport: PurchaseIntentTransport); mint(request: MintPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise>; get(intentId: string, options?: PurchaseIntentRequestOptions): Promise>; refresh(intentId: string, expectedRevision: number, options?: PurchaseIntentRequestOptions): Promise>; confirm(intentId: string, request: ConfirmPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise>; submitAction(intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: PurchaseIntentRequestOptions): Promise>; resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise>; /** * Bind subsequent preparation/confirmation to one hosted checkout-session * owner. The session ID is a route authority, not an intent-owner rewrite. */ forHostedSession(sessionId: string): HostedPurchaseIntentService; private intentPath; } /** * Owner-specific hosted checkout port. Hosted drafts belong to the durable * checkout session ID, whereas direct storefront intents belong to the API * session/account; keeping separate route objects makes that distinction * unrepresentable as a caller-supplied owner field. */ declare class HostedPurchaseIntentService { private readonly transport; private readonly resolver; private readonly sessionPath; constructor(transport: PurchaseIntentTransport, sessionId: string); prepare(request: PreparePurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise>; confirm(_intentId: string, request: ConfirmPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise>; replay(options?: PurchaseIntentRequestOptions): Promise>; submitAction(_intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: PurchaseIntentRequestOptions): Promise>; resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise>; } interface BusinessDetailsDTO { name: string; logo_url?: string; contact_email?: string; contact_phone?: string; } interface OrderCustomerInfo { id?: string; name?: string; email?: string; phone?: string; notes?: string[]; delivery_address?: string; delivery_required: boolean; will_pick_up: boolean; pickup_time?: string; } interface OrderLocationInfo { id?: string; name?: string; table_number?: string; room_number?: string; } interface PaymentInfoDTO { state: PaymentState; computed_status?: string; currency: string; amount_to_pay: AmountToPay; paid_via_group: boolean; /** Outstanding amount still owed (money string); with `state` lets clients * render a partial (deposit) payment. */ balance_due: Money; deposit_required: boolean; deposit_amount: Money; } interface FulfillmentSummaryDTO { fulfillment_type: FulfillmentType; fulfillment_id: string; status?: string; digital_type?: string; delivery_method?: string; delivered_at?: string; usage_summary?: string; identifier?: string; } interface EnrichedOrderItem { id: string; product_id: string; product_name?: string; product_description?: string; image_url?: string; line_key: string; quantity: number; line_type: LineType; variant_id?: string; variant_details?: VariantDetails; variant_info?: VariantDetailsDTO; add_on_option_ids: string[]; add_on_ids: string[]; add_on_details: AddOnDetails; add_on_options: AddOnOptionDetails[]; add_ons: AddOnGroupDetails[]; bundle_selections?: BundleSelectionData; composite_selections?: CompositeSelectionData; fulfillment?: FulfillmentSummaryDTO; customer_inputs: CustomerInputValue[]; scheduled_start?: string; scheduled_end?: string; confirmation_code?: string; primary_staff_id?: string; units?: number; base_price: Money; add_ons_price: Money; total_price: Money; item_discount_amount: Money; price_info: ChosenPrice; discount_details: DiscountDetails; line_state: OrderLineStatus; created_at: string; updated_at: string; metadata?: Record; } interface OrderPricingView { total_price: Money; subtotal: Money; total_discount: Money; service_charge?: Money; tax?: Money; price_info: ChosenPrice; } interface OrderTimestampsDTO { created_at: string; updated_at: string; confirmed_at?: string; fulfilled_at?: string; delivered_at?: string; served_at?: string; completed_at?: string; cancelled_at?: string; } interface OrderStaffInfo { placed_by?: string; was_placed_by_staff: boolean; modified_by_staff: boolean; served_by?: string; } interface OrderDiscountInfo { discount_code?: string; applied_discount_ids: string[]; applied_discount_codes: string[]; discount_details: DiscountDetails; } interface GroupOrderInfo { group_order_id: string; is_closed: boolean; } /** * The order shape the storefront order endpoint (`/api/v1/orders/:id`) returns: * names, images, resolved variants/add-ons, bundle/composite selections, * customer inputs, scheduling and digital fulfillment all resolved server-side. */ interface EnrichedOrder { id: string; user_friendly_id: string; business_id: string; order_type: string; origin: Origin; status: OrderStatus; lifecycle_phase: LifecyclePhase; bill_token?: string; tracking_token?: string; tracking_link?: string; business_details?: BusinessDetailsDTO; customer: OrderCustomerInfo; location: OrderLocationInfo; payment: PaymentInfoDTO; items: EnrichedOrderItem[]; pricing: OrderPricingView; timestamps: OrderTimestampsDTO; staff: OrderStaffInfo; discounts: OrderDiscountInfo; group_order_info?: GroupOrderInfo; approval_status?: string; fulfillment_rollup?: OrderFulfillmentSummary | null; metadata?: Record; } interface IdempotencyOption$8 { idempotencyKey?: string; } interface GetOrdersOptions { status?: OrderStatus; limit?: number; offset?: number; } declare class OrderQueries { private client; constructor(client: CimplifyClient); private orderTokenParam; list(options?: GetOrdersOptions): Promise>; get(orderId: string): Promise>; /** * Same endpoint as `get`, typed as the enriched display contract * (product names, images, resolved selections, customer inputs, scheduling, * fulfillment). Feed the result through `toAccountOrderView`. */ getDetail(orderId: string): Promise>; getRecent(limit?: number): Promise>; getByStatus(status: OrderStatus): Promise>; cancel(orderId: string, reason?: string, opts?: IdempotencyOption$8): Promise>; } interface StoreCreditBalance { /** Available balance (a Money string — use `parsePrice` before arithmetic). */ balance: Money; currency: CurrencyCode; } /** Reads the signed-in shopper's store-credit balance for the current storefront. */ declare class StoreCreditQueries { private client; constructor(client: CimplifyClient); /** * The shopper's available store-credit balance, in the business's default * currency. Requires a signed-in customer; returns an error otherwise. */ balance(): Promise>; } interface GetLinkOrdersOptions { status?: OrderStatus; limit?: number; offset?: number; /** * Per-merchant scope. When set, only orders placed with this business * are returned. Pass it from SDK-rendered account pages on a merchant * storefront; omit for the cross-merchant view on link.cimplify.io. */ businessId?: string; } interface GetLinkOrderOptions { /** * Per-merchant scope. When set, the order must belong to this business * or the request 404s. Used by merchant account pages to prevent * cross-merchant enumeration. */ businessId?: string; } interface IdempotencyOption$7 { idempotencyKey?: string; } interface LinkAuthOption extends IdempotencyOption$7 { /** Return verified credentials without installing them on the shared client. */ activateSession?: boolean; } interface SuccessResult { success: boolean; message?: string; action?: string; expires_in?: number; is_new_account?: boolean; } /** * Cimplify Link client. * * Customer-scoped, cross-business surface — saved addresses, saved mobile * money, link preferences, sessions. Routed through the SDK's separate * `linkApiUrl` transport (default: `https://api.cimplify.io`), not the * per-business storefront API. * * Wire conventions: * - Updates use `POST /resource/:id` with a partial body (not PUT/PATCH). * Both create and update share the same verb; payload completeness * distinguishes them. This matches the production Rust handlers. * - Mobile-money `provider` is a plain string. User-facing provider * values include `"mtn"`, `"vodafone"`, `"telecel"`, `"airtel"`, * `"airteltigo"`, and `"mpesa"` (defined in {@link MobileMoneyProvider}). * The backend's `normalize_mobile_money_provider` accepts legacy * spellings and maps them to provider-specific processor codes. * - Address inputs use the wire shape (`street_address` / `apartment` / * `region`) — same field names you read off the response. There is no * translation layer. */ declare class LinkService { private client; private activationGeneration; constructor(client: CimplifyClient); private beginActivation; private isActivationFenceCurrent; private supersededActivation; private activateAuthenticatedSession; requestOtp(input: RequestOtpInput, opts?: IdempotencyOption$7): Promise>; verifyOtp(input: VerifyOtpInput, opts?: LinkAuthOption): Promise>; refreshSession(sessionToken?: string, opts?: LinkAuthOption): Promise>; logout(): Promise>; checkStatus(contact: string): Promise>; getLinkData(): Promise>; getAddresses(): Promise>; getMobileMoney(): Promise>; getPreferences(): Promise>; updateProfile(input: { name?: string; email?: string; phone?: string; }): Promise>; getOrders(options?: GetLinkOrdersOptions): Promise>; getOrder(orderId: string, options?: GetLinkOrderOptions): Promise>; enroll(data: EnrollmentData, opts?: IdempotencyOption$7): Promise>; enrollAndLinkOrder(data: EnrollAndLinkOrderInput, opts?: IdempotencyOption$7): Promise>; updatePreferences(preferences: Partial): Promise>; createAddress(input: CreateAddressInput, opts?: IdempotencyOption$7): Promise>; updateAddress(input: UpdateAddressInput): Promise>; deleteAddress(addressId: string): Promise>; setDefaultAddress(addressId: string): Promise>; trackAddressUsage(addressId: string): Promise>; createMobileMoney(input: CreateMobileMoneyInput, opts?: IdempotencyOption$7): Promise>; deleteMobileMoney(mobileMoneyId: string): Promise>; setDefaultMobileMoney(mobileMoneyId: string): Promise>; trackMobileMoneyUsage(mobileMoneyId: string): Promise>; verifyMobileMoney(mobileMoneyId: string, opts?: IdempotencyOption$7): Promise>; getSessions(): Promise>; revokeSession(sessionId: string): Promise>; revokeAllSessions(): Promise>; } interface IdempotencyOption$6 { idempotencyKey?: string; } interface AuthStatus { is_authenticated: boolean; customer?: Customer; session_expires_at?: string; } interface OtpResult { message: string; account_id: string; customer: Customer; session_token: string; refresh_token: string; } interface RequestOtpResult { message: string; expires_in: number; is_new_account: boolean; } interface UpdateProfileInput { name?: string; email?: string; phone?: string; } interface LogoutResult { message: string; action: "discard_token" | string; } interface UpdateProfileResult { success: boolean; message: string; } declare class AuthService { private client; constructor(client: CimplifyClient); getStatus(): Promise>; getCurrentUser(): Promise>; isAuthenticated(): Promise>; requestOtp(contact: string, contactType?: "phone" | "email", opts?: IdempotencyOption$6): Promise>; verifyOtp(code: string, contact?: string, opts?: IdempotencyOption$6): Promise>; logout(): Promise>; updateProfile(input: UpdateProfileInput): Promise>; } interface BusinessPreferences { [key: string]: unknown; } interface Business { id: string; name: string; handle: string; email: string; default_currency: CurrencyCode; default_country: string; default_timezone: string; default_phone?: string; default_address?: string; default_offers_table_service: boolean; default_accepts_online_orders: boolean; image?: string; status: string; created_at: string; updated_at: string; subscription_id?: string; owner_id?: string; created_by: string; preferences: BusinessPreferences; is_online_only: boolean; enabled_payment_types: string[]; default_location_settings: Record; metadata?: Record; } interface LocationTaxBehavior { is_tax_inclusive: boolean; tax_rate: Money; } interface LocationTaxOverrides { [productId: string]: { tax_rate: Money; is_exempt: boolean; }; } interface Location { id: string; business_id: string; name: string; location?: string; phone?: string; address?: string; service_charge_rate?: number; currency: CurrencyCode; capacity: number; status: string; enabled_payment_types?: string[]; offers_table_service: boolean; accepts_online_orders: boolean; created_at: string; updated_at: string; preferences?: Record; metadata?: Record; country_code: string; timezone: string; tax_behavior?: LocationTaxBehavior; tax_overrides?: LocationTaxOverrides; } interface TimeRange { start: string; end: string; } type TimeRanges = TimeRange[]; interface LocationTimeProfile { id: string; business_id: string; location_id: string; day: string; is_open: boolean; hours: TimeRanges; created_at: string; updated_at: string; metadata?: Record; } interface Table { id: string; business_id: string; location_id: string; table_number: string; capacity: number; occupied: boolean; created_at: string; updated_at: string; metadata?: Record; } interface Room { id: string; business_id: string; location_id: string; name: string; capacity: number; status: string; floor?: string; created_at: string; updated_at: string; metadata?: Record; } interface ServiceCharge { percentage?: Money; is_mandatory?: boolean; description?: string; applies_to_parties_of?: number; minimum_amount?: Money; maximum_amount?: Money; } interface StorefrontBootstrap { business: Business; locations: Location[]; default_location_id?: string; categories: CategoryInfo[]; } interface BusinessWithLocations extends Business { locations: Location[]; default_location?: Location; } interface LocationWithDetails extends Location { time_profiles: LocationTimeProfile[]; tables: Table[]; rooms: Room[]; is_open_now: boolean; next_open_time?: string; } interface BusinessSettings { accept_online_orders: boolean; accept_reservations: boolean; require_customer_account: boolean; enable_tips: boolean; enable_loyalty: boolean; minimum_order_amount?: string; delivery_fee?: string; free_delivery_threshold?: string; tax_rate?: number; tax_inclusive: boolean; } interface BusinessHours { business_id: string; location_id?: string; day_of_week: number; open_time: string; close_time: string; is_closed: boolean; } interface CategoryInfo { id: string; name: string; slug: string; } declare class BusinessService { private client; constructor(client: CimplifyClient); getInfo(opts?: ReadRequestOptions): Promise>; getByHandle(handle: string, opts?: ReadRequestOptions): Promise>; getByDomain(domain: string, opts?: ReadRequestOptions): Promise>; getSettings(opts?: ReadRequestOptions): Promise>; getLocations(opts?: ReadRequestOptions): Promise>; getLocation(locationId: string, opts?: ReadRequestOptions): Promise>; getHours(opts?: ReadRequestOptions): Promise>; getLocationHours(locationId: string, opts?: ReadRequestOptions): Promise>; getBootstrap(opts?: ReadRequestOptions): Promise>; } type S$1 = components["schemas"]; type StockStatus = S$1["StockStatus"]; type StockLevel = S$1["StockLevelResponse"]; type AvailabilityResult = S$1["AvailabilityResponse"]; declare class InventoryService { private client; constructor(client: CimplifyClient); private withQuery; getProductStock(productId: string, locationId?: string): Promise>; getVariantStock(variantId: string, locationId?: string): Promise>; checkProductAvailability(productId: string, quantity: number, locationId?: string): Promise>; checkVariantAvailability(variantId: string, quantity: number, locationId?: string): Promise>; checkMultipleAvailability(items: { product_id: string; variant_id?: string; quantity: number; }[], locationId?: string): Promise>; isInStock(productId: string, locationId?: string): Promise>; getAvailableQuantity(productId: string, locationId?: string): Promise>; } interface Service { id: string; name: string; description?: string; price?: Money; scheduling_mode?: SchedulingMode; duration_value?: number; duration_minutes: number; duration_unit?: DurationUnit; price_basis?: "flat" | "per_person" | "per_duration_unit"; image_url?: string | null; category_id?: string | null; is_available: boolean; business_id?: string; product_id?: string; buffer_before_minutes?: number; buffer_after_minutes?: number; max_participants?: number; currency?: string; requires_staff?: boolean; is_active?: boolean; metadata?: Record; } interface Staff { id: string; business_id?: string; name: string; email?: string; phone?: string; avatar_url?: string; bio?: string; is_active?: boolean; services?: string[]; } interface TimeSlot { start_time: string; end_time: string; is_available?: boolean; staff_id?: string; staff_name?: string; remaining_capacity?: number; } interface SlotResourceInfo { resource_id: string; name: string; resource_type: string; } interface SlotStaffInfo { staff_id: string; name: string; } interface AvailableSlot extends TimeSlot { price?: Money; duration_minutes?: number; available_staff?: SlotStaffInfo[]; available_resources?: SlotResourceInfo[]; capacity_available?: number; } interface DayAvailability { date: string; slots: TimeSlot[]; has_availability: boolean; } type BookingStatus = "booked" | "assigned" | "pending" | "confirmed" | "in_progress" | "checked_in" | "checked_out" | "overstay" | "completed" | "cancelled" | "no_show" | string; interface Booking { id: string; service_name: string; start_time: string; end_time: string; status: BookingStatus; confirmation_code?: string; total_amount?: Money; participant_count: number; staff_name?: string | null; notes?: unknown; business_id?: string; order_id?: string; line_item_id?: string; service_id?: string; customer_id?: string; customer_name?: string; customer_phone?: string; staff_id?: string; location_id?: string; location_name?: string; duration_minutes?: number; cancellation_reason?: string; cancelled_at?: string; created_at?: string; updated_at?: string; } interface BookingWithDetails extends Booking { service?: Service; staff?: Staff; } interface CustomerBookingServiceItem { service_id: string; scheduled_start?: string | null; scheduled_end?: string | null; confirmation_code?: string | null; status?: string | null; } interface CustomerBooking { order_id: string; service_items: CustomerBookingServiceItem[]; status: BookingStatus; created_at: string; total_price: Money; } interface GetAvailableSlotsInput { service_id: string; date: string; participant_count?: number; /** Whole units needed; slots that can't seat them drop out. Default 1. */ units?: number; variant_id?: string; } interface CheckSlotAvailabilityInput { service_id: string; slot_time: string; duration_minutes?: number; participant_count?: number; } interface CheckSlotAvailabilityResult { available: boolean; reason?: string; service_id?: string; start_time?: string; duration_minutes?: number; participant_count?: number; } interface RescheduleBookingInput { order_id: string; line_item_id: string; new_start_time: string; new_end_time: string; new_staff_id?: string; reason?: string; reschedule_type?: "customer" | "business" | "system"; } interface CancelBookingInput { booking_id: string; reason?: string; } interface CancelBookingResult { message: string; } type BookingModificationType = "reschedule" | "extend" | "shorten" | "early_checkout"; interface RescheduleBookingResult { success: boolean; booking_id: string; old_time: { start: string; end: string; }; new_time: { start: string; end: string; }; staff_changed: boolean; old_staff_id?: string | null; new_staff_id?: string | null; fee_charged?: string; } interface ServiceAvailabilityParams { service_id: string; start_date: string; end_date: string; location_id?: string; participant_count?: number; /** Whole units needed; short check-in days report unavailable. Default 1. */ units?: number; variant_id?: string; } interface ServiceAvailabilityResult { service_id: string; location_id: string; scheduling_mode: SchedulingMode; duration_unit: string; duration_value: number; start_date: string; end_date: string; participant_count: number; availability: DayAvailability[]; } interface RescheduleHistoryRecord { id: string; booking_id: string; order_id: string; order_item_id?: string | null; old_start_time: string; old_end_time: string; new_start_time: string; new_end_time: string; old_staff_id?: string | null; new_staff_id?: string | null; reason?: string | null; rescheduled_by: string; rescheduled_at: string; modification_type: BookingModificationType; reschedule_type: "customer" | "business" | "system"; fee_applied: string | number; metadata?: Record | null; } interface IdempotencyOption$5 { idempotencyKey?: string; } declare class SchedulingService { private client; constructor(client: CimplifyClient); getServices(): Promise>; getService(serviceId: string): Promise>; getAvailableSlots(input: GetAvailableSlotsInput): Promise>; checkSlotAvailability(input: CheckSlotAvailabilityInput): Promise>; getServiceAvailability(params: ServiceAvailabilityParams): Promise>; getBooking(bookingId: string): Promise>; getCustomerBookings(customerId?: string): Promise>; getUpcomingBookings(): Promise>; getPastBookings(limit?: number): Promise>; cancelBooking(input: CancelBookingInput, opts?: IdempotencyOption$5): Promise>; rescheduleBooking(input: RescheduleBookingInput, opts?: IdempotencyOption$5): Promise>; getNextAvailableSlot(serviceId: string, fromDate?: string): Promise>; hasAvailabilityOn(serviceId: string, date: string): Promise>; } interface LiteHoursRange { start: string; end: string; } interface LiteDayHours { /** Day of week, 0 = Sunday. */ day: number; ranges: LiteHoursRange[]; } interface LiteBootstrapBusiness { id: string; name: string; handle: string; logo?: string | null; currency?: string | null; is_open: boolean; description?: string | null; phone?: string | null; /** Next opening moment (RFC3339); present when the store is closed. */ opens_at?: string | null; /** Current closing moment (RFC3339); present when the store is open. */ closes_at?: string | null; hours?: LiteDayHours[]; } interface LiteBootstrapCategory { id: string; name: string; slug?: string | null; } interface LiteBootstrapLocation { id: string; name?: string | null; area?: string | null; } interface LiteBootstrap { business: LiteBootstrapBusiness; categories: LiteBootstrapCategory[]; /** The resolved ordering location: the QR / query choice, else the first * active branch. Null only for a business with no locations at all. */ location?: LiteBootstrapLocation | null; /** Every active branch — more than one means the customer can switch. */ locations?: LiteBootstrapLocation[]; } interface LiteResource { id: string; name: string; location_id?: string | null; } interface LiteResourceResponse { resource: LiteResource; tab: Record | null; } type ResourceInfo = LiteResourceResponse; declare class LiteService { private client; constructor(client: CimplifyClient); getBootstrap(): Promise>; getResource(resourceId: string): Promise>; getMenu(): Promise>; getMenuByCategory(categoryId: string): Promise>; } type S = components["schemas"]; interface FxQuoteRequest { from: CurrencyCode; to: CurrencyCode; amount: Money; } /** `POST /v1/fx/lock-quote` response — backend `LockedFxQuote`. Decimal fields * (rate/inverse_rate/amounts) arrive as strings; coerce before arithmetic. */ type FxQuote = S["LockedFxQuote"]; /** `GET /v1/fx/rate` response — backend `FxQuote` (the indicative rate). Uses * `from_currency`/`to_currency` (not `from`/`to`) and string Decimal rates. */ type FxRateResponse = S["FxQuote"]; type FxQuoteStatus = S["FxQuoteStatus"]; interface IdempotencyOption$4 { idempotencyKey?: string; } declare class FxService { private client; constructor(client: CimplifyClient); getRate(from: CurrencyCode, to: CurrencyCode): Promise>; lockQuote(request: FxQuoteRequest, opts?: IdempotencyOption$4): Promise>; } interface TrackPageViewOptions { pagePath?: string; pageTitle?: string; } interface TrackProductViewOptions { productName?: string; categoryId?: string; price?: string; pagePath?: string; } interface TrackCategoryViewOptions { categoryName?: string; pagePath?: string; } interface SessionMessage { code: string; level: "info" | "promotion" | "urgency" | "suggestion" | string; text: string; metadata?: Record; dismissible: boolean; } interface SessionActivityData { viewed_products: Array<{ product_id: string; product_name?: string; category_id?: string; price?: string; view_count: number; first_viewed_at: string; last_viewed_at: string; }>; viewed_categories: Array<{ category_id: string; category_name?: string; view_count: number; last_viewed_at: string; }>; total_product_views: number; unique_products_viewed: number; total_searches: number; total_cart_adds: number; total_cart_removes: number; } interface ActivityStateResponse { activity: SessionActivityData | null; intent: string; messages: SessionMessage[]; incentive: { template_id: string; agent_id: string; } | null; } interface ActivityRecommendation { product: Product; reason: string; } interface ActivityRecommendationsResponse { recommendations: ActivityRecommendation[]; intent: string; incentive: { template_id: string; agent_id: string; } | null; } interface DismissMessageResponse { dismissed: string; messages: SessionMessage[]; } declare class ActivityService { private client; private sessions; private localGeneration; private bootstrapRequest; constructor(client: CimplifyClient); /** * Record session start (landing, referrer, UTM, device). Fire-and-forget, * at most once per 30-minute-idle analytics session; called automatically * by the track* methods. */ startSession(): void; /** Rebind an existing analytics session after the server authenticates a customer. */ refreshIdentity(): void; /** A signed-out browser starts a fresh anonymous analytics session. */ resetSession(): void; /** Drop the old storefront's analytics state before binding this service to the new one. */ resetForStorefrontIdentityChange(): void; private buildSessionPayload; /** Route-level page view. Product/category interactions are tracked separately. */ trackPageView(options?: TrackPageViewOptions): void; trackProductView(productId: string, options?: TrackProductViewOptions): void; trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void; getState(): Promise>; getRecommendations(options?: { location_id?: string; limit?: number; }): Promise>; dismissMessage(code: string): Promise>; /** Records a page view now and on every route change; returns a stop fn. */ autoTrackPageViews(): () => void; private sendEvents; private hasStorefrontIdentity; private postEvents; private bootstrapSession; private captureGeneration; private isCurrentGeneration; private invalidatePendingActivity; private createSessionCoordinator; } interface IdempotencyOption$3 { idempotencyKey?: string; } declare class SubscriptionService { private client; constructor(client: CimplifyClient); list(): Promise>; get(id: string): Promise>; cancel(id: string, reason?: string, opts?: IdempotencyOption$3): Promise>; pause(id: string): Promise>; resume(id: string): Promise>; skipNextRenewal(id: string, opts?: IdempotencyOption$3): Promise>; } interface IdempotencyOption$2 { idempotencyKey?: string; } interface UploadInitResponse { upload_id: string; upload_url: string; expires_in_secs: number; } interface UploadResult { id: string; url: string; filename: string; content_type: string; size_bytes: number; } declare class UploadService { private client; constructor(client: CimplifyClient); init(filename: string, contentType: string, sizeBytes: number, opts?: IdempotencyOption$2): Promise>; confirm(uploadId: string): Promise>; upload(file: File): Promise>; } interface AutocompletePrediction { description: string; place_id: string; } interface AutocompleteResponse { predictions: AutocompletePrediction[]; } interface PlaceDetailsResponse { formatted_address: string; street_address?: string; apartment?: string; city?: string; region?: string; postal_code?: string; country?: string; latitude: number; longitude: number; place_id: string; } declare class PlacesService { private client; constructor(client: CimplifyClient); autocomplete(input: string, sessionToken?: string): Promise>; details(placeId: string, sessionToken?: string): Promise>; } interface DeliveryFeeResponse { serviceable: boolean; fee: Money | null; currency: string | null; details: DeliveryFeeDetails | null; } /** Whether delivery is priced on-platform or arranged directly with the seller. */ type DeliveryFeeStatus = "priced" | "arranged"; /** One entry on the delivery menu — a merchant-named rate ("Standard", * "Express", "Outside Accra") priced for the address when required, or the * synthesized default when the business has no named rates (`rate_id: null`). */ interface DeliveryOption { rate_id: string | null; name: string; description?: string; fee: Money; fee_status: DeliveryFeeStatus; currency: string; free_delivery_applied: boolean; /** Order value at/above this makes the option free — render "Free over X". */ free_over_amount?: Money; eta_min_minutes?: number; eta_max_minutes?: number; /** The option charged when the shopper makes no explicit selection. */ is_default: boolean; details: DeliveryFeeDetails; } interface DeliveryOptionsResponse { serviceable: boolean; options: DeliveryOption[]; message?: string; } interface GetDeliveryOptionsParams { country?: string; /** Cart currency. Rates in another currency are never returned. */ currency?: string; /** Cart goods total — drives free-over thresholds and zone minimums. */ orderValue?: Money; } type DeliveryOptionsQuery = GetDeliveryOptionsParams & ({ dropoffLat: number; dropoffLng: number; } | { dropoffLat?: never; dropoffLng?: never; }); declare class DeliveryService { private client; constructor(client: CimplifyClient); getFee(dropoffLat: number, dropoffLng: number, country?: string): Promise>; /** The full delivery menu for an address. Pass the selected option's * `rate_id` as `delivery_rate_id` when processing checkout. */ getOptions(query?: DeliveryOptionsQuery): Promise>; getOptions(dropoffLat: number, dropoffLng: number, opts?: GetDeliveryOptionsParams): Promise>; } type SenderType = "customer" | "agent" | "system" | "bot"; /** Mirrors the backend `ContentType` enum — the wire can send any of these. */ type ContentType = "text" | "image" | "video" | "audio" | "voice" | "document" | "sticker" | "location" | "contact" | "reaction" | "interactive" | "story_mention" | "share"; interface ChatMessage { id: string; /** Monotonic server sequence; absent only on a local optimistic bubble. */ sequence?: number; sender_type: SenderType; content: string; content_type: ContentType; attachments: ChatAttachment[]; metadata: Record; /** Server-resolved quote context; absent when the message isn't a reply. */ reply_to?: ChatReplyContext | null; /** Echo of the sender's idempotency key on widget customer messages. */ client_id?: string | null; /** Trusted provider mutation stamps; deleted messages are removed by the hook. */ edited_at?: string | null; deleted_at?: string | null; created_at: string; } /** * Self-contained quote payload: the server resolves the reference and ships * the preview, so quotes render on first paint after any reload with zero * client-side lookup. `preview` is prose-only with GenUI fences elided. */ interface ChatReplyContext { id: string; sender_type: SenderType; preview: string; } interface ChatAttachment { url: string; mime_type: string | null; filename: string | null; size?: number | null; } /** * An upload being sent as an attachment: `upload_id` goes on the wire (the * server stores a durable storage ref and presigns at read time); the rest * renders the optimistic bubble. */ interface ChatUploadAttachment extends ChatAttachment { upload_id: string; } interface ChatPersona { persona_type: "account" | "business"; persona_id: string; } /** Direct Account↔Business thread projection from the Chat core. */ interface ChatConversation { id: string; account_id: string; business_id: string; kind: "direct"; ai_mode: "auto" | "assist" | "off"; ai_mode_version: number; message_count: number; last_message_id?: string | null; last_message_at: string | null; created_at: string; updated_at: string; archived_at?: string | null; account: ChatPersona; business: ChatPersona; } /** Structured card references an AI reply may carry in `metadata.cards`. */ type ChatReplyCard = { kind: "product"; id: string; name: string; price?: string | number; image_url?: string; } | { kind: "order"; order_id: string; order_number?: string; status?: string; }; interface ChatConversationResponse { conversation: ChatConversation; messages: ChatMessage[]; } type ExternalChatClaimDisposition = "claimed" | "replayed" | "conflict" | "contact_unverified" | "business_unavailable" | "history_empty" | "history_oversize" | "failed"; interface ExternalChatClaimAttempt { status: ExternalChatClaimDisposition; thread_id: string | null; imported_message_count: number | null; replayed: boolean; observed_message_count: number | null; maximum_message_count: number | null; } interface ClaimExternalChatsResult { claims: ExternalChatClaimAttempt[]; } interface ChatHandoffResponse { thread: ChatConversation; cancelled_turns: number; spending_turns: number; } interface ChatWidgetStarter { icon?: string; text: string; } interface IdempotencyOption$1 { idempotencyKey?: string; } declare class SupportService { private client; constructor(client: CimplifyClient); /** * Retry verified external-history discovery for the current storefront. * Launch scope is intentionally WhatsApp-only because it is the registered * bidirectional transport. Results are per envelope and omit provider ids, * contact values, account ids, and message bodies. */ claimExternalChats(): Promise>; /** * Peek at the conversation without creating one: resolves the existing * thread (or null) so a page load can hydrate history without littering * the inbox with empty threads. */ peekConversation(): Promise>; /** Open (or resume) the customer's widget conversation. */ openConversation(opts?: IdempotencyOption$1): Promise>; /** * Send a message in the active conversation. * * The idempotency key doubles as the message `client_id`: the backend * dedupes on it, so client retries of the same send never insert twice. * `replyToMessageId` quotes another message by its `ChatMessage.id`; the * server resolves it thread-scoped and echoes the quote as `reply_to`. */ sendMessage(content: string, opts?: IdempotencyOption$1 & { replyToMessageId?: string; attachments?: ChatUploadAttachment[]; }): Promise>; /** * Poll for messages. `after` pages forward (live updates); `before` pages * backward for scrollback into older history. */ getMessages(options?: { afterSequence?: number; beforeSequence?: number; limit?: number; }): Promise>; /** React to a message in the active conversation by its `ChatMessage.id`. */ reactToMessage(messageId: string, emoji: string): Promise>; /** Ask for a person: flags the thread for the merchant's inbox. */ requestHuman(opts?: IdempotencyOption$1): Promise>; } interface ClaimSessionResult { /** The rotated, customer-bound session token; the SDK adopts it automatically. */ session_token: string; customer: ClaimedCustomer; /** The shopper's cart under the bound session, folded and priced for them. */ cart: Cart | null; } declare class SessionService { private client; private claimInFlight; private claimInFlightToken; private lastClaimedAccessToken; private claimedName; constructor(client: CimplifyClient); /** The verified customer this session is bound to, null while anonymous. */ get claimedCustomerName(): string | null; /** Adopt a session another holder already bound for this bearer. */ adopt(accessToken: string, session: SessionClaimedEvent): void; /** * Bind the anonymous session to the verified Link identity in one server * transaction: verify the bearer, rotate the session token (adopted here), * fold the guest cart under the customer and re-price it. A repeat for the * same account and session returns the same session. * * Idempotent and single-flight: concurrent calls share one request, and a * token already claimed by this instance short-circuits without a network * round trip. A session already bound to another Link account is rejected * rather than transferring that account's cart. Emits `session:claimed` on * the client's event channel. */ claim(): Promise>; } declare class CimplifyElements { private client; private businessId; private linkUrl; private options; private elements; private accessToken; private accountId; private customerId; private customerData; private addressData; private paymentData; private checkoutInProgress; private authInProgress; private authGeneration; private activeCheckoutAbort; private boundHandleMessage; private businessIdResolvePromise; private debug; constructor(client: CimplifyClient, businessId?: string, options?: ElementsOptions); private stopSessionSync; _syncHostSession(element?: CimplifyElement): void; private identityCustomer; create(type: ElementType, options?: ElementOptions): CimplifyElement; getElement(type: ElementType): CimplifyElement | undefined; _removeElement(type: ElementType, instance: CimplifyElement): void; destroy(): void; submitCheckout(data: ElementsCheckoutData): Promise; processCheckout(options: ProcessCheckoutOptions): AbortablePromise; isAuthenticated(): boolean; getAccessToken(): string | null; getPublicKey(): string; getSessionToken(): string | null; getBusinessId(): string | null; resolveBusinessId(): Promise; getAppearance(): ElementsOptions["appearance"]; private isAuthGenerationCurrent; private hydrateCustomerData; private sourceElementFor; private sessionStorageKey; private persistRefreshToken; private clearPersistedSession; private clearClaimedAuthorityAfterRestoreFailure; private restoreSession; private applyAccessToken; private adoptEstablishedSession; private broadcastClearedSession; private startEmbeddedAuth; private handleMessage; _setAddressData(data: AddressInfo): void; _setPaymentData(data: PaymentMethodInfo): void; _setGuestContact(contact: string, contactType: ElementsAuthContactType): void; } declare class CimplifyElement { private type; private businessId; private linkUrl; private options; private parent; private nonce; private iframe; private container; private mounted; private ready; private pendingMessages; private pendingInit; private eventHandlers; private resolvers; private boundHandleMessage; private boundHandleResize; private lastReportedHeight; private listening; constructor(type: ElementType, businessId: string | null, linkUrl: string, options: ElementOptions, parent: CimplifyElements); /** * Size the iframe to the element's reported content height (in pixels). We do * NOT cap checkout at the viewport: capping forced a tall checkout to scroll * *inside* a viewport-height iframe — a nested scroll-within-scroll. Sizing to * content lets the iframe grow and the host page scroll naturally as one * surface, which is the standard embedded-checkout behaviour. */ private applyHeight; mount(container: string | HTMLElement): void; destroy(): void; on(event: ElementEventType, handler: ElementEventHandler): void; off(event: ElementEventType, handler: ElementEventHandler): void; getData(): Promise; setCart(cart: CheckoutCartData): void; sendMessage(message: ParentToIframeMessage): void; private flushPending; getContentWindow(): Window | null; isMounted(): boolean; _acceptsMessageEvent(event: MessageEvent, message: IframeToParentMessage): boolean; _emitAuthenticated(data: AuthenticatedData): void; _emitError(error: { code: string; message: string; }): void; private createIframe; private handleMessage; private emit; private resolveData; } declare function createElements(client: CimplifyClient, businessId?: string, options?: ElementsOptions): CimplifyElements; interface RequestRetryPolicy { /** Per-call retry ceiling after the initial attempt; never raises the client-wide limit. */ maxRetries: number; /** Positive jitter range as a fraction of the base delay. */ jitterRatio?: number; } interface RequestOptions { idempotencyKey?: string; headers?: Record; timeoutMs?: number; retryPolicy?: RequestRetryPolicy; signal?: AbortSignal; } /** * Per-call cache hints for server-side reads. Forwarded as `next: { revalidate, tags }` * on the underlying fetch — Next.js's data cache reads them; in non-Next runtimes * they're inert. Maps 1:1 onto Next 16's documented fetch caching API: * https://nextjs.org/docs/app/api-reference/functions/fetch#optionsnextrevalidate * * Use the `tags` builders from `@cimplify/sdk/server` so invalidation stays consistent * with the `revalidate*` helpers. */ interface CacheOptions { /** Seconds before the cache entry is considered stale. `false` = cache indefinitely. */ revalidate?: number | false; /** Cache tags for on-demand invalidation via `revalidateTag(tag)`. */ tags?: readonly string[]; } interface ReadRequestOptions { cacheOptions?: CacheOptions; timeoutMs?: number; retryPolicy?: RequestRetryPolicy; signal?: AbortSignal; } interface CimplifyConfig { publicKey?: string; credentials?: RequestCredentials; baseUrl?: string; linkApiUrl?: string; suppressPublicKeyWarning?: boolean; timeout?: number; maxRetries?: number; retryDelay?: number; hooks?: ObservabilityHooks; /** * Custom fetch implementation. Defaults to global `fetch`. Override for * tests (in-process mock), service-worker contexts, or instrumented * fetch wrappers. Signature matches the global `fetch` exactly. */ fetch?: typeof fetch; /** Auto-record page views in the browser. Default true; false to gate on consent. */ trackPageViews?: boolean; /** * Per-client card-authorization adapters. Omit for the built-in lazy * Paystack and Stripe adapters; inject a registry to override or extend * provider UI without mutating process-global state. */ authorizationAdapterRegistry?: PaymentAuthorizationAdapterRegistry; } declare class CimplifyClient { private baseUrl; private linkApiUrl; private publicKey; private credentials; private accessToken; private sessionToken; private sessionEpoch; private timeout; private maxRetries; private retryDelay; private hooks; private fetchImpl; private context; private businessId; private businessIdResolvePromise; private publicKeyEpoch; private stopCrossTabSessionWatch; private latestSessionSyncAt; private latestSessionSyncOrderKey; readonly authorizationAdapters: PaymentAuthorizationAdapterRegistry; private inflightRequests; /** * App-level event channel. Subscribe to surface mutation rollbacks, outbox * activity, and dead-letter notifications to consumer code (toasts, * Sentry, analytics, etc.). The SDK emits but never auto-consumes — the * consumer decides how to react. */ readonly events: ClientEvents; private buildUrl; private _catalogue?; private _cart?; private _checkout?; private _purchaseIntents?; private _orders?; private _storeCredit?; private _subscriptions?; private _uploads?; private _places?; private _link?; private _auth?; private _business?; private _inventory?; private _scheduling?; private _lite?; private _fx?; private _activity?; private _delivery?; private _support?; private _session?; constructor(config?: CimplifyConfig); private stopPageViewTracking; stopTrackingPageViews(): void; /** Release window-level subscriptions and automatic tracking owned by this client. */ destroy(): void; getAccessToken(): string | null; getPublicKey(): string; getBaseUrl(): string; getLinkApiUrl(): string; getCredentialsMode(): RequestCredentials; isTestMode(): boolean; setAccessToken(token: string | null): void; /** * Zero-UI claim: a freshly verified customer identity (OTP verify, silent * refresh restore) binds the anonymous session so the conversation, cart * and orders survive a cleared browser. Best-effort by design — a failed * claim leaves the session anonymous, exactly as it was. Called by the * merchant auth flows, never by the raw token setter. Global Link clients * have no storefront tenant and therefore activate without this step. */ autoClaimSession(): void; /** * Adopt a server-rotated session token (claim flow). The old token stays * in flight-safe use until the next request; the storage swap makes the * rotation durable across reloads. */ adoptSessionToken(token: string): void; clearSession(): void; getSessionEpoch(): number; /** Monotonic fence for async work scoped to the current storefront tenant. */ getPublicKeyEpoch(): number; getSessionToken(): string | null; /** Whether the current transport session is known to have been claimed for * a Link identity, even when its in-memory bearer is absent after reload or * a failed refresh. The sync marker is written only after canonical claim * rotation and is replaced with `cleared` when a fresh session is minted. */ hasClaimedSessionAuthority(): boolean; publishSessionClaimed(customerName: string | null): void; private broadcastSessionSync; private applyCrossTabSession; private observeSessionSync; private nextSessionSyncTimestamp; setOrderToken(orderId: string, token: string): void; getOrderToken(orderId: string): string | null; clearOrderTokens(): void; setLocationId(locationId: string | null): void; getLocationId(): string | null; setBusinessId(businessId: string): void; setPublicKey(publicKey: string): void; getBusinessId(): string | null; resolveBusinessId(): Promise; private authedFetch; private safeStorage; private loadSessionToken; private loadSessionSyncPayload; /** * Mint the session token client-side so the very first request already * carries it. Without this, parallel first-load requests each get a * different server-minted token and last-writer-wins splits the session * (cart writes and chat conversations land on dropped tokens). * * Browser-only: minting on a server-shared client instance would pin * every visitor to one session, so SSR keeps the lazy server-minted flow. */ private mintSessionToken; private saveSessionToken; private captureSessionToken; private getHeaders; private resilientFetch; private getDedupeKey; private deduplicatedRequest; get(path: string, opts?: ReadRequestOptions): Promise; post(path: string, body?: unknown, opts?: RequestOptions): Promise; patch(path: string, body?: unknown, opts?: RequestOptions): Promise; delete(path: string, opts?: RequestOptions): Promise; linkGet(path: string, opts?: ReadRequestOptions): Promise; linkPost(path: string, body?: unknown, opts?: RequestOptions): Promise; linkDelete(path: string, opts?: RequestOptions): Promise; private handleRestResponse; get catalogue(): CatalogueQueries; get cart(): CartOperations; get checkout(): CheckoutService; get purchaseIntents(): PurchaseIntentService; get orders(): OrderQueries; get storeCredit(): StoreCreditQueries; get subscriptions(): SubscriptionService; get uploads(): UploadService; get places(): PlacesService; get link(): LinkService; get auth(): AuthService; get business(): BusinessService; get inventory(): InventoryService; get scheduling(): SchedulingService; get lite(): LiteService; get fx(): FxService; get activity(): ActivityService; get delivery(): DeliveryService; get support(): SupportService; get session(): SessionService; buildWsUrl(path: string): string; elements(businessId?: string, options?: ElementsOptions): CimplifyElements; } declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient; interface CatalogueResult { items: T[]; is_complete: boolean; total_available?: number; pagination?: Pagination; } interface CatalogueSnapshot { categories: Category[]; products: Product[]; add_ons: AddOnWithOptions[]; is_complete: boolean; total_available?: number; pagination?: Pagination; } interface IdempotencyOption { idempotencyKey?: string; } interface GetProductsOptions { category?: string; taxonomy?: string; search?: string; page?: number; limit?: number; offset?: number; cursor?: string; tags?: string[]; featured?: boolean; in_stock?: boolean; min_price?: number; max_price?: number; sort_by?: "name" | "price" | "created_at" | "updated_at"; sort_order?: "asc" | "desc"; /** Property filters — e.g. { material: "Cotton", size: "M,L" }. Values are comma-separated for multi-value. */ properties?: Record; } interface QuoteCompositeSelectionInput { component_id: string; quantity: number; variant_id?: string; add_on_option_id?: string; } interface QuoteBundleSelectionInput { component_id: string; quantity: number; variant_id?: string; } interface FetchQuoteInput { product_id: string; variant_id?: string; location_id?: string; quantity?: number; add_on_option_ids?: string[]; bundle_selections?: QuoteBundleSelectionInput[]; composite_selections?: QuoteCompositeSelectionInput[]; } interface RefreshQuoteInput { quote_id: string; product_id?: string; variant_id?: string; location_id?: string; quantity?: number; add_on_option_ids?: string[]; bundle_selections?: QuoteBundleSelectionInput[]; composite_selections?: QuoteCompositeSelectionInput[]; } type QuoteStatus = "pending" | "used" | "expired"; interface QuoteDynamicBuckets { intent?: string; demand?: string; inventory?: string; competition?: string; } interface QuoteUiMessage { code: string; level: "info" | "warn" | "error" | string; text: string; countdown_seconds?: number; } type RequestSource = "web" | "qr_code" | "order_taker" | "ucp_a2a"; interface PriceQuote { quote_id: string; business_id: string; product_id: string; variant_id?: string | null; location_id?: string | null; source: RequestSource; customer_id?: string | null; customer_segment_id?: string | null; storefront_id?: string | null; attribution_id?: string | null; quantity: number; currency?: CurrencyCode | null; snapshot_id?: string | null; snapshot_markup_version?: string | null; snapshot_tax_version?: string | null; item_price_info: ChosenPrice; variant_price_info?: ChosenPrice | null; final_price_info: ChosenPrice; sale?: SaleInfo | null; add_on_option_ids: string[]; bundle_selections?: QuoteBundleSelectionInput[]; add_ons_price_info?: ChosenPrice | null; quoted_total_price_info?: ChosenPrice | null; composite_selections?: QuoteCompositeSelectionInput[]; dynamic_buckets: QuoteDynamicBuckets; ui_messages: QuoteUiMessage[]; created_at: string; expires_at: string; next_change_at?: string | null; status: QuoteStatus; } interface RefreshQuoteResult { previous_quote_id: string; quote: PriceQuote; } declare class CatalogueQueries { private client; constructor(client: CimplifyClient); getCatalogue(opts?: ReadRequestOptions): Promise>; getProducts(options?: GetProductsOptions, opts?: ReadRequestOptions): Promise, CimplifyError>>; getProduct(id: string, opts?: ReadRequestOptions): Promise>; getProductBySlug(slug: string, opts?: ReadRequestOptions): Promise>; getVariants(productId: string): Promise>; getVariantAxes(productId: string): Promise>; getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise>; getVariantById(productId: string, variantId: string): Promise>; getAddOns(productId: string, opts?: ReadRequestOptions): Promise>; getCategories(opts?: ReadRequestOptions): Promise>; getCategory(id: string, opts?: ReadRequestOptions): Promise>; getCategoryBySlug(slug: string, opts?: ReadRequestOptions): Promise>; getCategoryProducts(categoryId: string, options?: { limit?: number; offset?: number; }, opts?: ReadRequestOptions): Promise>; getCollections(opts?: ReadRequestOptions): Promise>; getCollection(id: string, opts?: ReadRequestOptions): Promise>; getCollectionBySlug(slug: string, opts?: ReadRequestOptions): Promise>; getCollectionProducts(collectionId: string, options?: { limit?: number; offset?: number; }, opts?: ReadRequestOptions): Promise>; searchCollections(query: string, limit?: number): Promise>; getBundles(): Promise>; getBundle(id: string): Promise>; getBundleBySlug(slug: string): Promise>; searchBundles(query: string, limit?: number): Promise>; getComposites(options?: { limit?: number; }): Promise>; getComposite(id: string): Promise>; getCompositeByProduct(productId: string): Promise>; calculateCompositePrice(compositeId: string, selections: ComponentSelectionInput[], locationId?: string): Promise>; fetchQuote(input: FetchQuoteInput, opts?: IdempotencyOption): Promise>; getQuote(quoteId: string): Promise>; refreshQuote(input: RefreshQuoteInput): Promise>; getTaxonomies(parentId?: string): Promise>; getTaxonomy(id: string): Promise>; getTaxonomyPath(id: string): Promise>; searchTaxonomies(query: string, limit?: number): Promise>; getEligibleBillingPlans(productId: string, query?: EligiblePlansQuery): Promise>; getProductSchedules(productId: string): Promise>; checkProductAvailableNow(productId: string, locationId: string): Promise>; getDeals(locationId?: string): Promise>; getProductsOnSale(): Promise>; getProductDeals(productId: string): Promise>; getCategoryDeals(categoryId: string): Promise>; getCollectionDeals(collectionId: string): Promise>; validateDiscountCode(code: string, orderSubtotal: string, locationId?: string): Promise>; search(query: string, options?: Omit, opts?: ReadRequestOptions): Promise>; searchProducts(query: string, options?: Omit, opts?: ReadRequestOptions): Promise>; getMenu(options?: { category?: string; limit?: number; }): Promise>; getMenuCategory(categoryId: string): Promise>; getMenuItem(itemId: string): Promise>; getTags(options?: { tag_group?: string; search?: string; min_usage?: number; limit?: number; offset?: number; }): Promise>; getAttributeDefinitions(namespace?: string): Promise>; getProductAttributes(productId: string): Promise>; getCategoryAttributes(categoryId: string): Promise>; getCollectionAttributes(collectionId: string): Promise>; getPropertyFacets(options?: { category_id?: string; product_type?: string; }): Promise>; getTaxonomyAttributes(taxonomyId: string): Promise>; searchKnowledge(query: string, limit?: number): Promise>; getKnowledgeArticles(): Promise>; } export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type ClaimExternalChatsResult as a2, type ClaimSessionResult as a3, type ContentType as a4, type CustomerBooking as a5, type CustomerBookingServiceItem as a6, type CustomerServicePreferences as a7, type DayAvailability as a8, type DeliveryFeeDetails as a9, type GetOrdersOptions as aA, type GetProductsOptions as aB, type GroupOrderInfo as aC, HostedPurchaseIntentService as aD, InventoryService as aE, type LifecyclePhase as aF, type LineItem as aG, type LineType as aH, LinkService as aI, type LiteBootstrap as aJ, type LiteDayHours as aK, type LiteHoursRange as aL, LiteService as aM, type Location as aN, type LocationBooking as aO, type LocationTaxBehavior as aP, type LocationTaxOverrides as aQ, type LocationTimeProfile as aR, type LocationWithDetails as aS, type ObservabilityHooks as aT, type Ok as aU, type Order as aV, type OrderCustomerInfo as aW, type OrderDiscountInfo as aX, type OrderFilter as aY, type OrderFulfillmentSummary as aZ, type OrderGroup as a_, type DeliveryFeeResponse as aa, type DeliveryFeeStatus as ab, type DeliveryOption as ac, type DeliveryOptionsQuery as ad, type DeliveryOptionsResponse as ae, DeliveryService as af, type DepositResult as ag, type DismissMessageResponse as ah, type EnrichedOrder as ai, type EnrichedOrderItem as aj, type Err as ak, type ExternalChatClaimAttempt as al, type ExternalChatClaimDisposition as am, type FeeBearerType as an, type FetchQuoteInput as ao, type FulfillmentLink as ap, type FulfillmentStatus as aq, type FulfillmentSummaryDTO as ar, type FulfillmentType as as, type FxQuote as at, type FxQuoteRequest as au, type FxQuoteStatus as av, type FxRateResponse as aw, FxService as ax, type GetAvailableSlotsInput as ay, type GetDeliveryOptionsParams as az, type Result as b, type ResourceAssignment as b$, type OrderGroupPayment as b0, type OrderGroupPaymentState as b1, type OrderGroupPaymentStatus as b2, type OrderGroupPaymentSummary as b3, type OrderGroupStatus as b4, type OrderHistory as b5, type OrderLineState as b6, type OrderLineStatus as b7, type OrderLocationInfo as b8, type OrderPaymentEvent as b9, PurchaseIntentService as bA, type PurchaseIntentTransport as bB, type QuoteBundleSelectionInput as bC, type QuoteCompositeSelectionInput as bD, type QuoteDynamicBuckets as bE, type QuoteStatus as bF, type QuoteUiMessage as bG, type RefreshQuoteInput as bH, type RefreshQuoteResult as bI, type RefundOrderInput as bJ, type RelatedCandidate as bK, type RelatedProduct as bL, type RelatedProductsEnrichment as bM, type RelationType as bN, type ReminderMethod as bO, type ReminderSettings as bP, type ReorderResult as bQ, type RequestContext as bR, type RequestErrorEvent as bS, type RequestOptions as bT, type RequestRetryPolicy as bU, type RequestSource as bV, type RequestStartEvent as bW, type RequestSuccessEvent as bX, type RescheduleBookingInput as bY, type RescheduleBookingResult as bZ, type RescheduleHistoryRecord as b_, type OrderPricingView as ba, OrderQueries as bb, type OrderSplitDetail as bc, type OrderStaffInfo as bd, type OrderStatus as be, type OrderTimestampsDTO as bf, type Origin as bg, type OriginActor as bh, type OriginChannel as bi, type OtpResult as bj, PAYMENT_AUTHORIZATION_OUTCOME_STATUS as bk, PAYMENT_AUTHORIZATION_PROVIDER as bl, PURCHASE_INTENT_ROUTE as bm, PaymentAuthorizationAdapterRegistry as bn, type PaymentInfoDTO as bo, type PaymentState as bp, type PlaceDetailsResponse as bq, PlacesService as br, type PriceQuote as bs, type PricingOverrides as bt, type ProviderResolutionSource as bu, type PurchaseIntentActionDecision as bv, type PurchaseIntentRequestOptions as bw, type PurchaseIntentResolveOptions as bx, type PurchaseIntentResolveStatus as by, PurchaseIntentResolver as bz, type PaymentAuthorizationContext as c, type ResourceInfo as c0, type RetryEvent as c1, type Room as c2, SESSION_CHANGE_SOURCE as c3, type SchedulingMetadata as c4, type SchedulingResult as c5, SchedulingService as c6, type SenderType as c7, type Service as c8, type ServiceAvailabilityParams as c9, type TimeSlot as cA, type TrackCategoryViewOptions as cB, type TrackProductViewOptions as cC, type UpdateOrderStatusInput as cD, type UpdateProfileInput as cE, type UploadInitResponse as cF, type UploadResult as cG, UploadService as cH, combine as cI, combineObject as cJ, createCimplifyClient as cK, createDefaultPaymentAuthorizationAdapterRegistry as cL, createElements as cM, err as cN, flatMap as cO, fromPromise as cP, getOrElse as cQ, isErr as cR, isOk as cS, mapError as cT, mapResult as cU, ok as cV, toNullable as cW, tryCatch as cX, unwrap as cY, type ServiceAvailabilityResult as ca, type ServiceCharge as cb, type ServiceNotes as cc, type ServiceScheduleRequest as cd, type ServiceStatus as ce, type SessionActivityData as cf, type SessionChangeEvent as cg, type SessionChangeSource as ch, type SessionMessage as ci, SessionService as cj, type SlotResourceInfo as ck, type SlotStaffInfo as cl, type Staff as cm, type StaffAssignment as cn, type StaffRole as co, type StaffScheduleItem as cp, type StockLevel as cq, type StockStatus as cr, type StoreCreditBalance as cs, StoreCreditQueries as ct, type StorefrontBootstrap as cu, SubscriptionService as cv, SupportService as cw, type Table as cx, type TimeRange as cy, type TimeRanges as cz, type PaymentAuthorizationOutcome as d, type ChatReplyCard as e, type ActivityRecommendationsResponse as f, ActivityService as g, type ActivityStateResponse as h, type AmountToPay as i, AuthService as j, type AuthStatus as k, type AuthorizeCardPopupOptions as l, type AutocompletePrediction as m, type AutocompleteResponse as n, type AvailabilityResult as o, type AvailableSlot as p, type BookingModificationType as q, type BookingStatus as r, type BookingWithDetails as s, type BufferTimes as t, type Business as u, type BusinessDetailsDTO as v, type BusinessHours as w, type BusinessPreferences as x, BusinessService as y, type BusinessSettings as z };