@moonbase.sh/storefront-api 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/index.cjs +108 -6
- package/dist/index.d.cts +1042 -5
- package/dist/index.d.ts +1042 -5
- package/dist/index.js +105 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1773,12 +1773,21 @@ interface UrchinTrackingModule {
|
|
|
1773
1773
|
msclkid?: string;
|
|
1774
1774
|
/** TikTok Ads click ID, added to the landing page URL of a TikTok ad. */
|
|
1775
1775
|
ttclid?: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* The platforms whose click IDs were on the link. A click ID identifies the
|
|
1778
|
+
* visitor's click, so the storefront only passes one on once the visitor has
|
|
1779
|
+
* agreed to marketing cookies (`attributionConsent`). Until then it sends
|
|
1780
|
+
* these instead, which still tell Moonbase the visit came from an ad.
|
|
1781
|
+
*/
|
|
1782
|
+
adClicks?: AdPlatform[];
|
|
1776
1783
|
}
|
|
1784
|
+
/** An ad platform whose click IDs Moonbase recognises on a link. */
|
|
1785
|
+
type AdPlatform = 'google' | 'microsoft' | 'meta' | 'tiktok';
|
|
1777
1786
|
/**
|
|
1778
|
-
* The query parameters for `utm`: the tags and referrer as `utm_*`,
|
|
1787
|
+
* The query parameters for `utm`: the tags and referrer as `utm_*`, the ad
|
|
1779
1788
|
* click IDs under their own names (`gclid`, `gbraid`, `wbraid`, `fbclid`,
|
|
1780
|
-
* `msclkid`, `ttclid`), as they appear on the landing page URL
|
|
1781
|
-
* are not sent.
|
|
1789
|
+
* `msclkid`, `ttclid`), as they appear on the landing page URL, and the
|
|
1790
|
+
* platforms they came from as `utm_ad_click`. Fields left out are not sent.
|
|
1782
1791
|
*/
|
|
1783
1792
|
declare function utmToObject(utm?: UrchinTrackingModule): Record<string, string>;
|
|
1784
1793
|
|
|
@@ -3441,6 +3450,706 @@ declare const milestoneProgressSchema: z.ZodObject<{
|
|
|
3441
3450
|
})[]>;
|
|
3442
3451
|
description?: string | null | undefined;
|
|
3443
3452
|
}>;
|
|
3453
|
+
declare const pricingOptionSchema: z.ZodObject<{
|
|
3454
|
+
id: z.ZodString;
|
|
3455
|
+
name: z.ZodString;
|
|
3456
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
3457
|
+
}, "strip", z.ZodTypeAny, {
|
|
3458
|
+
id: string;
|
|
3459
|
+
name: string;
|
|
3460
|
+
cycleLength: CycleLength;
|
|
3461
|
+
}, {
|
|
3462
|
+
id: string;
|
|
3463
|
+
name: string;
|
|
3464
|
+
cycleLength: CycleLength;
|
|
3465
|
+
}>;
|
|
3466
|
+
declare const pendingPlanChangeSchema: z.ZodObject<{
|
|
3467
|
+
option: z.ZodObject<{
|
|
3468
|
+
id: z.ZodString;
|
|
3469
|
+
name: z.ZodString;
|
|
3470
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
3471
|
+
}, "strip", z.ZodTypeAny, {
|
|
3472
|
+
id: string;
|
|
3473
|
+
name: string;
|
|
3474
|
+
cycleLength: CycleLength;
|
|
3475
|
+
}, {
|
|
3476
|
+
id: string;
|
|
3477
|
+
name: string;
|
|
3478
|
+
cycleLength: CycleLength;
|
|
3479
|
+
}>;
|
|
3480
|
+
takesEffectAt: z.ZodDate;
|
|
3481
|
+
nextTotal: z.ZodObject<{
|
|
3482
|
+
original: z.ZodObject<{
|
|
3483
|
+
currency: z.ZodString;
|
|
3484
|
+
amount: z.ZodNumber;
|
|
3485
|
+
}, "strip", z.ZodTypeAny, {
|
|
3486
|
+
currency: string;
|
|
3487
|
+
amount: number;
|
|
3488
|
+
}, {
|
|
3489
|
+
currency: string;
|
|
3490
|
+
amount: number;
|
|
3491
|
+
}>;
|
|
3492
|
+
discount: z.ZodObject<{
|
|
3493
|
+
currency: z.ZodString;
|
|
3494
|
+
amount: z.ZodNumber;
|
|
3495
|
+
}, "strip", z.ZodTypeAny, {
|
|
3496
|
+
currency: string;
|
|
3497
|
+
amount: number;
|
|
3498
|
+
}, {
|
|
3499
|
+
currency: string;
|
|
3500
|
+
amount: number;
|
|
3501
|
+
}>;
|
|
3502
|
+
subtotal: z.ZodObject<{
|
|
3503
|
+
currency: z.ZodString;
|
|
3504
|
+
amount: z.ZodNumber;
|
|
3505
|
+
}, "strip", z.ZodTypeAny, {
|
|
3506
|
+
currency: string;
|
|
3507
|
+
amount: number;
|
|
3508
|
+
}, {
|
|
3509
|
+
currency: string;
|
|
3510
|
+
amount: number;
|
|
3511
|
+
}>;
|
|
3512
|
+
taxes: z.ZodObject<{
|
|
3513
|
+
currency: z.ZodString;
|
|
3514
|
+
amount: z.ZodNumber;
|
|
3515
|
+
}, "strip", z.ZodTypeAny, {
|
|
3516
|
+
currency: string;
|
|
3517
|
+
amount: number;
|
|
3518
|
+
}, {
|
|
3519
|
+
currency: string;
|
|
3520
|
+
amount: number;
|
|
3521
|
+
}>;
|
|
3522
|
+
due: z.ZodObject<{
|
|
3523
|
+
currency: z.ZodString;
|
|
3524
|
+
amount: z.ZodNumber;
|
|
3525
|
+
}, "strip", z.ZodTypeAny, {
|
|
3526
|
+
currency: string;
|
|
3527
|
+
amount: number;
|
|
3528
|
+
}, {
|
|
3529
|
+
currency: string;
|
|
3530
|
+
amount: number;
|
|
3531
|
+
}>;
|
|
3532
|
+
cartOfferDiscount: z.ZodOptional<z.ZodObject<{
|
|
3533
|
+
currency: z.ZodString;
|
|
3534
|
+
amount: z.ZodNumber;
|
|
3535
|
+
}, "strip", z.ZodTypeAny, {
|
|
3536
|
+
currency: string;
|
|
3537
|
+
amount: number;
|
|
3538
|
+
}, {
|
|
3539
|
+
currency: string;
|
|
3540
|
+
amount: number;
|
|
3541
|
+
}>>;
|
|
3542
|
+
}, "strip", z.ZodTypeAny, {
|
|
3543
|
+
discount: {
|
|
3544
|
+
currency: string;
|
|
3545
|
+
amount: number;
|
|
3546
|
+
};
|
|
3547
|
+
original: {
|
|
3548
|
+
currency: string;
|
|
3549
|
+
amount: number;
|
|
3550
|
+
};
|
|
3551
|
+
subtotal: {
|
|
3552
|
+
currency: string;
|
|
3553
|
+
amount: number;
|
|
3554
|
+
};
|
|
3555
|
+
taxes: {
|
|
3556
|
+
currency: string;
|
|
3557
|
+
amount: number;
|
|
3558
|
+
};
|
|
3559
|
+
due: {
|
|
3560
|
+
currency: string;
|
|
3561
|
+
amount: number;
|
|
3562
|
+
};
|
|
3563
|
+
cartOfferDiscount?: {
|
|
3564
|
+
currency: string;
|
|
3565
|
+
amount: number;
|
|
3566
|
+
} | undefined;
|
|
3567
|
+
}, {
|
|
3568
|
+
discount: {
|
|
3569
|
+
currency: string;
|
|
3570
|
+
amount: number;
|
|
3571
|
+
};
|
|
3572
|
+
original: {
|
|
3573
|
+
currency: string;
|
|
3574
|
+
amount: number;
|
|
3575
|
+
};
|
|
3576
|
+
subtotal: {
|
|
3577
|
+
currency: string;
|
|
3578
|
+
amount: number;
|
|
3579
|
+
};
|
|
3580
|
+
taxes: {
|
|
3581
|
+
currency: string;
|
|
3582
|
+
amount: number;
|
|
3583
|
+
};
|
|
3584
|
+
due: {
|
|
3585
|
+
currency: string;
|
|
3586
|
+
amount: number;
|
|
3587
|
+
};
|
|
3588
|
+
cartOfferDiscount?: {
|
|
3589
|
+
currency: string;
|
|
3590
|
+
amount: number;
|
|
3591
|
+
} | undefined;
|
|
3592
|
+
}>;
|
|
3593
|
+
keepsDiscount: z.ZodBoolean;
|
|
3594
|
+
scheduledAt: z.ZodDate;
|
|
3595
|
+
}, "strip", z.ZodTypeAny, {
|
|
3596
|
+
option: {
|
|
3597
|
+
id: string;
|
|
3598
|
+
name: string;
|
|
3599
|
+
cycleLength: CycleLength;
|
|
3600
|
+
};
|
|
3601
|
+
takesEffectAt: Date;
|
|
3602
|
+
nextTotal: {
|
|
3603
|
+
discount: {
|
|
3604
|
+
currency: string;
|
|
3605
|
+
amount: number;
|
|
3606
|
+
};
|
|
3607
|
+
original: {
|
|
3608
|
+
currency: string;
|
|
3609
|
+
amount: number;
|
|
3610
|
+
};
|
|
3611
|
+
subtotal: {
|
|
3612
|
+
currency: string;
|
|
3613
|
+
amount: number;
|
|
3614
|
+
};
|
|
3615
|
+
taxes: {
|
|
3616
|
+
currency: string;
|
|
3617
|
+
amount: number;
|
|
3618
|
+
};
|
|
3619
|
+
due: {
|
|
3620
|
+
currency: string;
|
|
3621
|
+
amount: number;
|
|
3622
|
+
};
|
|
3623
|
+
cartOfferDiscount?: {
|
|
3624
|
+
currency: string;
|
|
3625
|
+
amount: number;
|
|
3626
|
+
} | undefined;
|
|
3627
|
+
};
|
|
3628
|
+
keepsDiscount: boolean;
|
|
3629
|
+
scheduledAt: Date;
|
|
3630
|
+
}, {
|
|
3631
|
+
option: {
|
|
3632
|
+
id: string;
|
|
3633
|
+
name: string;
|
|
3634
|
+
cycleLength: CycleLength;
|
|
3635
|
+
};
|
|
3636
|
+
takesEffectAt: Date;
|
|
3637
|
+
nextTotal: {
|
|
3638
|
+
discount: {
|
|
3639
|
+
currency: string;
|
|
3640
|
+
amount: number;
|
|
3641
|
+
};
|
|
3642
|
+
original: {
|
|
3643
|
+
currency: string;
|
|
3644
|
+
amount: number;
|
|
3645
|
+
};
|
|
3646
|
+
subtotal: {
|
|
3647
|
+
currency: string;
|
|
3648
|
+
amount: number;
|
|
3649
|
+
};
|
|
3650
|
+
taxes: {
|
|
3651
|
+
currency: string;
|
|
3652
|
+
amount: number;
|
|
3653
|
+
};
|
|
3654
|
+
due: {
|
|
3655
|
+
currency: string;
|
|
3656
|
+
amount: number;
|
|
3657
|
+
};
|
|
3658
|
+
cartOfferDiscount?: {
|
|
3659
|
+
currency: string;
|
|
3660
|
+
amount: number;
|
|
3661
|
+
} | undefined;
|
|
3662
|
+
};
|
|
3663
|
+
keepsDiscount: boolean;
|
|
3664
|
+
scheduledAt: Date;
|
|
3665
|
+
}>;
|
|
3666
|
+
declare const subscriptionPlanOptionSchema: z.ZodObject<{
|
|
3667
|
+
option: z.ZodObject<{
|
|
3668
|
+
id: z.ZodString;
|
|
3669
|
+
name: z.ZodString;
|
|
3670
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
3671
|
+
}, "strip", z.ZodTypeAny, {
|
|
3672
|
+
id: string;
|
|
3673
|
+
name: string;
|
|
3674
|
+
cycleLength: CycleLength;
|
|
3675
|
+
}, {
|
|
3676
|
+
id: string;
|
|
3677
|
+
name: string;
|
|
3678
|
+
cycleLength: CycleLength;
|
|
3679
|
+
}>;
|
|
3680
|
+
nextTotal: z.ZodObject<{
|
|
3681
|
+
original: z.ZodObject<{
|
|
3682
|
+
currency: z.ZodString;
|
|
3683
|
+
amount: z.ZodNumber;
|
|
3684
|
+
}, "strip", z.ZodTypeAny, {
|
|
3685
|
+
currency: string;
|
|
3686
|
+
amount: number;
|
|
3687
|
+
}, {
|
|
3688
|
+
currency: string;
|
|
3689
|
+
amount: number;
|
|
3690
|
+
}>;
|
|
3691
|
+
discount: z.ZodObject<{
|
|
3692
|
+
currency: z.ZodString;
|
|
3693
|
+
amount: z.ZodNumber;
|
|
3694
|
+
}, "strip", z.ZodTypeAny, {
|
|
3695
|
+
currency: string;
|
|
3696
|
+
amount: number;
|
|
3697
|
+
}, {
|
|
3698
|
+
currency: string;
|
|
3699
|
+
amount: number;
|
|
3700
|
+
}>;
|
|
3701
|
+
subtotal: z.ZodObject<{
|
|
3702
|
+
currency: z.ZodString;
|
|
3703
|
+
amount: z.ZodNumber;
|
|
3704
|
+
}, "strip", z.ZodTypeAny, {
|
|
3705
|
+
currency: string;
|
|
3706
|
+
amount: number;
|
|
3707
|
+
}, {
|
|
3708
|
+
currency: string;
|
|
3709
|
+
amount: number;
|
|
3710
|
+
}>;
|
|
3711
|
+
taxes: z.ZodObject<{
|
|
3712
|
+
currency: z.ZodString;
|
|
3713
|
+
amount: z.ZodNumber;
|
|
3714
|
+
}, "strip", z.ZodTypeAny, {
|
|
3715
|
+
currency: string;
|
|
3716
|
+
amount: number;
|
|
3717
|
+
}, {
|
|
3718
|
+
currency: string;
|
|
3719
|
+
amount: number;
|
|
3720
|
+
}>;
|
|
3721
|
+
due: z.ZodObject<{
|
|
3722
|
+
currency: z.ZodString;
|
|
3723
|
+
amount: z.ZodNumber;
|
|
3724
|
+
}, "strip", z.ZodTypeAny, {
|
|
3725
|
+
currency: string;
|
|
3726
|
+
amount: number;
|
|
3727
|
+
}, {
|
|
3728
|
+
currency: string;
|
|
3729
|
+
amount: number;
|
|
3730
|
+
}>;
|
|
3731
|
+
cartOfferDiscount: z.ZodOptional<z.ZodObject<{
|
|
3732
|
+
currency: z.ZodString;
|
|
3733
|
+
amount: z.ZodNumber;
|
|
3734
|
+
}, "strip", z.ZodTypeAny, {
|
|
3735
|
+
currency: string;
|
|
3736
|
+
amount: number;
|
|
3737
|
+
}, {
|
|
3738
|
+
currency: string;
|
|
3739
|
+
amount: number;
|
|
3740
|
+
}>>;
|
|
3741
|
+
}, "strip", z.ZodTypeAny, {
|
|
3742
|
+
discount: {
|
|
3743
|
+
currency: string;
|
|
3744
|
+
amount: number;
|
|
3745
|
+
};
|
|
3746
|
+
original: {
|
|
3747
|
+
currency: string;
|
|
3748
|
+
amount: number;
|
|
3749
|
+
};
|
|
3750
|
+
subtotal: {
|
|
3751
|
+
currency: string;
|
|
3752
|
+
amount: number;
|
|
3753
|
+
};
|
|
3754
|
+
taxes: {
|
|
3755
|
+
currency: string;
|
|
3756
|
+
amount: number;
|
|
3757
|
+
};
|
|
3758
|
+
due: {
|
|
3759
|
+
currency: string;
|
|
3760
|
+
amount: number;
|
|
3761
|
+
};
|
|
3762
|
+
cartOfferDiscount?: {
|
|
3763
|
+
currency: string;
|
|
3764
|
+
amount: number;
|
|
3765
|
+
} | undefined;
|
|
3766
|
+
}, {
|
|
3767
|
+
discount: {
|
|
3768
|
+
currency: string;
|
|
3769
|
+
amount: number;
|
|
3770
|
+
};
|
|
3771
|
+
original: {
|
|
3772
|
+
currency: string;
|
|
3773
|
+
amount: number;
|
|
3774
|
+
};
|
|
3775
|
+
subtotal: {
|
|
3776
|
+
currency: string;
|
|
3777
|
+
amount: number;
|
|
3778
|
+
};
|
|
3779
|
+
taxes: {
|
|
3780
|
+
currency: string;
|
|
3781
|
+
amount: number;
|
|
3782
|
+
};
|
|
3783
|
+
due: {
|
|
3784
|
+
currency: string;
|
|
3785
|
+
amount: number;
|
|
3786
|
+
};
|
|
3787
|
+
cartOfferDiscount?: {
|
|
3788
|
+
currency: string;
|
|
3789
|
+
amount: number;
|
|
3790
|
+
} | undefined;
|
|
3791
|
+
}>;
|
|
3792
|
+
takesEffectAt: z.ZodDate;
|
|
3793
|
+
keepsDiscount: z.ZodBoolean;
|
|
3794
|
+
current: z.ZodBoolean;
|
|
3795
|
+
scheduled: z.ZodBoolean;
|
|
3796
|
+
}, "strip", z.ZodTypeAny, {
|
|
3797
|
+
option: {
|
|
3798
|
+
id: string;
|
|
3799
|
+
name: string;
|
|
3800
|
+
cycleLength: CycleLength;
|
|
3801
|
+
};
|
|
3802
|
+
takesEffectAt: Date;
|
|
3803
|
+
nextTotal: {
|
|
3804
|
+
discount: {
|
|
3805
|
+
currency: string;
|
|
3806
|
+
amount: number;
|
|
3807
|
+
};
|
|
3808
|
+
original: {
|
|
3809
|
+
currency: string;
|
|
3810
|
+
amount: number;
|
|
3811
|
+
};
|
|
3812
|
+
subtotal: {
|
|
3813
|
+
currency: string;
|
|
3814
|
+
amount: number;
|
|
3815
|
+
};
|
|
3816
|
+
taxes: {
|
|
3817
|
+
currency: string;
|
|
3818
|
+
amount: number;
|
|
3819
|
+
};
|
|
3820
|
+
due: {
|
|
3821
|
+
currency: string;
|
|
3822
|
+
amount: number;
|
|
3823
|
+
};
|
|
3824
|
+
cartOfferDiscount?: {
|
|
3825
|
+
currency: string;
|
|
3826
|
+
amount: number;
|
|
3827
|
+
} | undefined;
|
|
3828
|
+
};
|
|
3829
|
+
keepsDiscount: boolean;
|
|
3830
|
+
current: boolean;
|
|
3831
|
+
scheduled: boolean;
|
|
3832
|
+
}, {
|
|
3833
|
+
option: {
|
|
3834
|
+
id: string;
|
|
3835
|
+
name: string;
|
|
3836
|
+
cycleLength: CycleLength;
|
|
3837
|
+
};
|
|
3838
|
+
takesEffectAt: Date;
|
|
3839
|
+
nextTotal: {
|
|
3840
|
+
discount: {
|
|
3841
|
+
currency: string;
|
|
3842
|
+
amount: number;
|
|
3843
|
+
};
|
|
3844
|
+
original: {
|
|
3845
|
+
currency: string;
|
|
3846
|
+
amount: number;
|
|
3847
|
+
};
|
|
3848
|
+
subtotal: {
|
|
3849
|
+
currency: string;
|
|
3850
|
+
amount: number;
|
|
3851
|
+
};
|
|
3852
|
+
taxes: {
|
|
3853
|
+
currency: string;
|
|
3854
|
+
amount: number;
|
|
3855
|
+
};
|
|
3856
|
+
due: {
|
|
3857
|
+
currency: string;
|
|
3858
|
+
amount: number;
|
|
3859
|
+
};
|
|
3860
|
+
cartOfferDiscount?: {
|
|
3861
|
+
currency: string;
|
|
3862
|
+
amount: number;
|
|
3863
|
+
} | undefined;
|
|
3864
|
+
};
|
|
3865
|
+
keepsDiscount: boolean;
|
|
3866
|
+
current: boolean;
|
|
3867
|
+
scheduled: boolean;
|
|
3868
|
+
}>;
|
|
3869
|
+
declare const subscriptionPlanOptionsSchema: z.ZodObject<{
|
|
3870
|
+
unavailable: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3871
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
3872
|
+
option: z.ZodObject<{
|
|
3873
|
+
id: z.ZodString;
|
|
3874
|
+
name: z.ZodString;
|
|
3875
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
3876
|
+
}, "strip", z.ZodTypeAny, {
|
|
3877
|
+
id: string;
|
|
3878
|
+
name: string;
|
|
3879
|
+
cycleLength: CycleLength;
|
|
3880
|
+
}, {
|
|
3881
|
+
id: string;
|
|
3882
|
+
name: string;
|
|
3883
|
+
cycleLength: CycleLength;
|
|
3884
|
+
}>;
|
|
3885
|
+
nextTotal: z.ZodObject<{
|
|
3886
|
+
original: z.ZodObject<{
|
|
3887
|
+
currency: z.ZodString;
|
|
3888
|
+
amount: z.ZodNumber;
|
|
3889
|
+
}, "strip", z.ZodTypeAny, {
|
|
3890
|
+
currency: string;
|
|
3891
|
+
amount: number;
|
|
3892
|
+
}, {
|
|
3893
|
+
currency: string;
|
|
3894
|
+
amount: number;
|
|
3895
|
+
}>;
|
|
3896
|
+
discount: z.ZodObject<{
|
|
3897
|
+
currency: z.ZodString;
|
|
3898
|
+
amount: z.ZodNumber;
|
|
3899
|
+
}, "strip", z.ZodTypeAny, {
|
|
3900
|
+
currency: string;
|
|
3901
|
+
amount: number;
|
|
3902
|
+
}, {
|
|
3903
|
+
currency: string;
|
|
3904
|
+
amount: number;
|
|
3905
|
+
}>;
|
|
3906
|
+
subtotal: z.ZodObject<{
|
|
3907
|
+
currency: z.ZodString;
|
|
3908
|
+
amount: z.ZodNumber;
|
|
3909
|
+
}, "strip", z.ZodTypeAny, {
|
|
3910
|
+
currency: string;
|
|
3911
|
+
amount: number;
|
|
3912
|
+
}, {
|
|
3913
|
+
currency: string;
|
|
3914
|
+
amount: number;
|
|
3915
|
+
}>;
|
|
3916
|
+
taxes: z.ZodObject<{
|
|
3917
|
+
currency: z.ZodString;
|
|
3918
|
+
amount: z.ZodNumber;
|
|
3919
|
+
}, "strip", z.ZodTypeAny, {
|
|
3920
|
+
currency: string;
|
|
3921
|
+
amount: number;
|
|
3922
|
+
}, {
|
|
3923
|
+
currency: string;
|
|
3924
|
+
amount: number;
|
|
3925
|
+
}>;
|
|
3926
|
+
due: z.ZodObject<{
|
|
3927
|
+
currency: z.ZodString;
|
|
3928
|
+
amount: z.ZodNumber;
|
|
3929
|
+
}, "strip", z.ZodTypeAny, {
|
|
3930
|
+
currency: string;
|
|
3931
|
+
amount: number;
|
|
3932
|
+
}, {
|
|
3933
|
+
currency: string;
|
|
3934
|
+
amount: number;
|
|
3935
|
+
}>;
|
|
3936
|
+
cartOfferDiscount: z.ZodOptional<z.ZodObject<{
|
|
3937
|
+
currency: z.ZodString;
|
|
3938
|
+
amount: z.ZodNumber;
|
|
3939
|
+
}, "strip", z.ZodTypeAny, {
|
|
3940
|
+
currency: string;
|
|
3941
|
+
amount: number;
|
|
3942
|
+
}, {
|
|
3943
|
+
currency: string;
|
|
3944
|
+
amount: number;
|
|
3945
|
+
}>>;
|
|
3946
|
+
}, "strip", z.ZodTypeAny, {
|
|
3947
|
+
discount: {
|
|
3948
|
+
currency: string;
|
|
3949
|
+
amount: number;
|
|
3950
|
+
};
|
|
3951
|
+
original: {
|
|
3952
|
+
currency: string;
|
|
3953
|
+
amount: number;
|
|
3954
|
+
};
|
|
3955
|
+
subtotal: {
|
|
3956
|
+
currency: string;
|
|
3957
|
+
amount: number;
|
|
3958
|
+
};
|
|
3959
|
+
taxes: {
|
|
3960
|
+
currency: string;
|
|
3961
|
+
amount: number;
|
|
3962
|
+
};
|
|
3963
|
+
due: {
|
|
3964
|
+
currency: string;
|
|
3965
|
+
amount: number;
|
|
3966
|
+
};
|
|
3967
|
+
cartOfferDiscount?: {
|
|
3968
|
+
currency: string;
|
|
3969
|
+
amount: number;
|
|
3970
|
+
} | undefined;
|
|
3971
|
+
}, {
|
|
3972
|
+
discount: {
|
|
3973
|
+
currency: string;
|
|
3974
|
+
amount: number;
|
|
3975
|
+
};
|
|
3976
|
+
original: {
|
|
3977
|
+
currency: string;
|
|
3978
|
+
amount: number;
|
|
3979
|
+
};
|
|
3980
|
+
subtotal: {
|
|
3981
|
+
currency: string;
|
|
3982
|
+
amount: number;
|
|
3983
|
+
};
|
|
3984
|
+
taxes: {
|
|
3985
|
+
currency: string;
|
|
3986
|
+
amount: number;
|
|
3987
|
+
};
|
|
3988
|
+
due: {
|
|
3989
|
+
currency: string;
|
|
3990
|
+
amount: number;
|
|
3991
|
+
};
|
|
3992
|
+
cartOfferDiscount?: {
|
|
3993
|
+
currency: string;
|
|
3994
|
+
amount: number;
|
|
3995
|
+
} | undefined;
|
|
3996
|
+
}>;
|
|
3997
|
+
takesEffectAt: z.ZodDate;
|
|
3998
|
+
keepsDiscount: z.ZodBoolean;
|
|
3999
|
+
current: z.ZodBoolean;
|
|
4000
|
+
scheduled: z.ZodBoolean;
|
|
4001
|
+
}, "strip", z.ZodTypeAny, {
|
|
4002
|
+
option: {
|
|
4003
|
+
id: string;
|
|
4004
|
+
name: string;
|
|
4005
|
+
cycleLength: CycleLength;
|
|
4006
|
+
};
|
|
4007
|
+
takesEffectAt: Date;
|
|
4008
|
+
nextTotal: {
|
|
4009
|
+
discount: {
|
|
4010
|
+
currency: string;
|
|
4011
|
+
amount: number;
|
|
4012
|
+
};
|
|
4013
|
+
original: {
|
|
4014
|
+
currency: string;
|
|
4015
|
+
amount: number;
|
|
4016
|
+
};
|
|
4017
|
+
subtotal: {
|
|
4018
|
+
currency: string;
|
|
4019
|
+
amount: number;
|
|
4020
|
+
};
|
|
4021
|
+
taxes: {
|
|
4022
|
+
currency: string;
|
|
4023
|
+
amount: number;
|
|
4024
|
+
};
|
|
4025
|
+
due: {
|
|
4026
|
+
currency: string;
|
|
4027
|
+
amount: number;
|
|
4028
|
+
};
|
|
4029
|
+
cartOfferDiscount?: {
|
|
4030
|
+
currency: string;
|
|
4031
|
+
amount: number;
|
|
4032
|
+
} | undefined;
|
|
4033
|
+
};
|
|
4034
|
+
keepsDiscount: boolean;
|
|
4035
|
+
current: boolean;
|
|
4036
|
+
scheduled: boolean;
|
|
4037
|
+
}, {
|
|
4038
|
+
option: {
|
|
4039
|
+
id: string;
|
|
4040
|
+
name: string;
|
|
4041
|
+
cycleLength: CycleLength;
|
|
4042
|
+
};
|
|
4043
|
+
takesEffectAt: Date;
|
|
4044
|
+
nextTotal: {
|
|
4045
|
+
discount: {
|
|
4046
|
+
currency: string;
|
|
4047
|
+
amount: number;
|
|
4048
|
+
};
|
|
4049
|
+
original: {
|
|
4050
|
+
currency: string;
|
|
4051
|
+
amount: number;
|
|
4052
|
+
};
|
|
4053
|
+
subtotal: {
|
|
4054
|
+
currency: string;
|
|
4055
|
+
amount: number;
|
|
4056
|
+
};
|
|
4057
|
+
taxes: {
|
|
4058
|
+
currency: string;
|
|
4059
|
+
amount: number;
|
|
4060
|
+
};
|
|
4061
|
+
due: {
|
|
4062
|
+
currency: string;
|
|
4063
|
+
amount: number;
|
|
4064
|
+
};
|
|
4065
|
+
cartOfferDiscount?: {
|
|
4066
|
+
currency: string;
|
|
4067
|
+
amount: number;
|
|
4068
|
+
} | undefined;
|
|
4069
|
+
};
|
|
4070
|
+
keepsDiscount: boolean;
|
|
4071
|
+
current: boolean;
|
|
4072
|
+
scheduled: boolean;
|
|
4073
|
+
}>, "many">;
|
|
4074
|
+
}, "strip", z.ZodTypeAny, {
|
|
4075
|
+
plans: {
|
|
4076
|
+
option: {
|
|
4077
|
+
id: string;
|
|
4078
|
+
name: string;
|
|
4079
|
+
cycleLength: CycleLength;
|
|
4080
|
+
};
|
|
4081
|
+
takesEffectAt: Date;
|
|
4082
|
+
nextTotal: {
|
|
4083
|
+
discount: {
|
|
4084
|
+
currency: string;
|
|
4085
|
+
amount: number;
|
|
4086
|
+
};
|
|
4087
|
+
original: {
|
|
4088
|
+
currency: string;
|
|
4089
|
+
amount: number;
|
|
4090
|
+
};
|
|
4091
|
+
subtotal: {
|
|
4092
|
+
currency: string;
|
|
4093
|
+
amount: number;
|
|
4094
|
+
};
|
|
4095
|
+
taxes: {
|
|
4096
|
+
currency: string;
|
|
4097
|
+
amount: number;
|
|
4098
|
+
};
|
|
4099
|
+
due: {
|
|
4100
|
+
currency: string;
|
|
4101
|
+
amount: number;
|
|
4102
|
+
};
|
|
4103
|
+
cartOfferDiscount?: {
|
|
4104
|
+
currency: string;
|
|
4105
|
+
amount: number;
|
|
4106
|
+
} | undefined;
|
|
4107
|
+
};
|
|
4108
|
+
keepsDiscount: boolean;
|
|
4109
|
+
current: boolean;
|
|
4110
|
+
scheduled: boolean;
|
|
4111
|
+
}[];
|
|
4112
|
+
unavailable?: string | null | undefined;
|
|
4113
|
+
}, {
|
|
4114
|
+
plans: {
|
|
4115
|
+
option: {
|
|
4116
|
+
id: string;
|
|
4117
|
+
name: string;
|
|
4118
|
+
cycleLength: CycleLength;
|
|
4119
|
+
};
|
|
4120
|
+
takesEffectAt: Date;
|
|
4121
|
+
nextTotal: {
|
|
4122
|
+
discount: {
|
|
4123
|
+
currency: string;
|
|
4124
|
+
amount: number;
|
|
4125
|
+
};
|
|
4126
|
+
original: {
|
|
4127
|
+
currency: string;
|
|
4128
|
+
amount: number;
|
|
4129
|
+
};
|
|
4130
|
+
subtotal: {
|
|
4131
|
+
currency: string;
|
|
4132
|
+
amount: number;
|
|
4133
|
+
};
|
|
4134
|
+
taxes: {
|
|
4135
|
+
currency: string;
|
|
4136
|
+
amount: number;
|
|
4137
|
+
};
|
|
4138
|
+
due: {
|
|
4139
|
+
currency: string;
|
|
4140
|
+
amount: number;
|
|
4141
|
+
};
|
|
4142
|
+
cartOfferDiscount?: {
|
|
4143
|
+
currency: string;
|
|
4144
|
+
amount: number;
|
|
4145
|
+
} | undefined;
|
|
4146
|
+
};
|
|
4147
|
+
keepsDiscount: boolean;
|
|
4148
|
+
current: boolean;
|
|
4149
|
+
scheduled: boolean;
|
|
4150
|
+
}[];
|
|
4151
|
+
unavailable?: string | null | undefined;
|
|
4152
|
+
}>;
|
|
3444
4153
|
declare const subscriptionSchema: z.ZodObject<{
|
|
3445
4154
|
id: z.ZodString;
|
|
3446
4155
|
status: z.ZodNativeEnum<typeof SubscriptionStatus>;
|
|
@@ -3681,6 +4390,219 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
3681
4390
|
description?: string | null | undefined;
|
|
3682
4391
|
}>>>;
|
|
3683
4392
|
embeddedUpdatePaymentUrl: z.ZodOptional<z.ZodString>;
|
|
4393
|
+
pricingOption: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4394
|
+
id: z.ZodString;
|
|
4395
|
+
name: z.ZodString;
|
|
4396
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
4397
|
+
}, "strip", z.ZodTypeAny, {
|
|
4398
|
+
id: string;
|
|
4399
|
+
name: string;
|
|
4400
|
+
cycleLength: CycleLength;
|
|
4401
|
+
}, {
|
|
4402
|
+
id: string;
|
|
4403
|
+
name: string;
|
|
4404
|
+
cycleLength: CycleLength;
|
|
4405
|
+
}>>>>;
|
|
4406
|
+
pendingChange: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4407
|
+
option: z.ZodObject<{
|
|
4408
|
+
id: z.ZodString;
|
|
4409
|
+
name: z.ZodString;
|
|
4410
|
+
cycleLength: z.ZodNativeEnum<typeof CycleLength>;
|
|
4411
|
+
}, "strip", z.ZodTypeAny, {
|
|
4412
|
+
id: string;
|
|
4413
|
+
name: string;
|
|
4414
|
+
cycleLength: CycleLength;
|
|
4415
|
+
}, {
|
|
4416
|
+
id: string;
|
|
4417
|
+
name: string;
|
|
4418
|
+
cycleLength: CycleLength;
|
|
4419
|
+
}>;
|
|
4420
|
+
takesEffectAt: z.ZodDate;
|
|
4421
|
+
nextTotal: z.ZodObject<{
|
|
4422
|
+
original: z.ZodObject<{
|
|
4423
|
+
currency: z.ZodString;
|
|
4424
|
+
amount: z.ZodNumber;
|
|
4425
|
+
}, "strip", z.ZodTypeAny, {
|
|
4426
|
+
currency: string;
|
|
4427
|
+
amount: number;
|
|
4428
|
+
}, {
|
|
4429
|
+
currency: string;
|
|
4430
|
+
amount: number;
|
|
4431
|
+
}>;
|
|
4432
|
+
discount: z.ZodObject<{
|
|
4433
|
+
currency: z.ZodString;
|
|
4434
|
+
amount: z.ZodNumber;
|
|
4435
|
+
}, "strip", z.ZodTypeAny, {
|
|
4436
|
+
currency: string;
|
|
4437
|
+
amount: number;
|
|
4438
|
+
}, {
|
|
4439
|
+
currency: string;
|
|
4440
|
+
amount: number;
|
|
4441
|
+
}>;
|
|
4442
|
+
subtotal: z.ZodObject<{
|
|
4443
|
+
currency: z.ZodString;
|
|
4444
|
+
amount: z.ZodNumber;
|
|
4445
|
+
}, "strip", z.ZodTypeAny, {
|
|
4446
|
+
currency: string;
|
|
4447
|
+
amount: number;
|
|
4448
|
+
}, {
|
|
4449
|
+
currency: string;
|
|
4450
|
+
amount: number;
|
|
4451
|
+
}>;
|
|
4452
|
+
taxes: z.ZodObject<{
|
|
4453
|
+
currency: z.ZodString;
|
|
4454
|
+
amount: z.ZodNumber;
|
|
4455
|
+
}, "strip", z.ZodTypeAny, {
|
|
4456
|
+
currency: string;
|
|
4457
|
+
amount: number;
|
|
4458
|
+
}, {
|
|
4459
|
+
currency: string;
|
|
4460
|
+
amount: number;
|
|
4461
|
+
}>;
|
|
4462
|
+
due: z.ZodObject<{
|
|
4463
|
+
currency: z.ZodString;
|
|
4464
|
+
amount: z.ZodNumber;
|
|
4465
|
+
}, "strip", z.ZodTypeAny, {
|
|
4466
|
+
currency: string;
|
|
4467
|
+
amount: number;
|
|
4468
|
+
}, {
|
|
4469
|
+
currency: string;
|
|
4470
|
+
amount: number;
|
|
4471
|
+
}>;
|
|
4472
|
+
cartOfferDiscount: z.ZodOptional<z.ZodObject<{
|
|
4473
|
+
currency: z.ZodString;
|
|
4474
|
+
amount: z.ZodNumber;
|
|
4475
|
+
}, "strip", z.ZodTypeAny, {
|
|
4476
|
+
currency: string;
|
|
4477
|
+
amount: number;
|
|
4478
|
+
}, {
|
|
4479
|
+
currency: string;
|
|
4480
|
+
amount: number;
|
|
4481
|
+
}>>;
|
|
4482
|
+
}, "strip", z.ZodTypeAny, {
|
|
4483
|
+
discount: {
|
|
4484
|
+
currency: string;
|
|
4485
|
+
amount: number;
|
|
4486
|
+
};
|
|
4487
|
+
original: {
|
|
4488
|
+
currency: string;
|
|
4489
|
+
amount: number;
|
|
4490
|
+
};
|
|
4491
|
+
subtotal: {
|
|
4492
|
+
currency: string;
|
|
4493
|
+
amount: number;
|
|
4494
|
+
};
|
|
4495
|
+
taxes: {
|
|
4496
|
+
currency: string;
|
|
4497
|
+
amount: number;
|
|
4498
|
+
};
|
|
4499
|
+
due: {
|
|
4500
|
+
currency: string;
|
|
4501
|
+
amount: number;
|
|
4502
|
+
};
|
|
4503
|
+
cartOfferDiscount?: {
|
|
4504
|
+
currency: string;
|
|
4505
|
+
amount: number;
|
|
4506
|
+
} | undefined;
|
|
4507
|
+
}, {
|
|
4508
|
+
discount: {
|
|
4509
|
+
currency: string;
|
|
4510
|
+
amount: number;
|
|
4511
|
+
};
|
|
4512
|
+
original: {
|
|
4513
|
+
currency: string;
|
|
4514
|
+
amount: number;
|
|
4515
|
+
};
|
|
4516
|
+
subtotal: {
|
|
4517
|
+
currency: string;
|
|
4518
|
+
amount: number;
|
|
4519
|
+
};
|
|
4520
|
+
taxes: {
|
|
4521
|
+
currency: string;
|
|
4522
|
+
amount: number;
|
|
4523
|
+
};
|
|
4524
|
+
due: {
|
|
4525
|
+
currency: string;
|
|
4526
|
+
amount: number;
|
|
4527
|
+
};
|
|
4528
|
+
cartOfferDiscount?: {
|
|
4529
|
+
currency: string;
|
|
4530
|
+
amount: number;
|
|
4531
|
+
} | undefined;
|
|
4532
|
+
}>;
|
|
4533
|
+
keepsDiscount: z.ZodBoolean;
|
|
4534
|
+
scheduledAt: z.ZodDate;
|
|
4535
|
+
}, "strip", z.ZodTypeAny, {
|
|
4536
|
+
option: {
|
|
4537
|
+
id: string;
|
|
4538
|
+
name: string;
|
|
4539
|
+
cycleLength: CycleLength;
|
|
4540
|
+
};
|
|
4541
|
+
takesEffectAt: Date;
|
|
4542
|
+
nextTotal: {
|
|
4543
|
+
discount: {
|
|
4544
|
+
currency: string;
|
|
4545
|
+
amount: number;
|
|
4546
|
+
};
|
|
4547
|
+
original: {
|
|
4548
|
+
currency: string;
|
|
4549
|
+
amount: number;
|
|
4550
|
+
};
|
|
4551
|
+
subtotal: {
|
|
4552
|
+
currency: string;
|
|
4553
|
+
amount: number;
|
|
4554
|
+
};
|
|
4555
|
+
taxes: {
|
|
4556
|
+
currency: string;
|
|
4557
|
+
amount: number;
|
|
4558
|
+
};
|
|
4559
|
+
due: {
|
|
4560
|
+
currency: string;
|
|
4561
|
+
amount: number;
|
|
4562
|
+
};
|
|
4563
|
+
cartOfferDiscount?: {
|
|
4564
|
+
currency: string;
|
|
4565
|
+
amount: number;
|
|
4566
|
+
} | undefined;
|
|
4567
|
+
};
|
|
4568
|
+
keepsDiscount: boolean;
|
|
4569
|
+
scheduledAt: Date;
|
|
4570
|
+
}, {
|
|
4571
|
+
option: {
|
|
4572
|
+
id: string;
|
|
4573
|
+
name: string;
|
|
4574
|
+
cycleLength: CycleLength;
|
|
4575
|
+
};
|
|
4576
|
+
takesEffectAt: Date;
|
|
4577
|
+
nextTotal: {
|
|
4578
|
+
discount: {
|
|
4579
|
+
currency: string;
|
|
4580
|
+
amount: number;
|
|
4581
|
+
};
|
|
4582
|
+
original: {
|
|
4583
|
+
currency: string;
|
|
4584
|
+
amount: number;
|
|
4585
|
+
};
|
|
4586
|
+
subtotal: {
|
|
4587
|
+
currency: string;
|
|
4588
|
+
amount: number;
|
|
4589
|
+
};
|
|
4590
|
+
taxes: {
|
|
4591
|
+
currency: string;
|
|
4592
|
+
amount: number;
|
|
4593
|
+
};
|
|
4594
|
+
due: {
|
|
4595
|
+
currency: string;
|
|
4596
|
+
amount: number;
|
|
4597
|
+
};
|
|
4598
|
+
cartOfferDiscount?: {
|
|
4599
|
+
currency: string;
|
|
4600
|
+
amount: number;
|
|
4601
|
+
} | undefined;
|
|
4602
|
+
};
|
|
4603
|
+
keepsDiscount: boolean;
|
|
4604
|
+
scheduledAt: Date;
|
|
4605
|
+
}>>>>;
|
|
3684
4606
|
content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3685
4607
|
type: z.ZodLiteral<"Product">;
|
|
3686
4608
|
quantity: z.ZodNumber;
|
|
@@ -7184,6 +8106,47 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
7184
8106
|
description?: string | null | undefined;
|
|
7185
8107
|
} | null | undefined;
|
|
7186
8108
|
embeddedUpdatePaymentUrl?: string | undefined;
|
|
8109
|
+
pricingOption?: {
|
|
8110
|
+
id: string;
|
|
8111
|
+
name: string;
|
|
8112
|
+
cycleLength: CycleLength;
|
|
8113
|
+
} | null | undefined;
|
|
8114
|
+
pendingChange?: {
|
|
8115
|
+
option: {
|
|
8116
|
+
id: string;
|
|
8117
|
+
name: string;
|
|
8118
|
+
cycleLength: CycleLength;
|
|
8119
|
+
};
|
|
8120
|
+
takesEffectAt: Date;
|
|
8121
|
+
nextTotal: {
|
|
8122
|
+
discount: {
|
|
8123
|
+
currency: string;
|
|
8124
|
+
amount: number;
|
|
8125
|
+
};
|
|
8126
|
+
original: {
|
|
8127
|
+
currency: string;
|
|
8128
|
+
amount: number;
|
|
8129
|
+
};
|
|
8130
|
+
subtotal: {
|
|
8131
|
+
currency: string;
|
|
8132
|
+
amount: number;
|
|
8133
|
+
};
|
|
8134
|
+
taxes: {
|
|
8135
|
+
currency: string;
|
|
8136
|
+
amount: number;
|
|
8137
|
+
};
|
|
8138
|
+
due: {
|
|
8139
|
+
currency: string;
|
|
8140
|
+
amount: number;
|
|
8141
|
+
};
|
|
8142
|
+
cartOfferDiscount?: {
|
|
8143
|
+
currency: string;
|
|
8144
|
+
amount: number;
|
|
8145
|
+
} | undefined;
|
|
8146
|
+
};
|
|
8147
|
+
keepsDiscount: boolean;
|
|
8148
|
+
scheduledAt: Date;
|
|
8149
|
+
} | null | undefined;
|
|
7187
8150
|
}, {
|
|
7188
8151
|
id: string;
|
|
7189
8152
|
status: SubscriptionStatus;
|
|
@@ -7566,12 +8529,18 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
7566
8529
|
description?: string | null | undefined;
|
|
7567
8530
|
} | null | undefined;
|
|
7568
8531
|
embeddedUpdatePaymentUrl?: string | undefined;
|
|
8532
|
+
pricingOption?: unknown;
|
|
8533
|
+
pendingChange?: unknown;
|
|
7569
8534
|
}>;
|
|
7570
8535
|
|
|
7571
8536
|
declare const schemas$6_milestoneProgressSchema: typeof milestoneProgressSchema;
|
|
8537
|
+
declare const schemas$6_pendingPlanChangeSchema: typeof pendingPlanChangeSchema;
|
|
8538
|
+
declare const schemas$6_pricingOptionSchema: typeof pricingOptionSchema;
|
|
8539
|
+
declare const schemas$6_subscriptionPlanOptionSchema: typeof subscriptionPlanOptionSchema;
|
|
8540
|
+
declare const schemas$6_subscriptionPlanOptionsSchema: typeof subscriptionPlanOptionsSchema;
|
|
7572
8541
|
declare const schemas$6_subscriptionSchema: typeof subscriptionSchema;
|
|
7573
8542
|
declare namespace schemas$6 {
|
|
7574
|
-
export { schemas$6_milestoneProgressSchema as milestoneProgressSchema, schemas$6_subscriptionSchema as subscriptionSchema };
|
|
8543
|
+
export { schemas$6_milestoneProgressSchema as milestoneProgressSchema, schemas$6_pendingPlanChangeSchema as pendingPlanChangeSchema, schemas$6_pricingOptionSchema as pricingOptionSchema, schemas$6_subscriptionPlanOptionSchema as subscriptionPlanOptionSchema, schemas$6_subscriptionPlanOptionsSchema as subscriptionPlanOptionsSchema, schemas$6_subscriptionSchema as subscriptionSchema };
|
|
7575
8544
|
}
|
|
7576
8545
|
|
|
7577
8546
|
declare enum SubscriptionStatus {
|
|
@@ -7603,6 +8572,20 @@ interface SubscriptionCancellationFeedback {
|
|
|
7603
8572
|
}
|
|
7604
8573
|
type Subscription = z.infer<typeof subscriptionSchema>;
|
|
7605
8574
|
type MilestoneProgress = z.infer<typeof milestoneProgressSchema>;
|
|
8575
|
+
/** A subscription's plan: one of the pricing options of its product or bundle. */
|
|
8576
|
+
type PricingOption = z.infer<typeof pricingOptionSchema>;
|
|
8577
|
+
/**
|
|
8578
|
+
* A switch to another plan, scheduled for the end of the subscription's paid period. Nothing is
|
|
8579
|
+
* charged until then: the renewal at `takesEffectAt` charges `nextTotal` and starts the new plan.
|
|
8580
|
+
*/
|
|
8581
|
+
type PendingPlanChange = z.infer<typeof pendingPlanChangeSchema>;
|
|
8582
|
+
/** A plan a subscription is on or can switch to, with what its next renewal would charge on it. */
|
|
8583
|
+
type SubscriptionPlanOption = z.infer<typeof subscriptionPlanOptionSchema>;
|
|
8584
|
+
/**
|
|
8585
|
+
* The plans a subscription can switch to, the one it is on listed first. When it can't switch,
|
|
8586
|
+
* `unavailable` says why, in words that can be shown to the customer as they are.
|
|
8587
|
+
*/
|
|
8588
|
+
type SubscriptionPlanOptions = z.infer<typeof subscriptionPlanOptionsSchema>;
|
|
7606
8589
|
|
|
7607
8590
|
declare class SubscriptionEndpoints {
|
|
7608
8591
|
private readonly api;
|
|
@@ -7618,6 +8601,24 @@ declare class SubscriptionEndpoints {
|
|
|
7618
8601
|
* period ends. Pass `feedback` to record why they are cancelling.
|
|
7619
8602
|
*/
|
|
7620
8603
|
cancel(subscriptionId: string, feedback?: SubscriptionCancellationFeedback): Promise<Subscription>;
|
|
8604
|
+
/**
|
|
8605
|
+
* The plans the subscription can switch to when its current period ends, each with what the
|
|
8606
|
+
* next renewal would charge on it. The plan it is on comes first. When it can't switch,
|
|
8607
|
+
* `unavailable` says why, ready to show to the customer.
|
|
8608
|
+
*/
|
|
8609
|
+
getPlanOptions(subscriptionId: string): Promise<SubscriptionPlanOptions>;
|
|
8610
|
+
/**
|
|
8611
|
+
* Switches the subscription to another plan when its current period ends. Nothing is charged
|
|
8612
|
+
* now: the next renewal charges the new plan and starts its cycle. Until then the customer can
|
|
8613
|
+
* switch again, and passing the plan it is on keeps that plan. Returns the updated subscription,
|
|
8614
|
+
* with the switch in `pendingChange`.
|
|
8615
|
+
*/
|
|
8616
|
+
changePlan(subscriptionId: string, variationId: string): Promise<Subscription>;
|
|
8617
|
+
/**
|
|
8618
|
+
* Keeps the subscription on its current plan, dropping a switch scheduled with `changePlan`.
|
|
8619
|
+
* Returns the updated subscription.
|
|
8620
|
+
*/
|
|
8621
|
+
cancelPlanChange(subscriptionId: string): Promise<Subscription>;
|
|
7621
8622
|
renew(subscriptionId: string, returnUrl: string, embedded: boolean): Promise<{
|
|
7622
8623
|
location: string;
|
|
7623
8624
|
}>;
|
|
@@ -26260,6 +27261,7 @@ declare class StorefrontEndpoints {
|
|
|
26260
27261
|
rate: number;
|
|
26261
27262
|
region?: string | undefined;
|
|
26262
27263
|
} | undefined;
|
|
27264
|
+
cookieConsentRequired?: boolean | undefined;
|
|
26263
27265
|
}>;
|
|
26264
27266
|
}
|
|
26265
27267
|
|
|
@@ -50389,6 +51391,7 @@ declare const storefrontSchema: z.ZodObject<{
|
|
|
50389
51391
|
rate: number;
|
|
50390
51392
|
region?: string | undefined;
|
|
50391
51393
|
}>>;
|
|
51394
|
+
cookieConsentRequired: z.ZodOptional<z.ZodBoolean>;
|
|
50392
51395
|
}, "strip", z.ZodTypeAny, {
|
|
50393
51396
|
products: {
|
|
50394
51397
|
id: string;
|
|
@@ -50883,6 +51886,7 @@ declare const storefrontSchema: z.ZodObject<{
|
|
|
50883
51886
|
rate: number;
|
|
50884
51887
|
region?: string | undefined;
|
|
50885
51888
|
} | undefined;
|
|
51889
|
+
cookieConsentRequired?: boolean | undefined;
|
|
50886
51890
|
}, {
|
|
50887
51891
|
products: {
|
|
50888
51892
|
id: string;
|
|
@@ -51203,6 +52207,7 @@ declare const storefrontSchema: z.ZodObject<{
|
|
|
51203
52207
|
rate: number;
|
|
51204
52208
|
region?: string | undefined;
|
|
51205
52209
|
} | undefined;
|
|
52210
|
+
cookieConsentRequired?: boolean | undefined;
|
|
51206
52211
|
}>;
|
|
51207
52212
|
|
|
51208
52213
|
declare const schemas$1_offerConditionSchema: typeof offerConditionSchema;
|
|
@@ -51587,6 +52592,20 @@ declare const problemDetailsSchema: z.ZodObject<{
|
|
|
51587
52592
|
}>;
|
|
51588
52593
|
type ProblemDetails = z.infer<typeof problemDetailsSchema>;
|
|
51589
52594
|
|
|
52595
|
+
/**
|
|
52596
|
+
* The platforms the click IDs in `utm` came from, together with any it already
|
|
52597
|
+
* names in `adClicks`, each once; undefined when there are none, so a visit
|
|
52598
|
+
* without an ad click carries no empty list.
|
|
52599
|
+
*/
|
|
52600
|
+
declare function adClicksOf(utm: UrchinTrackingModule | undefined): AdPlatform[] | undefined;
|
|
52601
|
+
/**
|
|
52602
|
+
* `utm` without the values of its ad click IDs, which identify the visitor's
|
|
52603
|
+
* click, but still naming in `adClicks` the platforms they came from, which
|
|
52604
|
+
* identify no one. This is what the storefront keeps and sends until the
|
|
52605
|
+
* visitor has agreed to marketing cookies: the visit still counts as an ad
|
|
52606
|
+
* click, and a sale from it is still put down to the ad's tags.
|
|
52607
|
+
*/
|
|
52608
|
+
declare function withoutClickIds(utm: UrchinTrackingModule): UrchinTrackingModule;
|
|
51590
52609
|
/**
|
|
51591
52610
|
* Returns the host of `rawReferrer` if it parses as a URL with a different
|
|
51592
52611
|
* origin from `currentOrigin`. Returns `undefined` for same-origin (internal
|
|
@@ -51619,7 +52638,25 @@ declare function resolveUtm(cached: UrchinTrackingModule | undefined, fresh: Urc
|
|
|
51619
52638
|
|
|
51620
52639
|
interface MoonbaseConfiguration {
|
|
51621
52640
|
endpoint: string;
|
|
52641
|
+
/**
|
|
52642
|
+
* Keep the attribution a visitor arrived with in localStorage, across visits,
|
|
52643
|
+
* rather than in sessionStorage for the tab. Only with the visitor's consent
|
|
52644
|
+
* (see `attributionConsent`), as it remembers them beyond the visit; a refusal
|
|
52645
|
+
* removes it.
|
|
52646
|
+
*/
|
|
51622
52647
|
persistUtm?: boolean;
|
|
52648
|
+
/**
|
|
52649
|
+
* Whether the visitor has agreed to marketing cookies, as your cookie banner
|
|
52650
|
+
* reports it, so `@moonbase.sh/vue` may keep and send the ad click IDs on the
|
|
52651
|
+
* landing page URL (`gclid`, `fbclid` and the rest) and record a tagged arrival
|
|
52652
|
+
* before they put anything in the cart. Without them it keeps only the UTM
|
|
52653
|
+
* tags, the referring site and which ad platforms the click IDs came from, for
|
|
52654
|
+
* the tab. Left out, the storefront follows the store's own setting in Moonbase
|
|
52655
|
+
* (always, per country, or only with cookie consent), which the catalog
|
|
52656
|
+
* reports for this visitor as `cookieConsentRequired`. Change it later with
|
|
52657
|
+
* `setAttributionConsent()`.
|
|
52658
|
+
*/
|
|
52659
|
+
attributionConsent?: boolean;
|
|
51623
52660
|
includeManifests?: boolean;
|
|
51624
52661
|
store?: IStore;
|
|
51625
52662
|
logger?: ILogger;
|
|
@@ -51649,4 +52686,4 @@ declare class MoonbaseClient {
|
|
|
51649
52686
|
orders: OrderEndpoints;
|
|
51650
52687
|
}
|
|
51651
52688
|
|
|
51652
|
-
export { type Activation, ActivationMethod, type ActivationReleaseNotCovered, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type Address, Architecture, type BundleLineItem, CaptchaRequiredError, type CartCatalog, type CartOrder, type CartTotal, type CartTotalCondition, CartUtils, type CommunicationPreferences, type CommunicationPreferencesInput, type CommunicationPreferencesView, type CompletedOrder, ConnectableAccountProvider, type ConnectedAccount, ConsoleLogger, CycleLength, type Discount, DiscountUtils, type Download, type DownloadManifest, type ILogger, type IRecurrence, type IStore, type ITokenStore, type Identity, type ImageFit, type ImageFormat, type ImageTransform, ImageUtils, InMemoryStore, type License, type LicenseReleaseAccess, LicenseStatus, type LineItem, type LineItemTotal, LocalStorageStore, LogLevel, MarketingConsentType, type MilestoneProgress, type Money, type MoneyCollection, MoneyCollectionUtils, MoonbaseApi, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OfferCondition, type OfferConditionContext, type OfferProgress, type OfferScope, OfferUtils, type OpenOrder, type Order, OrderStatus, type OrderTotal, type OwnedProduct, type Page, PasswordSetupRequiredError, Platform, type PricingTier, type PricingVariation, type ProblemDetails, type ProductLineItem, type ProductRelease, type ProductReleaseAccess, type PromotionDisplay, type Quantifiable, type RawPropertyArray, type RawPropertyObject, type RawPropertyValue, ReleaseNotCoveredError, type SignUpOptions, type SignUpResult, type SingleOrMultiple, StoreClosedError, type Storefront, type StorefrontBundle, type StorefrontLicenseUpgrade, type StorefrontLicenseUpgradeReleaseAccess, type StorefrontOffer, type StorefrontOfferTarget, type StorefrontProduct, type StorefrontPromotion, type StorefrontPromotionCta, type StorefrontPromotionTarget, type SubscribeInput, type SubscribeResponse, type Subscription, type SubscriptionCancellationFeedback, SubscriptionCancellationReason, SubscriptionStatus, type TaxEstimate, TokenStore, type UrchinTrackingModule, type User, type UserAccountConfirmed, type UserAccountConfirmedStatus, type Vendor, type VendorCaptcha, type VendorFeatures, type Voucher, accessTokenLifetime, imageWidths, isLocalStorageAvailable, isPromotionDisplay, isTransformableImageUrl, maxImageDimension, normalizeGroupIds, objectToQuery, parseOffSiteReferrer, problemDetailsSchema, promotionDisplays, resolveUtm, schemas, utmToObject };
|
|
52689
|
+
export { type Activation, ActivationMethod, type ActivationReleaseNotCovered, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type AdPlatform, type Address, Architecture, type BundleLineItem, CaptchaRequiredError, type CartCatalog, type CartOrder, type CartTotal, type CartTotalCondition, CartUtils, type CommunicationPreferences, type CommunicationPreferencesInput, type CommunicationPreferencesView, type CompletedOrder, ConnectableAccountProvider, type ConnectedAccount, ConsoleLogger, CycleLength, type Discount, DiscountUtils, type Download, type DownloadManifest, type ILogger, type IRecurrence, type IStore, type ITokenStore, type Identity, type ImageFit, type ImageFormat, type ImageTransform, ImageUtils, InMemoryStore, type License, type LicenseReleaseAccess, LicenseStatus, type LineItem, type LineItemTotal, LocalStorageStore, LogLevel, MarketingConsentType, type MilestoneProgress, type Money, type MoneyCollection, MoneyCollectionUtils, MoonbaseApi, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OfferCondition, type OfferConditionContext, type OfferProgress, type OfferScope, OfferUtils, type OpenOrder, type Order, OrderStatus, type OrderTotal, type OwnedProduct, type Page, PasswordSetupRequiredError, type PendingPlanChange, Platform, type PricingOption, type PricingTier, type PricingVariation, type ProblemDetails, type ProductLineItem, type ProductRelease, type ProductReleaseAccess, type PromotionDisplay, type Quantifiable, type RawPropertyArray, type RawPropertyObject, type RawPropertyValue, ReleaseNotCoveredError, type SignUpOptions, type SignUpResult, type SingleOrMultiple, StoreClosedError, type Storefront, type StorefrontBundle, type StorefrontLicenseUpgrade, type StorefrontLicenseUpgradeReleaseAccess, type StorefrontOffer, type StorefrontOfferTarget, type StorefrontProduct, type StorefrontPromotion, type StorefrontPromotionCta, type StorefrontPromotionTarget, type SubscribeInput, type SubscribeResponse, type Subscription, type SubscriptionCancellationFeedback, SubscriptionCancellationReason, type SubscriptionPlanOption, type SubscriptionPlanOptions, SubscriptionStatus, type TaxEstimate, TokenStore, type UrchinTrackingModule, type User, type UserAccountConfirmed, type UserAccountConfirmedStatus, type Vendor, type VendorCaptcha, type VendorFeatures, type Voucher, accessTokenLifetime, adClicksOf, imageWidths, isLocalStorageAvailable, isPromotionDisplay, isTransformableImageUrl, maxImageDimension, normalizeGroupIds, objectToQuery, parseOffSiteReferrer, problemDetailsSchema, promotionDisplays, resolveUtm, schemas, utmToObject, withoutClickIds };
|