PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.5.1
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.5.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 1 week ago functions 1 week ago global 4 years ago services 1 week ago store 1 week ago testing 1 year ago components.d.ts 1 week ago global.d.ts 4 years ago index.d.ts 1 week ago stencil-public-runtime.d.ts 1 year ago types.d.ts 1 week ago
types.d.ts
1457 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 product_medias: {
415 object: 'list';
416 pagination: Pagination;
417 data: Array<ProductMedia>;
418 };
419 downloads: {
420 object: 'list';
421 pagination: Pagination;
422 data: Array<Download>;
423 };
424 product_collections: {
425 object: 'list';
426 pagination: Pagination;
427 data: Array<Collection>;
428 };
429 stock_enabled: boolean;
430 allow_out_of_stock_purchases: boolean;
431 has_unlimited_stock: boolean;
432 stock: number;
433 available_stock: number;
434 held_stock: number;
435 review_url?: string;
436 created_at: number;
437 updated_at: number;
438 }
439 export type Products = {
440 [id: string]: Product;
441 };
442 export interface Collection extends Object {
443 id: string;
444 name: string;
445 description: string;
446 image_url: string;
447 created_at: number;
448 updated_at: number;
449 }
450 export interface Coupon extends Model {
451 id: string;
452 object: 'coupon';
453 amount_off: number;
454 valid?: boolean;
455 expired: boolean;
456 currency: string;
457 duration: string;
458 duration_in_months: number;
459 max_redemptions: number;
460 metadata: Object;
461 name: string;
462 percent_off: number;
463 redeem_by: number;
464 times_redeemed: number;
465 }
466 export interface LineItemData extends Object {
467 id?: string;
468 price_id?: string;
469 variant_id?: string;
470 bump?: string;
471 quantity: number;
472 ad_hoc_amount?: number;
473 variant?: string;
474 }
475 export type LineItemsData = {
476 [id: string]: Array<LineItemData>;
477 };
478 export interface ImageAttributes {
479 src: string;
480 alt?: string;
481 class?: string;
482 decoding?: string;
483 height?: number;
484 loading?: string;
485 sizes?: string;
486 srcset?: string;
487 width?: number;
488 type?: string;
489 }
490 export interface LineItem extends Object {
491 id?: string;
492 ad_hoc_amount?: number;
493 ad_hoc_display_amount?: string;
494 name: string;
495 object: string;
496 quantity: number;
497 currency: string;
498 checkout: string | Checkout;
499 bump: string | Bump;
500 image: ImageAttributes;
501 fees?: {
502 object: 'list';
503 pagination: Pagination;
504 data: Array<Fee>;
505 };
506 bump_amount: number;
507 bump_display_amount: string;
508 discount_amount: number;
509 subtotal_amount: number;
510 subtotal_display_amount?: string;
511 total_amount: number;
512 total_default_currency_display_amount: string;
513 total_display_amount: string;
514 trial_amount: number;
515 tax_amount: number;
516 tax_display_amount: string;
517 fees_amount: number;
518 scratch_amount: number;
519 scratch_display_amount?: string;
520 subtotal_with_upsell_discount_display_amount?: string;
521 subtotal_with_upsell_discount_amount?: number;
522 trial: boolean;
523 total_savings_amount: number;
524 created_at: number;
525 updated_at: number;
526 price?: Price;
527 price_id: string;
528 sku: string;
529 purchasable_status: 'price_gone' | 'price_old_version' | 'variant_mising' | 'variant_gone' | 'variant_old_version' | 'out_of_stock' | 'exceeds_purchase_limit' | 'purchasable';
530 purchasable_status_display: string;
531 variant_options: Array<string>;
532 variant_display_options: string;
533 variant?: Variant;
534 locked: boolean;
535 swap?: Swap;
536 is_swappable?: boolean;
537 note?: string;
538 display_note?: string;
539 }
540 export interface DeletedItem {
541 cache_status: string;
542 deleted: boolean;
543 id: string;
544 object: string;
545 }
546 export interface Fee {
547 id: string;
548 object: 'fee';
549 amount: number;
550 display_amount: string;
551 description: string;
552 fee_type: 'manual' | 'bump' | 'setup' | 'upsell';
553 line_item: string | LineItem;
554 created_at: number;
555 updated_at: number;
556 }
557 export interface InvoiceItem extends LineItem {
558 }
559 export interface PriceChoice {
560 id: string;
561 product_id: string;
562 quantity: number;
563 enabled: boolean;
564 selected?: boolean;
565 variant?: string | null;
566 }
567 export type CheckoutState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalized' | 'paid' | 'failure';
568 export type TaxStatus = 'disabled' | 'address_invalid' | 'reverse_charged' | 'tax_registration_not_found' | 'tax_zone_not_found' | 'estimated' | 'calculated';
569 export interface Invoice extends Object {
570 id: string;
571 object: 'invoice';
572 automatic_collection: boolean;
573 due_date?: number;
574 due_date_date?: string;
575 issue_date?: number;
576 issue_date_date?: string;
577 footer?: string;
578 memo?: string;
579 live_mode: boolean;
580 status: InvoiceStatus;
581 checkout: Checkout | string;
582 metadata: object;
583 order_number: string;
584 created_at: number;
585 created_at_date: string;
586 updated_at: number;
587 updated_at_date: string;
588 }
589 export interface BillingAddress extends Address {
590 }
591 export interface ShippingAddress extends Address {
592 }
593 export interface ProductGroup {
594 id: string;
595 object: 'product_group';
596 archived: boolean;
597 archived_at: number;
598 metadata: object;
599 name: string;
600 created_at: number;
601 updated_at: number;
602 }
603 export interface ProductMedia {
604 id: string;
605 object: 'product_media';
606 position: number;
607 url: null;
608 media: string | Media;
609 product: string | Product;
610 created_at: number;
611 updated_at: number;
612 }
613 export interface Charge extends Object {
614 amount: number;
615 created_at: number;
616 created_at_date: string;
617 currency: string;
618 display_amount: string;
619 customer: string | Customer;
620 external_charge_id: string;
621 fully_refunded: boolean;
622 id: string;
623 invoice: string | Invoice;
624 live_mode: boolean;
625 object: 'charge';
626 checkout: string | Checkout;
627 payment_method: string | PaymentMethod;
628 refunded_amount: number;
629 disputed_amount: number;
630 status: 'pending' | 'succeeded' | 'failed';
631 updated_at: number;
632 updated_at_date: string;
633 }
634 export interface TaxIdentifier {
635 id: string;
636 number: string;
637 number_type: string;
638 object: 'tax_identifier';
639 eu_vat_verified: boolean;
640 created_at: number;
641 updated_at: number;
642 }
643 export interface TaxProtocol {
644 id: string;
645 object: 'tax_protocol';
646 ca_tax_enabled: boolean;
647 eu_micro_exemption_enabled: boolean;
648 eu_tax_enabled: boolean;
649 eu_vat_required: boolean;
650 eu_vat_unverified_behavior: 'error' | 'apply_reverse_charge' | 'skip_reverse_charge';
651 eu_vat_local_reverse_charge: boolean;
652 tax_enabled: boolean;
653 address: string | Address;
654 ca_tax_identifier: string | TaxIdentifier;
655 eu_tax_identifier: string | TaxIdentifier;
656 created_at: number;
657 updated_at: number;
658 }
659 export interface Order extends Object {
660 id?: string;
661 object: 'order';
662 number?: string;
663 order_type?: 'checkout' | 'subscription';
664 statement_url?: string;
665 status?: OrderStatus;
666 shipment_status?: OrderShipmentStatus;
667 checkout?: Checkout | string;
668 invoice?: Invoice | string;
669 created_at: number;
670 created_at_date: string;
671 updated_at: number;
672 updated_at_date: string;
673 }
674 export interface ShippingChoice {
675 amount: number;
676 display_amount: string;
677 checkout: string | Checkout;
678 currency: string;
679 id: string;
680 object: 'shipping_choice';
681 shipping_method: string | ShippingMethod;
682 created_at: number;
683 updated_at: number;
684 }
685 export interface ShippingMethod {
686 name: string;
687 description: string;
688 id: string;
689 object: 'shipping_method';
690 position: number;
691 created_at: number;
692 updated_at: number;
693 }
694 export interface Checkout extends Object {
695 id?: string;
696 status?: 'canceled' | 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'processing';
697 tax_amount: number;
698 tax_display_amount: string;
699 tax_inclusive_amount: number;
700 tax_exclusive_amount: number;
701 tax_status: 'disabled' | 'address_invalid' | 'estimated' | 'calculated';
702 tax_label: string;
703 tax_percent: number;
704 tax_enabled: boolean;
705 email_exists: boolean;
706 show_converted_total: boolean;
707 staged_payment_intents: {
708 object: 'list';
709 pagination: Pagination;
710 data: Array<PaymentIntent>;
711 };
712 abandoned_checkout_enabled: boolean;
713 billing_matches_shipping: boolean;
714 bump_amount: number;
715 bump_display_amount: string;
716 payment_method_required?: boolean;
717 manual_payment: boolean;
718 manual_payment_method?: string | ManualPaymentMethod;
719 reusable_payment_method_required?: boolean;
720 number?: string;
721 amount_due?: number;
722 amount_due_display_amount?: string;
723 amount_due_default_currency_display_amount?: string;
724 remaining_amount_due?: number;
725 remaining_amount_due_display_amount?: string;
726 trial_amount?: number;
727 trial_display_amount?: string;
728 charge?: string | Charge;
729 name?: string;
730 first_name?: string;
731 last_name?: string;
732 email?: string;
733 phone?: string;
734 live_mode?: boolean;
735 currency?: string;
736 current_currency?: string;
737 discounts_display_amount?: string;
738 discounts_display?: string;
739 tax_exclusive_display_amount?: string;
740 tax_inclusive_display_amount?: string;
741 total_amount?: number;
742 total_display_amount?: string;
743 subtotal_amount?: number;
744 subtotal_display_amount?: string;
745 full_amount?: number;
746 full_display_amount?: string;
747 paid_amount?: number;
748 paid_display_amount?: string;
749 proration_amount?: number;
750 proration_display_amount?: string;
751 total_savings_amount?: number;
752 total_savings_display_amount?: string;
753 total_scratch_display_amount?: string;
754 applied_balance_amount?: number;
755 applied_balance_display_amount?: string;
756 scratch_display_amount?: string;
757 discounts?: number;
758 shipping_address_required?: boolean;
759 shipping_address_accuracy_requirement?: 'full' | 'tax' | 'none';
760 line_items: lineItems;
761 recommended_bumps?: {
762 object: 'list';
763 pagination: Pagination;
764 data: Array<Bump>;
765 };
766 current_upsell: Upsell;
767 recommended_upsells?: {
768 object: 'list';
769 pagination: Pagination;
770 data: Array<Upsell>;
771 };
772 metadata?: any;
773 payment_intent?: PaymentIntent;
774 payment_method?: PaymentMethod;
775 order?: string | Order;
776 customer: string | Customer;
777 subscriptions: {
778 object: 'list';
779 pagination: Pagination;
780 data: Array<Subscription>;
781 };
782 checkout_fees: {
783 object: 'list';
784 pagination: Pagination;
785 data: Array<Fee>;
786 };
787 shipping_fees: {
788 object: 'list';
789 pagination: Pagination;
790 data: Array<Fee>;
791 };
792 purchases: {
793 object: 'list';
794 pagination: Pagination;
795 data: Array<Purchase>;
796 };
797 discount_amount?: number;
798 discount?: DiscountResponse;
799 billing_address?: string | Address;
800 geo_address?: string | Address;
801 latitude?: number;
802 longitude?: number;
803 shipping_amount?: number;
804 shipping_display_amount?: string;
805 shipping_address?: string | Address;
806 shipping_enabled?: boolean;
807 shipping_choices?: {
808 object: 'list';
809 pagination: Pagination;
810 data: Array<ShippingChoice>;
811 };
812 selected_shipping_choice?: string | ShippingChoice;
813 selected_shipping_choice_required: boolean;
814 processor_data?: ProcessorData;
815 tax_identifier?: {
816 number: string;
817 number_type: string;
818 };
819 url: string;
820 created_at?: number;
821 updated_at: number;
822 variant: string;
823 upsells_expire_at?: number;
824 invoice?: string | Invoice;
825 pdf_url?: string;
826 refunded_amount?: number;
827 refunded_display_amount?: string;
828 net_paid_amount?: number;
829 net_paid_display_amount?: string;
830 credited_balance_amount?: number;
831 credited_balance_display_amount?: string;
832 tax_reverse_charged_amount?: number;
833 tax_reverse_charged_display_amount?: string;
834 }
835 export interface ShippingMethod {
836 id: string;
837 object: 'shipping_method';
838 description: string | null;
839 name: string;
840 position: number;
841 created_at: number;
842 updated_at: number;
843 }
844 export interface ShippingChoice {
845 id: string;
846 object: 'shipping_choice';
847 amount: number;
848 currency: string;
849 checkout: string | Checkout;
850 shipping_method: string | ShippingMethod;
851 created_at: number;
852 updated_at: number;
853 }
854 export interface ProcessorData {
855 stripe: {
856 account_id: string;
857 publishable_key: string;
858 client_secret?: string;
859 type: 'payment' | 'setup';
860 };
861 paypal: {
862 account_id: string;
863 client_id: string;
864 merchant_initiated: boolean;
865 };
866 mollie?: {
867 account_id: 'string';
868 checkout_url: 'string';
869 };
870 paystack: {
871 account_id: string;
872 public_key: string;
873 access_code: string;
874 };
875 razorpay?: {
876 account_id: string;
877 key_id: string;
878 order_id: string;
879 public_key: string;
880 access_code: string;
881 customer_id: string;
882 };
883 }
884 export interface RazorpayOptions {
885 key: string;
886 order_id: string;
887 prefill?: {
888 name?: string;
889 email?: string;
890 contact?: string;
891 };
892 customer_id?: string;
893 recurring?: boolean;
894 handler: (response: any) => void;
895 modal?: {
896 ondismiss: () => void;
897 };
898 }
899 export interface RazorpayInstance {
900 open: () => void;
901 on: (event: string, callback: (response: any) => void) => void;
902 }
903 export type RazorpayConstructor = new (options: RazorpayOptions) => RazorpayInstance;
904 export interface ManualPaymentMethod {
905 id: string;
906 object: 'manual_payment_method';
907 archived: boolean;
908 archived_at: number;
909 description: string;
910 instructions: string;
911 name: string;
912 created_at: number;
913 updated_at: number;
914 }
915 export interface PaymentMethodType {
916 id: string;
917 description: string;
918 image: string;
919 }
920 export interface Processor {
921 id: string;
922 live_mode: boolean;
923 processor_data: {
924 account_id: string;
925 recurring_enabled: boolean;
926 client_id: string;
927 merchant_initiated?: boolean;
928 };
929 recurring_enabled: boolean;
930 supported_currencies: Array<string>;
931 processor_type: 'paypal' | 'stripe' | 'mollie' | 'mock';
932 }
933 export interface Purchase {
934 id: string;
935 object: 'purchase';
936 live_mode: boolean;
937 quantity: number;
938 revoked: boolean;
939 revoked_at: number;
940 customer: string | Customer;
941 invoice_item: string | InvoiceItem;
942 invoice: string | Invoice;
943 line_item: string | LineItem;
944 order: string | Order;
945 product: string | Product;
946 variant?: string | Variant;
947 refund: string | Refund;
948 subscription: string | Subscription;
949 license: string | License;
950 created_at: number;
951 updated_at: number;
952 }
953 export interface Refund {
954 id: string;
955 object: 'refund';
956 amount: number;
957 currency: string;
958 external_refund_id: string;
959 live_mode: boolean;
960 metadata: object;
961 reason: 'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge';
962 status: 'pending' | 'succeeded' | 'failed' | 'canceled';
963 charge: string | Charge;
964 customer: string | Customer;
965 revoked_purchases: null | Array<Purchase>;
966 created_at: number;
967 updated_at: number;
968 }
969 export interface Subscription extends Object {
970 id: string;
971 object: 'subscription';
972 currency?: string;
973 status: SubscriptionStatus;
974 live_mode: boolean;
975 external_subscription_id: string;
976 current_cancellation_act: string | CancellationAct;
977 trial_end_at: number;
978 trial_end_at_date: string;
979 trial_end_at_date_time: string;
980 processor_type: 'stripe' | 'paypal';
981 order: Order;
982 customer: Customer;
983 discount: DiscountResponse;
984 finite: boolean;
985 pending_update: {
986 ad_hoc_amount?: number;
987 price?: string;
988 quantity?: number;
989 variant?: string;
990 };
991 purchase: Purchase | string;
992 cancel_at_period_end: number | false;
993 current_period: string | Period;
994 current_period_end_at: number | false;
995 current_period_end_at_date: string;
996 current_period_end_at_date_time: string;
997 current_period_start_at: number | false;
998 current_period_start_at_date: string;
999 remaining_period_count: number | null;
1000 remaining_period_text: string;
1001 ended_at: number;
1002 ended_at_date: string;
1003 end_behavior: 'cancel' | 'complete';
1004 payment_method: PaymentMethod | string;
1005 manual_payment_method: ManualPaymentMethod | string;
1006 manual_payment: boolean;
1007 price: Price;
1008 ad_hoc_amount: number;
1009 variant?: Variant | string;
1010 variant_options?: Array<string>;
1011 created_at: number;
1012 created_at_date: string;
1013 updated_at: number;
1014 updated_at_date: string;
1015 restore_at?: number;
1016 can_modify?: boolean;
1017 }
1018 export interface CancellationAct {
1019 id: string;
1020 object: 'cancellation_act';
1021 cancellation_reason: string | CancellationReason;
1022 comment: string;
1023 coupon_applied: boolean;
1024 preserved: boolean;
1025 subscription: string | Subscription;
1026 performed_at: number;
1027 created_at: number;
1028 updated_at: number;
1029 }
1030 export interface SubscriptionProtocol {
1031 id: string;
1032 object: 'subscription_protocol';
1033 cancel_behavior: 'pending' | 'immediate';
1034 downgrade_behavior: 'pending' | 'immediate';
1035 payment_retry_window_weeks: number;
1036 upgrade_behavior: 'pending' | 'immediate';
1037 preservation_enabled: boolean;
1038 preservation_locales: {
1039 reasons_title: string;
1040 reasons_description: string;
1041 skip_link: string;
1042 preserve_title: string;
1043 preserve_description: string;
1044 preserve_button: string;
1045 cancel_link: string;
1046 };
1047 preservation_coupon: Coupon | string;
1048 created_at: number;
1049 updated_at: number;
1050 }
1051 export type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'completed';
1052 export type CheckoutStatus = 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'requires_approval';
1053 export type OrderStatus = 'paid' | 'payment_failed' | 'processing' | 'void' | 'canceled' | 'draft';
1054 export type InvoiceStatus = 'paid' | 'open' | 'draft';
1055 export type OrderFulFillmentStatus = 'fulfilled' | 'unfulfilled' | 'partially_fulfilled' | 'scheduled' | 'on_hold';
1056 export type OrderShipmentStatus = 'unshipped' | 'shipped' | 'partially_shipped' | 'delivered' | 'unshippable';
1057 export type FulfillmentStatus = 'unshipped' | 'shipped' | 'delivered' | 'unshippable';
1058 export type ReturnRequestStatus = 'open' | 'completed';
1059 export interface PaymentMethod extends Object {
1060 id: string;
1061 object: 'payment_method';
1062 live_mode: boolean;
1063 external_payment_method_id: string;
1064 processor_type: 'stripe' | 'paypal';
1065 paypal_account: any;
1066 type: string;
1067 bank_account: BankAccount | string;
1068 payment_instrument: PaymentInstrument | string;
1069 payment_method_name: string;
1070 payment_intent: PaymentIntent | string;
1071 billing_agreement?: BillingAgreement | string;
1072 card: any;
1073 customer: Customer | string;
1074 created_at: number;
1075 updated_at: number;
1076 }
1077 export interface BankAccount {
1078 id: string;
1079 account_type: 'checking' | 'savings';
1080 account_holder_type: 'individual' | 'company';
1081 bank_name: string;
1082 last4: string;
1083 created_at: number;
1084 updated_at: number;
1085 }
1086 export interface PaymentInstrument {
1087 id: string;
1088 instrument_type: string;
1089 metadata: any;
1090 object: 'payment_instrument';
1091 created_at: number;
1092 updated_at: number;
1093 }
1094 export interface BillingAgreement {
1095 email: string;
1096 external_customer_id: string;
1097 first_name: string;
1098 id: string;
1099 last_name: string;
1100 phone: string;
1101 object: 'billing_agreement';
1102 created_at: number;
1103 updated_at: number;
1104 }
1105 export interface Pagination {
1106 count: number;
1107 limit: number;
1108 page: number;
1109 url: string;
1110 }
1111 export interface lineItems extends Object {
1112 object: 'list';
1113 pagination: Pagination;
1114 data: Array<LineItem>;
1115 }
1116 export interface Promotion extends Object {
1117 code: string;
1118 created_at: number;
1119 expired: boolean;
1120 id: string;
1121 max_redemptions: number;
1122 metadata: Object;
1123 object: 'promotion';
1124 redeem_by: string;
1125 times_redeemed: number;
1126 }
1127 export interface DiscountResponse {
1128 coupon?: Coupon;
1129 id: string;
1130 object: 'discount';
1131 promotion: Promotion;
1132 redeemable_status: string;
1133 }
1134 export interface ResponseError {
1135 code?: string;
1136 message: string;
1137 data?: {
1138 http_status: string;
1139 status?: number;
1140 type: string;
1141 };
1142 additional_errors?: Array<{
1143 code: string;
1144 message: string;
1145 data: {
1146 attribute: string;
1147 options: Array<string>;
1148 type: string;
1149 };
1150 }>;
1151 }
1152 export type ProcessorName = 'stripe' | 'paypal' | 'paypal-card';
1153 export interface VerificationCode {
1154 id: string;
1155 object: 'verification_code';
1156 code: number;
1157 verified: boolean;
1158 verified_at: number | null;
1159 redirect_url: string | null;
1160 created_at: number;
1161 updated_at: number;
1162 }
1163 export interface PaymentIntent extends Object {
1164 id: string;
1165 object: 'payment_intent';
1166 amount: number;
1167 currency: string;
1168 processor_type: 'stripe' | 'paypal';
1169 status: 'pending' | 'succeeded' | 'canceled';
1170 external_intent_id: string;
1171 live_mode: boolean;
1172 processor_data: ProcessorData;
1173 customer: Customer | string;
1174 created_at: number;
1175 updated_at: number;
1176 payment_method: PaymentMethod | string;
1177 reusable: boolean;
1178 }
1179 export interface PaymentIntents {
1180 stripe?: PaymentIntent;
1181 paypal?: PaymentIntent;
1182 }
1183 export interface SetupIntent extends Object {
1184 id: string;
1185 object: 'setup_intent';
1186 processor_type: 'stripe' | 'paypal';
1187 status: 'pending' | 'succeeded' | 'canceled';
1188 external_intent_id: string;
1189 live_mode: boolean;
1190 processor_data: ProcessorData;
1191 customer: Customer | string;
1192 created_at: number;
1193 updated_at: number;
1194 }
1195 export interface WordPressUser {
1196 id: number;
1197 display_name: string;
1198 first_name: string;
1199 last_name: string;
1200 email: string;
1201 }
1202 export interface Customer extends Object {
1203 id: string;
1204 email: string;
1205 name?: string;
1206 first_name?: string;
1207 last_name?: string;
1208 phone?: string;
1209 billing_address?: string | Address;
1210 billing_address_display?: string | Address;
1211 shipping_address?: string | Address;
1212 shipping_address_display?: string | Address;
1213 billing_matches_shipping: boolean;
1214 live_mode: boolean;
1215 unsubscribed: boolean;
1216 default_payment_method: string | PaymentMethod;
1217 tax_identifier: {
1218 number: string;
1219 number_type: string;
1220 };
1221 created_at: number;
1222 updated_at: number;
1223 }
1224 export interface Address extends Object {
1225 name?: string | null;
1226 line_1?: string | null;
1227 line_2?: string | null;
1228 city?: string | null;
1229 state?: string | null;
1230 postal_code?: string | null;
1231 country?: string | null;
1232 }
1233 export interface GeoCapture {
1234 title?: string;
1235 content?: string;
1236 allowLabel?: string;
1237 declineLabel?: string;
1238 }
1239 export interface GeoCoordinates {
1240 latitude: number;
1241 longitude: number;
1242 }
1243 export interface GoogleMapAddressComponents extends Object {
1244 languageCode: string;
1245 longText: string;
1246 shortText: string;
1247 types: string[];
1248 }
1249 export interface GoogleMapPlace extends Object {
1250 id?: string;
1251 displayName: {
1252 languageCode: string;
1253 text: string;
1254 };
1255 addressComponents: Array<GoogleMapAddressComponents>;
1256 }
1257 export interface AddressSuggestion extends Object {
1258 displayName: string;
1259 fullDisplayName: string;
1260 placeId: string;
1261 addressComponents?: GoogleMapAddressComponents[];
1262 }
1263 export interface Fulfillment {
1264 id: string;
1265 object: 'fulfillment';
1266 number: string;
1267 shipment_status: FulfillmentStatus;
1268 trackings: {
1269 object: 'list';
1270 pagination: Pagination;
1271 data: Array<Tracking>;
1272 };
1273 fulfillment_items: {
1274 object: 'list';
1275 pagination: Pagination;
1276 data: Array<FulfillmentItem>;
1277 };
1278 }
1279 export interface FulfillmentItem {
1280 id: string;
1281 line_item: LineItem;
1282 quantity: number;
1283 fulfillment: string | Fulfillment;
1284 }
1285 export interface Tracking {
1286 courier_name?: string;
1287 number: string;
1288 url: string;
1289 }
1290 export interface PriceData extends Object {
1291 price_id: string;
1292 quantity: number;
1293 removeable: boolean;
1294 }
1295 export type TaxZone = {
1296 label: string;
1297 label_small: string;
1298 };
1299 export type TaxZones = {
1300 [key in 'ca_gst' | 'au_abn' | 'gb_vat' | 'eu_vat' | 'other']: TaxZone;
1301 };
1302 export type RuleName = 'total' | 'coupons' | 'products' | 'prices' | 'shipping_country' | 'billing_country' | 'processors';
1303 export type ArrayOperators = 'all' | 'any' | 'none' | 'exist' | 'not_exist';
1304 export type NumberOperators = '==' | '!=' | '<' | '>' | '<=' | '>=';
1305 export interface RuleGroup {
1306 group_id: string;
1307 rules: Rule[];
1308 }
1309 export interface Rule {
1310 condition: RuleName;
1311 operator: NumberOperators | ArrayOperators;
1312 value: string | string[] | {
1313 value: string;
1314 }[];
1315 }
1316 export interface ProductCollection {
1317 id: string;
1318 object: string;
1319 name: string;
1320 description?: string;
1321 position?: number;
1322 slug: string;
1323 image?: string;
1324 products_count: number;
1325 products?: Product[];
1326 }
1327 export interface GoogleAnalyticsItem {
1328 item_id: string;
1329 item_name: string;
1330 item_variant?: string;
1331 item_category?: string;
1332 item_category2?: string;
1333 item_category3?: string;
1334 item_category4?: string;
1335 item_category5?: string;
1336 price: number;
1337 quantity: number;
1338 coupon?: string;
1339 currency: string;
1340 discount?: number;
1341 }
1342 export interface ProductState {
1343 formId: number;
1344 mode: 'live' | 'test';
1345 product: Product;
1346 prices: Price[];
1347 variants: Variant[];
1348 variant_options: VariantOption[];
1349 quantity: number;
1350 selectedPrice: Price;
1351 total: number;
1352 range_display_amount: string;
1353 busy: boolean;
1354 disabled: boolean;
1355 checkoutUrl: string;
1356 adHocAmount: number;
1357 dialog: string;
1358 line_item: LineItemData;
1359 error: string;
1360 selectedVariant?: Variant;
1361 variantValues: {
1362 option_1?: string;
1363 option_2?: string;
1364 option_3?: string;
1365 };
1366 isProductPage?: boolean;
1367 note?: string;
1368 }
1369 export interface FeaturedProductMediaAttributes {
1370 alt: string;
1371 url: string;
1372 title: string;
1373 }
1374 export interface PaymentInfoAddedParams {
1375 checkout_id: string;
1376 processor_type: 'paypal' | 'stripe' | 'mollie' | 'paystack';
1377 currency: string;
1378 total_amount: number;
1379 line_items?: lineItems;
1380 payment_method: {
1381 billing_details: {
1382 name: string;
1383 email: string;
1384 };
1385 };
1386 }
1387 export interface CheckoutInitiatedParams {
1388 transaction_id: string;
1389 value: number;
1390 currency: string;
1391 coupon?: string;
1392 tax?: number;
1393 items: Array<{
1394 item_name: string;
1395 discount: number;
1396 price: number;
1397 quantity: number;
1398 }>;
1399 }
1400 export interface ProductsSearchedParams {
1401 searchString: string;
1402 searchCollections?: string[];
1403 searchResultCount: number;
1404 searchResultIds: string[];
1405 }
1406 export interface ProductsViewedParams {
1407 products: Product[];
1408 pageTitle: string;
1409 collectionId?: string;
1410 }
1411 export type NoticeType = 'default' | 'info' | 'success' | 'warning' | 'error';
1412 interface AdditionalError {
1413 code: string;
1414 message: string;
1415 data: {
1416 attribute: string;
1417 type: string;
1418 options: {
1419 if: string[];
1420 value: string;
1421 };
1422 };
1423 }
1424 export interface ScNoticeStore {
1425 type: NoticeType | 'default';
1426 code: string;
1427 message: string;
1428 data?: {
1429 status: number;
1430 type: string;
1431 http_status: string;
1432 };
1433 additional_errors?: AdditionalError[] | null;
1434 dismissible?: boolean;
1435 }
1436 export interface CustomStripeElementChangeEvent extends StripeElementChangeEvent {
1437 value?: {
1438 type: string;
1439 };
1440 }
1441 export interface CountryLocaleFieldValue {
1442 name: string;
1443 priority?: number;
1444 label: string;
1445 }
1446 export interface CountryLocaleField {
1447 [key: string]: {
1448 name: CountryLocaleFieldValue;
1449 address_1: CountryLocaleFieldValue;
1450 address_2: CountryLocaleFieldValue;
1451 city: CountryLocaleFieldValue;
1452 state: CountryLocaleFieldValue;
1453 postcode: CountryLocaleFieldValue;
1454 };
1455 }
1456 export {};
1457