Skip to content

Commit 5a431ce

Browse files
feat(api): api update
1 parent 1464dc7 commit 5a431ce

7 files changed

Lines changed: 2310 additions & 62 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-07428f2af8d77b3af7d838375b0fb5adce7fba2c8312ca84bcd8ef340d782bbc.yml
3-
openapi_spec_hash: 99d6e3e97bab8a25399a63f3db134542
3+
openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2
44
config_hash: c01c1191b1cd696c7ca855ff6d28a8df

src/resources/beta/beta.ts

Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export namespace BetaCreatePlanVersionParams {
213213
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
214214
| Shared.NewPlanCumulativeGroupedBulkPrice
215215
| AddPrice.NewPlanCumulativeGroupedAllocationPrice
216+
| AddPrice.NewPlanDailyCreditAllowancePrice
216217
| Shared.NewPlanMinimumCompositePrice
217218
| AddPrice.NewPlanPercentCompositePrice
218219
| AddPrice.NewPlanEventOutputPrice
@@ -912,6 +913,165 @@ export namespace BetaCreatePlanVersionParams {
912913
}
913914
}
914915

916+
export interface NewPlanDailyCreditAllowancePrice {
917+
/**
918+
* The cadence to bill for this price on.
919+
*/
920+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
921+
922+
/**
923+
* Configuration for daily_credit_allowance pricing
924+
*/
925+
daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
926+
927+
/**
928+
* The id of the item the price will be associated with.
929+
*/
930+
item_id: string;
931+
932+
/**
933+
* The pricing model type
934+
*/
935+
model_type: 'daily_credit_allowance';
936+
937+
/**
938+
* The name of the price.
939+
*/
940+
name: string;
941+
942+
/**
943+
* The id of the billable metric for the price. Only needed if the price is
944+
* usage-based.
945+
*/
946+
billable_metric_id?: string | null;
947+
948+
/**
949+
* If the Price represents a fixed cost, the price will be billed in-advance if
950+
* this is true, and in-arrears if this is false.
951+
*/
952+
billed_in_advance?: boolean | null;
953+
954+
/**
955+
* For custom cadence: specifies the duration of the billing period in days or
956+
* months.
957+
*/
958+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
959+
960+
/**
961+
* The per unit conversion rate of the price currency to the invoicing currency.
962+
*/
963+
conversion_rate?: number | null;
964+
965+
/**
966+
* The configuration for the rate of the price currency to the invoicing currency.
967+
*/
968+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
969+
970+
/**
971+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
972+
* price is billed.
973+
*/
974+
currency?: string | null;
975+
976+
/**
977+
* For dimensional price: specifies a price group and dimension values
978+
*/
979+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
980+
981+
/**
982+
* An alias for the price.
983+
*/
984+
external_price_id?: string | null;
985+
986+
/**
987+
* If the Price represents a fixed cost, this represents the quantity of units
988+
* applied.
989+
*/
990+
fixed_price_quantity?: number | null;
991+
992+
/**
993+
* The property used to group this price on an invoice
994+
*/
995+
invoice_grouping_key?: string | null;
996+
997+
/**
998+
* Within each billing cycle, specifies the cadence at which invoices are produced.
999+
* If unspecified, a single invoice is produced per billing cycle.
1000+
*/
1001+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1002+
1003+
/**
1004+
* The ID of the license type to associate with this price.
1005+
*/
1006+
license_type_id?: string | null;
1007+
1008+
/**
1009+
* User-specified key/value pairs for the resource. Individual keys can be removed
1010+
* by setting the value to `null`, and the entire metadata mapping can be cleared
1011+
* by setting `metadata` to `null`.
1012+
*/
1013+
metadata?: { [key: string]: string | null } | null;
1014+
1015+
/**
1016+
* A transient ID that can be used to reference this price when adding adjustments
1017+
* in the same API call.
1018+
*/
1019+
reference_id?: string | null;
1020+
}
1021+
1022+
export namespace NewPlanDailyCreditAllowancePrice {
1023+
/**
1024+
* Configuration for daily_credit_allowance pricing
1025+
*/
1026+
export interface DailyCreditAllowanceConfig {
1027+
/**
1028+
* Credits granted per day. Lose-it-or-use-it; does not roll over.
1029+
*/
1030+
daily_allowance: string;
1031+
1032+
/**
1033+
* Default per-unit credit rate for any usage not bucketed into a specified
1034+
* matrix_value
1035+
*/
1036+
default_unit_amount: string;
1037+
1038+
/**
1039+
* One or two event property values to evaluate matrix groups by
1040+
*/
1041+
dimensions: Array<string | null>;
1042+
1043+
/**
1044+
* Event property whose value identifies the day bucket the event belongs to (e.g.
1045+
* 'event_day' set to an ISO date string in the customer's timezone). The allowance
1046+
* resets per distinct value of this property.
1047+
*/
1048+
event_day_property: string;
1049+
1050+
/**
1051+
* Per-dimension credit rates
1052+
*/
1053+
matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
1054+
}
1055+
1056+
export namespace DailyCreditAllowanceConfig {
1057+
/**
1058+
* Per-dimension credit price for the daily credit allowance model.
1059+
*/
1060+
export interface MatrixValue {
1061+
/**
1062+
* One or two matrix keys to filter usage to this value by. For example, ["model"]
1063+
* could be used to apply a different credit rate to each AI model.
1064+
*/
1065+
dimension_values: Array<string | null>;
1066+
1067+
/**
1068+
* Credits charged per unit of usage matching the specified dimension_values
1069+
*/
1070+
unit_amount: string;
1071+
}
1072+
}
1073+
}
1074+
9151075
export interface NewPlanPercentCompositePrice {
9161076
/**
9171077
* The cadence to bill for this price on.
@@ -1261,6 +1421,7 @@ export namespace BetaCreatePlanVersionParams {
12611421
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
12621422
| Shared.NewPlanCumulativeGroupedBulkPrice
12631423
| ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
1424+
| ReplacePrice.NewPlanDailyCreditAllowancePrice
12641425
| Shared.NewPlanMinimumCompositePrice
12651426
| ReplacePrice.NewPlanPercentCompositePrice
12661427
| ReplacePrice.NewPlanEventOutputPrice
@@ -1960,6 +2121,165 @@ export namespace BetaCreatePlanVersionParams {
19602121
}
19612122
}
19622123

2124+
export interface NewPlanDailyCreditAllowancePrice {
2125+
/**
2126+
* The cadence to bill for this price on.
2127+
*/
2128+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2129+
2130+
/**
2131+
* Configuration for daily_credit_allowance pricing
2132+
*/
2133+
daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
2134+
2135+
/**
2136+
* The id of the item the price will be associated with.
2137+
*/
2138+
item_id: string;
2139+
2140+
/**
2141+
* The pricing model type
2142+
*/
2143+
model_type: 'daily_credit_allowance';
2144+
2145+
/**
2146+
* The name of the price.
2147+
*/
2148+
name: string;
2149+
2150+
/**
2151+
* The id of the billable metric for the price. Only needed if the price is
2152+
* usage-based.
2153+
*/
2154+
billable_metric_id?: string | null;
2155+
2156+
/**
2157+
* If the Price represents a fixed cost, the price will be billed in-advance if
2158+
* this is true, and in-arrears if this is false.
2159+
*/
2160+
billed_in_advance?: boolean | null;
2161+
2162+
/**
2163+
* For custom cadence: specifies the duration of the billing period in days or
2164+
* months.
2165+
*/
2166+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2167+
2168+
/**
2169+
* The per unit conversion rate of the price currency to the invoicing currency.
2170+
*/
2171+
conversion_rate?: number | null;
2172+
2173+
/**
2174+
* The configuration for the rate of the price currency to the invoicing currency.
2175+
*/
2176+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2177+
2178+
/**
2179+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
2180+
* price is billed.
2181+
*/
2182+
currency?: string | null;
2183+
2184+
/**
2185+
* For dimensional price: specifies a price group and dimension values
2186+
*/
2187+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2188+
2189+
/**
2190+
* An alias for the price.
2191+
*/
2192+
external_price_id?: string | null;
2193+
2194+
/**
2195+
* If the Price represents a fixed cost, this represents the quantity of units
2196+
* applied.
2197+
*/
2198+
fixed_price_quantity?: number | null;
2199+
2200+
/**
2201+
* The property used to group this price on an invoice
2202+
*/
2203+
invoice_grouping_key?: string | null;
2204+
2205+
/**
2206+
* Within each billing cycle, specifies the cadence at which invoices are produced.
2207+
* If unspecified, a single invoice is produced per billing cycle.
2208+
*/
2209+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2210+
2211+
/**
2212+
* The ID of the license type to associate with this price.
2213+
*/
2214+
license_type_id?: string | null;
2215+
2216+
/**
2217+
* User-specified key/value pairs for the resource. Individual keys can be removed
2218+
* by setting the value to `null`, and the entire metadata mapping can be cleared
2219+
* by setting `metadata` to `null`.
2220+
*/
2221+
metadata?: { [key: string]: string | null } | null;
2222+
2223+
/**
2224+
* A transient ID that can be used to reference this price when adding adjustments
2225+
* in the same API call.
2226+
*/
2227+
reference_id?: string | null;
2228+
}
2229+
2230+
export namespace NewPlanDailyCreditAllowancePrice {
2231+
/**
2232+
* Configuration for daily_credit_allowance pricing
2233+
*/
2234+
export interface DailyCreditAllowanceConfig {
2235+
/**
2236+
* Credits granted per day. Lose-it-or-use-it; does not roll over.
2237+
*/
2238+
daily_allowance: string;
2239+
2240+
/**
2241+
* Default per-unit credit rate for any usage not bucketed into a specified
2242+
* matrix_value
2243+
*/
2244+
default_unit_amount: string;
2245+
2246+
/**
2247+
* One or two event property values to evaluate matrix groups by
2248+
*/
2249+
dimensions: Array<string | null>;
2250+
2251+
/**
2252+
* Event property whose value identifies the day bucket the event belongs to (e.g.
2253+
* 'event_day' set to an ISO date string in the customer's timezone). The allowance
2254+
* resets per distinct value of this property.
2255+
*/
2256+
event_day_property: string;
2257+
2258+
/**
2259+
* Per-dimension credit rates
2260+
*/
2261+
matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
2262+
}
2263+
2264+
export namespace DailyCreditAllowanceConfig {
2265+
/**
2266+
* Per-dimension credit price for the daily credit allowance model.
2267+
*/
2268+
export interface MatrixValue {
2269+
/**
2270+
* One or two matrix keys to filter usage to this value by. For example, ["model"]
2271+
* could be used to apply a different credit rate to each AI model.
2272+
*/
2273+
dimension_values: Array<string | null>;
2274+
2275+
/**
2276+
* Credits charged per unit of usage matching the specified dimension_values
2277+
*/
2278+
unit_amount: string;
2279+
}
2280+
}
2281+
}
2282+
19632283
export interface NewPlanPercentCompositePrice {
19642284
/**
19652285
* The cadence to bill for this price on.

0 commit comments

Comments
 (0)