@openmeter/client 1.0.0-beta.228 → 1.0.0-beta.229

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.
@@ -14,7 +14,7 @@ export interface SortQuery {
14
14
  /** The attribute to sort by. */
15
15
  by: string;
16
16
  /** The sort order. `asc` for ascending, `desc` for descending. */
17
- order: "asc" | "desc";
17
+ order: 'asc' | 'desc';
18
18
  }
19
19
  /** Event validation errors. */
20
20
  export interface IngestedEventValidationError {
@@ -113,7 +113,7 @@ export type CreateLabels = Record<string, string>;
113
113
  /** Free price. */
114
114
  export interface PriceFree {
115
115
  /** The type of the price. */
116
- type: "free";
116
+ type: 'free';
117
117
  }
118
118
  /** The tax config for Stripe. */
119
119
  export interface TaxConfigStripe {
@@ -133,7 +133,7 @@ export interface FlatFeeDiscounts {
133
133
  /** BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice. */
134
134
  export interface WorkflowCollectionAlignmentSubscription {
135
135
  /** The type of alignment. */
136
- type: "subscription";
136
+ type: 'subscription';
137
137
  }
138
138
  /** Invoice settings for a billing workflow. */
139
139
  export interface WorkflowInvoicingSettings {
@@ -147,12 +147,12 @@ export interface WorkflowInvoicingSettings {
147
147
  /** Payment settings for a billing workflow when the collection method is charge automatically. */
148
148
  export interface WorkflowPaymentChargeAutomaticallySettings {
149
149
  /** The collection method for the invoice. */
150
- collection_method: "charge_automatically";
150
+ collection_method: 'charge_automatically';
151
151
  }
152
152
  /** Payment settings for a billing workflow when the collection method is send invoice. */
153
153
  export interface WorkflowPaymentSendInvoiceSettings {
154
154
  /** The collection method for the invoice. */
155
- collection_method: "send_invoice";
155
+ collection_method: 'send_invoice';
156
156
  /** The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method. */
157
157
  due_after: string;
158
158
  }
@@ -247,23 +247,23 @@ export type PublicLabels = Record<string, string>;
247
247
  /** The system account access token is meant for automations and integrations that are not directly associated with a human identity. */
248
248
  export interface SystemAccountAccessToken {
249
249
  /** Http authentication */
250
- type: "http";
250
+ type: 'http';
251
251
  /** bearer auth scheme */
252
- scheme: "Bearer";
252
+ scheme: 'Bearer';
253
253
  }
254
254
  /** The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs. */
255
255
  export interface PersonalAccessToken {
256
256
  /** Http authentication */
257
- type: "http";
257
+ type: 'http';
258
258
  /** bearer auth scheme */
259
- scheme: "Bearer";
259
+ scheme: 'Bearer';
260
260
  }
261
261
  /** The Konnect access token is meant to be used by the Konnect dashboard and the decK CLI authenticate with. */
262
262
  export interface KonnectAccessToken {
263
263
  /** Http authentication */
264
- type: "http";
264
+ type: 'http';
265
265
  /** bearer auth scheme */
266
- scheme: "Bearer";
266
+ scheme: 'Bearer';
267
267
  }
268
268
  /** Meter update request. */
269
269
  export interface UpdateMeterRequest {
@@ -297,14 +297,14 @@ export interface ListCostBasesParamsFilter {
297
297
  /** Flat price. */
298
298
  export interface PriceFlat {
299
299
  /** The type of the price. */
300
- type: "flat";
300
+ type: 'flat';
301
301
  /** The amount of the flat price. */
302
302
  amount: string;
303
303
  }
304
304
  /** Unit price. Charges a fixed rate per billing unit. When UnitConfig is present on the rate card, billing units are the converted quantities (e.g. GB instead of bytes). */
305
305
  export interface PriceUnit {
306
306
  /** The type of the price. */
307
- type: "unit";
307
+ type: 'unit';
308
308
  /** The amount of the unit price. */
309
309
  amount: string;
310
310
  }
@@ -342,7 +342,7 @@ export interface Totals {
342
342
  /** A fixed per-unit cost amount. */
343
343
  export interface FeatureManualUnitCost {
344
344
  /** The type discriminator for manual unit cost. */
345
- type: "manual";
345
+ type: 'manual';
346
346
  /** Fixed per-unit cost amount in USD. */
347
347
  amount: string;
348
348
  }
@@ -564,7 +564,7 @@ export interface AppReference {
564
564
  export interface CurrencyFiat {
565
565
  id: string;
566
566
  /** The type of the currency. */
567
- type: "fiat";
567
+ type: 'fiat';
568
568
  /** The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro". */
569
569
  name: string;
570
570
  /** Description of the currency. */
@@ -588,7 +588,7 @@ export interface Event {
588
588
  /** Contains a value describing the type of event related to the originating occurrence. */
589
589
  type: string;
590
590
  /** Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP. */
591
- datacontenttype?: "application/json" | null;
591
+ datacontenttype?: 'application/json' | null;
592
592
  /** Identifies the schema that data adheres to. */
593
593
  dataschema?: string | null;
594
594
  /** Describes the subject of the event in the context of the event producer (identified by source). */
@@ -724,7 +724,7 @@ export interface InvalidParameterStandard {
724
724
  /** The name of the field that failed validation. */
725
725
  field: string;
726
726
  /** The validation rule that was violated. */
727
- rule?: "required" | "is_array" | "is_base64" | "is_boolean" | "is_date_time" | "is_integer" | "is_null" | "is_number" | "is_object" | "is_string" | "is_uuid" | "is_fqdn" | "is_arn" | "unknown_property" | "missing_reference" | "is_label" | "matches_regex" | "invalid" | "is_supported_network_availability_zone_list" | "is_supported_network_cidr_block" | "is_supported_provider_region" | "type";
727
+ rule?: 'required' | 'is_array' | 'is_base64' | 'is_boolean' | 'is_date_time' | 'is_integer' | 'is_null' | 'is_number' | 'is_object' | 'is_string' | 'is_uuid' | 'is_fqdn' | 'is_arn' | 'unknown_property' | 'missing_reference' | 'is_label' | 'matches_regex' | 'invalid' | 'is_supported_network_availability_zone_list' | 'is_supported_network_cidr_block' | 'is_supported_provider_region' | 'type';
728
728
  /** The part of the request the field came from (e.g. `body`, `query`). */
729
729
  source?: string;
730
730
  /** A human readable explanation of why the field failed validation. */
@@ -735,7 +735,7 @@ export interface InvalidParameterMinimumLength {
735
735
  /** The name of the field that failed validation. */
736
736
  field: string;
737
737
  /** The minimum validation rule that was violated. */
738
- rule: "min_length" | "min_digits" | "min_lowercase" | "min_uppercase" | "min_symbols" | "min_items" | "min";
738
+ rule: 'min_length' | 'min_digits' | 'min_lowercase' | 'min_uppercase' | 'min_symbols' | 'min_items' | 'min';
739
739
  /** The minimum allowed value or length. */
740
740
  minimum: number;
741
741
  /** The part of the request the field came from (e.g. `body`, `query`). */
@@ -748,7 +748,7 @@ export interface InvalidParameterMaximumLength {
748
748
  /** The name of the field that failed validation. */
749
749
  field: string;
750
750
  /** The maximum validation rule that was violated. */
751
- rule: "max_length" | "max_items" | "max";
751
+ rule: 'max_length' | 'max_items' | 'max';
752
752
  /** The maximum allowed value or length. */
753
753
  maximum: number;
754
754
  /** The part of the request the field came from (e.g. `body`, `query`). */
@@ -761,7 +761,7 @@ export interface InvalidParameterChoiceItem {
761
761
  /** The name of the field that failed validation. */
762
762
  field: string;
763
763
  /** The enum validation rule that was violated. */
764
- rule: "enum";
764
+ rule: 'enum';
765
765
  /** A human readable explanation of why the field failed validation. */
766
766
  reason: string;
767
767
  /** The allowed choices for the field. */
@@ -774,7 +774,7 @@ export interface InvalidParameterDependentItem {
774
774
  /** The name of the field that failed validation. */
775
775
  field: string;
776
776
  /** The dependent-fields validation rule that was violated. */
777
- rule: "dependent_fields";
777
+ rule: 'dependent_fields';
778
778
  /** A human readable explanation of why the field failed validation. */
779
779
  reason: string;
780
780
  /** The fields that this field depends on. */
@@ -865,7 +865,7 @@ export interface CreateMeterRequest {
865
865
  labels?: Labels;
866
866
  key: string;
867
867
  /** The aggregation type to use for the meter. */
868
- aggregation: "sum" | "count" | "unique_count" | "avg" | "min" | "max" | "latest";
868
+ aggregation: 'sum' | 'count' | 'unique_count' | 'avg' | 'min' | 'max' | 'latest';
869
869
  /** The event type to include in the aggregation. */
870
870
  event_type: string;
871
871
  /** The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included. */
@@ -891,7 +891,7 @@ export interface Meter {
891
891
  deleted_at?: string;
892
892
  key: string;
893
893
  /** The aggregation type to use for the meter. */
894
- aggregation: "sum" | "count" | "unique_count" | "avg" | "min" | "max" | "latest";
894
+ aggregation: 'sum' | 'count' | 'unique_count' | 'avg' | 'min' | 'max' | 'latest';
895
895
  /** The event type to include in the aggregation. */
896
896
  event_type: string;
897
897
  /** The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included. */
@@ -991,23 +991,23 @@ export interface Address {
991
991
  /** Controls which customer fields can be updated by the checkout session. */
992
992
  export interface AppStripeCreateCheckoutSessionCustomerUpdate {
993
993
  /** Whether to save the billing address to customer.address. Defaults to "never". */
994
- address: "auto" | "never";
994
+ address: 'auto' | 'never';
995
995
  /** Whether to save the customer name to customer.name. Defaults to "never". */
996
- name: "auto" | "never";
996
+ name: 'auto' | 'never';
997
997
  /** Whether to save shipping information to customer.shipping. Defaults to "never". */
998
- shipping: "auto" | "never";
998
+ shipping: 'auto' | 'never';
999
999
  }
1000
1000
  /** Payment method reuse agreement configuration. */
1001
1001
  export interface AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement {
1002
1002
  /** Position and visibility of the payment method reuse agreement. */
1003
- position?: "auto" | "hidden";
1003
+ position?: 'auto' | 'hidden';
1004
1004
  }
1005
1005
  /** Tax ID collection configuration for checkout sessions. */
1006
1006
  export interface AppStripeCreateCheckoutSessionTaxIdCollection {
1007
1007
  /** Enable tax ID collection during checkout. Defaults to false. */
1008
1008
  enabled: boolean;
1009
1009
  /** Whether tax ID collection is required. Defaults to "never". */
1010
- required: "if_supported" | "never";
1010
+ required: 'if_supported' | 'never';
1011
1011
  }
1012
1012
  /** Result of creating a Stripe Checkout Session. Contains all the information needed to redirect customers to the checkout or initialize an embedded checkout flow. */
1013
1013
  export interface AppStripeCreateCheckoutSessionResult {
@@ -1038,7 +1038,7 @@ export interface AppStripeCreateCheckoutSessionResult {
1038
1038
  /** URL to redirect customers to the checkout page (for hosted mode). */
1039
1039
  url?: string;
1040
1040
  /** Mode of the checkout session. Currently only "setup" mode is supported for collecting payment methods. */
1041
- mode: "setup";
1041
+ mode: 'setup';
1042
1042
  /** The cancel URL where customers are redirected if they cancel. */
1043
1043
  cancel_url?: string;
1044
1044
  /** The success URL where customers are redirected after completion. */
@@ -1054,7 +1054,7 @@ export interface CustomerStripeCreateCustomerPortalSessionRequest {
1054
1054
  /** Entitlement access result. */
1055
1055
  export interface EntitlementAccessResult {
1056
1056
  /** The type of the entitlement. */
1057
- type: "metered" | "static" | "boolean";
1057
+ type: 'metered' | 'static' | 'boolean';
1058
1058
  /** The feature key of the entitlement. */
1059
1059
  feature_key: string;
1060
1060
  /** Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements. */
@@ -1069,7 +1069,7 @@ export interface CreateCreditGrantPurchase {
1069
1069
  /** Cost basis per credit unit used to calculate the purchase amount. If `per_unit_cost_basis` is 0.50 and credit amount is $100.00, the total charge is $50.00. The value must be greater than 0. If the cost basis is 0, use `funding_method=none` instead. Defaults to 1.0. */
1070
1070
  per_unit_cost_basis: string;
1071
1071
  /** Controls when credits become available for consumption. Defaults to `on_creation`. */
1072
- availability_policy: "on_creation";
1072
+ availability_policy: 'on_creation';
1073
1073
  }
1074
1074
  /** Recurring period with an anchor and an interval. */
1075
1075
  export interface RecurringPeriod {
@@ -1087,19 +1087,19 @@ export interface CreditGrantPurchase {
1087
1087
  /** The purchase amount. Calculated from `per_unit_cost_basis` and credit `amount`. */
1088
1088
  amount: string;
1089
1089
  /** Controls when credits become available for consumption. Defaults to `on_creation`. */
1090
- availability_policy: "on_creation";
1090
+ availability_policy: 'on_creation';
1091
1091
  /** Current payment settlement status. */
1092
- settlement_status?: "pending" | "authorized" | "settled";
1092
+ settlement_status?: 'pending' | 'authorized' | 'settled';
1093
1093
  }
1094
1094
  /** Request body for updating the external payment settlement status of a credit grant. */
1095
1095
  export interface UpdateCreditGrantExternalSettlementRequest {
1096
1096
  /** The new payment settlement status. */
1097
- status: "pending" | "authorized" | "settled";
1097
+ status: 'pending' | 'authorized' | 'settled';
1098
1098
  }
1099
1099
  /** Filter options for listing credit grants. */
1100
1100
  export interface ListCreditGrantsParamsFilter {
1101
1101
  /** Filter credit grants by status. */
1102
- status?: "pending" | "active" | "expired" | "voided";
1102
+ status?: 'pending' | 'active' | 'expired' | 'voided';
1103
1103
  /** Filter credit grants by currency. */
1104
1104
  currency?: string;
1105
1105
  }
@@ -1161,7 +1161,7 @@ export interface ListPlansParamsFilter {
1161
1161
  /** The proration configuration of the rate card. */
1162
1162
  export interface RateCardProrationConfiguration {
1163
1163
  /** The proration mode of the rate card. */
1164
- mode: "no_proration" | "prorate_prices";
1164
+ mode: 'no_proration' | 'prorate_prices';
1165
1165
  }
1166
1166
  /** Subscription. */
1167
1167
  export interface Subscription {
@@ -1180,12 +1180,12 @@ export interface Subscription {
1180
1180
  /** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) */
1181
1181
  billing_anchor: string;
1182
1182
  /** The status of the subscription. */
1183
- status: "active" | "inactive" | "canceled" | "scheduled";
1183
+ status: 'active' | 'inactive' | 'canceled' | 'scheduled';
1184
1184
  }
1185
1185
  /** Available apps for billing integrations to connect with third-party services. Apps can have various capabilities like syncing data from or to external systems, integrating with third-party services for tax calculation, delivery of invoices, collection of payments, etc. */
1186
1186
  export interface AppCatalogItem {
1187
1187
  /** Type of the app. */
1188
- type: "sandbox" | "stripe" | "external_invoicing";
1188
+ type: 'sandbox' | 'stripe' | 'external_invoicing';
1189
1189
  /** Name of the app. */
1190
1190
  name: string;
1191
1191
  /** Description of the app. */
@@ -1194,7 +1194,7 @@ export interface AppCatalogItem {
1194
1194
  /** Mapping of app types to tax codes. */
1195
1195
  export interface TaxCodeAppMapping {
1196
1196
  /** The app type that the tax code is associated with. */
1197
- app_type: "sandbox" | "stripe" | "external_invoicing";
1197
+ app_type: 'sandbox' | 'stripe' | 'external_invoicing';
1198
1198
  /** Tax code. */
1199
1199
  tax_code: string;
1200
1200
  }
@@ -1205,7 +1205,7 @@ export interface PartyTaxIdentity {
1205
1205
  }
1206
1206
  /** Filter options for listing currencies. */
1207
1207
  export interface ListCurrenciesParamsFilter {
1208
- type?: "fiat" | "custom";
1208
+ type?: 'fiat' | 'custom';
1209
1209
  code?: string | {
1210
1210
  eq?: string;
1211
1211
  neq?: string;
@@ -1223,7 +1223,7 @@ export interface ListCurrenciesParamsFilter {
1223
1223
  export interface CurrencyCustom {
1224
1224
  id: string;
1225
1225
  /** The type of the currency. */
1226
- type: "custom";
1226
+ type: 'custom';
1227
1227
  /** The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro". */
1228
1228
  name: string;
1229
1229
  /** Description of the currency. */
@@ -1254,7 +1254,7 @@ export interface GovernanceQueryRequest {
1254
1254
  /** Reason a feature is not accessible to a customer. */
1255
1255
  export interface GovernanceFeatureAccessReason {
1256
1256
  /** Machine-readable error code. */
1257
- code: "unknown" | "usage_limit_reached" | "feature_unavailable" | "feature_not_found" | "no_credit_available";
1257
+ code: 'unknown' | 'usage_limit_reached' | 'feature_unavailable' | 'feature_not_found' | 'no_credit_available';
1258
1258
  /** Human-readable description of the error. */
1259
1259
  message: string;
1260
1260
  /** Additional structured context. */
@@ -1263,7 +1263,7 @@ export interface GovernanceFeatureAccessReason {
1263
1263
  /** Query error within a partially successful governance query response. */
1264
1264
  export interface GovernanceQueryError {
1265
1265
  /** Machine-readable error code. */
1266
- code: "unknown" | "customer_not_found";
1266
+ code: 'unknown' | 'customer_not_found';
1267
1267
  /** Human-readable description of the error. */
1268
1268
  message: string;
1269
1269
  /** Additional structured context. */
@@ -1274,11 +1274,11 @@ export interface GovernanceQueryError {
1274
1274
  /** Unit conversion configuration. Transforms raw metered quantities into billing-ready units before pricing and entitlement evaluation. Applied at the rate card level so the same feature can be billed in different units across plans. Examples: - Meter bytes, bill GB: operation=divide, conversionFactor=1e9, rounding=ceiling, displayUnit="GB" - Meter seconds, bill hours: operation=divide, conversionFactor=3600, rounding=ceiling, displayUnit="hours" - Cost + 20% margin: operation=multiply, conversionFactor=1.2 - Bill per million tokens: operation=divide, conversionFactor=1e6, rounding=ceiling, displayUnit="M" v1 equivalents: - DynamicPrice(multiplier): operation=multiply, conversionFactor=multiplier + UnitPrice(amount=1) - PackagePrice(amount, quantityPerPkg): operation=divide, conversionFactor=quantityPerPkg, rounding=ceiling + UnitPrice(amount) */
1275
1275
  export interface UnitConfig {
1276
1276
  /** The arithmetic operation to apply to the raw metered quantity. */
1277
- operation: "divide" | "multiply";
1277
+ operation: 'divide' | 'multiply';
1278
1278
  /** The factor used in the conversion operation. - For `divide`: `converted = raw / conversionFactor`. - For `multiply`: `converted = raw × conversionFactor`. Must be a positive non-zero value. */
1279
1279
  conversion_factor: string;
1280
1280
  /** The rounding mode applied to the converted quantity for invoicing. Defaults to none (no rounding). Entitlement checks always use the precise (unrounded) value. */
1281
- rounding: "ceiling" | "floor" | "half_up" | "none";
1281
+ rounding: 'ceiling' | 'floor' | 'half_up' | 'none';
1282
1282
  /** The number of decimal places to retain after rounding. Only meaningful when rounding is not "none". Defaults to 0 (round to whole numbers). */
1283
1283
  precision: number;
1284
1284
  /** A human-readable label for the converted unit shown on invoices and in the customer portal (e.g., "GB", "hours", "M tokens"). Optional. When omitted, no unit label is rendered. */
@@ -1333,7 +1333,7 @@ export interface CreateCreditAdjustmentRequest {
1333
1333
  /** Filter options for listing credit transactions. */
1334
1334
  export interface ListCreditTransactionsParamsFilter {
1335
1335
  /** Filter credit transactions by type. */
1336
- type?: "funded" | "consumed" | "expired";
1336
+ type?: 'funded' | 'consumed' | 'expired';
1337
1337
  /** Filter credit transactions by currency. */
1338
1338
  currency?: string;
1339
1339
  }
@@ -1350,7 +1350,7 @@ export interface CreditTransaction {
1350
1350
  /** The date and time the transaction was booked. */
1351
1351
  booked_at: string;
1352
1352
  /** The type of credit transaction. */
1353
- type: "funded" | "consumed" | "expired";
1353
+ type: 'funded' | 'consumed' | 'expired';
1354
1354
  /** Currency of the balance affected by the transaction. */
1355
1355
  currency: string;
1356
1356
  /** Signed amount of the credit movement. Positive values add balance, negative values reduce balance. */
@@ -1380,7 +1380,7 @@ export interface ChargeTotals {
1380
1380
  /** LLM cost lookup configuration. Each dimension (provider, model, token type) can be specified as either a static value or a meter group-by property name (mutually exclusive). */
1381
1381
  export interface FeatureLlmUnitCost {
1382
1382
  /** The type discriminator for LLM unit cost. */
1383
- type: "llm";
1383
+ type: 'llm';
1384
1384
  /** Meter group-by property that holds the LLM provider. Use this when the meter has a group-by dimension for provider. Mutually exclusive with `provider`. */
1385
1385
  provider_property?: string;
1386
1386
  /** Static LLM provider value (e.g., "openai", "anthropic"). Use this when the feature tracks a single provider. Mutually exclusive with `provider_property`. */
@@ -1392,7 +1392,7 @@ export interface FeatureLlmUnitCost {
1392
1392
  /** Meter group-by property that holds the token type. Use this when the meter has a group-by dimension for token type. Mutually exclusive with `token_type`. */
1393
1393
  token_type_property?: string;
1394
1394
  /** Static token type value. Use this when the feature tracks a single token type (e.g., only input tokens). `request` is an alias for `input`, `response` is an alias for `output`. Mutually exclusive with `token_type_property`. */
1395
- token_type?: "input" | "output" | "cache_read" | "cache_write" | "reasoning" | "request" | "response";
1395
+ token_type?: 'input' | 'output' | 'cache_read' | 'cache_write' | 'reasoning' | 'request' | 'response';
1396
1396
  /** Resolved per-token pricing from the LLM cost database. Populated in responses when the provider and model can be determined, either from static values or from meter group-by filters with exact matches. */
1397
1397
  pricing?: FeatureLlmUnitCostPricing;
1398
1398
  }
@@ -1409,7 +1409,7 @@ export interface LlmCostPrice {
1409
1409
  /** Currency code (currently always "USD"). */
1410
1410
  currency: string;
1411
1411
  /** Where this price came from. */
1412
- source: "manual" | "system";
1412
+ source: 'manual' | 'system';
1413
1413
  /** When this price becomes effective. */
1414
1414
  effective_from: string;
1415
1415
  /** When this price expires. Omitted when the price is currently effective. */
@@ -1609,21 +1609,21 @@ export interface ListAddonsParamsFilter {
1609
1609
  /** Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants. */
1610
1610
  export interface CreateCreditGrantTaxConfig {
1611
1611
  /** Tax behavior applied to the invoice line item. */
1612
- behavior?: "inclusive" | "exclusive";
1612
+ behavior?: 'inclusive' | 'exclusive';
1613
1613
  /** Tax code applied to the invoice line item. */
1614
1614
  tax_code?: CreateResourceReference;
1615
1615
  }
1616
1616
  /** Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants. */
1617
1617
  export interface CreditGrantTaxConfig {
1618
1618
  /** Tax behavior applied to the invoice line item. */
1619
- behavior?: "inclusive" | "exclusive";
1619
+ behavior?: 'inclusive' | 'exclusive';
1620
1620
  /** Tax code applied to the invoice line item. */
1621
1621
  tax_code?: TaxCodeReference;
1622
1622
  }
1623
1623
  /** Set of provider specific tax configs. */
1624
1624
  export interface TaxConfig {
1625
1625
  /** Tax behavior. If not specified the billing profile is used to determine the tax behavior. If not specified in the billing profile, the provider's default behavior is used. */
1626
- behavior?: "inclusive" | "exclusive";
1626
+ behavior?: 'inclusive' | 'exclusive';
1627
1627
  /** Stripe tax config. */
1628
1628
  stripe?: TaxConfigStripe;
1629
1629
  /** External invoicing tax config. */
@@ -1635,7 +1635,7 @@ export interface TaxConfig {
1635
1635
  }
1636
1636
  /** The tax config of the rate card. */
1637
1637
  export interface RateCardTaxConfig {
1638
- behavior?: "inclusive" | "exclusive";
1638
+ behavior?: 'inclusive' | 'exclusive';
1639
1639
  code: TaxCodeReference;
1640
1640
  }
1641
1641
  /** Organization-level default tax code references. Stores the default tax codes applied to specific billing contexts for this organization. Provisioned automatically when the organization is created. */
@@ -2015,9 +2015,9 @@ export interface AppStripeCreateCheckoutSessionConsentCollection {
2015
2015
  /** Controls the visibility of payment method reuse agreement. */
2016
2016
  payment_method_reuse_agreement?: AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement;
2017
2017
  /** Enables collection of promotional communication consent. Only available to US merchants. When set to "auto", Checkout determines whether to show the option based on the customer's locale. */
2018
- promotions?: "auto" | "none";
2018
+ promotions?: 'auto' | 'none';
2019
2019
  /** Requires customers to accept terms of service before payment. Requires a valid terms of service URL in your Stripe Dashboard settings. */
2020
- terms_of_service?: "none" | "required";
2020
+ terms_of_service?: 'none' | 'required';
2021
2021
  }
2022
2022
  /** List customer entitlement access response data. */
2023
2023
  export interface ListCustomerEntitlementAccessResponseData {
@@ -2027,7 +2027,7 @@ export interface ListCustomerEntitlementAccessResponseData {
2027
2027
  /** BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice. */
2028
2028
  export interface WorkflowCollectionAlignmentAnchored {
2029
2029
  /** The type of alignment. */
2030
- type: "anchored";
2030
+ type: 'anchored';
2031
2031
  /** The recurring period for the alignment. */
2032
2032
  recurring_period: RecurringPeriod;
2033
2033
  }
@@ -2046,7 +2046,7 @@ export interface SubscriptionChangeResponse {
2046
2046
  /** Request for canceling a subscription. */
2047
2047
  export interface SubscriptionCancel {
2048
2048
  /** If not provided the subscription is canceled immediately. */
2049
- timing: "immediate" | "next_billing_cycle" | string;
2049
+ timing: 'immediate' | 'next_billing_cycle' | string;
2050
2050
  }
2051
2051
  /** Request for changing a subscription. */
2052
2052
  export interface SubscriptionChange {
@@ -2065,7 +2065,7 @@ export interface SubscriptionChange {
2065
2065
  /** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) If not provided, the subscription will be created with the subscription's creation time as the billing anchor. */
2066
2066
  billing_anchor?: string;
2067
2067
  /** Timing configuration for the change, when the change should take effect. For changing a subscription, the accepted values depend on the subscription configuration. */
2068
- timing: "immediate" | "next_billing_cycle" | string;
2068
+ timing: 'immediate' | 'next_billing_cycle' | string;
2069
2069
  }
2070
2070
  /** Stripe app. */
2071
2071
  export interface AppStripe {
@@ -2082,11 +2082,11 @@ export interface AppStripe {
2082
2082
  /** An ISO-8601 timestamp representation of entity deletion date. */
2083
2083
  deleted_at?: string;
2084
2084
  /** The app type. */
2085
- type: "stripe";
2085
+ type: 'stripe';
2086
2086
  /** The app catalog definition that this installed app is based on. */
2087
2087
  definition: AppCatalogItem;
2088
2088
  /** Status of the app connection. */
2089
- status: "ready" | "unauthorized";
2089
+ status: 'ready' | 'unauthorized';
2090
2090
  /** The Stripe account ID associated with the connected Stripe account. */
2091
2091
  account_id: string;
2092
2092
  /** Indicates whether the app is connected to a live Stripe account. */
@@ -2111,11 +2111,11 @@ export interface AppSandbox {
2111
2111
  /** An ISO-8601 timestamp representation of entity deletion date. */
2112
2112
  deleted_at?: string;
2113
2113
  /** The app type. */
2114
- type: "sandbox";
2114
+ type: 'sandbox';
2115
2115
  /** The app catalog definition that this installed app is based on. */
2116
2116
  definition: AppCatalogItem;
2117
2117
  /** Status of the app connection. */
2118
- status: "ready" | "unauthorized";
2118
+ status: 'ready' | 'unauthorized';
2119
2119
  }
2120
2120
  /** External Invoicing app enables integration with third-party invoicing or payment system. The app supports a bi-directional synchronization pattern where OpenMeter Billing manages the invoice lifecycle while the external system handles invoice presentation and payment collection. Integration workflow: 1. The billing system creates invoices and transitions them through lifecycle states (draft → issuing → issued) 2. The integration receives webhook notifications about invoice state changes 3. The integration calls back to provide external system IDs and metadata 4. The integration reports payment events back via the payment status API State synchronization is controlled by hooks that pause invoice progression until the external system confirms synchronization via API callbacks. */
2121
2121
  export interface AppExternalInvoicing {
@@ -2132,11 +2132,11 @@ export interface AppExternalInvoicing {
2132
2132
  /** An ISO-8601 timestamp representation of entity deletion date. */
2133
2133
  deleted_at?: string;
2134
2134
  /** The app type. */
2135
- type: "external_invoicing";
2135
+ type: 'external_invoicing';
2136
2136
  /** The app catalog definition that this installed app is based on. */
2137
2137
  definition: AppCatalogItem;
2138
2138
  /** Status of the app connection. */
2139
- status: "ready" | "unauthorized";
2139
+ status: 'ready' | 'unauthorized';
2140
2140
  /** Enable draft synchronization hook. When enabled, invoices will pause at the draft state and wait for the integration to call the draft synchronized endpoint before progressing to the issuing state. This allows the external system to validate and prepare the invoice data. When disabled, invoices automatically progress through the draft state based on the configured workflow timing. */
2141
2141
  enable_draft_sync_hook: boolean;
2142
2142
  /** Enable issuing synchronization hook. When enabled, invoices will pause at the issuing state and wait for the integration to call the issuing synchronized endpoint before progressing to the issued state. This ensures the external invoicing system has successfully created and finalized the invoice before it is marked as issued. When disabled, invoices automatically progress through the issuing state and are immediately marked as issued. */
@@ -2230,14 +2230,14 @@ export interface CreditTransactionPaginatedResponse {
2230
2230
  /** Graduated tiered price. Each tier's rate applies only to the usage within that tier. Pricing can change as cumulative usage crosses tier boundaries. When UnitConfig is present on the rate card, tier boundaries (up_to_amount) are expressed in converted billing units. */
2231
2231
  export interface PriceGraduated {
2232
2232
  /** The type of the price. */
2233
- type: "graduated";
2233
+ type: 'graduated';
2234
2234
  /** The tiers of the graduated price. At least one tier is required. */
2235
2235
  tiers: PriceTier[];
2236
2236
  }
2237
2237
  /** Volume tiered price. The maximum quantity within a period determines the per-unit price for all units in that period. When UnitConfig is present on the rate card, tier boundaries (up_to_amount) are expressed in converted billing units. */
2238
2238
  export interface PriceVolume {
2239
2239
  /** The type of the price. */
2240
- type: "volume";
2240
+ type: 'volume';
2241
2241
  /** The tiers of the volume price. At least one tier is required. */
2242
2242
  tiers: PriceTier[];
2243
2243
  }
@@ -2254,7 +2254,7 @@ export interface CreateCreditGrantRequest {
2254
2254
  description?: string;
2255
2255
  labels?: CreateLabels;
2256
2256
  /** Funding method of the grant. */
2257
- funding_method: "none" | "invoice" | "external";
2257
+ funding_method: 'none' | 'invoice' | 'external';
2258
2258
  /** The currency of the granted credits. */
2259
2259
  currency: string;
2260
2260
  /** Granted credit amount. */
@@ -2265,7 +2265,7 @@ export interface CreateCreditGrantRequest {
2265
2265
  tax_config?: CreateCreditGrantTaxConfig;
2266
2266
  filters?: CreateCreditGrantFilters;
2267
2267
  /** Draw-down priority of the grant. Lower values have higher priority. */
2268
- priority: bigint;
2268
+ priority: number;
2269
2269
  /** The duration after which the credit grant expires. Defaults to never expiring. */
2270
2270
  expires_after?: string;
2271
2271
  }
@@ -2284,7 +2284,7 @@ export interface CreditGrant {
2284
2284
  /** An ISO-8601 timestamp representation of entity deletion date. */
2285
2285
  deleted_at?: string;
2286
2286
  /** Funding method of the grant. */
2287
- funding_method: "none" | "invoice" | "external";
2287
+ funding_method: 'none' | 'invoice' | 'external';
2288
2288
  /** The currency of the granted credits. */
2289
2289
  currency: string;
2290
2290
  /** Granted credit amount. */
@@ -2297,7 +2297,7 @@ export interface CreditGrant {
2297
2297
  invoice?: CreditGrantInvoiceReference;
2298
2298
  filters?: CreditGrantFilters;
2299
2299
  /** Draw-down priority of the grant. Lower values have higher priority. */
2300
- priority: bigint;
2300
+ priority: number;
2301
2301
  /** The duration after which the credit grant expires. Defaults to never expiring. */
2302
2302
  expires_after?: string;
2303
2303
  /** The timestamp when the credit grant expires. Calculated from the grant effective time and `expires_after` if provided. */
@@ -2305,7 +2305,7 @@ export interface CreditGrant {
2305
2305
  /** Timestamp when the grant was voided. */
2306
2306
  voided_at?: string;
2307
2307
  /** Current lifecycle status of the grant. */
2308
- status: "pending" | "active" | "expired" | "voided";
2308
+ status: 'pending' | 'active' | 'expired' | 'voided';
2309
2309
  }
2310
2310
  /** Tax settings for a billing workflow. */
2311
2311
  export interface WorkflowTaxSettings {
@@ -2340,7 +2340,7 @@ export interface MeterQueryRequest {
2340
2340
  /** The end of the period the usage is queried to. */
2341
2341
  to?: string;
2342
2342
  /** The size of the time buckets to group the usage into. If not specified, the usage is aggregated over the entire period. */
2343
- granularity?: "PT1M" | "PT1H" | "P1D" | "P1M";
2343
+ granularity?: 'PT1M' | 'PT1H' | 'P1D' | 'P1M';
2344
2344
  /** The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). The time zone is used to determine the start and end of the time buckets. If not specified, the UTC timezone will be used. */
2345
2345
  time_zone: string;
2346
2346
  /** The dimensions to group the results by. */
@@ -2369,7 +2369,7 @@ export interface Party {
2369
2369
  /** Configuration options for creating a Stripe Checkout Session. Based on Stripe's [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create). */
2370
2370
  export interface AppStripeCreateCheckoutSessionRequestOptions {
2371
2371
  /** Whether to collect the customer's billing address. Defaults to auto, which only collects the address when necessary for tax calculation. */
2372
- billing_address_collection: "auto" | "required";
2372
+ billing_address_collection: 'auto' | 'required';
2373
2373
  /** URL to redirect customers who cancel the checkout session. Not allowed when ui_mode is "embedded". */
2374
2374
  cancel_url?: string;
2375
2375
  /** Unique reference string for reconciling sessions with internal systems. Can be a customer ID, cart ID, or any other identifier. */
@@ -2393,11 +2393,11 @@ export interface AppStripeCreateCheckoutSessionRequestOptions {
2393
2393
  /** Success URL to redirect customers after completing payment or setup. Not allowed when ui_mode is "embedded". See: https://docs.stripe.com/payments/checkout/custom-success-page */
2394
2394
  success_url?: string;
2395
2395
  /** The UI mode for the checkout session. "hosted" displays a Stripe-hosted page. "embedded" integrates directly into your app. Defaults to "hosted". */
2396
- ui_mode: "embedded" | "hosted";
2396
+ ui_mode: 'embedded' | 'hosted';
2397
2397
  /** List of payment method types to enable (e.g., "card", "us_bank_account"). If not specified, Stripe enables all relevant payment methods. */
2398
2398
  payment_method_types?: string[];
2399
2399
  /** Redirect behavior for embedded checkout sessions. Controls when to redirect users after completion. See: https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form */
2400
- redirect_on_completion?: "always" | "if_required" | "never";
2400
+ redirect_on_completion?: 'always' | 'if_required' | 'never';
2401
2401
  /** Configuration for collecting tax IDs during checkout. */
2402
2402
  tax_id_collection?: AppStripeCreateCheckoutSessionTaxIdCollection;
2403
2403
  }
@@ -2520,17 +2520,17 @@ export interface FlatFeeCharge {
2520
2520
  /** An ISO-8601 timestamp representation of entity deletion date. */
2521
2521
  deleted_at?: string;
2522
2522
  /** The type of the charge. */
2523
- type: "flat_fee";
2523
+ type: 'flat_fee';
2524
2524
  /** The customer owning the charge. */
2525
2525
  customer: BillingCustomerReference;
2526
2526
  /** The charge is managed by the following entity. */
2527
- managed_by: "manual" | "system" | "subscription";
2527
+ managed_by: 'manual' | 'system' | 'subscription';
2528
2528
  /** The subscription that originated the charge, when the charge was created from a subscription item. */
2529
2529
  subscription?: SubscriptionReference;
2530
2530
  /** The currency of the charge. */
2531
2531
  currency: string;
2532
2532
  /** The lifecycle status of the charge. */
2533
- status: "created" | "active" | "final" | "deleted";
2533
+ status: 'created' | 'active' | 'final' | 'deleted';
2534
2534
  /** The timestamp when the charge is intended to be invoiced. */
2535
2535
  invoice_at: string;
2536
2536
  /** The effective service period covered by the charge. */
@@ -2546,11 +2546,11 @@ export interface FlatFeeCharge {
2546
2546
  /** Unique reference ID of the charge. */
2547
2547
  unique_reference_id?: string;
2548
2548
  /** Settlement mode of the charge. */
2549
- settlement_mode: "credit_then_invoice" | "credit_only";
2549
+ settlement_mode: 'credit_then_invoice' | 'credit_only';
2550
2550
  /** Tax configuration of the charge. */
2551
2551
  tax_config?: TaxConfig;
2552
2552
  /** Payment term of the flat fee charge. */
2553
- payment_term: "in_advance" | "in_arrears";
2553
+ payment_term: 'in_advance' | 'in_arrears';
2554
2554
  /** The discounts applied to the charge. */
2555
2555
  discounts?: FlatFeeDiscounts;
2556
2556
  /** The feature associated with the charge, when applicable. */
@@ -2575,17 +2575,17 @@ export interface UsageBasedCharge {
2575
2575
  /** An ISO-8601 timestamp representation of entity deletion date. */
2576
2576
  deleted_at?: string;
2577
2577
  /** The type of the charge. */
2578
- type: "usage_based";
2578
+ type: 'usage_based';
2579
2579
  /** The customer owning the charge. */
2580
2580
  customer: BillingCustomerReference;
2581
2581
  /** The charge is managed by the following entity. */
2582
- managed_by: "manual" | "system" | "subscription";
2582
+ managed_by: 'manual' | 'system' | 'subscription';
2583
2583
  /** The subscription that originated the charge, when the charge was created from a subscription item. */
2584
2584
  subscription?: SubscriptionReference;
2585
2585
  /** The currency of the charge. */
2586
2586
  currency: string;
2587
2587
  /** The lifecycle status of the charge. */
2588
- status: "created" | "active" | "final" | "deleted";
2588
+ status: 'created' | 'active' | 'final' | 'deleted';
2589
2589
  /** The timestamp when the charge is intended to be invoiced. */
2590
2590
  invoice_at: string;
2591
2591
  /** The effective service period covered by the charge. */
@@ -2601,7 +2601,7 @@ export interface UsageBasedCharge {
2601
2601
  /** Unique reference ID of the charge. */
2602
2602
  unique_reference_id?: string;
2603
2603
  /** Settlement mode of the charge. */
2604
- settlement_mode: "credit_then_invoice" | "credit_only";
2604
+ settlement_mode: 'credit_then_invoice' | 'credit_only';
2605
2605
  /** Tax configuration of the charge. */
2606
2606
  tax_config?: TaxConfig;
2607
2607
  /** Discounts applied to the usage-based charge. */
@@ -2626,7 +2626,7 @@ export interface RateCard {
2626
2626
  /** The price of the rate card. */
2627
2627
  price: PriceFree | PriceFlat | PriceUnit | PriceGraduated | PriceVolume;
2628
2628
  /** The payment term of the rate card. In advance payment term can only be used for flat prices. */
2629
- payment_term: "in_advance" | "in_arrears";
2629
+ payment_term: 'in_advance' | 'in_arrears';
2630
2630
  /** Spend commitments for this rate card. Only applicable to usage-based prices (unit, graduated, volume). */
2631
2631
  commitments?: SpendCommitments;
2632
2632
  /** The discounts of the rate card. */
@@ -2682,7 +2682,7 @@ export interface Addon {
2682
2682
  /** Version of the add-on. Incremented when the add-on is updated. */
2683
2683
  version: number;
2684
2684
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
2685
- instance_type: "single" | "multiple";
2685
+ instance_type: 'single' | 'multiple';
2686
2686
  /** The currency code of the add-on. */
2687
2687
  currency: string;
2688
2688
  /** The date and time when the add-on becomes effective. When not specified, the add-on is a draft. */
@@ -2690,7 +2690,7 @@ export interface Addon {
2690
2690
  /** The date and time when the add-on is no longer effective. When not specified, the add-on is effective indefinitely. */
2691
2691
  effective_to?: string;
2692
2692
  /** The status of the add-on. Computed based on the effective start and end dates: - `draft`: `effective_from` is not set. - `active`: `effective_from <= now` and (`effective_to` is not set or `now < effective_to`). - `archived`: `effective_to <= now`. */
2693
- status: "draft" | "active" | "archived";
2693
+ status: 'draft' | 'active' | 'archived';
2694
2694
  /** The rate cards of the add-on. */
2695
2695
  rate_cards: RateCard[];
2696
2696
  /** List of validation errors. */
@@ -2706,7 +2706,7 @@ export interface CreateAddonRequest {
2706
2706
  /** A key is a semi-unique string that is used to identify the add-on. It is used to reference the latest `active` version of the add-on and is unique with the version number. */
2707
2707
  key: string;
2708
2708
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
2709
- instance_type: "single" | "multiple";
2709
+ instance_type: 'single' | 'multiple';
2710
2710
  /** The currency code of the add-on. */
2711
2711
  currency: string;
2712
2712
  /** The rate cards of the add-on. */
@@ -2720,7 +2720,7 @@ export interface UpsertAddonRequest {
2720
2720
  description?: string;
2721
2721
  labels?: Labels;
2722
2722
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
2723
- instance_type: "single" | "multiple";
2723
+ instance_type: 'single' | 'multiple';
2724
2724
  /** The rate cards of the add-on. */
2725
2725
  rate_cards: RateCard[];
2726
2726
  }
@@ -2811,7 +2811,7 @@ export interface Plan {
2811
2811
  /** A scheduled date and time when the plan becomes `archived`. When not specified, the plan is in `active` status indefinitely. */
2812
2812
  effective_to?: string;
2813
2813
  /** The status of the plan. Computed based on the effective start and end dates: - `draft`: `effective_from` is not set. - `scheduled`: `now < effective_from`. - `active`: `effective_from <= now` and (`effective_to` is not set or `now < effective_to`). - `archived`: `effective_to <= now`. */
2814
- status: "draft" | "active" | "archived" | "scheduled";
2814
+ status: 'draft' | 'active' | 'archived' | 'scheduled';
2815
2815
  /** The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required. */
2816
2816
  phases: PlanPhase[];
2817
2817
  /** List of validation errors in `draft` state that prevent the plan from being published. */
@@ -2866,7 +2866,7 @@ export interface SortQueryInput {
2866
2866
  /** The attribute to sort by. */
2867
2867
  by: string;
2868
2868
  /** The sort order. `asc` for ascending, `desc` for descending. */
2869
- order?: "asc" | "desc";
2869
+ order?: 'asc' | 'desc';
2870
2870
  }
2871
2871
  export interface BaseErrorInput {
2872
2872
  /** Type contains a URI that identifies the problem type. */
@@ -2891,7 +2891,7 @@ export interface WorkflowInvoicingSettingsInput {
2891
2891
  }
2892
2892
  export interface WorkflowPaymentSendInvoiceSettingsInput {
2893
2893
  /** The collection method for the invoice. */
2894
- collection_method: "send_invoice";
2894
+ collection_method: 'send_invoice';
2895
2895
  /** The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method. */
2896
2896
  due_after?: string;
2897
2897
  }
@@ -2905,7 +2905,7 @@ export interface EventInput {
2905
2905
  /** Contains a value describing the type of event related to the originating occurrence. */
2906
2906
  type: string;
2907
2907
  /** Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP. */
2908
- datacontenttype?: "application/json" | null;
2908
+ datacontenttype?: 'application/json' | null;
2909
2909
  /** Identifies the schema that data adheres to. */
2910
2910
  dataschema?: string | null;
2911
2911
  /** Describes the subject of the event in the context of the event producer (identified by source). */
@@ -2941,17 +2941,17 @@ export interface NotAvailableInput extends BaseErrorInput {
2941
2941
  }
2942
2942
  export interface AppStripeCreateCheckoutSessionCustomerUpdateInput {
2943
2943
  /** Whether to save the billing address to customer.address. Defaults to "never". */
2944
- address?: "auto" | "never";
2944
+ address?: 'auto' | 'never';
2945
2945
  /** Whether to save the customer name to customer.name. Defaults to "never". */
2946
- name?: "auto" | "never";
2946
+ name?: 'auto' | 'never';
2947
2947
  /** Whether to save shipping information to customer.shipping. Defaults to "never". */
2948
- shipping?: "auto" | "never";
2948
+ shipping?: 'auto' | 'never';
2949
2949
  }
2950
2950
  export interface AppStripeCreateCheckoutSessionTaxIdCollectionInput {
2951
2951
  /** Enable tax ID collection during checkout. Defaults to false. */
2952
2952
  enabled?: boolean;
2953
2953
  /** Whether tax ID collection is required. Defaults to "never". */
2954
- required?: "if_supported" | "never";
2954
+ required?: 'if_supported' | 'never';
2955
2955
  }
2956
2956
  export interface CreateCreditGrantPurchaseInput {
2957
2957
  /** Currency of the purchase amount. */
@@ -2959,7 +2959,7 @@ export interface CreateCreditGrantPurchaseInput {
2959
2959
  /** Cost basis per credit unit used to calculate the purchase amount. If `per_unit_cost_basis` is 0.50 and credit amount is $100.00, the total charge is $50.00. The value must be greater than 0. If the cost basis is 0, use `funding_method=none` instead. Defaults to 1.0. */
2960
2960
  per_unit_cost_basis?: string;
2961
2961
  /** Controls when credits become available for consumption. Defaults to `on_creation`. */
2962
- availability_policy?: "on_creation";
2962
+ availability_policy?: 'on_creation';
2963
2963
  }
2964
2964
  export interface CreditGrantPurchaseInput {
2965
2965
  /** Currency of the purchase amount. */
@@ -2969,9 +2969,9 @@ export interface CreditGrantPurchaseInput {
2969
2969
  /** The purchase amount. Calculated from `per_unit_cost_basis` and credit `amount`. */
2970
2970
  amount: string;
2971
2971
  /** Controls when credits become available for consumption. Defaults to `on_creation`. */
2972
- availability_policy?: "on_creation";
2972
+ availability_policy?: 'on_creation';
2973
2973
  /** Current payment settlement status. */
2974
- settlement_status?: "pending" | "authorized" | "settled";
2974
+ settlement_status?: 'pending' | 'authorized' | 'settled';
2975
2975
  }
2976
2976
  export interface GovernanceQueryRequestInput {
2977
2977
  /** Whether to include credit balance availability for each resolved customer. When true, each feature evaluation includes credit balance checks. Defaults to `false`. */
@@ -2981,11 +2981,11 @@ export interface GovernanceQueryRequestInput {
2981
2981
  }
2982
2982
  export interface UnitConfigInput {
2983
2983
  /** The arithmetic operation to apply to the raw metered quantity. */
2984
- operation: "divide" | "multiply";
2984
+ operation: 'divide' | 'multiply';
2985
2985
  /** The factor used in the conversion operation. - For `divide`: `converted = raw / conversionFactor`. - For `multiply`: `converted = raw × conversionFactor`. Must be a positive non-zero value. */
2986
2986
  conversion_factor: string;
2987
2987
  /** The rounding mode applied to the converted quantity for invoicing. Defaults to none (no rounding). Entitlement checks always use the precise (unrounded) value. */
2988
- rounding?: "ceiling" | "floor" | "half_up" | "none";
2988
+ rounding?: 'ceiling' | 'floor' | 'half_up' | 'none';
2989
2989
  /** The number of decimal places to retain after rounding. Only meaningful when rounding is not "none". Defaults to 0 (round to whole numbers). */
2990
2990
  precision?: number;
2991
2991
  /** A human-readable label for the converted unit shown on invoices and in the customer portal (e.g., "GB", "hours", "M tokens"). Optional. When omitted, no unit label is rendered. */
@@ -3005,7 +3005,7 @@ export interface IngestedEventInput {
3005
3005
  }
3006
3006
  export interface SubscriptionCancelInput {
3007
3007
  /** If not provided the subscription is canceled immediately. */
3008
- timing?: "immediate" | "next_billing_cycle" | string;
3008
+ timing?: 'immediate' | 'next_billing_cycle' | string;
3009
3009
  }
3010
3010
  export interface InvoiceUsageQuantityDetailInput {
3011
3011
  /** The raw quantity as reported by the meter (native units). */
@@ -3026,7 +3026,7 @@ export interface CreateCreditGrantRequestInput {
3026
3026
  description?: string;
3027
3027
  labels?: CreateLabels;
3028
3028
  /** Funding method of the grant. */
3029
- funding_method: "none" | "invoice" | "external";
3029
+ funding_method: 'none' | 'invoice' | 'external';
3030
3030
  /** The currency of the granted credits. */
3031
3031
  currency: string;
3032
3032
  /** Granted credit amount. */
@@ -3037,7 +3037,7 @@ export interface CreateCreditGrantRequestInput {
3037
3037
  tax_config?: CreateCreditGrantTaxConfig;
3038
3038
  filters?: CreateCreditGrantFilters;
3039
3039
  /** Draw-down priority of the grant. Lower values have higher priority. */
3040
- priority?: bigint;
3040
+ priority?: number;
3041
3041
  /** The duration after which the credit grant expires. Defaults to never expiring. */
3042
3042
  expires_after?: string;
3043
3043
  }
@@ -3055,7 +3055,7 @@ export interface CreditGrantInput {
3055
3055
  /** An ISO-8601 timestamp representation of entity deletion date. */
3056
3056
  deleted_at?: string;
3057
3057
  /** Funding method of the grant. */
3058
- funding_method: "none" | "invoice" | "external";
3058
+ funding_method: 'none' | 'invoice' | 'external';
3059
3059
  /** The currency of the granted credits. */
3060
3060
  currency: string;
3061
3061
  /** Granted credit amount. */
@@ -3068,7 +3068,7 @@ export interface CreditGrantInput {
3068
3068
  invoice?: CreditGrantInvoiceReference;
3069
3069
  filters?: CreditGrantFilters;
3070
3070
  /** Draw-down priority of the grant. Lower values have higher priority. */
3071
- priority?: bigint;
3071
+ priority?: number;
3072
3072
  /** The duration after which the credit grant expires. Defaults to never expiring. */
3073
3073
  expires_after?: string;
3074
3074
  /** The timestamp when the credit grant expires. Calculated from the grant effective time and `expires_after` if provided. */
@@ -3076,7 +3076,7 @@ export interface CreditGrantInput {
3076
3076
  /** Timestamp when the grant was voided. */
3077
3077
  voided_at?: string;
3078
3078
  /** Current lifecycle status of the grant. */
3079
- status: "pending" | "active" | "expired" | "voided";
3079
+ status: 'pending' | 'active' | 'expired' | 'voided';
3080
3080
  }
3081
3081
  export interface WorkflowTaxSettingsInput {
3082
3082
  /** Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax. */
@@ -3096,7 +3096,7 @@ export interface MeterQueryRequestInput {
3096
3096
  /** The end of the period the usage is queried to. */
3097
3097
  to?: string;
3098
3098
  /** The size of the time buckets to group the usage into. If not specified, the usage is aggregated over the entire period. */
3099
- granularity?: "PT1M" | "PT1H" | "P1D" | "P1M";
3099
+ granularity?: 'PT1M' | 'PT1H' | 'P1D' | 'P1M';
3100
3100
  /** The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). The time zone is used to determine the start and end of the time buckets. If not specified, the UTC timezone will be used. */
3101
3101
  time_zone?: string;
3102
3102
  /** The dimensions to group the results by. */
@@ -3106,7 +3106,7 @@ export interface MeterQueryRequestInput {
3106
3106
  }
3107
3107
  export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
3108
3108
  /** Whether to collect the customer's billing address. Defaults to auto, which only collects the address when necessary for tax calculation. */
3109
- billing_address_collection?: "auto" | "required";
3109
+ billing_address_collection?: 'auto' | 'required';
3110
3110
  /** URL to redirect customers who cancel the checkout session. Not allowed when ui_mode is "embedded". */
3111
3111
  cancel_url?: string;
3112
3112
  /** Unique reference string for reconciling sessions with internal systems. Can be a customer ID, cart ID, or any other identifier. */
@@ -3130,11 +3130,11 @@ export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
3130
3130
  /** Success URL to redirect customers after completing payment or setup. Not allowed when ui_mode is "embedded". See: https://docs.stripe.com/payments/checkout/custom-success-page */
3131
3131
  success_url?: string;
3132
3132
  /** The UI mode for the checkout session. "hosted" displays a Stripe-hosted page. "embedded" integrates directly into your app. Defaults to "hosted". */
3133
- ui_mode?: "embedded" | "hosted";
3133
+ ui_mode?: 'embedded' | 'hosted';
3134
3134
  /** List of payment method types to enable (e.g., "card", "us_bank_account"). If not specified, Stripe enables all relevant payment methods. */
3135
3135
  payment_method_types?: string[];
3136
3136
  /** Redirect behavior for embedded checkout sessions. Controls when to redirect users after completion. See: https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form */
3137
- redirect_on_completion?: "always" | "if_required" | "never";
3137
+ redirect_on_completion?: 'always' | 'if_required' | 'never';
3138
3138
  /** Configuration for collecting tax IDs during checkout. */
3139
3139
  tax_id_collection?: AppStripeCreateCheckoutSessionTaxIdCollectionInput;
3140
3140
  }
@@ -3170,7 +3170,7 @@ export interface RateCardInput {
3170
3170
  /** The price of the rate card. */
3171
3171
  price: PriceFree | PriceFlat | PriceUnit | PriceGraduated | PriceVolume;
3172
3172
  /** The payment term of the rate card. In advance payment term can only be used for flat prices. */
3173
- payment_term?: "in_advance" | "in_arrears";
3173
+ payment_term?: 'in_advance' | 'in_arrears';
3174
3174
  /** Spend commitments for this rate card. Only applicable to usage-based prices (unit, graduated, volume). */
3175
3175
  commitments?: SpendCommitments;
3176
3176
  /** The discounts of the rate card. */
@@ -3218,7 +3218,7 @@ export interface AddonInput {
3218
3218
  /** Version of the add-on. Incremented when the add-on is updated. */
3219
3219
  version?: number;
3220
3220
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
3221
- instance_type: "single" | "multiple";
3221
+ instance_type: 'single' | 'multiple';
3222
3222
  /** The currency code of the add-on. */
3223
3223
  currency: string;
3224
3224
  /** The date and time when the add-on becomes effective. When not specified, the add-on is a draft. */
@@ -3226,7 +3226,7 @@ export interface AddonInput {
3226
3226
  /** The date and time when the add-on is no longer effective. When not specified, the add-on is effective indefinitely. */
3227
3227
  effective_to?: string;
3228
3228
  /** The status of the add-on. Computed based on the effective start and end dates: - `draft`: `effective_from` is not set. - `active`: `effective_from <= now` and (`effective_to` is not set or `now < effective_to`). - `archived`: `effective_to <= now`. */
3229
- status: "draft" | "active" | "archived";
3229
+ status: 'draft' | 'active' | 'archived';
3230
3230
  /** The rate cards of the add-on. */
3231
3231
  rate_cards: RateCardInput[];
3232
3232
  /** List of validation errors. */
@@ -3241,7 +3241,7 @@ export interface CreateAddonRequestInput {
3241
3241
  /** A key is a semi-unique string that is used to identify the add-on. It is used to reference the latest `active` version of the add-on and is unique with the version number. */
3242
3242
  key: string;
3243
3243
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
3244
- instance_type: "single" | "multiple";
3244
+ instance_type: 'single' | 'multiple';
3245
3245
  /** The currency code of the add-on. */
3246
3246
  currency: string;
3247
3247
  /** The rate cards of the add-on. */
@@ -3254,7 +3254,7 @@ export interface UpsertAddonRequestInput {
3254
3254
  description?: string;
3255
3255
  labels?: Labels;
3256
3256
  /** The InstanceType of the add-ons. Can be "single" or "multiple". */
3257
- instance_type: "single" | "multiple";
3257
+ instance_type: 'single' | 'multiple';
3258
3258
  /** The rate cards of the add-on. */
3259
3259
  rate_cards: RateCardInput[];
3260
3260
  }
@@ -3336,7 +3336,7 @@ export interface PlanInput {
3336
3336
  /** A scheduled date and time when the plan becomes `archived`. When not specified, the plan is in `active` status indefinitely. */
3337
3337
  effective_to?: string;
3338
3338
  /** The status of the plan. Computed based on the effective start and end dates: - `draft`: `effective_from` is not set. - `scheduled`: `now < effective_from`. - `active`: `effective_from <= now` and (`effective_to` is not set or `now < effective_to`). - `archived`: `effective_to <= now`. */
3339
- status: "draft" | "active" | "archived" | "scheduled";
3339
+ status: 'draft' | 'active' | 'archived' | 'scheduled';
3340
3340
  /** The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required. */
3341
3341
  phases: PlanPhaseInput[];
3342
3342
  /** List of validation errors in `draft` state that prevent the plan from being published. */