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