lago-javascript-client 0.44.0-beta → 0.48.0-beta

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.
@@ -141,72 +141,6 @@ export interface ApiErrorNotFound {
141
141
  /** @example "object_not_found" */
142
142
  code: string;
143
143
  }
144
- export interface AppliedAddOn {
145
- applied_add_on: AppliedAddOnObject;
146
- }
147
- export interface AppliedAddOnInput {
148
- applied_add_on: {
149
- /**
150
- * The customer external unique identifier (provided by your own application)
151
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
152
- */
153
- external_customer_id: string;
154
- /**
155
- * Unique code used to identify the add-on.
156
- * @example "setup_fee"
157
- */
158
- add_on_code: string;
159
- /**
160
- * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
161
- * @example 50000
162
- */
163
- amount_cents?: number | null;
164
- /** The currency of the add-on. */
165
- amount_currency?: Currency;
166
- };
167
- }
168
- export interface AppliedAddOnObject {
169
- /**
170
- * Unique identifier of the applied add-on created by Lago.
171
- * @format uuid
172
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
173
- */
174
- lago_id: string;
175
- /**
176
- * Unique identifier of the add-on created by Lago.
177
- * @format uuid
178
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
179
- */
180
- lago_add_on_id: string;
181
- /**
182
- * Unique code used to identify the add-on.
183
- * @example "setup_fee"
184
- */
185
- add_on_code: string;
186
- /**
187
- * Unique identifier of the customer created by Lago.
188
- * @format uuid
189
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
190
- */
191
- lago_customer_id: string;
192
- /**
193
- * The customer external unique identifier (provided by your own application)
194
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
195
- */
196
- external_customer_id: string;
197
- /**
198
- * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
199
- * @example 50000
200
- */
201
- amount_cents: number;
202
- /** The currency of the add-on. */
203
- amount_currency: Currency;
204
- /**
205
- * @format date-time
206
- * @example "2022-09-14T16:35:31Z"
207
- */
208
- created_at: string;
209
- }
210
144
  export interface AppliedCoupon {
211
145
  applied_coupon: AppliedCouponObject;
212
146
  }
@@ -245,7 +179,7 @@ export interface AppliedCouponInput {
245
179
  amount_currency?: Currency;
246
180
  /**
247
181
  * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
248
- * @format ^[0-9]+.?[0-9]*$
182
+ * @pattern ^[0-9]+.?[0-9]*$
249
183
  * @example null
250
184
  */
251
185
  percentage_rate?: string | null;
@@ -304,7 +238,7 @@ export interface AppliedCouponObject {
304
238
  amount_currency?: Currency;
305
239
  /**
306
240
  * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
307
- * @format ^[0-9]+.?[0-9]*$
241
+ * @pattern ^[0-9]+.?[0-9]*$
308
242
  * @example null
309
243
  */
310
244
  percentage_rate?: string | null;
@@ -449,7 +383,12 @@ export interface BillableMetricObject {
449
383
  * Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
450
384
  * @example "sum_agg"
451
385
  */
452
- aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg";
386
+ aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg";
387
+ /**
388
+ * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
389
+ * @example "seconds"
390
+ */
391
+ weighted_interval?: "seconds" | null;
453
392
  /** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
454
393
  group?: BillableMetricGroup;
455
394
  /**
@@ -502,7 +441,12 @@ export interface BillableMetricBaseInput {
502
441
  * Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
503
442
  * @example "sum_agg"
504
443
  */
505
- aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg";
444
+ aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg";
445
+ /**
446
+ * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
447
+ * @example "seconds"
448
+ */
449
+ weighted_interval?: "seconds" | null;
506
450
  /** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
507
451
  group?: BillableMetricGroup;
508
452
  }
@@ -564,8 +508,8 @@ export interface ChargeObject {
564
508
  * @example "2022-09-14T16:35:31Z"
565
509
  */
566
510
  created_at: string;
567
- /** Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `package`, `percentage` or `volume`. */
568
- charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
511
+ /** Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage` or `volume`. */
512
+ charge_model: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume";
569
513
  /**
570
514
  * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period.
571
515
  * @example true
@@ -614,21 +558,48 @@ export interface ChargeProperties {
614
558
  to_value: number | null;
615
559
  /**
616
560
  * The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.
617
- * @format ^[0-9]+.?[0-9]*$
561
+ * @pattern ^[0-9]+.?[0-9]*$
618
562
  * @example "10"
619
563
  */
620
564
  flat_amount: string;
621
565
  /**
622
566
  * The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.
623
- * @format ^[0-9]+.?[0-9]*$
567
+ * @pattern ^[0-9]+.?[0-9]*$
624
568
  * @example "0.5"
625
569
  */
626
570
  per_unit_amount: string;
627
571
  }[];
572
+ /** Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model. */
573
+ graduated_percentage_ranges?: {
574
+ /**
575
+ * Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
576
+ * @example 0
577
+ */
578
+ from_value: number;
579
+ /**
580
+ * Specifies the highest value of a tier for a `graduated_percentage` charge model.
581
+ * - This value must be higher than the from_value of the same tier.
582
+ * - This value must be null for the last tier.
583
+ * @example 10
584
+ */
585
+ to_value: number | null;
586
+ /**
587
+ * The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.
588
+ * @format ^[0-9]+.?[0-9]*$
589
+ * @example "1"
590
+ */
591
+ rate: string;
592
+ /**
593
+ * The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.
594
+ * @format ^[0-9]+.?[0-9]*$
595
+ * @example "10"
596
+ */
597
+ flat_amount: string;
598
+ }[];
628
599
  /**
629
600
  * - The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.
630
601
  * - The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.
631
- * @format ^[0-9]+.?[0-9]*$
602
+ * @pattern ^[0-9]+.?[0-9]*$
632
603
  * @example "30"
633
604
  */
634
605
  amount?: string;
@@ -644,13 +615,13 @@ export interface ChargeProperties {
644
615
  package_size?: number;
645
616
  /**
646
617
  * The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.
647
- * @format ^[0-9]+.?[0-9]*$
618
+ * @pattern ^[0-9]+.?[0-9]*$
648
619
  * @example "1"
649
620
  */
650
621
  rate?: string;
651
622
  /**
652
623
  * The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.
653
- * @format ^[0-9]+.?[0-9]*$
624
+ * @pattern ^[0-9]+.?[0-9]*$
654
625
  * @example "0.5"
655
626
  */
656
627
  fixed_amount?: string;
@@ -661,10 +632,22 @@ export interface ChargeProperties {
661
632
  free_units_per_events?: number | null;
662
633
  /**
663
634
  * The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.
664
- * @format ^[0-9]+.?[0-9]*$
635
+ * @pattern ^[0-9]+.?[0-9]*$
665
636
  * @example "500"
666
637
  */
667
638
  free_units_per_total_aggregation?: string | null;
639
+ /**
640
+ * Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.
641
+ * @format ^[0-9]+.?[0-9]*$
642
+ * @example "3.75"
643
+ */
644
+ per_transaction_max_amount?: string | null;
645
+ /**
646
+ * Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.
647
+ * @format ^[0-9]+.?[0-9]*$
648
+ * @example "1.75"
649
+ */
650
+ per_transaction_min_amount?: string | null;
668
651
  /** Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model. */
669
652
  volume_ranges?: {
670
653
  /**
@@ -681,270 +664,20 @@ export interface ChargeProperties {
681
664
  to_value: number | null;
682
665
  /**
683
666
  * The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.
684
- * @format ^[0-9]+.?[0-9]*$
667
+ * @pattern ^[0-9]+.?[0-9]*$
685
668
  * @example "10"
686
669
  */
687
670
  flat_amount: string;
688
671
  /**
689
672
  * The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.
690
- * @format ^[0-9]+.?[0-9]*$
673
+ * @pattern ^[0-9]+.?[0-9]*$
691
674
  * @example "0.5"
692
675
  */
693
676
  per_unit_amount: string;
694
677
  }[];
695
678
  }
696
679
  /** @example "US" */
697
- export declare enum Country {
698
- AD = "AD",
699
- AE = "AE",
700
- AF = "AF",
701
- AG = "AG",
702
- AI = "AI",
703
- AL = "AL",
704
- AM = "AM",
705
- AO = "AO",
706
- AQ = "AQ",
707
- AR = "AR",
708
- AS = "AS",
709
- AT = "AT",
710
- AU = "AU",
711
- AW = "AW",
712
- AX = "AX",
713
- AZ = "AZ",
714
- BA = "BA",
715
- BB = "BB",
716
- BD = "BD",
717
- BE = "BE",
718
- BF = "BF",
719
- BG = "BG",
720
- BH = "BH",
721
- BI = "BI",
722
- BJ = "BJ",
723
- BL = "BL",
724
- BM = "BM",
725
- BN = "BN",
726
- BO = "BO",
727
- BQ = "BQ",
728
- BR = "BR",
729
- BS = "BS",
730
- BT = "BT",
731
- BV = "BV",
732
- BW = "BW",
733
- BY = "BY",
734
- BZ = "BZ",
735
- CA = "CA",
736
- CC = "CC",
737
- CD = "CD",
738
- CF = "CF",
739
- CG = "CG",
740
- CH = "CH",
741
- CI = "CI",
742
- CK = "CK",
743
- CL = "CL",
744
- CM = "CM",
745
- CN = "CN",
746
- CO = "CO",
747
- CR = "CR",
748
- CU = "CU",
749
- CV = "CV",
750
- CW = "CW",
751
- CX = "CX",
752
- CY = "CY",
753
- CZ = "CZ",
754
- DE = "DE",
755
- DJ = "DJ",
756
- DK = "DK",
757
- DM = "DM",
758
- DO = "DO",
759
- DZ = "DZ",
760
- EC = "EC",
761
- EE = "EE",
762
- EG = "EG",
763
- EH = "EH",
764
- ER = "ER",
765
- ES = "ES",
766
- ET = "ET",
767
- FI = "FI",
768
- FJ = "FJ",
769
- FK = "FK",
770
- FM = "FM",
771
- FO = "FO",
772
- FR = "FR",
773
- GA = "GA",
774
- GB = "GB",
775
- GD = "GD",
776
- GE = "GE",
777
- GF = "GF",
778
- GG = "GG",
779
- GH = "GH",
780
- GI = "GI",
781
- GL = "GL",
782
- GM = "GM",
783
- GN = "GN",
784
- GP = "GP",
785
- GQ = "GQ",
786
- GR = "GR",
787
- GS = "GS",
788
- GT = "GT",
789
- GU = "GU",
790
- GW = "GW",
791
- GY = "GY",
792
- HK = "HK",
793
- HM = "HM",
794
- HN = "HN",
795
- HR = "HR",
796
- HT = "HT",
797
- HU = "HU",
798
- ID = "ID",
799
- IE = "IE",
800
- IL = "IL",
801
- IM = "IM",
802
- IN = "IN",
803
- IO = "IO",
804
- IQ = "IQ",
805
- IR = "IR",
806
- IS = "IS",
807
- IT = "IT",
808
- JE = "JE",
809
- JM = "JM",
810
- JO = "JO",
811
- JP = "JP",
812
- KE = "KE",
813
- KG = "KG",
814
- KH = "KH",
815
- KI = "KI",
816
- KM = "KM",
817
- KN = "KN",
818
- KP = "KP",
819
- KR = "KR",
820
- KW = "KW",
821
- KY = "KY",
822
- KZ = "KZ",
823
- LA = "LA",
824
- LB = "LB",
825
- LC = "LC",
826
- LI = "LI",
827
- LK = "LK",
828
- LR = "LR",
829
- LS = "LS",
830
- LT = "LT",
831
- LU = "LU",
832
- LV = "LV",
833
- LY = "LY",
834
- MA = "MA",
835
- MC = "MC",
836
- MD = "MD",
837
- ME = "ME",
838
- MF = "MF",
839
- MG = "MG",
840
- MH = "MH",
841
- MK = "MK",
842
- ML = "ML",
843
- MM = "MM",
844
- MN = "MN",
845
- MO = "MO",
846
- MP = "MP",
847
- MQ = "MQ",
848
- MR = "MR",
849
- MS = "MS",
850
- MT = "MT",
851
- MU = "MU",
852
- MV = "MV",
853
- MW = "MW",
854
- MX = "MX",
855
- MY = "MY",
856
- MZ = "MZ",
857
- NA = "NA",
858
- NC = "NC",
859
- NE = "NE",
860
- NF = "NF",
861
- NG = "NG",
862
- NI = "NI",
863
- NL = "NL",
864
- NO = "NO",
865
- NP = "NP",
866
- NR = "NR",
867
- NU = "NU",
868
- NZ = "NZ",
869
- OM = "OM",
870
- PA = "PA",
871
- PE = "PE",
872
- PF = "PF",
873
- PG = "PG",
874
- PH = "PH",
875
- PK = "PK",
876
- PL = "PL",
877
- PM = "PM",
878
- PN = "PN",
879
- PR = "PR",
880
- PS = "PS",
881
- PT = "PT",
882
- PW = "PW",
883
- PY = "PY",
884
- QA = "QA",
885
- RE = "RE",
886
- RO = "RO",
887
- RS = "RS",
888
- RU = "RU",
889
- RW = "RW",
890
- SA = "SA",
891
- SB = "SB",
892
- SC = "SC",
893
- SD = "SD",
894
- SE = "SE",
895
- SG = "SG",
896
- SH = "SH",
897
- SI = "SI",
898
- SJ = "SJ",
899
- SK = "SK",
900
- SL = "SL",
901
- SM = "SM",
902
- SN = "SN",
903
- SO = "SO",
904
- SR = "SR",
905
- SS = "SS",
906
- ST = "ST",
907
- SV = "SV",
908
- SX = "SX",
909
- SY = "SY",
910
- SZ = "SZ",
911
- TC = "TC",
912
- TD = "TD",
913
- TF = "TF",
914
- TG = "TG",
915
- TH = "TH",
916
- TJ = "TJ",
917
- TK = "TK",
918
- TL = "TL",
919
- TM = "TM",
920
- TN = "TN",
921
- TO = "TO",
922
- TR = "TR",
923
- TT = "TT",
924
- TV = "TV",
925
- TW = "TW",
926
- TZ = "TZ",
927
- UA = "UA",
928
- UG = "UG",
929
- UM = "UM",
930
- US = "US",
931
- UY = "UY",
932
- UZ = "UZ",
933
- VA = "VA",
934
- VC = "VC",
935
- VE = "VE",
936
- VG = "VG",
937
- VI = "VI",
938
- VN = "VN",
939
- VU = "VU",
940
- WF = "WF",
941
- WS = "WS",
942
- YE = "YE",
943
- YT = "YT",
944
- ZA = "ZA",
945
- ZM = "ZM",
946
- ZW = "ZW"
947
- }
680
+ export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
948
681
  export interface Coupon {
949
682
  coupon: CouponObject;
950
683
  }
@@ -986,7 +719,7 @@ export interface CouponBaseInput {
986
719
  reusable?: boolean;
987
720
  /**
988
721
  * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
989
- * @format ^[0-9]+.?[0-9]*$
722
+ * @pattern ^[0-9]+.?[0-9]*$
990
723
  * @example null
991
724
  */
992
725
  percentage_rate?: string | null;
@@ -1099,7 +832,7 @@ export interface CouponObject {
1099
832
  billable_metric_codes?: string[];
1100
833
  /**
1101
834
  * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
1102
- * @format ^[0-9]+.?[0-9]*$
835
+ * @pattern ^[0-9]+.?[0-9]*$
1103
836
  * @example null
1104
837
  */
1105
838
  percentage_rate?: string | null;
@@ -1137,6 +870,12 @@ export interface CouponObject {
1137
870
  * @example "2022-04-29T08:59:51Z"
1138
871
  */
1139
872
  created_at: string;
873
+ /**
874
+ * This field indicates if the coupon has been terminated and is no longer usable. If it's not null, it won't be removed for existing customers using it, but it prevents the coupon from being applied in the future.
875
+ * @format date-time
876
+ * @example "2022-08-08T23:59:59Z"
877
+ */
878
+ terminated_at?: string;
1140
879
  }
1141
880
  export interface CouponsPaginated {
1142
881
  coupons: CouponObject[];
@@ -1171,7 +910,7 @@ export interface CreditObject {
1171
910
  * @format uuid
1172
911
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1173
912
  */
1174
- lago_id: string;
913
+ lago_item_id: string;
1175
914
  /**
1176
915
  * The type of credit applied. Possible values are `coupon` or `credit_note`.
1177
916
  * @example "coupon"
@@ -1419,145 +1158,7 @@ export interface CreditNoteUpdateInput {
1419
1158
  };
1420
1159
  }
1421
1160
  /** @example "USD" */
1422
- export declare enum Currency {
1423
- AED = "AED",
1424
- AFN = "AFN",
1425
- ALL = "ALL",
1426
- AMD = "AMD",
1427
- ANG = "ANG",
1428
- AOA = "AOA",
1429
- ARS = "ARS",
1430
- AUD = "AUD",
1431
- AWG = "AWG",
1432
- AZN = "AZN",
1433
- BAM = "BAM",
1434
- BBD = "BBD",
1435
- BDT = "BDT",
1436
- BGN = "BGN",
1437
- BIF = "BIF",
1438
- BMD = "BMD",
1439
- BND = "BND",
1440
- BOB = "BOB",
1441
- BRL = "BRL",
1442
- BSD = "BSD",
1443
- BWP = "BWP",
1444
- BYN = "BYN",
1445
- BZD = "BZD",
1446
- CAD = "CAD",
1447
- CDF = "CDF",
1448
- CHF = "CHF",
1449
- CLF = "CLF",
1450
- CLP = "CLP",
1451
- CNY = "CNY",
1452
- COP = "COP",
1453
- CRC = "CRC",
1454
- CVE = "CVE",
1455
- CZK = "CZK",
1456
- DJF = "DJF",
1457
- DKK = "DKK",
1458
- DOP = "DOP",
1459
- DZD = "DZD",
1460
- EGP = "EGP",
1461
- ETB = "ETB",
1462
- EUR = "EUR",
1463
- FJD = "FJD",
1464
- FKP = "FKP",
1465
- GBP = "GBP",
1466
- GEL = "GEL",
1467
- GIP = "GIP",
1468
- GMD = "GMD",
1469
- GNF = "GNF",
1470
- GTQ = "GTQ",
1471
- GYD = "GYD",
1472
- HKD = "HKD",
1473
- HNL = "HNL",
1474
- HRK = "HRK",
1475
- HTG = "HTG",
1476
- HUF = "HUF",
1477
- IDR = "IDR",
1478
- ILS = "ILS",
1479
- INR = "INR",
1480
- ISK = "ISK",
1481
- JMD = "JMD",
1482
- JPY = "JPY",
1483
- KES = "KES",
1484
- KGS = "KGS",
1485
- KHR = "KHR",
1486
- KMF = "KMF",
1487
- KRW = "KRW",
1488
- KYD = "KYD",
1489
- KZT = "KZT",
1490
- LAK = "LAK",
1491
- LBP = "LBP",
1492
- LKR = "LKR",
1493
- LRD = "LRD",
1494
- LSL = "LSL",
1495
- MAD = "MAD",
1496
- MDL = "MDL",
1497
- MGA = "MGA",
1498
- MKD = "MKD",
1499
- MMK = "MMK",
1500
- MNT = "MNT",
1501
- MOP = "MOP",
1502
- MRO = "MRO",
1503
- MUR = "MUR",
1504
- MVR = "MVR",
1505
- MWK = "MWK",
1506
- MXN = "MXN",
1507
- MYR = "MYR",
1508
- MZN = "MZN",
1509
- NAD = "NAD",
1510
- NGN = "NGN",
1511
- NIO = "NIO",
1512
- NOK = "NOK",
1513
- NPR = "NPR",
1514
- NZD = "NZD",
1515
- PAB = "PAB",
1516
- PEN = "PEN",
1517
- PGK = "PGK",
1518
- PHP = "PHP",
1519
- PKR = "PKR",
1520
- PLN = "PLN",
1521
- PYG = "PYG",
1522
- QAR = "QAR",
1523
- RON = "RON",
1524
- RSD = "RSD",
1525
- RUB = "RUB",
1526
- RWF = "RWF",
1527
- SAR = "SAR",
1528
- SBD = "SBD",
1529
- SCR = "SCR",
1530
- SEK = "SEK",
1531
- SGD = "SGD",
1532
- SHP = "SHP",
1533
- SLL = "SLL",
1534
- SOS = "SOS",
1535
- SRD = "SRD",
1536
- STD = "STD",
1537
- SZL = "SZL",
1538
- THB = "THB",
1539
- TJS = "TJS",
1540
- TOP = "TOP",
1541
- TRY = "TRY",
1542
- TTD = "TTD",
1543
- TWD = "TWD",
1544
- TZS = "TZS",
1545
- UAH = "UAH",
1546
- UGX = "UGX",
1547
- USD = "USD",
1548
- UYU = "UYU",
1549
- UZS = "UZS",
1550
- VND = "VND",
1551
- VUV = "VUV",
1552
- WST = "WST",
1553
- XAF = "XAF",
1554
- XCD = "XCD",
1555
- XOF = "XOF",
1556
- XPF = "XPF",
1557
- YER = "YER",
1558
- ZAR = "ZAR",
1559
- ZMW = "ZMW"
1560
- }
1161
+ export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
1561
1162
  export interface Customer {
1562
1163
  customer: CustomerObjectExtended;
1563
1164
  }
@@ -1603,7 +1204,7 @@ export interface CustomerBillingConfiguration {
1603
1204
  export interface CustomerChargeUsageObject {
1604
1205
  /**
1605
1206
  * The number of units consumed by the customer for a specific charge item.
1606
- * @format ^[0-9]+.?[0-9]*$
1207
+ * @pattern ^[0-9]+.?[0-9]*$
1607
1208
  * @example "1.0"
1608
1209
  */
1609
1210
  units: string;
@@ -1672,7 +1273,7 @@ export interface CustomerChargeUsageObject {
1672
1273
  value?: string;
1673
1274
  /**
1674
1275
  * The number of units consumed for a specific group related to a charge item.
1675
- * @format ^[0-9]+.?[0-9]*$
1276
+ * @pattern ^[0-9]+.?[0-9]*$
1676
1277
  * @example "0.9"
1677
1278
  */
1678
1279
  units?: string;
@@ -2083,19 +1684,17 @@ export interface EventInput {
2083
1684
  */
2084
1685
  code: string;
2085
1686
  /**
2086
- * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
2087
- * @example 1651240791
1687
+ * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
1688
+ * If this timestamp is not provided, the API will automatically set it to the time of event reception.
1689
+ * You can also provide miliseconds precision by appending decimals to the timestamp.
1690
+ * @example "1651240791.123"
2088
1691
  */
2089
- timestamp?: number;
1692
+ timestamp?: number | string;
2090
1693
  /**
2091
1694
  * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
2092
1695
  * @example {"gb":10}
2093
1696
  */
2094
- properties?: {
2095
- /** The `operation_type` field is only necessary when adding or removing a specific unit when the targeted billable metric adopts a `unique_count_agg` aggregation method. In other cases, the `operation_type` field is not required. The valid values for the `operation_type` field are `add` or `remove`, which indicate whether the unit is being added or removed from the unique count aggregation, respectively. */
2096
- operation_type?: "add" | "remove";
2097
- [key: string]: any;
2098
- };
1697
+ properties?: Record<string, string>;
2099
1698
  };
2100
1699
  }
2101
1700
  export interface EventObject {
@@ -2129,7 +1728,7 @@ export interface EventObject {
2129
1728
  /**
2130
1729
  * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
2131
1730
  * @format date-time
2132
- * @example "2022-04-29T08:59:51Z"
1731
+ * @example "2022-04-29T08:59:51.123Z"
2133
1732
  */
2134
1733
  timestamp: string;
2135
1734
  /**
@@ -2576,7 +2175,7 @@ export interface InvoiceOneOffCreateInput {
2576
2175
  unit_amount_cents?: number | null;
2577
2176
  /**
2578
2177
  * The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
2579
- * @format ^[0-9]+.?[0-9]*$
2178
+ * @pattern ^[0-9]+.?[0-9]*$
2580
2179
  * @example "2.5"
2581
2180
  */
2582
2181
  units?: string | null;
@@ -2847,10 +2446,10 @@ export interface PlanCreateInput {
2847
2446
  */
2848
2447
  code?: string;
2849
2448
  /**
2850
- * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `monthly`, or `weekly`.
2449
+ * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly`, or `weekly`.
2851
2450
  * @example "monthly"
2852
2451
  */
2853
- interval?: "weekly" | "monthly" | "yearly";
2452
+ interval?: "weekly" | "monthly" | "quarterly" | "yearly";
2854
2453
  /**
2855
2454
  * The description on the plan.
2856
2455
  * @example "Plan for early stage startups."
@@ -2895,10 +2494,10 @@ export interface PlanCreateInput {
2895
2494
  */
2896
2495
  billable_metric_id?: string;
2897
2496
  /**
2898
- * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `package`, `percentage` or `volume`.
2497
+ * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage` `package`, `percentage` or `volume`.
2899
2498
  * @example "standard"
2900
2499
  */
2901
- charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
2500
+ charge_model?: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume";
2902
2501
  /**
2903
2502
  * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
2904
2503
  * @example false
@@ -2956,10 +2555,10 @@ export interface PlanUpdateInput {
2956
2555
  */
2957
2556
  code?: string;
2958
2557
  /**
2959
- * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `monthly`, or `weekly`.
2558
+ * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly`, or `weekly`.
2960
2559
  * @example "monthly"
2961
2560
  */
2962
- interval?: "weekly" | "monthly" | "yearly";
2561
+ interval?: "weekly" | "monthly" | "quarterly" | "yearly";
2963
2562
  /**
2964
2563
  * The description on the plan.
2965
2564
  * @example "Plan for early stage startups."
@@ -3010,10 +2609,10 @@ export interface PlanUpdateInput {
3010
2609
  */
3011
2610
  billable_metric_id?: string;
3012
2611
  /**
3013
- * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `package`, `percentage` or `volume`.
2612
+ * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage` or `volume`.
3014
2613
  * @example "standard"
3015
2614
  */
3016
- charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
2615
+ charge_model?: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume";
3017
2616
  /**
3018
2617
  * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
3019
2618
  * @example false
@@ -3082,10 +2681,10 @@ export interface PlanObject {
3082
2681
  */
3083
2682
  code: string;
3084
2683
  /**
3085
- * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `monthly` or `weekly`.
2684
+ * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly` or `weekly`.
3086
2685
  * @example "monthly"
3087
2686
  */
3088
- interval: "weekly" | "monthly" | "yearly";
2687
+ interval: "weekly" | "monthly" | "quarterly" | "yearly";
3089
2688
  /**
3090
2689
  * The description on the plan.
3091
2690
  * @example ""
@@ -3165,6 +2764,12 @@ export interface SubscriptionCreateInput {
3165
2764
  * @example "anniversary"
3166
2765
  */
3167
2766
  billing_time?: "calendar" | "anniversary";
2767
+ /**
2768
+ * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
2769
+ * @format date-time
2770
+ * @example "2022-10-08T00:00:00Z"
2771
+ */
2772
+ ending_at?: string;
3168
2773
  /**
3169
2774
  * The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3170
2775
  * @format date-time
@@ -3180,6 +2785,12 @@ export interface SubscriptionUpdateInput {
3180
2785
  * @example "Repository B"
3181
2786
  */
3182
2787
  name?: string | null;
2788
+ /**
2789
+ * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
2790
+ * @format date-time
2791
+ * @example "2022-10-08T00:00:00Z"
2792
+ */
2793
+ ending_at?: string;
3183
2794
  /**
3184
2795
  * The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3185
2796
  * @format date-time
@@ -3253,6 +2864,12 @@ export interface SubscriptionObject {
3253
2864
  * @example "2022-08-08T00:00:00Z"
3254
2865
  */
3255
2866
  started_at?: string | null;
2867
+ /**
2868
+ * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
2869
+ * @format date-time
2870
+ * @example "2022-10-08T00:00:00Z"
2871
+ */
2872
+ ending_at?: string;
3256
2873
  /**
3257
2874
  * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3258
2875
  * @format date-time
@@ -3302,7 +2919,7 @@ export interface TaxBaseInput {
3302
2919
  code?: string;
3303
2920
  /**
3304
2921
  * The percentage rate of the tax
3305
- * @format ^[0-9]+.?[0-9]*$
2922
+ * @pattern ^[0-9]+.?[0-9]*$
3306
2923
  * @example "20.0"
3307
2924
  */
3308
2925
  rate?: string;
@@ -3387,143 +3004,7 @@ export interface TaxUpdateInput {
3387
3004
  tax: TaxBaseInput;
3388
3005
  }
3389
3006
  /** @example "America/Los_Angeles" */
3390
- export declare enum Timezone {
3391
- UTC = "UTC",
3392
- AfricaAlgiers = "Africa/Algiers",
3393
- AfricaCairo = "Africa/Cairo",
3394
- AfricaCasablanca = "Africa/Casablanca",
3395
- AfricaHarare = "Africa/Harare",
3396
- AfricaJohannesburg = "Africa/Johannesburg",
3397
- AfricaMonrovia = "Africa/Monrovia",
3398
- AfricaNairobi = "Africa/Nairobi",
3399
- AmericaArgentinaBuenosAires = "America/Argentina/Buenos_Aires",
3400
- AmericaBogota = "America/Bogota",
3401
- AmericaCaracas = "America/Caracas",
3402
- AmericaChicago = "America/Chicago",
3403
- AmericaChihuahua = "America/Chihuahua",
3404
- AmericaDenver = "America/Denver",
3405
- AmericaGodthab = "America/Godthab",
3406
- AmericaGuatemala = "America/Guatemala",
3407
- AmericaGuyana = "America/Guyana",
3408
- AmericaHalifax = "America/Halifax",
3409
- AmericaIndianaIndianapolis = "America/Indiana/Indianapolis",
3410
- AmericaJuneau = "America/Juneau",
3411
- AmericaLaPaz = "America/La_Paz",
3412
- AmericaLima = "America/Lima",
3413
- AmericaLosAngeles = "America/Los_Angeles",
3414
- AmericaMazatlan = "America/Mazatlan",
3415
- AmericaMexicoCity = "America/Mexico_City",
3416
- AmericaMonterrey = "America/Monterrey",
3417
- AmericaMontevideo = "America/Montevideo",
3418
- AmericaNewYork = "America/New_York",
3419
- AmericaPhoenix = "America/Phoenix",
3420
- AmericaPuertoRico = "America/Puerto_Rico",
3421
- AmericaRegina = "America/Regina",
3422
- AmericaSantiago = "America/Santiago",
3423
- AmericaSaoPaulo = "America/Sao_Paulo",
3424
- AmericaStJohns = "America/St_Johns",
3425
- AmericaTijuana = "America/Tijuana",
3426
- AsiaAlmaty = "Asia/Almaty",
3427
- AsiaBaghdad = "Asia/Baghdad",
3428
- AsiaBaku = "Asia/Baku",
3429
- AsiaBangkok = "Asia/Bangkok",
3430
- AsiaChongqing = "Asia/Chongqing",
3431
- AsiaColombo = "Asia/Colombo",
3432
- AsiaDhaka = "Asia/Dhaka",
3433
- AsiaHongKong = "Asia/Hong_Kong",
3434
- AsiaIrkutsk = "Asia/Irkutsk",
3435
- AsiaJakarta = "Asia/Jakarta",
3436
- AsiaJerusalem = "Asia/Jerusalem",
3437
- AsiaKabul = "Asia/Kabul",
3438
- AsiaKamchatka = "Asia/Kamchatka",
3439
- AsiaKarachi = "Asia/Karachi",
3440
- AsiaKathmandu = "Asia/Kathmandu",
3441
- AsiaKolkata = "Asia/Kolkata",
3442
- AsiaKrasnoyarsk = "Asia/Krasnoyarsk",
3443
- AsiaKualaLumpur = "Asia/Kuala_Lumpur",
3444
- AsiaKuwait = "Asia/Kuwait",
3445
- AsiaMagadan = "Asia/Magadan",
3446
- AsiaMuscat = "Asia/Muscat",
3447
- AsiaNovosibirsk = "Asia/Novosibirsk",
3448
- AsiaRangoon = "Asia/Rangoon",
3449
- AsiaRiyadh = "Asia/Riyadh",
3450
- AsiaSeoul = "Asia/Seoul",
3451
- AsiaShanghai = "Asia/Shanghai",
3452
- AsiaSingapore = "Asia/Singapore",
3453
- AsiaSrednekolymsk = "Asia/Srednekolymsk",
3454
- AsiaTaipei = "Asia/Taipei",
3455
- AsiaTashkent = "Asia/Tashkent",
3456
- AsiaTbilisi = "Asia/Tbilisi",
3457
- AsiaTehran = "Asia/Tehran",
3458
- AsiaTokyo = "Asia/Tokyo",
3459
- AsiaUlaanbaatar = "Asia/Ulaanbaatar",
3460
- AsiaUrumqi = "Asia/Urumqi",
3461
- AsiaVladivostok = "Asia/Vladivostok",
3462
- AsiaYakutsk = "Asia/Yakutsk",
3463
- AsiaYekaterinburg = "Asia/Yekaterinburg",
3464
- AsiaYerevan = "Asia/Yerevan",
3465
- AtlanticAzores = "Atlantic/Azores",
3466
- AtlanticCapeVerde = "Atlantic/Cape_Verde",
3467
- AtlanticSouthGeorgia = "Atlantic/South_Georgia",
3468
- AustraliaAdelaide = "Australia/Adelaide",
3469
- AustraliaBrisbane = "Australia/Brisbane",
3470
- AustraliaDarwin = "Australia/Darwin",
3471
- AustraliaHobart = "Australia/Hobart",
3472
- AustraliaMelbourne = "Australia/Melbourne",
3473
- AustraliaPerth = "Australia/Perth",
3474
- AustraliaSydney = "Australia/Sydney",
3475
- EuropeAmsterdam = "Europe/Amsterdam",
3476
- EuropeAthens = "Europe/Athens",
3477
- EuropeBelgrade = "Europe/Belgrade",
3478
- EuropeBerlin = "Europe/Berlin",
3479
- EuropeBratislava = "Europe/Bratislava",
3480
- EuropeBrussels = "Europe/Brussels",
3481
- EuropeBucharest = "Europe/Bucharest",
3482
- EuropeBudapest = "Europe/Budapest",
3483
- EuropeCopenhagen = "Europe/Copenhagen",
3484
- EuropeDublin = "Europe/Dublin",
3485
- EuropeHelsinki = "Europe/Helsinki",
3486
- EuropeIstanbul = "Europe/Istanbul",
3487
- EuropeKaliningrad = "Europe/Kaliningrad",
3488
- EuropeKiev = "Europe/Kiev",
3489
- EuropeLisbon = "Europe/Lisbon",
3490
- EuropeLjubljana = "Europe/Ljubljana",
3491
- EuropeLondon = "Europe/London",
3492
- EuropeMadrid = "Europe/Madrid",
3493
- EuropeMinsk = "Europe/Minsk",
3494
- EuropeMoscow = "Europe/Moscow",
3495
- EuropeParis = "Europe/Paris",
3496
- EuropePrague = "Europe/Prague",
3497
- EuropeRiga = "Europe/Riga",
3498
- EuropeRome = "Europe/Rome",
3499
- EuropeSamara = "Europe/Samara",
3500
- EuropeSarajevo = "Europe/Sarajevo",
3501
- EuropeSkopje = "Europe/Skopje",
3502
- EuropeSofia = "Europe/Sofia",
3503
- EuropeStockholm = "Europe/Stockholm",
3504
- EuropeTallinn = "Europe/Tallinn",
3505
- EuropeVienna = "Europe/Vienna",
3506
- EuropeVilnius = "Europe/Vilnius",
3507
- EuropeVolgograd = "Europe/Volgograd",
3508
- EuropeWarsaw = "Europe/Warsaw",
3509
- EuropeZagreb = "Europe/Zagreb",
3510
- EuropeZurich = "Europe/Zurich",
3511
- GMT12 = "GMT+12",
3512
- PacificApia = "Pacific/Apia",
3513
- PacificAuckland = "Pacific/Auckland",
3514
- PacificChatham = "Pacific/Chatham",
3515
- PacificFakaofo = "Pacific/Fakaofo",
3516
- PacificFiji = "Pacific/Fiji",
3517
- PacificGuadalcanal = "Pacific/Guadalcanal",
3518
- PacificGuam = "Pacific/Guam",
3519
- PacificHonolulu = "Pacific/Honolulu",
3520
- PacificMajuro = "Pacific/Majuro",
3521
- PacificMidway = "Pacific/Midway",
3522
- PacificNoumea = "Pacific/Noumea",
3523
- PacificPagoPago = "Pacific/Pago_Pago",
3524
- PacificPortMoresby = "Pacific/Port_Moresby",
3525
- PacificTongatapu = "Pacific/Tongatapu"
3526
- }
3007
+ export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Godthab" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
3527
3008
  export interface Wallet {
3528
3009
  wallet: WalletObject;
3529
3010
  }
@@ -3536,7 +3017,7 @@ export interface WalletCreateInput {
3536
3017
  name?: string;
3537
3018
  /**
3538
3019
  * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
3539
- * @format ^[0-9]+.?[0-9]*$
3020
+ * @pattern ^[0-9]+.?[0-9]*$
3540
3021
  * @example "1.5"
3541
3022
  */
3542
3023
  rate_amount: string;
@@ -3544,13 +3025,13 @@ export interface WalletCreateInput {
3544
3025
  currency: Currency;
3545
3026
  /**
3546
3027
  * The number of paid credits. Required only if there is no granted credits.
3547
- * @format ^[0-9]+.?[0-9]*$
3028
+ * @pattern ^[0-9]+.?[0-9]*$
3548
3029
  * @example "20.0"
3549
3030
  */
3550
3031
  paid_credits?: string | null;
3551
3032
  /**
3552
3033
  * The number of free granted credits. Required only if there is no paid credits.
3553
- * @format ^[0-9]+.?[0-9]*$
3034
+ * @pattern ^[0-9]+.?[0-9]*$
3554
3035
  * @example "10.0"
3555
3036
  */
3556
3037
  granted_credits?: string | null;
@@ -3599,13 +3080,13 @@ export interface WalletObject {
3599
3080
  name?: string;
3600
3081
  /**
3601
3082
  * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
3602
- * @format ^[0-9]+.?[0-9]*$
3083
+ * @pattern ^[0-9]+.?[0-9]*$
3603
3084
  * @example "1.5"
3604
3085
  */
3605
3086
  rate_amount: string;
3606
3087
  /**
3607
3088
  * The current wallet balance expressed in credits.
3608
- * @format ^[0-9]+.?[0-9]*$
3089
+ * @pattern ^[0-9]+.?[0-9]*$
3609
3090
  * @example "28.0"
3610
3091
  */
3611
3092
  credits_balance: string;
@@ -3616,7 +3097,7 @@ export interface WalletObject {
3616
3097
  balance_cents: number;
3617
3098
  /**
3618
3099
  * The number of consumed credits.
3619
- * @format ^[0-9]+.?[0-9]*$
3100
+ * @pattern ^[0-9]+.?[0-9]*$
3620
3101
  * @example "2.0"
3621
3102
  */
3622
3103
  consumed_credits: string;
@@ -3665,13 +3146,13 @@ export interface WalletTransactionCreateInput {
3665
3146
  wallet_id: string;
3666
3147
  /**
3667
3148
  * The number of paid credits. Required only if there is no granted credits.
3668
- * @format ^[0-9]+.?[0-9]*$
3149
+ * @pattern ^[0-9]+.?[0-9]*$
3669
3150
  * @example "20.0"
3670
3151
  */
3671
3152
  paid_credits?: string;
3672
3153
  /**
3673
3154
  * The number of free granted credits. Required only if there is no paid credits.
3674
- * @format ^[0-9]+.?[0-9]*$
3155
+ * @pattern ^[0-9]+.?[0-9]*$
3675
3156
  * @example "10.0"
3676
3157
  */
3677
3158
  granted_credits?: string;
@@ -3702,13 +3183,13 @@ export interface WalletTransactionObject {
3702
3183
  transaction_type: "inbound" | "outbound";
3703
3184
  /**
3704
3185
  * The amount of credits based on the rate and the currency.
3705
- * @format ^[0-9]+.?[0-9]*$
3186
+ * @pattern ^[0-9]+.?[0-9]*$
3706
3187
  * @example "10.0"
3707
3188
  */
3708
3189
  amount: string;
3709
3190
  /**
3710
3191
  * The number of credits used in the wallet transaction.
3711
- * @format ^[0-9]+.?[0-9]*$
3192
+ * @pattern ^[0-9]+.?[0-9]*$
3712
3193
  * @example "100.0"
3713
3194
  */
3714
3195
  credit_amount: string;
@@ -3746,6 +3227,71 @@ export interface WalletUpdateInput {
3746
3227
  expiration_at?: string | null;
3747
3228
  };
3748
3229
  }
3230
+ export interface WebhookEndpoint {
3231
+ webhook_endpoint: WebhookEndpointObject;
3232
+ }
3233
+ export interface WebhookEndpointCreateInput {
3234
+ webhook_endpoint?: {
3235
+ /**
3236
+ * The URL of the webhook endpoint.
3237
+ * @example "https://foo.bar"
3238
+ */
3239
+ webhook_url: string;
3240
+ /**
3241
+ * The signature used for the webhook. If no value is passed,
3242
+ * @example "hmac"
3243
+ */
3244
+ signature_algo?: "jwt" | "hmac" | null;
3245
+ };
3246
+ }
3247
+ export interface WebhookEndpointObject {
3248
+ /**
3249
+ * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
3250
+ * @format uuid
3251
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3252
+ */
3253
+ lago_id: string;
3254
+ /**
3255
+ * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization’s record within the Lago system.
3256
+ * @format uuid
3257
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3258
+ */
3259
+ lago_organization_id: string;
3260
+ /**
3261
+ * The name of the wallet.
3262
+ * @example "Prepaid"
3263
+ */
3264
+ webhook_url: string;
3265
+ /**
3266
+ * The signature algo for the webhook.
3267
+ * @example "hmac"
3268
+ */
3269
+ signature_algo?: "jwt" | "hmac";
3270
+ /**
3271
+ * The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3272
+ * @format date-time
3273
+ * @example "2022-04-29T08:59:51Z"
3274
+ */
3275
+ created_at: string;
3276
+ }
3277
+ export interface WebhookEndpointsPaginated {
3278
+ webhook_endpoints: WebhookEndpointObject[];
3279
+ meta: PaginationMeta;
3280
+ }
3281
+ export interface WebhookEndpointUpdateInput {
3282
+ webhook_endpoint?: {
3283
+ /**
3284
+ * The URL of the webhook endpoint.
3285
+ * @example "https://foo.bar"
3286
+ */
3287
+ webhook_url: string;
3288
+ /**
3289
+ * The signature used for the webhook. If no value is passed,
3290
+ * @example "hmac"
3291
+ */
3292
+ signature_algo?: "jwt" | "hmac" | null;
3293
+ };
3294
+ }
3749
3295
  export type QueryParamsType = Record<string | number, any>;
3750
3296
  export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
3751
3297
  export interface FullRequestParams extends Omit<RequestInit, "body"> {
@@ -3806,7 +3352,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
3806
3352
  }
3807
3353
  /**
3808
3354
  * @title Lago API documentation
3809
- * @version 0.41.0-beta
3355
+ * @version 0.48.0-beta
3810
3356
  * @license AGPLv3
3811
3357
  * @baseUrl https://api.getlago.com/api/v1
3812
3358
  * @externalDocs https://github.com/getlago
@@ -3878,19 +3424,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3878
3424
  */
3879
3425
  destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
3880
3426
  };
3881
- appliedAddOns: {
3882
- /**
3883
- * @description Apply an add-on to a customer
3884
- *
3885
- * @tags add_ons
3886
- * @name ApplyAddOn
3887
- * @summary Apply an add-on to a customer
3888
- * @request POST:/applied_add_ons
3889
- * @deprecated
3890
- * @secure
3891
- */
3892
- applyAddOn: (data: AppliedAddOnInput, params?: RequestParams) => Promise<HttpResponse<AppliedAddOn, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
3893
- };
3894
3427
  appliedCoupons: {
3895
3428
  /**
3896
3429
  * @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
@@ -4875,51 +4408,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4875
4408
  * @request POST:/webhook_endpoints
4876
4409
  * @secure
4877
4410
  */
4878
- createWebhookEndpoint: (data: {
4879
- webhook_endpoint?: {
4880
- /**
4881
- * The URL of the webhook endpoint.
4882
- * @example "https://foo.bar"
4883
- */
4884
- webhook_url: string;
4885
- /**
4886
- * The signature used for the webhook. If no value is passed,
4887
- * @example "hmac"
4888
- */
4889
- signature_algo?: "jwt" | "hmac" | null;
4890
- };
4891
- }, params?: RequestParams) => Promise<HttpResponse<{
4892
- webhook_endpoint: {
4893
- /**
4894
- * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
4895
- * @format uuid
4896
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4897
- */
4898
- lago_id: string;
4899
- /**
4900
- * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization’s record within the Lago system.
4901
- * @format uuid
4902
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4903
- */
4904
- lago_organization_id: string;
4905
- /**
4906
- * The name of the wallet.
4907
- * @example "Prepaid"
4908
- */
4909
- webhook_url: string;
4910
- /**
4911
- * The signature algo for the webhook.
4912
- * @example "hmac"
4913
- */
4914
- signature_algo?: "jwt" | "hmac";
4915
- /**
4916
- * The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4917
- * @format date-time
4918
- * @example "2022-04-29T08:59:51Z"
4919
- */
4920
- created_at: string;
4921
- };
4922
- }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
4411
+ createWebhookEndpoint: (data: WebhookEndpointCreateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
4923
4412
  /**
4924
4413
  * @description This endpoint is used to list all webhook endpoints.
4925
4414
  *
@@ -4940,10 +4429,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4940
4429
  * @example 20
4941
4430
  */
4942
4431
  per_page?: number;
4943
- }, params?: RequestParams) => Promise<HttpResponse<{
4944
- webhook_endpoints: any[];
4945
- meta: PaginationMeta;
4946
- }, ApiErrorUnauthorized>>;
4432
+ }, params?: RequestParams) => Promise<HttpResponse<WebhookEndpointsPaginated, ApiErrorUnauthorized>>;
4947
4433
  /**
4948
4434
  * @description This endpoint is used to update an existing webhook endpoint.
4949
4435
  *
@@ -4953,20 +4439,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4953
4439
  * @request PUT:/webhook_endpoints/{lago_id}
4954
4440
  * @secure
4955
4441
  */
4956
- updateWebhookEndpoint: (lagoId: string, data: {
4957
- webhook_endpoint?: {
4958
- /**
4959
- * The URL of the webhook endpoint.
4960
- * @example "https://foo.bar"
4961
- */
4962
- webhook_url: string;
4963
- /**
4964
- * The signature used for the webhook. If no value is passed,
4965
- * @example "hmac"
4966
- */
4967
- signature_algo?: "jwt" | "hmac" | null;
4968
- };
4969
- }, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4442
+ updateWebhookEndpoint: (lagoId: string, data: WebhookEndpointUpdateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4970
4443
  /**
4971
4444
  * @description This endpoint is used to retrieve an existing webhook endpoint.
4972
4445
  *
@@ -4976,7 +4449,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4976
4449
  * @request GET:/webhook_endpoints/{lago_id}
4977
4450
  * @secure
4978
4451
  */
4979
- findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotFound>>;
4452
+ findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotFound>>;
4980
4453
  /**
4981
4454
  * @description This endpoint is used to delete an existing webhook endpoint.
4982
4455
  *
@@ -4986,7 +4459,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4986
4459
  * @request DELETE:/webhook_endpoints/{lago_id}
4987
4460
  * @secure
4988
4461
  */
4989
- destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
4462
+ destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
4990
4463
  };
4991
4464
  }
4992
4465
  export {};