PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 1.4.0
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v1.4.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
705 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 scratch_amount: number;
228 total_savings_amount: number;
229 created_at: number;
230 updated_at: number;
231 price?: Price;
232 price_id: string;
233 }
234 export interface InvoiceItem extends LineItem {
235 }
236 export interface PriceChoice {
237 id: string;
238 product_id: string;
239 quantity: number;
240 enabled: boolean;
241 selected?: boolean;
242 }
243 export declare type CheckoutState = 'idle' | 'loading' | 'draft' | 'updating' | 'finalized' | 'paid' | 'failure';
244 export declare type TaxStatus = 'disabled' | 'address_invalid' | 'reverse_charged' | 'tax_registration_not_found' | 'tax_zone_not_found' | 'estimated' | 'calculated';
245 export interface Invoice extends Object {
246 id: string;
247 object: 'invoice';
248 currency: string;
249 amount_due: number;
250 invoice_items: {
251 object: 'list';
252 pagination: Pagination;
253 data: Array<InvoiceItem>;
254 };
255 discount_amount: number;
256 live_mode: boolean;
257 metadata: object;
258 number: string;
259 period_end_at: number;
260 period_start_at: number;
261 proration_amount: number;
262 processor_data: {
263 stripe: object;
264 };
265 status: OrderStatus;
266 subtotal_amount: number;
267 tax_amount: number;
268 tax_status: TaxStatus;
269 tax_label: string;
270 total_amount: number;
271 billing_address: string | BillingAddress;
272 charge: string | Charge;
273 customer: string | Customer;
274 discount: string | object;
275 payment_intent: string | PaymentIntent;
276 payment_method: string | PaymentMethod;
277 shipping_address: string | ShippingAddress;
278 subscription: string | Subscription;
279 tax_identifier: string | object;
280 url: string;
281 created_at: number;
282 updated_at: number;
283 }
284 export interface BillingAddress extends Address {
285 }
286 export interface ShippingAddress extends Address {
287 }
288 export interface ProductGroup {
289 id: string;
290 object: 'product_group';
291 archived: boolean;
292 archived_at: number;
293 metadata: object;
294 name: string;
295 created_at: number;
296 updated_at: number;
297 }
298 export interface Charge extends Object {
299 amount: number;
300 created_at: number;
301 currency: string;
302 customer: string | Customer;
303 external_charge_id: string;
304 fully_refunded: boolean;
305 id: string;
306 invoice: string | Invoice;
307 live_mode: boolean;
308 object: 'charge';
309 checkout: string | Checkout;
310 payment_method: string | PaymentMethod;
311 refunded_amount: number;
312 status: 'pending' | 'succeeded' | 'failed';
313 updated_at: number;
314 }
315 export interface TaxIdentifier {
316 id: string;
317 number: string;
318 number_type: string;
319 object: 'tax_identifier';
320 eu_vat_verified: boolean;
321 created_at: number;
322 updated_at: number;
323 }
324 export interface TaxProtocol {
325 id: string;
326 object: 'tax_protocol';
327 ca_tax_enabled: boolean;
328 eu_micro_exemption_enabled: boolean;
329 eu_tax_enabled: boolean;
330 eu_vat_required: boolean;
331 eu_vat_unverified_behavior: 'error' | 'apply_reverse_charge' | 'skip_reverse_charge';
332 eu_vat_local_reverse_charge: boolean;
333 tax_enabled: boolean;
334 address: string | Address;
335 ca_tax_identifier: string | TaxIdentifier;
336 eu_tax_identifier: string | TaxIdentifier;
337 created_at: number;
338 updated_at: number;
339 }
340 export interface Order extends Object {
341 id?: string;
342 object: 'order';
343 number?: string;
344 order_type?: 'checkout' | 'subscription';
345 pdf_url?: string;
346 status?: OrderStatus;
347 checkout?: Checkout | string;
348 created_at: number;
349 updated_at: number;
350 }
351 export interface Checkout extends Object {
352 id?: string;
353 status?: 'finalized' | 'draft' | 'paid' | 'requires_approval';
354 staged_payment_intents: {
355 object: 'list';
356 pagination: Pagination;
357 data: Array<PaymentIntent>;
358 };
359 bump_amount: number;
360 payment_method_required?: boolean;
361 manual_payment: boolean;
362 manual_payment_method?: string | ManualPaymentMethod;
363 reusable_payment_method_required?: boolean;
364 number?: string;
365 amount_due?: number;
366 trial_amount?: number;
367 charge?: string | Charge;
368 name?: string;
369 email?: string;
370 live_mode?: boolean;
371 currency?: string;
372 total_amount?: number;
373 subtotal_amount?: number;
374 full_amount?: number;
375 proration_amount?: number;
376 total_savings_amount?: number;
377 applied_balance_amount?: number;
378 discounts?: number;
379 tax_amount: number;
380 tax_inclusive_amount: number;
381 tax_exclusive_amount: number;
382 tax_status: 'disabled' | 'address_invalid' | 'estimated' | 'calculated';
383 tax_label: string;
384 tax_percent: number;
385 line_items: lineItems;
386 recommended_bumps?: {
387 object: 'list';
388 pagination: Pagination;
389 data: Array<Bump>;
390 };
391 metadata?: any;
392 payment_intent?: PaymentIntent;
393 payment_method?: PaymentMethod;
394 order?: string | Order;
395 customer: string | Customer;
396 subscriptions: {
397 object: 'list';
398 pagination: Pagination;
399 data: Array<Subscription>;
400 };
401 purchases: {
402 object: 'list';
403 pagination: Pagination;
404 data: Array<Purchase>;
405 };
406 discount_amount?: number;
407 discount?: DiscountResponse;
408 billing_address?: string | Address;
409 shipping_address?: string | Address;
410 shipping_enabled?: boolean;
411 processor_data?: ProcessorData;
412 tax_identifier?: {
413 number: string;
414 number_type: string;
415 };
416 url: string;
417 created_at?: number;
418 }
419 export interface ProcessorData {
420 stripe: {
421 account_id: string;
422 publishable_key: string;
423 client_secret?: string;
424 type: 'payment' | 'setup';
425 };
426 paypal: {
427 account_id: string;
428 client_id: string;
429 merchant_initiated: boolean;
430 };
431 }
432 export interface ManualPaymentMethod {
433 id: string;
434 object: 'manual_payment_method';
435 archived: boolean;
436 archived_at: number;
437 description: string;
438 instructions: string;
439 name: string;
440 created_at: number;
441 updated_at: number;
442 }
443 export interface Processor {
444 live_mode: boolean;
445 processor_data: {
446 account_id: string;
447 recurring_enabled: boolean;
448 client_id: string;
449 merchant_initiated?: boolean;
450 };
451 recurring_enabled: boolean;
452 processor_type: 'paypal' | 'stripe';
453 }
454 export interface Purchase {
455 id: string;
456 object: 'purchase';
457 live_mode: boolean;
458 quantity: number;
459 revoked: boolean;
460 revoked_at: number;
461 customer: string | Customer;
462 invoice_item: string | InvoiceItem;
463 invoice: string | Invoice;
464 line_item: string | LineItem;
465 order: string | Order;
466 product: string | Product;
467 refund: string | Refund;
468 subscription: string | Subscription;
469 license: string | License;
470 created_at: number;
471 updated_at: number;
472 }
473 export interface Refund {
474 id: string;
475 object: 'refund';
476 amount: number;
477 currency: string;
478 external_refund_id: string;
479 live_mode: boolean;
480 metadata: object;
481 reason: 'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge';
482 status: 'pending' | 'succeeded' | 'failed' | 'canceled';
483 charge: string | Charge;
484 customer: string | Customer;
485 revoked_purchases: null | Array<Purchase>;
486 created_at: number;
487 updated_at: number;
488 }
489 export interface Subscription extends Object {
490 id: string;
491 object: 'subscription';
492 currency?: string;
493 status: SubscriptionStatus;
494 live_mode: boolean;
495 external_subscription_id: string;
496 trial_end_at: number;
497 processor_type: 'stripe' | 'paypal';
498 order: Order;
499 customer: Customer;
500 discount: DiscountResponse;
501 pending_update: {
502 ad_hoc_amount?: number;
503 price?: string;
504 quantity?: number;
505 };
506 purchase: Purchase | string;
507 cancel_at_period_end: number | false;
508 current_period: string | Period;
509 current_period_end_at: number | false;
510 current_period_start_at: number | false;
511 remaining_period_count: number | null;
512 ended_at: number;
513 end_behavior: 'cancel' | 'complete';
514 payment_method: PaymentMethod | string;
515 price: Price;
516 ad_hoc_amount: number;
517 created_at: number;
518 updated_at: number;
519 }
520 export interface SubscriptionProtocol {
521 id: string;
522 object: 'subscription_protocol';
523 cancel_behavior: 'pending' | 'immediate';
524 downgrade_behavior: 'pending' | 'immediate';
525 payment_retry_window_weeks: number;
526 upgrade_behavior: 'pending' | 'immediate';
527 created_at: number;
528 updated_at: number;
529 }
530 export declare type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'completed';
531 export declare type CheckoutStatus = 'draft' | 'finalized' | 'paid' | 'payment_intent_canceled' | 'payment_failed' | 'requires_approval';
532 export declare type OrderStatus = 'paid' | 'payment_failed' | 'processing' | 'void';
533 export interface PaymentMethod extends Object {
534 id: string;
535 object: 'payment_method';
536 live_mode: boolean;
537 external_payment_method_id: string;
538 processor_type: 'stripe' | 'paypal';
539 paypal_account: any;
540 type: string;
541 bank_account: BankAccount | string;
542 payment_instrument: PaymentInstrument | string;
543 payment_intent: PaymentIntent | string;
544 billing_agreement?: BillingAgreement | string;
545 card: any;
546 customer: Customer | string;
547 created_at: number;
548 updated_at: number;
549 }
550 export interface BankAccount {
551 id: string;
552 account_type: 'checking' | 'savings';
553 account_holder_type: 'individual' | 'company';
554 bank_name: string;
555 last4: string;
556 created_at: number;
557 updated_at: number;
558 }
559 export interface PaymentInstrument {
560 id: string;
561 instrument_type: string;
562 metadata: any;
563 object: 'payment_instrument';
564 created_at: number;
565 updated_at: number;
566 }
567 export interface BillingAgreement {
568 email: string;
569 external_customer_id: string;
570 first_name: string;
571 id: string;
572 last_name: string;
573 object: 'billing_agreement';
574 created_at: number;
575 updated_at: number;
576 }
577 export interface Pagination {
578 count: number;
579 limit: number;
580 page: number;
581 url: string;
582 }
583 export interface lineItems extends Object {
584 object: 'list';
585 pagination: Pagination;
586 data: Array<LineItem>;
587 }
588 export interface Promotion extends Object {
589 code: string;
590 created_at: number;
591 expired: boolean;
592 id: string;
593 max_redemptions: number;
594 metadata: Object;
595 object: 'promotion';
596 redeem_by: string;
597 times_redeemed: number;
598 }
599 export interface DiscountResponse {
600 coupon?: Coupon;
601 id: string;
602 object: 'discount';
603 promotion: Promotion;
604 }
605 export interface ResponseError {
606 code: string;
607 message: string;
608 data: {
609 http_status: string;
610 status?: number;
611 type: string;
612 };
613 additional_errors: Array<{
614 code: string;
615 message: string;
616 data: {
617 attribute: string;
618 options: Array<string>;
619 type: string;
620 };
621 }>;
622 }
623 export declare type ProcessorName = 'stripe' | 'paypal' | 'paypal-card';
624 export interface VerificationCode {
625 id: string;
626 object: 'verification_code';
627 code: number;
628 verified: boolean;
629 verified_at: number | null;
630 created_at: number;
631 updated_at: number;
632 }
633 export interface PaymentIntent extends Object {
634 id: string;
635 object: 'payment_intent';
636 amount: number;
637 currency: string;
638 processor_type: 'stripe' | 'paypal';
639 status: 'pending' | 'succeeded' | 'canceled';
640 external_intent_id: string;
641 live_mode: boolean;
642 processor_data: ProcessorData;
643 customer: Customer | string;
644 created_at: number;
645 updated_at: number;
646 }
647 export interface PaymentIntents {
648 stripe?: PaymentIntent;
649 paypal?: PaymentIntent;
650 }
651 export interface SetupIntent extends Object {
652 id: string;
653 object: 'setup_intent';
654 processor_type: 'stripe' | 'paypal';
655 status: 'pending' | 'succeeded' | 'canceled';
656 external_intent_id: string;
657 live_mode: boolean;
658 processor_data: ProcessorData;
659 customer: Customer | string;
660 created_at: number;
661 updated_at: number;
662 }
663 export interface WordPressUser {
664 id: number;
665 display_name: string;
666 first_name: string;
667 last_name: string;
668 email: string;
669 }
670 export interface Customer extends Object {
671 id: string;
672 email: string;
673 name?: string;
674 first_name?: string;
675 last_name?: string;
676 phone?: string;
677 billing_address?: string | Address;
678 shipping_address?: string | Address;
679 billing_matches_shipping: boolean;
680 live_mode: boolean;
681 unsubscribed: boolean;
682 default_payment_method: string | PaymentMethod;
683 tax_identifier: {
684 number: string;
685 number_type: string;
686 };
687 created_at: number;
688 updated_at: number;
689 }
690 export interface Address extends Object {
691 name?: string;
692 line_1?: string;
693 line_2?: string;
694 city?: string;
695 state?: string;
696 postal_code?: string;
697 country?: string;
698 }
699 export interface PriceData extends Object {
700 price_id: string;
701 quantity: number;
702 removeable: boolean;
703 }
704 export {};
705