@wix/subscription 1.0.21 → 1.0.23

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.
@@ -8,12 +8,12 @@ interface Subscription$1 {
8
8
  * Date when subscription was created
9
9
  * @readonly
10
10
  */
11
- createdDate?: Date;
11
+ createdDate?: Date | null;
12
12
  /**
13
13
  * Date when subscription was updated
14
14
  * @readonly
15
15
  */
16
- updatedDate?: Date;
16
+ updatedDate?: Date | null;
17
17
  /**
18
18
  * Revision of subscription. Increments upon changes
19
19
  * @readonly
@@ -29,13 +29,13 @@ interface Subscription$1 {
29
29
  * Future start_date is not supported for `SEND_INVOICE` CollectionMethod
30
30
  * If start_date is set in past, it means subscription was already started.
31
31
  */
32
- startDate?: Date;
32
+ startDate?: Date | null;
33
33
  /**
34
34
  * Represents when the subscription will end, relevant for subscriptions with a termed period.
35
35
  * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.
36
36
  * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.
37
37
  */
38
- endDate?: Date;
38
+ endDate?: Date | null;
39
39
  /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */
40
40
  origin?: BusinessOrigin$1;
41
41
  /** Customer information like id and identity type (member or contact) */
@@ -446,9 +446,9 @@ interface BillingStatus$1 {
446
446
  /** how many cycled are remaining, For auto-renew subscriptions is not set. */
447
447
  remainingCycles?: number | null;
448
448
  /** Date when charge will be for next billing cycle */
449
- nextBillingDate?: Date;
449
+ nextBillingDate?: Date | null;
450
450
  /** Previous Date charged for previous billing cycle */
451
- previousBillingDate?: Date;
451
+ previousBillingDate?: Date | null;
452
452
  /** last payment details */
453
453
  latestPaymentData?: PaymentData$1;
454
454
  /** Free trial data */
@@ -464,7 +464,7 @@ interface PaymentData$1 {
464
464
  invoiceId?: string;
465
465
  paymentStatus?: PaymentStatus$1;
466
466
  totals?: Totals$1;
467
- initialFailedPaymentDate?: Date;
467
+ initialFailedPaymentDate?: Date | null;
468
468
  }
469
469
  declare enum PaymentStatus$1 {
470
470
  /** Payment status unknown */
@@ -530,12 +530,12 @@ interface FreeTrialData$1 {
530
530
  * Date when free trial starts
531
531
  * @readonly
532
532
  */
533
- startDate?: Date;
533
+ startDate?: Date | null;
534
534
  /**
535
535
  * Date when free trial ends
536
536
  * @readonly
537
537
  */
538
- endDate?: Date;
538
+ endDate?: Date | null;
539
539
  }
540
540
  interface Proration$1 extends ProrationTypeOneOf$1 {
541
541
  /**
@@ -608,12 +608,12 @@ interface GracePeriodData$1 {
608
608
  * Grace period start date
609
609
  * @readonly
610
610
  */
611
- startDate?: Date;
611
+ startDate?: Date | null;
612
612
  /**
613
613
  * Grace period end date
614
614
  * @readonly
615
615
  */
616
- endDate?: Date;
616
+ endDate?: Date | null;
617
617
  /** Automatic retry data during grade period, if have any. Optional. */
618
618
  automaticRetryData?: AutomaticRetryData$1;
619
619
  }
@@ -631,10 +631,10 @@ interface SubscriptionPolicies$1 {
631
631
  interface PauseInfo$1 {
632
632
  pausePolicy?: PausePolicy$1;
633
633
  pauseAt?: PauseAt$1;
634
- startDate?: Date;
634
+ startDate?: Date | null;
635
635
  startCycle?: number | null;
636
636
  resumeAt?: ResumeAt$1;
637
- resumeDate?: Date;
637
+ resumeDate?: Date | null;
638
638
  resumeCycle?: number | null;
639
639
  }
640
640
  declare enum PausePolicy$1 {
@@ -668,7 +668,7 @@ declare enum ResumeAt$1 {
668
668
  }
669
669
  interface CancellationInfo$1 {
670
670
  /** Subscription cancel date. Can contain a future or past date */
671
- cancellationDate?: Date;
671
+ cancellationDate?: Date | null;
672
672
  /** Initiator for cancellation */
673
673
  initiator?: HistoryActionInitiator$1;
674
674
  /** Reason for cancellation. Optional. */
@@ -784,7 +784,7 @@ interface ApplicationFeeValueOneOf$1 {
784
784
  }
785
785
  interface SpecificDateSubscriptionUpdateData$1 {
786
786
  updateData?: SubscriptionUpdateData$1;
787
- executionDate?: Date;
787
+ executionDate?: Date | null;
788
788
  }
789
789
  interface ListSubscriptionHistoryRequest$1 {
790
790
  subscriptionId: string;
@@ -821,7 +821,7 @@ interface SubscriptionHistoryEntry$1 {
821
821
  entryId?: string;
822
822
  /** TODO: add max length? it is not defined in domainevents, so should we? */
823
823
  slug?: string;
824
- entryTime?: Date;
824
+ entryTime?: Date | null;
825
825
  event?: SubscriptionEvent$1;
826
826
  }
827
827
  interface SubscriptionEvent$1 extends SubscriptionEventPayloadOneOf$1 {
@@ -1012,7 +1012,7 @@ interface SubscriptionRevived$1 {
1012
1012
  }
1013
1013
  interface SubscriptionBillingDateUpdated$1 {
1014
1014
  subscription?: Subscription$1;
1015
- billingDate?: Date;
1015
+ billingDate?: Date | null;
1016
1016
  proration?: Proration$1;
1017
1017
  }
1018
1018
  interface FutureUpdatesRequested$1 {
@@ -1321,7 +1321,7 @@ interface SubscriptionCharge$1 {
1321
1321
  /** cycle of future charge */
1322
1322
  cycle?: number;
1323
1323
  /** date of the charge */
1324
- billingDate?: Date;
1324
+ billingDate?: Date | null;
1325
1325
  /** breakdown of charge */
1326
1326
  totals?: Totals$1;
1327
1327
  /** List of items in the invoice */
@@ -1481,22 +1481,8 @@ interface LineItemTaxSummary$1 {
1481
1481
  aggregatedTaxAmount?: string;
1482
1482
  /** Aggregated from tax_breakdowns */
1483
1483
  aggregatedTaxRate?: string;
1484
- /** Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`. */
1485
- aggregatedTaxBreakdowns?: AggregatedTaxBreakdown$1[];
1486
- }
1487
- interface AggregatedTaxBreakdown$1 {
1488
- /** Name of the tax that was calculated. */
1489
- taxName?: string;
1490
- /** Type of tax that was calculated. */
1491
- taxType?: string;
1492
- /** Jurisdiction that taxes were calculated for. */
1493
- jurisdiction?: string;
1494
- /** Type of jurisdiction that taxes were calculated for. */
1495
- jurisdictionType?: string;
1496
- /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`. */
1497
- rate?: string;
1498
- /** Total amount of this tax for this jurisdiction. */
1499
- aggregatedTaxAmount?: string;
1484
+ /** Total taxable amount for this line item. */
1485
+ taxableAmount?: string;
1500
1486
  }
1501
1487
  interface TaxBreakdown$1 {
1502
1488
  taxType?: string;
@@ -1549,7 +1535,7 @@ interface UpdateSubscriptionBillingDateRequest$1 {
1549
1535
  /** ID of the subscription to update the billing date for. */
1550
1536
  id: string;
1551
1537
  /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
1552
- billingDate: Date;
1538
+ billingDate: Date | null;
1553
1539
  /**
1554
1540
  * Information about how BASS adjusts the total of the next invoice. Extending
1555
1541
  * the current billing cycle results in a higher payment, while shortening it
@@ -1574,7 +1560,7 @@ interface ScheduleAdditionalInfo$1 extends ScheduleAdditionalInfoParamOneOf$1 {
1574
1560
  * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
1575
1561
  * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
1576
1562
  */
1577
- specificDate?: Date;
1563
+ specificDate?: Date | null;
1578
1564
  /**
1579
1565
  * When the update becomes effective, as number of billing cycles from now.
1580
1566
  * The use of this field may be restricted in various BASS endpoints.
@@ -1594,7 +1580,7 @@ interface ScheduleAdditionalInfoParamOneOf$1 {
1594
1580
  * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
1595
1581
  * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
1596
1582
  */
1597
- specificDate?: Date;
1583
+ specificDate?: Date | null;
1598
1584
  /**
1599
1585
  * When the update becomes effective, as number of billing cycles from now.
1600
1586
  * The use of this field may be restricted in various BASS endpoints.
@@ -1754,7 +1740,7 @@ interface ListUpcomingChargesRequest$1 {
1754
1740
  * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
1755
1741
  * If not provided, the upcoming charges will be calculated according to the existing next billing date.
1756
1742
  */
1757
- nextBillingDate?: Date;
1743
+ nextBillingDate?: Date | null;
1758
1744
  }
1759
1745
  interface ListUpcomingChargesResponse$1 {
1760
1746
  upcomingCharges?: SubscriptionCharge$1[];
@@ -1772,7 +1758,7 @@ interface PreviewSubscriptionChargesRequestSubscriptionOneOf$1 {
1772
1758
  interface SubscriptionInfo$1 {
1773
1759
  billingSettings?: BillingSettings$1;
1774
1760
  items?: Item$1[];
1775
- startDate?: Date;
1761
+ startDate?: Date | null;
1776
1762
  }
1777
1763
  interface PreviewSubscriptionChargesResponse$1 {
1778
1764
  /** Charges for subscription. */
@@ -1787,7 +1773,7 @@ interface Charge$1 {
1787
1773
  /** The breakdown of the charge */
1788
1774
  totals?: Totals$1;
1789
1775
  /** The billing date from which the charge starts */
1790
- cycleBillingDate?: Date;
1776
+ cycleBillingDate?: Date | null;
1791
1777
  }
1792
1778
  interface PayCycleRequest$1 {
1793
1779
  subscriptionId: string;
@@ -2189,19 +2175,10 @@ interface PriceDetailsNonNullableFields$1 {
2189
2175
  discount?: InvoiceDiscountNonNullableFields$1;
2190
2176
  applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields$1;
2191
2177
  }
2192
- interface AggregatedTaxBreakdownNonNullableFields$1 {
2193
- taxName: string;
2194
- taxType: string;
2195
- jurisdiction: string;
2196
- jurisdictionType: string;
2197
- rate: string;
2198
- aggregatedTaxAmount: string;
2199
- aggregatedTaxableAmount: string;
2200
- }
2201
2178
  interface LineItemTaxSummaryNonNullableFields$1 {
2202
2179
  aggregatedTaxAmount: string;
2203
2180
  aggregatedTaxRate: string;
2204
- aggregatedTaxBreakdowns: AggregatedTaxBreakdownNonNullableFields$1[];
2181
+ taxableAmount: string;
2205
2182
  }
2206
2183
  interface TaxBreakdownNonNullableFields$1 {
2207
2184
  taxType: string;
@@ -2314,12 +2291,12 @@ interface Subscription {
2314
2291
  * Date when subscription was created
2315
2292
  * @readonly
2316
2293
  */
2317
- _createdDate?: Date;
2294
+ _createdDate?: Date | null;
2318
2295
  /**
2319
2296
  * Date when subscription was updated
2320
2297
  * @readonly
2321
2298
  */
2322
- _updatedDate?: Date;
2299
+ _updatedDate?: Date | null;
2323
2300
  /**
2324
2301
  * Revision of subscription. Increments upon changes
2325
2302
  * @readonly
@@ -2335,13 +2312,13 @@ interface Subscription {
2335
2312
  * Future start_date is not supported for `SEND_INVOICE` CollectionMethod
2336
2313
  * If start_date is set in past, it means subscription was already started.
2337
2314
  */
2338
- startDate?: Date;
2315
+ startDate?: Date | null;
2339
2316
  /**
2340
2317
  * Represents when the subscription will end, relevant for subscriptions with a termed period.
2341
2318
  * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.
2342
2319
  * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.
2343
2320
  */
2344
- endDate?: Date;
2321
+ endDate?: Date | null;
2345
2322
  /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */
2346
2323
  origin?: BusinessOrigin;
2347
2324
  /** Customer information like id and identity type (member or contact) */
@@ -2752,9 +2729,9 @@ interface BillingStatus {
2752
2729
  /** how many cycled are remaining, For auto-renew subscriptions is not set. */
2753
2730
  remainingCycles?: number | null;
2754
2731
  /** Date when charge will be for next billing cycle */
2755
- nextBillingDate?: Date;
2732
+ nextBillingDate?: Date | null;
2756
2733
  /** Previous Date charged for previous billing cycle */
2757
- previousBillingDate?: Date;
2734
+ previousBillingDate?: Date | null;
2758
2735
  /** last payment details */
2759
2736
  latestPaymentData?: PaymentData;
2760
2737
  /** Free trial data */
@@ -2770,7 +2747,7 @@ interface PaymentData {
2770
2747
  invoiceId?: string;
2771
2748
  paymentStatus?: PaymentStatus;
2772
2749
  totals?: Totals;
2773
- initialFailedPaymentDate?: Date;
2750
+ initialFailedPaymentDate?: Date | null;
2774
2751
  }
2775
2752
  declare enum PaymentStatus {
2776
2753
  /** Payment status unknown */
@@ -2836,12 +2813,12 @@ interface FreeTrialData {
2836
2813
  * Date when free trial starts
2837
2814
  * @readonly
2838
2815
  */
2839
- startDate?: Date;
2816
+ startDate?: Date | null;
2840
2817
  /**
2841
2818
  * Date when free trial ends
2842
2819
  * @readonly
2843
2820
  */
2844
- endDate?: Date;
2821
+ endDate?: Date | null;
2845
2822
  }
2846
2823
  interface Proration extends ProrationTypeOneOf {
2847
2824
  /**
@@ -2914,12 +2891,12 @@ interface GracePeriodData {
2914
2891
  * Grace period start date
2915
2892
  * @readonly
2916
2893
  */
2917
- startDate?: Date;
2894
+ startDate?: Date | null;
2918
2895
  /**
2919
2896
  * Grace period end date
2920
2897
  * @readonly
2921
2898
  */
2922
- endDate?: Date;
2899
+ endDate?: Date | null;
2923
2900
  /** Automatic retry data during grade period, if have any. Optional. */
2924
2901
  automaticRetryData?: AutomaticRetryData;
2925
2902
  }
@@ -2937,10 +2914,10 @@ interface SubscriptionPolicies {
2937
2914
  interface PauseInfo {
2938
2915
  pausePolicy?: PausePolicy;
2939
2916
  pauseAt?: PauseAt;
2940
- startDate?: Date;
2917
+ startDate?: Date | null;
2941
2918
  startCycle?: number | null;
2942
2919
  resumeAt?: ResumeAt;
2943
- resumeDate?: Date;
2920
+ resumeDate?: Date | null;
2944
2921
  resumeCycle?: number | null;
2945
2922
  }
2946
2923
  declare enum PausePolicy {
@@ -2974,7 +2951,7 @@ declare enum ResumeAt {
2974
2951
  }
2975
2952
  interface CancellationInfo {
2976
2953
  /** Subscription cancel date. Can contain a future or past date */
2977
- cancellationDate?: Date;
2954
+ cancellationDate?: Date | null;
2978
2955
  /** Initiator for cancellation */
2979
2956
  initiator?: HistoryActionInitiator;
2980
2957
  /** Reason for cancellation. Optional. */
@@ -3090,7 +3067,7 @@ interface ApplicationFeeValueOneOf {
3090
3067
  }
3091
3068
  interface SpecificDateSubscriptionUpdateData {
3092
3069
  updateData?: SubscriptionUpdateData;
3093
- executionDate?: Date;
3070
+ executionDate?: Date | null;
3094
3071
  }
3095
3072
  interface ListSubscriptionHistoryRequest {
3096
3073
  subscriptionId: string;
@@ -3127,7 +3104,7 @@ interface SubscriptionHistoryEntry {
3127
3104
  entryId?: string;
3128
3105
  /** TODO: add max length? it is not defined in domainevents, so should we? */
3129
3106
  slug?: string;
3130
- entryTime?: Date;
3107
+ entryTime?: Date | null;
3131
3108
  event?: SubscriptionEvent;
3132
3109
  }
3133
3110
  interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
@@ -3318,7 +3295,7 @@ interface SubscriptionRevived {
3318
3295
  }
3319
3296
  interface SubscriptionBillingDateUpdated {
3320
3297
  subscription?: Subscription;
3321
- billingDate?: Date;
3298
+ billingDate?: Date | null;
3322
3299
  proration?: Proration;
3323
3300
  }
3324
3301
  interface FutureUpdatesRequested {
@@ -3627,7 +3604,7 @@ interface SubscriptionCharge {
3627
3604
  /** cycle of future charge */
3628
3605
  cycle?: number;
3629
3606
  /** date of the charge */
3630
- billingDate?: Date;
3607
+ billingDate?: Date | null;
3631
3608
  /** breakdown of charge */
3632
3609
  totals?: Totals;
3633
3610
  /** List of items in the invoice */
@@ -3787,22 +3764,8 @@ interface LineItemTaxSummary {
3787
3764
  aggregatedTaxAmount?: string;
3788
3765
  /** Aggregated from tax_breakdowns */
3789
3766
  aggregatedTaxRate?: string;
3790
- /** Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`. */
3791
- aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3792
- }
3793
- interface AggregatedTaxBreakdown {
3794
- /** Name of the tax that was calculated. */
3795
- taxName?: string;
3796
- /** Type of tax that was calculated. */
3797
- taxType?: string;
3798
- /** Jurisdiction that taxes were calculated for. */
3799
- jurisdiction?: string;
3800
- /** Type of jurisdiction that taxes were calculated for. */
3801
- jurisdictionType?: string;
3802
- /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`. */
3803
- rate?: string;
3804
- /** Total amount of this tax for this jurisdiction. */
3805
- aggregatedTaxAmount?: string;
3767
+ /** Total taxable amount for this line item. */
3768
+ taxableAmount?: string;
3806
3769
  }
3807
3770
  interface TaxBreakdown {
3808
3771
  taxType?: string;
@@ -3855,7 +3818,7 @@ interface UpdateSubscriptionBillingDateRequest {
3855
3818
  /** ID of the subscription to update the billing date for. */
3856
3819
  _id: string;
3857
3820
  /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
3858
- billingDate: Date;
3821
+ billingDate: Date | null;
3859
3822
  /**
3860
3823
  * Information about how BASS adjusts the total of the next invoice. Extending
3861
3824
  * the current billing cycle results in a higher payment, while shortening it
@@ -3880,7 +3843,7 @@ interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
3880
3843
  * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
3881
3844
  * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
3882
3845
  */
3883
- specificDate?: Date;
3846
+ specificDate?: Date | null;
3884
3847
  /**
3885
3848
  * When the update becomes effective, as number of billing cycles from now.
3886
3849
  * The use of this field may be restricted in various BASS endpoints.
@@ -3900,7 +3863,7 @@ interface ScheduleAdditionalInfoParamOneOf {
3900
3863
  * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
3901
3864
  * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
3902
3865
  */
3903
- specificDate?: Date;
3866
+ specificDate?: Date | null;
3904
3867
  /**
3905
3868
  * When the update becomes effective, as number of billing cycles from now.
3906
3869
  * The use of this field may be restricted in various BASS endpoints.
@@ -4060,7 +4023,7 @@ interface ListUpcomingChargesRequest {
4060
4023
  * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
4061
4024
  * If not provided, the upcoming charges will be calculated according to the existing next billing date.
4062
4025
  */
4063
- nextBillingDate?: Date;
4026
+ nextBillingDate?: Date | null;
4064
4027
  }
4065
4028
  interface ListUpcomingChargesResponse {
4066
4029
  upcomingCharges?: SubscriptionCharge[];
@@ -4078,7 +4041,7 @@ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
4078
4041
  interface SubscriptionInfo {
4079
4042
  billingSettings?: BillingSettings;
4080
4043
  items?: Item[];
4081
- startDate?: Date;
4044
+ startDate?: Date | null;
4082
4045
  }
4083
4046
  interface PreviewSubscriptionChargesResponse {
4084
4047
  /** Charges for subscription. */
@@ -4093,7 +4056,7 @@ interface Charge {
4093
4056
  /** The breakdown of the charge */
4094
4057
  totals?: Totals;
4095
4058
  /** The billing date from which the charge starts */
4096
- cycleBillingDate?: Date;
4059
+ cycleBillingDate?: Date | null;
4097
4060
  }
4098
4061
  interface PayCycleRequest {
4099
4062
  subscriptionId: string;
@@ -4495,19 +4458,10 @@ interface PriceDetailsNonNullableFields {
4495
4458
  discount?: InvoiceDiscountNonNullableFields;
4496
4459
  applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
4497
4460
  }
4498
- interface AggregatedTaxBreakdownNonNullableFields {
4499
- taxName: string;
4500
- taxType: string;
4501
- jurisdiction: string;
4502
- jurisdictionType: string;
4503
- rate: string;
4504
- aggregatedTaxAmount: string;
4505
- aggregatedTaxableAmount: string;
4506
- }
4507
4461
  interface LineItemTaxSummaryNonNullableFields {
4508
4462
  aggregatedTaxAmount: string;
4509
4463
  aggregatedTaxRate: string;
4510
- aggregatedTaxBreakdowns: AggregatedTaxBreakdownNonNullableFields[];
4464
+ taxableAmount: string;
4511
4465
  }
4512
4466
  interface TaxBreakdownNonNullableFields {
4513
4467
  taxType: string;