declare const __money: unique symbol; type Money = (string | number) & { readonly [__money]: true; }; declare function money(value: string | number): Money; declare function moneyFromNumber(value: number): Money; declare const ZERO: Money; type CurrencyCode = "USD" | "EUR" | "GBP" | "JPY" | "CNY" | "CHF" | "CAD" | "AUD" | "GHS" | "NGN" | "KES" | "ZAR" | "XOF" | "XAF" | "EGP" | "TZS" | "UGX" | "RWF" | "ETB" | "ZMW" | "BWP" | "MUR" | "NAD" | "MWK" | "AOA" | "CDF" | "GMD" | "GNF" | "LRD" | "SLL" | "MZN" | "BIF" | "INR" | "BRL" | "COP" | "MXN" | "KRW" | "TRY" | "THB" | "MYR" | "PHP" | "IDR" | "VND" | "SGD" | "HKD" | "TWD" | "AED" | "SAR" | "ILS"; declare function isSupportedCurrency(code: string): code is CurrencyCode; declare function currencyCode(value: string): CurrencyCode; interface PaginationParams { page?: number; limit?: number; offset?: number; } interface Pagination { total_count: number; current_page: number; page_size: number; total_pages: number; has_more: boolean; next_cursor?: string; } declare const ErrorCode: { readonly UNKNOWN_ERROR: "UNKNOWN_ERROR"; readonly NETWORK_ERROR: "NETWORK_ERROR"; readonly TIMEOUT: "TIMEOUT"; readonly UNAUTHORIZED: "UNAUTHORIZED"; readonly FORBIDDEN: "FORBIDDEN"; readonly TENANT_CONTEXT_CHANGED: "TENANT_CONTEXT_CHANGED"; readonly NOT_FOUND: "NOT_FOUND"; readonly VALIDATION_ERROR: "VALIDATION_ERROR"; readonly CART_EMPTY: "CART_EMPTY"; readonly CART_EXPIRED: "CART_EXPIRED"; readonly CART_NOT_FOUND: "CART_NOT_FOUND"; readonly ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE"; readonly VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND"; readonly VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK"; readonly ADDON_REQUIRED: "ADDON_REQUIRED"; readonly ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED"; readonly CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED"; readonly DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED"; readonly CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED"; readonly QUOTE_NOT_FOUND: "QUOTE_NOT_FOUND"; readonly QUOTE_EXPIRED: "QUOTE_EXPIRED"; readonly QUOTE_CONSUMED: "QUOTE_CONSUMED"; readonly QUOTE_STORAGE_UNAVAILABLE: "QUOTE_STORAGE_UNAVAILABLE"; readonly QUOTE_VALIDATION_FAILED: "QUOTE_VALIDATION_FAILED"; readonly PRICE_CHANGED: "PRICE_CHANGED"; readonly PAYMENT_FAILED: "PAYMENT_FAILED"; readonly PAYMENT_CANCELLED: "PAYMENT_CANCELLED"; readonly PAYMENT_CAPABILITY_MISMATCH: "PAYMENT_CAPABILITY_MISMATCH"; readonly UNSUPPORTED_CURRENCY: "UNSUPPORTED_CURRENCY"; readonly INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS"; readonly CARD_DECLINED: "CARD_DECLINED"; readonly INVALID_OTP: "INVALID_OTP"; readonly OTP_EXPIRED: "OTP_EXPIRED"; readonly OTP_CHALLENGE_EXHAUSTED: "OTP_CHALLENGE_EXHAUSTED"; readonly OTP_CHALLENGE_CONSUMED: "OTP_CHALLENGE_CONSUMED"; readonly AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED"; readonly PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED"; readonly CHECKOUT_TERMS_UNAVAILABLE: "CHECKOUT_TERMS_UNAVAILABLE"; readonly CHECKOUT_FAILED: "CHECKOUT_FAILED"; readonly CHECKOUT_AUTHORITY_REQUIRED: "CHECKOUT_AUTHORITY_REQUIRED"; readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY"; readonly BUSINESS_ID_REQUIRED: "BUSINESS_ID_REQUIRED"; readonly ORDER_TYPE_REQUIRED: "ORDER_TYPE_REQUIRED"; readonly NO_PAYMENT_ELEMENT: "NO_PAYMENT_ELEMENT"; readonly PAYMENT_NOT_MOUNTED: "PAYMENT_NOT_MOUNTED"; readonly AUTH_INCOMPLETE: "AUTH_INCOMPLETE"; readonly AUTH_LOST: "AUTH_LOST"; readonly ALREADY_PROCESSING: "ALREADY_PROCESSING"; readonly AUTH_CONFIG_REQUIRED: "AUTH_CONFIG_REQUIRED"; readonly AUTH_CALLBACK_MISSING_TOKEN: "AUTH_CALLBACK_MISSING_TOKEN"; readonly AUTH_START_FAILED: "AUTH_START_FAILED"; readonly SERVER_ERROR: "SERVER_ERROR"; readonly API_ERROR: "API_ERROR"; readonly IDEMPOTENCY_MISMATCH: "IDEMPOTENCY_MISMATCH"; readonly INVALID_CUSTOMER_NAME: "INVALID_CUSTOMER_NAME"; readonly INVALID_PAYMENT_METHOD: "INVALID_PAYMENT_METHOD"; readonly INVALID_CART: "INVALID_CART"; readonly PAYMENT_OUTCOME_UNKNOWN: "PAYMENT_OUTCOME_UNKNOWN"; readonly REDIRECT_REQUIRED: "REDIRECT_REQUIRED"; readonly PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE"; readonly AUTHORIZATION_REQUIRED: "AUTHORIZATION_REQUIRED"; readonly CANCELLED: "CANCELLED"; readonly POPUP_BLOCKED: "POPUP_BLOCKED"; readonly FX_QUOTE_FAILED: "FX_QUOTE_FAILED"; readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED"; readonly SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE"; readonly BOOKING_CONFLICT: "BOOKING_CONFLICT"; readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND"; readonly OUT_OF_STOCK: "OUT_OF_STOCK"; readonly INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY"; }; type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode]; interface ApiError { code: string; message: string; retryable: boolean; } interface ErrorHint { docs_url: string; suggestion: string; } declare const ERROR_HINTS: Record; declare class CimplifyError extends Error { code: string; retryable: boolean; docs_url?: string | undefined; suggestion?: string | undefined; constructor(code: string, message: string, retryable?: boolean, docs_url?: string | undefined, suggestion?: string | undefined); get userMessage(): string; } declare class IdempotencyMismatchError extends CimplifyError { originalCreatedAt: string; constructor(message: string, originalCreatedAt: string); } declare function isCimplifyError(error: unknown): error is CimplifyError; /** * True for any quote-class error: cache miss, expiry, consumption, validation * mismatch, or a price change since the quote was locked. Use this to route * checkout failures into a quote-refresh + user-consent UX path. */ declare function isQuoteError(error: unknown): boolean; /** * True for the quote errors where re-quoting + asking the shopper to confirm * is the correct next step — there is real disagreement between the cart and * the locked quote (different cart contents or a price change). Cache-miss * errors are now self-healed at the backend and never surface here. */ declare function isQuoteConflictRequiringConsent(error: unknown): boolean; declare function isIdempotencyMismatchError(error: unknown): error is IdempotencyMismatchError; declare function getErrorHint(code: string): ErrorHint | undefined; declare function enrichError(error: CimplifyError, options?: { isTestMode?: boolean; }): CimplifyError; declare function isRetryableError(error: unknown): boolean; interface components { schemas: { AccessPassView: components["schemas"]["ProductBase"] & { access_type?: string | null; access_level?: string | null; /** Format: int32 */ access_duration_days?: number | null; }; /** @description User-specific message preferences */ AccountMessagePreferences: { /** @description Account identifier */ account_id: string; /** @description User's role */ role?: string | null; /** @description User's department */ department?: string | null; /** @description User's location */ location?: string | null; /** @description Contact information per channel */ contact_info: { [key: string]: string; }; /** @description Preferred channels (in order of preference) */ preferred_channels: string[]; /** @description Events user wants to receive */ subscribed_events: string[]; /** @description Events user wants to exclude */ excluded_events: string[]; /** @description Minimum urgency for notifications */ min_urgency: string; /** * Format: int32 * @description Maximum notifications per hour */ max_notifications_per_hour?: number | null; /** @description Do Not Disturb periods */ dnd_periods: components["schemas"]["DNDPeriod"][]; working_hours?: null | components["schemas"]["WorkingHours"]; /** @description Whether user accepts escalated messages */ accepts_escalations: boolean; /** * Format: int32 * @description Emergency contact priority */ emergency_priority?: number | null; /** @description Language preference */ language?: string | null; /** @description Timezone */ timezone?: string | null; }; ActivityRecommendation: { product: Record; reason: string; }; ActivityStateResponse: { activity?: Record | null; intent: string; messages: Record[]; incentive?: null | components["schemas"]["IncentiveView"]; }; /** @enum {string} */ Actor: "customer" | "staff" | "agent" | "system"; AddItemArgs: { item_id: string; /** Format: int32 */ quantity?: number | null; billing_plan_id?: string | null; variant_id?: string | null; add_on_options?: string[] | null; special_instructions?: string | null; bundle_selections?: components["schemas"]["BundleSelectionArgs"][] | null; composite_selections?: components["schemas"]["CompositeSelectionArgs"][] | null; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; staff_id?: string | null; resource_id?: string | null; quote_id?: string | null; customer_inputs?: components["schemas"]["CustomerInputEntry"][] | null; }; AddOnDetails: { selected_options: components["schemas"]["SelectedAddOnOption"][]; total_add_on_price: string; add_ons: components["schemas"]["OrderAddOn"][]; }; /** @description Details about a modifier group with its options */ AddOnGroupDetails: { id: string; name: string; is_multiple_allowed: boolean; options: components["schemas"]["AddOnOptionDetails"][]; }; /** @description Details about a modifier option with its name and price */ AddOnOptionDetails: { id: string; name: string; price?: string | null; is_required: boolean; }; /** @description Add-on option view. */ AddOnOptionView: { id: string; add_on_id: string; name: string; description?: string | null; is_required: boolean; is_mutually_exclusive: boolean; default_price?: string; location_prices?: { [key: string]: components["schemas"]["ChosenPrice"]; } | null; }; /** @description Add-on group view. */ AddOnView: { id: string; name: string; is_multiple_allowed: boolean; is_required: boolean; is_mutually_exclusive: boolean; /** * Format: int32 * @description Minimum selections required; defaults to `0` when unset upstream. */ min_selections: number; /** * Format: int32 * @description Maximum selections allowed. `0` means unbounded (no upper limit). */ max_selections: number; options: components["schemas"]["AddOnOptionView"][]; }; AddressInfo: { street_address?: string | null; apartment?: string | null; city?: string | null; region?: string | null; postal_code?: string | null; country?: string | null; delivery_instructions?: string | null; /** Format: double */ latitude?: number | null; /** Format: double */ longitude?: number | null; pickup_time?: string | null; /** Format: int32 */ guest_count?: number | null; seating_time?: string | null; seating_requests?: string | null; }; AdjustmentType: { location_based: string; } | { variant_based: string; } | "time_based" | { customer_segment: string; } | { customer_loyalty: string; } | { channel_markup: string; } | { discount: string; } | { bundle: string; } | { manual: string; } | { time_limited_promotion: { promotion_id: string; /** Format: date-time */ valid_until: string; }; } | { price_list_override: { price_list_id: string; /** Format: int32 */ quantity_break?: number | null; }; } | { catalog_override: { catalog_id: string; adjustment_type?: string | null; }; }; /** * @description Reviewed origin, independent of the Service persona. Human approval never * changes an agent's authorship or turns generated work into human content. * @enum {string} */ AgentAuthorship: "ai" | "automation"; /** * @description Server-derived as-of attribution retained with the actual owner output. * It does not assert that an answer is entailed by these facts or still true. */ AgentFactCitation: { /** Format: uuid */ observation_id: string; kind: components["schemas"]["AgentFactKind"]; /** Format: date-time */ read_started_at: string; /** Format: date-time */ observed_at: string; }; /** @enum {string} */ AgentFactKind: "shop_hours" | "public_products" | "customer_order_statuses" | "named_delivery_estimates"; AmountToPay: { customer_pays: string; business_receives: string; cimplify_receives: string; provider_receives: string; fee_bearer: components["schemas"]["FeeBearerType"]; }; ApiResponse_PublicSocialPost: { data: { id: string; author: components["schemas"]["PublicPersona"]; channel?: null | components["schemas"]["PublicSocialPostChannel"]; posted_by?: null | components["schemas"]["PublicSocialPostByline"]; collaborators: components["schemas"]["PublicSocialPostCollaborator"][]; kind: components["schemas"]["SocialPostKind"]; caption?: string | null; caption_entities: components["schemas"]["PublicSocialCaptionEntity"][]; media: components["schemas"]["PublicSocialPostMedia"][]; audio_label?: string | null; market: string; /** Format: date-time */ published_at: string; tags: components["schemas"]["PublicSocialPostTag"][]; place?: null | components["schemas"]["PublicPlace"]; /** * @description Persistent server-projected disclosure. Once true for a published post, * offer retirement or enrollment revocation cannot clear it. */ paid_partnership: boolean; partnership?: null | components["schemas"]["PublicSocialPostPartnership"]; /** @description Opaque signed handoff for the tagged business storefront. */ commerce_ref?: string | null; engagement: components["schemas"]["SocialPostEngagement"]; viewer: components["schemas"]["SocialPostViewerState"]; }; meta?: null | components["schemas"]["ResponseMetadata"]; status: components["schemas"]["ResponseStatus"]; }; ApiResponse_PublicSocialShelfPage: { data: { sale: components["schemas"]["PublicSocialShelfSale"]; items: components["schemas"]["PublicProductReference"][]; next_cursor?: string | null; }; meta?: null | components["schemas"]["ResponseMetadata"]; status: components["schemas"]["ResponseStatus"]; }; /** @description The operator is disclosed independently from whoever installs the app. */ AppOperator: { /** @enum {string} */ kind: "platform"; } | { owner: components["schemas"]["AppOwner"]; /** @enum {string} */ kind: "developer"; }; /** * @description An installation's represented owner, never an agent/service persona. * Storage constrains the corresponding Account or Business foreign key. */ AppOwner: { account_id: string; /** @enum {string} */ kind: "account"; } | { business_id: string; /** @enum {string} */ kind: "business"; }; AppliedDiscount: { discount_id: string; discount_code?: string | null; discount_type: components["schemas"]["BenefitType"]; discount_value: string; discount_amount: string; /** Format: date-time */ applied_at: string; targeted_item_ids?: string[]; }; ApplyCouponBody: { coupon_code: string; }; /** @description Step in an approval workflow */ ApprovalStep: { /** @description Step identifier */ id: string; /** @description Step name */ name: string; /** @description Users who can approve this step */ approvers: string[]; /** * Format: int32 * @description Number of approvals required */ required_approvals: number; /** @description Whether all approvers must approve */ require_all: boolean; /** * Format: int32 * @description Timeout for this step (seconds) */ timeout_seconds?: number | null; /** @description Action on step timeout */ timeout_action: components["schemas"]["StepTimeoutAction"]; }; /** @description Conditions that trigger approval workflow */ ApprovalTrigger: { /** * Format: int32 * @description Message cost exceeds threshold */ CostThreshold: number; } | "SensitiveContent" | "ExternalRecipients" | { /** @description Message urgency level */ UrgencyLevel: string; } | { /** @description Specific event types */ EventTypes: string[]; } | { /** @description Specific channels */ Channels: string[]; }; /** @description Message approval workflow */ ApprovalWorkflow: { /** @description Workflow identifier */ id: string; /** @description Workflow name */ name: string; /** @description Conditions that trigger this workflow */ triggers: components["schemas"]["ApprovalTrigger"][]; /** @description Approval steps */ steps: components["schemas"]["ApprovalStep"][]; /** * Format: int32 * @description Timeout for approval (seconds) */ timeout_seconds: number; /** @description Action to take on timeout */ timeout_action: components["schemas"]["TimeoutAction"]; /** @description Whether this workflow is active */ enabled: boolean; }; AuthActionView: { success: boolean; message: string; }; AuthStatusView: { is_authenticated: boolean; customer?: null | components["schemas"]["Customer"]; /** Format: date-time */ session_expires_at?: string | null; }; AuthorizationType: "pin" | "otp" | "phone" | "birthday" | { address: { address: string; city: string; state: string; zip_code: string; }; }; /** * @description Business-wide defaults for the auto-pricing engine. Products and variants * override `default_markup_pct`; everything else is the fallback for a business * that hasn't tuned per-item. */ AutoPricingPreferences: { /** * @description Fallback markup percent applied over cost when a product sets none. * `None` means no business-wide default — suggestions rely on per-product markup. */ default_markup_pct?: string | null; /** @description Suggested prices round to the nearest multiple of this amount. */ rounding_increment?: string; /** @description When a delivery lowers cost, also suggest lowering the price. Off keeps the margin. */ suggest_on_cost_drop?: boolean; /** @description Apply suggestions on receipt without a review step. */ apply_automatically?: boolean; }; AutocompletePrediction: { description: string; place_id: string; /** @description The provider's primary label (a venue or street name) when it splits one out. */ name?: string | null; }; AutocompleteResult: { predictions: components["schemas"]["AutocompletePrediction"][]; }; AvailabilityManagement: { /** @description Core availability settings */ settings: components["schemas"]["AvailabilitySettings"]; /** @description Seasonal adjustments */ seasonal_adjustments: components["schemas"]["SeasonalAdjustment"][]; }; AvailabilityResponse: { product_id: string; variant_id?: string | null; is_available: boolean; /** Format: int64 */ available_quantity: number; /** Format: int32 */ requested_quantity: number; /** Format: int64 */ shortfall?: number | null; }; /** @description Availability schedule for emergency contacts */ AvailabilitySchedule: { /** @description Days of the week contact is available */ available_days: string[]; /** @description Start time for availability */ start_time: string; /** @description End time for availability */ end_time: string; /** @description Timezone */ timezone: string; /** @description Whether contact is available for true emergencies outside schedule */ emergency_override: boolean; }; AvailabilitySettings: { /** Format: int32 */ default_service_duration_minutes: number; /** Format: int32 */ buffer_time_minutes: number; /** Format: int32 */ max_advance_booking_days: number; /** Format: int32 */ min_advance_booking_hours: number; allow_same_day_booking: boolean; allow_weekend_booking: boolean; blackout_dates: string[]; }; /** @enum {string} */ BenefitType: "fixed" | "percentage" | "points" | "free_item" | "buy_x_get_y_free"; /** @enum {string} */ BillingFrequency: "weekly" | "biweekly" | "monthly" | "quarterly" | "annually"; BillingInvoice: { id: string; invoice_number: string; subscription_id?: string | null; customer_id: string; provider_id?: string | null; status: components["schemas"]["InvoiceStatus"]; amount_due: string; currency: string; /** Format: date-time */ due_date: string; /** Format: date-time */ paid_at?: string | null; payment_id?: string | null; metadata?: Record | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; BillingInvoiceLineItem: { id: string; invoice_id: string; description: string; /** Format: int32 */ quantity: number; unit_amount: string; amount: string; metadata?: Record | null; }; /** @enum {string} */ BillingMarkupType: "fixed" | "percentage"; BillingSubscription: { id: string; billing_plan_id?: string | null; business_id?: string | null; customer_id: string; status: components["schemas"]["SubscriptionStatus"]; /** Format: date-time */ current_period_start: string; /** Format: date-time */ current_period_end: string; /** Format: date-time */ next_billing_date?: string | null; /** Format: date-time */ trial_start?: string | null; /** Format: date-time */ trial_end?: string | null; /** Format: date-time */ canceled_at?: string | null; cancel_at_period_end: boolean; location_id?: string | null; installment_total?: string | null; installment_per_period?: string | null; /** Format: int32 */ installment_periods_remaining?: number | null; origin_order_id?: string | null; skip_next_renewal: boolean; /** Format: int32 */ cycles_completed: number; source?: string | null; source_id?: string | null; frequency?: null | components["schemas"]["BillingFrequency"]; fulfillment_frequency?: null | components["schemas"]["BillingFrequency"]; plan_type?: null | components["schemas"]["ProductBillingPlanType"]; /** Format: int32 */ max_cycles?: number | null; billing_currency?: string | null; /** Format: date-time */ contract_ends_at?: string | null; /** * @description Immutable authority used when resolving customer-scoped tax policy for * renewal invoices. CRM attribution remains in `customer_id`; it is not * itself proof that an accountless checkout may claim customer policy. */ commercial_tax_authority_kind?: components["schemas"]["SubscriptionTaxCustomerAuthorityKind"]; commercial_tax_customer_id?: string | null; metadata?: Record | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; BookingNotificationSettings: { send_confirmation: boolean; send_reminders: boolean; reminder_schedule: number[]; send_follow_up: boolean; /** Format: int32 */ follow_up_delay_hours?: number | null; notification_channels: components["schemas"]["PrefNotificationChannel"][]; }; BookingPaymentPolicies: { require_payment_upfront: boolean; require_deposit: boolean; deposit_type: components["schemas"]["PrefDepositType"]; deposit_amount?: string | null; /** Format: int32 */ payment_deadline_hours?: number | null; late_payment_policy: components["schemas"]["LatePaymentPolicy"]; }; BookingPolicies: { /** @description Cancellation policy settings */ cancellation: components["schemas"]["PrefCancellationPolicy"]; /** @description Payment policy settings */ payment: components["schemas"]["BookingPaymentPolicies"]; }; BookingSettings: { enabled: boolean; requires_approval: boolean; /** Format: int32 */ advance_booking_limit_days: number; }; BookingSlot: { /** Format: date-time */ start_time: string; /** Format: date-time */ end_time: string; available_staff: components["schemas"]["StaffInfo"][]; available_resources: components["schemas"]["ResourceInfo"][]; /** Format: int32 */ capacity_available: number; price: string; }; BootstrapCategoryView: { id: string; name: string; slug?: string | null; }; BootstrapView: { business: components["schemas"]["Business"]; locations: components["schemas"]["Location"][]; default_location_id?: string | null; categories: components["schemas"]["BootstrapCategoryView"][]; }; /** * @description How a multi-day booking's start and end are described to the customer. * Models the handover fact; the display words live client-side. `Custom` * carries operator-authored labels on the service. `None` on the service * falls back to [`DurationUnit::default_boundary_kind`]. * @enum {string} */ BoundaryKind: "check_in_out" | "pickup_return" | "delivery_collection" | "access_vacate" | "move_in_out" | "custom"; BufferTimes: { /** Format: int32 */ before_minutes: number; /** Format: int32 */ after_minutes: number; /** Format: int32 */ travel_time_minutes?: number | null; /** Format: int32 */ setup_time_minutes?: number | null; /** Format: int32 */ cleanup_time_minutes?: number | null; }; /** @description Variant option for a bundle component. */ BundleComponentVariantView: { id: string; is_default: boolean; display_name: string; price_adjustment?: string; }; /** @description Component within a bundle. */ BundleComponentView: { id: string; product_id: string; product_name: string; product_description?: string | null; product_image_url?: string | null; effective_price: string; /** Format: int32 */ quantity: number; variant_id?: string | null; allow_variant_choice: boolean; available_variants: components["schemas"]["BundleComponentVariantView"][]; variant_axes?: components["schemas"]["VariantAxisView"][]; }; BundlePricingView: { /** Format: double */ items_total: number; }; BundleSelectionArgs: { component_id: string; variant_id?: string | null; /** Format: int32 */ quantity?: number; }; /** @description Enriched bundle selections stored on line items. */ BundleSelectionData: { bundle_id: string; selections: components["schemas"]["BundleStoredSelection"][]; }; /** @description Raw bundle selection input from REST/storefront. */ BundleSelectionInput: { component_id: string; variant_id?: string | null; /** Format: int32 */ quantity?: number; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; }; BundleStoredSelection: { component_id: string; product_id: string; product_name: string; variant_id?: string | null; variant_name?: string | null; /** Format: int32 */ quantity: number; unit_price: string; product_type?: components["schemas"]["ProductType"]; scheduling?: null | components["schemas"]["ComponentSchedulingData"]; }; /** @description Bundle for any business type. */ BundleView: components["schemas"]["ProductBase"] & { product_id: string; schedules: components["schemas"]["ProductTimeProfile"][]; pricing_type: string; bundle_price?: string | null; discount_value?: string | null; components: components["schemas"]["BundleComponentView"][]; }; /** * @description Represents a Business in the system. * * Vertical/industry classification lives in the relational `industry_tags` * system (see [`super::industry_tag`]) — not on the Business row. Module * flags in `preferences.modules` are the source of truth for feature gating. */ Business: { id: string; name: string; handle: string; email: string; default_currency: string; default_country: string; default_timezone: string; default_phone?: string | null; default_address?: string | null; default_offers_table_service: boolean; default_accepts_online_orders: boolean; image?: string | null; status: string; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; subscription_id?: string | null; owner_id?: string | null; created_by: string; preferences: components["schemas"]["BusinessPreferences"]; is_online_only: boolean; enabled_payment_types: string[]; default_location_settings: Record; metadata?: Record | null; /** * Format: date-time * @description First time the merchant saw the post-signup welcome screen. None = never. * Set once by the welcome page; never reset. */ onboarded_at?: string | null; }; BusinessDetailsDTO: { name: string; logo_url?: string | null; contact_email?: string | null; contact_phone?: string | null; }; BusinessHoursView: { business_id: string; location_id?: string | null; /** Format: int32 */ day_of_week: number; open_time: string; close_time: string; is_closed: boolean; }; BusinessPreferences: { /** * @default { * "accounting": false, * "addons_modifiers": false, * "analytics": false, * "blogs": false, * "bundles": false, * "catalogs": false, * "collections": false, * "comms": false, * "composites": false, * "customers": true, * "delivery": false, * "discounts": false, * "entitlements": false, * "installments": false, * "inventory": true, * "invoices": false, * "kitchen_display": false, * "locations": false, * "loyalty": false, * "marketing": false, * "orders": true, * "payouts": false, * "pos": false, * "proposals": false, * "publishing": false, * "recipes_bom": false, * "reviews": false, * "scheduling": false, * "services": false, * "settings": true, * "staff": true, * "subscriptions": false, * "suppliers": true, * "support": false, * "tables": false, * "takings": false, * "tap": false, * "taxes": false, * "webmaker": false, * "wholesale": false * } */ modules: components["schemas"]["ModulePreferences"]; messaging?: components["schemas"]["MessagingPolicy"]; /** * @default { * "auto_pricing": { * "apply_automatically": false, * "default_markup_pct": null, * "rounding_increment": "0.01", * "suggest_on_cost_drop": false * }, * "tracking": { * "deduct_adhoc_costs": false, * "hold_windows": { * "channel_overrides": [] * }, * "inventory_required": false * } * } */ inventory: components["schemas"]["InventoryPreferences"]; /** * @default { * "fee_handling": { * "absorb_fees": false * }, * "payment_methods": { * "allow_bank_transfer_payments": false, * "allow_card_payments": false, * "allow_cash_payments": false, * "allow_mobile_money_payments": false, * "allow_mpesa_payments": false, * "allow_online_payments": false * }, * "pricing": { * "auto_pricing": false * } * } */ payment: components["schemas"]["PaymentPreferences"]; /** * @default { * "availability": { * "seasonal_adjustments": [], * "settings": { * "allow_same_day_booking": true, * "allow_weekend_booking": true, * "blackout_dates": [], * "buffer_time_minutes": 15, * "default_service_duration_minutes": 60, * "max_advance_booking_days": 90, * "min_advance_booking_hours": 2 * } * }, * "booking": { * "advance_booking_limit_days": 30, * "enabled": false, * "requires_approval": false * }, * "notifications": { * "follow_up_delay_hours": 24, * "notification_channels": [ * "email" * ], * "reminder_schedule": [ * 24, * 2 * ], * "send_confirmation": true, * "send_follow_up": false, * "send_reminders": true * }, * "policies": { * "cancellation": { * "allow_cancellation": true, * "cancellation_fee_amount": null, * "cancellation_fee_type": "None", * "notice_required_hours": 24, * "refund_policy": "FullRefund" * }, * "payment": { * "deposit_amount": null, * "deposit_type": "Fixed", * "late_payment_policy": "CancelBooking", * "payment_deadline_hours": 24, * "require_deposit": false, * "require_payment_upfront": false * } * } * } */ scheduling: components["schemas"]["SchedulingPreferences"]; /** * @default { * "allow_seller_arranged_delivery": true * } */ delivery: components["schemas"]["DeliveryPreferences"]; /** * @default { * "proactive_followups_enabled": true * } */ support: components["schemas"]["SupportPreferences"]; /** @default {} */ rapids: components["schemas"]["RapidPreferences"]; /** * Format: date-time * @description When these preferences were last updated */ updated_at?: string; /** * Format: int32 * @description Version for tracking preference changes * @default 1 */ version: number; /** @description Additional metadata for future extensibility */ metadata?: Record | null; /** * @description Which terminology preset was selected (e.g. "default", "retail", "property", "services") * @default null */ terminology_preset: string | null; /** * @description Per-business terminology overrides (only keys that differ from the preset) * @default null */ terminology: { [key: string]: string; } | null; }; BusinessSettingsView: { business_id: string; name: string; handle: string; default_currency: string; image?: string | null; email: string; default_phone?: string | null; address?: string | null; }; CalculateCompositeBody: { selections: components["schemas"]["ComponentSelectionInput"][]; location_id?: string | null; }; CalculateCompositePriceArgs: { composite_id: string; selections: components["schemas"]["ComponentSelectionInput"][]; location_id?: string | null; }; CancelOrderBody: { reason?: string | null; }; CancelSubscriptionBody: { reason?: string | null; }; /** @enum {string} */ CancellationFeeType: "None" | "Fixed" | "Percentage" | "Sliding"; /** @description Cancellation policy for a service */ CancellationPolicy: { /** * Format: int32 * @description Minutes before start for free cancellation on intraday services. */ cancellation_window_minutes: number; /** * Format: int32 * @description Optional grace period after the booking start before a no-show can be recorded. * `None` means immediate at the scheduled start time. */ no_show_deadline_minutes?: number | null; /** * Format: int32 * @description Days before check-in for free cancellation on multi-day services. */ cancellation_notice_days?: number | null; /** @description Fee charged for no-shows. */ no_show_fee: string; /** @description Percentage of refund if cancelled within the paid window (default 50%). */ partial_refund_percentage: string; /** * Format: int32 * @description Number of free reschedules allowed (default 2). */ max_free_reschedules: number; /** @description Fee charged for reschedules after the free limit. */ reschedule_fee: string; /** @description Optional fee when a multi-day stay is ended early. */ early_termination_fee?: string | null; /** @description Whether unused nights/days should be refunded when shortened or ended early. */ pro_rata_refund: boolean; }; CanonicalSourceAuthority: { store_region?: string | null; native_platform?: null | components["schemas"]["NativePurchasePlatform"]; /** @description Omitted for legacy/native evidence so historical digests stay exact. */ purchase_surface?: components["schemas"]["CheckoutPurchaseSurface"]; kind: components["schemas"]["CheckoutSourceKind"]; source_id: string; social_post_id?: string | null; /** Format: int32 */ social_tag_seq?: number | null; source_version: string; seller_business_id: string; subject: components["schemas"]["CheckoutSourceSubject"]; binding_digest: string; }; /** @description Details about a modifier group with its options */ CartAddOnGroupDetails: { id: string; name: string; is_multiple_allowed: boolean; /** Format: int32 */ min_selections: number; /** Format: int32 */ max_selections: number; required: boolean; options: components["schemas"]["CartAddOnOptionDetails"][]; }; /** @description Details about a modifier option with its name and price */ CartAddOnOptionDetails: { id: string; name: string; price?: string | null; is_required: boolean; description?: string | null; image_url?: string | null; }; CartBusiness: { name: string; logo_url?: string | null; contact_email?: string | null; contact_phone?: string | null; }; CartCustomer: { id?: string | null; name?: string | null; email?: string | null; phone?: string | null; address?: string | null; }; CartIntentCheckoutInput: { customer: components["schemas"]["CustomerInfo"]; order_type: components["schemas"]["OrderType"]; address_info: components["schemas"]["AddressInfo"]; location_id?: string | null; delivery_rate_id?: string | null; special_instructions?: string | null; link_address_id?: string | null; link_payment_method_id?: string | null; metadata?: unknown; pay_currency?: string | null; fx_quote_id?: string | null; use_store_credit?: boolean; voucher_code?: string | null; pay_deposit?: boolean; tender_preference?: null | components["schemas"]["PurchaseIntentTenderPreference"]; }; CartItemDetails: { id: string; cart_id: string; item_id: string; /** Format: int32 */ quantity: number; line_key: string; /** @description Type of line item: "simple", "service", "bundle", or "composite" */ line_type: string; name: string; description?: string | null; image_url?: string | null; category_id?: string | null; category_name?: string | null; is_available: boolean; variant_id?: string | null; variant_details?: null | components["schemas"]["VariantDetails"]; variant_name?: string | null; variant_info?: null | components["schemas"]["CartVariantDetailsDTO"]; base_price: string; add_ons_price: string; total_price: string; item_discount_amount: string; price_info: components["schemas"]["ChosenPrice"]; add_on_option_ids: string[]; add_on_ids: string[]; add_on_details: components["schemas"]["AddOnDetails"]; add_on_options: components["schemas"]["CartAddOnOptionDetails"][]; add_ons: components["schemas"]["CartAddOnGroupDetails"][]; special_instructions?: string | null; /** * Format: date-time * @description ISO 8601 datetime when service starts (services only) */ scheduled_start?: string | null; /** * Format: date-time * @description ISO 8601 datetime when service ends (services only) */ scheduled_end?: string | null; /** @description Booking confirmation code (services only) */ confirmation_code?: string | null; service_status?: null | components["schemas"]["ServiceStatus"]; /** @description Assigned staff member ID (services only) */ staff_id?: string | null; /** @description Assigned or selected primary resource ID (services only) */ resource_id?: string | null; /** * Format: int32 * @description Interchangeable whole units reserved (services only) */ units?: number | null; scheduling_metadata?: null | components["schemas"]["SchedulingMetadata"]; /** @description Customer's bundle component selections (bundles only) */ bundle_selections?: components["schemas"]["BundleSelectionInput"][] | null; bundle_resolved?: null | components["schemas"]["BundleSelectionData"]; /** @description Customer's composite component selections (composites only) */ composite_selections?: components["schemas"]["CompositeSelectionInput"][] | null; composite_resolved?: null | components["schemas"]["CompositeSelectionData"]; applied_discount_ids: string[]; discount_details?: null | components["schemas"]["DiscountDetails"]; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; metadata: Record; }; CartLocation: { id?: string | null; name?: string | null; }; CartMutationView: { cart: components["schemas"]["UICart"]; notice?: null | components["schemas"]["CartNotice"]; }; CartNotice: { kind: components["schemas"]["NoticeKind"]; text: string; }; CartPricingInfo: { subtotal: string; tax_amount: string; service_charge: string; total_discounts: string; total_price: string; tax_rate?: string | null; service_charge_rate?: string | null; currency: string; /** * @description Jurisdiction resolved by the checkout tax decision (for example, * `Austin, TX`). `None` means this cart has not received a destination * decision yet; clients must not infer it from the preview rate. */ tax_jurisdiction_label?: string | null; /** * @description Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the * portion already inside `subtotal`/`total_price`, not an addition. Checkout * labels it "included" rather than summing it onto the total. */ tax_inclusive: boolean; /** * @description Reviewed policy for presenting tax in customer-facing prices. This is * independent from whether the pricing arithmetic is tax-inclusive. */ price_display_mode?: components["schemas"]["TaxPriceDisplayMode"]; /** * @description Deposit due now when the cart has deposit-eligible service items, letting * checkout offer "pay deposit now, balance later". `0` when none applies. */ deposit_required: boolean; deposit_amount: string; }; /** @description Details about a variant with its name and price */ CartVariantDetailsDTO: { id: string; name: string; price: string; price_adjustment: string; is_default: boolean; }; CatalogueResponseView: components["schemas"]["CatalogueView"] | components["schemas"]["PaginatedCatalogueView"]; /** @description Unified catalogue view for all business types. */ CatalogueView: { categories: components["schemas"]["CategoryView"][]; products: components["schemas"]["ProductView"][]; add_ons: components["schemas"]["AddOnView"][]; /** * @description `true` when the response contains the full catalogue. * `false` when the response was truncated due to configured size caps. */ is_complete?: boolean; /** * Format: int64 * @description Total number of products available before truncation. */ total_available?: number | null; }; CategoryView: { id: string; name: string; slug: string; description?: string | null; metadata: Record; /** Format: int64 */ product_count?: number; }; /** @enum {string} */ Channel: "web" | "qr" | "desk" | "tap" | "chat" | "whatsapp" | "instagram" | "telegram" | "messenger" | "sms" | "email" | "social" | "agent"; /** @description Channel-specific policy configuration */ ChannelPolicy: { /** @description Channel identifier */ channel: string; /** @description Allowed event patterns for this channel (supports wildcards like "order.*") */ allowed_event_patterns: string[]; /** @description Restricted event patterns */ restricted_event_patterns: string[]; /** * Format: int32 * @description Maximum message length/size */ max_message_size?: number | null; rate_limit?: null | components["schemas"]["ChannelRateLimit"]; /** @description Content filtering rules */ content_filters: string[]; /** @description Compliance requirements */ compliance_requirements: string[]; /** @description Whether this channel requires approval */ requires_approval: boolean; /** @description Approval workflow for this channel */ approval_workflow_id?: string | null; /** * Format: int32 * @description Cost threshold for approval */ cost_approval_threshold?: number | null; }; /** @description Rate limiting configuration for channels */ ChannelRateLimit: { /** * Format: int32 * @description Maximum messages per time period */ max_messages: number; /** * Format: int32 * @description Time period in seconds */ period_seconds: number; /** @description Action to take when limit is exceeded */ overflow_action: components["schemas"]["OverflowAction"]; }; /** * @description Account-facing message projection. Merchant staff identity, the caller's * idempotency material and internal metadata stay on the business/audit * surface and never cross into the shopper API. */ ChatAccountMessageProjection: { id: string; thread_id: string; business_id: string; /** Format: int64 */ sequence: number; sender_side: components["schemas"]["ChatSenderSide"]; authorship: components["schemas"]["ChatAuthorship"]; agent_origin?: null | components["schemas"]["ChatAgentAttribution"]; content: string; content_type: components["schemas"]["ChatContentType"]; structured_content: Record; media: Record; reply_to_message_id?: string | null; /** Format: date-time */ source_occurred_at?: string | null; /** Format: date-time */ edited_at?: string | null; /** Format: date-time */ deleted_at?: string | null; /** Format: date-time */ created_at: string; }; /** * @description Server-derived service authorship, including the actual reviewed operator. * Editing or approving an answer never turns it into a human staff message. */ ChatAgentAttribution: { app_id: string; display_name: string; installation_id: string; activation_id: string; release_id: string; binding_id: string; service_principal_id: string; operator: components["schemas"]["AppOperator"]; /** Format: uuid */ invocation_id: string; /** Format: uuid */ result_id: string; authorship: components["schemas"]["AgentAuthorship"]; citations: components["schemas"]["ChatAgentCitation"][]; fact_observations?: components["schemas"]["AgentFactCitation"][]; }; ChatAgentCitation: { message_id: string; }; /** @enum {string} */ ChatAiMode: "auto" | "assist" | "off"; /** @enum {string} */ ChatAuthorship: "human" | "ai" | "automation" | "system"; /** @enum {string} */ ChatContentType: "text" | "rich" | "media"; /** @enum {string} */ ChatContextKind: "shop" | "product" | "post" | "order" | "live" | "support"; ChatConversationPeekResponse: { conversation?: null | components["schemas"]["ChatThreadProjection"]; messages: components["schemas"]["ChatAccountMessageProjection"][]; }; ChatConversationResponse: { conversation: components["schemas"]["ChatThreadProjection"]; messages: components["schemas"]["ChatAccountMessageProjection"][]; }; ChatHandoffResponse: { thread: components["schemas"]["ChatThreadProjection"]; /** Format: int64 */ cancelled_turns: number; /** Format: int64 */ spending_turns: number; }; ChatMessageResponse: { message: components["schemas"]["ChatAccountMessageProjection"]; replayed: boolean; }; /** @enum {string} */ ChatSenderSide: "account" | "business" | "system"; ChatThread: { id: string; account_id: string; business_id: string; kind: components["schemas"]["ChatThreadKind"]; ai_mode: components["schemas"]["ChatAiMode"]; /** Format: int64 */ ai_mode_version: number; /** Format: int64 */ message_count: number; last_message_id?: string | null; /** Format: date-time */ last_message_at?: string | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: date-time */ archived_at?: string | null; }; ChatThreadContextRef: { kind: components["schemas"]["ChatContextKind"]; ref_id: string; }; /** @enum {string} */ ChatThreadKind: "direct"; /** * @description API-safe thread shape with explicit typed participants. The persisted * account/business foreign keys remain present on `thread`; these personas * make the two parties unambiguous at the domain and wire boundaries. */ ChatThreadProjection: components["schemas"]["ChatThread"] & { account: components["schemas"]["Persona"]; business: components["schemas"]["Persona"]; account_profile?: null | components["schemas"]["PublicPersona"]; business_profile?: null | components["schemas"]["PublicPersona"]; /** * @description Sanitized text-only list preview. Structured message payloads and * deleted bodies never leak through this compact projection. */ last_message_preview?: string | null; last_message_authorship?: null | components["schemas"]["ChatAuthorship"]; /** @description Reader-relative state, populated on inbox list projections. */ unread?: boolean | null; latest_context?: null | components["schemas"]["ChatThreadContextRef"]; }; CheckoutApiResponse: { order_id: string; order_number: string; bill_token?: string | null; payment_id?: string | null; payment_reference?: string | null; payment_status: string; requires_authorization: boolean; authorization_type?: null | components["schemas"]["AuthorizationType"]; authorization_url?: string | null; display_text?: string | null; provider?: null | components["schemas"]["ProviderType"]; client_secret?: string | null; public_key?: string | null; next_action: components["schemas"]["NextAction"]; }; CheckoutComplianceDecision: { policy_name: string; /** Format: int32 */ policy_version: number; lane: components["schemas"]["CheckoutComplianceLane"]; reason_code: components["schemas"]["CheckoutComplianceReasonCode"]; evidence_digest: string; disposition?: components["schemas"]["PurchaseDisposition"]; purchase_policy?: null | components["schemas"]["PurchasePolicyContext"]; }; /** @enum {string} */ CheckoutComplianceLane: "commerce_core" | "native" | "store_kit" | "permitted_external" | "browse_only"; /** @enum {string} */ CheckoutComplianceReasonCode: "commerce_core" | "physical_goods_native" | "physical_world_commerce_native" | "store_kit_required" | "permitted_external_purchase" | "product_policy_unresolved" | "mixed_lane_unsupported" | "external_digital_native" | "mixed_facts_native" | "unresolved_facts_native"; CheckoutDepositView: { amount: string; balance_after_deposit: string; }; CheckoutDestinationInput: { address_id: string; delivery_rate_id?: string | null; }; CheckoutDestinationQuoteRequest: { order_type: components["schemas"]["OrderType"]; address_info: components["schemas"]["AddressInfo"]; delivery_rate_id?: string | null; }; CheckoutDestinationQuoteResponse: { subtotal: string; tax_amount: string; service_charge: string; total_discounts: string; delivery_fee: string; statutory_charge_total: string; statutory_charges: components["schemas"]["StatutoryChargeReceiptLine"][]; total: string; currency: string; tax_jurisdiction_label: string; tax_inclusive: boolean; /** @description Effective tax rate in percentage points (for example, `8.25`). */ tax_rate?: string | null; /** @description Reviewed consumer-facing price presentation policy for this quote. */ price_display_mode: components["schemas"]["TaxPriceDisplayMode"]; delivery_fee_details?: null | components["schemas"]["DeliveryFeeDetails"]; address_info: components["schemas"]["AddressInfo"]; }; /** * @description How taxes are displayed at checkout * @enum {string} */ CheckoutDisplayMode: "clean" | "itemized" | "both"; CheckoutFormData: { cart_id: string; customer: components["schemas"]["CustomerInfo"]; order_type: components["schemas"]["OrderType"]; address_info: components["schemas"]["AddressInfo"]; /** * @description Named delivery rate the customer selected. Trusted as a choice only — * the fee is always recomputed server-side. None = the default option. */ delivery_rate_id?: string | null; payment_method: string; mobile_money_details?: null | components["schemas"]["MobileMoneyDetails"]; special_instructions?: string | null; /** @description Optional: ID of saved Cimplify Link address used for this checkout */ link_address_id?: string | null; /** @description Optional: ID of saved Cimplify Link payment method (mobile money) used for this checkout */ link_payment_method_id?: string | null; /** @description Client-provided idempotency key to prevent duplicate payments */ idempotency_key?: string | null; /** @description Account ID if user is logged in (from JWT). Links customer record to unified identity. */ account_id?: string | null; /** @description Optional metadata passed through to the payment provider (e.g. success_url, cancel_url) */ metadata?: Record | null; /** @description Currency the customer wants to pay in. If omitted, uses cart currency. */ pay_currency?: string | null; /** @description Pre-locked FX quote ID to honor a specific exchange rate. */ fx_quote_id?: string | null; /** * @description Pay only the required deposit now (balance collected later) instead of the * full total. Honored only for the first collection on a deposit-eligible * order; later attempts collect the authoritative remaining balance. */ pay_deposit?: boolean; /** * @description Apply the customer's available store credit (capped at the amount owed) * as a fee-exempt tender before charging the rail. */ use_store_credit?: boolean; /** * @description Store-credit voucher / gift code to claim into the wallet and apply to this * order (claiming credits the balance; the credit is then spent like any * balance). Implies applying store credit. */ voucher_code?: string | null; /** @description Storefront analytics session; always overwritten server-side at the edge. */ session_token?: string | null; }; /** @enum {string} */ CheckoutInvalidationReason: "source_unavailable" | "offer_ended" | "offer_changed" | "sellable_unavailable" | "compliance_changed" | "payment_option_changed"; CheckoutMaterialTerms: { line_digest: string; destination_digest: string; delivery_promise_digest: string; entitlement_digest: string; cancellation_terms_digest: string; }; /** @enum {string} */ CheckoutMaterialTermsComponent: "lines" | "destination" | "delivery_promise" | "entitlement" | "cancellation_terms" | "compliance" | "currency"; /** * @description Canonical network vocabulary emitted in immutable payment options. * Buyer inputs may use reviewed aliases, but aliases never cross this * response/storage boundary. * @enum {string} */ CheckoutMobileMoneyNetwork: "mtn" | "telecel" | "airtel"; CheckoutMoneyComponents: { currency: string; subtotal: string; discount_total: string; tax_total: string; delivery_total: string; statutory_total: string; total_obligation: string; due_now: string; rail_amount: string; store_credit_consumed: string; voucher_credit_consumed: string; }; /** @enum {string} */ CheckoutOfferKind: "catalogue" | "sale" | "rapid"; /** @enum {string} */ CheckoutPaymentMethodKind: "card" | "mobile_money" | "offline"; /** @enum {string} */ CheckoutProtectionStatus: "protected" | "unavailable"; /** * @description Buyer-safe protection projection. Monetary ceilings, personalised * headroom, risk features and claim probabilities never cross this boundary. */ CheckoutProtectionView: { status: components["schemas"]["CheckoutProtectionStatus"]; message: string; public_policy_version?: string | null; }; /** * @description Server-owned purchase door, not a merchant fact or caller-selected * platform exemption. Legacy intents retain the conservative native rule. * @enum {string} */ CheckoutPurchaseSurface: "native_app" | "web"; CheckoutSessionBusiness: { name: string; logo_url?: string | null; }; CheckoutSessionCart: { items: components["schemas"]["CheckoutSessionCartItem"][]; subtotal: string; tax_amount: string; total: string; currency: string; tax_jurisdiction_label?: string | null; tax_inclusive: boolean; /** @description Effective tax rate in percentage points (for example, `8.25`). */ tax_rate?: string | null; /** @description Reviewed consumer-facing price presentation policy for these totals. */ price_display_mode: components["schemas"]["TaxPriceDisplayMode"]; }; CheckoutSessionCartItem: { product_id: string; name?: string | null; /** Format: int32 */ quantity: number; unit_price: string; total: string; }; /** @enum {string} */ CheckoutSourceKind: "product" | "collection" | "sale" | "post" | "live" | "cart" | "chat" | "manual"; CheckoutSourceSubject: { account_id: string; /** @enum {string} */ kind: "account"; } | { business_id: string; /** @enum {string} */ kind: "business"; }; /** @enum {string} */ CheckoutTermsComponent: "subtotal" | "discount_total" | "tax_total" | "delivery_total" | "statutory_total" | "total_obligation" | "due_now" | "rail_amount" | "store_credit_consumed" | "voucher_credit_consumed"; CheckoutTermsDelta: { component: components["schemas"]["CheckoutTermsComponent"]; accepted: string; replacement: string; /** @enum {string} */ kind: "money"; } | { component: components["schemas"]["CheckoutMaterialTermsComponent"]; /** @enum {string} */ kind: "material"; } | { accepted_option_id?: string | null; accepted_customer_debit_amount: string; replacement_option_id?: string | null; replacement_customer_debit_amount?: string | null; /** @enum {string} */ kind: "payment_option"; }; CheckoutTermsView: { id: string; /** Format: int64 */ intent_revision: number; /** * Format: int64 * @description Version within this material `intent_revision`. Material updates start * a new revision at terms version 1; money-only refreshes append 2, 3, … * without changing the material revision. */ terms_version: number; terms_digest: string; money: components["schemas"]["CheckoutMoneyComponents"]; material: components["schemas"]["CheckoutMaterialTerms"]; compliance: components["schemas"]["CheckoutComplianceDecision"]; protection?: null | components["schemas"]["CheckoutProtectionView"]; deposit?: null | components["schemas"]["CheckoutDepositView"]; payment_options: components["schemas"]["PaymentOptionView"][]; /** Format: date-time */ valid_until: string; /** Format: date-time */ created_at: string; }; /** @description Pricing information for an item after adjustments and tax preview. */ ChosenPrice: { base_price: string; final_price: string; markup_percentage: string; markup_amount: string; markup_discount_percentage: string; markup_discount_amount: string; currency?: string | null; custom_fields?: Record | null; decision_path?: null | components["schemas"]["PriceDecisionPath"]; tax_info?: null | components["schemas"]["PricePathTaxInfo"]; pre_tax_price?: string | null; }; ClaimConversationBody: { access_token: string; }; ClaimConversationResponse: { session_token: string; customer: components["schemas"]["ClaimedCustomer"]; cart?: null | components["schemas"]["UICart"]; thread: components["schemas"]["ChatThreadProjection"]; customer_name: string; external_claims: components["schemas"]["ClaimedExternalChat"][]; external_claims_unavailable: boolean; }; ClaimSessionBody: { access_token: string; }; ClaimSessionResponse: { session_token: string; customer: components["schemas"]["ClaimedCustomer"]; cart?: null | components["schemas"]["UICart"]; }; ClaimedCustomer: { id: string; name: string; email?: string | null; phone?: string | null; }; ClaimedExternalChat: { status: components["schemas"]["ExternalClaimDisposition"]; thread_id?: string | null; /** Format: int64 */ imported_message_count?: number | null; replayed: boolean; /** Format: int64 */ observed_message_count?: number | null; /** Format: int64 */ maximum_message_count?: number | null; }; CollectionDetailView: { collection: components["schemas"]["CollectionView"]; products: components["schemas"]["ProductView"][]; total_count: number; categories?: components["schemas"]["CategoryView"][] | null; add_ons?: components["schemas"]["AddOnView"][] | null; }; /** @description Collection view with required slug. */ CollectionView: { id: string; business_id: string; name: string; slug: string; description?: string | null; image_url?: string | null; tags?: string[] | null; metadata: Record; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: int64 */ product_count?: number; }; /** @description A group of selectable components (e.g., "Base Spirit", "Mixers", "Garnish") */ ComponentGroup: { id: string; composite_id: string; name: string; description?: string | null; /** Format: int32 */ display_order: number; /** * Format: int32 * @description Must pick at least N (0 = optional group) */ min_selections: number; /** * Format: int32 * @description Max N selections (None = unlimited) */ max_selections?: number | null; /** @description Can select same component multiple times? */ allow_quantity: boolean; /** * Format: int32 * @description Max qty per individual component (e.g., max 3 shots) */ max_quantity_per_component?: number | null; /** @description How selections in this group are priced */ pricing_behavior: components["schemas"]["GroupPricingBehavior"]; /** @description JSON config for complex pricing (e.g., free_count for FirstNFree) */ pricing_behavior_config: Record; /** @description Icon identifier for UI */ icon?: string | null; /** @description Color hex for UI */ color?: string | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; ComponentGroupResponse: components["schemas"]["ComponentGroup"] & { components: components["schemas"]["CompositeComponent"][]; }; /** @description Location-specific component price override */ ComponentPriceOverride: { price: string; price_per_additional?: string | null; }; ComponentSchedulingData: { /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; service_status: components["schemas"]["ServiceStatus"]; confirmation_code?: string | null; booking_id?: string | null; primary_resource_id?: string | null; }; ComponentSelection: { group_id: string; group_name: string; component_id: string; component_name: string; /** Format: int32 */ quantity: number; /** @description Source type for traceability */ source_type: components["schemas"]["ComponentSourceType"]; /** @description Source references (based on source_type) */ product_id?: string | null; variant_id?: string | null; stock_id?: string | null; add_on_id?: string | null; add_on_option_id?: string | null; /** @description Pricing */ unit_price: string; total_price: string; /** @description Inventory (None for AddOn/Standalone unless AddOn has option_sku) */ quantity_per_unit?: string | null; waste_percentage?: string | null; }; ComponentSelectionInput: { component_id: string; /** Format: int32 */ quantity: number; variant_id?: string | null; add_on_option_id?: string | null; }; /** * @description Component source type (derived from which reference fields are set) * @enum {string} */ ComponentSourceType: "product" | "stock" | "add_on" | "standalone"; /** * @description A build-your-own product template with component groups. * Links to a Product with product_type = Composite (same pattern as Bundle). */ Composite: { id: string; business_id: string; product_id: string; /** @description Starting price before component selections (e.g., $5 for glass/plate) */ base_price: string; /** @description How component prices are calculated */ pricing_mode: components["schemas"]["CompositePricingMode"]; /** * Format: int32 * @description Minimum order quantity (e.g., "At least 2 custom pizzas") */ min_order_quantity?: number | null; /** * Format: int32 * @description Maximum order quantity per transaction */ max_order_quantity?: number | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; metadata: Record; }; /** @description Four source types: Product, Stock, AddOn, or Standalone. */ CompositeComponent: { id: string; group_id: string; /** @description Path 1: Product reference (catalogue item also sold separately) */ product_id?: string | null; /** @description Specific variant (optional - if None and product has variants, user chooses) */ variant_id?: string | null; /** @description Path 2: Stock reference (raw material not sold to customers) */ stock_id?: string | null; /** @description Path 3: AddOn reference (reuse existing add-on group) */ add_on_id?: string | null; /** @description Specific option (optional - if None, user chooses from group) */ add_on_option_id?: string | null; /** @description Required for Stock/Standalone, optional override for Product/AddOn */ display_name?: string | null; display_description?: string | null; display_image_url?: string | null; /** @description Price in composite context (may differ from catalogue price) */ price: string; /** @description Price for quantity > 1 (if different from first) */ price_per_additional?: string | null; /** @description How much of the source item is consumed per selection */ quantity_per_selection?: string | null; /** @description Waste factor percentage (e.g., 2% for spillage) */ waste_percentage?: string | null; /** Format: int32 */ calories?: number | null; allergens?: string[] | null; /** Format: int32 */ display_order: number; /** @description Highlight as popular in UI */ is_popular: boolean; /** @description Premium indicator in UI */ is_premium: boolean; is_available: boolean; is_archived: boolean; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; CompositeComponentView: { id: string; display_name?: string | null; display_description?: string | null; display_image_url?: string | null; price: string; price_per_additional?: string | null; /** Format: int32 */ calories?: number | null; /** Format: int32 */ display_order: number; is_popular: boolean; is_premium: boolean; is_available: boolean; is_archived: boolean; }; CompositeDetailsResponse: components["schemas"]["Composite"] & { product: components["schemas"]["Product"]; groups: components["schemas"]["ComponentGroupResponse"][]; price_tiers?: components["schemas"]["CompositePriceTier"][] | null; location_prices?: { [key: string]: string; } | null; location_component_prices?: { [key: string]: components["schemas"]["ComponentPriceOverride"]; } | null; }; CompositeGroupView: { id: string; name: string; description?: string | null; /** Format: int32 */ min_selections: number; /** Format: int32 */ max_selections: number; allow_quantity: boolean; /** Format: int32 */ max_quantity_per_component?: number | null; pricing_behavior: components["schemas"]["GroupPricingBehavior"]; pricing_behavior_config: Record; /** Format: int32 */ display_order: number; components?: components["schemas"]["CompositeComponentView"][]; }; /** @description Price breakdown for a composed item */ CompositePriceBreakdown: { base_price: string; components_total: string; group_breakdowns: components["schemas"]["GroupPriceBreakdown"][]; tier_applied?: string | null; final_price: string; }; CompositePriceCalculationView: { breakdown: components["schemas"]["CompositePriceBreakdown"]; validation: components["schemas"]["CompositeValidationResult"]; selections: components["schemas"]["ComponentSelection"][]; is_valid: boolean; }; /** @description Pricing tier for tiered pricing mode */ CompositePriceTier: { id: string; composite_id: string; /** * Format: int32 * @description From N selections (inclusive) */ min_selections: number; /** * Format: int32 * @description Up to M selections (None = unlimited) */ max_selections?: number | null; /** @description Fixed price for this tier */ price: string; /** Format: date-time */ created_at: string; }; /** * @description How the final price is calculated from component selections * @enum {string} */ CompositePricingMode: "additive" | "highest_per_group" | "highest_overall" | "tiered"; /** @description Composite product view for `ProductType::Composite`. */ CompositeProductView: components["schemas"]["ProductBase"] & { composite_id: string; pricing_mode: components["schemas"]["CompositePricingMode"]; groups?: components["schemas"]["CompositeGroupView"][]; }; CompositeSelectionArgs: { component_id: string; /** Format: int32 */ quantity?: number; variant_id?: string | null; add_on_option_id?: string | null; }; /** @description Enriched composite selections stored on line items after pricing. */ CompositeSelectionData: { composite_id: string; selections: components["schemas"]["CompositeStoredSelection"][]; breakdown: components["schemas"]["OrderCompositePriceBreakdown"]; }; /** @description Raw composite selection input from REST/storefront. */ CompositeSelectionInput: { component_id: string; /** Format: int32 */ quantity: number; variant_id?: string | null; add_on_option_id?: string | null; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; }; CompositeStoredSelection: { component_id: string; component_name: string; /** Format: int32 */ quantity: number; group_id: string; source_type: components["schemas"]["ComponentSourceType"]; source_product_id?: string | null; source_stock_id?: string | null; unit_price: string; product_type?: components["schemas"]["ProductType"]; scheduling?: null | components["schemas"]["ComponentSchedulingData"]; }; /** @description Validation result for a composed item */ CompositeValidationResult: { is_valid: boolean; group_validations: components["schemas"]["GroupValidation"][]; }; ConfirmPurchaseIntentRequest: { /** Format: int64 */ accepted_intent_revision: number; /** Format: int64 */ accepted_terms_version: number; accepted_due_now: string; /** * @description Exact debit displayed by the selected immutable payment option. The * server derives the commerce principal from that locked option; clients * cannot substitute a principal or provider amount. */ accepted_customer_debit_amount: string; currency: string; /** * @description The server-issued tender capability accepted by the buyer. A true * zero-rail order has no payment option, so absence is meaningful rather * than a fabricated sentinel ID. */ payment_option_id?: string | null; /** * @description Opaque server-issued native-app attestation receipt. It is excluded * from the commercial request digest because the receipt is itself bound * to that digest and may be replaced after an attestation retry. */ attestation_receipt_id?: string | null; idempotency_key: string; }; ConfirmPurchaseIntentResponse: { intent_id: string; attempt_id: string; order_id: string; /** @enum {string} */ status: "order_created"; } | { intent_id: string; attempt_id: string; order_id: string; /** @enum {string} */ status: "collection_processing"; } | { intent_id: string; attempt_id: string; order_id: string; /** @enum {string} */ status: "payment_outcome_unknown"; } | { intent_id: string; attempt_id: string; order_id: string; /** @enum {string} */ status: "payment_failed"; } | { intent_id: string; attempt_id: string; order_id: string; authorization_url: string; /** @enum {string} */ status: "redirect_required"; } | { intent_id: string; attempt_id: string; order_id: string; provider: components["schemas"]["PaymentProviderKind"]; client_secret: string; public_key: string; provider_account_id?: string | null; /** @enum {string} */ status: "card_popup_required"; } | { intent_id: string; attempt_id: string; order_id: string; authorization_type: components["schemas"]["AuthorizationType"]; display_text?: string | null; /** @enum {string} */ status: "authorization_required"; } | { intent_id: string; replacement: components["schemas"]["CheckoutTermsView"]; deltas: components["schemas"]["CheckoutTermsDelta"][]; /** @enum {string} */ status: "terms_changed"; } | { intent_id: string; lines: components["schemas"]["UnavailableLine"][]; /** @enum {string} */ status: "selection_unavailable"; } | { intent_id: string; /** @enum {string} */ status: "offer_ended"; } | { intent_id: string; reason: components["schemas"]["SourceRefusal"]; /** @enum {string} */ status: "source_unavailable"; }; ConfirmUploadBody: { upload_id: string; }; ConfirmUploadData: { id: string; url: string; filename: string; content_type: string; /** Format: int64 */ size_bytes: number; }; /** * @description Consent requirements for different communication types * @enum {string} */ ConsentRequirement: "None" | "ImpliedConsent" | "ExplicitOptIn" | "DoubleOptIn"; /** * @description Customer consent status * @enum {string} */ ConsentStatus: "NotGiven" | "Given" | "Withdrawn" | "Expired"; /** @description Content filtering rules */ ContentFilter: { /** @description Filter identifier */ id: string; /** @description Filter name */ name: string; /** @description Filter type */ filter_type: components["schemas"]["ContentFilterType"]; /** @description Channels this filter applies to */ channels: string[]; /** @description Action to take when filter matches */ action: components["schemas"]["ContentFilterAction"]; /** @description Whether this filter is enabled */ enabled: boolean; }; /** @description Actions to take when content filter matches */ ContentFilterAction: "Block" | "FlagForReview" | { /** @description Replace filtered content */ Replace: string; } | "RequireApproval" | "LogAndContinue"; /** @description Types of content filtering */ ContentFilterType: "Profanity" | "Pii" | "SensitiveData" | "Spam" | { /** @description Custom regex pattern */ CustomRegex: string; } | { /** @description Machine learning classifier */ MLClassifier: string; }; CoordinatesPair: { /** Format: double */ lat: number; /** Format: double */ lng: number; }; CreateQuoteArgs: { product_id: string; variant_id?: string | null; location_id?: string | null; /** Format: int32 */ quantity?: number | null; add_on_option_ids?: string[] | null; bundle_selections?: components["schemas"]["BundleSelectionInput"][] | null; composite_selections?: components["schemas"]["ComponentSelectionInput"][] | null; }; /** @description Cross-business messaging rules for multi-tenant scenarios */ CrossBusinessRules: { /** @description Whether cross-business messaging is enabled */ enabled: boolean; /** @description Allowed cross-business communication types */ allowed_types: string[]; /** @description Trusted business partners */ trusted_partners: string[]; /** @description Approval required for cross-business messages */ approval_required: boolean; /** @description Channels allowed for cross-business communication */ approved_channels: string[]; }; CursorMetadata: { next_cursor?: string | null; has_more: boolean; /** Format: int32 */ count: number; }; Customer: { id: string; email?: string | null; phone?: string | null; name: string; delivery_address?: string | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; metadata?: Record | null; account_id?: string | null; }; CustomerBookingServiceItemView: { service_id: string; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; confirmation_code?: string | null; status?: string | null; }; CustomerBookingView: { order_id: string; service_items: components["schemas"]["CustomerBookingServiceItemView"][]; status: string; /** Format: date-time */ created_at: string; total_price: string; }; /** @description Customer communication rules */ CustomerCommunicationRules: { /** @description Whether customer communications are enabled */ enabled: boolean; /** @description Allowed communication types with customers */ allowed_types: string[]; /** @description Channels approved for customer communication */ approved_channels: string[]; /** @description Marketing communication preferences */ marketing_rules: components["schemas"]["MarketingRules"]; /** @description Transactional communication settings */ transactional_rules: components["schemas"]["TransactionalRules"]; /** @description Customer consent management */ consent_management: components["schemas"]["CustomerConsentManagement"]; }; /** @description Customer consent management */ CustomerConsentManagement: { /** @description Whether consent tracking is enabled */ enabled: boolean; /** @description Required consents for different communication types */ required_consents: { [key: string]: components["schemas"]["ConsentRequirement"]; }; /** @description Default consent status for new customers */ default_consent: components["schemas"]["ConsentStatus"]; /** * Format: int32 * @description Consent retention period (days) */ retention_days: number; }; CustomerInfo: { name: string; email: string; phone: string; notes?: string | null; save_details: boolean; }; CustomerInfoDTO: { id?: string | null; name?: string | null; email?: string | null; phone?: string | null; notes?: string[] | null; delivery_address?: string | null; delivery_required: boolean; will_pick_up: boolean; /** Format: date-time */ pickup_time?: string | null; }; CustomerInputEntry: { field_id: string; value: unknown; }; /** * @description Non-confidential evidence that a quote priced a customer-input field. * * The raw value may contain personal or operational data and must not be * copied into the quote cache. Pricing depends only on the field identity, * whether the value is present, and the authoritative fixed adjustment. */ CustomerInputPricingBinding: { field_id: string; present: boolean; unit_price_adjustment: string; }; CustomerInputValue: { field_id: string; field_name: string; field_type: string; value: Record; semantic_kind?: null | components["schemas"]["SemanticKind"]; /** * @description Authoritative per-unit adjustment captured from the field definition * when this value was validated. Callers must still re-resolve it from * the catalogue before changing frozen money; the snapshot makes the * selected pricing contract typed and hashable in between resolutions. */ price_adjustment?: string | null; }; CustomerServicePreferences: { preferred_staff_ids: string[]; avoid_staff_ids: string[]; room_type?: string | null; accessibility_needs: string[]; temperature_preference?: string | null; music_preference?: string | null; special_requests?: string | null; previous_service_history: string[]; }; /** @description Do Not Disturb period for users */ DNDPeriod: { /** @description Period identifier */ id: string; /** @description Period name */ name: string; /** @description Start time */ start_time: string; /** @description End time */ end_time: string; /** @description Days this period applies to */ days: string[]; /** @description Channels affected by DND */ affected_channels: string[]; /** @description Whether to allow emergency messages during DND */ allow_emergency: boolean; /** @description Whether this period is active */ enabled: boolean; }; DealView: { id: string; description: string; benefit_type: components["schemas"]["BenefitType"]; value: string; min_order_value?: string | null; /** Format: int32 */ buy_quantity?: number | null; /** Format: int32 */ get_quantity?: number | null; stackable: boolean; /** Format: date-time */ starts_at: string; /** Format: date-time */ ends_at: string; product_ids: string[]; category_ids: string[]; collection_ids: string[]; }; /** * @description Audit trail for a delivery fee calculation. * Captures the full decision context at the time of pricing so the fee * can be explained months later even if zones, rates, or providers change. */ DeliveryFeeDetails: { zone_id?: string | null; zone_name?: string | null; provider: string; provider_resolved_from: components["schemas"]["ProviderResolutionSource"]; fee_status?: components["schemas"]["DeliveryFeeStatus"]; /** * @description Named rate this fee was priced under, if any. `calculated_fee` is the * rate price before `free_over`; the charged fee lives on the order. */ rate_id?: string | null; rate_name?: string | null; /** * Format: int32 * @description Merchant-authored delivery promise frozen with the quote. Both bounds * must be present and positive before Buyer Protection may rely on them. */ eta_min_minutes?: number | null; /** Format: int32 */ eta_max_minutes?: number | null; transport_mode?: components["schemas"]["DeliveryTransportMode"]; distance_km?: string | null; base_fee?: string | null; per_km_fee?: string | null; surge_multiplier?: string | null; calculated_fee: string; currency: string; free_delivery_applied: boolean; pickup_coordinates?: null | components["schemas"]["CoordinatesPair"]; dropoff_coordinates?: null | components["schemas"]["CoordinatesPair"]; /** Format: date-time */ calculated_at: string; }; DeliveryFeeResponse: { serviceable: boolean; fee?: string | null; currency?: string | null; details?: null | components["schemas"]["DeliveryFeeDetails"]; }; /** * @description Whether delivery is priced on-platform or arranged directly between the * seller and customer. `Arranged` deliberately contributes zero to checkout, * tax, and payment totals; it must never be rendered as free delivery. * @enum {string} */ DeliveryFeeStatus: "priced" | "arranged"; /** * @description One entry on the customer-facing delivery menu. Zone-backed rates are * priced for a concrete dropoff; all-zone flat rates can be priced from the * order value alone. `rate_id = None` is the synthesized fallback for * businesses with no named rates configured. */ DeliveryOption: { rate_id?: string | null; name: string; description?: string | null; fee: string; fee_status: components["schemas"]["DeliveryFeeStatus"]; currency: string; free_delivery_applied: boolean; free_over_amount?: string | null; /** Format: int32 */ eta_min_minutes?: number | null; /** Format: int32 */ eta_max_minutes?: number | null; is_default: boolean; details: components["schemas"]["DeliveryFeeDetails"]; }; DeliveryOptionsResponse: { serviceable: boolean; options: components["schemas"]["DeliveryOption"][]; message?: string | null; }; /** * @description Delivery behavior that is safe to evaluate during checkout without * loading the complete business preferences document. */ DeliveryPreferences: { /** * @description When no rates or zones are configured, offer goods-only checkout and let * the seller arrange delivery directly with the customer. */ allow_seller_arranged_delivery?: boolean; }; /** * @description Fulfillment evidence used by document-level statutory charges. `Unknown` * is deliberately distinct from `NonMotorized`: compliance code must never * infer a motor-vehicle delivery from the existence of a delivery fee. * @enum {string} */ DeliveryTransportMode: "unknown" | "motor_vehicle" | "non_motorized"; /** @description Department-specific messaging rules */ DepartmentMessagingRules: { /** @description Department identifier */ department: string; /** @description Events relevant to this department */ relevant_events: string[]; /** @description Department head or primary contact */ primary_contact?: string | null; /** @description Secondary contacts for escalation */ secondary_contacts: string[]; /** @description Inter-department message routing */ cross_department_routing: { [key: string]: string[]; }; working_hours?: null | components["schemas"]["WorkingHours"]; }; /** * @description How a service requires deposit from the customer. * @enum {string} */ DepositType: "none" | "fixed" | "percentage"; /** @enum {string} */ DigitalProductType: "download" | "license_key" | "ticket" | "access_grant" | "redemption_code"; /** @description Digital product view for `ProductType::Digital`. */ DigitalProductView: (components["schemas"]["DownloadView"] & { /** @enum {string} */ digital_type: "download"; }) | (components["schemas"]["LicenseView"] & { /** @enum {string} */ digital_type: "license"; }) | (components["schemas"]["EventTicketView"] & { /** @enum {string} */ digital_type: "event_ticket"; }) | (components["schemas"]["AccessPassView"] & { /** @enum {string} */ digital_type: "access_pass"; }) | (components["schemas"]["GiftCodeView"] & { /** @enum {string} */ digital_type: "gift_code"; }); DiscountBreakdown: { item_discounts: { [key: string]: components["schemas"]["AppliedDiscount"][]; }; order_discounts: components["schemas"]["AppliedDiscount"][]; }; DiscountDetails: { discounts: components["schemas"]["AppliedDiscount"][]; total_discount_amount: string; breakdown: components["schemas"]["DiscountBreakdown"]; }; DiscountInfoDTO: { discount_code?: string | null; applied_discount_ids: string[]; applied_discount_codes: string[]; discount_details: components["schemas"]["DiscountDetails"]; discount_notices?: components["schemas"]["DiscountNotice"][]; }; DiscountNotice: { discount_id: string; discount_code?: string | null; reason: components["schemas"]["DiscountSkipReason"]; }; DiscountSkipReason: "not_found" | "other_business" | "code_mismatch" | "code_evidence_missing" | "disabled" | "inactive" | "not_started" | "expired" | "location_excluded" | { below_minimum_order: { minimum: string; }; } | "requires_customer" | "group_excluded" | { insufficient_loyalty_points: { period: components["schemas"]["LoyaltyPointsPeriod"]; required: string; }; } | "redemption_limit_reached" | "total_discount_cap_reached" | { customer_limit_reached: { /** Format: int64 */ used: number; /** Format: int64 */ max: number; }; } | "no_targeted_items" | "zero_amount" | { not_stackable: { blocked_by: string; }; } | "manual_discount_not_permitted" | "sale_no_longer_applies"; DiscountValidationView: { is_eligible: boolean; discount_amount?: string | null; deal?: null | components["schemas"]["DealView"]; ineligibility_reason?: string | null; }; DismissMessageResponse: { dismissed: string; messages: Record[]; }; /** @enum {string} */ DisplayMode: "card" | "page"; DownloadView: components["schemas"]["ProductBase"] & { download_url?: string | null; /** Format: int32 */ max_downloads?: number | null; /** Format: int32 */ file_size_mb?: number | null; file_hash?: string | null; file_type?: string | null; version?: string | null; /** Format: int32 */ download_expires_days?: number | null; }; /** @enum {string} */ DunningStatus: "pending" | "awaiting_payment" | "action_required" | "succeeded" | "exhausted" | "cancelled"; /** * @description Unit of measurement for service/rental durations. * Stored alongside the numeric `duration_value` field which holds the raw * authored value in whichever unit is specified. * @enum {string} */ DurationUnit: "minutes" | "hours" | "days" | "nights" | "weeks" | "months" | "years"; DynamicBuckets: { intent?: string | null; demand?: string | null; inventory?: string | null; competition?: string | null; }; /** @description Emergency contact information */ EmergencyContact: { /** @description Contact identifier */ id: string; /** @description Contact name */ name: string; /** @description Contact role */ role: string; /** @description Contact information per channel */ contacts: { [key: string]: string; }; /** * Format: int32 * @description Priority within the level */ priority: number; /** @description Whether this contact is currently available */ available: boolean; availability_schedule?: null | components["schemas"]["AvailabilitySchedule"]; }; /** @description Emergency contact hierarchy */ EmergencyContactHierarchy: { /** @description Business identifier */ business_id: string; /** @description Primary emergency contacts */ primary_contacts: components["schemas"]["EmergencyContact"][]; /** @description Secondary emergency contacts */ secondary_contacts: components["schemas"]["EmergencyContact"][]; /** * Format: int32 * @description Escalation delay between levels (seconds) */ escalation_delay_seconds: number; /** @description Whether to contact all levels simultaneously for emergencies */ contact_all_levels: boolean; }; EnrichedOrder: { id: string; user_friendly_id: string; business_id: string; order_type: string; origin: components["schemas"]["Origin"]; status: components["schemas"]["OrderStatus"]; lifecycle_phase: components["schemas"]["LifecyclePhase"]; /** * Format: int32 * @description Optimistic-concurrency version; amendment preview/apply fence on it exactly. */ version: number; /** * Format: int64 * @description Commercial (money) revision; amendment preview/apply fence on it exactly. */ commercial_revision: number; /** * @description Forward status transitions the backend accepts from `status`. * Cancellation is not a transition; see `available_dispositions`. */ available_transitions?: components["schemas"]["OrderStatus"][]; /** * @description Order-level actions the backend accepts right now. Derived from status * and line states so clients never re-derive the state machine. */ available_dispositions?: components["schemas"]["OrderDisposition"][]; bill_token?: string | null; tracking_token?: string | null; tracking_link?: string | null; business_details?: null | components["schemas"]["BusinessDetailsDTO"]; customer: components["schemas"]["CustomerInfoDTO"]; location: components["schemas"]["LocationInfoDTO"]; payment: components["schemas"]["PaymentInfoDTO"]; items: components["schemas"]["OrderItemDetails"][]; pricing: components["schemas"]["OrderPricingView"]; timestamps: components["schemas"]["OrderTimestampsDTO"]; staff: components["schemas"]["StaffInfoDTO"]; discounts: components["schemas"]["DiscountInfoDTO"]; group_order_info?: null | components["schemas"]["GroupOrderInfoDTO"]; approval_status?: string | null; price_list_id?: string | null; payment_terms_id?: string | null; metadata?: Record | null; fulfillment_rollup?: null | components["schemas"]["OrderFulfillmentSummary"]; }; /** @description Escalation rule for specific events */ EventEscalationRule: { /** @description Condition that triggers escalation */ trigger: components["schemas"]["MessagingEscalationTrigger"]; /** @description Who to escalate to */ escalate_to: string[]; /** * Format: int32 * @description Delay before escalation (seconds) */ delay_seconds: number; /** @description Channels to use for escalation */ escalation_channels: string[]; }; /** @description Event-specific routing rules */ EventRoutingRules: { /** @description Event type this rule applies to */ event_type: string; /** @description Custom recipient list for this event */ custom_recipients: string[]; /** @description Roles that should receive this event */ target_roles: string[]; /** @description Departments that should receive this event */ target_departments: string[]; /** @description Locations that should receive this event */ target_locations: string[]; /** @description Escalation rules for this event type */ escalation_rules: components["schemas"]["EventEscalationRule"][]; /** @description Whether to require acknowledgment */ require_acknowledgment: boolean; /** * Format: int32 * @description Timeout for acknowledgment (seconds) */ acknowledgment_timeout_seconds?: number | null; }; EventTicketView: components["schemas"]["ProductBase"] & { event_id?: string | null; /** Format: date-time */ event_date?: string | null; venue?: string | null; ticket_type?: string | null; seat_info: Record; }; ExcludedIntentLine: { /** Format: int32 */ ordinal: number; product_id: string; lane: components["schemas"]["CheckoutComplianceLane"]; reason_code: components["schemas"]["CheckoutComplianceReasonCode"]; }; /** @enum {string} */ ExternalClaimDisposition: "claimed" | "replayed" | "conflict" | "contact_unverified" | "business_unavailable" | "history_empty" | "history_oversize" | "failed"; /** @enum {string} */ FeeBearerType: "business" | "customer"; FeeHandlingPreferences: { /** @description Whether business absorbs payment processing fees */ absorb_fees: boolean; }; FindVariantBody: { axis_selections: { [key: string]: string; }; }; FulfillmentSummaryDTO: { fulfillment_type: components["schemas"]["FulfillmentType"]; fulfillment_id: string; status?: string | null; digital_type?: string | null; delivery_method?: string | null; /** Format: date-time */ delivered_at?: string | null; usage_summary?: string | null; identifier?: string | null; }; /** @enum {string} */ FulfillmentType: "booking" | "shipment" | "preparation" | "digital"; FxQuote: { from_currency: string; to_currency: string; rate: string; inverse_rate: string; /** Format: date-time */ quoted_at: string; /** Format: date-time */ valid_until: string; }; /** @enum {string} */ FxQuoteStatus: "pending" | "used" | "expired"; GiftCodeView: components["schemas"]["ProductBase"] & { code_type?: string | null; code_value?: string | null; code_currency?: string | null; }; GroupOrderInfoDTO: { group_order_id: string; is_closed: boolean; }; /** @description Price breakdown for a single group */ GroupPriceBreakdown: { group_id: string; group_name: string; /** Format: int32 */ selections_count: number; pricing_behavior: components["schemas"]["GroupPricingBehavior"]; subtotal: string; }; /** * @description How selections within a group are priced * @enum {string} */ GroupPricingBehavior: "additive" | "first_n_free" | "flat_fee" | "highest_only"; /** @description Validation result for a single group */ GroupValidation: { group_id: string; group_name: string; /** Format: int32 */ min_required: number; /** Format: int32 */ max_allowed?: number | null; /** Format: int32 */ selected_count: number; is_satisfied: boolean; error_message?: string | null; }; IncentiveView: { template_id: string; agent_id: string; }; InitUploadBody: { filename: string; content_type: string; /** Format: int64 */ size_bytes: number; }; InitUploadData: { upload_id: string; upload_url: string; /** Format: int64 */ expires_in_secs: number; }; /** @enum {string} */ InputFieldType: "text" | "textarea" | "number" | "select" | "radio" | "checkbox" | "color" | "date" | "file" | "image" | "url" | "address" | "phone" | "email" | "date_time" | "time" | "signature" | "multi_select" | "date_range" | "location"; InventoryHoldWindowOverride: { channel: components["schemas"]["Channel"]; /** * Format: int32 * @description Whole seconds, bounded to match the one-minute inventory reaper cadence * and to prevent an ordinary self-service checkout from pinning stock for * more than one day. */ seconds: number; }; InventoryHoldWindowPreferences: { channel_overrides?: components["schemas"]["InventoryHoldWindowOverride"][]; }; InventoryPreferences: { /** @description Basic inventory tracking settings */ tracking: components["schemas"]["InventoryTrackingPreferences"]; /** @description Markup-driven selling-price suggestions when a delivery changes cost */ auto_pricing?: components["schemas"]["AutoPricingPreferences"]; }; /** @description Information about inventory status */ InventoryStatus: { in_stock: boolean; stock_level?: string | null; low_stock: boolean; }; InventoryTrackingPreferences: { /** @description Whether inventory tracking is required */ inventory_required: boolean; /** * @description Rollout gate for deducting ad-hoc `inventory`-kind costs from on-hand stock * (material consumed outside a line's recipe). Off by default; stays record-only. */ deduct_adhoc_costs?: boolean; /** * @description Per-channel overrides for provisional customer inventory holds. The * resolved value is frozen onto the hold at order creation, so changing a * preference never moves an existing deadline. */ hold_windows?: components["schemas"]["InventoryHoldWindowPreferences"]; }; /** * @description Defines how inventory is tracked for a product. * @enum {string} */ InventoryType: "one_to_one" | "composition" | "none"; /** * @description Lifecycle value stored by `billing_invoices.status`. Keep the SQLx type * aligned with the physical VARCHAR column; SQLx 0.9 checks compatibility at * runtime for inferred query fields. * @enum {string} */ InvoiceStatus: "draft" | "open" | "paid" | "void" | "uncollectible"; /** @description Represents item availability at a location */ ItemAvailability: { is_available: boolean; is_in_stock: boolean; }; /** @enum {string} */ LatePaymentPolicy: "CancelBooking" | "ChargeFee" | "GracePeriod"; LicenseView: components["schemas"]["ProductBase"] & { version?: string | null; license_key_required?: boolean | null; license_key_format?: string | null; /** Format: int32 */ max_activations?: number | null; /** Format: int32 */ validity_days?: number | null; }; /** @enum {string} */ LifecyclePhase: "draft" | "open" | "completed" | "cancelled"; LineConfiguration: { variant?: null | components["schemas"]["VariantDetails"]; add_ons?: null | components["schemas"]["AddOnDetails"]; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** @enum {string} */ type: "simple"; } | { variant?: null | components["schemas"]["VariantDetails"]; add_ons?: null | components["schemas"]["AddOnDetails"]; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; confirmation_code?: string | null; service_status?: null | components["schemas"]["ServiceStatus"]; primary_staff_id?: string | null; primary_resource_id?: string | null; scheduling_metadata?: null | components["schemas"]["SchedulingMetadata"]; price_basis?: null | components["schemas"]["PriceBasis"]; /** Format: int32 */ units?: number | null; duration_unit?: null | components["schemas"]["DurationUnit"]; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** @enum {string} */ type: "service"; } | { variant?: null | components["schemas"]["VariantDetails"]; input?: components["schemas"]["BundleSelectionInput"][]; resolved?: null | components["schemas"]["BundleSelectionData"]; add_ons?: null | components["schemas"]["AddOnDetails"]; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** @enum {string} */ type: "bundle"; } | { variant?: null | components["schemas"]["VariantDetails"]; input?: components["schemas"]["CompositeSelectionInput"][]; resolved?: null | components["schemas"]["CompositeSelectionData"]; add_ons?: null | components["schemas"]["AddOnDetails"]; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** @enum {string} */ type: "composite"; } | { variant?: null | components["schemas"]["VariantDetails"]; add_ons?: null | components["schemas"]["AddOnDetails"]; digital_type?: string | null; fulfillment_id?: string | null; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** @enum {string} */ type: "digital"; }; /** * @description What can be done to one line from its current state. * @enum {string} */ LineDisposition: "cancel"; /** * @description Classification of line item types for strategy routing. * @enum {string} */ LineType: "product" | "service" | "bundle" | "composite" | "digital"; /** * @description What happened to a started line when its order is voided. Every variant * ends the line cancelled; they differ in what the goods did. * @enum {string} */ LineVoidDisposition: "unstart" | "write_off" | "return"; LiteBootstrapBusinessView: { id: string; name: string; handle: string; logo?: string | null; currency: string; is_open: boolean; description?: string | null; phone?: string | null; /** * Format: date-time * @description Next opening moment; present when the store is closed. */ opens_at?: string | null; /** * Format: date-time * @description Current closing moment; present when the store is open. */ closes_at?: string | null; hours: components["schemas"]["LiteDayHoursView"][]; }; LiteBootstrapCategoryView: { id: string; name: string; }; LiteBootstrapLocationView: { id: string; name?: string | null; area?: string | null; }; LiteBootstrapView: { business: components["schemas"]["LiteBootstrapBusinessView"]; categories: components["schemas"]["LiteBootstrapCategoryView"][]; location?: null | components["schemas"]["LiteBootstrapLocationView"]; /** @description Every active branch — more than one means the customer can switch. */ locations: components["schemas"]["LiteBootstrapLocationView"][]; }; LiteDayHoursView: { /** * Format: int32 * @description Day of week, 0 = Sunday. */ day: number; ranges: components["schemas"]["LiteHoursRangeView"][]; }; LiteHoursRangeView: { start: string; end: string; }; LiteResourceResponseView: { resource: components["schemas"]["LiteResourceView"]; tab?: Record | null; }; LiteResourceView: { id: string; name: string; location_id?: string | null; }; Location: { id: string; business_id: string; name: string; location?: string | null; phone?: string | null; address?: string | null; /** Format: double */ service_charge_rate?: number | null; currency: string; /** Format: int32 */ capacity: number; status: string; enabled_payment_types?: string[] | null; offers_table_service: boolean; accepts_online_orders: boolean; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; preferences?: Record | null; metadata?: Record | null; country_code: string; /** * @description Canonical seller-origin state/region code. Historical locations may be * unset; tax checkout must then fail explicitly instead of parsing free * text or guessing from coordinates. */ state_code?: string | null; address_line1?: string | null; address_line2?: string | null; city?: string | null; postal_code?: string | null; timezone: string; /** Format: double */ latitude?: number | null; /** Format: double */ longitude?: number | null; tax_behavior?: null | components["schemas"]["LocationTaxBehavior"]; tax_overrides?: null | components["schemas"]["LocationTaxOverrides"]; }; LocationInfoDTO: { id?: string | null; name?: string | null; table_number?: string | null; room_number?: string | null; resource_id?: string | null; }; /** @description Location-specific messaging rules */ LocationMessagingRules: { /** @description Location identifier */ location_id: string; /** @description Events specific to this location */ location_events: string[]; /** @description Location managers */ managers: string[]; /** @description Staff assigned to this location */ staff: string[]; /** @description Cross-location message routing */ cross_location_routing: { [key: string]: string[]; }; }; /** @description Tax behavior configuration for a location (derived from country profile) */ LocationTaxBehavior: { includes_tax: boolean; tax_rate: string; tax_components: components["schemas"]["TaxComponentInfo"][]; price_entry_label: string; help_text: string; checkout_display: components["schemas"]["CheckoutDisplayMode"]; automatic_taxes: boolean; gift_cards_taxable: boolean; derived_from_country: string; /** Format: date-time */ applied_at: string; }; /** @description Optional overrides for advanced users */ LocationTaxOverrides: { custom_includes_tax?: boolean | null; custom_tax_rate?: string | null; custom_components?: components["schemas"]["TaxComponentInfo"][] | null; custom_display_mode?: null | components["schemas"]["CheckoutDisplayMode"]; custom_automatic_taxes?: boolean | null; custom_gift_cards_taxable?: boolean | null; override_reason?: string | null; /** Format: date-time */ applied_at: string; }; LockQuoteArgs: { from: string; to: string; amount: string; }; LockedFxQuote: { id: string; base_currency: string; pay_currency: string; rate: string; inverse_rate: string; base_amount: string; converted_amount: string; /** Format: date-time */ quoted_at: string; /** Format: date-time */ valid_until: string; status: components["schemas"]["FxQuoteStatus"]; used_by_payment_id?: string | null; /** @description Raw market rate before spread markup (None for same-currency or zero-spread quotes). */ market_rate?: string | null; /** @description Spread percentage applied (e.g. 1.5 = 1.5%). None when no spread was applied. */ spread_pct?: string | null; }; LogoutView: { message: string; action: string; }; /** @enum {string} */ LoyaltyPointsPeriod: "lifetime" | "week" | "month" | "year"; /** @description Marketing communication rules */ MarketingRules: { /** @description Whether marketing communications are allowed */ enabled: boolean; /** @description Channels approved for marketing */ approved_channels: string[]; /** * Format: int32 * @description Maximum marketing messages per customer per day */ max_messages_per_day: number; /** @description Opt-out requirements */ opt_out_required: boolean; /** @description Unsubscribe link required */ unsubscribe_link_required: boolean; }; MenuItemDetailView: { item: components["schemas"]["ProductItemView"]; add_ons: components["schemas"]["AddOnView"][]; }; MerchantReply: { text: string; /** Format: date-time */ replied_at: string; }; /** @description Conditions that can trigger escalation */ MessagingEscalationTrigger: "NoAcknowledgment" | { /** @description Specific user not available */ UserUnavailable: string; } | "BusinessHoursEnded" | "MaxAttemptsReached" | { /** @description Custom condition */ Custom: string; }; /** @description Comprehensive messaging policy that defines "who can receive what" */ MessagingPolicy: { /** @description Business identifier */ business_id: string; /** @description Role-based message routing */ role_based_routing: components["schemas"]["RoleBasedRouting"]; /** @description Shift-based message routing */ shift_based_routing: components["schemas"]["ShiftBasedRouting"]; /** @description Department-specific messaging rules */ department_rules: { [key: string]: components["schemas"]["DepartmentMessagingRules"]; }; /** @description Location-specific messaging rules */ location_rules: { [key: string]: components["schemas"]["LocationMessagingRules"]; }; /** @description Event-specific routing overrides */ event_routing_rules: { [key: string]: components["schemas"]["EventRoutingRules"]; }; /** @description Account-specific message preferences (keyed by account_id) */ account_preferences: { [key: string]: components["schemas"]["AccountMessagePreferences"]; }; /** @description Channel-specific policies */ channel_policies: { [key: string]: components["schemas"]["ChannelPolicy"]; }; /** @description Message approval workflows */ approval_workflows: components["schemas"]["ApprovalWorkflow"][]; /** @description Message content filtering rules */ content_filters: components["schemas"]["ContentFilter"][]; /** @description Emergency contact hierarchies */ emergency_contacts: components["schemas"]["EmergencyContactHierarchy"]; /** @description Customer communication rules */ customer_communication: components["schemas"]["CustomerCommunicationRules"]; /** @description Supplier/vendor communication rules */ vendor_communication: components["schemas"]["VendorCommunicationRules"]; /** @description Cross-business messaging rules (for multi-tenant scenarios) */ cross_business_rules: components["schemas"]["CrossBusinessRules"]; /** * @description Redact message content from lock-screen pushes: notifications say * who/that something arrived, never what it says. For businesses whose * customer conversations are sensitive (pharmacies, clinics). */ redact_push_content?: boolean; /** * Format: date-time * @description Creation and update timestamps */ created_at: string; /** Format: date-time */ updated_at: string; /** * Format: int32 * @description Policy version for tracking changes */ version: number; /** @description Metadata for extensibility */ metadata?: Record | null; }; MintPurchaseIntentRequest: { store_region?: string | null; native_platform?: null | components["schemas"]["NativePurchasePlatform"]; client_intent_key: string; seller_business_id?: string; source: components["schemas"]["NativeCheckoutSourceInput"]; lines?: components["schemas"]["NativeCheckoutLineInput"][]; checkout?: null | components["schemas"]["CartIntentCheckoutInput"]; destination?: null | components["schemas"]["CheckoutDestinationInput"]; }; MobileMoneyDetails: { phone_number: string; provider: string; provider_other?: string | null; }; /** * @description Closed buyer-authored Mobile Money selection hint. A transient collection * carries contact + network, while a saved selection carries only its opaque * Link reference. The server derives saved phone/network after re-proving * exact Account/customer ownership; no request can provide both shapes. */ MobileMoneyTenderPreference: { phone_number: string; network: string; /** @enum {string} */ authority_kind: "transient"; } | { stored_instrument_id: string; /** @enum {string} */ authority_kind: "saved_reference"; }; ModulePreferences: { orders: boolean; kitchen_display: boolean; inventory: boolean; suppliers?: boolean; tap?: boolean; /** * @description In-person POS terminal access (`/pos` route, cash drawer, receipt * printers). Distinct from `tap` (NFC tap-to-pay) — a business can * enable POS without enabling `tap`, and vice versa. */ pos?: boolean; /** @description Daily takings view + cash-drawer reconciliation (till sessions). */ takings?: boolean; customers: boolean; locations: boolean; tables: boolean; services: boolean; delivery: boolean; scheduling: boolean; discounts: boolean; loyalty: boolean; reviews: boolean; blogs: boolean; marketing: boolean; publishing?: boolean; accounting: boolean; analytics: boolean; taxes: boolean; payouts: boolean; support?: boolean; comms?: boolean; staff: boolean; settings: boolean; webmaker: boolean; entitlements?: boolean; subscriptions?: boolean; installments?: boolean; /** @description Bulk pricing tiers, MOQ, separate wholesale price lists per buyer. */ wholesale?: boolean; /** * @description Long-form invoicing (NET-30, line-item, PO references) — separate * from receipts/orders. Lives at `src/invoices/`. */ invoices?: boolean; /** * @description Multi-party RFQ / proposal negotiation that converts to orders / * price lists / subscriptions / catalogs. B2B feature. */ proposals?: boolean; /** * @description Universal bundle of products + pricing + rules assigned via * polymorphic catalog_assignments to specific buyers / segments. */ catalogs?: boolean; addons_modifiers: boolean; bundles: boolean; composites: boolean; collections: boolean; recipes_bom: boolean; }; NativeAddOnSelection: { option_id: string; /** Format: int32 */ quantity: number; }; NativeCheckoutLineInput: { sellable: components["schemas"]["SellableRef"]; /** Format: int32 */ quantity: number; configuration: components["schemas"]["NativeLineConfiguration"]; offer?: null | components["schemas"]["OfferRef"]; }; NativeCheckoutSourceInput: { product_id: string; /** @enum {string} */ kind: "product"; } | { collection_id: string; /** @enum {string} */ kind: "collection"; } | { sale_id: string; /** @enum {string} */ kind: "sale"; } | { signed_handoff: string; /** @enum {string} */ kind: "post"; } | { signed_handoff: string; signed_beat_identity: string; /** @enum {string} */ kind: "live"; } | { cart_id: string; /** @enum {string} */ kind: "cart"; } | { thread_id: string; /** @enum {string} */ kind: "chat"; } | { /** @enum {string} */ kind: "manual"; }; NativeLineConfiguration: { variant_id?: string | null; add_ons?: components["schemas"]["NativeAddOnSelection"][]; customer_inputs?: components["schemas"]["CustomerInputEntry"][]; /** @enum {string} */ kind: "simple"; } | { variant_id?: string | null; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; staff_id?: string | null; resource_id?: string | null; /** Format: int32 */ units?: number | null; add_ons?: components["schemas"]["NativeAddOnSelection"][]; customer_inputs?: components["schemas"]["CustomerInputEntry"][]; /** @enum {string} */ kind: "service"; } | { variant_id?: string | null; digital_type?: null | components["schemas"]["DigitalProductType"]; add_ons?: components["schemas"]["NativeAddOnSelection"][]; customer_inputs?: components["schemas"]["CustomerInputEntry"][]; /** @enum {string} */ kind: "digital"; } | { selections?: components["schemas"]["BundleSelectionInput"][]; add_ons?: components["schemas"]["NativeAddOnSelection"][]; customer_inputs?: components["schemas"]["CustomerInputEntry"][]; /** @enum {string} */ kind: "bundle"; } | { selections: components["schemas"]["CompositeSelectionInput"][]; add_ons?: components["schemas"]["NativeAddOnSelection"][]; customer_inputs?: components["schemas"]["CustomerInputEntry"][]; /** @enum {string} */ kind: "composite"; } | { configuration: components["schemas"]["LineConfiguration"]; /** @enum {string} */ kind: "cart"; }; /** @enum {string} */ NativePurchasePlatform: "ios" | "android"; NextAction: { /** @enum {string} */ type: "none"; } | { provider: components["schemas"]["ProviderType"]; client_secret: string; public_key: string; /** * @description Public provider account namespace required by browser SDKs for a * direct connected-account charge. Platform-account flows omit it. */ provider_account_id?: string | null; /** @enum {string} */ type: "card_popup"; } | { authorization_url: string; /** @enum {string} */ type: "redirect"; } | { authorization_type: components["schemas"]["AuthorizationType"]; display_text?: string | null; /** @enum {string} */ type: "authorization"; } | { /** @enum {string} */ type: "poll"; }; /** @enum {string} */ NoticeKind: "info" | "warning"; OfferRef: { kind: components["schemas"]["CheckoutOfferKind"]; id: string; version: string; }; OrderActionView: { message: string; }; OrderAddOn: { add_on_id: string; name: string; /** Format: int32 */ min_selections: number; /** Format: int32 */ max_selections: number; selected_options: string[]; is_required: boolean; }; OrderCompositePriceBreakdown: { base_price: string; components_total: string; tier_applied?: string | null; final_price: string; }; /** * @description What can be done to a whole order from its current state. `Cancel` is a * reservation release; it is only offered while nothing has been fulfilled. * `Void` closes an order after a line has started, once each started line * says what happened to it. `Return` is offered once goods could have left * the building. * @enum {string} */ OrderDisposition: "cancel" | "void" | "return"; OrderFulfillmentSummary: { /** Format: int32 */ total_items: number; /** Format: int32 */ pending_items: number; /** Format: int32 */ in_progress_items: number; /** Format: int32 */ completed_items: number; /** Format: int32 */ cancelled_items: number; /** Format: int32 */ failed_items: number; all_complete: boolean; any_in_progress: boolean; }; OrderItemDetails: { id: string; product_id: string; product_name?: string | null; product_description?: string | null; image_url?: string | null; origin?: null | components["schemas"]["ProductOrigin"]; line_key: string; /** Format: int32 */ quantity: number; /** @description Line type: product, service, bundle, composite, digital */ line_type: components["schemas"]["LineType"]; variant_id?: string | null; variant_details?: null | components["schemas"]["VariantDetails"]; variant_info?: null | components["schemas"]["VariantDetailsDTO"]; add_on_option_ids: string[]; add_on_ids: string[]; add_on_details: components["schemas"]["AddOnDetails"]; add_on_options: components["schemas"]["AddOnOptionDetails"][]; add_ons: components["schemas"]["AddOnGroupDetails"][]; bundle_selections?: null | components["schemas"]["BundleSelectionData"]; composite_selections?: null | components["schemas"]["CompositeSelectionData"]; fulfillment?: null | components["schemas"]["FulfillmentSummaryDTO"]; customer_inputs?: components["schemas"]["CustomerInputValue"][]; /** Format: date-time */ scheduled_start?: string | null; /** Format: date-time */ scheduled_end?: string | null; confirmation_code?: string | null; primary_staff_id?: string | null; primary_resource_id?: string | null; /** Format: int32 */ units?: number | null; service_status?: string | null; base_price: string; add_ons_price: string; total_price: string; item_discount_amount: string; price_info: components["schemas"]["ChosenPrice"]; discount_details: components["schemas"]["DiscountDetails"]; line_state: components["schemas"]["OrderLineStatus"]; /** @description Line-level actions the backend accepts right now. */ available_dispositions?: components["schemas"]["LineDisposition"][]; /** @description What this line may declare if the order is voided. */ available_void_dispositions?: components["schemas"]["LineVoidDisposition"][]; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; metadata?: Record | null; }; /** @description State of an individual line item within an order. */ OrderLineState: "pending" | "in_preparation" | "checked_out" | "ready" | { partially_served: { /** Format: int32 */ served_quantity: number; }; } | "served" | "completed" | { cancelled: { reason?: string | null; }; }; /** @description Tracking status for a line item's preparation and serving progress. */ OrderLineStatus: { state: components["schemas"]["OrderLineState"]; /** Format: int32 */ quantity_ordered: number; /** Format: int32 */ quantity_prepared: number; /** Format: int32 */ quantity_served: number; /** Format: date-time */ last_modified: string; modified_by: string; }; OrderPricingView: { total_price: string; subtotal: string; total_discount: string; service_charge?: string | null; tax?: string | null; price_info: components["schemas"]["ChosenPrice"]; }; /** * @description Order lifecycle status with state machine transitions. * @enum {string} */ OrderStatus: "draft" | "pending" | "created" | "confirmed" | "in_preparation" | "ready_to_serve" | "partially_served" | "served" | "delivered" | "picked_up" | "completed" | "cancelled"; OrderTimestampsDTO: { /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: date-time */ confirmed_at?: string | null; /** Format: date-time */ fulfilled_at?: string | null; /** Format: date-time */ delivered_at?: string | null; /** Format: date-time */ served_at?: string | null; /** Format: date-time */ completed_at?: string | null; /** Format: date-time */ cancelled_at?: string | null; }; /** @enum {string} */ OrderType: "delivery" | "pickup" | "dine-in" | "walk-in"; Origin: { channel: components["schemas"]["Channel"]; channel_ref?: string | null; actor: components["schemas"]["Actor"]; }; /** * @description Actions to take when rate limits are exceeded * @enum {string} */ OverflowAction: "Drop" | "Queue" | "Batch" | "Escalate" | "RequireApproval"; /** @description Paginated version of unified catalogue view. */ PaginatedCatalogueView: { categories: components["schemas"]["CategoryView"][]; products: components["schemas"]["ProductView"][]; add_ons: components["schemas"]["AddOnView"][]; pagination: components["schemas"]["PaginationInfo"]; }; /** @description Pagination information for UI responses */ PaginationInfo: { /** Format: int64 */ total_count: number; /** Format: int32 */ current_page: number; /** Format: int32 */ page_size: number; /** Format: int32 */ total_pages: number; has_more: boolean; next_cursor?: string | null; }; PaginationMetadata: { /** Format: int64 */ total_count: number; /** Format: int32 */ current_page: number; /** Format: int32 */ page_size: number; /** Format: int32 */ total_pages: number; }; /** * @description Typed customer input for one provider-requested authorization step. * * Provider references are deliberately absent. The payment service resolves * the authoritative reference and provider from the tenant-scoped payment * row before making provider I/O. */ PaymentAuthorizationSubmission: { value: string; /** @enum {string} */ type: "pin"; } | { value: string; /** @enum {string} */ type: "otp"; } | { value: string; /** @enum {string} */ type: "phone"; } | { value: string; /** @enum {string} */ type: "birthday"; } | { address: string; city: string; state: string; zip_code: string; /** @enum {string} */ type: "address"; }; /** @enum {string} */ PaymentCollectionMode: "request_to_pay" | "mandate_debit" | "credential_charge" | "offline_tender"; PaymentInfoDTO: { state: components["schemas"]["PaymentState"]; computed_status?: string | null; currency: string; amount_to_pay: components["schemas"]["AmountToPay"]; paid_via_group: boolean; /** * @description Outstanding amount still owed; with `state` this lets clients render a * partial (deposit) payment. Derived from the payments table on the order. */ balance_due: string; deposit_required: boolean; deposit_amount: string; /** * @description True when the order has a settled payment whose provider can no longer * refund it (direct-to-bank T+1), so a refund must be recorded out of band. * Computed on the single-order detail view only (false elsewhere). */ manual_refund_required?: boolean; }; PaymentInstrumentDisplay: { brand: string; last4: string; /** Format: int32 */ exp_month: number; /** Format: int32 */ exp_year: number; /** @enum {string} */ kind: "card"; } | { network: components["schemas"]["CheckoutMobileMoneyNetwork"]; masked_number: string; /** @enum {string} */ kind: "mobile_money"; } | { /** @enum {string} */ kind: "erased"; }; PaymentMethodPreferences: { /** @description Cash payment settings */ allow_cash_payments: boolean; /** @description Online payment settings */ allow_online_payments: boolean; /** @description Card payment settings */ allow_card_payments: boolean; /** @description Mobile money settings */ allow_mobile_money_payments: boolean; /** @description Bank transfer settings */ allow_bank_transfer_payments: boolean; /** @description M-Pesa specific settings */ allow_mpesa_payments: boolean; }; /** @enum {string} */ PaymentNextActionKind: "none" | "provider_approval" | "step_up"; /** @enum {string} */ PaymentOptionStatus: "eligible" | "ineligible" | "expired"; PaymentOptionView: { id: string; /** Format: int32 */ rank: number; method_kind: components["schemas"]["CheckoutPaymentMethodKind"]; collection_mode: components["schemas"]["PaymentCollectionMode"]; provider?: null | components["schemas"]["PaymentProviderKind"]; instrument?: null | components["schemas"]["PaymentInstrumentDisplay"]; /** * @description Residual commerce principal this option settles. Saved account credit * and voucher credit are frozen separately on the accepted terms. */ principal_amount: string; /** @description Route-specific customer fee frozen when this capability was issued. */ fee_amount: string; /** * @description Exact cash debit the buyer accepts for this option. Storage and the * provider-command boundary enforce `principal + fee = customer debit`. */ customer_debit_amount: string; currency: string; protection: components["schemas"]["CheckoutProtectionView"]; status: components["schemas"]["PaymentOptionStatus"]; expected_next_action: components["schemas"]["PaymentNextActionKind"]; /** Format: date-time */ expires_at: string; }; PaymentPreferences: { /** @description Fee handling preferences */ fee_handling: components["schemas"]["FeeHandlingPreferences"]; /** @description Payment method settings */ payment_methods: components["schemas"]["PaymentMethodPreferences"]; /** @description Pricing preferences */ pricing: components["schemas"]["PricingPreferences"]; }; /** @enum {string} */ PaymentProviderKind: "stripe" | "paystack" | "cellulant" | "mtn_momo"; /** * @description Payment state for an order. * @enum {string} */ PaymentState: "not_paid" | "partially_paid" | "paid" | "partially_refunded" | "refunded"; PaymentStatusView: { status: string; paid: boolean; amount: string; currency: string; reference?: string | null; message: string; }; Persona: { persona_type: components["schemas"]["PersonaType"]; persona_id: string; }; /** @enum {string} */ PersonaType: "account" | "business" | "service"; PlaceDetails: { name?: string | null; category?: string | null; formatted_address: string; street_address?: string | null; apartment?: string | null; city?: string | null; region?: string | null; postal_code?: string | null; country: string; /** Format: double */ latitude: number; /** Format: double */ longitude: number; place_id: string; }; PlaceDetailsBody: { place_id: string; sessionToken?: string | null; country: string; }; PlaceDetailsResponse: { success: boolean; data: components["schemas"]["PlaceDetails"]; }; PlacesAutocompleteBody: { input: string; sessionToken?: string | null; country?: string | null; }; PlacesAutocompleteResponse: { success: boolean; data: components["schemas"]["AutocompleteResult"]; }; /** * @description Namespace owning a stable Platform category identity. * * Storage deliberately uses `TEXT` rather than a PostgreSQL enum or CHECK so * another reviewed namespace can be added by application code without a * schema migration. Unknown values still fail at the typed storage boundary. * @enum {string} */ PlatformTaxonomyNamespace: "shopify" | "cimplify"; PrefCancellationPolicy: { allow_cancellation: boolean; /** Format: int32 */ notice_required_hours: number; cancellation_fee_type: components["schemas"]["CancellationFeeType"]; cancellation_fee_amount?: string | null; refund_policy: components["schemas"]["RefundPolicy"]; }; /** @enum {string} */ PrefDepositType: "Fixed" | "Percentage"; /** @enum {string} */ PrefNotificationChannel: "email" | "sms" | "push" | "whatsapp" | "voice"; PriceAdjustment: { adjustment_type: components["schemas"]["AdjustmentType"]; amount: string; percentage?: string | null; reason: string; /** Format: date-time */ applied_at: string; }; /** * @description What a service's price is quoted against, which decides the line-total * multiplier: `Flat` charges once, `PerPerson` scales by party size, * `PerDurationUnit` by the periods stayed (nights, weeks, months — whichever * the service's `duration_unit` counts). Absent falls back to * [`PriceBasis::default_for`] the service's scheduling mode. * @enum {string} */ PriceBasis: "flat" | "per_person" | "per_duration_unit"; PriceDecisionPath: { base_price_source: components["schemas"]["PriceSource"]; /** @description Sequence of adjustments applied, in order. */ adjustments: components["schemas"]["PriceAdjustment"][]; context?: Record | null; }; /** @description Tax information captured in pricing metadata. */ PricePathTaxInfo: { tax_rate: string; tax_amount: string; is_inclusive: boolean; components: components["schemas"]["TaxPathComponent"][]; }; PriceQuote: { quote_id: string; business_id: string; product_id: string; variant_id?: string | null; location_id?: string | null; source: components["schemas"]["RequestSource"]; customer_id?: string | null; customer_segment_id?: string | null; storefront_id?: string | null; attribution_id?: string | null; /** Format: int32 */ quantity?: number; configuration_kind?: components["schemas"]["PricingConfigurationKind"]; currency?: string | null; snapshot_id?: string | null; snapshot_markup_version?: string | null; snapshot_tax_version?: string | null; item_price_info: components["schemas"]["ChosenPrice"]; variant_price_info?: null | components["schemas"]["ChosenPrice"]; final_price_info: components["schemas"]["ChosenPrice"]; sale?: null | components["schemas"]["SaleInfo"]; add_on_option_ids?: string[]; bundle_selections?: components["schemas"]["QuoteBundleSelection"][]; add_ons_price_info?: null | components["schemas"]["ChosenPrice"]; quoted_total_price_info?: null | components["schemas"]["ChosenPrice"]; /** * @description `Some`, including `Some([])`, means the quote explicitly validated the * customer's operational inputs. Raw values are intentionally excluded. */ customer_input_pricing_bindings?: components["schemas"]["CustomerInputPricingBinding"][] | null; customer_inputs_price_info?: null | components["schemas"]["ChosenPrice"]; composite_selections?: components["schemas"]["QuoteCompositeSelection"][]; dynamic_buckets?: components["schemas"]["DynamicBuckets"]; ui_messages?: components["schemas"]["QuoteUiMessage"][]; /** Format: date-time */ created_at: string; /** Format: date-time */ expires_at: string; /** Format: date-time */ next_change_at?: string | null; status: components["schemas"]["QuoteStatus"]; }; PriceSource: "default_item" | { location_specific: string; } | { price_list: { list_id: string; item_id: string; }; } | { variant: string; } | { catalog: { catalog_id: string; item_id?: string | null; }; } | { composite: string; } | { bundle: string; } | "custom"; /** @enum {string} */ PricingConfigurationKind: "ordinary" | "configured" | "bundle" | "composite"; PricingOverrides: { /** Format: int32 */ custom_duration_minutes?: number | null; price_adjustment?: string | null; discount_reason?: string | null; surge_pricing_multiplier?: string | null; loyalty_discount?: string | null; package_deal_reference?: string | null; }; PricingPreferences: { /** @description Whether to enable automatic pricing */ auto_pricing: boolean; }; ProcessArgs: components["schemas"]["CheckoutFormData"]; Product: { id: string; business_id: string; category_id?: string | null; name: string; slug: string; image_url?: string | null; description?: string | null; default_price: string; /** Format: int32 */ calories?: number | null; allergies?: string[] | null; recipe: Record; is_active: boolean; is_archived?: boolean | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: date-time */ deleted_at?: string | null; metadata: Record; tags?: string[] | null; images?: string[] | null; external_id?: string | null; external_source?: string | null; origin?: components["schemas"]["ProductOrigin"]; ean?: string | null; upc?: string | null; is_trackable?: boolean | null; is_tracked?: boolean | null; is_tracked_in_store?: boolean | null; is_tracked_in_warehouse?: boolean | null; /** Format: int32 */ inventory_threshold?: number | null; sku?: string | null; barcode?: string | null; download_url?: string | null; product_type: components["schemas"]["ProductType"]; inventory_type: components["schemas"]["InventoryType"]; variant_strategy: components["schemas"]["VariantStrategy"]; /** Format: int32 */ max_downloads?: number | null; license_key_required?: boolean | null; /** Format: int32 */ file_size_mb?: number | null; digital_type?: null | components["schemas"]["DigitalProductType"]; file_hash?: string | null; file_type?: string | null; version?: string | null; /** Format: int32 */ download_expires_days?: number | null; license_key_format?: string | null; /** Format: int32 */ max_activations?: number | null; /** Format: int32 */ validity_days?: number | null; event_id?: string | null; /** Format: date-time */ event_date?: string | null; venue?: string | null; ticket_type?: string | null; seat_info: Record; access_type?: string | null; access_level?: string | null; /** Format: int32 */ access_duration_days?: number | null; code_type?: string | null; code_value?: string | null; code_currency?: string | null; scheduling_mode?: null | components["schemas"]["SchedulingMode"]; /** Format: int32 */ duration_value?: number | null; /** Format: int32 */ duration_minutes?: number | null; duration_unit?: null | components["schemas"]["DurationUnit"]; price_basis?: null | components["schemas"]["PriceBasis"]; /** Format: int32 */ preparation_time_minutes?: number | null; /** Format: int32 */ staff_required_count?: number | null; /** Format: int32 */ buffer_before_minutes?: number | null; /** Format: int32 */ buffer_after_minutes?: number | null; /** Format: int32 */ general_service_capacity?: number | null; deposit_type?: null | components["schemas"]["DepositType"]; deposit_amount?: string | null; /** Format: int32 */ cancellation_window_minutes?: number | null; no_show_fee?: string | null; partial_refund_percentage?: string | null; /** Format: int32 */ max_free_reschedules?: number | null; reschedule_fee?: string | null; /** Format: int32 */ no_show_deadline_minutes?: number | null; /** Format: int32 */ cancellation_notice_days?: number | null; early_termination_fee?: string | null; pro_rata_refund?: boolean | null; requires_specific_staff?: boolean | null; requires_specific_resource?: boolean | null; /** Format: int32 */ min_stay?: number | null; /** Format: int32 */ max_stay?: number | null; check_in_time?: string | null; check_out_time?: string | null; boundary_kind?: null | components["schemas"]["BoundaryKind"]; boundary_start_label?: string | null; boundary_end_label?: string | null; subject_entity_type?: string | null; hs_code?: string | null; mid_code?: string | null; material?: string | null; allow_backorder?: boolean | null; item_condition?: string | null; vendor?: string | null; /** Format: int32 */ length_mm?: number | null; /** Format: int32 */ width_mm?: number | null; /** Format: int32 */ height_mm?: number | null; channels?: string[] | null; meta_title?: string | null; meta_description?: string | null; is_discountable?: boolean | null; taxonomy_id?: string | null; display_mode?: null | components["schemas"]["DisplayMode"]; /** Format: int32 */ min_order_quantity?: number | null; default_markup_pct?: string | null; auto_apply_markup: boolean; }; ProductAvailabilityNowView: { is_available: boolean; schedules_today: components["schemas"]["ProductTimeProfile"][]; }; ProductBase: { id: string; name: string; slug: string; description?: string | null; image_url?: string | null; category_id?: string | null; sku?: string | null; barcode?: string | null; default_price?: string; /** * @description Currency of the evaluated storefront price. Kept beside the scalar * amount because the richer internal price path is intentionally not * serialized on catalogue payloads. */ currency?: string | null; sale?: null | components["schemas"]["SaleInfo"]; upcoming_sale?: null | components["schemas"]["UpcomingSale"]; location_prices?: { [key: string]: components["schemas"]["ChosenPrice"]; } | null; availability?: { [key: string]: components["schemas"]["ItemAvailability"]; }; display_mode: components["schemas"]["DisplayMode"]; properties?: components["schemas"]["ProductProperty"][] | null; billing_plans?: components["schemas"]["ProductBillingPlan"][]; /** Format: int32 */ min_order_quantity?: number | null; upsells?: components["schemas"]["RelatedProductView"][] | null; cross_sells?: components["schemas"]["RelatedProductView"][] | null; }; ProductBillingPlan: { id: string; product_id: string; business_id: string; frequency: components["schemas"]["BillingFrequency"]; fulfillment_frequency?: null | components["schemas"]["BillingFrequency"]; plan_type: components["schemas"]["ProductBillingPlanType"]; /** Format: int32 */ installment_periods?: number | null; /** Format: int32 */ trial_days: number; setup_fee: string; markup_type?: null | components["schemas"]["BillingMarkupType"]; markup_amount?: string | null; customer_group_id?: string | null; /** Format: int32 */ min_quantity?: number | null; min_order_value?: string | null; /** Format: int32 */ max_cycles?: number | null; is_active: boolean; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: date-time */ deleted_at?: string | null; metadata: Record; }; /** @enum {string} */ ProductBillingPlanType: "subscription" | "installment"; ProductDetail: { item: components["schemas"]["ProductView"]; category: components["schemas"]["CategoryView"]; /** Format: date-time */ created_at: string; /** * @description Ordered, de-duplicated shopper-visible gallery. This intentionally * contains URLs only; storage keys and digital fulfilment URLs are not * part of product media. */ media?: string[]; related_items?: components["schemas"]["ProductView"][]; }; ProductInputField: { id: string; product_id: string; business_id: string; name: string; slug: string; field_type: components["schemas"]["InputFieldType"]; is_required: boolean; /** Format: int32 */ display_order: number; placeholder?: string | null; help_text?: string | null; validation?: Record; options?: Record; price_adjustment?: string | null; semantic_kind?: null | components["schemas"]["SemanticKind"]; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; /** @description Merged product view for physical/food products. */ ProductItemView: components["schemas"]["ProductBase"] & { variants?: components["schemas"]["VariantView"][]; variant_axes?: components["schemas"]["VariantAxisView"][]; schedules?: components["schemas"]["ProductTimeProfile"][]; add_on_ids?: string[] | null; /** Format: int32 */ calories?: number | null; allergies?: string[] | null; /** Format: int32 */ preparation_time_minutes?: number | null; inventory_status?: null | components["schemas"]["InventoryStatus"]; upc?: string | null; ean?: string | null; brand?: string | null; manufacturer?: string | null; item_condition?: string | null; images?: string[] | null; tags?: string[] | null; attributes?: { [key: string]: string; } | null; render_hint: components["schemas"]["ProductRenderHint"]; quantity_pricing?: components["schemas"]["QuantityPricingTier"][]; input_fields?: components["schemas"]["ProductInputField"][]; }; /** @enum {string} */ ProductOrigin: "catalogue" | "pos_quick_add" | "rapid" | "import"; ProductProperty: { name: string; slug: string; source: components["schemas"]["PropertySource"]; value_type: string; values: Record[]; group_name?: string | null; unit?: string | null; is_filterable: boolean; }; /** @enum {string} */ ProductRenderHint: "food" | "physical" | "general"; /** * @description Platform-owned category from the currently active release. * * `id` is the stable, route-safe identity (`shopify:` or * `cimplify:`); release-specific presentation and hierarchy are * projected from the active release in one query. */ ProductTaxonomy: { id: string; code: string; namespace: components["schemas"]["PlatformTaxonomyNamespace"]; release_id: string; upstream_key: string; name: string; breadcrumb: string; parent_id?: string | null; /** Format: int32 */ level: number; is_active: boolean; is_selectable: boolean; is_leaf: boolean; /** Format: date-time */ retired_at?: string | null; successor_node_id?: string | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; /** @description Represents the schedule of a product (e.g., availability on specific days and times). */ ProductTimeProfile: { id: string; business_id: string; product_id: string; /** Format: int32 */ day_of_week: number; start_time: string; end_time: string; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; metadata?: unknown; }; /** * @description Distinguishes a physical product from a service. * @enum {string} */ ProductType: "product" | "service" | "digital" | "bundle" | "composite"; /** @description Unified product view - discriminated union for all product types. */ ProductView: (components["schemas"]["ProductItemView"] & { /** @enum {string} */ type: "product"; }) | (components["schemas"]["ServiceView"] & { /** @enum {string} */ type: "service"; }) | (components["schemas"]["DigitalProductView"] & { /** @enum {string} */ type: "digital"; }) | (components["schemas"]["BundleView"] & { /** @enum {string} */ type: "bundle"; }) | (components["schemas"]["CompositeProductView"] & { /** @enum {string} */ type: "composite"; }); /** @enum {string} */ PropertySource: "attribute" | "variant"; /** * @description How the delivery provider was resolved. * @enum {string} */ ProviderResolutionSource: "zone" | "hint" | "fallback" | "rate" | "best_price"; /** @enum {string} */ ProviderType: "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline"; PublicCatalogueCollection: { id: string; /** * @description Explicit seller authority. Collection ids are merchant-local and are * never sufficient checkout or navigation identity on their own. */ business_id: string; name: string; image_url?: string | null; }; PublicCheckoutSessionResponse: { id: string; intent_id: string; status: string; business_id: string; cart_id: string; public_key?: string | null; business: components["schemas"]["CheckoutSessionBusiness"]; cart: components["schemas"]["CheckoutSessionCart"]; order_types: string[]; default_order_type?: string | null; appearance?: Record | null; submit_label?: string | null; success_url?: string | null; cancel_url?: string | null; terms?: null | components["schemas"]["CheckoutTermsView"]; /** Format: date-time */ expires_at: string; }; /** @enum {string} */ PublicPartnerOfferScope: "product" | "collection" | "shop_wide"; PublicPersona: { /** * @description Stable, opaque public identity. Unlike a handle this does not change * when the persona is renamed, and unlike the owner id it discloses no * account/business storage key. */ id: string; handle?: string | null; display_name: string; avatar_ref?: string | null; }; /** @description The place as a post, a feed card and the published event carry it. */ PublicPlace: { id: string; name: string; category?: string | null; /** @example GH */ country: string; /** Format: double */ lat: number; /** Format: double */ lng: number; /** @description Set when the place resolves to a shop on Cimplify. */ business_id?: string | null; /** @description The shop's handle when it has a public profile to open. */ shop_handle?: string | null; verified: boolean; }; /** * @description Compact, public sellable projection for a product reference embedded by a * consumer surface. Salesman owns these fields because price and inventory * must be evaluated, not copied from catalogue storage columns. */ PublicProductReference: { id: string; /** * @description Explicit seller authority for checkout and same-product/many-shop * rendering. Clients must never infer this from a post or profile. */ business_id: string; name: string; image_url?: string | null; price: string; compare_at_price?: string | null; currency: string; category_id?: string | null; kind: components["schemas"]["ProductType"]; /** @description Omitted for services, digital products, and other untracked goods. */ stock_left?: string | null; is_new: boolean; }; PublicReview: { id: string; product_id?: string | null; media_refs: string[]; reviewer_handle?: string | null; anonymous: boolean; review_text: string; /** Format: int32 */ rating: number; verified_purchase: boolean; incentive_disclosure_required: boolean; /** Format: int32 */ helpful_count: number; reply?: null | components["schemas"]["MerchantReply"]; /** Format: date-time */ created_at: string; }; PublicSocialCaptionEntity: { /** * Format: int32 * @description UTF-8 byte offset into `PublicSocialPost.caption`. */ start: number; /** * Format: int32 * @description UTF-8 byte length in `PublicSocialPost.caption`. */ len: number; target: components["schemas"]["SocialEntityRef"]; }; PublicSocialPost: { id: string; author: components["schemas"]["PublicPersona"]; channel?: null | components["schemas"]["PublicSocialPostChannel"]; posted_by?: null | components["schemas"]["PublicSocialPostByline"]; collaborators: components["schemas"]["PublicSocialPostCollaborator"][]; kind: components["schemas"]["SocialPostKind"]; caption?: string | null; caption_entities: components["schemas"]["PublicSocialCaptionEntity"][]; media: components["schemas"]["PublicSocialPostMedia"][]; audio_label?: string | null; market: string; /** Format: date-time */ published_at: string; tags: components["schemas"]["PublicSocialPostTag"][]; place?: null | components["schemas"]["PublicPlace"]; /** * @description Persistent server-projected disclosure. Once true for a published post, * offer retirement or enrollment revocation cannot clear it. */ paid_partnership: boolean; partnership?: null | components["schemas"]["PublicSocialPostPartnership"]; /** @description Opaque signed handoff for the tagged business storefront. */ commerce_ref?: string | null; engagement: components["schemas"]["SocialPostEngagement"]; viewer: components["schemas"]["SocialPostViewerState"]; }; /** * @description The original contributor behind a channel post. `PublicSocialPost.author` * remains the channel's speaking owner; this is the byline beside it. */ PublicSocialPostByline: { persona: components["schemas"]["Persona"]; display_name?: string | null; handle?: string | null; }; /** * @description Public channel identity for a post that speaks with a channel's voice. * Subscription, admission and paid state are read from the channel's own * surfaces and never travel with a post. */ PublicSocialPostChannel: { id: string; handle: string; title: string; /** @description The owner business's verification standing, read from KYC's own owner. */ verified: boolean; /** @description Public delivery URL for the channel picture, resolved through Media. */ avatar_url?: string | null; }; PublicSocialPostCollaborator: { persona: components["schemas"]["PublicPersona"]; /** Format: int32 */ seq: number; }; PublicSocialPostMedia: { url: string; poster_url?: string | null; blurhash?: string | null; hls_url?: string | null; init_segment_url?: string | null; /** Format: int64 */ init_segment_bytes?: number | null; first_segment_url?: string | null; /** Format: int64 */ first_segment_bytes?: number | null; /** Format: int32 */ width?: number | null; /** Format: int32 */ height?: number | null; /** Format: int64 */ duration_ms?: number | null; mime_type?: string | null; alt_text?: string | null; }; /** * @description Public, non-financial Partner Commerce truth. The earning tag identity is * exposed so composer, post, and earnings views cannot disagree about which * merchant/scope was selected. Rate and enrollment identities stay private. */ PublicSocialPostPartnership: { /** Format: int32 */ earning_tag_seq: number; offer_scope: components["schemas"]["PublicPartnerOfferScope"]; }; PublicSocialPostReference: { id: string; author: components["schemas"]["PublicPersona"]; thumbnail_url?: string | null; }; PublicSocialPostTag: { /** Format: int32 */ seq: number; target: components["schemas"]["SocialEntityRef"]; }; PublicSocialSaleTag: { id: string; /** @description Explicit seller authority for merchant-local sale ids. */ business_id: string; name: string; badge_text?: string | null; show_countdown: boolean; /** Format: date-time */ occurrence_starts_at: string; /** Format: date-time */ occurrence_ends_at: string; preview: components["schemas"]["PublicProductReference"][]; }; PublicSocialShelfPage: { sale: components["schemas"]["PublicSocialShelfSale"]; items: components["schemas"]["PublicProductReference"][]; next_cursor?: string | null; }; PublicSocialShelfSale: { id: string; /** @description Explicit seller authority for merchant-local sale ids. */ business_id: string; name: string; /** Format: int32 */ version: number; badge_text?: string | null; show_countdown: boolean; /** Format: date-time */ occurrence_starts_at: string; /** Format: date-time */ occurrence_ends_at: string; }; /** @enum {string} */ PurchaseDisposition: "execute" | "store_purchase" | "link_out" | "locked"; /** * @description Buyer-safe frozen money for one persisted intent line. Names and images * may be enriched from the live catalogue, but these accepted amounts always * come from the current immutable terms evidence. */ PurchaseIntentLinePricingView: { intent_line_id: string; /** Format: int32 */ quantity: number; unit_price: string; line_subtotal: string; currency: string; }; PurchaseIntentLineView: { id: string; /** Format: int32 */ ordinal: number; sellable: components["schemas"]["SellableRef"]; offer?: null | components["schemas"]["OfferRef"]; /** Format: int32 */ quantity: number; configuration: components["schemas"]["NativeLineConfiguration"]; }; /** @enum {string} */ PurchaseIntentStatus: "draft" | "open" | "converted" | "cancelled" | "expired"; PurchaseIntentTenderPreference: { stored_instrument_id?: string | null; /** @enum {string} */ method_kind: "card"; } | { authority: components["schemas"]["MobileMoneyTenderPreference"]; /** @enum {string} */ method_kind: "mobile_money"; } | { /** @enum {string} */ method_kind: "offline"; }; PurchaseIntentView: { disposition?: components["schemas"]["PurchaseDisposition"]; id: string; seller_business_id: string; principal?: null | components["schemas"]["PurchasingPrincipal"]; /** Format: int64 */ revision: number; status: components["schemas"]["PurchaseIntentStatus"]; source: components["schemas"]["CanonicalSourceAuthority"]; lines: components["schemas"]["PurchaseIntentLineView"][]; /** * @description Frozen current-terms pricing keyed by `intent_line_id`. Empty only for * an unprepared draft or an internal pre-projection authority read. */ line_pricing: components["schemas"]["PurchaseIntentLinePricingView"][]; current_terms?: null | components["schemas"]["CheckoutTermsView"]; converted_order_id?: string | null; /** Format: date-time */ expires_at: string; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; excluded_lines?: components["schemas"]["ExcludedIntentLine"][]; }; PurchasePolicyContext: { /** Format: int64 */ policy_version: number; surface: components["schemas"]["PurchaseSurface"]; market_region: string; store_region?: string | null; }; /** @enum {string} */ PurchaseSurface: "native_ios" | "native_android" | "web"; PurchasingPrincipal: { account_id: string; /** @enum {string} */ kind: "account"; } | { business_id: string; /** @enum {string} */ kind: "business"; } | { /** @enum {string} */ kind: "guest"; } | { verified: boolean; /** @enum {string} */ kind: "recognised"; }; QuantityPricingTier: { /** Format: int32 */ min_quantity: number; /** Format: int32 */ max_quantity?: number | null; unit_price: string; }; QuoteBundleSelection: { component_id: string; /** Format: int32 */ quantity: number; variant_id?: string | null; }; QuoteCompositeSelection: { component_id: string; /** Format: int32 */ quantity: number; variant_id?: string | null; add_on_option_id?: string | null; }; /** @enum {string} */ QuoteStatus: "pending" | "used" | "expired"; QuoteUiMessage: { code: string; level: string; text: string; /** Format: int64 */ countdown_seconds?: number | null; }; RapidPreferences: { default_preset_id?: string | null; }; RatingDistribution: { /** Format: int64 */ one: number; /** Format: int64 */ two: number; /** Format: int64 */ three: number; /** Format: int64 */ four: number; /** Format: int64 */ five: number; }; RatingSummary: { product_id?: string | null; /** Format: int64 */ review_count: number; /** Format: int64 */ rating_sum: number; /** Format: double */ average_rating?: number | null; distribution: components["schemas"]["RatingDistribution"]; }; ReactBody: { emoji: string; client_id: string; }; RecommendationsResponse: { recommendations: components["schemas"]["ActivityRecommendation"][]; intent: string; incentive?: null | components["schemas"]["IncentiveView"]; }; /** @description Browser-known session context only; identity and attribution are derived server-side. */ RecordActivitySessionBody: { analytics_session_id?: string | null; /** @description Opaque signed handoff copied from a public Social commerce post. */ social_commerce_ref?: string | null; started_at?: string | null; landing_page?: string | null; landing_url?: string | null; referrer_url?: string | null; utm_source?: string | null; utm_medium?: string | null; utm_campaign?: string | null; utm_term?: string | null; utm_content?: string | null; /** Format: int32 */ screen_width?: number | null; /** Format: int32 */ screen_height?: number | null; /** Format: int32 */ viewport_width?: number | null; /** Format: int32 */ viewport_height?: number | null; pixel_density?: string | null; language?: string | null; timezone?: string | null; fingerprint?: string | null; is_new_visitor?: boolean | null; }; RecordEventsResponse: { processed: number; intent: string; messages: Record[]; }; RecordSessionResponse: { recorded: boolean; }; RefreshCheckoutTermsRequest: { /** Format: int64 */ expected_intent_revision: number; }; RefreshQuoteArgs: { quote_id: string; product_id?: string | null; variant_id?: string | null; location_id?: string | null; /** Format: int32 */ quantity?: number | null; add_on_option_ids?: string[] | null; bundle_selections?: components["schemas"]["BundleSelectionInput"][] | null; composite_selections?: components["schemas"]["ComponentSelectionInput"][] | null; }; RefreshQuoteBody: { product_id?: string | null; variant_id?: string | null; location_id?: string | null; /** Format: int32 */ quantity?: number | null; add_on_option_ids?: string[] | null; bundle_selections?: components["schemas"]["BundleSelectionInput"][] | null; composite_selections?: components["schemas"]["ComponentSelectionInput"][] | null; }; RefreshQuoteView: { previous_quote_id: string; quote: components["schemas"]["PriceQuote"]; }; /** @enum {string} */ RefundPolicy: "FullRefund" | "PartialRefund" | "NoRefund" | "StoreCredit"; RelatedProductView: { product_id: string; name: string; slug: string; image_url?: string | null; price: string; source: string; }; /** * @description Method for sending booking reminders * @enum {string} */ ReminderMethod: "sms" | "email" | "push" | "call" | "whats_app"; ReminderSettings: { send_24h_reminder: boolean; send_2h_reminder: boolean; send_30min_reminder: boolean; send_check_in_day_reminder: boolean; send_check_out_reminder: boolean; reminder_phone?: string | null; reminder_email?: string | null; reminder_method: components["schemas"]["ReminderMethod"]; custom_reminder_message?: string | null; }; RequestOtpArgs: { /** @description Phone number or email to send OTP to */ contact: string; /** @description Contact type: "phone" or "email" */ contact_type?: string | null; }; RequestOtpView: { message: string; /** Format: int64 */ expires_in: number; is_new_account: boolean; }; /** * @description Commerce door which requested a unit-price evaluation. * * The wire names intentionally match the server `RequestSource` contract so * callers can project into the kernel without translating string labels. * @enum {string} */ RequestSource: "web" | "q_r_code" | "order_taker" | "ucp_a2a" | "chat"; RescheduleBookingArgs: { order_id: string; line_item_id: string; new_start_time: string; new_end_time: string; new_staff_id?: string | null; reason?: string | null; reschedule_type?: string | null; }; RescheduleBookingView: { success: boolean; booking_id: string; old_time: components["schemas"]["RescheduleWindowView"]; new_time: components["schemas"]["RescheduleWindowView"]; staff_changed: boolean; old_staff_id?: string | null; new_staff_id?: string | null; fee_charged: string; }; RescheduleWindowView: { /** Format: date-time */ start: string; /** Format: date-time */ end: string; }; ResourceInfo: { resource_id: string; name: string; resource_type: string; }; ResponseMetadata: { pagination?: null | components["schemas"]["PaginationMetadata"]; cursor?: null | components["schemas"]["CursorMetadata"]; /** Format: date-time */ timestamp: string; request_id?: string | null; }; ResponseStatus: { /** Format: int32 */ code: number; success: boolean; }; ReviewCursor: { /** Format: date-time */ created_at: string; id: string; }; ReviewPage_PublicReview: { items: { id: string; product_id?: string | null; media_refs: string[]; reviewer_handle?: string | null; anonymous: boolean; review_text: string; /** Format: int32 */ rating: number; verified_purchase: boolean; incentive_disclosure_required: boolean; /** Format: int32 */ helpful_count: number; reply?: null | components["schemas"]["MerchantReply"]; /** Format: date-time */ created_at: string; }[]; next_cursor?: null | components["schemas"]["ReviewCursor"]; }; /** @description Role-based message routing configuration */ RoleBasedRouting: { /** @description Business identifier */ business_id: string; /** @description Routing rules for each role */ rules: { [key: string]: components["schemas"]["RoleRoutingRules"]; }; /** @description Default role to use when user role is unknown */ default_role?: string | null; /** @description Role hierarchy for escalation */ role_hierarchy: components["schemas"]["RoleHierarchy"]; /** @description Whether role-based routing is enabled */ enabled: boolean; }; /** @description Role hierarchy for escalation purposes */ RoleHierarchy: { /** @description Hierarchy levels (lower number = higher authority) */ levels: { [key: string]: number; }; /** @description Escalation paths between roles */ escalation_paths: { [key: string]: string[]; }; }; /** @description Routing rules for a specific role */ RoleRoutingRules: { /** @description Role identifier */ role: string; /** @description Event types this role should receive */ subscribed_events: string[]; /** @description Event types this role should never receive */ excluded_events: string[]; /** @description Minimum urgency level for this role */ min_urgency: string; /** @description Preferred channels for this role (in order of preference) */ preferred_channels: string[]; /** * Format: int32 * @description Maximum number of notifications per hour for this role */ max_notifications_per_hour?: number | null; /** @description Whether this role receives escalated messages */ receives_escalations: boolean; /** * Format: int32 * @description Priority for message delivery (higher = more important) */ priority: number; working_hours?: null | components["schemas"]["WorkingHours"]; /** @description Whether this role is available for emergency contact */ emergency_contact: boolean; }; /** @description Live claim progress for a capped sale ("73 of 100 claimed"). */ SaleCapInfo: { /** Format: int64 */ claimed: number; /** Format: int64 */ of: number; }; /** @description The sale overlay applied to a price, surfaced for storefront display. */ SaleInfo: { sale_id: string; original: string; price: string; percent_off: string; /** Format: date-time */ ends_at: string; badge_text?: string | null; cap?: null | components["schemas"]["SaleCapInfo"]; }; SchedulingActionView: { message: string; }; SchedulingBookingView: { id: string; service_name: string; /** Format: date-time */ start_time: string; /** Format: date-time */ end_time: string; status: string; confirmation_code: string; total_amount: string; /** Format: int32 */ participant_count: number; staff_name?: string | null; notes?: string | null; }; SchedulingCancelBody: { reason?: string | null; }; /** @description Comprehensive scheduling metadata for service line items */ SchedulingMetadata: { customer_preferences?: null | components["schemas"]["CustomerServicePreferences"]; buffer_times?: null | components["schemas"]["BufferTimes"]; reminder_settings?: null | components["schemas"]["ReminderSettings"]; cancellation_policy?: null | components["schemas"]["CancellationPolicy"]; service_notes?: null | components["schemas"]["ServiceNotes"]; pricing_overrides?: null | components["schemas"]["PricingOverrides"]; }; /** * @description Whether a service uses intraday time-slot scheduling or multi-day * calendar-based booking. Stored on `service_items.scheduling_mode`. * @enum {string} */ SchedulingMode: "intraday" | "multi_day"; SchedulingPreferences: { /** @description Main booking configuration */ booking: components["schemas"]["BookingSettings"]; /** @description Payment and cancellation policies */ policies: components["schemas"]["BookingPolicies"]; /** @description Availability and scheduling rules */ availability: components["schemas"]["AvailabilityManagement"]; /** @description Notification settings */ notifications: components["schemas"]["BookingNotificationSettings"]; }; SchedulingServiceView: { id: string; name: string; description?: string | null; price: string; scheduling_mode?: string | null; /** Format: int32 */ duration_value?: number | null; duration_unit?: string | null; /** Format: int32 */ duration_minutes?: number | null; image_url?: string | null; category_id?: string | null; is_available: boolean; }; SchedulingServicesView: { services: components["schemas"]["SchedulingServiceView"][]; }; SeasonalAdjustment: { name: string; /** Format: date */ start_date: string; /** Format: date */ end_date: string; capacity_multiplier: string; price_multiplier?: string | null; }; SelectedAddOnOption: { option_id: string; add_on_id: string; name: string; price: string; /** Format: int32 */ quantity: number; is_required: boolean; /** Format: date-time */ selected_at: string; price_info?: null | components["schemas"]["ChosenPrice"]; }; /** @enum {string} */ SellableKind: "product" | "variant"; SellableRef: { kind: components["schemas"]["SellableKind"]; product_id: string; variant_id?: string | null; location_id: string; }; /** * @description Optional semantic tag promoting an input from a generic field into a * first-class signal the booking/order UI can react to (e.g. surfacing an * allergen pill in the booking hero, or gating fulfillment on a signed * consent). App-layer enum; no DB CHECK constraint so we can evolve. * @enum {string} */ SemanticKind: "allergen" | "dietary_preference" | "sensitivity" | "consent"; SendMessageBody: { content: string; client_id: string; reply_to_message_id?: string | null; upload_ids?: string[]; /** @description Signed Social commerce context for this exact entry message. */ social_ref?: string | null; }; ServiceAvailabilityDayView: { date: string; slots: components["schemas"]["BookingSlot"][]; has_availability: boolean; }; ServiceAvailabilityView: { service_id: string; location_id: string; scheduling_mode: string; duration_unit: string; /** Format: int32 */ duration_value: number; start_date: string; end_date: string; /** Format: int32 */ participant_count: number; availability: components["schemas"]["ServiceAvailabilityDayView"][]; }; ServiceNotes: { preparation_notes?: string | null; staff_notes?: string | null; internal_notes?: string | null; customer_history: string[]; allergies_warnings: string[]; }; /** * @description Service fulfillment status for order line items * @enum {string} */ ServiceStatus: "awaiting_scheduling" | "scheduled" | "deposit_paid" | "confirmed" | "in_progress" | "checked_in" | "checked_out" | "overstay" | "completed" | "rescheduled" | "no_show" | "cancelled"; /** @description Service for service businesses. */ ServiceView: components["schemas"]["ProductBase"] & { variants: components["schemas"]["VariantView"][]; variant_axes: components["schemas"]["VariantAxisView"][]; schedules: components["schemas"]["ProductTimeProfile"][]; scheduling_mode?: null | components["schemas"]["SchedulingMode"]; /** Format: int32 */ duration_value?: number | null; /** Format: int32 */ duration_minutes?: number | null; duration_unit?: null | components["schemas"]["DurationUnit"]; /** Format: int32 */ preparation_time_minutes?: number | null; /** Format: int32 */ buffer_before_minutes?: number | null; /** Format: int32 */ buffer_after_minutes?: number | null; /** Format: int32 */ general_service_capacity?: number | null; /** Format: int32 */ staff_required_count?: number | null; requires_specific_staff?: boolean | null; requires_specific_resource?: boolean | null; deposit_type?: string | null; deposit_amount?: string | null; /** Format: int32 */ cancellation_window_minutes?: number | null; no_show_fee?: string | null; partial_refund_percentage?: string | null; /** Format: int32 */ max_free_reschedules?: number | null; reschedule_fee?: string | null; /** Format: int32 */ no_show_deadline_minutes?: number | null; /** Format: int32 */ cancellation_notice_days?: number | null; early_termination_fee?: string | null; pro_rata_refund?: boolean | null; /** Format: int32 */ min_stay?: number | null; /** Format: int32 */ max_stay?: number | null; check_in_time?: string | null; check_out_time?: string | null; boundary_kind?: null | components["schemas"]["BoundaryKind"]; boundary_start_label?: string | null; boundary_end_label?: string | null; }; /** @description Current shift assignment for a user */ ShiftAssignment: { /** @description Account identifier */ account_id: string; /** @description Assigned shift */ shift_id: string; /** * Format: date-time * @description Assignment start date/time */ start_time: string; /** * Format: date-time * @description Assignment end date/time */ end_time: string; /** @description Whether user is currently on duty */ on_duty: boolean; }; /** @description Shift-based routing for businesses with shift workers */ ShiftBasedRouting: { /** @description Whether shift-based routing is enabled */ enabled: boolean; /** @description Shift definitions */ shifts: { [key: string]: components["schemas"]["ShiftDefinition"]; }; /** @description Current shift assignments */ current_assignments: { [key: string]: components["schemas"]["ShiftAssignment"]; }; /** @description Handoff procedures between shifts */ handoff_procedures: components["schemas"]["ShiftHandoffProcedure"][]; }; /** @description Definition of a work shift */ ShiftDefinition: { /** @description Shift identifier */ shift_id: string; /** @description Shift name */ name: string; /** @description Start time for the shift */ start_time: string; /** @description End time for the shift */ end_time: string; /** @description Days this shift operates */ days: string[]; /** @description Roles that work this shift */ roles: string[]; /** @description Events that should be routed to this shift */ event_types: string[]; }; /** @description Procedure for handing off notifications between shifts */ ShiftHandoffProcedure: { /** @description Source shift */ from_shift: string; /** @description Target shift */ to_shift: string; /** @description Events that should be handed off */ event_types: string[]; /** * Format: int32 * @description How long to overlap notifications (minutes) */ overlap_minutes: number; /** @description Whether to send handoff summary */ send_summary: boolean; }; SlotAvailabilityView: { available: boolean; service_id: string; /** Format: date-time */ start_time: string; /** Format: int32 */ duration_minutes: number; /** Format: int32 */ participant_count: number; }; SocialEntityRef: { value: components["schemas"]["PublicProductReference"]; /** @enum {string} */ type: "product"; } | { value: components["schemas"]["PublicCatalogueCollection"]; /** @enum {string} */ type: "collection"; } | { value: components["schemas"]["PublicSocialSaleTag"]; /** @enum {string} */ type: "sale"; } | { value: components["schemas"]["PublicPersona"]; /** @enum {string} */ type: "persona"; } | { value: components["schemas"]["PublicProductReference"]; /** @enum {string} */ type: "service"; } | { value: components["schemas"]["PublicSocialPostReference"]; /** @enum {string} */ type: "post"; }; SocialPostEngagement: { /** Format: int64 */ views: number; /** Format: int64 */ likes: number; /** Format: int64 */ comments: number; /** Format: int64 */ shares: number; /** Format: int64 */ saves: number; }; /** @enum {string} */ SocialPostKind: "video" | "image" | "live" | "live_replay"; SocialPostMedia: { /** * @description Publishing-asset identity used to converge asynchronous media work. * Public Social projections use a separate DTO and omit this field. */ asset_ref?: string | null; object_key: string; /** * @description The author's chosen cover. Held so a later rendition refresh re-applies * the choice instead of overwriting it with the generated poster. */ poster_asset_ref?: string | null; poster_key?: string | null; blurhash?: string | null; hls_key?: string | null; init_segment_key?: string | null; /** Format: int64 */ init_segment_bytes?: number | null; first_segment_key?: string | null; /** Format: int64 */ first_segment_bytes?: number | null; /** Format: int32 */ w?: number | null; /** Format: int32 */ h?: number | null; /** Format: int64 */ dur_ms?: number | null; mime_type?: string | null; alt_text?: string | null; }; SocialPostTag: { /** Format: int32 */ seq: number; target_type: components["schemas"]["SocialPostTagType"]; target_id: string; target_business_id: string; }; /** @enum {string} */ SocialPostTagType: "product" | "collection" | "sale" | "business" | "service"; SocialPostViewerState: { liked: boolean; saved: boolean; /** * @description Author-follow state at the same viewer boundary as reactions. Feed * clients must not infer this from session-local UI state. */ following: boolean; /** * @description True when this authenticated persona can use the post-owner moderation * endpoints. Clients must not infer ownership from a mutable handle. */ can_moderate: boolean; }; /** @enum {string} */ SourceRefusal: "invalid_identifier" | "cart_not_active" | "cart_converted" | "cart_expired" | "cart_currency_missing" | "cart_changed" | "seller_mismatch" | "buyer_mismatch" | "attribution_mismatch" | "evidence_mismatch" | "lines_mismatch" | "line_shape_invalid" | "source_not_found" | "source_kind_mismatch" | "surface_mismatch" | "product_selection_missing" | "social_handoff_invalid" | "staff_authority_missing" | "terms_missing" | "terms_window_elapsed" | "commercial_authority_stale" | "missing_location" | "missing_seller_origin" | "delivery_country_missing" | "voucher_scope_mismatch" | "transaction_mismatch"; StaffInfo: { staff_id: string; name: string; role?: string | null; skills: string[]; image_url?: string | null; }; StaffInfoDTO: { placed_by?: string | null; was_placed_by_staff: boolean; modified_by_staff: boolean; served_by?: string | null; }; StatutoryChargeReceiptLine: { decision_id: string; code: string; name: string; amount: string; currency: string; }; /** @description Actions to take when approval step times out */ StepTimeoutAction: "Continue" | "Fail" | { /** @description Escalate to backup approvers */ Escalate: string[]; }; StockLevelResponse: { product_id: string; variant_id?: string | null; location_id?: string | null; /** * Format: int64 * @description Available quantity. `None` when the backend cannot compute a real count * (e.g. simple products without per-location stock tracking). */ available_quantity?: number | null; status: components["schemas"]["StockStatus"]; last_updated: string; }; /** @enum {string} */ StockStatus: "in_stock" | "low_stock" | "out_of_stock"; StoreCreditBalanceResponse: { balance: string; currency: string; }; StorefrontActivitySessionResponse: { data: components["schemas"]["RecordSessionResponse"]; }; /** * @description Shopper-authored Cart material. Offline tender is intentionally absent: * it is issued only by the authenticated Manual staff adapter, never by a * generic buyer request. */ StorefrontCartIntentCheckoutInput: { customer: components["schemas"]["CustomerInfo"]; order_type: components["schemas"]["OrderType"]; address_info: components["schemas"]["AddressInfo"]; location_id?: string | null; delivery_rate_id?: string | null; special_instructions?: string | null; link_address_id?: string | null; link_payment_method_id?: string | null; metadata?: unknown; pay_currency?: string | null; fx_quote_id?: string | null; use_store_credit?: boolean; voucher_code?: string | null; pay_deposit?: boolean; tender_preference?: null | components["schemas"]["StorefrontPurchaseIntentTenderPreference"]; }; StorefrontCartMintRequest: { client_intent_key: string; source: components["schemas"]["StorefrontCartSourceInput"]; checkout: components["schemas"]["StorefrontCartIntentCheckoutInput"]; destination?: null | components["schemas"]["CheckoutDestinationInput"]; }; /** * @description Buyer-visible mutable sources. Manual checkout is intentionally absent: * only a Desk/agent adapter holding authenticated staff-session authority may * construct the internal `NativeCheckoutSourceInput::Manual` command. */ StorefrontCartSourceInput: { cart_id: string; /** @enum {string} */ kind: "cart"; } | { thread_id: string; /** @enum {string} */ kind: "chat"; }; /** * @description One method/network combination accepted by the storefront checkout input. * @enum {string} */ StorefrontCollectionMethod: "card" | "mobile_money"; StorefrontCollectionMethodOption: { method: components["schemas"]["StorefrontCollectionMethod"]; /** @description Optional network selector required by network-specific methods. */ network?: string | null; }; /** * @description Storefront-safe projection of active merchant collection routes. * * Internal providers, route cells, proceeds, operation scopes, activations, * bindings, readiness, provider accounts, and payout identifiers deliberately * remain behind the payment service boundary. */ StorefrontCollectionOptions: { /** @description Exact ISO 4217 currency charged to the customer. */ presentment_currency: string; options: components["schemas"]["StorefrontCollectionMethodOption"][]; }; StorefrontCollectionOptionsResponse: { data: components["schemas"]["StorefrontCollectionOptions"]; }; StorefrontConfirmPurchaseIntentResponse: { data: components["schemas"]["ConfirmPurchaseIntentResponse"]; }; /** * @description Buyer-visible immutable/catalogue sources. Cart-backed sources are a * separate arm so the public mint contract structurally requires checkout * material for Cart/Chat and direct lines for these sources. */ StorefrontLineSourceInput: { product_id: string; /** @enum {string} */ kind: "product"; } | { collection_id: string; /** @enum {string} */ kind: "collection"; } | { sale_id: string; /** @enum {string} */ kind: "sale"; } | { signed_handoff: string; /** @enum {string} */ kind: "post"; } | { signed_handoff: string; signed_beat_identity: string; /** @enum {string} */ kind: "live"; }; StorefrontLinesMintRequest: { client_intent_key: string; source: components["schemas"]["StorefrontLineSourceInput"]; lines: components["schemas"]["NativeCheckoutLineInput"][]; destination?: null | components["schemas"]["CheckoutDestinationInput"]; }; /** * @description Buyer-authored storefront commerce input. Seller and replay-owner * authority are intentionally absent; the HTTP boundary derives both from * its authenticated business and storefront session. The closed arms also * prevent Cart/Chat requests without checkout material and direct-line * requests without lines. */ StorefrontMintPurchaseIntentRequest: components["schemas"]["StorefrontCartMintRequest"] | components["schemas"]["StorefrontLinesMintRequest"]; StorefrontPurchaseIntentResponse: { data: components["schemas"]["PurchaseIntentView"]; }; StorefrontPurchaseIntentTenderPreference: { stored_instrument_id?: string | null; /** @enum {string} */ method_kind: "card"; } | { authority: components["schemas"]["MobileMoneyTenderPreference"]; /** @enum {string} */ method_kind: "mobile_money"; }; StorefrontReviewListResponse: { data: components["schemas"]["ReviewPage_PublicReview"]; }; StorefrontReviewSummary: { ratings: components["schemas"]["RatingSummary"]; trust_chips: components["schemas"]["TrustChips"]; }; StorefrontReviewSummaryResponse: { data: components["schemas"]["StorefrontReviewSummary"]; }; SubmitAuthorizationArgs: { payment_id: string; authorization: components["schemas"]["PaymentAuthorizationSubmission"]; }; /** * @description Customer input for the authorization challenge currently projected by one * exact intent attempt. Provider/payment/order identifiers are deliberately * absent; the owner-fenced service resolves them from durable authority. */ SubmitPurchaseIntentActionRequest: { authorization: components["schemas"]["PaymentAuthorizationSubmission"]; }; SubscriptionItem: { id: string; subscription_id: string; product_id: string; /** * @description Catalogue-plan lineage accepted for this item. The referenced offer may * later change or be retired without changing this item's contract. */ billing_plan_id?: string | null; /** Format: int32 */ quantity: number; unit_price?: string | null; configuration: components["schemas"]["LineConfiguration"]; /** Format: date-time */ added_at: string; /** Format: date-time */ removed_at?: string | null; metadata?: Record | null; }; /** * @description Lifecycle value stored by `billing_subscriptions.status`. The SQLx type * deliberately matches the physical VARCHAR column so checked row decoding * cannot fail after a successful compile. * @enum {string} */ SubscriptionStatus: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused"; /** * @description Storage discriminator for renewal tax identity. `LegacyCustomer` preserves * the historical behavior for contracts created before explicit checkout * authority existed; all new checkout contracts use `Anonymous` or `Linked`. * @enum {string} */ SubscriptionTaxCustomerAuthorityKind: "legacy_customer" | "anonymous" | "linked"; SubscriptionWithDetails: { subscription: components["schemas"]["BillingSubscription"]; catalogue_product?: null | components["schemas"]["Product"]; billing_plan?: null | components["schemas"]["ProductBillingPlan"]; items: components["schemas"]["SubscriptionItem"][]; latest_invoice?: null | components["schemas"]["BillingInvoice"]; latest_invoice_line_items?: components["schemas"]["BillingInvoiceLineItem"][] | null; }; /** * @description Support-agent behavior controls. In-window proactive follow-ups ship * enabled because the 24h window + reply guards bound the blast radius; * out-of-window proactiveness will arrive with its own (default-off) * controls. */ SupportPreferences: { /** @default true */ proactive_followups_enabled: boolean; }; /** @description Represents a tag with metadata, scoped to a business */ Tag: { id: string; business_id: string; name: string; slug: string; color?: string | null; icon?: string | null; description?: string | null; tag_group?: string | null; /** Format: int32 */ sort_order: number; /** Format: int32 */ usage_count: number; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; }; TagsResponse: { items: components["schemas"]["Tag"][]; /** Format: int64 */ total: number; /** Format: int64 */ limit: number; /** Format: int64 */ offset: number; }; /** @description Tax component information (lighter than full TaxComponent) */ TaxComponentInfo: { name: string; rate: string; description?: string | null; }; TaxPathComponent: { name: string; rate: string; }; /** * @description Reviewed ways a price may be presented to the selected audience. * @enum {string} */ TaxPriceDisplayMode: "unspecified" | "gross_required" | "gross_and_net" | "net_allowed"; TaxonomyWithChildren: components["schemas"]["ProductTaxonomy"] & { children: components["schemas"]["ProductTaxonomy"][]; }; /** @description Actions to take when approval workflow times out */ TimeoutAction: "Deny" | "Approve" | { /** @description Escalate to higher authority */ Escalate: string[]; } | "ManualReview"; /** @description Transactional communication rules */ TransactionalRules: { /** @description Whether transactional communications are enabled */ enabled: boolean; /** @description Channels approved for transactional messages */ approved_channels: string[]; /** @description Whether to send order confirmations */ send_order_confirmations: boolean; /** @description Whether to send status updates */ send_status_updates: boolean; /** @description Whether to send payment confirmations */ send_payment_confirmations: boolean; }; TrustChips: { /** Format: double */ on_time_delivery_percent?: number | null; /** Format: int64 */ delivery_sample_size: number; /** Format: int64 */ average_first_response_seconds?: number | null; /** Format: int64 */ support_sample_size: number; }; /** @description A comprehensive DTO for cart details to be sent to the frontend */ UICart: { id: string; business_id: string; session_id?: string | null; customer_id?: string | null; location_id?: string | null; /** Format: date-time */ created_at: string; /** Format: date-time */ updated_at: string; /** Format: date-time */ expires_at: string; status: string; source: string; channel: string; business_details?: null | components["schemas"]["CartBusiness"]; location_details?: null | components["schemas"]["CartLocation"]; customer_info: components["schemas"]["CartCustomer"]; items: components["schemas"]["CartItemDetails"][]; pricing: components["schemas"]["CartPricingInfo"]; requires_delivery: boolean; metadata: Record; }; /** @description Represents a UI-ready business category (menu section or product category) */ UICategory: { id: string; name: string; slug: string; description?: string | null; metadata: Record; }; UIVariantAxis: { id: string; name: string; /** Format: int32 */ display_order: number; values: components["schemas"]["UIVariantAxisValue"][]; }; UIVariantAxisValue: { id: string; name: string; /** Format: int32 */ display_order: number; color_hex?: string | null; image_url?: string | null; }; UnavailableLine: { line_id: string; reason: components["schemas"]["CheckoutInvalidationReason"]; }; /** @description A recurring sale that is not live now but returns at `starts_at`. */ UpcomingSale: { /** Format: date-time */ starts_at: string; badge_text?: string | null; }; UpdateCartItemQuantityBody: { /** Format: int32 */ quantity: number; }; UpdateOrderCustomerBody: { customer_id: string; }; UpdateOrderCustomerView: { success: boolean; message: string; }; UpdateProfileArgs: { name?: string | null; email?: string | null; phone?: string | null; }; ValidateDiscountBody: { discount_code: string; order_subtotal: string; location_id?: string | null; }; /** @description Variant axis value view. */ VariantAxisValueView: { id: string; name: string; color_hex?: string | null; image_url?: string | null; /** Format: int32 */ display_order: number; }; /** @description Variant axis view. */ VariantAxisView: { id: string; name: string; values: components["schemas"]["VariantAxisValueView"][]; }; VariantDetails: { variant_id: string; sku?: string | null; properties: { [key: string]: string; }; }; /** @description Details about a variant with its name and price adjustment */ VariantDetailsDTO: { id: string; name: string; price_adjustment: string; is_default: boolean; }; VariantDisplayAttribute: { axis_id: string; axis_name: string; value_id: string; value_name: string; }; /** * @description Defines how product variants should be fetched. * @enum {string} */ VariantStrategy: "fetch_all" | "use_axes"; /** @description Unified variant view for all product types. */ VariantView: { id: string; name: string; is_default: boolean; is_active: boolean; sku?: string | null; barcode?: string | null; price_adjustment?: string; price_info?: null | components["schemas"]["ChosenPrice"]; location_prices?: { [key: string]: components["schemas"]["ChosenPrice"]; } | null; axis_selections?: { [key: string]: string; } | null; display_attributes?: components["schemas"]["VariantDisplayAttribute"][] | null; images?: string[] | null; /** Format: int32 */ duration_minutes?: number | null; duration_unit?: null | components["schemas"]["DurationUnit"]; skill_level_required?: string | null; /** Format: int32 */ staff_count_override?: number | null; /** Format: int32 */ capacity_override?: number | null; }; /** @description Vendor/supplier communication rules */ VendorCommunicationRules: { /** @description Whether vendor communications are enabled */ enabled: boolean; /** @description Allowed communication types with vendors */ allowed_types: string[]; /** @description Channels approved for vendor communication */ approved_channels: string[]; /** @description Whether to send inventory alerts to vendors */ inventory_alerts: boolean; /** @description Whether to send order notifications to vendors */ order_notifications: boolean; /** @description Vendor contact management */ vendor_contacts: { [key: string]: components["schemas"]["VendorContact"]; }; }; /** @description Vendor contact information */ VendorContact: { /** @description Vendor identifier */ vendor_id: string; /** @description Primary contact information */ primary_contact: { [key: string]: string; }; /** @description Secondary contacts */ secondary_contacts: { [key: string]: string; }[]; /** @description Preferred communication channels */ preferred_channels: string[]; /** @description Communication preferences */ preferences: components["schemas"]["VendorPreferences"]; }; /** @description Vendor communication preferences */ VendorPreferences: { /** @description Events vendor wants to receive */ subscribed_events: string[]; /** * Format: int32 * @description Maximum frequency of communications */ max_frequency?: number | null; /** @description Preferred language */ language?: string | null; /** @description Preferred timezone */ timezone?: string | null; }; VerifyOtpArgs: { /** @description Phone number or email used for OTP */ contact: string; /** @description OTP code to verify */ otp_code: string; /** @description Contact type: "phone" or "email" */ contact_type?: string | null; }; VerifyOtpView: { message: string; account_id: string; session_token: string; refresh_token: string; customer: components["schemas"]["Customer"]; }; /** @description A simpler cart response structure matching exactly what the web frontend expects */ WebCartResponse: { cart: components["schemas"]["UICart"]; /** Format: int32 */ cart_count: number; message?: string | null; }; /** @description Working hours configuration for roles */ WorkingHours: { /** @description Days of the week user works */ working_days: string[]; /** @description Start time for working hours */ start_time: string; /** @description End time for working hours */ end_time: string; /** @description Timezone for working hours */ timezone: string; /** @description Whether to receive urgent messages outside working hours */ urgent_outside_hours: boolean; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } type BillingFrequency = "weekly" | "biweekly" | "monthly" | "quarterly" | "annually"; type BillingPlanType = "subscription" | "installment"; type BillingMarkupType = "fixed" | "percentage"; interface ProductBillingPlan { id: string; product_id: string; business_id: string; frequency: BillingFrequency; fulfillment_frequency?: BillingFrequency | null; plan_type: BillingPlanType; installment_periods?: number | null; trial_days: number; setup_fee: number; markup_type?: BillingMarkupType | null; markup_amount?: number | null; customer_group_id?: string | null; min_quantity?: number | null; min_order_value?: number | null; max_cycles?: number | null; is_active: boolean; created_at: string; updated_at: string; metadata?: Record; } interface EligiblePlansQuery { customer_id?: string; quantity?: number; order_value?: number; } interface FormattedPlanOption { plan: ProductBillingPlan; label: string; pricePerPeriod: number; totalPrice?: number; } type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused"; interface Subscription { id: string; customer_id: string; billing_plan_id?: string; business_id?: string; status: SubscriptionStatus; current_period_start: string; current_period_end: string; next_billing_date?: string; trial_start?: string; trial_end?: string; canceled_at?: string; cancel_at_period_end: boolean; location_id?: string; installment_total?: number; installment_per_period?: number; installment_periods_remaining?: number; origin_order_id?: string; skip_next_renewal: boolean; cycles_completed: number; source?: string; source_id?: string; frequency?: BillingFrequency | null; fulfillment_frequency?: BillingFrequency | null; contract_ends_at?: string; created_at: string; updated_at: string; metadata?: Record; } interface SubscriptionItem { id: string; subscription_id: string; product_id: string; quantity: number; added_at: string; removed_at?: string; metadata?: Record; } interface SubscriptionInvoice { id: string; subscription_id: string; amount_due: number; amount_paid: number; currency: string; status: string; period_start: string; period_end: string; created_at: string; } interface SubscriptionWithDetails { subscription: Subscription; billing_plan?: ProductBillingPlan | null; catalogue_product?: Product | null; items: SubscriptionItem[]; latest_invoice?: SubscriptionInvoice | null; } type S = components["schemas"]; /** Live claim progress for a capped sale ("73 of 100 claimed"). */ type SaleCapInfo = S["SaleCapInfo"]; /** * The sales-engine overlay applied to a price, as surfaced by the pricing API * (`PriceResponse.sale`). Drives the storefront strikethrough, "% OFF" badge, * countdown, and claim counter. Money fields arrive as strings. */ type SaleInfo = S["SaleInfo"]; /** * A recurring sale that isn't live right now but returns at `starts_at` — the * "back this Saturday" teaser. Surfaced on a product only when it has no live * `sale`. Drives {@link SaleTeaser}. */ type UpcomingSale = S["UpcomingSale"]; type ProductType = "product" | "service" | "digital" | "bundle" | "composite"; declare const PRODUCT_TYPE: { Product: "product"; Service: "service"; Digital: "digital"; Bundle: "bundle"; Composite: "composite"; }; type ProductRenderHint = "food" | "physical" | "general"; declare const RENDER_HINT: { Food: "food"; Physical: "physical"; General: "general"; }; type DisplayMode = "card" | "page"; type InventoryType = "one_to_one" | "composition" | "none"; type VariantStrategy = "fetch_all" | "use_axes"; type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code"; type DepositType = "none" | "fixed" | "percentage"; type SchedulingMode = "intraday" | "multi_day"; type DurationUnit = "minutes" | "hours" | "days" | "nights" | "weeks" | "months" | "years"; declare const DURATION_UNIT: { Minutes: "minutes"; Hours: "hours"; Days: "days"; Nights: "nights"; Weeks: "weeks"; Months: "months"; Years: "years"; }; /** How a multi-day booking's start/end are described (handover vocabulary). */ type BoundaryKind = "check_in_out" | "pickup_return" | "delivery_collection" | "access_vacate" | "move_in_out" | "custom"; declare const BOUNDARY_KIND: { CheckInOut: "check_in_out"; PickupReturn: "pickup_return"; DeliveryCollection: "delivery_collection"; AccessVacate: "access_vacate"; MoveInOut: "move_in_out"; Custom: "custom"; }; type SalesChannel = "pos" | "online" | "marketplace" | "partners"; type AttributeType = "text" | "textarea" | "number" | "currency" | "boolean" | "single_select" | "multi_select" | "radio" | "date" | "url" | "color" | "image" | "file" | "product_reference" | "category_reference" | "collection_reference" | "variant_reference" | "list_text" | "list_number" | "list_date" | "dimension" | "weight" | "volume"; type AttributeAppliesTo = "product" | "variant" | "both" | "category" | "collection" | "all"; type AttributeVisibility = "admin_only" | "storefront_read" | "public"; type MeasurementValue = { value: number; unit: string; }; interface AttributeValidationRules { min_length?: number; max_length?: number; regex?: string; min?: number | string; max?: number | string; max_precision?: number; min_selections?: number; max_selections?: number; } interface CustomAttributeDefinition { id: string; business_id: string; namespace: string; name: string; slug: string; description?: string; attribute_type: AttributeType; options?: string[]; unit?: string; validation?: AttributeValidationRules | null; is_required: boolean; is_filterable: boolean; visibility: AttributeVisibility; display_order: number; group_name?: string; applies_to: AttributeAppliesTo; created_at: string; updated_at: string; } interface CustomAttributeValue { definition_id: string; namespace: string; name: string; slug: string; attribute_type: AttributeType; group_name?: string; unit?: string; value: string | number | boolean | string[] | MeasurementValue | null; is_filterable: boolean; visibility: AttributeVisibility; } type PropertySource = "attribute" | "variant"; interface ProductProperty { name: string; slug: string; source: PropertySource; value_type: string; values: (string | number | boolean | null)[]; group_name?: string; unit?: string; is_filterable: boolean; } interface PropertyFacet { name: string; slug: string; source: string; values: FacetValue[]; } interface FacetValue { value: string; count: number; } interface TaxonomyAttributeTemplate { id: string; taxonomy_id: string; name: string; slug: string; attribute_type: "boolean" | "single_select"; options?: string[]; is_required: boolean; display_order: number; gpc_attribute_code?: number; created_at: string; } interface KnowledgeArticle { id: string; title: string; slug: string; content: string; category?: string; tags: string[]; created_at: string; updated_at: string; } interface Product { id: string; business_id: string; category_id?: string; name: string; slug: string; description?: string; image_url?: string; default_price: Money; /** Currency of `default_price`, resolved by the canonical pricing engine. */ currency?: CurrencyCode | null; /** Sales-engine overlay from the pricing API, when the product is on sale. */ sale?: SaleInfo | null; /** A recurring sale that returns soon — present only when there's no live `sale`. */ upcoming_sale?: UpcomingSale | null; type: ProductType; render_hint?: ProductRenderHint; display_mode?: DisplayMode; /** Present on list payloads too — the menu serializes these on every item. */ variants?: VariantView[]; variant_axes?: VariantAxisWithValues[]; add_on_ids?: string[]; inventory_type: InventoryType; variant_strategy: VariantStrategy; inventory_status?: { in_stock: boolean; stock_level?: number; low_stock: boolean; }; is_active: boolean; created_at: string; updated_at: string; metadata?: Record; tags?: string[]; images?: string[]; calories?: number; allergies?: string[]; recipe?: Record; sku?: string; barcode?: string; ean?: string; upc?: string; is_trackable?: boolean; is_tracked?: boolean; is_tracked_in_store?: boolean; is_tracked_in_warehouse?: boolean; inventory_threshold?: number; external_id?: string; external_source?: string; download_url?: string; digital_type?: DigitalProductType; max_downloads?: number; license_key_required?: boolean; file_size_mb?: number; file_hash?: string; file_type?: string; version?: string; download_expires_days?: number; license_key_format?: string; max_activations?: number; validity_days?: number; event_id?: string; event_date?: string; venue?: string; ticket_type?: string; seat_info?: Record; access_type?: string; access_level?: string; access_duration_days?: number; code_type?: string; code_value?: Money; code_currency?: CurrencyCode; scheduling_mode?: SchedulingMode; duration_value?: number; duration_minutes?: number; duration_unit?: DurationUnit; preparation_time_minutes?: number; staff_required_count?: number; buffer_before_minutes?: number; buffer_after_minutes?: number; general_service_capacity?: number; deposit_type?: DepositType; deposit_amount?: Money; cancellation_window_minutes?: number; no_show_fee?: Money; partial_refund_percentage?: number; max_free_reschedules?: number; reschedule_fee?: Money; no_show_deadline_minutes?: number; cancellation_notice_days?: number; early_termination_fee?: Money; pro_rata_refund?: boolean; requires_specific_staff?: boolean; requires_specific_resource?: boolean; min_stay?: number; max_stay?: number; check_in_time?: string; check_out_time?: string; price_basis?: "flat" | "per_person" | "per_duration_unit"; boundary_kind?: BoundaryKind | null; boundary_start_label?: string | null; boundary_end_label?: string | null; hs_code?: string; mid_code?: string; material?: string; allow_backorder?: boolean; item_condition?: string; vendor?: string; length_mm?: number; width_mm?: number; height_mm?: number; channels?: SalesChannel[]; meta_title?: string; meta_description?: string; is_discountable?: boolean; taxonomy_id?: string; bundle_price?: Money; discount_value?: Money; pricing_type?: BundlePriceType; components?: BundleComponentView[]; composite_id?: string; groups?: CompositeGroupView[]; custom_attributes?: CustomAttributeValue[]; properties?: ProductProperty[]; billing_plans?: ProductBillingPlan[]; quantity_pricing?: QuantityPricingTier[]; min_order_quantity?: number; input_fields?: ProductInputField[]; upsells?: RelatedProductView[]; cross_sells?: RelatedProductView[]; } type InputFieldType = "text" | "textarea" | "number" | "select" | "radio" | "checkbox" | "color" | "date" | "file" | "image" | "url" | "address" | "phone" | "email" | "date_time" | "time" | "signature" | "multi_select" | "date_range" | "location"; declare const INPUT_FIELD_TYPE: { Text: "text"; Textarea: "textarea"; Number: "number"; Select: "select"; Radio: "radio"; Checkbox: "checkbox"; Color: "color"; Date: "date"; File: "file"; Image: "image"; Url: "url"; Address: "address"; Phone: "phone"; Email: "email"; DateTime: "date_time"; Time: "time"; Signature: "signature"; MultiSelect: "multi_select"; DateRange: "date_range"; Location: "location"; }; interface AddressValue { formatted_address: string; street_address?: string; apartment?: string; city?: string; region?: string; postal_code?: string; country?: string; latitude: number; longitude: number; place_id?: string; } interface PhoneValue { country_code: string; number: string; formatted: string; } interface DateRangeValue { start: string; end: string; } interface LocationValue { latitude: number; longitude: number; label?: string; } interface SignatureValue { data_url: string; signer_name?: string; } interface InputFieldValidation { max_length?: number; min_length?: number; min_value?: number; max_value?: number; accepted_formats?: string[]; max_size_mb?: number; pattern?: string; allowed_countries?: string[]; max_selections?: number; } type SemanticKind = "allergen" | "dietary_preference" | "sensitivity" | "consent"; interface ProductInputField { id: string; product_id: string; name: string; slug: string; field_type: InputFieldType; is_required: boolean; display_order: number; placeholder?: string; help_text?: string; validation?: InputFieldValidation; options?: string[]; price_adjustment?: Money; semantic_kind?: SemanticKind; } interface CustomerInputValue { field_id: string; field_name: string; field_type: string; value: unknown; semantic_kind?: SemanticKind; } interface QuantityPricingTier { min_quantity: number; max_quantity?: number; unit_price: Money; } interface RelatedProductView { product_id: string; name: string; slug: string; image_url?: string; price: Money; source: string; } interface ProductWithDetails extends Product { category?: Category; add_ons?: AddOnWithOptions[]; location_prices?: LocationProductPrice[]; location_availability?: ProductAvailability[]; time_profiles?: ProductTimeProfile[]; } interface VariantView { id: string; name: string; is_default: boolean; sku?: string; barcode?: string; price_adjustment: Money; /** Canonical evaluated unit price in the active shopper/location scope. */ price_info?: ChosenPrice; location_prices?: Record; axis_selections?: Record; display_attributes?: VariantDisplayAttribute[]; images?: string[]; scheduling_mode?: SchedulingMode; duration_value?: number; duration_minutes?: number; duration_unit?: DurationUnit; skill_level_required?: string; staff_count_override?: number; capacity_override?: number; } interface ProductVariant { id: string; name?: string; business_id: string; product_id: string; component_multiplier: Money; price_adjustment: Money; is_default: boolean; created_at: string; updated_at: string; is_active?: boolean; is_archived?: boolean; is_deleted?: boolean; inventory_threshold?: number; images?: string[]; external_id?: string; external_source?: string; ean?: string; upc?: string; is_trackable?: boolean; is_tracked?: boolean; is_tracked_in_store?: boolean; is_tracked_in_warehouse?: boolean; sku?: string; barcode?: string; download_url?: string; metadata?: Record; scheduling_mode?: SchedulingMode; duration_value?: number; duration_minutes?: number; duration_unit?: DurationUnit; max_downloads?: number; license_key?: string; display_attributes?: VariantDisplayAttribute[]; } interface VariantDisplayAttribute { axis_id: string; axis_name: string; value_id: string; value_name: string; } interface VariantAxis { id: string; business_id: string; product_id: string; name: string; display_order: number; affects_recipe: boolean; created_at: string; updated_at: string; metadata?: Record; } interface VariantAxisWithValues extends VariantAxis { values: VariantAxisValue[]; } interface VariantAxisValue { id: string; business_id: string; axis_id: string; name: string; display_order: number; color_hex?: string; image_url?: string; created_at: string; updated_at: string; metadata?: Record; } interface ProductVariantValue { variant_id: string; axis_value_id: string; business_id: string; created_at: string; updated_at: string; metadata?: Record; } interface VariantLocationAvailability { id: string; variant_id: string; location_id: string; business_id: string; is_available: boolean; is_in_stock: boolean; created_at: string; updated_at: string; metadata?: Record; } interface VariantAxisSelection { [axisName: string]: string; } interface AddOn { id: string; business_id: string; name: string; is_multiple_allowed: boolean; is_required: boolean; is_mutually_exclusive: boolean; min_selections?: number; max_selections?: number; created_at: string; updated_at: string; metadata?: Record; } interface AddOnWithOptions extends AddOn { options: AddOnOption[]; } interface AddOnOption { id: string; add_on_id: string; business_id: string; name: string; option_sku?: string; default_price?: Money; description?: string; is_required: boolean; is_mutually_exclusive: boolean; created_at: string; updated_at: string; metadata?: Record; } interface AddOnOptionPrice { id: string; add_on_option_id: string; location_id: string; business_id: string; price: Money; created_at: string; updated_at: string; metadata?: Record; } interface ProductAddOn { id: string; business_id: string; product_id: string; add_on_id: string; created_at: string; updated_at: string; metadata?: Record; } interface Category { id: string; business_id: string; name: string; slug: string; description?: string; product_count?: number; created_at: string; updated_at: string; metadata?: Record; } interface CategorySummary extends Category { product_count: number; } interface Collection { id: string; business_id: string; name: string; slug: string; description?: string; tags?: string[]; image_url?: string; channels?: SalesChannel[]; product_count?: number; created_at: string; updated_at: string; metadata?: Record; } interface CollectionSummary extends Collection { product_count: number; } interface CollectionProduct { id: string; collection_id: string; product_id: string; display_order?: number; created_at: string; updated_at: string; metadata?: Record; } type BundlePriceType = "fixed" | "percentage_discount" | "fixed_discount"; interface Bundle { id: string; business_id: string; product_id: string; name: string; slug: string; description?: string; image_url?: string; pricing_type: BundlePriceType; bundle_price?: Money; discount_value?: Money; product_count?: number; created_at: string; updated_at: string; metadata?: Record; } interface BundleSummary extends Bundle { product_count: number; } interface BundleProduct { id: string; bundle_id: string; product_id: string; variant_id?: string; allow_variant_choice: boolean; quantity: number; created_at: string; updated_at: string; metadata?: Record; } interface BundleWithDetails extends Bundle { product: Product; components: BundleComponentData[]; schedules?: ProductTimeProfile[]; availability?: Record; } interface BundleComponentData { component: BundleProduct; product: Product; variants: ProductVariant[]; variant_axes: VariantAxis[]; variant_axis_values: VariantAxisValue[]; product_variant_values: ProductVariantValue[]; } interface BundleComponentInfo { id: string; product_id: string; variant_id?: string; quantity: number; } interface BundleComponentView { id: string; product_id: string; product_name: string; product_description?: string; product_image_url?: string; product_type?: ProductType; effective_price: Money; quantity: number; variant_id?: string; allow_variant_choice: boolean; available_variants: BundleComponentVariantView[]; variant_axes?: VariantAxisView[]; duration_minutes?: number; duration_unit?: DurationUnit; } interface BundleComponentVariantView { id: string; is_default: boolean; display_name: string; price_adjustment: Money; } interface VariantAxisView { id: string; name: string; values: VariantAxisValueView[]; } interface VariantAxisValueView { id: string; value: string; } type CompositePricingMode = "additive" | "highest_per_group" | "highest_overall" | "tiered"; type GroupPricingBehavior = "additive" | "first_n_free" | "flat_fee" | "highest_only"; type ComponentSourceType = "product" | "stock" | "add_on" | "standalone"; interface Composite { id: string; business_id: string; product_id: string; base_price: Money; pricing_mode: CompositePricingMode; min_order_quantity?: number; max_order_quantity?: number; created_at: string; updated_at: string; metadata?: Record; } interface CompositeWithDetails extends Composite { product: Product; groups: ComponentGroupWithComponents[]; } interface ComponentGroup { id: string; composite_id: string; name: string; description?: string; display_order: number; min_selections: number; max_selections?: number; allow_quantity: boolean; max_quantity_per_component?: number; pricing_behavior: GroupPricingBehavior; pricing_behavior_config?: Record; icon?: string; color?: string; created_at: string; updated_at: string; } interface ComponentGroupWithComponents extends ComponentGroup { components: CompositeComponent[]; } interface CompositeGroupView { id: string; name: string; description?: string; min_selections: number; max_selections: number; allow_quantity: boolean; max_quantity_per_component?: number; display_order: number; components: CompositeComponentView[]; } interface CompositeComponentView { id: string; display_name?: string; display_description?: string; display_image_url?: string; price: Money; calories?: number; display_order: number; is_popular: boolean; is_premium: boolean; is_available: boolean; is_archived: boolean; product_type?: ProductType; source_type?: ComponentSourceType; } interface CompositeComponent { id: string; group_id: string; product_id?: string; variant_id?: string; stock_id?: string; add_on_id?: string; add_on_option_id?: string; display_name?: string; display_description?: string; display_image_url?: string; price: Money; price_per_additional?: Money; quantity_per_selection?: Money; waste_percentage?: Money; calories?: number; allergens?: string[]; display_order: number; is_popular: boolean; is_premium: boolean; is_available: boolean; is_archived: boolean; created_at: string; updated_at: string; } interface ComponentSelectionInput { component_id: string; quantity: number; variant_id?: string; add_on_option_id?: string; scheduled_start?: string; scheduled_end?: string; } interface CompositePriceResult { base_price: Money; components_total: Money; tier_applied?: string; final_price: Money; breakdown: ComponentPriceBreakdown[]; } interface ComponentPriceBreakdown { component_id: string; component_name: string; quantity: number; unit_price: Money; total_price: Money; group_id: string; source_type: ComponentSourceType; source_product_id?: string; source_stock_id?: string; } type PriceEntryType = "base" | "location" | "time" | "channel"; interface Price { id: string; product_id: string; location_id: string; business_id: string; price: Money; entry_type: PriceEntryType; created_at: string; updated_at: string; metadata?: Record; } type LocationProductPrice = Price; interface ProductAvailability { id: string; business_id: string; location_id: string; product_id: string; is_available: boolean; is_in_stock: boolean; created_at: string; updated_at: string; metadata?: Record; } interface ProductTimeProfile { id: string; business_id: string; product_id: string; day_of_week: number; start_time: string; end_time: string; created_at: string; updated_at: string; metadata?: Record; } interface ProductTaxonomy { id: string; code: string; name: string; description?: string; parent_id?: string; level: number; is_active: boolean; created_at: string; updated_at: string; } interface TaxonomyWithChildren extends ProductTaxonomy { children: ProductTaxonomy[]; } interface ProductAvailabilityNow { is_available: boolean; schedules_today: ProductTimeProfile[]; } type DealBenefitType = "percentage" | "fixed" | "free_item" | "buy_x_get_y_free" | "points"; interface Deal { id: string; description: string; benefit_type: DealBenefitType; value: Money; min_order_value?: Money; buy_quantity?: number; get_quantity?: number; stackable: boolean; starts_at: string; ends_at: string; product_ids: string[]; category_ids: string[]; collection_ids: string[]; } interface ProductDealInfo { product_id: string; deal_id: string; deal_name: string; benefit_type: DealBenefitType; value: Money; label: string; } interface DiscountValidation { is_eligible: boolean; discount_amount?: Money; deal?: Deal; ineligibility_reason?: string; } interface Tag { id: string; name: string; slug: string; color?: string; icon?: string; description?: string; tag_group?: string; sort_order: number; usage_count: number; created_at: string; updated_at: string; } interface TagsResponse { items: Tag[]; total: number; limit: number; offset: number; } type DestinationQuote = components["schemas"]["CheckoutDestinationQuoteResponse"]; type DestinationQuoteAddress = components["schemas"]["AddressInfo"]; interface DestinationQuoteInput { order_type: string; address_info: DestinationQuoteAddress; delivery_rate_id?: string | null; } type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned"; type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat"; type PriceSource = "default_item" | "custom" | { location_specific: string; } | { price_list: { list_id: string; item_id: string; }; } | { variant: string; } | { catalog: { catalog_id: string; item_id?: string | null; }; } | { composite: string; } | { bundle: string; }; type AdjustmentType = "time_based" | { location_based: string; } | { variant_based: string; } | { customer_segment: string; } | { customer_loyalty: string; } | { channel_markup: string; } | { discount: string; } | { bundle: string; } | { manual: string; } | { time_limited_promotion: { promotion_id: string; valid_until: string; }; } | { price_list_override: { price_list_id: string; quantity_break?: number | null; }; } | { catalog_override: { catalog_id: string; adjustment_type?: string | null; }; }; interface PriceAdjustment { adjustment_type: AdjustmentType; amount: Money; percentage?: Money; reason: string; applied_at: string; } interface TaxPathComponent { name: string; rate: Money; } interface PricePathTaxInfo { tax_rate: Money; tax_amount: Money; is_inclusive: boolean; components: TaxPathComponent[]; } interface PriceDecisionPath { base_price_source: PriceSource; adjustments: PriceAdjustment[]; context?: Record; } interface ChosenPrice { base_price: Money; final_price: Money; markup_percentage: Money; markup_amount: Money; markup_discount_percentage: Money; markup_discount_amount: Money; currency?: CurrencyCode; custom_fields?: Record; decision_path?: PriceDecisionPath; tax_info?: PricePathTaxInfo; pre_tax_price?: Money; } type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free"; interface AppliedDiscount { discount_id: string; discount_code?: string; discount_type: BenefitType; discount_value: Money; discount_amount: Money; applied_at: string; targeted_item_ids?: string[]; } interface DiscountBreakdown { item_discounts: Record; order_discounts: AppliedDiscount[]; } interface DiscountDetails { discounts: AppliedDiscount[]; total_discount_amount: Money; breakdown: DiscountBreakdown; } interface SelectedAddOnOption { option_id: string; add_on_id: string; name: string; price: Money; quantity: number; is_required: boolean; selected_at: string; price_info?: ChosenPrice; } interface AddOnDetails { selected_options: SelectedAddOnOption[]; total_add_on_price: Money; add_ons: CartAddOn[]; } interface CartAddOn { add_on_id: string; name: string; min_selections: number; max_selections: number; selected_options: string[]; is_required: boolean; } interface VariantDetails { variant_id: string; sku?: string; properties: Record; } interface BundleSelectionInput { component_id: string; variant_id?: string; quantity: number; scheduled_start?: string; scheduled_end?: string; } interface ComponentSchedulingData { scheduled_start?: string; scheduled_end?: string; service_status: string; confirmation_code?: string; booking_id?: string; primary_resource_id?: string; } interface BundleStoredSelection { component_id: string; product_id: string; product_name: string; variant_id?: string; variant_name?: string; quantity: number; unit_price: Money; product_type?: ProductType; scheduling?: ComponentSchedulingData; } interface BundleSelectionData { bundle_id: string; selections: BundleStoredSelection[]; } interface CompositeStoredSelection { component_id: string; component_name: string; quantity: number; group_id: string; source_type: "product" | "stock" | "add_on" | "standalone"; source_product_id?: string; source_stock_id?: string; unit_price: Money; product_type?: ProductType; scheduling?: ComponentSchedulingData; } interface CompositePriceBreakdown { base_price: Money; components_total: Money; tier_applied?: string; final_price: Money; } interface CompositeSelectionData { composite_id: string; selections: CompositeStoredSelection[]; breakdown: CompositePriceBreakdown; } type LineConfiguration = { type: "simple"; variant?: VariantDetails; add_ons?: AddOnDetails; customer_inputs?: CustomerInputValue[]; } | { type: "service"; variant?: VariantDetails; add_ons?: AddOnDetails; customer_inputs?: CustomerInputValue[]; scheduled_start?: string; scheduled_end?: string; confirmation_code?: string; service_status?: string; primary_staff_id?: string; primary_resource_id?: string; scheduling_metadata?: Record; price_basis?: "flat" | "per_person" | "per_duration_unit"; units?: number; duration_unit?: DurationUnit; } | { type: "bundle"; variant?: VariantDetails; input: BundleSelectionInput[]; resolved?: BundleSelectionData; add_ons?: AddOnDetails; customer_inputs?: CustomerInputValue[]; } | { type: "composite"; variant?: VariantDetails; input: ComponentSelectionInput[]; resolved?: CompositeSelectionData; add_ons?: AddOnDetails; customer_inputs?: CustomerInputValue[]; } | { type: "digital"; variant?: VariantDetails; add_ons?: AddOnDetails; customer_inputs?: CustomerInputValue[]; digital_type?: string; fulfillment_id?: string; }; interface Cart { id: string; business_id: string; customer_id?: string; session_id?: string; location_id?: string; created_at: string; updated_at: string; expires_at: string; subtotal: Money; tax_amount: Money; service_charge: Money; total_discounts: Money; total_price: Money; delivery_fee: Money; total_items: number; tax_rate?: Money; service_charge_rate?: Money; price_info: ChosenPrice; applied_discount_ids: string[]; applied_discount_codes: string[]; discount_details?: DiscountDetails; currency: CurrencyCode; customer_name?: string; customer_email?: string; customer_phone?: string; customer_address?: string; source: string; status: CartStatus; channel: string; order_id?: string; metadata?: Record; items: CartItem[]; } interface CartItem { id: string; cart_id: string; item_id: string; quantity: number; line_key: string; configuration: LineConfiguration; price: Money; add_ons_price: Money; price_info: ChosenPrice; applied_discount_ids: string[]; item_discount_amount: Money; discount_details?: DiscountDetails; created_at: string; updated_at: string; metadata?: Record; } interface CartTotals { subtotal: Money; tax_amount: Money; service_charge: Money; total_discounts: Money; total_price: Money; tax_rate?: Money; service_charge_rate?: Money; applied_discount_ids: string[]; applied_discount_codes: string[]; discount_details?: DiscountDetails; } interface DisplayCart { id: string; business_id: string; customer_id?: string; session_id?: string; location_id?: string; subtotal: Money; tax_amount: Money; service_charge: Money; total_discounts: Money; total_price: Money; delivery_fee: Money; total_items: number; tax_rate?: Money; service_charge_rate?: Money; currency: CurrencyCode; channel: string; status: string; business_name: string; business_logo?: string; location_name?: string; customer_name?: string; customer_email?: string; customer_phone?: string; customer_address?: string; items: DisplayCartItem[]; applied_discount_codes: string[]; discount_details?: DiscountDetails; } interface DisplayCartItem { id: string; cart_id: string; item_id: string; quantity: number; name: string; description?: string; image_url?: string; category_name?: string; is_available: boolean; preparation_time?: number; unit_price: Money; total_price: Money; add_ons_price: Money; price_info: ChosenPrice; item_discount_amount: Money; discount_details?: DiscountDetails; add_ons: DisplayAddOn[]; special_instructions?: string; } interface DisplayAddOn { id: string; name: string; min_selections: number; max_selections: number; is_required: boolean; selected_options: DisplayAddOnOption[]; } interface DisplayAddOnOption { id: string; name: string; price: Money; quantity: number; image_url?: string; description?: string; } interface UICartBusiness { name: string; logo_url?: string; contact_email?: string; contact_phone?: string; } interface UICartLocation { id?: string; name?: string; } interface UICartCustomer { id?: string; name?: string; email?: string; phone?: string; address?: string; } type TaxPriceDisplayMode = "unspecified" | "gross_required" | "gross_and_net" | "net_allowed"; interface UICartPricing { subtotal: Money; tax_amount: Money; service_charge: Money; total_discounts: Money; total_price: Money; tax_rate?: Money; service_charge_rate?: Money; currency: CurrencyCode; /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the * portion already inside `subtotal`/`total_price`, not an addition. */ tax_inclusive: boolean; /** Reviewed presentation policy, independent from whether tax arithmetic is * inclusive. Older backend responses may omit it. */ price_display_mode?: TaxPriceDisplayMode; /** Jurisdiction resolved by the checkout tax decision (for example, * `Austin, TX`). Absent until the cart has a destination decision; * clients must not infer it from the preview rate. */ tax_jurisdiction_label?: string | null; /** Deposit computed from the catalogue when the cart has deposit-eligible * service items; lets checkout offer "pay deposit now, balance later". */ deposit_required?: boolean; deposit_amount?: Money; } interface AddOnOptionDetails { id: string; name: string; price?: Money; is_required: boolean; description?: string; image_url?: string; } interface AddOnGroupDetails { id: string; name: string; is_multiple_allowed: boolean; min_selections: number; max_selections: number; required: boolean; options: AddOnOptionDetails[]; } interface VariantDetailsDTO { id: string; name: string; price: Money; price_adjustment: Money; is_default: boolean; } interface CartItemDetails { id: string; cart_id: string; item_id: string; quantity: number; line_key: string; line_type: "simple" | "service" | "bundle" | "composite" | "digital"; name: string; description?: string; image_url?: string; category_id?: string; category_name?: string; is_available: boolean; variant_id?: string; variant_details?: VariantDetails; variant_name?: string; variant_info?: VariantDetailsDTO; base_price: Money; add_ons_price: Money; total_price: Money; item_discount_amount: Money; price_info: ChosenPrice; add_on_option_ids: string[]; add_on_ids: string[]; add_on_details: AddOnDetails; add_on_options: AddOnOptionDetails[]; add_ons: AddOnGroupDetails[]; special_instructions?: string; scheduled_start?: string; scheduled_end?: string; confirmation_code?: string; service_status?: string; staff_id?: string; units?: number; scheduling_metadata?: Record; bundle_selections?: BundleSelectionInput[]; bundle_resolved?: BundleSelectionData; composite_selections?: ComponentSelectionInput[]; composite_resolved?: CompositeSelectionData; customer_inputs?: Array<{ field_id: string; field_name: string; field_type: string; value: unknown; }>; applied_discount_ids: string[]; discount_details?: DiscountDetails; created_at: string; updated_at: string; metadata?: Record; } interface UICart { id: string; business_id: string; session_id?: string; customer_id?: string; location_id?: string; created_at: string; updated_at: string; expires_at: string; status: string; source: string; channel: string; business_details?: UICartBusiness; location_details?: UICartLocation; customer_info: UICartCustomer; items: CartItemDetails[]; pricing: UICartPricing; requires_delivery?: boolean; metadata?: Record; } interface CartNotice { kind: "info" | "warning"; text: string; } interface CartMutationResult { cart: UICart; notice?: CartNotice; } interface AddToCartInput { item_id: string; quantity?: number; variant_id?: string; quote_id?: string; add_on_options?: string[]; special_instructions?: string; bundle_selections?: BundleSelectionInput[]; composite_selections?: ComponentSelectionInput[]; scheduled_start?: string; scheduled_end?: string; staff_id?: string; resource_id?: string; units?: number; billing_plan_id?: string; customer_inputs?: Array<{ field_id: string; value: unknown; }>; } interface UpdateCartItemInput { quantity?: number; special_instructions?: string; } interface CartSummary { item_count: number; total_items: number; subtotal: Money; discount_amount: Money; tax_amount: Money; total: Money; currency: CurrencyCode; } declare const CHECKOUT_MODE: { readonly LINK: "link"; readonly GUEST: "guest"; }; declare const ORDER_TYPE: { readonly DELIVERY: "delivery"; readonly PICKUP: "pickup"; readonly DINE_IN: "dine-in"; readonly WALK_IN: "walk-in"; }; declare const PAYMENT_METHOD: { readonly MOBILE_MONEY: "mobile_money"; readonly CARD: "card"; }; declare const CHECKOUT_STEP: { readonly AUTHENTICATION: "authentication"; readonly ORDER_DETAILS: "order_details"; readonly PAYMENT_METHOD: "payment_method"; readonly PAYMENT: "payment"; readonly CONFIRMATION: "confirmation"; }; declare const CHECKOUT_STATUS: { readonly PREPARING: "preparing"; readonly REVIEWING_TERMS: "reviewing_terms"; readonly RECOVERING: "recovering"; readonly PROCESSING: "processing"; readonly AWAITING_AUTHORIZATION: "awaiting_authorization"; readonly POLLING: "polling"; readonly FINALIZING: "finalizing"; readonly SUCCESS: "success"; readonly FAILED: "failed"; }; declare const CHECKOUT_NEXT_ACTION: { readonly NONE: "none"; readonly CARD_POPUP: "card_popup"; readonly REDIRECT: "redirect"; readonly AUTHORIZATION: "authorization"; readonly TERMS_CHANGED: "terms_changed"; readonly SELECTION_UNAVAILABLE: "selection_unavailable"; readonly POLL: "poll"; }; declare const CHECKOUT_ORDER_RESULT_STATUS: { readonly CONFIRMED: "confirmed"; readonly UNKNOWN: "unknown"; }; declare const PAYMENT_STATE: { readonly INITIAL: "initial"; readonly PREPARING: "preparing"; readonly PROCESSING: "processing"; readonly VERIFYING: "verifying"; readonly AWAITING_AUTHORIZATION: "awaiting_authorization"; readonly SUCCESS: "success"; readonly ERROR: "error"; readonly TIMEOUT: "timeout"; }; declare const PICKUP_TIME_TYPE: { readonly ASAP: "asap"; readonly SCHEDULED: "scheduled"; }; declare const MOBILE_MONEY_PROVIDER: { readonly MTN: "mtn"; readonly VODAFONE: "vodafone"; readonly TELECEL: "telecel"; readonly AIRTEL: "airtel"; readonly AIRTELTIGO: "airteltigo"; readonly MPESA: "mpesa"; }; declare const AUTHORIZATION_TYPE: { readonly OTP: "otp"; readonly PIN: "pin"; readonly PHONE: "phone"; readonly BIRTHDAY: "birthday"; readonly ADDRESS: "address"; }; /** Hard stop for provider-controlled sequential checkout challenges. */ declare const MAX_PAYMENT_AUTHORIZATION_STEPS = 8; declare const DEVICE_TYPE: { readonly MOBILE: "mobile"; readonly DESKTOP: "desktop"; readonly TABLET: "tablet"; readonly UNKNOWN: "unknown"; }; declare const CONTACT_TYPE: { readonly PHONE: "phone"; readonly EMAIL: "email"; }; declare const LINK_QUERY: { readonly DATA: "link.data"; readonly ADDRESSES: "link.addresses"; readonly MOBILE_MONEY: "link.mobile_money"; readonly PREFERENCES: "link.preferences"; readonly SESSIONS: "link.sessions"; }; declare const LINK_MUTATION: { readonly CHECK_STATUS: "link.check_status"; readonly ENROLL: "link.enroll"; readonly ENROLL_AND_LINK_ORDER: "link.enroll_and_link_order"; readonly UPDATE_PREFERENCES: "link.update_preferences"; readonly CREATE_ADDRESS: "link.create_address"; readonly UPDATE_ADDRESS: "link.update_address"; readonly DELETE_ADDRESS: "link.delete_address"; readonly SET_DEFAULT_ADDRESS: "link.set_default_address"; readonly TRACK_ADDRESS_USAGE: "link.track_address_usage"; readonly CREATE_MOBILE_MONEY: "link.create_mobile_money"; readonly DELETE_MOBILE_MONEY: "link.delete_mobile_money"; readonly SET_DEFAULT_MOBILE_MONEY: "link.set_default_mobile_money"; readonly TRACK_MOBILE_MONEY_USAGE: "link.track_mobile_money_usage"; readonly VERIFY_MOBILE_MONEY: "link.verify_mobile_money"; readonly REVOKE_SESSION: "link.revoke_session"; readonly REVOKE_ALL_SESSIONS: "link.revoke_all_sessions"; }; declare const AUTH_MUTATION: { readonly REQUEST_OTP: "auth.request_otp"; readonly VERIFY_OTP: "auth.verify_otp"; }; declare const CHECKOUT_MUTATION: { readonly PROCESS: "checkout.process"; }; declare const PAYMENT_MUTATION: { readonly SUBMIT_AUTHORIZATION: "payment.submit_authorization"; readonly CHECK_STATUS: "order.poll_payment_status"; }; declare const ORDER_MUTATION: { readonly UPDATE_CUSTOMER: "order.update_order_customer"; }; declare const DEFAULT_CURRENCY = "GHS"; declare const DEFAULT_COUNTRY = "GHA"; type MobileMoneyProvider = (typeof MOBILE_MONEY_PROVIDER)[keyof typeof MOBILE_MONEY_PROVIDER]; interface Customer { id: string; email: string | null; phone: string | null; name: string; delivery_address: string | null; created_at: string; updated_at: string; metadata?: Record | null; account_id?: string | null; } interface CustomerAddress { id: string; customer_id: string; label: string; street_address: string; apartment: string | null; city: string; region: string; postal_code: string | null; country: string | null; delivery_instructions: string | null; phone_for_delivery: string | null; latitude: number | null; longitude: number | null; is_default: boolean | null; usage_count: number | null; last_used_at: string | null; created_at: string; updated_at: string; } interface CustomerMobileMoney { id: string; customer_id: string; phone_number: string; provider: string; label: string; is_verified: boolean | null; verification_date: string | null; is_default: boolean | null; usage_count: number | null; last_used_at: string | null; success_rate: number | null; created_at: string; updated_at: string; } interface CustomerLinkPreferences { customer_id: string; is_link_enabled: boolean | null; enrolled_at: string | null; enrollment_business_id: string | null; preferred_order_type: string | null; default_address_id: string | null; default_mobile_money_id: string | null; remember_me: boolean | null; session_duration_days: number | null; two_factor_enabled: boolean | null; notify_on_order: boolean | null; notify_on_payment: boolean | null; created_at: string; updated_at: string; } interface LinkData { customer: Customer; addresses: CustomerAddress[]; mobile_money: CustomerMobileMoney[]; preferences: CustomerLinkPreferences; default_address: CustomerAddress | null; default_mobile_money: CustomerMobileMoney | null; } interface CreateAddressInput { label?: string; street_address: string; apartment?: string; city: string; region?: string; postal_code?: string; country?: string; delivery_instructions?: string; phone_for_delivery?: string; latitude?: number; longitude?: number; } interface UpdateAddressInput { address_id: string; label?: string; street_address?: string; apartment?: string; city?: string; region?: string; postal_code?: string; country?: string; delivery_instructions?: string; phone_for_delivery?: string; latitude?: number; longitude?: number; clear_coordinates?: boolean; } interface CreateMobileMoneyInput { phone_number: string; provider: MobileMoneyProvider; label?: string; } interface EnrollmentData { contact: string; name?: string; } interface AddressData { label: string; street_address: string; apartment?: string; city: string; region: string; postal_code?: string; country?: string; delivery_instructions?: string; phone_for_delivery?: string; latitude?: number; longitude?: number; } interface MobileMoneyData { phone_number: string; provider: string; label: string; } interface EnrollAndLinkOrderInput { order_id: string; business_id: string; address?: AddressData; mobile_money?: MobileMoneyData; order_type?: string; } interface LinkStatusResult { is_link_customer: boolean; } interface LinkEnrollResult { success: boolean; customer_id: string; contact?: string; enrolled_at?: string; preferences?: CustomerLinkPreferences; } interface EnrollAndLinkOrderResult { success: boolean; customer_id: string; order_id: string; enrollment_result: unknown; linked_at: string; } type DeviceType = (typeof DEVICE_TYPE)[keyof typeof DEVICE_TYPE]; interface LinkSession { id: string; device_name: string | null; device_type: DeviceType | null; ip_address: string | null; last_used_at: string | null; created_at: string; is_current: boolean; } interface RevokeSessionResult { success: boolean; session_id: string; message: string; } interface RevokeAllSessionsResult { success: boolean; revoked_count: number; message: string; } type ContactType = (typeof CONTACT_TYPE)[keyof typeof CONTACT_TYPE]; interface RequestOtpInput { contact: string; contact_type: ContactType; } interface RequestOtpResult { success: boolean; /** Absent on pre-challenge-id deployments; verification then uses the * contact's legacy active challenge. */ challenge_id?: string; message: string; expires_in: number; is_new_account: boolean; } interface VerifyOtpInput { /** Omit when request-otp came from a legacy deployment without an id. */ challenge_id?: string; contact: string; contact_type: ContactType; otp_code: string; } interface AuthResponse { success: boolean; session_token: string | null; refresh_token?: string | null; account_id?: string | null; customer_id: string | null; name?: string | null; email?: string | null; phone?: string | null; message: string; } type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "not_required" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending"; type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual"; type PaymentMethodType = "card" | "bank_transfer" | "cash" | { mobile_money: { provider: string; phone_number: string; }; } | { ussd: { provider: string; }; } | { bank: { bank_code: string; account_number: string; account_name?: string; bank_name?: string; }; } | { qr: { provider: string; }; } | { wallet: { provider: string; }; } | { crypto: { currency: string; }; } | { custom: string; }; interface AddressAuthorizationData { address: string; city: string; state: string; zip_code: string; } type PaymentAuthorizationKind = "otp" | "pin" | "phone" | "birthday" | "address"; type AuthorizationType = Exclude | { address: AddressAuthorizationData; }; /** Customer input for one provider-requested authorization challenge. */ type PaymentAuthorizationSubmission = { type: Exclude; value: string; } | ({ type: "address"; } & AddressAuthorizationData); type PaymentProcessingState = "initial" | "preparing" | "processing" | "verifying" | "awaiting_authorization" | "success" | "error" | "timeout"; interface PaymentMethod { type: PaymentMethodType; provider?: string; phone_number?: string; card_last_four?: string; custom_value?: string; } interface Payment { id: string; order_id: string; business_id: string; amount: Money; currency: CurrencyCode; payment_method: PaymentMethod; status: PaymentStatus; provider: PaymentProvider; provider_reference?: string; failure_reason?: string; created_at: string; updated_at: string; } interface InitializePaymentResult { payment_id: string; status: PaymentStatus; redirect_url?: string; authorization_url?: string; reference: string; provider: PaymentProvider; } interface PaymentResponse { method: string; provider: string; requires_action: boolean; public_key?: string; client_secret?: string; access_code?: string; redirect_url?: string; transaction_id?: string; order_id?: string; reference?: string; metadata?: Record; instructions?: string; display_text?: string; requires_authorization?: boolean; authorization_type?: AuthorizationType; provider_payment_id?: string; } interface PaymentStatusResponse { status: PaymentStatus; paid: boolean; amount: Money; currency: string; reference?: string; message: string; } interface PaymentErrorDetails { code: string; message: string; recoverable: boolean; technical?: string; } interface SubmitAuthorizationInput { /** * Opaque payment id returned by this CheckoutService instance's `process()` * action response. The deprecated adapter resolves it only to the matching * in-memory purchase-intent + attempt authority. */ payment_id: string; authorization: PaymentAuthorizationSubmission; } declare const PURCHASE_INTENT_SOURCE_KIND: { readonly PRODUCT: "product"; readonly COLLECTION: "collection"; readonly SALE: "sale"; readonly POST: "post"; readonly LIVE: "live"; readonly CART: "cart"; readonly CHAT: "chat"; readonly MANUAL: "manual"; }; /** The durable commerce object a shopper is agreeing to buy. */ type PurchaseIntentSourceInput = { kind: typeof PURCHASE_INTENT_SOURCE_KIND.PRODUCT; product_id: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.COLLECTION; collection_id: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.SALE; sale_id: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.POST; signed_handoff: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.LIVE; signed_handoff: string; signed_beat_identity: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.CART; cart_id: string; } | { kind: typeof PURCHASE_INTENT_SOURCE_KIND.CHAT; thread_id: string; }; declare const PURCHASING_PRINCIPAL_KIND: { readonly ACCOUNT: "account"; readonly BUSINESS: "business"; readonly GUEST: "guest"; readonly RECOGNISED: "recognised"; }; /** Public buyer classification. Contact, customer, and session authority stay server-side. */ type PurchasingPrincipal = { kind: typeof PURCHASING_PRINCIPAL_KIND.ACCOUNT; account_id: string; } | { kind: typeof PURCHASING_PRINCIPAL_KIND.BUSINESS; business_id: string; } | { kind: typeof PURCHASING_PRINCIPAL_KIND.GUEST; } | { kind: typeof PURCHASING_PRINCIPAL_KIND.RECOGNISED; verified: boolean; }; type CheckoutSourceKind = (typeof PURCHASE_INTENT_SOURCE_KIND)[keyof typeof PURCHASE_INTENT_SOURCE_KIND]; declare const PURCHASE_INTENT_STATUS: { readonly DRAFT: "draft"; readonly OPEN: "open"; readonly CONVERTED: "converted"; readonly CANCELLED: "cancelled"; readonly EXPIRED: "expired"; }; type PurchaseIntentStatus = (typeof PURCHASE_INTENT_STATUS)[keyof typeof PURCHASE_INTENT_STATUS]; declare const PURCHASE_INTENT_SELLABLE_KIND: { readonly PRODUCT: "product"; readonly VARIANT: "variant"; }; type SellableKind = (typeof PURCHASE_INTENT_SELLABLE_KIND)[keyof typeof PURCHASE_INTENT_SELLABLE_KIND]; declare const PURCHASE_INTENT_OFFER_KIND: { readonly CATALOGUE: "catalogue"; readonly SALE: "sale"; readonly RAPID: "rapid"; }; type CheckoutOfferKind = (typeof PURCHASE_INTENT_OFFER_KIND)[keyof typeof PURCHASE_INTENT_OFFER_KIND]; interface SellableRef { kind: SellableKind; product_id: string; variant_id?: string | null; location_id: string; } interface OfferRef { kind: CheckoutOfferKind; id: string; version: string; } interface PurchaseIntentCustomerInput { field_id: string; field_name?: string; field_type?: string; value: unknown; } interface NativeAddOnSelection { option_id: string; quantity: number; } declare const PURCHASE_INTENT_LINE_CONFIGURATION_KIND: { readonly SIMPLE: "simple"; readonly CART: "cart"; }; type PurchaseIntentSimpleLineConfiguration = { kind: typeof PURCHASE_INTENT_LINE_CONFIGURATION_KIND.SIMPLE; variant_id?: string | null; add_ons?: NativeAddOnSelection[]; customer_inputs?: PurchaseIntentCustomerInput[]; }; /** Exact Cart configuration frozen by the server-held Cart adapter. */ type PurchaseIntentLineConfiguration = PurchaseIntentSimpleLineConfiguration | { kind: typeof PURCHASE_INTENT_LINE_CONFIGURATION_KIND.CART; configuration: LineConfiguration; }; interface PurchaseIntentLineInput { sellable: SellableRef; quantity: number; /** Public direct lines cannot claim Cart-owned commercial authority. */ configuration: PurchaseIntentSimpleLineConfiguration; offer?: OfferRef | null; } interface PurchaseIntentLineView extends Omit { id: string; ordinal: number; configuration: PurchaseIntentLineConfiguration; } /** Frozen current-terms money keyed by the durable intent line ID. */ interface PurchaseIntentLinePricingView { intent_line_id: string; quantity: number; unit_price: Money; line_subtotal: Money; currency: CurrencyCode; } interface CheckoutDestinationInput { address_id: string; delivery_rate_id?: string | null; } /** * Mutable cart-door inputs which are frozen into immutable terms at mint. * Keeping them in one object prevents legacy form fields leaking into every * catalogue-direct source variant. */ interface CartIntentCheckoutInput { customer: CheckoutCustomerInfo; order_type: CheckoutOrderType; address_info: CheckoutAddressInfo; location_id?: string; delivery_rate_id?: string; special_instructions?: string; link_address_id?: string; link_payment_method_id?: string; metadata?: Record; pay_currency?: CurrencyCode; fx_quote_id?: string; use_store_credit?: boolean; voucher_code?: string; pay_deposit?: boolean; /** Presentation/default hint only; it never suppresses eligible server-issued options. */ tender_preference?: PurchaseIntentTenderPreference; } declare const MOBILE_MONEY_TENDER_AUTHORITY_KIND: { readonly TRANSIENT: "transient"; readonly SAVED_REFERENCE: "saved_reference"; }; /** Canonical networks that may cross the PurchaseIntent terms boundary. */ declare const PURCHASE_INTENT_MOBILE_MONEY_NETWORK: { readonly MTN: "mtn"; readonly TELECEL: "telecel"; readonly AIRTEL: "airtel"; }; type PurchaseIntentMobileMoneyNetwork = (typeof PURCHASE_INTENT_MOBILE_MONEY_NETWORK)[keyof typeof PURCHASE_INTENT_MOBILE_MONEY_NETWORK]; type MobileMoneyTenderPreference = { authority_kind: typeof MOBILE_MONEY_TENDER_AUTHORITY_KIND.TRANSIENT; phone_number: string; network: PurchaseIntentMobileMoneyNetwork; } | { authority_kind: typeof MOBILE_MONEY_TENDER_AUTHORITY_KIND.SAVED_REFERENCE; stored_instrument_id: string; }; type PurchaseIntentTenderPreference = { method_kind: typeof PURCHASE_INTENT_PAYMENT_METHOD.CARD; stored_instrument_id?: string; } | { method_kind: typeof PURCHASE_INTENT_PAYMENT_METHOD.MOBILE_MONEY; authority: MobileMoneyTenderPreference; }; interface MintPurchaseIntentBase { client_intent_key: string; destination?: CheckoutDestinationInput | null; } type MintPurchaseIntentRequest = (MintPurchaseIntentBase & { source: Extract; checkout: CartIntentCheckoutInput; lines?: never; }) | (MintPurchaseIntentBase & { source: Exclude; lines: PurchaseIntentLineInput[]; checkout?: never; }); /** Owner-fenced material transition for a principal-free hosted Cart draft. */ interface PreparePurchaseIntentRequest { expected_intent_revision: number; idempotency_key: string; checkout: CartIntentCheckoutInput; } interface CanonicalSourceAuthority { store_region?: string | null; native_platform?: NativePurchasePlatform | null; purchase_surface?: CheckoutPurchaseSurface; kind: CheckoutSourceKind; source_id: string; social_post_id?: string | null; source_version: string; seller_business_id: string; /** Seller/source authority, never the buyer principal. */ subject: { kind: typeof PURCHASING_PRINCIPAL_KIND.ACCOUNT; account_id: string; } | { kind: typeof PURCHASING_PRINCIPAL_KIND.BUSINESS; business_id: string; }; binding_digest: string; } interface CheckoutMoneyComponents { currency: CurrencyCode; subtotal: Money; discount_total: Money; tax_total: Money; delivery_total: Money; statutory_total: Money; total_obligation: Money; due_now: Money; /** Exact residual commerce principal collected by a selectable rail. */ rail_amount: Money; /** Exact saved-balance wallet allocation authorized by an Account principal. */ store_credit_consumed: Money; /** Exact bearer-voucher allocation, distinct from saved wallet balance. */ voucher_credit_consumed: Money; } interface CheckoutMaterialTerms { line_digest: string; destination_digest: string; delivery_promise_digest: string; entitlement_digest: string; cancellation_terms_digest: string; } declare const NATIVE_PURCHASE_PLATFORM: { readonly IOS: "ios"; readonly ANDROID: "android"; }; type NativePurchasePlatform = (typeof NATIVE_PURCHASE_PLATFORM)[keyof typeof NATIVE_PURCHASE_PLATFORM]; declare const CHECKOUT_PURCHASE_SURFACE: { readonly NATIVE_APP: "native_app"; readonly WEB: "web"; }; type CheckoutPurchaseSurface = (typeof CHECKOUT_PURCHASE_SURFACE)[keyof typeof CHECKOUT_PURCHASE_SURFACE]; declare const PURCHASE_SURFACE: { readonly NATIVE_IOS: "native_ios"; readonly NATIVE_ANDROID: "native_android"; readonly WEB: "web"; }; type PurchaseSurface = (typeof PURCHASE_SURFACE)[keyof typeof PURCHASE_SURFACE]; declare const PURCHASE_DISPOSITION: { readonly EXECUTE: "execute"; readonly STORE_PURCHASE: "store_purchase"; readonly LINK_OUT: "link_out"; readonly LOCKED: "locked"; }; type PurchaseDisposition = (typeof PURCHASE_DISPOSITION)[keyof typeof PURCHASE_DISPOSITION]; interface PurchasePolicyContext { policy_version: number; surface: PurchaseSurface; market_region: string; store_region?: string | null; } declare const CHECKOUT_COMPLIANCE_LANE: { readonly COMMERCE_CORE: "commerce_core"; readonly NATIVE: "native"; readonly STORE_KIT: "store_kit"; readonly PERMITTED_EXTERNAL: "permitted_external"; readonly BROWSE_ONLY: "browse_only"; }; type CheckoutComplianceLane = (typeof CHECKOUT_COMPLIANCE_LANE)[keyof typeof CHECKOUT_COMPLIANCE_LANE]; declare const CHECKOUT_COMPLIANCE_REASON: { readonly COMMERCE_CORE: "commerce_core"; readonly PHYSICAL_GOODS_NATIVE: "physical_goods_native"; readonly PHYSICAL_WORLD_COMMERCE_NATIVE: "physical_world_commerce_native"; readonly STORE_KIT_REQUIRED: "store_kit_required"; readonly PERMITTED_EXTERNAL_PURCHASE: "permitted_external_purchase"; readonly DISTRIBUTION_AUTHORITY_UNVERIFIED: "distribution_authority_unverified"; readonly PRODUCT_POLICY_UNRESOLVED: "product_policy_unresolved"; readonly MIXED_LANE_UNSUPPORTED: "mixed_lane_unsupported"; readonly EXTERNAL_DIGITAL_NATIVE: "external_digital_native"; readonly MIXED_FACTS_NATIVE: "mixed_facts_native"; readonly UNRESOLVED_FACTS_NATIVE: "unresolved_facts_native"; }; type CheckoutComplianceReasonCode = (typeof CHECKOUT_COMPLIANCE_REASON)[keyof typeof CHECKOUT_COMPLIANCE_REASON]; interface CheckoutComplianceDecision { disposition?: PurchaseDisposition; purchase_policy?: PurchasePolicyContext | null; policy_name: string; policy_version: number; lane: CheckoutComplianceLane; reason_code: CheckoutComplianceReasonCode; evidence_digest: string; } declare const PAYMENT_INSTRUMENT_DISPLAY_KIND: { readonly CARD: "card"; readonly MOBILE_MONEY: "mobile_money"; readonly ERASED: "erased"; }; type PaymentInstrumentDisplay = { kind: typeof PAYMENT_INSTRUMENT_DISPLAY_KIND.CARD; brand: string; last4: string; exp_month: number; exp_year: number; } | { kind: typeof PAYMENT_INSTRUMENT_DISPLAY_KIND.MOBILE_MONEY; network: string; masked_number: string; } | { kind: typeof PAYMENT_INSTRUMENT_DISPLAY_KIND.ERASED; }; declare const PURCHASE_INTENT_PAYMENT_METHOD: { readonly CARD: "card"; readonly MOBILE_MONEY: "mobile_money"; readonly OFFLINE: "offline"; }; type CheckoutPaymentMethodKind = (typeof PURCHASE_INTENT_PAYMENT_METHOD)[keyof typeof PURCHASE_INTENT_PAYMENT_METHOD]; declare const PAYMENT_COLLECTION_MODE: { readonly REQUEST_TO_PAY: "request_to_pay"; readonly MANDATE_DEBIT: "mandate_debit"; readonly CREDENTIAL_CHARGE: "credential_charge"; readonly OFFLINE_TENDER: "offline_tender"; }; type PaymentCollectionMode = (typeof PAYMENT_COLLECTION_MODE)[keyof typeof PAYMENT_COLLECTION_MODE]; declare const PURCHASE_INTENT_PAYMENT_PROVIDER: { readonly STRIPE: "stripe"; readonly PAYSTACK: "paystack"; readonly CELLULANT: "cellulant"; readonly MTN_MOMO: "mtn_momo"; }; type PaymentProviderKind = (typeof PURCHASE_INTENT_PAYMENT_PROVIDER)[keyof typeof PURCHASE_INTENT_PAYMENT_PROVIDER]; declare const PAYMENT_OPTION_STATUS: { readonly ELIGIBLE: "eligible"; readonly INELIGIBLE: "ineligible"; readonly EXPIRED: "expired"; }; type PaymentOptionStatus = (typeof PAYMENT_OPTION_STATUS)[keyof typeof PAYMENT_OPTION_STATUS]; declare const PAYMENT_OPTION_NEXT_ACTION: { readonly NONE: "none"; readonly PROVIDER_APPROVAL: "provider_approval"; readonly STEP_UP: "step_up"; }; type PaymentNextActionKind = (typeof PAYMENT_OPTION_NEXT_ACTION)[keyof typeof PAYMENT_OPTION_NEXT_ACTION]; /** Deprecated checkout-form spelling still accepted by the compatibility adapter. */ declare const LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS: { readonly CASH: "cash"; /** Compatibility form value only; maps to funding allocation, never an option. */ readonly STORE_CREDIT: "store_credit"; }; /** One-release projection vocabulary used only by the legacy result adapter. */ declare const LEGACY_CHECKOUT_PAYMENT_STATUS: { readonly SUCCEEDED: "succeeded"; readonly PROCESSING: "processing"; readonly UNKNOWN: "unknown"; readonly REQUIRES_ACTION: "requires_action"; }; declare const CHECKOUT_PROTECTION_STATUS: { readonly PROTECTED: "protected"; readonly UNAVAILABLE: "unavailable"; }; type CheckoutProtectionStatus = (typeof CHECKOUT_PROTECTION_STATUS)[keyof typeof CHECKOUT_PROTECTION_STATUS]; /** Buyer-safe protection projection for one set of terms or one payment option. */ interface CheckoutProtectionView { status: CheckoutProtectionStatus; message: string; public_policy_version?: string | null; } interface PaymentOptionView { id: string; rank: number; method_kind: CheckoutPaymentMethodKind; collection_mode: PaymentCollectionMode; provider?: PaymentProviderKind | null; instrument?: PaymentInstrumentDisplay | null; /** Commerce principal credited toward the immutable due-now obligation. */ principal_amount: Money; /** Provider/collection fee for this exact option. */ fee_amount: Money; /** Exact buyer debit accepted at confirmation: principal plus fee. */ customer_debit_amount: Money; currency: CurrencyCode; protection: CheckoutProtectionView; status: PaymentOptionStatus; expected_next_action: PaymentNextActionKind; expires_at: string; } interface CheckoutTermsView { id: string; intent_revision: number; /** Version local to this material intent revision; a material update resets it to 1. */ terms_version: number; terms_digest: string; money: CheckoutMoneyComponents; material: CheckoutMaterialTerms; compliance: CheckoutComplianceDecision; /** Present only when no payment option carries its own route-specific result. */ protection?: CheckoutProtectionView | null; payment_options: PaymentOptionView[]; valid_until: string; created_at: string; } interface PurchaseIntentView { disposition?: PurchaseDisposition; id: string; seller_business_id: string; /** Absent while a hosted Cart intent is still an unprepared draft. */ principal?: PurchasingPrincipal | null; revision: number; status: PurchaseIntentStatus; source: CanonicalSourceAuthority; lines: PurchaseIntentLineView[]; line_pricing: PurchaseIntentLinePricingView[]; current_terms?: CheckoutTermsView | null; converted_order_id?: string | null; expires_at: string; created_at: string; updated_at: string; } interface RefreshCheckoutTermsRequest { expected_intent_revision: number; } interface ConfirmPurchaseIntentRequest { accepted_intent_revision: number; accepted_terms_version: number; accepted_due_now: Money; /** Exact customer debit on the selected option, including its frozen fee. */ accepted_customer_debit_amount: Money; currency: CurrencyCode; /** Null only when the accepted terms have no external rail to collect. */ payment_option_id?: string | null; idempotency_key: string; } /** Provider challenge input for one exact owner-fenced durable attempt. */ interface SubmitPurchaseIntentActionRequest { authorization: PaymentAuthorizationSubmission; } declare const CHECKOUT_TERMS_COMPONENT: { readonly SUBTOTAL: "subtotal"; readonly DISCOUNT_TOTAL: "discount_total"; readonly TAX_TOTAL: "tax_total"; readonly DELIVERY_TOTAL: "delivery_total"; readonly STATUTORY_TOTAL: "statutory_total"; readonly TOTAL_OBLIGATION: "total_obligation"; readonly DUE_NOW: "due_now"; readonly RAIL_AMOUNT: "rail_amount"; readonly STORE_CREDIT_CONSUMED: "store_credit_consumed"; readonly VOUCHER_CREDIT_CONSUMED: "voucher_credit_consumed"; }; type CheckoutTermsComponent = (typeof CHECKOUT_TERMS_COMPONENT)[keyof typeof CHECKOUT_TERMS_COMPONENT]; declare const CHECKOUT_MATERIAL_TERMS_COMPONENT: { readonly LINES: "lines"; readonly DESTINATION: "destination"; readonly DELIVERY_PROMISE: "delivery_promise"; readonly ENTITLEMENT: "entitlement"; readonly CANCELLATION_TERMS: "cancellation_terms"; readonly COMPLIANCE: "compliance"; readonly CURRENCY: "currency"; }; type CheckoutMaterialTermsComponent = (typeof CHECKOUT_MATERIAL_TERMS_COMPONENT)[keyof typeof CHECKOUT_MATERIAL_TERMS_COMPONENT]; declare const CHECKOUT_TERMS_DELTA_KIND: { readonly MONEY: "money"; readonly MATERIAL: "material"; readonly PAYMENT_OPTION: "payment_option"; }; type CheckoutTermsDelta = { kind: typeof CHECKOUT_TERMS_DELTA_KIND.MONEY; component: CheckoutTermsComponent; accepted: Money; replacement: Money; } | { kind: typeof CHECKOUT_TERMS_DELTA_KIND.MATERIAL; component: CheckoutMaterialTermsComponent; } | { kind: typeof CHECKOUT_TERMS_DELTA_KIND.PAYMENT_OPTION; accepted_option_id?: string | null; accepted_customer_debit_amount: Money; replacement_option_id?: string | null; replacement_customer_debit_amount?: Money | null; }; declare const CHECKOUT_INVALIDATION_REASON: { readonly SOURCE_UNAVAILABLE: "source_unavailable"; readonly OFFER_ENDED: "offer_ended"; readonly OFFER_CHANGED: "offer_changed"; readonly SELLABLE_UNAVAILABLE: "sellable_unavailable"; readonly COMPLIANCE_CHANGED: "compliance_changed"; readonly PAYMENT_OPTION_CHANGED: "payment_option_changed"; }; type CheckoutInvalidationReason = (typeof CHECKOUT_INVALIDATION_REASON)[keyof typeof CHECKOUT_INVALIDATION_REASON]; interface UnavailableLine { line_id: string; reason: CheckoutInvalidationReason; } interface CommittedIntentResponse { intent_id: string; attempt_id: string; order_id: string; order_number?: string; payment_id?: string; } declare const PURCHASE_INTENT_CONFIRM_STATUS: { readonly ORDER_CREATED: "order_created"; readonly COLLECTION_PROCESSING: "collection_processing"; readonly PAYMENT_OUTCOME_UNKNOWN: "payment_outcome_unknown"; readonly PAYMENT_FAILED: "payment_failed"; readonly REDIRECT_REQUIRED: "redirect_required"; readonly CARD_POPUP_REQUIRED: "card_popup_required"; readonly AUTHORIZATION_REQUIRED: "authorization_required"; readonly TERMS_CHANGED: "terms_changed"; readonly SELECTION_UNAVAILABLE: "selection_unavailable"; readonly OFFER_ENDED: "offer_ended"; readonly SOURCE_UNAVAILABLE: "source_unavailable"; }; declare const PURCHASE_INTENT_RESOLUTION_KIND: { readonly COMPLETED: "completed"; readonly FAILED: "failed"; readonly ACTION_REQUIRED: "action_required"; readonly REVIEW_REQUIRED: "review_required"; readonly OUTCOME_UNKNOWN: "outcome_unknown"; readonly TIMED_OUT: "timed_out"; }; declare const PURCHASE_INTENT_ACTION_DECISION: { readonly CONTINUE: "continue"; readonly STOP: "stop"; readonly SUBMIT: "submit"; }; declare const PURCHASE_INTENT_RESOLVE_STATUS: { readonly CONFIRMING: "confirming"; readonly POLLING: "polling"; readonly AWAITING_ACTION: "awaiting_action"; readonly REVIEWING_TERMS: "reviewing_terms"; readonly COMPLETED: "completed"; readonly FAILED: "failed"; readonly OUTCOME_UNKNOWN: "outcome_unknown"; }; declare const PURCHASE_INTENT_ERROR_CODE: { readonly ACTION_UNSUPPORTED: "PURCHASE_INTENT_ACTION_UNSUPPORTED"; readonly PAYMENT_FAILED: "PAYMENT_FAILED"; readonly TERMS_CHANGED: "TERMS_CHANGED"; readonly SELECTION_UNAVAILABLE: "SELECTION_UNAVAILABLE"; readonly OFFER_ENDED: "OFFER_ENDED"; readonly SOURCE_UNAVAILABLE: "SOURCE_UNAVAILABLE"; }; declare const SOURCE_REFUSAL: { readonly INVALID_IDENTIFIER: "invalid_identifier"; readonly CART_NOT_ACTIVE: "cart_not_active"; readonly CART_CONVERTED: "cart_converted"; readonly CART_EXPIRED: "cart_expired"; readonly CART_CURRENCY_MISSING: "cart_currency_missing"; readonly CART_CHANGED: "cart_changed"; readonly SELLER_MISMATCH: "seller_mismatch"; readonly BUYER_MISMATCH: "buyer_mismatch"; readonly ATTRIBUTION_MISMATCH: "attribution_mismatch"; readonly EVIDENCE_MISMATCH: "evidence_mismatch"; readonly LINES_MISMATCH: "lines_mismatch"; readonly LINE_SHAPE_INVALID: "line_shape_invalid"; readonly SOURCE_NOT_FOUND: "source_not_found"; readonly SOURCE_KIND_MISMATCH: "source_kind_mismatch"; readonly SURFACE_MISMATCH: "surface_mismatch"; readonly PRODUCT_SELECTION_MISSING: "product_selection_missing"; readonly SOCIAL_HANDOFF_INVALID: "social_handoff_invalid"; readonly STAFF_AUTHORITY_MISSING: "staff_authority_missing"; readonly TERMS_MISSING: "terms_missing"; readonly TERMS_WINDOW_ELAPSED: "terms_window_elapsed"; readonly COMMERCIAL_AUTHORITY_STALE: "commercial_authority_stale"; readonly MISSING_LOCATION: "missing_location"; readonly MISSING_SELLER_ORIGIN: "missing_seller_origin"; readonly DELIVERY_COUNTRY_MISSING: "delivery_country_missing"; readonly VOUCHER_SCOPE_MISMATCH: "voucher_scope_mismatch"; readonly TRANSACTION_MISMATCH: "transaction_mismatch"; }; type SourceRefusal = (typeof SOURCE_REFUSAL)[keyof typeof SOURCE_REFUSAL]; type ConfirmPurchaseIntentResponse = (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.ORDER_CREATED; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.COLLECTION_PROCESSING; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.PAYMENT_OUTCOME_UNKNOWN; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.PAYMENT_FAILED; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.REDIRECT_REQUIRED; authorization_url: string; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.CARD_POPUP_REQUIRED; provider: PaymentProviderKind; client_secret: string; public_key: string; provider_account_id?: string | null; }) | (CommittedIntentResponse & { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.AUTHORIZATION_REQUIRED; authorization_type: AuthorizationType; display_text?: string; }) | { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.TERMS_CHANGED; intent_id: string; replacement: CheckoutTermsView; deltas: CheckoutTermsDelta[]; } | { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.SELECTION_UNAVAILABLE; intent_id: string; lines: UnavailableLine[]; } | { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.OFFER_ENDED; intent_id: string; } | { status: typeof PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE; intent_id: string; reason: SourceRefusal; }; type PurchaseIntentActionResponse = Extract; type PurchaseIntentReviewResponse = Extract; type PurchaseIntentTerminalResponse = Extract; type PurchaseIntentResolution = { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.COMPLETED; response: Extract; } | { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.FAILED; response: Extract; } | { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.ACTION_REQUIRED; response: PurchaseIntentActionResponse; } | { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.REVIEW_REQUIRED; response: PurchaseIntentReviewResponse; } | { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.OUTCOME_UNKNOWN; response: Extract; } | { kind: typeof PURCHASE_INTENT_RESOLUTION_KIND.TIMED_OUT; response: Extract; }; type CheckoutMode = (typeof CHECKOUT_MODE)[keyof typeof CHECKOUT_MODE]; type CheckoutOrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE]; type CheckoutPaymentMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD]; type CheckoutStep = (typeof CHECKOUT_STEP)[keyof typeof CHECKOUT_STEP]; type PickupTimeType = (typeof PICKUP_TIME_TYPE)[keyof typeof PICKUP_TIME_TYPE]; type CheckoutCollectionMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD]; /** Storefront-safe collection capability. Provider and route identities stay server-side. */ type CheckoutCollectionOption = { method: typeof PAYMENT_METHOD.CARD; network: null; } | { method: typeof PAYMENT_METHOD.MOBILE_MONEY; network: string; }; interface CheckoutCollectionOptions { presentment_currency: CurrencyCode; options: CheckoutCollectionOption[]; } interface PickupTime { type: PickupTimeType; scheduled_time?: string; } interface CheckoutAddressInfo { street_address?: string; apartment?: string; city?: string; region?: string; postal_code?: string; country?: string; delivery_instructions?: string; phone_for_delivery?: string; latitude?: number; longitude?: number; pickup_time?: string; guest_count?: number; seating_time?: string; seating_requests?: string; } interface MobileMoneyDetails { phone_number: string; provider: MobileMoneyProvider; provider_other?: string; } interface CheckoutCustomerInfo { name: string; email: string; phone: string; notes?: string; save_details: boolean; } interface CheckoutFormData { cart_id: string; location_id?: string; customer: CheckoutCustomerInfo; order_type: CheckoutOrderType; address_info: CheckoutAddressInfo; /** Named delivery rate the customer selected (from `delivery.getOptions`). * Selection only — the fee is always recomputed server-side. Omit for the * merchant's default option. */ delivery_rate_id?: string; payment_method: string; mobile_money_details?: MobileMoneyDetails; special_instructions?: string; link_address_id?: string; link_payment_method_id?: string; idempotency_key?: string; metadata?: Record; pay_currency?: CurrencyCode; fx_quote_id?: string; /** Apply the shopper's available store credit (capped at the amount owed) as a * fee-exempt tender before charging the rail. */ use_store_credit?: boolean; /** Bearer voucher / gift code to allocate to this order. Its frozen amount * remains distinct from saved account balance in accepted terms. */ voucher_code?: string; /** Pay only the required deposit now (balance collected later) instead of the * full total. Only honored when the order is deposit-eligible and paying in * the order's native currency. */ pay_deposit?: boolean; } type NextAction = { type: typeof CHECKOUT_NEXT_ACTION.NONE; } | { type: typeof CHECKOUT_NEXT_ACTION.CARD_POPUP; provider: string; client_secret: string; public_key: string; provider_account_id?: string; } | { type: typeof CHECKOUT_NEXT_ACTION.REDIRECT; authorization_url: string; } | { type: typeof CHECKOUT_NEXT_ACTION.AUTHORIZATION; authorization_type: AuthorizationType; display_text?: string; } | { type: typeof CHECKOUT_NEXT_ACTION.TERMS_CHANGED; replacement: CheckoutTermsView; deltas: CheckoutTermsDelta[]; } | { type: typeof CHECKOUT_NEXT_ACTION.SELECTION_UNAVAILABLE; lines: UnavailableLine[]; } | { type: typeof CHECKOUT_NEXT_ACTION.POLL; }; interface CheckoutResult { /** Durable purchase intent authority behind the compatibility projection. */ intent_id?: string; /** Durable confirmation attempt used for exact replay and recovery. */ attempt_id?: string; order_id: string; order_number: string; bill_token?: string; /** Tenant-scoped Cimplify payment id used for payment mutations. */ payment_id?: string; payment_reference?: string; payment_status: string; requires_authorization: boolean; authorization_type?: AuthorizationType; authorization_url?: string; display_text?: string; provider?: string; client_secret?: string; public_key?: string; next_action?: NextAction; fx?: { base_currency: CurrencyCode; base_amount: Money; pay_currency: CurrencyCode; pay_amount: Money; rate: number; quote_id: string; }; } type CheckoutStatus = (typeof CHECKOUT_STATUS)[keyof typeof CHECKOUT_STATUS]; interface CheckoutStatusContext { display_text?: string; authorization_type?: PaymentAuthorizationKind; poll_attempt?: number; max_poll_attempts?: number; order_id?: string; order_number?: string; provider?: string; intent_id?: string; replacement_terms?: CheckoutTermsView; terms_deltas?: CheckoutTermsDelta[]; unavailable_lines?: UnavailableLine[]; } interface ProcessCheckoutOptions { /** Cart presentation source; optional only when confirming an existing intent. */ cart_id?: string; /** Existing durable authority (hosted sessions/paylinks); never mint a replacement. */ intent_id?: string; /** Exact hosted-session route owner; never coerced to the storefront API session. */ hosted_session_id?: string; /** Display hint only. The iframe re-reads/revalidates server authority before confirm. */ initial_terms?: CheckoutTermsView; order_type: OrderType; location_id?: string; notes?: string; scheduled_time?: string; tip_amount?: number; enroll_in_link?: boolean; pay_currency?: CurrencyCode; timeout_ms?: number; on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void; } interface ProcessCheckoutResult { success: boolean; order?: { id: string; order_number: string; status: string; total: string; currency: CurrencyCode; }; error?: { code: string; message: string; recoverable: boolean; docs_url?: string; suggestion?: string; }; enrolled_in_link?: boolean; } interface ProcessAndResolveOptions { enroll_in_link?: boolean; allow_popups?: boolean; poll_interval_ms?: number; max_poll_attempts?: number; on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void; /** * Reports the lifetime of provider-owned authorization UI. Hosts with their * own modal focus boundary can suspend it while the provider surface is open. */ on_authorization_ui_change?: (open: boolean) => void; on_authorization_required?: (type: PaymentAuthorizationKind, submit: (authorization: PaymentAuthorizationSubmission) => Promise) => void | Promise; return_url?: string; signal?: AbortSignal; } type AbortablePromise = Promise & { abort: () => void; }; type OrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE]; declare const ELEMENT_TYPES: { readonly AUTH: "auth"; readonly ADDRESS: "address"; readonly PAYMENT: "payment"; readonly CHECKOUT: "checkout"; readonly ACCOUNT: "account"; }; type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES]; declare const MESSAGE_TYPES: { readonly INIT: "init"; readonly IDENTITY: "identity"; readonly SESSION_CLEARED: "session_cleared"; readonly SET_CART: "set_cart"; readonly GET_DATA: "get_data"; readonly LOGOUT: "logout"; readonly PROCESS_CHECKOUT: "process_checkout"; readonly ABORT_CHECKOUT: "abort_checkout"; readonly READY: "ready"; readonly HEIGHT_CHANGE: "height_change"; readonly ERROR: "error"; readonly ADDRESS_CHANGED: "address_changed"; readonly ADDRESS_SELECTED: "address_selected"; readonly PAYMENT_METHOD_SELECTED: "payment_method_selected"; readonly LOGOUT_COMPLETE: "logout_complete"; readonly AUTH_REQUESTED: "auth_requested"; readonly SESSION_ESTABLISHED: "session_established"; readonly CONTINUE_WITHOUT_SAVED_DETAILS: "continue_without_saved_details"; readonly CONTACT_PROVIDED: "contact_provided"; readonly CHECKOUT_STATUS: "checkout_status"; readonly CHECKOUT_COMPLETE: "checkout_complete"; readonly TERMS_CHANGED: "terms_changed"; readonly SELECTION_UNAVAILABLE: "selection_unavailable"; readonly ORDER_TYPE_CHANGED: "order_type_changed"; readonly REQUEST_SUBMIT: "request_submit"; }; interface ElementsOptions { linkUrl?: string; appearance?: ElementAppearance; auth?: ElementsAuthOptions; } interface ElementsAuthOptions { clientId?: string; redirectUri?: string; callbackUri?: string; scope?: string; issuer?: string; authUrl?: string; } interface ElementAppearance { theme?: "light" | "dark"; variables?: { primaryColor?: string; fontFamily?: string; borderRadius?: string; }; } interface ElementOptions { mode?: "shipping" | "billing"; prefillEmail?: string; amount?: number; currency?: CurrencyCode; orderTypes?: OrderType[]; defaultOrderType?: OrderType; submitLabel?: string; /** Existing hosted/paylink authority rendered by the checkout element. */ intentId?: string; /** Exact hosted-session route owner for prepare/confirm/replay/action calls. */ hostedSessionId?: string; /** Immutable display hint; confirmation still re-reads server authority. */ initialTerms?: CheckoutTermsView; } interface AddressInfo { id?: string; latitude?: number; longitude?: number; street_address: string; apartment?: string; city: string; region: string; postal_code?: string; country?: string; delivery_instructions?: string; phone_for_delivery?: string; } interface PaymentMethodInfo { id?: string; type: "mobile_money" | "card" | "cash"; provider?: string; last_four?: string; phone_number?: string; label?: string; } interface AuthenticatedCustomer { name: string; email: string | null; phone: string | null; } interface ClaimedCustomer extends AuthenticatedCustomer { id: string; } type ElementsCustomerInfo = { name: string; email: string | null; phone: string | null; } | null; declare const ELEMENTS_AUTH_CONTACT_TYPES: { readonly EMAIL: "email"; readonly PHONE: "phone"; }; type ElementsAuthContactType = (typeof ELEMENTS_AUTH_CONTACT_TYPES)[keyof typeof ELEMENTS_AUTH_CONTACT_TYPES]; declare const ELEMENTS_AUTH_PROMPTS: { readonly LOGIN: "login"; }; type ElementsAuthPrompt = (typeof ELEMENTS_AUTH_PROMPTS)[keyof typeof ELEMENTS_AUTH_PROMPTS]; declare const ELEMENTS_AUTH_MODES: { readonly CHECKOUT: "checkout"; readonly DEFAULT: "default"; }; type ElementsAuthMode = (typeof ELEMENTS_AUTH_MODES)[keyof typeof ELEMENTS_AUTH_MODES]; interface AuthenticatedData { accountId: string; customerId: string; token: string; customer: AuthenticatedCustomer; } interface ElementsCheckoutData { cart_id?: string; intent_id?: string; hosted_session_id?: string; initial_terms?: CheckoutTermsView; order_type?: OrderType; location_id?: string; scheduled_time?: string; tip_amount?: number; notes?: string; } interface ElementsCheckoutResult { success: boolean; order?: { id: string; status: string; total: string; }; error?: { code: string; message: string; }; } interface CheckoutCartItem { name: string; quantity: number; unit_price: string; total_price: string; image_url?: string; line_type: "simple" | "service" | "bundle" | "composite" | "digital"; variant_name?: string; scheduled_start?: string; scheduled_end?: string; selections?: { name: string; quantity: number; variant_name?: string; }[]; add_ons?: { name: string; price: string; }[]; special_instructions?: string; } interface CheckoutCartData { items: CheckoutCartItem[]; subtotal: string; tax_amount: string; total_discounts: string; service_charge: string; /** Server-quoted delivery fee selected in checkout. The cart total excludes * this value until checkout has a delivery address and rate. */ delivery_fee?: string; total: string; currency: string; /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already * inside `subtotal`/`total`. Checkout labels it "included" rather than * summing it onto the total. */ tax_inclusive: boolean; /** Tax rate in percentage points (8.25 means 8.25%). */ tax_rate?: string | number; /** Reviewed presentation policy; `gross_required` markets show inclusive * prices even when the tax arithmetic is exclusive. */ price_display_mode?: TaxPriceDisplayMode; /** Deposit due now when the cart has deposit-eligible service items, so the * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */ deposit_required?: boolean; deposit_amount?: string; requires_delivery?: boolean; } type ParentToIframeMessage = { type: typeof MESSAGE_TYPES.INIT; businessId: string; publicKey: string; prefillEmail?: string; appearance?: ElementAppearance; orderTypes?: OrderType[]; defaultOrderType?: OrderType; renderSubmitButton?: boolean; submitLabel?: string; intentId?: string; hostedSessionId?: string; initialTerms?: CheckoutTermsView; token?: string; merchantName?: string; } | { type: typeof MESSAGE_TYPES.IDENTITY; sessionToken: string; accessToken: string | null; customer: ClaimedCustomer | null; } | { /** The host rotated back to anonymous authority. Every sibling iframe * must discard its bearer and identity-derived projections. */ type: typeof MESSAGE_TYPES.SESSION_CLEARED; sessionToken: string; } | { type: typeof MESSAGE_TYPES.SET_CART; cart: CheckoutCartData; } | { type: typeof MESSAGE_TYPES.GET_DATA; } | { type: typeof MESSAGE_TYPES.LOGOUT; } | { type: typeof MESSAGE_TYPES.PROCESS_CHECKOUT; cart_id?: string; intent_id?: string; hosted_session_id?: string; initial_terms?: CheckoutTermsView; order_type?: OrderType; location_id?: string; notes?: string; scheduled_time?: string; tip_amount?: number; pay_currency?: CurrencyCode; enroll_in_link?: boolean; address?: AddressInfo; customer?: ElementsCustomerInfo; account_id?: string; customer_id?: string; } | { type: typeof MESSAGE_TYPES.ABORT_CHECKOUT; }; type IframeToParentMessage = { type: typeof MESSAGE_TYPES.READY; height: number; } | { type: typeof MESSAGE_TYPES.HEIGHT_CHANGE; height: number; } | { type: typeof MESSAGE_TYPES.CONTACT_PROVIDED; contact: string; contactType: ElementsAuthContactType; } | { type: typeof MESSAGE_TYPES.ERROR; code: string; message: string; } | { type: typeof MESSAGE_TYPES.ADDRESS_CHANGED; address: AddressInfo; saveToLink: boolean; } | { type: typeof MESSAGE_TYPES.ADDRESS_SELECTED; address: AddressInfo; } | { type: typeof MESSAGE_TYPES.PAYMENT_METHOD_SELECTED; method: PaymentMethodInfo; saveToLink: boolean; } | { type: typeof MESSAGE_TYPES.LOGOUT_COMPLETE; } | { /** Buyer declined or could not establish Link saved-detail authority. * The merchant host decides whether its current session must rotate. */ type: typeof MESSAGE_TYPES.CONTINUE_WITHOUT_SAVED_DETAILS; contact: string; contactType: ElementsAuthContactType; } | { type: typeof MESSAGE_TYPES.SESSION_ESTABLISHED; sessionToken: string; accessToken: string; refreshToken?: string; customer: ClaimedCustomer; } | { type: typeof MESSAGE_TYPES.AUTH_REQUESTED; loginHint?: string; contactType?: ElementsAuthContactType; mode?: ElementsAuthMode; prompt?: ElementsAuthPrompt; } | { type: typeof MESSAGE_TYPES.CHECKOUT_STATUS; status: CheckoutStatus; context: CheckoutStatusContext; } | { type: typeof MESSAGE_TYPES.TERMS_CHANGED; intent_id: string; replacement: CheckoutTermsView; deltas: CheckoutTermsDelta[]; } | { type: typeof MESSAGE_TYPES.SELECTION_UNAVAILABLE; intent_id: string; lines: UnavailableLine[]; } | { type: typeof MESSAGE_TYPES.CHECKOUT_COMPLETE; success: boolean; order?: { id: string; order_number: string; status: string; total: string; currency: CurrencyCode; }; error?: { code: string; message: string; recoverable: boolean; }; enrolled_in_link?: boolean; } | { type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED; orderType: OrderType; } | { type: typeof MESSAGE_TYPES.REQUEST_SUBMIT; }; declare const EVENT_TYPES: { readonly READY: "ready"; readonly AUTHENTICATED: "authenticated"; readonly ERROR: "error"; readonly CHANGE: "change"; readonly BLUR: "blur"; readonly FOCUS: "focus"; readonly ORDER_TYPE_CHANGED: "order_type_changed"; readonly REQUEST_SUBMIT: "request_submit"; }; type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES]; type ElementEventHandler = (data: T) => void; export { type BundleComponentView as $, type ApiError as A, type AdjustmentType as B, type CurrencyCode as C, type DurationUnit as D, type AppliedDiscount as E, type AttributeAppliesTo as F, type AttributeType as G, type AttributeValidationRules as H, type AttributeVisibility as I, type AuthResponse as J, type AuthenticatedCustomer as K, type AuthenticatedData as L, type AuthorizationType as M, BOUNDARY_KIND as N, type BenefitType as O, type Product as P, type BillingFrequency as Q, type BillingMarkupType as R, type SaleInfo as S, type TaxPriceDisplayMode as T, type UpcomingSale as U, type BillingPlanType as V, type BoundaryKind as W, type Bundle as X, type BundleComponentData as Y, type BundleComponentInfo as Z, type BundleComponentVariantView as _, type ChosenPrice as a, type CheckoutTermsComponent as a$, type BundlePriceType as a0, type BundleProduct as a1, type BundleSelectionData as a2, type BundleSelectionInput as a3, type BundleStoredSelection as a4, type BundleSummary as a5, type BundleWithDetails as a6, CHECKOUT_COMPLIANCE_LANE as a7, CHECKOUT_COMPLIANCE_REASON as a8, CHECKOUT_INVALIDATION_REASON as a9, type CheckoutCartData as aA, type CheckoutCartItem as aB, type CheckoutCollectionMethod as aC, type CheckoutCollectionOption as aD, type CheckoutCollectionOptions as aE, type CheckoutComplianceDecision as aF, type CheckoutComplianceLane as aG, type CheckoutComplianceReasonCode as aH, type CheckoutCustomerInfo as aI, type CheckoutDestinationInput as aJ, type CheckoutFormData as aK, type CheckoutInvalidationReason as aL, type CheckoutMaterialTerms as aM, type CheckoutMaterialTermsComponent as aN, type CheckoutMode as aO, type CheckoutMoneyComponents as aP, type CheckoutOfferKind as aQ, type CheckoutOrderType as aR, type CheckoutPaymentMethod as aS, type CheckoutProtectionStatus as aT, type CheckoutProtectionView as aU, type CheckoutPurchaseSurface as aV, type CheckoutResult as aW, type CheckoutSourceKind as aX, type CheckoutStatus as aY, type CheckoutStatusContext as aZ, type CheckoutStep as a_, CHECKOUT_MATERIAL_TERMS_COMPONENT as aa, CHECKOUT_MODE as ab, CHECKOUT_MUTATION as ac, CHECKOUT_NEXT_ACTION as ad, CHECKOUT_ORDER_RESULT_STATUS as ae, CHECKOUT_PROTECTION_STATUS as af, CHECKOUT_PURCHASE_SURFACE as ag, CHECKOUT_STATUS as ah, CHECKOUT_STEP as ai, CHECKOUT_TERMS_COMPONENT as aj, CHECKOUT_TERMS_DELTA_KIND as ak, CONTACT_TYPE as al, type CanonicalSourceAuthority as am, type Cart as an, type CartAddOn as ao, type CartChannel as ap, type CartIntentCheckoutInput as aq, type CartItem as ar, type CartItemDetails as as, type CartMutationResult as at, type CartNotice as au, type CartStatus as av, type CartSummary as aw, type CartTotals as ax, type CategorySummary as ay, type CheckoutAddressInfo as az, type Category as b, type ElementsAuthMode as b$, type CheckoutTermsDelta as b0, type ClaimedCustomer as b1, type CollectionProduct as b2, type CollectionSummary as b3, type ComponentGroup as b4, type ComponentGroupWithComponents as b5, type ComponentPriceBreakdown as b6, type ComponentSchedulingData as b7, type ComponentSelectionInput as b8, type ComponentSourceType as b9, type DealBenefitType as bA, type DepositType as bB, type DestinationQuote as bC, type DestinationQuoteAddress as bD, type DestinationQuoteInput as bE, type DeviceType as bF, type DigitalProductType as bG, type DiscountBreakdown as bH, type DiscountDetails as bI, type DiscountValidation as bJ, type DisplayAddOn as bK, type DisplayAddOnOption as bL, type DisplayCart as bM, type DisplayCartItem as bN, type DisplayMode as bO, ELEMENTS_AUTH_CONTACT_TYPES as bP, ELEMENTS_AUTH_MODES as bQ, ELEMENTS_AUTH_PROMPTS as bR, ELEMENT_TYPES as bS, ERROR_HINTS as bT, EVENT_TYPES as bU, type ElementAppearance as bV, type ElementEventHandler as bW, type ElementEventType as bX, type ElementOptions as bY, type ElementType as bZ, type ElementsAuthContactType as b_, type Composite as ba, type CompositeComponent as bb, type CompositeComponentView as bc, type CompositeGroupView as bd, type CompositePriceBreakdown as be, type CompositePriceResult as bf, type CompositePricingMode as bg, type CompositeSelectionData as bh, type CompositeStoredSelection as bi, type CompositeWithDetails as bj, type ContactType as bk, type CreateAddressInput as bl, type CreateMobileMoneyInput as bm, type CustomAttributeDefinition as bn, type CustomAttributeValue as bo, type Customer as bp, type CustomerAddress as bq, type CustomerInputValue as br, type CustomerLinkPreferences as bs, type CustomerMobileMoney as bt, DEFAULT_COUNTRY as bu, DEFAULT_CURRENCY as bv, DEVICE_TYPE as bw, DURATION_UNIT as bx, type DateRangeValue as by, type Deal as bz, CimplifyError as c, PURCHASE_DISPOSITION as c$, type ElementsAuthOptions as c0, type ElementsAuthPrompt as c1, type ElementsCheckoutData as c2, type ElementsCheckoutResult as c3, type ElementsCustomerInfo as c4, type ElementsOptions as c5, type EligiblePlansQuery as c6, type EnrollAndLinkOrderInput as c7, type EnrollAndLinkOrderResult as c8, type EnrollmentData as c9, MESSAGE_TYPES as cA, MOBILE_MONEY_PROVIDER as cB, MOBILE_MONEY_TENDER_AUTHORITY_KIND as cC, type MeasurementValue as cD, type MintPurchaseIntentRequest as cE, type MobileMoneyData as cF, type MobileMoneyDetails as cG, type MobileMoneyProvider as cH, type MobileMoneyTenderPreference as cI, type Money as cJ, NATIVE_PURCHASE_PLATFORM as cK, type NativeAddOnSelection as cL, type NativePurchasePlatform as cM, type NextAction as cN, ORDER_MUTATION as cO, ORDER_TYPE as cP, type OfferRef as cQ, type OrderType as cR, PAYMENT_COLLECTION_MODE as cS, PAYMENT_INSTRUMENT_DISPLAY_KIND as cT, PAYMENT_METHOD as cU, PAYMENT_MUTATION as cV, PAYMENT_OPTION_NEXT_ACTION as cW, PAYMENT_OPTION_STATUS as cX, PAYMENT_STATE as cY, PICKUP_TIME_TYPE as cZ, PRODUCT_TYPE as c_, ErrorCode as ca, type ErrorCodeType as cb, type ErrorHint as cc, type FacetValue as cd, type FormattedPlanOption as ce, type GroupPricingBehavior as cf, INPUT_FIELD_TYPE as cg, IdempotencyMismatchError as ch, type IframeToParentMessage as ci, type InitializePaymentResult as cj, type InputFieldType as ck, type InputFieldValidation as cl, type InventoryType as cm, type KnowledgeArticle as cn, LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS as co, LEGACY_CHECKOUT_PAYMENT_STATUS as cp, LINK_MUTATION as cq, LINK_QUERY as cr, type LineConfiguration as cs, type LinkData as ct, type LinkEnrollResult as cu, type LinkSession as cv, type LinkStatusResult as cw, type LocationProductPrice as cx, type LocationValue as cy, MAX_PAYMENT_AUTHORIZATION_STEPS as cz, type Collection as d, type PurchaseDisposition as d$, PURCHASE_INTENT_ACTION_DECISION as d0, PURCHASE_INTENT_ERROR_CODE as d1, PURCHASE_INTENT_LINE_CONFIGURATION_KIND as d2, PURCHASE_INTENT_MOBILE_MONEY_NETWORK as d3, PURCHASE_INTENT_OFFER_KIND as d4, PURCHASE_INTENT_PAYMENT_METHOD as d5, PURCHASE_INTENT_PAYMENT_PROVIDER as d6, PURCHASE_INTENT_RESOLUTION_KIND as d7, PURCHASE_INTENT_RESOLVE_STATUS as d8, PURCHASE_INTENT_SELLABLE_KIND as d9, type PickupTime as dA, type PickupTimeType as dB, type PreparePurchaseIntentRequest as dC, type Price as dD, type PriceAdjustment as dE, type PriceDecisionPath as dF, type PriceEntryType as dG, type PricePathTaxInfo as dH, type PriceSource as dI, type ProcessAndResolveOptions as dJ, type ProcessCheckoutOptions as dK, type ProcessCheckoutResult as dL, type ProductAddOn as dM, type ProductAvailability as dN, type ProductAvailabilityNow as dO, type ProductBillingPlan as dP, type ProductDealInfo as dQ, type ProductInputField as dR, type ProductProperty as dS, type ProductRenderHint as dT, type ProductTaxonomy as dU, type ProductTimeProfile as dV, type ProductType as dW, type ProductVariant as dX, type ProductVariantValue as dY, type PropertyFacet as dZ, type PropertySource as d_, PURCHASE_INTENT_SOURCE_KIND as da, PURCHASE_INTENT_STATUS as db, PURCHASE_SURFACE as dc, PURCHASING_PRINCIPAL_KIND as dd, type Pagination as de, type PaginationParams as df, type ParentToIframeMessage as dg, type Payment as dh, type PaymentAuthorizationKind as di, type PaymentAuthorizationSubmission as dj, type PaymentCollectionMode as dk, type PaymentErrorDetails as dl, type PaymentInstrumentDisplay as dm, type PaymentMethod as dn, type PaymentMethodInfo as dp, type PaymentMethodType as dq, type PaymentNextActionKind as dr, type PaymentOptionStatus as ds, type PaymentProcessingState as dt, type PaymentProvider as du, type PaymentProviderKind as dv, type PaymentResponse as dw, type PaymentStatus as dx, type PaymentStatusResponse as dy, type PhoneValue as dz, type ProductWithDetails as e, type VariantDetailsDTO as e$, type PurchaseIntentActionResponse as e0, type PurchaseIntentCustomerInput as e1, type PurchaseIntentLineConfiguration as e2, type PurchaseIntentLineInput as e3, type PurchaseIntentLinePricingView as e4, type PurchaseIntentLineView as e5, type PurchaseIntentMobileMoneyNetwork as e6, type PurchaseIntentResolution as e7, type PurchaseIntentReviewResponse as e8, type PurchaseIntentSimpleLineConfiguration as e9, type SubmitAuthorizationInput as eA, type SubmitPurchaseIntentActionRequest as eB, type Subscription as eC, type SubscriptionInvoice as eD, type SubscriptionItem as eE, type SubscriptionStatus as eF, type SubscriptionWithDetails as eG, type Tag as eH, type TagsResponse as eI, type TaxPathComponent as eJ, type TaxonomyAttributeTemplate as eK, type TaxonomyWithChildren as eL, type UICart as eM, type UICartBusiness as eN, type UICartCustomer as eO, type UICartLocation as eP, type UICartPricing as eQ, type UnavailableLine as eR, type UpdateAddressInput as eS, type UpdateCartItemInput as eT, type VariantAxis as eU, type VariantAxisSelection as eV, type VariantAxisValue as eW, type VariantAxisValueView as eX, type VariantAxisView as eY, type VariantAxisWithValues as eZ, type VariantDetails as e_, type PurchaseIntentSourceInput as ea, type PurchaseIntentStatus as eb, type PurchaseIntentTenderPreference as ec, type PurchaseIntentTerminalResponse as ed, type PurchaseIntentView as ee, type PurchasePolicyContext as ef, type PurchaseSurface as eg, type PurchasingPrincipal as eh, type QuantityPricingTier as ei, RENDER_HINT as ej, type RefreshCheckoutTermsRequest as ek, type RelatedProductView as el, type RequestOtpInput as em, type RequestOtpResult as en, type RevokeAllSessionsResult as eo, type RevokeSessionResult as ep, SOURCE_REFUSAL as eq, type SaleCapInfo as er, type SalesChannel as es, type SchedulingMode as et, type SelectedAddOnOption as eu, type SellableKind as ev, type SellableRef as ew, type SemanticKind as ex, type SignatureValue as ey, type SourceRefusal as ez, type CheckoutPaymentMethodKind as f, type VariantDisplayAttribute as f0, type VariantLocationAvailability as f1, type VariantStrategy as f2, type VariantView as f3, type VerifyOtpInput as f4, ZERO as f5, currencyCode as f6, enrichError as f7, getErrorHint as f8, isCimplifyError as f9, isIdempotencyMismatchError as fa, isQuoteConflictRequiringConsent as fb, isQuoteError as fc, isRetryableError as fd, isSupportedCurrency as fe, money as ff, moneyFromNumber as fg, type components as fh, type ConfirmPurchaseIntentResponse as g, PURCHASE_INTENT_CONFIRM_STATUS as h, type ConfirmPurchaseIntentRequest as i, type CheckoutTermsView as j, type PaymentOptionView as k, AUTHORIZATION_TYPE as l, AUTH_MUTATION as m, type AbortablePromise as n, type AddOn as o, type AddOnDetails as p, type AddOnGroupDetails as q, type AddOnOption as r, type AddOnOptionDetails as s, type AddOnOptionPrice as t, type AddOnWithOptions as u, type AddToCartInput as v, type AddressAuthorizationData as w, type AddressData as x, type AddressInfo as y, type AddressValue as z };