@@ -5,27 +5,49 @@ import * as T from "../traits.ts";
55// Input Schema
66export interface GetPricesInput {
77 active ?: boolean ;
8- created ?: string ;
8+ created ?: { gt ?: number ; gte ?: number ; lt ?: number ; lte ?: number } | number ;
99 currency ?: string ;
1010 ending_before ?: string ;
11- expand ?: string ;
11+ expand ?: ReadonlyArray < string > ;
1212 limit ?: number ;
13- lookup_keys ?: string ;
13+ lookup_keys ?: ReadonlyArray < string > ;
1414 product ?: string ;
15- recurring ?: string ;
15+ recurring ?: {
16+ interval ?: "day" | "month" | "week" | "year" ;
17+ meter ?: string ;
18+ usage_type ?: "licensed" | "metered" ;
19+ } ;
1620 starting_after ?: string ;
1721 type ?: "one_time" | "recurring" ;
1822}
1923export const GetPricesInput = /*@__PURE__ */ /*#__PURE__*/ Schema . Struct ( {
2024 active : Schema . optional ( Schema . Boolean ) ,
21- created : Schema . optional ( Schema . String ) ,
25+ created : Schema . optional (
26+ Schema . Union ( [
27+ Schema . Struct ( {
28+ gt : Schema . optional ( Schema . Number ) ,
29+ gte : Schema . optional ( Schema . Number ) ,
30+ lt : Schema . optional ( Schema . Number ) ,
31+ lte : Schema . optional ( Schema . Number ) ,
32+ } ) ,
33+ Schema . Number ,
34+ ] ) ,
35+ ) ,
2236 currency : Schema . optional ( Schema . String ) ,
2337 ending_before : Schema . optional ( Schema . String ) ,
24- expand : Schema . optional ( Schema . String ) ,
38+ expand : Schema . optional ( Schema . Array ( Schema . String ) ) ,
2539 limit : Schema . optional ( Schema . Number ) ,
26- lookup_keys : Schema . optional ( Schema . String ) ,
40+ lookup_keys : Schema . optional ( Schema . Array ( Schema . String ) ) ,
2741 product : Schema . optional ( Schema . String ) ,
28- recurring : Schema . optional ( Schema . String ) ,
42+ recurring : Schema . optional (
43+ Schema . Struct ( {
44+ interval : Schema . optional (
45+ Schema . Literals ( [ "day" , "month" , "week" , "year" ] ) ,
46+ ) ,
47+ meter : Schema . optional ( Schema . String ) ,
48+ usage_type : Schema . optional ( Schema . Literals ( [ "licensed" , "metered" ] ) ) ,
49+ } ) ,
50+ ) ,
2951 starting_after : Schema . optional ( Schema . String ) ,
3052 type : Schema . optional ( Schema . Literals ( [ "one_time" , "recurring" ] ) ) ,
3153} ) . pipe (
@@ -34,7 +56,7 @@ export const GetPricesInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3456
3557// Output Schema
3658export interface GetPricesOutput {
37- data : {
59+ data : ReadonlyArray < {
3860 active : boolean ;
3961 billing_scheme : "per_unit" | "tiered" ;
4062 created : number ;
@@ -48,13 +70,13 @@ export interface GetPricesOutput {
4870 preset : number | null ;
4971 } | null ;
5072 tax_behavior : "exclusive" | "inclusive" | "unspecified" | null ;
51- tiers ?: {
73+ tiers ?: ReadonlyArray < {
5274 flat_amount : number | null ;
5375 flat_amount_decimal : string | null ;
5476 unit_amount : number | null ;
5577 unit_amount_decimal : string | null ;
5678 up_to : number | null ;
57- } [ ] ;
79+ } > ;
5880 unit_amount : number | null ;
5981 unit_amount_decimal : string | null ;
6082 }
@@ -78,9 +100,9 @@ export interface GetPricesOutput {
78100 default_price ?: string | unknown | null ;
79101 description : string | null ;
80102 id : string ;
81- images : string [ ] ;
103+ images : ReadonlyArray < string > ;
82104 livemode : boolean ;
83- marketing_features : { name ?: string } [ ] ;
105+ marketing_features : ReadonlyArray < { name ?: string } > ;
84106 metadata : Record < string , string > ;
85107 name : string ;
86108 object : "product" ;
@@ -115,19 +137,19 @@ export interface GetPricesOutput {
115137 usage_type : "licensed" | "metered" ;
116138 } | null ;
117139 tax_behavior : "exclusive" | "inclusive" | "unspecified" | null ;
118- tiers ?: {
140+ tiers ?: ReadonlyArray < {
119141 flat_amount : number | null ;
120142 flat_amount_decimal : string | null ;
121143 unit_amount : number | null ;
122144 unit_amount_decimal : string | null ;
123145 up_to : number | null ;
124- } [ ] ;
146+ } > ;
125147 tiers_mode : "graduated" | "volume" | null ;
126148 transform_quantity : { divide_by : number ; round : "down" | "up" } | null ;
127149 type : "one_time" | "recurring" ;
128150 unit_amount : number | null ;
129151 unit_amount_decimal : string | null ;
130- } [ ] ;
152+ } > ;
131153 has_more : boolean ;
132154 object : "list" ;
133155 url : string ;
0 commit comments