components
1 year ago
functions
1 year ago
global
3 years ago
services
1 year ago
store
1 year ago
testing
1 year ago
components.d.ts
1 year ago
global.d.ts
3 years ago
index.d.ts
2 years ago
stencil-public-runtime.d.ts
1 year ago
types.d.ts
1 year ago
types.d.ts
1231 lines
| 1 | import { ObservableMap } from '@stencil/store'; |
| 2 | import { IconLibraryMutator, IconLibraryResolver } from './components/ui/icon/library'; |
| 3 | import { StripeElementChangeEvent } from '@stripe/stripe-js'; |
| 4 | declare global { |
| 5 | interface Window { |
| 6 | grecaptcha: any; |
| 7 | surecart?: { |
| 8 | product?: { |
| 9 | store: ObservableMap<any>; |
| 10 | state: any; |
| 11 | update: Function; |
| 12 | }; |
| 13 | }; |
| 14 | wp: { |
| 15 | apiFetch: any; |
| 16 | blocks: any; |
| 17 | i18n: any; |
| 18 | }; |
| 19 | dataLayer: any; |
| 20 | gtag: any; |
| 21 | fbq: any; |
| 22 | sc?: { |
| 23 | store?: { |
| 24 | product?: any; |
| 25 | products?: any; |
| 26 | }; |
| 27 | checkout?: { |
| 28 | addLineItem: (data: any) => void; |
| 29 | }; |
| 30 | cart?: { |
| 31 | toggle: (open: boolean) => void; |
| 32 | }; |
| 33 | }; |
| 34 | scStore: any; |
| 35 | registerSureCartIconPath: (path: string) => void; |
| 36 | registerSureCartIconLibrary: (name: string, options: { |
| 37 | resolver: IconLibraryResolver; |
| 38 | mutator?: IconLibraryMutator; |
| 39 | }) => void; |
| 40 | scIcons: { |
| 41 | path: string; |
| 42 | }; |
| 43 | scData: { |
| 44 | cdn_root: string; |
| 45 | root_url: string; |
| 46 | account_id: string; |
| 47 | account_slug: string; |
| 48 | api_url: string; |
| 49 | home_url: string; |
| 50 | plugin_url: string; |
| 51 | page_id: string; |
| 52 | persist_cart: 'browser' | 'url' | false; |
| 53 | nonce: string; |
| 54 | base_url: string; |
| 55 | nonce_endpoint: string; |
| 56 | recaptcha_site_key: string; |
| 57 | theme: string; |
| 58 | product_data: { |
| 59 | checkout_link: string; |
| 60 | mode: 'live' | 'test'; |
| 61 | form: { |
| 62 | ID: number; |
| 63 | }; |
| 64 | product: Product; |
| 65 | }; |
| 66 | pages: { |
| 67 | dashboard: string; |
| 68 | checkout: string; |
| 69 | }; |
| 70 | currency: string; |
| 71 | is_claimed: string; |
| 72 | claim_url: string; |
| 73 | admin_url: string; |
| 74 | user_permissions: { |
| 75 | manage_sc_shop_settings: boolean; |
| 76 | }; |
| 77 | }; |
| 78 | ceRegisterIconLibrary: any; |
| 79 | ResizeObserver: any; |
| 80 | } |
| 81 | } |
| 82 | export type RecursivePartial<T> = { |
| 83 | [P in keyof T]?: RecursivePartial<T[P]>; |
| 84 | }; |
| 85 | interface Model { |
| 86 | created_at: number; |
| 87 | updated_at: number; |
| 88 | } |
| 89 | export interface ChoiceItem extends Object { |
| 90 | value: string; |
| 91 | label: string; |
| 92 | description?: string; |
| 93 | disabled?: boolean; |
| 94 | checked?: boolean; |
| 95 | unavailable?: boolean; |
| 96 | choices?: ChoiceItem[]; |
| 97 | suffix?: string; |
| 98 | suffixDescription?: string; |
| 99 | icon?: string; |
| 100 | } |
| 101 | export type ChoiceType = 'all' | 'single' | 'multiple'; |
| 102 | export interface Price { |
| 103 | id: string; |
| 104 | name: string; |
| 105 | description?: string; |
| 106 | amount: number; |
| 107 | full_amount: number; |
| 108 | currency: string; |
| 109 | recurring: boolean; |
| 110 | recurring_interval?: 'week' | 'month' | 'year' | 'never'; |
| 111 | recurring_interval_count?: number; |
| 112 | trial_duration_days?: number; |
| 113 | ad_hoc: boolean; |
| 114 | ad_hoc_max_amount: number; |
| 115 | ad_hoc_min_amount: number; |
| 116 | scratch_amount: number; |
| 117 | setup_fee_enabled: boolean; |
| 118 | setup_fee_amount: number; |
| 119 | setup_fee_name: string; |
| 120 | setup_fee_trial_enabled: boolean; |
| 121 | recurring_period_count: number; |
| 122 | archived: boolean; |
| 123 | product_id?: string; |
| 124 | archived_at?: string; |
| 125 | created_at: number; |
| 126 | updated_at: number; |
| 127 | product?: Product | string; |
| 128 | position: number; |
| 129 | portal_subscription_update_enabled: boolean; |
| 130 | metadata: { |
| 131 | [key: string]: string; |
| 132 | }; |
| 133 | } |
| 134 | export interface VariantOption { |
| 135 | id: string; |
| 136 | object: string; |
| 137 | name: string; |
| 138 | position: number; |
| 139 | product: Product | string; |
| 140 | updated_at: number; |
| 141 | created_at: number; |
| 142 | label: string; |
| 143 | labels: string; |
| 144 | values: Array<string>; |
| 145 | } |
| 146 | export interface Bump { |
| 147 | id: string; |
| 148 | object: 'bump'; |
| 149 | amount_off: number; |
| 150 | archived: boolean; |
| 151 | archived_at: number; |
| 152 | auto_apply: boolean; |
| 153 | filter_match_type: 'all' | 'any' | 'none'; |
| 154 | filters: any; |
| 155 | metadata: any; |
| 156 | name: string; |
| 157 | percent_off: number; |
| 158 | price: string | Price; |
| 159 | priority: 1 | 2 | 3 | 4 | 5; |
| 160 | created_at: number; |
| 161 | updated_at: number; |
| 162 | } |
| 163 | export interface UpsellFunnel { |
| 164 | id: string; |
| 165 | object: 'upsell_funnel'; |
| 166 | archived: boolean; |
| 167 | enabled: boolean; |
| 168 | filter_match_type: 'all' | 'any' | 'none'; |
| 169 | filter_price_ids: string[]; |
| 170 | filter_product_ids: string[]; |
| 171 | metadata: any; |
| 172 | name: string; |
| 173 | priority: number; |
| 174 | upsells: { |
| 175 | object: 'list'; |
| 176 | pagination: Pagination; |
| 177 | data: Array<Upsell>; |
| 178 | }; |
| 179 | archived_at: number; |
| 180 | discarded_at: number; |
| 181 | created_at: number; |
| 182 | updated_at: number; |
| 183 | } |
| 184 | export interface Upsell { |
| 185 | id: string; |
| 186 | object: 'upsell'; |
| 187 | amount_off: number; |
| 188 | metadata: any; |
| 189 | fee_description: string; |
| 190 | duplicate_purchase_behavior: 'allow' | 'block' | 'block_within_checkout'; |
| 191 | percent_off: number; |
| 192 | price: string | Price; |
| 193 | step: 'initial' | 'accepted' | 'declined'; |
| 194 | upsell_funnel: string | UpsellFunnel; |
| 195 | permalink: string; |
| 196 | discarded_at: number; |
| 197 | created_at: number; |
| 198 | updated_at: number; |
| 199 | } |
| 200 | export type Prices = { |
| 201 | [id: string]: Price; |
| 202 | }; |
| 203 | export interface Media { |
| 204 | id: string; |
| 205 | object: 'media'; |
| 206 | byte_size: number; |
| 207 | content_type: string; |
| 208 | extension: string; |
| 209 | filename: string; |
| 210 | public_access: boolean; |
| 211 | release_json: any; |
| 212 | alt: string; |
| 213 | title: string; |
| 214 | url?: string; |
| 215 | url_expires_at?: number; |
| 216 | updated_at: number; |
| 217 | created_at: number; |
| 218 | } |
| 219 | export interface Download { |
| 220 | id: string; |
| 221 | object: 'download'; |
| 222 | archived: boolean; |
| 223 | archived_at?: number; |
| 224 | media: string | Media; |
| 225 | name?: string; |
| 226 | product: string | Product; |
| 227 | update_at: number; |
| 228 | created_at: number; |
| 229 | url?: string; |
| 230 | } |
| 231 | export type FormState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalizing' | 'paying' | 'confirming' | 'confirmed' | 'paid' | 'failure' | 'expired' | 'redirecting'; |
| 232 | export type FormStateSetter = 'RESOLVE' | 'REJECT' | 'FINALIZE' | 'PAYING' | 'PAID' | 'EXPIRE' | 'FETCH'; |
| 233 | export interface License { |
| 234 | id: string; |
| 235 | object: 'license'; |
| 236 | activation_limit: number; |
| 237 | activation_count: number; |
| 238 | key: string; |
| 239 | activations?: { |
| 240 | object: 'list'; |
| 241 | pagination: Pagination; |
| 242 | data: Array<Activation>; |
| 243 | }; |
| 244 | status: 'inactive' | 'active' | 'revoked'; |
| 245 | purchase: string | Purchase; |
| 246 | created_at: number; |
| 247 | updated_at: number; |
| 248 | } |
| 249 | export interface CancellationReason { |
| 250 | id: string; |
| 251 | object: 'cancellation_reason'; |
| 252 | archived: boolean; |
| 253 | comment_enabled: false; |
| 254 | comment_prompt: string | null; |
| 255 | coupon_enabled: boolean; |
| 256 | label: string; |
| 257 | position: number; |
| 258 | archived_at: number; |
| 259 | discarded_at: number; |
| 260 | created_at: number; |
| 261 | updated_at: number; |
| 262 | } |
| 263 | export interface Period { |
| 264 | id: string; |
| 265 | object: 'period'; |
| 266 | ad_hoc_amount?: number; |
| 267 | checkout: string | Checkout; |
| 268 | customer_id: string | Customer; |
| 269 | end_at?: number; |
| 270 | next_payment_retry_at: number; |
| 271 | payment_retry_count: number; |
| 272 | price: string | Price; |
| 273 | purchase_id: string | Purchase; |
| 274 | quantity: number; |
| 275 | renewal: boolean; |
| 276 | skip_proration: boolean; |
| 277 | start_at: number; |
| 278 | status: 'draft'; |
| 279 | subscription: string | Subscription; |
| 280 | created_at: number; |
| 281 | updated_at: number; |
| 282 | } |
| 283 | export interface Activation { |
| 284 | id: string; |
| 285 | object: 'activation'; |
| 286 | name: string; |
| 287 | counted: boolean; |
| 288 | fingerprint: string; |
| 289 | license: string | License; |
| 290 | created_at: number; |
| 291 | updated_at: number; |
| 292 | } |
| 293 | export interface Variant { |
| 294 | id: string; |
| 295 | amount: number; |
| 296 | available_stock: number; |
| 297 | currency: string; |
| 298 | current_version: boolean; |
| 299 | held_stock: number; |
| 300 | stock: number; |
| 301 | object: 'variant'; |
| 302 | image?: string | Media; |
| 303 | image_url?: string; |
| 304 | option_1?: string | null; |
| 305 | option_2?: string | null; |
| 306 | option_3?: string | null; |
| 307 | position: number; |
| 308 | product: string | Product; |
| 309 | sku?: string | null; |
| 310 | created_at: number; |
| 311 | updated_at: number; |
| 312 | } |
| 313 | export interface ProductMetrics { |
| 314 | currency: string; |
| 315 | max_price_amount: number; |
| 316 | min_price_amount: number; |
| 317 | prices_count: number; |
| 318 | } |
| 319 | export interface Product extends Object { |
| 320 | id: string; |
| 321 | name: string; |
| 322 | description: string; |
| 323 | archived: boolean; |
| 324 | archived_at: string; |
| 325 | metadata: any; |
| 326 | image_url: string; |
| 327 | recurring: boolean; |
| 328 | tax_category: string; |
| 329 | tax_enabled: boolean; |
| 330 | purchase_limit: number; |
| 331 | metrics: ProductMetrics; |
| 332 | line_item_image: ImageAttributes; |
| 333 | permalink: string; |
| 334 | weight: number; |
| 335 | weight_unit: 'kg' | 'lb' | 'g' | 'oz'; |
| 336 | featured_product_media?: string | ProductMedia; |
| 337 | prices: { |
| 338 | object: 'list'; |
| 339 | pagination: Pagination; |
| 340 | data: Array<Price>; |
| 341 | }; |
| 342 | variants: { |
| 343 | object: 'list'; |
| 344 | pagination: Pagination; |
| 345 | data: Array<Variant>; |
| 346 | }; |
| 347 | variant_options: { |
| 348 | object: 'list'; |
| 349 | pagination: Pagination; |
| 350 | data: Array<VariantOption>; |
| 351 | }; |
| 352 | product_medias: { |
| 353 | object: 'list'; |
| 354 | pagination: Pagination; |
| 355 | data: Array<ProductMedia>; |
| 356 | }; |
| 357 | downloads: { |
| 358 | object: 'list'; |
| 359 | pagination: Pagination; |
| 360 | data: Array<Download>; |
| 361 | }; |
| 362 | product_collections: { |
| 363 | object: 'list'; |
| 364 | pagination: Pagination; |
| 365 | data: Array<Collection>; |
| 366 | }; |
| 367 | stock_enabled: boolean; |
| 368 | allow_out_of_stock_purchases: boolean; |
| 369 | stock: number; |
| 370 | available_stock: number; |
| 371 | held_stock: number; |
| 372 | created_at: number; |
| 373 | updated_at: number; |
| 374 | } |
| 375 | export type Products = { |
| 376 | [id: string]: Product; |
| 377 | }; |
| 378 | export interface Collection extends Object { |
| 379 | id: string; |
| 380 | name: string; |
| 381 | description: string; |
| 382 | image_url: string; |
| 383 | created_at: number; |
| 384 | updated_at: number; |
| 385 | } |
| 386 | export interface Coupon extends Model { |
| 387 | id: string; |
| 388 | object: 'coupon'; |
| 389 | amount_off: number; |
| 390 | valid?: boolean; |
| 391 | expired: boolean; |
| 392 | currency: string; |
| 393 | duration: string; |
| 394 | duration_in_months: number; |
| 395 | max_redemptions: number; |
| 396 | metadata: Object; |
| 397 | name: string; |
| 398 | percent_off: number; |
| 399 | redeem_by: number; |
| 400 | times_redeemed: number; |
| 401 | } |
| 402 | export interface LineItemData extends Object { |
| 403 | id?: string; |
| 404 | price_id?: string; |
| 405 | variant_id?: string; |
| 406 | bump?: string; |
| 407 | quantity: number; |
| 408 | ad_hoc_amount?: number; |
| 409 | variant?: string; |
| 410 | } |
| 411 | export type LineItemsData = { |
| 412 | [id: string]: Array<LineItemData>; |
| 413 | }; |
| 414 | export interface ImageAttributes { |
| 415 | src: string; |
| 416 | alt?: string; |
| 417 | class?: string; |
| 418 | decoding?: string; |
| 419 | height?: number; |
| 420 | loading?: string; |
| 421 | sizes?: string; |
| 422 | srcset?: string; |
| 423 | width?: number; |
| 424 | } |
| 425 | export interface LineItem extends Object { |
| 426 | id?: string; |
| 427 | ad_hoc_amount?: number; |
| 428 | name: string; |
| 429 | object: string; |
| 430 | quantity: number; |
| 431 | checkout: string | Checkout; |
| 432 | bump: string | Bump; |
| 433 | image: ImageAttributes; |
| 434 | fees?: { |
| 435 | object: 'list'; |
| 436 | pagination: Pagination; |
| 437 | data: Array<Fee>; |
| 438 | }; |
| 439 | bump_amount: number; |
| 440 | discount_amount: number; |
| 441 | subtotal_amount: number; |
| 442 | total_amount: number; |
| 443 | trial_amount: number; |
| 444 | tax_amount: number; |
| 445 | fees_amount: number; |
| 446 | scratch_amount: number; |
| 447 | trial: boolean; |
| 448 | total_savings_amount: number; |
| 449 | created_at: number; |
| 450 | updated_at: number; |
| 451 | price?: Price; |
| 452 | price_id: string; |
| 453 | purchasable_status: 'price_gone' | 'price_old_version' | 'variant_mising' | 'variant_gone' | 'variant_old_version' | 'out_of_stock' | 'exceeds_purchase_limit' | 'purchasable'; |
| 454 | purchasable_status_display: string; |
| 455 | variant_options: Array<string>; |
| 456 | variant?: Variant; |
| 457 | locked: boolean; |
| 458 | } |
| 459 | export interface DeletedItem { |
| 460 | cache_status: string; |
| 461 | deleted: boolean; |
| 462 | id: string; |
| 463 | object: string; |
| 464 | } |
| 465 | export interface Fee { |
| 466 | id: string; |
| 467 | object: 'fee'; |
| 468 | amount: number; |
| 469 | description: string; |
| 470 | fee_type: 'manual' | 'bump' | 'setup' | 'upsell'; |
| 471 | line_item: string | LineItem; |
| 472 | created_at: number; |
| 473 | updated_at: number; |
| 474 | } |
| 475 | export interface InvoiceItem extends LineItem { |
| 476 | } |
| 477 | export interface PriceChoice { |
| 478 | id: string; |
| 479 | product_id: string; |
| 480 | quantity: number; |
| 481 | enabled: boolean; |
| 482 | selected?: boolean; |
| 483 | variant?: string | null; |
| 484 | } |
| 485 | export type CheckoutState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalized' | 'paid' | 'failure'; |
| 486 | export type TaxStatus = 'disabled' | 'address_invalid' | 'reverse_charged' | 'tax_registration_not_found' | 'tax_zone_not_found' | 'estimated' | 'calculated'; |
| 487 | export interface Invoice extends Object { |
| 488 | id: string; |
| 489 | object: 'invoice'; |
| 490 | automatic_collection: boolean; |
| 491 | due_date?: number; |
| 492 | issue_date?: number; |
| 493 | footer?: string; |
| 494 | memo?: string; |
| 495 | live_mode: boolean; |
| 496 | status: InvoiceStatus; |
| 497 | checkout: Checkout | string; |
| 498 | metadata: object; |
| 499 | order_number: string; |
| 500 | created_at: number; |
| 501 | updated_at: number; |
| 502 | } |
| 503 | export interface BillingAddress extends Address { |
| 504 | } |
| 505 | export interface ShippingAddress extends Address { |
| 506 | } |
| 507 | export interface ProductGroup { |
| 508 | id: string; |
| 509 | object: 'product_group'; |
| 510 | archived: boolean; |
| 511 | archived_at: number; |
| 512 | metadata: object; |
| 513 | name: string; |
| 514 | created_at: number; |
| 515 | updated_at: number; |
| 516 | } |
| 517 | export interface ProductMedia { |
| 518 | id: string; |
| 519 | object: 'product_media'; |
| 520 | position: number; |
| 521 | url: null; |
| 522 | media: string | Media; |
| 523 | product: string | Product; |
| 524 | created_at: number; |
| 525 | updated_at: number; |
| 526 | } |
| 527 | export interface Charge extends Object { |
| 528 | amount: number; |
| 529 | created_at: number; |
| 530 | currency: string; |
| 531 | customer: string | Customer; |
| 532 | external_charge_id: string; |
| 533 | fully_refunded: boolean; |
| 534 | id: string; |
| 535 | invoice: string | Invoice; |
| 536 | live_mode: boolean; |
| 537 | object: 'charge'; |
| 538 | checkout: string | Checkout; |
| 539 | payment_method: string | PaymentMethod; |
| 540 | refunded_amount: number; |
| 541 | status: 'pending' | 'succeeded' | 'failed'; |
| 542 | updated_at: number; |
| 543 | } |
| 544 | export interface TaxIdentifier { |
| 545 | id: string; |
| 546 | number: string; |
| 547 | number_type: string; |
| 548 | object: 'tax_identifier'; |
| 549 | eu_vat_verified: boolean; |
| 550 | created_at: number; |
| 551 | updated_at: number; |
| 552 | } |
| 553 | export interface TaxProtocol { |
| 554 | id: string; |
| 555 | object: 'tax_protocol'; |
| 556 | ca_tax_enabled: boolean; |
| 557 | eu_micro_exemption_enabled: boolean; |
| 558 | eu_tax_enabled: boolean; |
| 559 | eu_vat_required: boolean; |
| 560 | eu_vat_unverified_behavior: 'error' | 'apply_reverse_charge' | 'skip_reverse_charge'; |
| 561 | eu_vat_local_reverse_charge: boolean; |
| 562 | tax_enabled: boolean; |
| 563 | address: string | Address; |
| 564 | ca_tax_identifier: string | TaxIdentifier; |
| 565 | eu_tax_identifier: string | TaxIdentifier; |
| 566 | created_at: number; |
| 567 | updated_at: number; |
| 568 | } |
| 569 | export interface Order extends Object { |
| 570 | id?: string; |
| 571 | object: 'order'; |
| 572 | number?: string; |
| 573 | order_type?: 'checkout' | 'subscription'; |
| 574 | statement_url?: string; |
| 575 | status?: OrderStatus; |
| 576 | shipment_status?: OrderShipmentStatus; |
| 577 | checkout?: Checkout | string; |
| 578 | invoice?: Invoice | string; |
| 579 | created_at: number; |
| 580 | updated_at: number; |
| 581 | } |
| 582 | export interface ShippingChoice { |
| 583 | amount: number; |
| 584 | checkout: string | Checkout; |
| 585 | currency: string; |
| 586 | id: string; |
| 587 | object: 'shipping_choice'; |
| 588 | shipping_method: string | ShippingMethod; |
| 589 | created_at: number; |
| 590 | updated_at: number; |
| 591 | } |
| 592 | export interface ShippingMethod { |
| 593 | name: string; |
| 594 | description: string; |
| 595 | id: string; |
| 596 | object: 'shipping_method'; |
| 597 | position: number; |
| 598 | created_at: number; |
| 599 | updated_at: number; |
| 600 | } |
| 601 | export interface Checkout extends Object { |
| 602 | id?: string; |
| 603 | status?: 'canceled' | 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'processing'; |
| 604 | staged_payment_intents: { |
| 605 | object: 'list'; |
| 606 | pagination: Pagination; |
| 607 | data: Array<PaymentIntent>; |
| 608 | }; |
| 609 | abandoned_checkout_enabled: boolean; |
| 610 | billing_matches_shipping: boolean; |
| 611 | bump_amount: number; |
| 612 | payment_method_required?: boolean; |
| 613 | manual_payment: boolean; |
| 614 | manual_payment_method?: string | ManualPaymentMethod; |
| 615 | reusable_payment_method_required?: boolean; |
| 616 | number?: string; |
| 617 | amount_due?: number; |
| 618 | remaining_amount_due?: number; |
| 619 | trial_amount?: number; |
| 620 | charge?: string | Charge; |
| 621 | name?: string; |
| 622 | first_name?: string; |
| 623 | last_name?: string; |
| 624 | email?: string; |
| 625 | phone?: string; |
| 626 | live_mode?: boolean; |
| 627 | currency?: string; |
| 628 | total_amount?: number; |
| 629 | subtotal_amount?: number; |
| 630 | full_amount?: number; |
| 631 | paid_amount?: number; |
| 632 | proration_amount?: number; |
| 633 | total_savings_amount?: number; |
| 634 | applied_balance_amount?: number; |
| 635 | discounts?: number; |
| 636 | shipping_address_required?: boolean; |
| 637 | tax_enabled: boolean; |
| 638 | tax_amount: number; |
| 639 | email_exists: boolean; |
| 640 | tax_inclusive_amount: number; |
| 641 | tax_exclusive_amount: number; |
| 642 | tax_status: 'disabled' | 'address_invalid' | 'estimated' | 'calculated'; |
| 643 | tax_label: string; |
| 644 | tax_percent: number; |
| 645 | line_items: lineItems; |
| 646 | recommended_bumps?: { |
| 647 | object: 'list'; |
| 648 | pagination: Pagination; |
| 649 | data: Array<Bump>; |
| 650 | }; |
| 651 | current_upsell: Upsell; |
| 652 | recommended_upsells?: { |
| 653 | object: 'list'; |
| 654 | pagination: Pagination; |
| 655 | data: Array<Upsell>; |
| 656 | }; |
| 657 | metadata?: any; |
| 658 | payment_intent?: PaymentIntent; |
| 659 | payment_method?: PaymentMethod; |
| 660 | order?: string | Order; |
| 661 | customer: string | Customer; |
| 662 | subscriptions: { |
| 663 | object: 'list'; |
| 664 | pagination: Pagination; |
| 665 | data: Array<Subscription>; |
| 666 | }; |
| 667 | purchases: { |
| 668 | object: 'list'; |
| 669 | pagination: Pagination; |
| 670 | data: Array<Purchase>; |
| 671 | }; |
| 672 | discount_amount?: number; |
| 673 | discount?: DiscountResponse; |
| 674 | billing_address?: string | Address; |
| 675 | shipping_amount?: number; |
| 676 | shipping_address?: string | Address; |
| 677 | shipping_enabled?: boolean; |
| 678 | shipping_choices?: { |
| 679 | object: 'list'; |
| 680 | pagination: Pagination; |
| 681 | data: Array<ShippingChoice>; |
| 682 | }; |
| 683 | selected_shipping_choice?: string | ShippingChoice; |
| 684 | selected_shipping_choice_required: boolean; |
| 685 | processor_data?: ProcessorData; |
| 686 | tax_identifier?: { |
| 687 | number: string; |
| 688 | number_type: string; |
| 689 | }; |
| 690 | url: string; |
| 691 | created_at?: number; |
| 692 | updated_at: number; |
| 693 | variant: string; |
| 694 | upsells_expire_at?: number; |
| 695 | invoice?: string | Invoice; |
| 696 | pdf_url?: string; |
| 697 | } |
| 698 | export interface ShippingMethod { |
| 699 | id: string; |
| 700 | object: 'shipping_method'; |
| 701 | description: string | null; |
| 702 | name: string; |
| 703 | position: number; |
| 704 | created_at: number; |
| 705 | updated_at: number; |
| 706 | } |
| 707 | export interface ShippingChoice { |
| 708 | id: string; |
| 709 | object: 'shipping_choice'; |
| 710 | amount: number; |
| 711 | currency: string; |
| 712 | checkout: string | Checkout; |
| 713 | shipping_method: string | ShippingMethod; |
| 714 | created_at: number; |
| 715 | updated_at: number; |
| 716 | } |
| 717 | export interface ProcessorData { |
| 718 | stripe: { |
| 719 | account_id: string; |
| 720 | publishable_key: string; |
| 721 | client_secret?: string; |
| 722 | type: 'payment' | 'setup'; |
| 723 | }; |
| 724 | paypal: { |
| 725 | account_id: string; |
| 726 | client_id: string; |
| 727 | merchant_initiated: boolean; |
| 728 | }; |
| 729 | mollie?: { |
| 730 | account_id: 'string'; |
| 731 | checkout_url: 'string'; |
| 732 | }; |
| 733 | paystack: { |
| 734 | account_id: string; |
| 735 | public_key: string; |
| 736 | access_code: string; |
| 737 | }; |
| 738 | } |
| 739 | export interface ManualPaymentMethod { |
| 740 | id: string; |
| 741 | object: 'manual_payment_method'; |
| 742 | archived: boolean; |
| 743 | archived_at: number; |
| 744 | description: string; |
| 745 | instructions: string; |
| 746 | name: string; |
| 747 | created_at: number; |
| 748 | updated_at: number; |
| 749 | } |
| 750 | export interface PaymentMethodType { |
| 751 | id: string; |
| 752 | description: string; |
| 753 | image: string; |
| 754 | } |
| 755 | export interface Processor { |
| 756 | id: string; |
| 757 | live_mode: boolean; |
| 758 | processor_data: { |
| 759 | account_id: string; |
| 760 | recurring_enabled: boolean; |
| 761 | client_id: string; |
| 762 | merchant_initiated?: boolean; |
| 763 | }; |
| 764 | recurring_enabled: boolean; |
| 765 | supported_currencies: Array<string>; |
| 766 | processor_type: 'paypal' | 'stripe' | 'mollie' | 'mock'; |
| 767 | } |
| 768 | export interface Purchase { |
| 769 | id: string; |
| 770 | object: 'purchase'; |
| 771 | live_mode: boolean; |
| 772 | quantity: number; |
| 773 | revoked: boolean; |
| 774 | revoked_at: number; |
| 775 | customer: string | Customer; |
| 776 | invoice_item: string | InvoiceItem; |
| 777 | invoice: string | Invoice; |
| 778 | line_item: string | LineItem; |
| 779 | order: string | Order; |
| 780 | product: string | Product; |
| 781 | refund: string | Refund; |
| 782 | subscription: string | Subscription; |
| 783 | license: string | License; |
| 784 | created_at: number; |
| 785 | updated_at: number; |
| 786 | } |
| 787 | export interface Refund { |
| 788 | id: string; |
| 789 | object: 'refund'; |
| 790 | amount: number; |
| 791 | currency: string; |
| 792 | external_refund_id: string; |
| 793 | live_mode: boolean; |
| 794 | metadata: object; |
| 795 | reason: 'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge'; |
| 796 | status: 'pending' | 'succeeded' | 'failed' | 'canceled'; |
| 797 | charge: string | Charge; |
| 798 | customer: string | Customer; |
| 799 | revoked_purchases: null | Array<Purchase>; |
| 800 | created_at: number; |
| 801 | updated_at: number; |
| 802 | } |
| 803 | export interface Subscription extends Object { |
| 804 | id: string; |
| 805 | object: 'subscription'; |
| 806 | currency?: string; |
| 807 | status: SubscriptionStatus; |
| 808 | live_mode: boolean; |
| 809 | external_subscription_id: string; |
| 810 | current_cancellation_act: string | CancellationAct; |
| 811 | trial_end_at: number; |
| 812 | processor_type: 'stripe' | 'paypal'; |
| 813 | order: Order; |
| 814 | customer: Customer; |
| 815 | discount: DiscountResponse; |
| 816 | finite: boolean; |
| 817 | pending_update: { |
| 818 | ad_hoc_amount?: number; |
| 819 | price?: string; |
| 820 | quantity?: number; |
| 821 | variant?: string; |
| 822 | }; |
| 823 | purchase: Purchase | string; |
| 824 | cancel_at_period_end: number | false; |
| 825 | current_period: string | Period; |
| 826 | current_period_end_at: number | false; |
| 827 | current_period_start_at: number | false; |
| 828 | remaining_period_count: number | null; |
| 829 | ended_at: number; |
| 830 | end_behavior: 'cancel' | 'complete'; |
| 831 | payment_method: PaymentMethod | string; |
| 832 | manual_payment_method: ManualPaymentMethod | string; |
| 833 | manual_payment: boolean; |
| 834 | price: Price; |
| 835 | ad_hoc_amount: number; |
| 836 | variant?: Variant | string; |
| 837 | variant_options?: Array<string>; |
| 838 | created_at: number; |
| 839 | updated_at: number; |
| 840 | restore_at?: number; |
| 841 | } |
| 842 | export interface CancellationAct { |
| 843 | id: string; |
| 844 | object: 'cancellation_act'; |
| 845 | cancellation_reason: string | CancellationReason; |
| 846 | comment: string; |
| 847 | coupon_applied: boolean; |
| 848 | preserved: boolean; |
| 849 | subscription: string | Subscription; |
| 850 | performed_at: number; |
| 851 | created_at: number; |
| 852 | updated_at: number; |
| 853 | } |
| 854 | export interface SubscriptionProtocol { |
| 855 | id: string; |
| 856 | object: 'subscription_protocol'; |
| 857 | cancel_behavior: 'pending' | 'immediate'; |
| 858 | downgrade_behavior: 'pending' | 'immediate'; |
| 859 | payment_retry_window_weeks: number; |
| 860 | upgrade_behavior: 'pending' | 'immediate'; |
| 861 | preservation_enabled: boolean; |
| 862 | preservation_locales: { |
| 863 | reasons_title: string; |
| 864 | reasons_description: string; |
| 865 | skip_link: string; |
| 866 | preserve_title: string; |
| 867 | preserve_description: string; |
| 868 | preserve_button: string; |
| 869 | cancel_link: string; |
| 870 | }; |
| 871 | preservation_coupon: Coupon | string; |
| 872 | created_at: number; |
| 873 | updated_at: number; |
| 874 | } |
| 875 | export type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'completed'; |
| 876 | export type CheckoutStatus = 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'requires_approval'; |
| 877 | export type OrderStatus = 'paid' | 'payment_failed' | 'processing' | 'void' | 'canceled' | 'draft'; |
| 878 | export type InvoiceStatus = 'paid' | 'open' | 'draft'; |
| 879 | export type OrderFulFillmentStatus = 'fulfilled' | 'unfulfilled' | 'partially_fulfilled' | 'scheduled' | 'on_hold'; |
| 880 | export type OrderShipmentStatus = 'unshipped' | 'shipped' | 'partially_shipped' | 'delivered' | 'unshippable'; |
| 881 | export type FulfillmentStatus = 'unshipped' | 'shipped' | 'delivered' | 'unshippable'; |
| 882 | export type ReturnRequestStatus = 'open' | 'completed'; |
| 883 | export interface PaymentMethod extends Object { |
| 884 | id: string; |
| 885 | object: 'payment_method'; |
| 886 | live_mode: boolean; |
| 887 | external_payment_method_id: string; |
| 888 | processor_type: 'stripe' | 'paypal'; |
| 889 | paypal_account: any; |
| 890 | type: string; |
| 891 | bank_account: BankAccount | string; |
| 892 | payment_instrument: PaymentInstrument | string; |
| 893 | payment_method_name: string; |
| 894 | payment_intent: PaymentIntent | string; |
| 895 | billing_agreement?: BillingAgreement | string; |
| 896 | card: any; |
| 897 | customer: Customer | string; |
| 898 | created_at: number; |
| 899 | updated_at: number; |
| 900 | } |
| 901 | export interface BankAccount { |
| 902 | id: string; |
| 903 | account_type: 'checking' | 'savings'; |
| 904 | account_holder_type: 'individual' | 'company'; |
| 905 | bank_name: string; |
| 906 | last4: string; |
| 907 | created_at: number; |
| 908 | updated_at: number; |
| 909 | } |
| 910 | export interface PaymentInstrument { |
| 911 | id: string; |
| 912 | instrument_type: string; |
| 913 | metadata: any; |
| 914 | object: 'payment_instrument'; |
| 915 | created_at: number; |
| 916 | updated_at: number; |
| 917 | } |
| 918 | export interface BillingAgreement { |
| 919 | email: string; |
| 920 | external_customer_id: string; |
| 921 | first_name: string; |
| 922 | id: string; |
| 923 | last_name: string; |
| 924 | phone: string; |
| 925 | object: 'billing_agreement'; |
| 926 | created_at: number; |
| 927 | updated_at: number; |
| 928 | } |
| 929 | export interface Pagination { |
| 930 | count: number; |
| 931 | limit: number; |
| 932 | page: number; |
| 933 | url: string; |
| 934 | } |
| 935 | export interface lineItems extends Object { |
| 936 | object: 'list'; |
| 937 | pagination: Pagination; |
| 938 | data: Array<LineItem>; |
| 939 | } |
| 940 | export interface Promotion extends Object { |
| 941 | code: string; |
| 942 | created_at: number; |
| 943 | expired: boolean; |
| 944 | id: string; |
| 945 | max_redemptions: number; |
| 946 | metadata: Object; |
| 947 | object: 'promotion'; |
| 948 | redeem_by: string; |
| 949 | times_redeemed: number; |
| 950 | } |
| 951 | export interface DiscountResponse { |
| 952 | coupon?: Coupon; |
| 953 | id: string; |
| 954 | object: 'discount'; |
| 955 | promotion: Promotion; |
| 956 | redeemable_status: string; |
| 957 | } |
| 958 | export interface ResponseError { |
| 959 | code?: string; |
| 960 | message: string; |
| 961 | data?: { |
| 962 | http_status: string; |
| 963 | status?: number; |
| 964 | type: string; |
| 965 | }; |
| 966 | additional_errors?: Array<{ |
| 967 | code: string; |
| 968 | message: string; |
| 969 | data: { |
| 970 | attribute: string; |
| 971 | options: Array<string>; |
| 972 | type: string; |
| 973 | }; |
| 974 | }>; |
| 975 | } |
| 976 | export type ProcessorName = 'stripe' | 'paypal' | 'paypal-card'; |
| 977 | export interface VerificationCode { |
| 978 | id: string; |
| 979 | object: 'verification_code'; |
| 980 | code: number; |
| 981 | verified: boolean; |
| 982 | verified_at: number | null; |
| 983 | created_at: number; |
| 984 | updated_at: number; |
| 985 | } |
| 986 | export interface PaymentIntent extends Object { |
| 987 | id: string; |
| 988 | object: 'payment_intent'; |
| 989 | amount: number; |
| 990 | currency: string; |
| 991 | processor_type: 'stripe' | 'paypal'; |
| 992 | status: 'pending' | 'succeeded' | 'canceled'; |
| 993 | external_intent_id: string; |
| 994 | live_mode: boolean; |
| 995 | processor_data: ProcessorData; |
| 996 | customer: Customer | string; |
| 997 | created_at: number; |
| 998 | updated_at: number; |
| 999 | payment_method: PaymentMethod | string; |
| 1000 | } |
| 1001 | export interface PaymentIntents { |
| 1002 | stripe?: PaymentIntent; |
| 1003 | paypal?: PaymentIntent; |
| 1004 | } |
| 1005 | export interface SetupIntent extends Object { |
| 1006 | id: string; |
| 1007 | object: 'setup_intent'; |
| 1008 | processor_type: 'stripe' | 'paypal'; |
| 1009 | status: 'pending' | 'succeeded' | 'canceled'; |
| 1010 | external_intent_id: string; |
| 1011 | live_mode: boolean; |
| 1012 | processor_data: ProcessorData; |
| 1013 | customer: Customer | string; |
| 1014 | created_at: number; |
| 1015 | updated_at: number; |
| 1016 | } |
| 1017 | export interface WordPressUser { |
| 1018 | id: number; |
| 1019 | display_name: string; |
| 1020 | first_name: string; |
| 1021 | last_name: string; |
| 1022 | email: string; |
| 1023 | } |
| 1024 | export interface Customer extends Object { |
| 1025 | id: string; |
| 1026 | email: string; |
| 1027 | name?: string; |
| 1028 | first_name?: string; |
| 1029 | last_name?: string; |
| 1030 | phone?: string; |
| 1031 | billing_address?: string | Address; |
| 1032 | billing_address_display?: string | Address; |
| 1033 | shipping_address?: string | Address; |
| 1034 | billing_matches_shipping: boolean; |
| 1035 | live_mode: boolean; |
| 1036 | unsubscribed: boolean; |
| 1037 | default_payment_method: string | PaymentMethod; |
| 1038 | tax_identifier: { |
| 1039 | number: string; |
| 1040 | number_type: string; |
| 1041 | }; |
| 1042 | created_at: number; |
| 1043 | updated_at: number; |
| 1044 | } |
| 1045 | export interface Address extends Object { |
| 1046 | name?: string; |
| 1047 | line_1?: string; |
| 1048 | line_2?: string; |
| 1049 | city?: string; |
| 1050 | state?: string; |
| 1051 | postal_code?: string; |
| 1052 | country?: string; |
| 1053 | } |
| 1054 | export interface Fulfillment { |
| 1055 | id: string; |
| 1056 | object: 'fulfillment'; |
| 1057 | number: string; |
| 1058 | shipment_status: FulfillmentStatus; |
| 1059 | trackings: { |
| 1060 | object: 'list'; |
| 1061 | pagination: Pagination; |
| 1062 | data: Array<Tracking>; |
| 1063 | }; |
| 1064 | fulfillment_items: { |
| 1065 | object: 'list'; |
| 1066 | pagination: Pagination; |
| 1067 | data: Array<FulfillmentItem>; |
| 1068 | }; |
| 1069 | } |
| 1070 | export interface FulfillmentItem { |
| 1071 | id: string; |
| 1072 | line_item: LineItem; |
| 1073 | quantity: number; |
| 1074 | fulfillment: string | Fulfillment; |
| 1075 | } |
| 1076 | export interface Tracking { |
| 1077 | courier_name?: string; |
| 1078 | number: string; |
| 1079 | url: string; |
| 1080 | } |
| 1081 | export interface PriceData extends Object { |
| 1082 | price_id: string; |
| 1083 | quantity: number; |
| 1084 | removeable: boolean; |
| 1085 | } |
| 1086 | export type TaxZone = { |
| 1087 | label: string; |
| 1088 | label_small: string; |
| 1089 | }; |
| 1090 | export type TaxZones = { |
| 1091 | [key in 'ca_gst' | 'au_abn' | 'gb_vat' | 'eu_vat' | 'other']: TaxZone; |
| 1092 | }; |
| 1093 | export type RuleName = 'total' | 'coupons' | 'products' | 'shipping_country' | 'billing_country' | 'processors'; |
| 1094 | export type ArrayOperators = 'all' | 'any' | 'none' | 'exist' | 'not_exist'; |
| 1095 | export type NumberOperators = '==' | '!=' | '<' | '>' | '<=' | '>='; |
| 1096 | export interface RuleGroup { |
| 1097 | group_id: string; |
| 1098 | rules: Rule[]; |
| 1099 | } |
| 1100 | export interface Rule { |
| 1101 | condition: RuleName; |
| 1102 | operator: NumberOperators | ArrayOperators; |
| 1103 | value: string | string[] | { |
| 1104 | value: string; |
| 1105 | }[]; |
| 1106 | } |
| 1107 | export interface ProductCollection { |
| 1108 | id: string; |
| 1109 | object: string; |
| 1110 | name: string; |
| 1111 | description?: string; |
| 1112 | position?: number; |
| 1113 | slug: string; |
| 1114 | image?: string; |
| 1115 | products_count: number; |
| 1116 | products?: Product[]; |
| 1117 | } |
| 1118 | export interface GoogleAnalyticsItem { |
| 1119 | item_id: string; |
| 1120 | item_name: string; |
| 1121 | item_variant?: string; |
| 1122 | item_category?: string; |
| 1123 | item_category2?: string; |
| 1124 | item_category3?: string; |
| 1125 | item_category4?: string; |
| 1126 | item_category5?: string; |
| 1127 | price: number; |
| 1128 | quantity: number; |
| 1129 | coupon?: string; |
| 1130 | currency: string; |
| 1131 | discount?: number; |
| 1132 | } |
| 1133 | export interface ProductState { |
| 1134 | formId: number; |
| 1135 | mode: 'live' | 'test'; |
| 1136 | product: Product; |
| 1137 | prices: Price[]; |
| 1138 | variants: Variant[]; |
| 1139 | variant_options: VariantOption[]; |
| 1140 | quantity: number; |
| 1141 | selectedPrice: Price; |
| 1142 | total: number; |
| 1143 | busy: boolean; |
| 1144 | disabled: boolean; |
| 1145 | checkoutUrl: string; |
| 1146 | adHocAmount: number; |
| 1147 | dialog: string; |
| 1148 | line_item: LineItemData; |
| 1149 | error: string; |
| 1150 | selectedVariant?: Variant; |
| 1151 | variantValues: { |
| 1152 | option_1?: string; |
| 1153 | option_2?: string; |
| 1154 | option_3?: string; |
| 1155 | }; |
| 1156 | isProductPage?: boolean; |
| 1157 | } |
| 1158 | export interface FeaturedProductMediaAttributes { |
| 1159 | alt: string; |
| 1160 | url: string; |
| 1161 | title: string; |
| 1162 | } |
| 1163 | export interface PaymentInfoAddedParams { |
| 1164 | checkout_id: string; |
| 1165 | processor_type: 'paypal' | 'stripe' | 'mollie' | 'paystack'; |
| 1166 | currency: string; |
| 1167 | total_amount: number; |
| 1168 | line_items?: lineItems; |
| 1169 | payment_method: { |
| 1170 | billing_details: { |
| 1171 | name: string; |
| 1172 | email: string; |
| 1173 | }; |
| 1174 | }; |
| 1175 | } |
| 1176 | export interface CheckoutInitiatedParams { |
| 1177 | transaction_id: string; |
| 1178 | value: number; |
| 1179 | currency: string; |
| 1180 | coupon?: string; |
| 1181 | tax?: number; |
| 1182 | items: Array<{ |
| 1183 | item_name: string; |
| 1184 | discount: number; |
| 1185 | price: number; |
| 1186 | quantity: number; |
| 1187 | }>; |
| 1188 | } |
| 1189 | export interface ProductsSearchedParams { |
| 1190 | searchString: string; |
| 1191 | searchCollections?: string[]; |
| 1192 | searchResultCount: number; |
| 1193 | searchResultIds: string[]; |
| 1194 | } |
| 1195 | export interface ProductsViewedParams { |
| 1196 | products: Product[]; |
| 1197 | pageTitle: string; |
| 1198 | collectionId?: string; |
| 1199 | } |
| 1200 | export type NoticeType = 'default' | 'info' | 'success' | 'warning' | 'error'; |
| 1201 | interface AdditionalError { |
| 1202 | code: string; |
| 1203 | message: string; |
| 1204 | data: { |
| 1205 | attribute: string; |
| 1206 | type: string; |
| 1207 | options: { |
| 1208 | if: string[]; |
| 1209 | value: string; |
| 1210 | }; |
| 1211 | }; |
| 1212 | } |
| 1213 | export interface ScNoticeStore { |
| 1214 | type: NoticeType | 'default'; |
| 1215 | code: string; |
| 1216 | message: string; |
| 1217 | data?: { |
| 1218 | status: number; |
| 1219 | type: string; |
| 1220 | http_status: string; |
| 1221 | }; |
| 1222 | additional_errors?: AdditionalError[] | null; |
| 1223 | dismissible?: boolean; |
| 1224 | } |
| 1225 | export interface CustomStripeElementChangeEvent extends StripeElementChangeEvent { |
| 1226 | value?: { |
| 1227 | type: string; |
| 1228 | }; |
| 1229 | } |
| 1230 | export {}; |
| 1231 |