PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.6.1
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.6.1
4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / dist / components / types / types.d.ts
surecart / dist / components / types Last commit date
components 3 days ago functions 3 days ago global 4 years ago services 1 week ago store 3 days ago testing 1 year ago components.d.ts 3 days ago global.d.ts 4 years ago index.d.ts 1 week ago stencil-public-runtime.d.ts 1 year ago types.d.ts 3 days ago
types.d.ts
1531 lines
1 import { ObservableMap } from '@stencil/store';
2 import { StripeElementChangeEvent } from '@stripe/stripe-js';
3 export type IconLibraryResolver = (name: string) => string;
4 export type IconLibraryMutator = (svg: SVGElement) => void;
5 export interface IconLibraryOptions {
6 resolver: IconLibraryResolver;
7 mutator?: IconLibraryMutator;
8 }
9 declare global {
10 interface Window {
11 grecaptcha: any;
12 surecart?: {
13 product?: {
14 store: ObservableMap<any>;
15 state: any;
16 update: Function;
17 };
18 };
19 wp: {
20 apiFetch: any;
21 blocks: any;
22 i18n: any;
23 hooks: {
24 applyFilters?: (filterName: string, defaultValue: any, ...args: any[]) => any;
25 };
26 };
27 dataLayer: any;
28 gtag: any;
29 fbq: any;
30 sc?: {
31 store?: {
32 product?: any;
33 products?: any;
34 };
35 checkout?: {
36 addLineItem: (data: any) => void;
37 };
38 cart?: {
39 toggle: (open: boolean) => void;
40 };
41 };
42 scStore: any;
43 registerSureCartIconPath: (path: string) => void;
44 registerSureCartIconLibrary: (name: string, options: IconLibraryOptions) => void;
45 scIcons: {
46 path: string;
47 };
48 scData: {
49 cdn_root: string;
50 root_url: string;
51 account_id: string;
52 account_slug: string;
53 locale: string;
54 api_url: string;
55 home_url: string;
56 plugin_url: string;
57 page_id: string;
58 persist_cart: 'browser' | 'url' | false;
59 nonce: string;
60 base_url: string;
61 nonce_endpoint: string;
62 recaptcha_site_key: string;
63 theme: string;
64 product_data: {
65 checkout_link: string;
66 mode: 'live' | 'test';
67 form: {
68 ID: number;
69 };
70 product: Product;
71 };
72 pages: {
73 dashboard: string;
74 checkout: string;
75 };
76 currency: string;
77 is_claimed: string;
78 claim_url: string;
79 admin_url: string;
80 user_permissions: {
81 manage_sc_shop_settings: boolean;
82 };
83 google_map_api_key: string;
84 current_user_roles: string[];
85 facebook_tracking_enabled?: boolean;
86 };
87 ceRegisterIconLibrary: any;
88 ResizeObserver: any;
89 scIconLibraries: IconLibrary[];
90 }
91 }
92 export type RecursivePartial<T> = {
93 [P in keyof T]?: RecursivePartial<T[P]>;
94 };
95 interface Model {
96 created_at: number;
97 updated_at: number;
98 }
99 export interface IconLibrary extends IconLibraryOptions {
100 name: string;
101 }
102 export interface ChoiceItem extends Object {
103 value: string;
104 label: string;
105 description?: string;
106 disabled?: boolean;
107 checked?: boolean;
108 unavailable?: boolean;
109 choices?: ChoiceItem[];
110 suffix?: string;
111 suffixDescription?: string;
112 icon?: string;
113 }
114 export type ChoiceType = 'all' | 'single' | 'multiple';
115 export interface Swap {
116 id: string;
117 object: 'swap';
118 archived: boolean;
119 archived_at?: string;
120 description: string;
121 metadata: {
122 [key: string]: string;
123 };
124 price: string | Price;
125 swap_price: string | Price;
126 discarded_at?: number;
127 created_at: number;
128 updated_at: number;
129 }
130 export interface Price {
131 id: string;
132 name: string;
133 description?: string;
134 amount: number;
135 display_amount: string;
136 setup_fee_display_amount: string;
137 setup_fee_text: string;
138 full_amount: number;
139 currency: string;
140 recurring: boolean;
141 recurring_interval?: 'week' | 'month' | 'year' | 'never';
142 recurring_interval_count?: number;
143 trial_duration_days?: number;
144 trial_text?: string;
145 ad_hoc: boolean;
146 ad_hoc_max_amount: number;
147 ad_hoc_min_amount: number;
148 scratch_amount: number;
149 scratch_display_amount: string;
150 setup_fee_enabled: boolean;
151 setup_fee_amount: number;
152 short_interval_text: string;
153 short_interval_count_text: string;
154 interval_text: string;
155 interval_count_text: string;
156 setup_fee_name: string;
157 setup_fee_trial_enabled: boolean;
158 recurring_period_count: number;
159 archived: boolean;
160 product_id?: string;
161 archived_at?: string;
162 created_at: number;
163 updated_at: number;
164 product?: Product | string;
165 position: number;
166 portal_subscription_update_enabled: boolean;
167 metadata: {
168 [key: string]: string;
169 };
170 current_swap?: Swap;
171 }
172 export interface VariantOption {
173 id: string;
174 object: string;
175 name: string;
176 position: number;
177 product: Product | string;
178 display_type: 'dropdown' | 'pills';
179 updated_at: number;
180 created_at: number;
181 label: string;
182 labels: string;
183 values: Array<string>;
184 }
185 export interface Bump {
186 id: string;
187 object: 'bump';
188 amount_off: number;
189 amount_off_display_amount: string;
190 subtotal_display_amount: string;
191 subtotal_amount: number;
192 total_display_amount: string;
193 total_amount: number;
194 archived: boolean;
195 archived_at: number;
196 auto_apply: boolean;
197 filter_match_type: 'all' | 'any' | 'none';
198 filters: any;
199 metadata: any;
200 rendered_description: string;
201 name: string;
202 percent_off: number;
203 price: string | Price;
204 priority: 1 | 2 | 3 | 4 | 5;
205 created_at: number;
206 updated_at: number;
207 }
208 export interface UpsellFunnel {
209 id: string;
210 object: 'upsell_funnel';
211 archived: boolean;
212 enabled: boolean;
213 filter_match_type: 'all' | 'any' | 'none';
214 filter_price_ids: string[];
215 filter_product_ids: string[];
216 metadata: any;
217 name: string;
218 priority: number;
219 upsells: {
220 object: 'list';
221 pagination: Pagination;
222 data: Array<Upsell>;
223 };
224 archived_at: number;
225 discarded_at: number;
226 created_at: number;
227 updated_at: number;
228 }
229 export interface Upsell {
230 id: string;
231 object: 'upsell';
232 amount_off: number;
233 metadata: any;
234 fee_description: string;
235 duplicate_purchase_behavior: 'allow' | 'block' | 'block_within_checkout';
236 percent_off: number;
237 price: string | Price;
238 step: 'initial' | 'accepted' | 'declined';
239 upsell_funnel: string | UpsellFunnel;
240 permalink: string;
241 discarded_at: number;
242 created_at: number;
243 updated_at: number;
244 }
245 export type Prices = {
246 [id: string]: Price;
247 };
248 export interface Media {
249 id: string;
250 object: 'media';
251 byte_size: number;
252 content_type: string;
253 extension: string;
254 filename: string;
255 public_access: boolean;
256 release_json: any;
257 alt: string;
258 title: string;
259 url?: string;
260 url_expires_at?: number;
261 updated_at: number;
262 created_at: number;
263 }
264 export interface Download {
265 id: string;
266 object: 'download';
267 archived: boolean;
268 archived_at?: number;
269 media: string | Media;
270 name?: string;
271 product: string | Product;
272 update_at: number;
273 created_at: number;
274 url?: string;
275 }
276 export type FormState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalizing' | 'paying' | 'confirming' | 'confirmed' | 'paid' | 'failure' | 'expired' | 'redirecting';
277 export type FormStateSetter = 'RESOLVE' | 'REJECT' | 'FINALIZE' | 'PAYING' | 'PAID' | 'EXPIRE' | 'FETCH';
278 export interface License {
279 id: string;
280 object: 'license';
281 activation_limit: number;
282 activation_count: number;
283 key: string;
284 activations?: {
285 object: 'list';
286 pagination: Pagination;
287 data: Array<Activation>;
288 };
289 status: 'inactive' | 'active' | 'revoked';
290 purchase: string | Purchase;
291 created_at: number;
292 created_at_date: string;
293 updated_at: number;
294 updated_at_date: string;
295 }
296 export interface CancellationReason {
297 id: string;
298 object: 'cancellation_reason';
299 archived: boolean;
300 comment_enabled: false;
301 comment_prompt: string | null;
302 coupon_enabled: boolean;
303 label: string;
304 position: number;
305 archived_at: number;
306 discarded_at: number;
307 created_at: number;
308 updated_at: number;
309 }
310 export interface Period {
311 id: string;
312 object: 'period';
313 ad_hoc_amount?: number;
314 checkout: string | Checkout;
315 customer_id: string | Customer;
316 end_at?: number;
317 end_at_date?: string;
318 next_payment_retry_at: number;
319 payment_retry_count: number;
320 price: string | Price;
321 purchase_id: string | Purchase;
322 quantity: number;
323 renewal: boolean;
324 skip_proration: boolean;
325 start_at: number;
326 start_at_date?: string;
327 status: 'draft';
328 subscription: string | Subscription;
329 created_at: number;
330 created_at_date: string;
331 updated_at: number;
332 updated_at_date: string;
333 }
334 export interface Activation {
335 id: string;
336 object: 'activation';
337 name: string;
338 counted: boolean;
339 fingerprint: string;
340 license: string | License;
341 created_at: number;
342 created_at_date: string;
343 updated_at: number;
344 updated_at_date: string;
345 }
346 export interface Variant {
347 id: string;
348 amount: number;
349 available_stock: number;
350 currency: string;
351 current_version: boolean;
352 held_stock: number;
353 stock: number;
354 object: 'variant';
355 image?: string | Media;
356 image_url?: string;
357 option_1?: string | null;
358 option_2?: string | null;
359 option_3?: string | null;
360 position: number;
361 product: string | Product;
362 sku?: string | null;
363 display_amount?: string;
364 has_unlimited_stock?: boolean | null;
365 downloads_enabled?: boolean | null;
366 current_release_download?: string | Download | null;
367 downloads?: {
368 object: 'list';
369 pagination: Pagination;
370 data: Array<Download>;
371 };
372 created_at: number;
373 updated_at: number;
374 }
375 export interface ProductMetrics {
376 currency: string;
377 max_price_amount: number;
378 min_price_amount: number;
379 prices_count: number;
380 }
381 export interface Product extends Object {
382 id: string;
383 name: string;
384 description: string;
385 archived: boolean;
386 archived_at: string;
387 metadata: any;
388 image_url: string;
389 recurring: boolean;
390 tax_category: string;
391 tax_enabled: boolean;
392 purchase_limit: number;
393 metrics: ProductMetrics;
394 line_item_image: ImageAttributes;
395 permalink: string;
396 weight: number;
397 weight_unit: 'kg' | 'lb' | 'g' | 'oz';
398 featured_product_media?: string | ProductMedia;
399 prices: {
400 object: 'list';
401 pagination: Pagination;
402 data: Array<Price>;
403 };
404 variants: {
405 object: 'list';
406 pagination: Pagination;
407 data: Array<Variant>;
408 };
409 variant_options: {
410 object: 'list';
411 pagination: Pagination;
412 data: Array<VariantOption>;
413 };
414 /**
415 * Whether this product is a bundle. Set on create, immutable thereafter.
416 * A bundle product owns BundleItems pointing at component products.
417 */
418 bundle?: boolean;
419 bundle_items?: {
420 object: 'list';
421 pagination: Pagination;
422 data: Array<BundleItem>;
423 };
424 product_medias: {
425 object: 'list';
426 pagination: Pagination;
427 data: Array<ProductMedia>;
428 };
429 downloads: {
430 object: 'list';
431 pagination: Pagination;
432 data: Array<Download>;
433 };
434 product_collections: {
435 object: 'list';
436 pagination: Pagination;
437 data: Array<Collection>;
438 };
439 stock_enabled: boolean;
440 allow_out_of_stock_purchases: boolean;
441 has_unlimited_stock: boolean;
442 stock: number;
443 available_stock: number;
444 held_stock: number;
445 review_url?: string;
446 created_at: number;
447 updated_at: number;
448 }
449 export type Products = {
450 [id: string]: Product;
451 };
452 export interface Collection extends Object {
453 id: string;
454 name: string;
455 description: string;
456 image_url: string;
457 created_at: number;
458 updated_at: number;
459 }
460 export interface Coupon extends Model {
461 id: string;
462 object: 'coupon';
463 amount_off: number;
464 valid?: boolean;
465 expired: boolean;
466 currency: string;
467 duration: string;
468 duration_in_months: number;
469 max_redemptions: number;
470 metadata: Object;
471 name: string;
472 percent_off: number;
473 redeem_by: number;
474 times_redeemed: number;
475 }
476 export interface LineItemData extends Object {
477 id?: string;
478 price_id?: string;
479 variant_id?: string;
480 bump?: string;
481 quantity: number;
482 ad_hoc_amount?: number;
483 variant?: string;
484 bundle_component_variants?: Record<string, string>;
485 }
486 export type LineItemsData = {
487 [id: string]: Array<LineItemData>;
488 };
489 export interface ImageAttributes {
490 src: string;
491 alt?: string;
492 class?: string;
493 decoding?: string;
494 height?: number;
495 loading?: string;
496 sizes?: string;
497 srcset?: string;
498 width?: number;
499 type?: string;
500 }
501 export interface LineItem extends Object {
502 id?: string;
503 ad_hoc_amount?: number;
504 ad_hoc_display_amount?: string;
505 name: string;
506 object: string;
507 quantity: number;
508 currency: string;
509 checkout: string | Checkout;
510 bump: string | Bump;
511 image: ImageAttributes;
512 fees?: {
513 object: 'list';
514 pagination: Pagination;
515 data: Array<Fee>;
516 };
517 bump_amount: number;
518 bump_display_amount: string;
519 discount_amount: number;
520 subtotal_amount: number;
521 subtotal_display_amount?: string;
522 total_amount: number;
523 total_default_currency_display_amount: string;
524 total_display_amount: string;
525 trial_amount: number;
526 tax_amount: number;
527 tax_display_amount: string;
528 fees_amount: number;
529 scratch_amount: number;
530 scratch_display_amount?: string;
531 subtotal_with_upsell_discount_display_amount?: string;
532 subtotal_with_upsell_discount_amount?: number;
533 trial: boolean;
534 total_savings_amount: number;
535 created_at: number;
536 updated_at: number;
537 price?: Price;
538 price_id: string;
539 sku: string;
540 purchasable_status: 'price_gone' | 'price_old_version' | 'variant_mising' | 'variant_gone' | 'variant_old_version' | 'out_of_stock' | 'exceeds_purchase_limit' | 'purchasable';
541 purchasable_status_display: string;
542 variant_options: Array<string>;
543 variant_display_options: string;
544 variant?: Variant;
545 locked: boolean;
546 swap?: Swap;
547 is_swappable?: boolean;
548 note?: string;
549 display_note?: string;
550 component_line_item?: boolean;
551 component_line_items?: {
552 data: LineItem[];
553 };
554 /** Sort order within the bundle, mirroring the bundle item's position. */
555 position?: number;
556 /** Id of the bundle parent line item (set on bundle component line items). */
557 bundle_line_item?: string | null;
558 bundle_component_variants?: Record<string, string>;
559 bundle_allocated_unit_amount?: number;
560 is_bundle_parent?: boolean;
561 is_bundle_component?: boolean;
562 tax_rate?: number;
563 }
564 export interface DeletedItem {
565 cache_status: string;
566 deleted: boolean;
567 id: string;
568 object: string;
569 }
570 export interface Fee {
571 id: string;
572 object: 'fee';
573 amount: number;
574 display_amount: string;
575 description: string;
576 fee_type: 'manual' | 'bump' | 'setup' | 'upsell';
577 line_item: string | LineItem;
578 created_at: number;
579 updated_at: number;
580 }
581 /**
582 * BundleItem — a join between a bundle Product and one of its component Products.
583 *
584 * Variant selection is NOT pinned here; the shopper picks at checkout via
585 * `bundle_component_variants` on the bundle line item. Components are always
586 * Products, never Prices or Variants.
587 */
588 export interface BundleItem {
589 id: string;
590 object: 'bundle_item';
591 /** The parent bundle product (the one with bundle: true). */
592 bundle_product: string | Product;
593 /** The component product included in the bundle. Must not itself be a bundle. */
594 component_product: string | Product;
595 /**
596 * Shortcut association: the component product's variants with live stock,
597 * one level shallower than the (dropped) component_product.variants expand.
598 */
599 component_variants?: {
600 object: 'list';
601 pagination?: Pagination;
602 data: Variant[];
603 };
604 /** Shortcut association: the component product's variant option dimensions. */
605 component_variant_options?: {
606 object: 'list';
607 pagination?: Pagination;
608 data: VariantOption[];
609 };
610 quantity: number;
611 /** Optional weighting input (cents) for tax allocation. Nil → even split by quantity. */
612 basis_amount?: number | null;
613 position: number;
614 /** Whether this is the current version of the bundle item. */
615 current_version?: boolean;
616 metadata?: {
617 [key: string]: string;
618 };
619 created_at: number;
620 updated_at: number;
621 }
622 export interface BundleComponentRow {
623 id: string;
624 name: string;
625 variants: string;
626 qty: number;
627 }
628 export interface InvoiceItem extends LineItem {
629 }
630 export interface PriceChoice {
631 id: string;
632 product_id: string;
633 quantity: number;
634 enabled: boolean;
635 selected?: boolean;
636 variant?: string | null;
637 }
638 export type CheckoutState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalized' | 'paid' | 'failure';
639 export type TaxStatus = 'disabled' | 'address_invalid' | 'reverse_charged' | 'tax_registration_not_found' | 'tax_zone_not_found' | 'estimated' | 'calculated';
640 export interface Invoice extends Object {
641 id: string;
642 object: 'invoice';
643 automatic_collection: boolean;
644 due_date?: number;
645 due_date_date?: string;
646 issue_date?: number;
647 issue_date_date?: string;
648 footer?: string;
649 memo?: string;
650 live_mode: boolean;
651 status: InvoiceStatus;
652 checkout: Checkout | string;
653 metadata: object;
654 order_number: string;
655 created_at: number;
656 created_at_date: string;
657 updated_at: number;
658 updated_at_date: string;
659 }
660 export interface BillingAddress extends Address {
661 }
662 export interface ShippingAddress extends Address {
663 }
664 export interface ProductGroup {
665 id: string;
666 object: 'product_group';
667 archived: boolean;
668 archived_at: number;
669 metadata: object;
670 name: string;
671 created_at: number;
672 updated_at: number;
673 }
674 export interface ProductMedia {
675 id: string;
676 object: 'product_media';
677 position: number;
678 url: null;
679 media: string | Media;
680 product: string | Product;
681 created_at: number;
682 updated_at: number;
683 }
684 export interface Charge extends Object {
685 amount: number;
686 created_at: number;
687 created_at_date: string;
688 currency: string;
689 display_amount: string;
690 customer: string | Customer;
691 external_charge_id: string;
692 fully_refunded: boolean;
693 id: string;
694 invoice: string | Invoice;
695 live_mode: boolean;
696 object: 'charge';
697 checkout: string | Checkout;
698 payment_method: string | PaymentMethod;
699 refunded_amount: number;
700 disputed_amount: number;
701 status: 'pending' | 'succeeded' | 'failed';
702 updated_at: number;
703 updated_at_date: string;
704 }
705 export interface TaxIdentifier {
706 id: string;
707 number: string;
708 number_type: string;
709 object: 'tax_identifier';
710 eu_vat_verified: boolean;
711 created_at: number;
712 updated_at: number;
713 }
714 export interface TaxProtocol {
715 id: string;
716 object: 'tax_protocol';
717 ca_tax_enabled: boolean;
718 eu_micro_exemption_enabled: boolean;
719 eu_tax_enabled: boolean;
720 eu_vat_required: boolean;
721 eu_vat_unverified_behavior: 'error' | 'apply_reverse_charge' | 'skip_reverse_charge';
722 eu_vat_local_reverse_charge: boolean;
723 tax_enabled: boolean;
724 address: string | Address;
725 ca_tax_identifier: string | TaxIdentifier;
726 eu_tax_identifier: string | TaxIdentifier;
727 created_at: number;
728 updated_at: number;
729 }
730 export interface Order extends Object {
731 id?: string;
732 object: 'order';
733 number?: string;
734 order_type?: 'checkout' | 'subscription';
735 statement_url?: string;
736 status?: OrderStatus;
737 shipment_status?: OrderShipmentStatus;
738 checkout?: Checkout | string;
739 invoice?: Invoice | string;
740 created_at: number;
741 created_at_date: string;
742 updated_at: number;
743 updated_at_date: string;
744 }
745 export interface ShippingChoice {
746 amount: number;
747 display_amount: string;
748 checkout: string | Checkout;
749 currency: string;
750 id: string;
751 object: 'shipping_choice';
752 shipping_method: string | ShippingMethod;
753 created_at: number;
754 updated_at: number;
755 }
756 export interface ShippingMethod {
757 name: string;
758 description: string;
759 id: string;
760 object: 'shipping_method';
761 position: number;
762 created_at: number;
763 updated_at: number;
764 }
765 export interface Checkout extends Object {
766 id?: string;
767 status?: 'canceled' | 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'processing';
768 tax_amount: number;
769 tax_display_amount: string;
770 tax_inclusive_amount: number;
771 tax_exclusive_amount: number;
772 tax_status: 'disabled' | 'address_invalid' | 'estimated' | 'calculated';
773 tax_label: string;
774 tax_percent: number;
775 tax_enabled: boolean;
776 email_exists: boolean;
777 show_converted_total: boolean;
778 staged_payment_intents: {
779 object: 'list';
780 pagination: Pagination;
781 data: Array<PaymentIntent>;
782 };
783 abandoned_checkout_enabled: boolean;
784 billing_matches_shipping: boolean;
785 bump_amount: number;
786 bump_display_amount: string;
787 payment_method_required?: boolean;
788 manual_payment: boolean;
789 manual_payment_method?: string | ManualPaymentMethod;
790 reusable_payment_method_required?: boolean;
791 number?: string;
792 amount_due?: number;
793 amount_due_display_amount?: string;
794 /** PHP model accessor: line item count excluding bundle containers. */
795 delivered_items_count?: number;
796 amount_due_default_currency_display_amount?: string;
797 remaining_amount_due?: number;
798 remaining_amount_due_display_amount?: string;
799 trial_amount?: number;
800 trial_display_amount?: string;
801 charge?: string | Charge;
802 name?: string;
803 first_name?: string;
804 last_name?: string;
805 email?: string;
806 phone?: string;
807 live_mode?: boolean;
808 currency?: string;
809 current_currency?: string;
810 discounts_display_amount?: string;
811 discounts_display?: string;
812 tax_exclusive_display_amount?: string;
813 tax_inclusive_display_amount?: string;
814 total_amount?: number;
815 total_display_amount?: string;
816 subtotal_amount?: number;
817 subtotal_display_amount?: string;
818 full_amount?: number;
819 full_display_amount?: string;
820 paid_amount?: number;
821 paid_display_amount?: string;
822 proration_amount?: number;
823 proration_display_amount?: string;
824 total_savings_amount?: number;
825 total_savings_display_amount?: string;
826 total_scratch_display_amount?: string;
827 applied_balance_amount?: number;
828 applied_balance_display_amount?: string;
829 scratch_display_amount?: string;
830 discounts?: number;
831 shipping_address_required?: boolean;
832 shipping_address_accuracy_requirement?: 'full' | 'tax' | 'none';
833 line_items: lineItems;
834 recommended_bumps?: {
835 object: 'list';
836 pagination: Pagination;
837 data: Array<Bump>;
838 };
839 current_upsell: Upsell;
840 recommended_upsells?: {
841 object: 'list';
842 pagination: Pagination;
843 data: Array<Upsell>;
844 };
845 metadata?: any;
846 payment_intent?: PaymentIntent;
847 payment_method?: PaymentMethod;
848 order?: string | Order;
849 customer: string | Customer;
850 subscriptions: {
851 object: 'list';
852 pagination: Pagination;
853 data: Array<Subscription>;
854 };
855 checkout_fees: {
856 object: 'list';
857 pagination: Pagination;
858 data: Array<Fee>;
859 };
860 shipping_fees: {
861 object: 'list';
862 pagination: Pagination;
863 data: Array<Fee>;
864 };
865 purchases: {
866 object: 'list';
867 pagination: Pagination;
868 data: Array<Purchase>;
869 };
870 discount_amount?: number;
871 discount?: DiscountResponse;
872 billing_address?: string | Address;
873 geo_address?: string | Address;
874 latitude?: number;
875 longitude?: number;
876 shipping_amount?: number;
877 shipping_display_amount?: string;
878 shipping_address?: string | Address;
879 shipping_enabled?: boolean;
880 shipping_choices?: {
881 object: 'list';
882 pagination: Pagination;
883 data: Array<ShippingChoice>;
884 };
885 selected_shipping_choice?: string | ShippingChoice;
886 selected_shipping_choice_required: boolean;
887 processor_data?: ProcessorData;
888 tax_identifier?: {
889 number: string;
890 number_type: string;
891 };
892 url: string;
893 created_at?: number;
894 updated_at: number;
895 variant: string;
896 upsells_expire_at?: number;
897 invoice?: string | Invoice;
898 pdf_url?: string;
899 refunded_amount?: number;
900 refunded_display_amount?: string;
901 net_paid_amount?: number;
902 net_paid_display_amount?: string;
903 credited_balance_amount?: number;
904 credited_balance_display_amount?: string;
905 tax_reverse_charged_amount?: number;
906 tax_reverse_charged_display_amount?: string;
907 }
908 export interface ShippingMethod {
909 id: string;
910 object: 'shipping_method';
911 description: string | null;
912 name: string;
913 position: number;
914 created_at: number;
915 updated_at: number;
916 }
917 export interface ShippingChoice {
918 id: string;
919 object: 'shipping_choice';
920 amount: number;
921 currency: string;
922 checkout: string | Checkout;
923 shipping_method: string | ShippingMethod;
924 created_at: number;
925 updated_at: number;
926 }
927 export interface ProcessorData {
928 stripe: {
929 account_id: string;
930 publishable_key: string;
931 client_secret?: string;
932 type: 'payment' | 'setup';
933 };
934 paypal: {
935 account_id: string;
936 client_id: string;
937 merchant_initiated: boolean;
938 };
939 mollie?: {
940 account_id: 'string';
941 checkout_url: 'string';
942 };
943 paystack: {
944 account_id: string;
945 public_key: string;
946 access_code: string;
947 };
948 razorpay?: {
949 account_id: string;
950 key_id: string;
951 order_id: string;
952 public_key: string;
953 access_code: string;
954 customer_id: string;
955 };
956 }
957 export interface RazorpayOptions {
958 key: string;
959 order_id: string;
960 prefill?: {
961 name?: string;
962 email?: string;
963 contact?: string;
964 };
965 customer_id?: string;
966 recurring?: boolean;
967 handler: (response: any) => void;
968 modal?: {
969 ondismiss: () => void;
970 };
971 }
972 export interface RazorpayInstance {
973 open: () => void;
974 on: (event: string, callback: (response: any) => void) => void;
975 }
976 export type RazorpayConstructor = new (options: RazorpayOptions) => RazorpayInstance;
977 export interface ManualPaymentMethod {
978 id: string;
979 object: 'manual_payment_method';
980 archived: boolean;
981 archived_at: number;
982 description: string;
983 instructions: string;
984 name: string;
985 created_at: number;
986 updated_at: number;
987 }
988 export interface PaymentMethodType {
989 id: string;
990 description: string;
991 image: string;
992 }
993 export interface Processor {
994 id: string;
995 live_mode: boolean;
996 processor_data: {
997 account_id: string;
998 recurring_enabled: boolean;
999 client_id: string;
1000 merchant_initiated?: boolean;
1001 };
1002 recurring_enabled: boolean;
1003 supported_currencies: Array<string>;
1004 processor_type: 'paypal' | 'stripe' | 'mollie' | 'mock';
1005 }
1006 export interface Purchase {
1007 id: string;
1008 object: 'purchase';
1009 live_mode: boolean;
1010 quantity: number;
1011 revoked: boolean;
1012 revoked_at: number;
1013 customer: string | Customer;
1014 invoice_item: string | InvoiceItem;
1015 invoice: string | Invoice;
1016 line_item: string | LineItem;
1017 order: string | Order;
1018 product: string | Product;
1019 variant?: string | Variant;
1020 refund: string | Refund;
1021 subscription: string | Subscription;
1022 license: string | License;
1023 created_at: number;
1024 updated_at: number;
1025 }
1026 export interface Refund {
1027 id: string;
1028 object: 'refund';
1029 amount: number;
1030 currency: string;
1031 external_refund_id: string;
1032 live_mode: boolean;
1033 metadata: object;
1034 reason: 'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge';
1035 status: 'pending' | 'succeeded' | 'failed' | 'canceled';
1036 charge: string | Charge;
1037 customer: string | Customer;
1038 revoked_purchases: null | Array<Purchase>;
1039 created_at: number;
1040 updated_at: number;
1041 }
1042 export interface Subscription extends Object {
1043 id: string;
1044 object: 'subscription';
1045 currency?: string;
1046 status: SubscriptionStatus;
1047 live_mode: boolean;
1048 external_subscription_id: string;
1049 current_cancellation_act: string | CancellationAct;
1050 trial_end_at: number;
1051 trial_end_at_date: string;
1052 trial_end_at_date_time: string;
1053 processor_type: 'stripe' | 'paypal';
1054 order: Order;
1055 customer: Customer;
1056 discount: DiscountResponse;
1057 finite: boolean;
1058 pending_update: {
1059 ad_hoc_amount?: number;
1060 price?: string;
1061 quantity?: number;
1062 variant?: string;
1063 };
1064 purchase: Purchase | string;
1065 cancel_at_period_end: number | false;
1066 current_period: string | Period;
1067 current_period_end_at: number | false;
1068 current_period_end_at_date: string;
1069 current_period_end_at_date_time: string;
1070 current_period_start_at: number | false;
1071 current_period_start_at_date: string;
1072 remaining_period_count: number | null;
1073 remaining_period_text: string;
1074 ended_at: number;
1075 ended_at_date: string;
1076 end_behavior: 'cancel' | 'complete';
1077 payment_method: PaymentMethod | string;
1078 manual_payment_method: ManualPaymentMethod | string;
1079 manual_payment: boolean;
1080 price: Price;
1081 ad_hoc_amount: number;
1082 variant?: Variant | string;
1083 variant_options?: Array<string>;
1084 created_at: number;
1085 created_at_date: string;
1086 updated_at: number;
1087 updated_at_date: string;
1088 restore_at?: number;
1089 can_modify?: boolean;
1090 }
1091 export interface CancellationAct {
1092 id: string;
1093 object: 'cancellation_act';
1094 cancellation_reason: string | CancellationReason;
1095 comment: string;
1096 coupon_applied: boolean;
1097 preserved: boolean;
1098 subscription: string | Subscription;
1099 performed_at: number;
1100 created_at: number;
1101 updated_at: number;
1102 }
1103 export interface SubscriptionProtocol {
1104 id: string;
1105 object: 'subscription_protocol';
1106 cancel_behavior: 'pending' | 'immediate';
1107 downgrade_behavior: 'pending' | 'immediate';
1108 payment_retry_window_weeks: number;
1109 upgrade_behavior: 'pending' | 'immediate';
1110 preservation_enabled: boolean;
1111 preservation_locales: {
1112 reasons_title: string;
1113 reasons_description: string;
1114 skip_link: string;
1115 preserve_title: string;
1116 preserve_description: string;
1117 preserve_button: string;
1118 cancel_link: string;
1119 };
1120 preservation_coupon: Coupon | string;
1121 created_at: number;
1122 updated_at: number;
1123 }
1124 export type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'completed';
1125 export type CheckoutStatus = 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'requires_approval';
1126 export type OrderStatus = 'paid' | 'payment_failed' | 'processing' | 'void' | 'canceled' | 'draft';
1127 export type InvoiceStatus = 'paid' | 'open' | 'draft';
1128 export type OrderFulFillmentStatus = 'fulfilled' | 'unfulfilled' | 'partially_fulfilled' | 'scheduled' | 'on_hold';
1129 export type OrderShipmentStatus = 'unshipped' | 'shipped' | 'partially_shipped' | 'delivered' | 'unshippable';
1130 export type FulfillmentStatus = 'unshipped' | 'shipped' | 'delivered' | 'unshippable';
1131 export type ReturnRequestStatus = 'open' | 'completed';
1132 export interface PaymentMethod extends Object {
1133 id: string;
1134 object: 'payment_method';
1135 live_mode: boolean;
1136 external_payment_method_id: string;
1137 processor_type: 'stripe' | 'paypal';
1138 paypal_account: any;
1139 type: string;
1140 bank_account: BankAccount | string;
1141 payment_instrument: PaymentInstrument | string;
1142 payment_method_name: string;
1143 payment_intent: PaymentIntent | string;
1144 billing_agreement?: BillingAgreement | string;
1145 card: any;
1146 customer: Customer | string;
1147 created_at: number;
1148 updated_at: number;
1149 }
1150 export interface BankAccount {
1151 id: string;
1152 account_type: 'checking' | 'savings';
1153 account_holder_type: 'individual' | 'company';
1154 bank_name: string;
1155 last4: string;
1156 created_at: number;
1157 updated_at: number;
1158 }
1159 export interface PaymentInstrument {
1160 id: string;
1161 instrument_type: string;
1162 metadata: any;
1163 object: 'payment_instrument';
1164 created_at: number;
1165 updated_at: number;
1166 }
1167 export interface BillingAgreement {
1168 email: string;
1169 external_customer_id: string;
1170 first_name: string;
1171 id: string;
1172 last_name: string;
1173 phone: string;
1174 object: 'billing_agreement';
1175 created_at: number;
1176 updated_at: number;
1177 }
1178 export interface Pagination {
1179 count: number;
1180 limit: number;
1181 page: number;
1182 url: string;
1183 }
1184 export interface lineItems extends Object {
1185 object: 'list';
1186 pagination: Pagination;
1187 data: Array<LineItem>;
1188 }
1189 export interface Promotion extends Object {
1190 code: string;
1191 created_at: number;
1192 expired: boolean;
1193 id: string;
1194 max_redemptions: number;
1195 metadata: Object;
1196 object: 'promotion';
1197 redeem_by: string;
1198 times_redeemed: number;
1199 }
1200 export interface DiscountResponse {
1201 coupon?: Coupon;
1202 id: string;
1203 object: 'discount';
1204 promotion: Promotion;
1205 redeemable_status: string;
1206 }
1207 export interface ResponseError {
1208 code?: string;
1209 message: string;
1210 data?: {
1211 http_status: string;
1212 status?: number;
1213 type: string;
1214 };
1215 additional_errors?: Array<{
1216 code: string;
1217 message: string;
1218 data: {
1219 attribute: string;
1220 options: Array<string>;
1221 type: string;
1222 };
1223 }>;
1224 }
1225 export type ProcessorName = 'stripe' | 'paypal' | 'paypal-card';
1226 export interface VerificationCode {
1227 id: string;
1228 object: 'verification_code';
1229 code: number;
1230 verified: boolean;
1231 verified_at: number | null;
1232 redirect_url: string | null;
1233 created_at: number;
1234 updated_at: number;
1235 }
1236 export interface PaymentIntent extends Object {
1237 id: string;
1238 object: 'payment_intent';
1239 amount: number;
1240 currency: string;
1241 processor_type: 'stripe' | 'paypal';
1242 status: 'pending' | 'succeeded' | 'canceled';
1243 external_intent_id: string;
1244 live_mode: boolean;
1245 processor_data: ProcessorData;
1246 customer: Customer | string;
1247 created_at: number;
1248 updated_at: number;
1249 payment_method: PaymentMethod | string;
1250 reusable: boolean;
1251 }
1252 export interface PaymentIntents {
1253 stripe?: PaymentIntent;
1254 paypal?: PaymentIntent;
1255 }
1256 export interface SetupIntent extends Object {
1257 id: string;
1258 object: 'setup_intent';
1259 processor_type: 'stripe' | 'paypal';
1260 status: 'pending' | 'succeeded' | 'canceled';
1261 external_intent_id: string;
1262 live_mode: boolean;
1263 processor_data: ProcessorData;
1264 customer: Customer | string;
1265 created_at: number;
1266 updated_at: number;
1267 }
1268 export interface WordPressUser {
1269 id: number;
1270 display_name: string;
1271 first_name: string;
1272 last_name: string;
1273 email: string;
1274 }
1275 export interface Customer extends Object {
1276 id: string;
1277 email: string;
1278 name?: string;
1279 first_name?: string;
1280 last_name?: string;
1281 phone?: string;
1282 billing_address?: string | Address;
1283 billing_address_display?: string | Address;
1284 shipping_address?: string | Address;
1285 shipping_address_display?: string | Address;
1286 billing_matches_shipping: boolean;
1287 live_mode: boolean;
1288 unsubscribed: boolean;
1289 default_payment_method: string | PaymentMethod;
1290 tax_identifier: {
1291 number: string;
1292 number_type: string;
1293 };
1294 created_at: number;
1295 updated_at: number;
1296 }
1297 export interface Address extends Object {
1298 name?: string | null;
1299 line_1?: string | null;
1300 line_2?: string | null;
1301 city?: string | null;
1302 state?: string | null;
1303 postal_code?: string | null;
1304 country?: string | null;
1305 }
1306 export interface GeoCapture {
1307 title?: string;
1308 content?: string;
1309 allowLabel?: string;
1310 declineLabel?: string;
1311 }
1312 export interface GeoCoordinates {
1313 latitude: number;
1314 longitude: number;
1315 }
1316 export interface GoogleMapAddressComponents extends Object {
1317 languageCode: string;
1318 longText: string;
1319 shortText: string;
1320 types: string[];
1321 }
1322 export interface GoogleMapPlace extends Object {
1323 id?: string;
1324 displayName: {
1325 languageCode: string;
1326 text: string;
1327 };
1328 addressComponents: Array<GoogleMapAddressComponents>;
1329 }
1330 export interface AddressSuggestion extends Object {
1331 displayName: string;
1332 fullDisplayName: string;
1333 placeId: string;
1334 addressComponents?: GoogleMapAddressComponents[];
1335 }
1336 export interface Fulfillment {
1337 id: string;
1338 object: 'fulfillment';
1339 number: string;
1340 shipment_status: FulfillmentStatus;
1341 trackings: {
1342 object: 'list';
1343 pagination: Pagination;
1344 data: Array<Tracking>;
1345 };
1346 fulfillment_items: {
1347 object: 'list';
1348 pagination: Pagination;
1349 data: Array<FulfillmentItem>;
1350 };
1351 }
1352 export interface FulfillmentItem {
1353 id: string;
1354 line_item: LineItem;
1355 quantity: number;
1356 fulfillment: string | Fulfillment;
1357 }
1358 export interface Tracking {
1359 courier_name?: string;
1360 number: string;
1361 url: string;
1362 }
1363 export interface PriceData extends Object {
1364 price_id: string;
1365 quantity: number;
1366 removeable: boolean;
1367 }
1368 export type TaxZone = {
1369 label: string;
1370 label_small: string;
1371 };
1372 export type TaxZones = {
1373 [key in 'ca_gst' | 'au_abn' | 'gb_vat' | 'eu_vat' | 'other']: TaxZone;
1374 };
1375 export type RuleName = 'total' | 'coupons' | 'products' | 'prices' | 'shipping_country' | 'billing_country' | 'processors';
1376 export type ArrayOperators = 'all' | 'any' | 'none' | 'exist' | 'not_exist';
1377 export type NumberOperators = '==' | '!=' | '<' | '>' | '<=' | '>=';
1378 export interface RuleGroup {
1379 group_id: string;
1380 rules: Rule[];
1381 }
1382 export interface Rule {
1383 condition: RuleName;
1384 operator: NumberOperators | ArrayOperators;
1385 value: string | string[] | {
1386 value: string;
1387 }[];
1388 }
1389 export interface ProductCollection {
1390 id: string;
1391 object: string;
1392 name: string;
1393 description?: string;
1394 position?: number;
1395 slug: string;
1396 image?: string;
1397 products_count: number;
1398 products?: Product[];
1399 }
1400 export interface GoogleAnalyticsItem {
1401 item_id: string;
1402 item_name: string;
1403 item_variant?: string;
1404 item_category?: string;
1405 item_category2?: string;
1406 item_category3?: string;
1407 item_category4?: string;
1408 item_category5?: string;
1409 price: number;
1410 quantity: number;
1411 coupon?: string;
1412 currency: string;
1413 discount?: number;
1414 }
1415 export interface ProductState {
1416 formId: number;
1417 mode: 'live' | 'test';
1418 product: Product;
1419 prices: Price[];
1420 variants: Variant[];
1421 variant_options: VariantOption[];
1422 quantity: number;
1423 selectedPrice: Price;
1424 total: number;
1425 range_display_amount: string;
1426 busy: boolean;
1427 disabled: boolean;
1428 checkoutUrl: string;
1429 adHocAmount: number;
1430 dialog: string;
1431 line_item: LineItemData;
1432 error: string;
1433 selectedVariant?: Variant;
1434 variantValues: {
1435 option_1?: string;
1436 option_2?: string;
1437 option_3?: string;
1438 };
1439 isProductPage?: boolean;
1440 note?: string;
1441 bundleComponentVariants?: Record<string, string>;
1442 }
1443 export interface FeaturedProductMediaAttributes {
1444 alt: string;
1445 url: string;
1446 title: string;
1447 }
1448 export interface PaymentInfoAddedParams {
1449 checkout_id: string;
1450 processor_type: 'paypal' | 'stripe' | 'mollie' | 'paystack';
1451 currency: string;
1452 total_amount: number;
1453 line_items?: lineItems;
1454 payment_method: {
1455 billing_details: {
1456 name: string;
1457 email: string;
1458 };
1459 };
1460 }
1461 export interface CheckoutInitiatedParams {
1462 transaction_id: string;
1463 value: number;
1464 currency: string;
1465 coupon?: string;
1466 tax?: number;
1467 items: Array<{
1468 item_name: string;
1469 discount: number;
1470 price: number;
1471 quantity: number;
1472 }>;
1473 }
1474 export interface ProductsSearchedParams {
1475 searchString: string;
1476 searchCollections?: string[];
1477 searchResultCount: number;
1478 searchResultIds: string[];
1479 }
1480 export interface ProductsViewedParams {
1481 products: Product[];
1482 pageTitle: string;
1483 collectionId?: string;
1484 }
1485 export type NoticeType = 'default' | 'info' | 'success' | 'warning' | 'error';
1486 interface AdditionalError {
1487 code: string;
1488 message: string;
1489 data: {
1490 attribute: string;
1491 type: string;
1492 options: {
1493 if: string[];
1494 value: string;
1495 };
1496 };
1497 }
1498 export interface ScNoticeStore {
1499 type: NoticeType | 'default';
1500 code: string;
1501 message: string;
1502 data?: {
1503 status: number;
1504 type: string;
1505 http_status: string;
1506 };
1507 additional_errors?: AdditionalError[] | null;
1508 dismissible?: boolean;
1509 }
1510 export interface CustomStripeElementChangeEvent extends StripeElementChangeEvent {
1511 value?: {
1512 type: string;
1513 };
1514 }
1515 export interface CountryLocaleFieldValue {
1516 name: string;
1517 priority?: number;
1518 label: string;
1519 }
1520 export interface CountryLocaleField {
1521 [key: string]: {
1522 name: CountryLocaleFieldValue;
1523 address_1: CountryLocaleFieldValue;
1524 address_2: CountryLocaleFieldValue;
1525 city: CountryLocaleFieldValue;
1526 state: CountryLocaleFieldValue;
1527 postcode: CountryLocaleFieldValue;
1528 };
1529 }
1530 export {};
1531