PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 1.2.1
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v1.2.1
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 years ago functions 3 years ago global 3 years ago services 3 years ago store 3 years ago testing 3 years ago components.d.ts 3 years ago global.d.ts 3 years ago index.d.ts 3 years ago stencil-public-runtime.d.ts 3 years ago types.d.ts 3 years ago
types.d.ts
691 lines
1 import { IconLibraryMutator, IconLibraryResolver } from './components/ui/icon/library';
2 declare global {
3 interface Window {
4 grecaptcha: any;
5 wp: {
6 apiFetch: any;
7 blocks: any;
8 i18n: any;
9 };
10 scStore: any;
11 registerSureCartIconPath: (path: string) => void;
12 registerSureCartIconLibrary: (name: string, options: {
13 resolver: IconLibraryResolver;
14 mutator?: IconLibraryMutator;
15 }) => void;
16 scIcons: {
17 path: string;
18 };
19 scData: {
20 root_url: string;
21 page_id: string;
22 do_not_persist_cart: string;
23 nonce: string;
24 base_url: string;
25 nonce_endpoint: string;
26 recaptcha_site_key: string;
27 theme: string;
28 };
29 ceRegisterIconLibrary: any;
30 ResizeObserver: any;
31 }
32 }
33 export declare type RecursivePartial<T> = {
34 [P in keyof T]?: RecursivePartial<T[P]>;
35 };
36 interface Model {
37 created_at: number;
38 updated_at: number;
39 }
40 export interface ChoiceItem extends Object {
41 value: string;
42 label: string;
43 disabled?: boolean;
44 choices?: ChoiceItem[];
45 suffix?: string;
46 icon?: string;
47 }
48 export declare type ChoiceType = 'all' | 'single' | 'multiple';
49 export interface Price {
50 id: string;
51 name: string;
52 description?: string;
53 amount: number;
54 currency: string;
55 recurring: boolean;
56 recurring_interval?: 'week' | 'month' | 'year' | 'never';
57 recurring_interval_count?: number;
58 trial_duration_days?: number;
59 ad_hoc: boolean;
60 ad_hoc_max_amount: number;
61 ad_hoc_min_amount: number;
62 recurring_period_count: number;
63 archived: boolean;
64 product_id?: string;
65 archived_at?: string;
66 created_at: number;
67 updated_at: number;
68 product?: Product | string;
69 metadata: {
70 [key: string]: string;
71 };
72 }
73 export interface Bump {
74 id: string;
75 object: 'bump';
76 amount_off: number;
77 archived: boolean;
78 archived_at: number;
79 auto_apply: boolean;
80 filter_match_type: 'all' | 'any' | 'none';
81 filters: any;
82 metadata: any;
83 name: string;
84 percent_off: number;
85 price: string | Price;
86 priority: 1 | 2 | 3 | 4 | 5;
87 created_at: number;
88 updated_at: number;
89 }
90 export declare type Prices = {
91 [id: string]: Price;
92 };
93 export interface Media {
94 id: string;
95 object: 'media';
96 byte_size: number;
97 content_type: string;
98 extension: string;
99 filename: string;
100 public_access: boolean;
101 release_json: any;
102 url?: string;
103 url_expires_at?: number;
104 updated_at: number;
105 created_at: number;
106 }
107 export interface Download {
108 id: string;
109 object: 'download';
110 archived: boolean;
111 media: string | Media;
112 product: string | Product;
113 update_at: number;
114 created_at: number;
115 }
116 export declare type FormState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalizing' | 'paying' | 'confirming' | 'confirmed' | 'paid' | 'failure' | 'expired';
117 export declare type FormStateSetter = 'RESOLVE' | 'REJECT' | 'FINALIZE' | 'PAYING' | 'PAID' | 'EXPIRE' | 'FETCH';
118 export interface License {
119 id: string;
120 object: 'license';
121 activation_limit: number;
122 key: string;
123 activations?: {
124 object: 'list';
125 pagination: Pagination;
126 data: Array<Activation>;
127 };
128 status: 'inactive' | 'active' | 'revoked';
129 purchase: string | Purchase;
130 created_at: number;
131 updated_at: number;
132 }
133 export interface Period {
134 id: string;
135 object: 'period';
136 ad_hoc_amount?: number;
137 checkout: string | Checkout;
138 customer_id: string | Customer;
139 end_at?: number;
140 next_payment_retry_at: number;
141 payment_retry_count: number;
142 price: string | Price;
143 purchase_id: string | Purchase;
144 quantity: number;
145 renewal: boolean;
146 skip_proration: boolean;
147 start_at: number;
148 status: 'draft';
149 subscription: string | Subscription;
150 created_at: number;
151 updated_at: number;
152 }
153 export interface Activation {
154 id: string;
155 object: 'activation';
156 name: string;
157 counted: boolean;
158 fingerprint: string;
159 license: string | License;
160 created_at: number;
161 updated_at: number;
162 }
163 export interface Product extends Object {
164 id: string;
165 name: string;
166 description: string;
167 archived: boolean;
168 archived_at: string;
169 metadata: any;
170 image_url: string;
171 recurring: boolean;
172 tax_category: string;
173 tax_enabled: boolean;
174 purchase_limit: number;
175 prices: {
176 object: 'list';
177 pagination: Pagination;
178 data: Array<Price>;
179 };
180 downloads: {
181 object: 'list';
182 pagination: Pagination;
183 data: Array<Download>;
184 };
185 created_at: number;
186 updated_at: number;
187 }
188 export declare type Products = {
189 [id: string]: Product;
190 };
191 export interface Coupon extends Model {
192 id: string;
193 object: 'coupon';
194 amount_off: number;
195 valid?: boolean;
196 expired: boolean;
197 currency: string;
198 duration: string;
199 duration_in_months: number;
200 max_redemptions: number;
201 metadata: Object;
202 name: string;
203 percent_off: number;
204 redeem_by: number;
205 times_redeemed: number;
206 }
207 export interface LineItemData extends Object {
208 price_id?: string;
209 bump?: string;
210 quantity: number;
211 ad_hoc_amount?: number;
212 }
213 export declare type LineItemsData = {
214 [id: string]: Array<LineItemData>;
215 };
216 export interface LineItem extends Object {
217 id?: string;
218 ad_hoc_amount?: number;
219 name: string;
220 object: string;
221 quantity: number;
222 bump: string | Bump;
223 bump_amount: number;
224 discount_amount: number;
225 subtotal_amount: number;
226 total_amount: number;
227 created_at: number;
228 updated_at: number;
229 price?: Price;
230 price_id: string;
231 }
232 export interface InvoiceItem extends LineItem {
233 }
234 export interface PriceChoice {
235 id: string;
236 product_id: string;
237 quantity: number;
238 enabled: boolean;
239 selected?: boolean;
240 }
241 export declare type CheckoutState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalized' | 'paid' | 'failure';
242 export declare type TaxStatus = 'disabled' | 'address_invalid' | 'reverse_charged' | 'tax_registration_not_found' | 'tax_zone_not_found' | 'estimated' | 'calculated';
243 export interface Invoice extends Object {
244 id: string;
245 object: 'invoice';
246 currency: string;
247 amount_due: number;
248 invoice_items: {
249 object: 'list';
250 pagination: Pagination;
251 data: Array<InvoiceItem>;
252 };
253 discount_amount: number;
254 live_mode: boolean;
255 metadata: object;
256 number: string;
257 period_end_at: number;
258 period_start_at: number;
259 proration_amount: number;
260 processor_data: {
261 stripe: object;
262 };
263 status: OrderStatus;
264 subtotal_amount: number;
265 tax_amount: number;
266 tax_status: TaxStatus;
267 tax_label: string;
268 total_amount: number;
269 billing_address: string | BillingAddress;
270 charge: string | Charge;
271 customer: string | Customer;
272 discount: string | object;
273 payment_intent: string | PaymentIntent;
274 payment_method: string | PaymentMethod;
275 shipping_address: string | ShippingAddress;
276 subscription: string | Subscription;
277 tax_identifier: string | object;
278 url: string;
279 created_at: number;
280 updated_at: number;
281 }
282 export interface BillingAddress extends Address {
283 }
284 export interface ShippingAddress extends Address {
285 }
286 export interface ProductGroup {
287 id: string;
288 object: 'product_group';
289 archived: boolean;
290 archived_at: number;
291 metadata: object;
292 name: string;
293 created_at: number;
294 updated_at: number;
295 }
296 export interface Charge extends Object {
297 amount: number;
298 created_at: number;
299 currency: string;
300 customer: string | Customer;
301 external_charge_id: string;
302 fully_refunded: boolean;
303 id: string;
304 invoice: string | Invoice;
305 live_mode: boolean;
306 object: 'charge';
307 checkout: string | Checkout;
308 payment_method: string | PaymentMethod;
309 refunded_amount: number;
310 status: 'pending' | 'succeeded' | 'failed';
311 updated_at: number;
312 }
313 export interface TaxIdentifier {
314 id: string;
315 number: string;
316 number_type: string;
317 object: 'tax_identifier';
318 eu_vat_verified: boolean;
319 created_at: number;
320 updated_at: number;
321 }
322 export interface TaxProtocol {
323 id: string;
324 object: 'tax_protocol';
325 ca_tax_enabled: boolean;
326 eu_micro_exemption_enabled: boolean;
327 eu_tax_enabled: boolean;
328 eu_vat_required: boolean;
329 eu_vat_unverified_behavior: 'error' | 'apply_reverse_charge' | 'skip_reverse_charge';
330 eu_vat_local_reverse_charge: boolean;
331 tax_enabled: boolean;
332 address: string | Address;
333 ca_tax_identifier: string | TaxIdentifier;
334 eu_tax_identifier: string | TaxIdentifier;
335 created_at: number;
336 updated_at: number;
337 }
338 export interface Order extends Object {
339 id?: string;
340 object: 'order';
341 number?: string;
342 order_type?: 'checkout' | 'subscription';
343 pdf_url?: string;
344 status?: OrderStatus;
345 checkout?: Checkout | string;
346 created_at: number;
347 updated_at: number;
348 }
349 export interface Checkout extends Object {
350 id?: string;
351 status?: 'finalized' | 'draft' | 'paid' | 'requires_approval';
352 staged_payment_intents: {
353 object: 'list';
354 pagination: Pagination;
355 data: Array<PaymentIntent>;
356 };
357 bump_amount: number;
358 payment_method_required?: boolean;
359 manual_payment: boolean;
360 manual_payment_method?: string | ManualPaymentMethod;
361 reusable_payment_method_required?: boolean;
362 number?: string;
363 amount_due?: number;
364 trial_amount?: number;
365 charge?: string | Charge;
366 name?: string;
367 email?: string;
368 live_mode?: boolean;
369 currency?: string;
370 total_amount?: number;
371 subtotal_amount?: number;
372 full_amount?: number;
373 proration_amount?: number;
374 applied_balance_amount?: number;
375 discounts?: number;
376 tax_amount: number;
377 tax_inclusive_amount: number;
378 tax_exclusive_amount: number;
379 tax_status: 'disabled' | 'address_invalid' | 'estimated' | 'calculated';
380 tax_label: string;
381 tax_percent: number;
382 line_items: lineItems;
383 recommended_bumps?: {
384 object: 'list';
385 pagination: Pagination;
386 data: Array<Bump>;
387 };
388 metadata?: any;
389 payment_intent?: PaymentIntent;
390 payment_method?: PaymentMethod;
391 order?: string | Order;
392 customer: string | Customer;
393 subscriptions: {
394 object: 'list';
395 pagination: Pagination;
396 data: Array<Subscription>;
397 };
398 purchases: {
399 object: 'list';
400 pagination: Pagination;
401 data: Array<Purchase>;
402 };
403 discount_amount?: number;
404 discount?: DiscountResponse;
405 billing_address?: string | Address;
406 shipping_address?: string | Address;
407 shipping_enabled?: boolean;
408 processor_data?: ProcessorData;
409 tax_identifier?: {
410 number: string;
411 number_type: string;
412 };
413 url: string;
414 created_at?: number;
415 }
416 export interface ProcessorData {
417 stripe: {
418 account_id: string;
419 publishable_key: string;
420 client_secret?: string;
421 type: 'payment' | 'setup';
422 };
423 paypal: {
424 account_id: string;
425 client_id: string;
426 merchant_initiated: boolean;
427 };
428 }
429 export interface ManualPaymentMethod {
430 id: string;
431 object: 'manual_payment_method';
432 archived: boolean;
433 archived_at: number;
434 description: string;
435 instructions: string;
436 name: string;
437 created_at: number;
438 updated_at: number;
439 }
440 export interface Processor {
441 live_mode: boolean;
442 processor_data: {
443 account_id: string;
444 recurring_enabled: boolean;
445 client_id: string;
446 merchant_initiated?: boolean;
447 };
448 recurring_enabled: boolean;
449 processor_type: 'paypal' | 'stripe';
450 }
451 export interface Purchase {
452 id: string;
453 object: 'purchase';
454 live_mode: boolean;
455 quantity: number;
456 revoked: boolean;
457 revoked_at: number;
458 customer: string | Customer;
459 invoice_item: string | InvoiceItem;
460 invoice: string | Invoice;
461 line_item: string | LineItem;
462 order: string | Order;
463 product: string | Product;
464 refund: string | Refund;
465 subscription: string | Subscription;
466 license: string | License;
467 created_at: number;
468 updated_at: number;
469 }
470 export interface Refund {
471 id: string;
472 object: 'refund';
473 amount: number;
474 currency: string;
475 external_refund_id: string;
476 live_mode: boolean;
477 metadata: object;
478 reason: 'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge';
479 status: 'pending' | 'succeeded' | 'failed' | 'canceled';
480 charge: string | Charge;
481 customer: string | Customer;
482 revoked_purchases: null | Array<Purchase>;
483 created_at: number;
484 updated_at: number;
485 }
486 export interface Subscription extends Object {
487 id: string;
488 object: 'subscription';
489 currency?: string;
490 status: SubscriptionStatus;
491 live_mode: boolean;
492 external_subscription_id: string;
493 trial_end_at: number;
494 processor_type: 'stripe' | 'paypal';
495 order: Order;
496 customer: Customer;
497 discount: DiscountResponse;
498 pending_update: {
499 ad_hoc_amount?: number;
500 price?: string;
501 quantity?: number;
502 };
503 purchase: Purchase | string;
504 cancel_at_period_end: number | false;
505 current_period: string | Period;
506 current_period_end_at: number | false;
507 current_period_start_at: number | false;
508 remaining_period_count: number | null;
509 ended_at: number;
510 end_behavior: 'cancel' | 'complete';
511 payment_method: PaymentMethod | string;
512 price: Price;
513 ad_hoc_amount: number;
514 created_at: number;
515 updated_at: number;
516 }
517 export interface SubscriptionProtocol {
518 id: string;
519 object: 'subscription_protocol';
520 cancel_behavior: 'pending' | 'immediate';
521 downgrade_behavior: 'pending' | 'immediate';
522 payment_retry_window_weeks: number;
523 upgrade_behavior: 'pending' | 'immediate';
524 created_at: number;
525 updated_at: number;
526 }
527 export declare type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'completed';
528 export declare type CheckoutStatus = 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'requires_approval';
529 export declare type OrderStatus = 'paid' | 'payment_failed' | 'processing' | 'void';
530 export interface PaymentMethod extends Object {
531 id: string;
532 object: 'payment_method';
533 live_mode: boolean;
534 external_payment_method_id: string;
535 processor_type: 'stripe' | 'paypal';
536 paypal_account: any;
537 type: string;
538 bank_account: BankAccount | string;
539 payment_instrument: PaymentInstrument | string;
540 payment_intent: PaymentIntent | string;
541 billing_agreement?: BillingAgreement | string;
542 card: any;
543 customer: Customer | string;
544 created_at: number;
545 updated_at: number;
546 }
547 export interface BankAccount {
548 id: string;
549 account_type: 'checking' | 'savings';
550 account_holder_type: 'individual' | 'company';
551 bank_name: string;
552 last4: string;
553 created_at: number;
554 updated_at: number;
555 }
556 export interface PaymentInstrument {
557 id: string;
558 instrument_type: string;
559 metadata: any;
560 object: 'payment_instrument';
561 created_at: number;
562 updated_at: number;
563 }
564 export interface BillingAgreement {
565 email: string;
566 external_customer_id: string;
567 first_name: string;
568 id: string;
569 last_name: string;
570 object: 'billing_agreement';
571 created_at: number;
572 updated_at: number;
573 }
574 export interface Pagination {
575 count: number;
576 limit: number;
577 page: number;
578 url: string;
579 }
580 export interface lineItems extends Object {
581 object: 'list';
582 pagination: Pagination;
583 data: Array<LineItem>;
584 }
585 export interface Promotion extends Object {
586 code: string;
587 created_at: number;
588 expired: boolean;
589 id: string;
590 max_redemptions: number;
591 metadata: Object;
592 object: 'promotion';
593 redeem_by: string;
594 times_redeemed: number;
595 }
596 export interface DiscountResponse {
597 coupon?: Coupon;
598 id: string;
599 object: 'discount';
600 promotion: Promotion;
601 }
602 export interface ResponseError {
603 code: string;
604 message: string;
605 data: {
606 http_status: string;
607 status?: number;
608 type: string;
609 };
610 additional_errors: Array<{
611 code: string;
612 message: string;
613 data: {
614 attribute: string;
615 options: Array<string>;
616 type: string;
617 };
618 }>;
619 }
620 export declare type ProcessorName = 'stripe' | 'paypal' | 'paypal-card';
621 export interface PaymentIntent extends Object {
622 id: string;
623 object: 'payment_intent';
624 amount: number;
625 currency: string;
626 processor_type: 'stripe' | 'paypal';
627 status: 'pending' | 'succeeded' | 'canceled';
628 external_intent_id: string;
629 live_mode: boolean;
630 processor_data: ProcessorData;
631 customer: Customer | string;
632 created_at: number;
633 updated_at: number;
634 }
635 export interface PaymentIntents {
636 stripe?: PaymentIntent;
637 paypal?: PaymentIntent;
638 }
639 export interface SetupIntent extends Object {
640 id: string;
641 object: 'setup_intent';
642 processor_type: 'stripe' | 'paypal';
643 status: 'pending' | 'succeeded' | 'canceled';
644 external_intent_id: string;
645 live_mode: boolean;
646 processor_data: ProcessorData;
647 customer: Customer | string;
648 created_at: number;
649 updated_at: number;
650 }
651 export interface WordPressUser {
652 id: number;
653 display_name: string;
654 first_name: string;
655 last_name: string;
656 email: string;
657 }
658 export interface Customer extends Object {
659 id: string;
660 email: string;
661 name?: string;
662 phone?: string;
663 billing_address?: string | Address;
664 shipping_address?: string | Address;
665 billing_matches_shipping: boolean;
666 live_mode: boolean;
667 unsubscribed: boolean;
668 default_payment_method: string | PaymentMethod;
669 tax_identifier: {
670 number: string;
671 number_type: string;
672 };
673 created_at: number;
674 updated_at: number;
675 }
676 export interface Address extends Object {
677 name?: string;
678 line_1?: string;
679 line_2?: string;
680 city?: string;
681 state?: string;
682 postal_code?: string;
683 country?: string;
684 }
685 export interface PriceData extends Object {
686 price_id: string;
687 quantity: number;
688 removeable: boolean;
689 }
690 export {};
691