@openmeter/client 1.0.0-beta.230 → 1.0.0-beta.231
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.
- package/LICENSE +202 -0
- package/README.md +347 -68
- package/dist/core.d.ts +0 -1
- package/dist/core.js +8 -1
- package/dist/funcs/addons.d.ts +49 -1
- package/dist/funcs/addons.js +50 -1
- package/dist/funcs/apps.d.ts +14 -1
- package/dist/funcs/apps.js +15 -1
- package/dist/funcs/billing.d.ts +46 -1
- package/dist/funcs/billing.js +47 -1
- package/dist/funcs/currencies.d.ts +30 -1
- package/dist/funcs/currencies.js +31 -1
- package/dist/funcs/customers.d.ts +165 -2
- package/dist/funcs/customers.js +192 -1
- package/dist/funcs/defaults.d.ts +10 -1
- package/dist/funcs/defaults.js +11 -1
- package/dist/funcs/entitlements.d.ts +5 -1
- package/dist/funcs/entitlements.js +6 -1
- package/dist/funcs/events.d.ts +14 -1
- package/dist/funcs/events.js +15 -1
- package/dist/funcs/features.d.ts +42 -1
- package/dist/funcs/features.js +43 -1
- package/dist/funcs/governance.d.ts +14 -1
- package/dist/funcs/governance.js +15 -1
- package/dist/funcs/index.d.ts +0 -1
- package/dist/funcs/index.js +1 -1
- package/dist/funcs/invoices.d.ts +44 -1
- package/dist/funcs/invoices.js +45 -1
- package/dist/funcs/llmCost.d.ts +36 -1
- package/dist/funcs/llmCost.js +37 -1
- package/dist/funcs/meters.d.ts +53 -1
- package/dist/funcs/meters.js +54 -1
- package/dist/funcs/planAddons.d.ts +35 -1
- package/dist/funcs/planAddons.js +36 -1
- package/dist/funcs/plans.d.ts +49 -1
- package/dist/funcs/plans.js +50 -1
- package/dist/funcs/subscriptions.d.ts +59 -1
- package/dist/funcs/subscriptions.js +60 -1
- package/dist/funcs/tax.d.ts +25 -1
- package/dist/funcs/tax.js +26 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +4 -5
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/config.js +1 -1
- package/dist/lib/encodings.d.ts +0 -1
- package/dist/lib/encodings.js +1 -1
- package/dist/lib/paginate.d.ts +56 -0
- package/dist/lib/paginate.js +60 -0
- package/dist/lib/request.d.ts +0 -1
- package/dist/lib/request.js +1 -1
- package/dist/lib/to-error.d.ts +0 -1
- package/dist/lib/to-error.js +1 -1
- package/dist/lib/types.d.ts +0 -1
- package/dist/lib/types.js +1 -1
- package/dist/lib/version.d.ts +1 -0
- package/dist/lib/version.js +5 -0
- package/dist/lib/wire.d.ts +3 -1
- package/dist/lib/wire.js +93 -4
- package/dist/models/errors.d.ts +13 -2
- package/dist/models/errors.js +31 -4
- package/dist/models/operations/addons.d.ts +0 -1
- package/dist/models/operations/addons.js +1 -1
- package/dist/models/operations/apps.d.ts +2 -5
- package/dist/models/operations/apps.js +1 -1
- package/dist/models/operations/billing.d.ts +0 -1
- package/dist/models/operations/billing.js +1 -1
- package/dist/models/operations/currencies.d.ts +0 -1
- package/dist/models/operations/currencies.js +1 -1
- package/dist/models/operations/customers.d.ts +9 -6
- package/dist/models/operations/customers.js +1 -1
- package/dist/models/operations/defaults.d.ts +0 -1
- package/dist/models/operations/defaults.js +1 -1
- package/dist/models/operations/entitlements.d.ts +0 -1
- package/dist/models/operations/entitlements.js +1 -1
- package/dist/models/operations/events.d.ts +0 -1
- package/dist/models/operations/events.js +1 -1
- package/dist/models/operations/features.d.ts +0 -1
- package/dist/models/operations/features.js +1 -1
- package/dist/models/operations/governance.d.ts +0 -1
- package/dist/models/operations/governance.js +1 -1
- package/dist/models/operations/invoices.d.ts +4 -7
- package/dist/models/operations/invoices.js +1 -1
- package/dist/models/operations/llmCost.d.ts +0 -1
- package/dist/models/operations/llmCost.js +1 -1
- package/dist/models/operations/meters.d.ts +0 -1
- package/dist/models/operations/meters.js +1 -1
- package/dist/models/operations/planAddons.d.ts +0 -1
- package/dist/models/operations/planAddons.js +1 -1
- package/dist/models/operations/plans.d.ts +0 -1
- package/dist/models/operations/plans.js +1 -1
- package/dist/models/operations/subscriptions.d.ts +0 -1
- package/dist/models/operations/subscriptions.js +1 -1
- package/dist/models/operations/tax.d.ts +0 -1
- package/dist/models/operations/tax.js +1 -1
- package/dist/models/schemas.d.ts +162 -1
- package/dist/models/schemas.js +37 -5
- package/dist/models/types.d.ts +464 -577
- package/dist/models/types.js +1 -1
- package/dist/sdk/addons.d.ts +60 -1
- package/dist/sdk/addons.js +63 -1
- package/dist/sdk/apps.d.ts +25 -1
- package/dist/sdk/apps.js +28 -1
- package/dist/sdk/billing.d.ts +57 -1
- package/dist/sdk/billing.js +60 -1
- package/dist/sdk/customers.d.ts +211 -2
- package/dist/sdk/customers.js +222 -2
- package/dist/sdk/defaults.d.ts +10 -1
- package/dist/sdk/defaults.js +11 -1
- package/dist/sdk/entitlements.d.ts +5 -1
- package/dist/sdk/entitlements.js +6 -1
- package/dist/sdk/events.d.ts +25 -1
- package/dist/sdk/events.js +28 -1
- package/dist/sdk/features.d.ts +53 -1
- package/dist/sdk/features.js +56 -1
- package/dist/sdk/internal.d.ts +180 -0
- package/dist/sdk/internal.js +224 -0
- package/dist/sdk/llmCost.d.ts +57 -1
- package/dist/sdk/llmCost.js +62 -1
- package/dist/sdk/meters.d.ts +64 -1
- package/dist/sdk/meters.js +67 -1
- package/dist/sdk/planAddons.d.ts +46 -1
- package/dist/sdk/planAddons.js +49 -1
- package/dist/sdk/plans.d.ts +60 -1
- package/dist/sdk/plans.js +63 -1
- package/dist/sdk/sdk.d.ts +9 -10
- package/dist/sdk/sdk.js +11 -15
- package/dist/sdk/subscriptions.d.ts +72 -3
- package/dist/sdk/subscriptions.js +77 -5
- package/dist/sdk/tax.d.ts +34 -1
- package/dist/sdk/tax.js +37 -1
- package/package.json +28 -4
- package/dist/sdk/currencies.d.ts +0 -12
- package/dist/sdk/currencies.js +0 -21
- package/dist/sdk/governance.d.ts +0 -9
- package/dist/sdk/governance.js +0 -12
- package/dist/sdk/invoices.d.ts +0 -12
- package/dist/sdk/invoices.js +0 -21
package/dist/models/types.d.ts
CHANGED
|
@@ -650,99 +650,22 @@ export interface CursorPaginationQuery {
|
|
|
650
650
|
/** Filter options for listing meters. */
|
|
651
651
|
export interface ListMetersParamsFilter {
|
|
652
652
|
/** Filter meters by key. */
|
|
653
|
-
key?:
|
|
654
|
-
eq?: string;
|
|
655
|
-
neq?: string;
|
|
656
|
-
contains?: string;
|
|
657
|
-
ocontains?: string[];
|
|
658
|
-
oeq?: string[];
|
|
659
|
-
gt?: string;
|
|
660
|
-
gte?: string;
|
|
661
|
-
lt?: string;
|
|
662
|
-
lte?: string;
|
|
663
|
-
exists?: boolean;
|
|
664
|
-
};
|
|
653
|
+
key?: StringFieldFilter;
|
|
665
654
|
/** Filter meters by name. */
|
|
666
|
-
name?:
|
|
667
|
-
eq?: string;
|
|
668
|
-
neq?: string;
|
|
669
|
-
contains?: string;
|
|
670
|
-
ocontains?: string[];
|
|
671
|
-
oeq?: string[];
|
|
672
|
-
gt?: string;
|
|
673
|
-
gte?: string;
|
|
674
|
-
lt?: string;
|
|
675
|
-
lte?: string;
|
|
676
|
-
exists?: boolean;
|
|
677
|
-
};
|
|
655
|
+
name?: StringFieldFilter;
|
|
678
656
|
}
|
|
679
657
|
/** Filter options for listing LLM cost prices. */
|
|
680
658
|
export interface ListLlmCostPricesParamsFilter {
|
|
681
659
|
/** Filter by provider. e.g. ?filter[provider][eq]=openai */
|
|
682
|
-
provider?:
|
|
683
|
-
eq?: string;
|
|
684
|
-
neq?: string;
|
|
685
|
-
contains?: string;
|
|
686
|
-
ocontains?: string[];
|
|
687
|
-
oeq?: string[];
|
|
688
|
-
gt?: string;
|
|
689
|
-
gte?: string;
|
|
690
|
-
lt?: string;
|
|
691
|
-
lte?: string;
|
|
692
|
-
exists?: boolean;
|
|
693
|
-
};
|
|
660
|
+
provider?: StringFieldFilter;
|
|
694
661
|
/** Filter by model ID. e.g. ?filter[model_id][eq]=gpt-4 */
|
|
695
|
-
modelId?:
|
|
696
|
-
eq?: string;
|
|
697
|
-
neq?: string;
|
|
698
|
-
contains?: string;
|
|
699
|
-
ocontains?: string[];
|
|
700
|
-
oeq?: string[];
|
|
701
|
-
gt?: string;
|
|
702
|
-
gte?: string;
|
|
703
|
-
lt?: string;
|
|
704
|
-
lte?: string;
|
|
705
|
-
exists?: boolean;
|
|
706
|
-
};
|
|
662
|
+
modelId?: StringFieldFilter;
|
|
707
663
|
/** Filter by model name. e.g. ?filter[model_name][contains]=gpt */
|
|
708
|
-
modelName?:
|
|
709
|
-
eq?: string;
|
|
710
|
-
neq?: string;
|
|
711
|
-
contains?: string;
|
|
712
|
-
ocontains?: string[];
|
|
713
|
-
oeq?: string[];
|
|
714
|
-
gt?: string;
|
|
715
|
-
gte?: string;
|
|
716
|
-
lt?: string;
|
|
717
|
-
lte?: string;
|
|
718
|
-
exists?: boolean;
|
|
719
|
-
};
|
|
664
|
+
modelName?: StringFieldFilter;
|
|
720
665
|
/** Filter by currency code. e.g. ?filter[currency][eq]=USD */
|
|
721
|
-
currency?:
|
|
722
|
-
eq?: string;
|
|
723
|
-
neq?: string;
|
|
724
|
-
contains?: string;
|
|
725
|
-
ocontains?: string[];
|
|
726
|
-
oeq?: string[];
|
|
727
|
-
gt?: string;
|
|
728
|
-
gte?: string;
|
|
729
|
-
lt?: string;
|
|
730
|
-
lte?: string;
|
|
731
|
-
exists?: boolean;
|
|
732
|
-
};
|
|
666
|
+
currency?: StringFieldFilter;
|
|
733
667
|
/** Filter by source. e.g. ?filter[source][eq]=system */
|
|
734
|
-
source?:
|
|
735
|
-
eq?: string;
|
|
736
|
-
neq?: string;
|
|
737
|
-
contains?: string;
|
|
738
|
-
ocontains?: string[];
|
|
739
|
-
oeq?: string[];
|
|
740
|
-
gt?: string;
|
|
741
|
-
gte?: string;
|
|
742
|
-
lt?: string;
|
|
743
|
-
lte?: string;
|
|
744
|
-
exists?: boolean;
|
|
745
|
-
};
|
|
668
|
+
source?: StringFieldFilter;
|
|
746
669
|
}
|
|
747
670
|
/**
|
|
748
671
|
* Filters on the resource's `labels` field.
|
|
@@ -752,18 +675,7 @@ export interface ListLlmCostPricesParamsFilter {
|
|
|
752
675
|
* `filter[labels][key]=value` (nested) and `filter[labels.key]=value`
|
|
753
676
|
* (dot-notation).
|
|
754
677
|
*/
|
|
755
|
-
export type LabelsFieldFilter = Record<string,
|
|
756
|
-
eq?: string;
|
|
757
|
-
neq?: string;
|
|
758
|
-
contains?: string;
|
|
759
|
-
ocontains?: string[];
|
|
760
|
-
oeq?: string[];
|
|
761
|
-
gt?: string;
|
|
762
|
-
gte?: string;
|
|
763
|
-
lt?: string;
|
|
764
|
-
lte?: string;
|
|
765
|
-
exists?: boolean;
|
|
766
|
-
}>;
|
|
678
|
+
export type LabelsFieldFilter = Record<string, StringFieldFilter>;
|
|
767
679
|
/** Customer reference. */
|
|
768
680
|
export interface CustomerReference {
|
|
769
681
|
id: string;
|
|
@@ -1293,7 +1205,7 @@ export interface CreateMeterRequest {
|
|
|
1293
1205
|
labels?: Labels;
|
|
1294
1206
|
key: string;
|
|
1295
1207
|
/** The aggregation type to use for the meter. */
|
|
1296
|
-
aggregation:
|
|
1208
|
+
aggregation: MeterAggregation;
|
|
1297
1209
|
/** The event type to include in the aggregation. */
|
|
1298
1210
|
eventType: string;
|
|
1299
1211
|
/**
|
|
@@ -1343,7 +1255,7 @@ export interface Meter {
|
|
|
1343
1255
|
deletedAt?: Date;
|
|
1344
1256
|
key: string;
|
|
1345
1257
|
/** The aggregation type to use for the meter. */
|
|
1346
|
-
aggregation:
|
|
1258
|
+
aggregation: MeterAggregation;
|
|
1347
1259
|
/** The event type to include in the aggregation. */
|
|
1348
1260
|
eventType: string;
|
|
1349
1261
|
/**
|
|
@@ -1685,43 +1597,17 @@ export interface ListCreditGrantsParamsFilter {
|
|
|
1685
1597
|
/** Filter credit grants by currency. */
|
|
1686
1598
|
currency?: string;
|
|
1687
1599
|
/** Filter credit grants by key. */
|
|
1688
|
-
key?:
|
|
1689
|
-
eq?: string;
|
|
1690
|
-
neq?: string;
|
|
1691
|
-
contains?: string;
|
|
1692
|
-
ocontains?: string[];
|
|
1693
|
-
oeq?: string[];
|
|
1694
|
-
gt?: string;
|
|
1695
|
-
gte?: string;
|
|
1696
|
-
lt?: string;
|
|
1697
|
-
lte?: string;
|
|
1698
|
-
exists?: boolean;
|
|
1699
|
-
};
|
|
1600
|
+
key?: StringFieldFilter;
|
|
1700
1601
|
}
|
|
1701
1602
|
/** Filter options for getting a credit balance. */
|
|
1702
1603
|
export interface GetCreditBalanceParamsFilter {
|
|
1703
1604
|
/** Filter credit balance by currency. */
|
|
1704
|
-
currency?:
|
|
1705
|
-
eq?: string;
|
|
1706
|
-
oeq?: string[];
|
|
1707
|
-
neq?: string;
|
|
1708
|
-
};
|
|
1605
|
+
currency?: StringFieldFilterExact;
|
|
1709
1606
|
/**
|
|
1710
1607
|
* Filter credit balance by feature key. Omit to return the total portfolio value.
|
|
1711
1608
|
* Use `exists=false` to return only unrestricted balance.
|
|
1712
1609
|
*/
|
|
1713
|
-
featureKey?:
|
|
1714
|
-
eq?: string;
|
|
1715
|
-
neq?: string;
|
|
1716
|
-
contains?: string;
|
|
1717
|
-
ocontains?: string[];
|
|
1718
|
-
oeq?: string[];
|
|
1719
|
-
gt?: string;
|
|
1720
|
-
gte?: string;
|
|
1721
|
-
lt?: string;
|
|
1722
|
-
lte?: string;
|
|
1723
|
-
exists?: boolean;
|
|
1724
|
-
};
|
|
1610
|
+
featureKey?: StringFieldFilter;
|
|
1725
1611
|
}
|
|
1726
1612
|
/** Filter options for listing charges. */
|
|
1727
1613
|
export interface ListChargesParamsFilter {
|
|
@@ -1737,48 +1623,25 @@ export interface ListChargesParamsFilter {
|
|
|
1737
1623
|
*
|
|
1738
1624
|
* If omitted, all statuses are returned except for `deleted`.
|
|
1739
1625
|
*/
|
|
1740
|
-
status?:
|
|
1741
|
-
eq?: string;
|
|
1742
|
-
oeq?: string[];
|
|
1743
|
-
neq?: string;
|
|
1744
|
-
};
|
|
1626
|
+
status?: StringFieldFilterExact;
|
|
1745
1627
|
}
|
|
1746
1628
|
/** Filter options for listing plans. */
|
|
1747
1629
|
export interface ListPlansParamsFilter {
|
|
1748
|
-
key?:
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
contains?: string;
|
|
1764
|
-
ocontains?: string[];
|
|
1765
|
-
oeq?: string[];
|
|
1766
|
-
gt?: string;
|
|
1767
|
-
gte?: string;
|
|
1768
|
-
lt?: string;
|
|
1769
|
-
lte?: string;
|
|
1770
|
-
exists?: boolean;
|
|
1771
|
-
};
|
|
1772
|
-
status?: string | {
|
|
1773
|
-
eq?: string;
|
|
1774
|
-
oeq?: string[];
|
|
1775
|
-
neq?: string;
|
|
1776
|
-
};
|
|
1777
|
-
currency?: string | {
|
|
1778
|
-
eq?: string;
|
|
1779
|
-
oeq?: string[];
|
|
1780
|
-
neq?: string;
|
|
1781
|
-
};
|
|
1630
|
+
key?: StringFieldFilter;
|
|
1631
|
+
name?: StringFieldFilter;
|
|
1632
|
+
status?: StringFieldFilterExact;
|
|
1633
|
+
currency?: StringFieldFilterExact;
|
|
1634
|
+
}
|
|
1635
|
+
/** Request body for voiding a credit grant. */
|
|
1636
|
+
export interface VoidCreditGrantRequest {
|
|
1637
|
+
/**
|
|
1638
|
+
* How voiding adjusts payment state related to the grant.
|
|
1639
|
+
*
|
|
1640
|
+
* Currently only `none` is supported: voiding does not adjust invoices, payment
|
|
1641
|
+
* authorization, settlement, payment intents, or external collection state. If
|
|
1642
|
+
* payment later completes, the original invoiced amount may still be collected.
|
|
1643
|
+
*/
|
|
1644
|
+
paymentAdjustment: 'none';
|
|
1782
1645
|
}
|
|
1783
1646
|
/** Subscription create request. */
|
|
1784
1647
|
export interface SubscriptionCreate {
|
|
@@ -2047,18 +1910,7 @@ export interface InvoiceLineBaseDiscount {
|
|
|
2047
1910
|
/** Filter options for listing currencies. */
|
|
2048
1911
|
export interface ListCurrenciesParamsFilter {
|
|
2049
1912
|
type?: 'fiat' | 'custom';
|
|
2050
|
-
code?:
|
|
2051
|
-
eq?: string;
|
|
2052
|
-
neq?: string;
|
|
2053
|
-
contains?: string;
|
|
2054
|
-
ocontains?: string[];
|
|
2055
|
-
oeq?: string[];
|
|
2056
|
-
gt?: string;
|
|
2057
|
-
gte?: string;
|
|
2058
|
-
lt?: string;
|
|
2059
|
-
lte?: string;
|
|
2060
|
-
exists?: boolean;
|
|
2061
|
-
};
|
|
1913
|
+
code?: StringFieldFilter;
|
|
2062
1914
|
}
|
|
2063
1915
|
/** Describes custom currency. */
|
|
2064
1916
|
export interface CurrencyCustom {
|
|
@@ -2164,7 +2016,7 @@ export interface CreditAdjustment {
|
|
|
2164
2016
|
}
|
|
2165
2017
|
/** The credit balance by currency. */
|
|
2166
2018
|
export interface CreditBalance {
|
|
2167
|
-
currency:
|
|
2019
|
+
currency: BillingCurrencyCode;
|
|
2168
2020
|
/** Credits available after applying currently live charge impacts. */
|
|
2169
2021
|
live: string;
|
|
2170
2022
|
/** Credits that have been booked on the ledger as of the balance timestamp. */
|
|
@@ -2191,33 +2043,22 @@ export interface CreateCreditAdjustmentRequest {
|
|
|
2191
2043
|
description?: string;
|
|
2192
2044
|
labels?: Labels;
|
|
2193
2045
|
/** The currency of the granted credits. */
|
|
2194
|
-
currency:
|
|
2046
|
+
currency: BillingCurrencyCode;
|
|
2195
2047
|
/** Granted credit amount. */
|
|
2196
2048
|
amount: string;
|
|
2197
2049
|
}
|
|
2198
2050
|
/** Filter options for listing credit transactions. */
|
|
2199
2051
|
export interface ListCreditTransactionsParamsFilter {
|
|
2200
2052
|
/** Filter credit transactions by type. */
|
|
2201
|
-
type?: 'funded' | 'consumed' | 'expired';
|
|
2053
|
+
type?: 'funded' | 'consumed' | 'expired' | 'voided';
|
|
2202
2054
|
/** Filter credit transactions by currency. */
|
|
2203
|
-
currency?:
|
|
2055
|
+
currency?: BillingCurrencyCode;
|
|
2204
2056
|
/**
|
|
2205
2057
|
* Filter credit transactions by feature key. Omit to return all credit
|
|
2206
2058
|
* transactions. Use `exists=false` to return only unrestricted credit
|
|
2207
2059
|
* transactions.
|
|
2208
2060
|
*/
|
|
2209
|
-
featureKey?:
|
|
2210
|
-
eq?: string;
|
|
2211
|
-
neq?: string;
|
|
2212
|
-
contains?: string;
|
|
2213
|
-
ocontains?: string[];
|
|
2214
|
-
oeq?: string[];
|
|
2215
|
-
gt?: string;
|
|
2216
|
-
gte?: string;
|
|
2217
|
-
lt?: string;
|
|
2218
|
-
lte?: string;
|
|
2219
|
-
exists?: boolean;
|
|
2220
|
-
};
|
|
2061
|
+
featureKey?: StringFieldFilter;
|
|
2221
2062
|
}
|
|
2222
2063
|
/**
|
|
2223
2064
|
* A credit transaction represents a single credit movement on the customer's
|
|
@@ -2245,9 +2086,9 @@ export interface CreditTransaction {
|
|
|
2245
2086
|
/** The date and time the transaction was booked. */
|
|
2246
2087
|
bookedAt: Date;
|
|
2247
2088
|
/** The type of credit transaction. */
|
|
2248
|
-
type: 'funded' | 'consumed' | 'expired';
|
|
2089
|
+
type: 'funded' | 'consumed' | 'expired' | 'voided';
|
|
2249
2090
|
/** Currency of the balance affected by the transaction. */
|
|
2250
|
-
currency:
|
|
2091
|
+
currency: BillingCurrencyCode;
|
|
2251
2092
|
/**
|
|
2252
2093
|
* Signed amount of the credit movement. Positive values add balance, negative
|
|
2253
2094
|
* values reduce balance.
|
|
@@ -2405,173 +2246,34 @@ export interface LlmCostOverrideCreate {
|
|
|
2405
2246
|
}
|
|
2406
2247
|
/** Filter options for listing customers. */
|
|
2407
2248
|
export interface ListCustomersParamsFilter {
|
|
2408
|
-
key?:
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
gt?: string;
|
|
2415
|
-
gte?: string;
|
|
2416
|
-
lt?: string;
|
|
2417
|
-
lte?: string;
|
|
2418
|
-
exists?: boolean;
|
|
2419
|
-
};
|
|
2420
|
-
name?: string | {
|
|
2421
|
-
eq?: string;
|
|
2422
|
-
neq?: string;
|
|
2423
|
-
contains?: string;
|
|
2424
|
-
ocontains?: string[];
|
|
2425
|
-
oeq?: string[];
|
|
2426
|
-
gt?: string;
|
|
2427
|
-
gte?: string;
|
|
2428
|
-
lt?: string;
|
|
2429
|
-
lte?: string;
|
|
2430
|
-
exists?: boolean;
|
|
2431
|
-
};
|
|
2432
|
-
primaryEmail?: string | {
|
|
2433
|
-
eq?: string;
|
|
2434
|
-
neq?: string;
|
|
2435
|
-
contains?: string;
|
|
2436
|
-
ocontains?: string[];
|
|
2437
|
-
oeq?: string[];
|
|
2438
|
-
gt?: string;
|
|
2439
|
-
gte?: string;
|
|
2440
|
-
lt?: string;
|
|
2441
|
-
lte?: string;
|
|
2442
|
-
exists?: boolean;
|
|
2443
|
-
};
|
|
2444
|
-
usageAttributionSubjectKey?: string | {
|
|
2445
|
-
eq?: string;
|
|
2446
|
-
neq?: string;
|
|
2447
|
-
contains?: string;
|
|
2448
|
-
ocontains?: string[];
|
|
2449
|
-
oeq?: string[];
|
|
2450
|
-
gt?: string;
|
|
2451
|
-
gte?: string;
|
|
2452
|
-
lt?: string;
|
|
2453
|
-
lte?: string;
|
|
2454
|
-
exists?: boolean;
|
|
2455
|
-
};
|
|
2456
|
-
planKey?: string | {
|
|
2457
|
-
eq?: string;
|
|
2458
|
-
neq?: string;
|
|
2459
|
-
contains?: string;
|
|
2460
|
-
ocontains?: string[];
|
|
2461
|
-
oeq?: string[];
|
|
2462
|
-
gt?: string;
|
|
2463
|
-
gte?: string;
|
|
2464
|
-
lt?: string;
|
|
2465
|
-
lte?: string;
|
|
2466
|
-
exists?: boolean;
|
|
2467
|
-
};
|
|
2468
|
-
billingProfileId?: string | {
|
|
2469
|
-
eq?: string;
|
|
2470
|
-
oeq?: string[];
|
|
2471
|
-
neq?: string;
|
|
2472
|
-
};
|
|
2249
|
+
key?: StringFieldFilter;
|
|
2250
|
+
name?: StringFieldFilter;
|
|
2251
|
+
primaryEmail?: StringFieldFilter;
|
|
2252
|
+
usageAttributionSubjectKey?: StringFieldFilter;
|
|
2253
|
+
planKey?: StringFieldFilter;
|
|
2254
|
+
billingProfileId?: UlidFieldFilter;
|
|
2473
2255
|
}
|
|
2474
2256
|
/** Filter options for listing subscriptions. */
|
|
2475
2257
|
export interface ListSubscriptionsParamsFilter {
|
|
2476
|
-
id?:
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
customerId?: string | {
|
|
2482
|
-
eq?: string;
|
|
2483
|
-
oeq?: string[];
|
|
2484
|
-
neq?: string;
|
|
2485
|
-
};
|
|
2486
|
-
status?: string | {
|
|
2487
|
-
eq?: string;
|
|
2488
|
-
oeq?: string[];
|
|
2489
|
-
neq?: string;
|
|
2490
|
-
};
|
|
2491
|
-
planId?: string | {
|
|
2492
|
-
eq?: string;
|
|
2493
|
-
oeq?: string[];
|
|
2494
|
-
neq?: string;
|
|
2495
|
-
};
|
|
2496
|
-
planKey?: string | {
|
|
2497
|
-
eq?: string;
|
|
2498
|
-
oeq?: string[];
|
|
2499
|
-
neq?: string;
|
|
2500
|
-
};
|
|
2258
|
+
id?: UlidFieldFilter;
|
|
2259
|
+
customerId?: UlidFieldFilter;
|
|
2260
|
+
status?: StringFieldFilterExact;
|
|
2261
|
+
planId?: UlidFieldFilter;
|
|
2262
|
+
planKey?: StringFieldFilterExact;
|
|
2501
2263
|
}
|
|
2502
2264
|
/** Filter options for listing features. */
|
|
2503
2265
|
export interface ListFeatureParamsFilter {
|
|
2504
|
-
meterId?:
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
neq?: string;
|
|
2508
|
-
};
|
|
2509
|
-
key?: string | {
|
|
2510
|
-
eq?: string;
|
|
2511
|
-
neq?: string;
|
|
2512
|
-
contains?: string;
|
|
2513
|
-
ocontains?: string[];
|
|
2514
|
-
oeq?: string[];
|
|
2515
|
-
gt?: string;
|
|
2516
|
-
gte?: string;
|
|
2517
|
-
lt?: string;
|
|
2518
|
-
lte?: string;
|
|
2519
|
-
exists?: boolean;
|
|
2520
|
-
};
|
|
2521
|
-
name?: string | {
|
|
2522
|
-
eq?: string;
|
|
2523
|
-
neq?: string;
|
|
2524
|
-
contains?: string;
|
|
2525
|
-
ocontains?: string[];
|
|
2526
|
-
oeq?: string[];
|
|
2527
|
-
gt?: string;
|
|
2528
|
-
gte?: string;
|
|
2529
|
-
lt?: string;
|
|
2530
|
-
lte?: string;
|
|
2531
|
-
exists?: boolean;
|
|
2532
|
-
};
|
|
2266
|
+
meterId?: UlidFieldFilter;
|
|
2267
|
+
key?: StringFieldFilter;
|
|
2268
|
+
name?: StringFieldFilter;
|
|
2533
2269
|
}
|
|
2534
2270
|
/** Filter options for listing add-ons. */
|
|
2535
2271
|
export interface ListAddonsParamsFilter {
|
|
2536
|
-
id?:
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
key?: string | {
|
|
2542
|
-
eq?: string;
|
|
2543
|
-
neq?: string;
|
|
2544
|
-
contains?: string;
|
|
2545
|
-
ocontains?: string[];
|
|
2546
|
-
oeq?: string[];
|
|
2547
|
-
gt?: string;
|
|
2548
|
-
gte?: string;
|
|
2549
|
-
lt?: string;
|
|
2550
|
-
lte?: string;
|
|
2551
|
-
exists?: boolean;
|
|
2552
|
-
};
|
|
2553
|
-
name?: string | {
|
|
2554
|
-
eq?: string;
|
|
2555
|
-
neq?: string;
|
|
2556
|
-
contains?: string;
|
|
2557
|
-
ocontains?: string[];
|
|
2558
|
-
oeq?: string[];
|
|
2559
|
-
gt?: string;
|
|
2560
|
-
gte?: string;
|
|
2561
|
-
lt?: string;
|
|
2562
|
-
lte?: string;
|
|
2563
|
-
exists?: boolean;
|
|
2564
|
-
};
|
|
2565
|
-
status?: string | {
|
|
2566
|
-
eq?: string;
|
|
2567
|
-
oeq?: string[];
|
|
2568
|
-
neq?: string;
|
|
2569
|
-
};
|
|
2570
|
-
currency?: string | {
|
|
2571
|
-
eq?: string;
|
|
2572
|
-
oeq?: string[];
|
|
2573
|
-
neq?: string;
|
|
2574
|
-
};
|
|
2272
|
+
id?: UlidFieldFilter;
|
|
2273
|
+
key?: StringFieldFilter;
|
|
2274
|
+
name?: StringFieldFilter;
|
|
2275
|
+
status?: StringFieldFilterExact;
|
|
2276
|
+
currency?: StringFieldFilterExact;
|
|
2575
2277
|
}
|
|
2576
2278
|
/**
|
|
2577
2279
|
* Tax configuration for a credit grant.
|
|
@@ -2742,164 +2444,43 @@ export interface UpdateRateCardTaxConfig {
|
|
|
2742
2444
|
/** Filter options for listing ingested events. */
|
|
2743
2445
|
export interface ListEventsParamsFilter {
|
|
2744
2446
|
/** Filter events by ID. */
|
|
2745
|
-
id?:
|
|
2746
|
-
eq?: string;
|
|
2747
|
-
neq?: string;
|
|
2748
|
-
contains?: string;
|
|
2749
|
-
ocontains?: string[];
|
|
2750
|
-
oeq?: string[];
|
|
2751
|
-
gt?: string;
|
|
2752
|
-
gte?: string;
|
|
2753
|
-
lt?: string;
|
|
2754
|
-
lte?: string;
|
|
2755
|
-
exists?: boolean;
|
|
2756
|
-
};
|
|
2447
|
+
id?: StringFieldFilter;
|
|
2757
2448
|
/** Filter events by source. */
|
|
2758
|
-
source?:
|
|
2759
|
-
eq?: string;
|
|
2760
|
-
neq?: string;
|
|
2761
|
-
contains?: string;
|
|
2762
|
-
ocontains?: string[];
|
|
2763
|
-
oeq?: string[];
|
|
2764
|
-
gt?: string;
|
|
2765
|
-
gte?: string;
|
|
2766
|
-
lt?: string;
|
|
2767
|
-
lte?: string;
|
|
2768
|
-
exists?: boolean;
|
|
2769
|
-
};
|
|
2449
|
+
source?: StringFieldFilter;
|
|
2770
2450
|
/** Filter events by subject. */
|
|
2771
|
-
subject?:
|
|
2772
|
-
eq?: string;
|
|
2773
|
-
neq?: string;
|
|
2774
|
-
contains?: string;
|
|
2775
|
-
ocontains?: string[];
|
|
2776
|
-
oeq?: string[];
|
|
2777
|
-
gt?: string;
|
|
2778
|
-
gte?: string;
|
|
2779
|
-
lt?: string;
|
|
2780
|
-
lte?: string;
|
|
2781
|
-
exists?: boolean;
|
|
2782
|
-
};
|
|
2451
|
+
subject?: StringFieldFilter;
|
|
2783
2452
|
/** Filter events by type. */
|
|
2784
|
-
type?:
|
|
2785
|
-
eq?: string;
|
|
2786
|
-
neq?: string;
|
|
2787
|
-
contains?: string;
|
|
2788
|
-
ocontains?: string[];
|
|
2789
|
-
oeq?: string[];
|
|
2790
|
-
gt?: string;
|
|
2791
|
-
gte?: string;
|
|
2792
|
-
lt?: string;
|
|
2793
|
-
lte?: string;
|
|
2794
|
-
exists?: boolean;
|
|
2795
|
-
};
|
|
2453
|
+
type?: StringFieldFilter;
|
|
2796
2454
|
/** Filter events by the associated customer ID. */
|
|
2797
|
-
customerId?:
|
|
2798
|
-
eq?: string;
|
|
2799
|
-
oeq?: string[];
|
|
2800
|
-
neq?: string;
|
|
2801
|
-
};
|
|
2455
|
+
customerId?: UlidFieldFilter;
|
|
2802
2456
|
/** Filter events by event time. */
|
|
2803
|
-
time?:
|
|
2804
|
-
eq?: Date;
|
|
2805
|
-
lt?: Date;
|
|
2806
|
-
lte?: Date;
|
|
2807
|
-
gt?: Date;
|
|
2808
|
-
gte?: Date;
|
|
2809
|
-
};
|
|
2457
|
+
time?: DateTimeFieldFilter;
|
|
2810
2458
|
/** Filter events by the time the event was ingested. */
|
|
2811
|
-
ingestedAt?:
|
|
2812
|
-
eq?: Date;
|
|
2813
|
-
lt?: Date;
|
|
2814
|
-
lte?: Date;
|
|
2815
|
-
gt?: Date;
|
|
2816
|
-
gte?: Date;
|
|
2817
|
-
};
|
|
2459
|
+
ingestedAt?: DateTimeFieldFilter;
|
|
2818
2460
|
/** Filter events by the time the event was stored. */
|
|
2819
|
-
storedAt?:
|
|
2820
|
-
eq?: Date;
|
|
2821
|
-
lt?: Date;
|
|
2822
|
-
lte?: Date;
|
|
2823
|
-
gt?: Date;
|
|
2824
|
-
gte?: Date;
|
|
2825
|
-
};
|
|
2461
|
+
storedAt?: DateTimeFieldFilter;
|
|
2826
2462
|
}
|
|
2827
2463
|
/** Filter options for listing invoices. */
|
|
2828
2464
|
export interface ListInvoicesParamsFilter {
|
|
2829
2465
|
/** Filter by invoice status. */
|
|
2830
|
-
status?:
|
|
2831
|
-
eq?: string;
|
|
2832
|
-
oeq?: string[];
|
|
2833
|
-
neq?: string;
|
|
2834
|
-
};
|
|
2466
|
+
status?: StringFieldFilterExact;
|
|
2835
2467
|
/** Filter by customer ID. */
|
|
2836
|
-
customerId?:
|
|
2837
|
-
eq?: string;
|
|
2838
|
-
oeq?: string[];
|
|
2839
|
-
neq?: string;
|
|
2840
|
-
};
|
|
2468
|
+
customerId?: UlidFieldFilter;
|
|
2841
2469
|
/** Filter by the time the invoice was issued. */
|
|
2842
|
-
issuedAt?:
|
|
2843
|
-
eq?: Date;
|
|
2844
|
-
lt?: Date;
|
|
2845
|
-
lte?: Date;
|
|
2846
|
-
gt?: Date;
|
|
2847
|
-
gte?: Date;
|
|
2848
|
-
};
|
|
2470
|
+
issuedAt?: DateTimeFieldFilter;
|
|
2849
2471
|
/** Filter by service period start. */
|
|
2850
|
-
servicePeriodStart?:
|
|
2851
|
-
eq?: Date;
|
|
2852
|
-
lt?: Date;
|
|
2853
|
-
lte?: Date;
|
|
2854
|
-
gt?: Date;
|
|
2855
|
-
gte?: Date;
|
|
2856
|
-
};
|
|
2472
|
+
servicePeriodStart?: DateTimeFieldFilter;
|
|
2857
2473
|
/** Filter by invoice creation time. */
|
|
2858
|
-
createdAt?:
|
|
2859
|
-
eq?: Date;
|
|
2860
|
-
lt?: Date;
|
|
2861
|
-
lte?: Date;
|
|
2862
|
-
gt?: Date;
|
|
2863
|
-
gte?: Date;
|
|
2864
|
-
};
|
|
2474
|
+
createdAt?: DateTimeFieldFilter;
|
|
2865
2475
|
}
|
|
2866
2476
|
/** Resource filters. */
|
|
2867
2477
|
export interface ResourceFilters {
|
|
2868
|
-
name?:
|
|
2869
|
-
eq?: string;
|
|
2870
|
-
neq?: string;
|
|
2871
|
-
contains?: string;
|
|
2872
|
-
ocontains?: string[];
|
|
2873
|
-
oeq?: string[];
|
|
2874
|
-
gt?: string;
|
|
2875
|
-
gte?: string;
|
|
2876
|
-
lt?: string;
|
|
2877
|
-
lte?: string;
|
|
2878
|
-
exists?: boolean;
|
|
2879
|
-
};
|
|
2478
|
+
name?: StringFieldFilter;
|
|
2880
2479
|
labels?: LabelsFieldFilter;
|
|
2881
2480
|
publicLabels?: LabelsFieldFilter;
|
|
2882
|
-
createdAt?:
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
lte?: Date;
|
|
2886
|
-
gt?: Date;
|
|
2887
|
-
gte?: Date;
|
|
2888
|
-
};
|
|
2889
|
-
updatedAt?: Date | {
|
|
2890
|
-
eq?: Date;
|
|
2891
|
-
lt?: Date;
|
|
2892
|
-
lte?: Date;
|
|
2893
|
-
gt?: Date;
|
|
2894
|
-
gte?: Date;
|
|
2895
|
-
};
|
|
2896
|
-
deletedAt?: Date | {
|
|
2897
|
-
eq?: Date;
|
|
2898
|
-
lt?: Date;
|
|
2899
|
-
lte?: Date;
|
|
2900
|
-
gt?: Date;
|
|
2901
|
-
gte?: Date;
|
|
2902
|
-
};
|
|
2481
|
+
createdAt?: DateTimeFieldFilter;
|
|
2482
|
+
updatedAt?: DateTimeFieldFilter;
|
|
2483
|
+
deletedAt?: DateTimeFieldFilter;
|
|
2903
2484
|
}
|
|
2904
2485
|
/** Field filters with all supported types. */
|
|
2905
2486
|
export interface FieldFilters {
|
|
@@ -2915,35 +2496,10 @@ export interface FieldFilters {
|
|
|
2915
2496
|
gt?: number;
|
|
2916
2497
|
gte?: number;
|
|
2917
2498
|
};
|
|
2918
|
-
string?:
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
ocontains?: string[];
|
|
2923
|
-
oeq?: string[];
|
|
2924
|
-
gt?: string;
|
|
2925
|
-
gte?: string;
|
|
2926
|
-
lt?: string;
|
|
2927
|
-
lte?: string;
|
|
2928
|
-
exists?: boolean;
|
|
2929
|
-
};
|
|
2930
|
-
stringExact?: string | {
|
|
2931
|
-
eq?: string;
|
|
2932
|
-
oeq?: string[];
|
|
2933
|
-
neq?: string;
|
|
2934
|
-
};
|
|
2935
|
-
ulid?: string | {
|
|
2936
|
-
eq?: string;
|
|
2937
|
-
oeq?: string[];
|
|
2938
|
-
neq?: string;
|
|
2939
|
-
};
|
|
2940
|
-
datetime?: Date | {
|
|
2941
|
-
eq?: Date;
|
|
2942
|
-
lt?: Date;
|
|
2943
|
-
lte?: Date;
|
|
2944
|
-
gt?: Date;
|
|
2945
|
-
gte?: Date;
|
|
2946
|
-
};
|
|
2499
|
+
string?: StringFieldFilter;
|
|
2500
|
+
stringExact?: StringFieldFilterExact;
|
|
2501
|
+
ulid?: UlidFieldFilter;
|
|
2502
|
+
datetime?: DateTimeFieldFilter;
|
|
2947
2503
|
labels?: LabelsFieldFilter;
|
|
2948
2504
|
}
|
|
2949
2505
|
/** An ingested metering event with ingestion metadata. */
|
|
@@ -3200,7 +2756,7 @@ export interface ChargeFlatFeeSystemIntent {
|
|
|
3200
2756
|
/** The billing period the charge belongs to. */
|
|
3201
2757
|
billingPeriod: ClosedPeriod;
|
|
3202
2758
|
/** Payment term of the flat fee charge. */
|
|
3203
|
-
paymentTerm:
|
|
2759
|
+
paymentTerm: PricePaymentTerm;
|
|
3204
2760
|
/** The discounts applied to the charge. */
|
|
3205
2761
|
discounts?: ChargeFlatFeeDiscounts;
|
|
3206
2762
|
/** The proration configuration of the charge. */
|
|
@@ -3228,7 +2784,7 @@ export interface SubscriptionChangeResponse {
|
|
|
3228
2784
|
/** Request for canceling a subscription. */
|
|
3229
2785
|
export interface SubscriptionCancel {
|
|
3230
2786
|
/** If not provided the subscription is canceled immediately. */
|
|
3231
|
-
timing:
|
|
2787
|
+
timing: SubscriptionEditTiming;
|
|
3232
2788
|
}
|
|
3233
2789
|
/** Request for changing a subscription. */
|
|
3234
2790
|
export interface SubscriptionChange {
|
|
@@ -3272,7 +2828,7 @@ export interface SubscriptionChange {
|
|
|
3272
2828
|
* changing a subscription, the accepted values depend on the subscription
|
|
3273
2829
|
* configuration.
|
|
3274
2830
|
*/
|
|
3275
|
-
timing:
|
|
2831
|
+
timing: SubscriptionEditTiming;
|
|
3276
2832
|
}
|
|
3277
2833
|
/** SubscriptionAddon create request. */
|
|
3278
2834
|
export interface CreateSubscriptionAddonRequest {
|
|
@@ -3285,7 +2841,7 @@ export interface CreateSubscriptionAddonRequest {
|
|
|
3285
2841
|
* The timing of the operation. After the create or update, a new entry will be
|
|
3286
2842
|
* created in the timeline.
|
|
3287
2843
|
*/
|
|
3288
|
-
timing:
|
|
2844
|
+
timing: SubscriptionEditTiming;
|
|
3289
2845
|
}
|
|
3290
2846
|
/**
|
|
3291
2847
|
* Usage quantity details on an invoice line item when UnitConfig is in effect.
|
|
@@ -3519,7 +3075,7 @@ export interface InvoiceWorkflow {
|
|
|
3519
3075
|
/** Invoicing settings for this invoice. */
|
|
3520
3076
|
invoicing?: InvoiceWorkflowInvoicingSettings;
|
|
3521
3077
|
/** Payment settings for this invoice. */
|
|
3522
|
-
payment?:
|
|
3078
|
+
payment?: WorkflowPaymentSettings;
|
|
3523
3079
|
}
|
|
3524
3080
|
/** Detailed status information for a standard invoice. */
|
|
3525
3081
|
export interface InvoiceStatusDetails {
|
|
@@ -3553,7 +3109,7 @@ export interface UpdateBillingInvoiceWorkflow {
|
|
|
3553
3109
|
/** Invoicing settings for this invoice. */
|
|
3554
3110
|
invoicing?: UpdateBillingInvoiceWorkflowInvoicingSettings;
|
|
3555
3111
|
/** Payment settings for this invoice. */
|
|
3556
|
-
payment?:
|
|
3112
|
+
payment?: UpdateBillingWorkflowPaymentSettings;
|
|
3557
3113
|
}
|
|
3558
3114
|
/** Access status for a single feature. */
|
|
3559
3115
|
export interface GovernanceFeatureAccess {
|
|
@@ -3689,7 +3245,7 @@ export interface CreateCreditGrantRequest {
|
|
|
3689
3245
|
/** Funding method of the grant. */
|
|
3690
3246
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
3691
3247
|
/** The currency of the granted credits. */
|
|
3692
|
-
currency:
|
|
3248
|
+
currency: CreateCurrencyCode;
|
|
3693
3249
|
/** Granted credit amount. */
|
|
3694
3250
|
amount: string;
|
|
3695
3251
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -3756,7 +3312,7 @@ export interface CreditGrant {
|
|
|
3756
3312
|
/** Funding method of the grant. */
|
|
3757
3313
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
3758
3314
|
/** The currency of the granted credits. */
|
|
3759
|
-
currency:
|
|
3315
|
+
currency: BillingCurrencyCode;
|
|
3760
3316
|
/** Granted credit amount. */
|
|
3761
3317
|
amount: string;
|
|
3762
3318
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -3829,7 +3385,7 @@ export interface CreateChargeFlatFeeRequest {
|
|
|
3829
3385
|
/** Tax configuration of the charge. */
|
|
3830
3386
|
taxConfig?: TaxConfig;
|
|
3831
3387
|
/** Payment term of the flat fee charge. */
|
|
3832
|
-
paymentTerm:
|
|
3388
|
+
paymentTerm: PricePaymentTerm;
|
|
3833
3389
|
/** The discounts applied to the charge. */
|
|
3834
3390
|
discounts?: ChargeFlatFeeDiscounts;
|
|
3835
3391
|
/** The feature associated with the charge, when applicable. */
|
|
@@ -3878,7 +3434,7 @@ export interface IngestedEventPaginatedResponse {
|
|
|
3878
3434
|
meta: CursorMeta;
|
|
3879
3435
|
}
|
|
3880
3436
|
/** The list of parameters that failed validation. */
|
|
3881
|
-
export type InvalidParameters =
|
|
3437
|
+
export type InvalidParameters = InvalidParameter[];
|
|
3882
3438
|
/** A meter query request. */
|
|
3883
3439
|
export interface MeterQueryRequest {
|
|
3884
3440
|
/** The start of the period the usage is queried from. */
|
|
@@ -3889,7 +3445,7 @@ export interface MeterQueryRequest {
|
|
|
3889
3445
|
* The size of the time buckets to group the usage into. If not specified, the
|
|
3890
3446
|
* usage is aggregated over the entire period.
|
|
3891
3447
|
*/
|
|
3892
|
-
granularity?:
|
|
3448
|
+
granularity?: MeterQueryGranularity;
|
|
3893
3449
|
/**
|
|
3894
3450
|
* The value is the name of the time zone as defined in the IANA Time Zone Database
|
|
3895
3451
|
* (http://www.iana.org/time-zones). The time zone is used to determine the start
|
|
@@ -4134,7 +3690,7 @@ export interface UpdateInvoiceWorkflowSettings {
|
|
|
4134
3690
|
}
|
|
4135
3691
|
/** Page paginated response. */
|
|
4136
3692
|
export interface CurrencyPagePaginatedResponse {
|
|
4137
|
-
data:
|
|
3693
|
+
data: Currency[];
|
|
4138
3694
|
meta: PaginatedMeta;
|
|
4139
3695
|
}
|
|
4140
3696
|
/** Access evaluation result for a single resolved customer. */
|
|
@@ -4196,7 +3752,7 @@ export interface Feature {
|
|
|
4196
3752
|
* "llm" to look up cost from the LLM cost database based on meter group-by
|
|
4197
3753
|
* properties.
|
|
4198
3754
|
*/
|
|
4199
|
-
unitCost?:
|
|
3755
|
+
unitCost?: FeatureUnitCost;
|
|
4200
3756
|
}
|
|
4201
3757
|
/** Feature create request. */
|
|
4202
3758
|
export interface CreateFeatureRequest {
|
|
@@ -4224,7 +3780,7 @@ export interface CreateFeatureRequest {
|
|
|
4224
3780
|
* "llm" to look up cost from the LLM cost database based on meter group-by
|
|
4225
3781
|
* properties.
|
|
4226
3782
|
*/
|
|
4227
|
-
unitCost?:
|
|
3783
|
+
unitCost?: FeatureUnitCost;
|
|
4228
3784
|
}
|
|
4229
3785
|
/**
|
|
4230
3786
|
* Request body for updating a feature. Currently only the unit_cost field can be
|
|
@@ -4237,7 +3793,7 @@ export interface UpdateFeatureRequest {
|
|
|
4237
3793
|
* properties. Set to `null` to clear the existing unit cost; omit to leave it
|
|
4238
3794
|
* unchanged.
|
|
4239
3795
|
*/
|
|
4240
|
-
unitCost?:
|
|
3796
|
+
unitCost?: FeatureUnitCost | null;
|
|
4241
3797
|
}
|
|
4242
3798
|
/** Page paginated response. */
|
|
4243
3799
|
export interface CreditGrantPagePaginatedResponse {
|
|
@@ -4247,7 +3803,7 @@ export interface CreditGrantPagePaginatedResponse {
|
|
|
4247
3803
|
/** Bad Request. */
|
|
4248
3804
|
export interface BadRequest extends BaseError {
|
|
4249
3805
|
/** The list of parameters that failed validation. */
|
|
4250
|
-
invalidParameters:
|
|
3806
|
+
invalidParameters: InvalidParameter[];
|
|
4251
3807
|
}
|
|
4252
3808
|
/**
|
|
4253
3809
|
* Base fields shared by all invoice types.
|
|
@@ -4322,7 +3878,7 @@ export interface CustomerStripeCreateCheckoutSessionRequest {
|
|
|
4322
3878
|
*/
|
|
4323
3879
|
export interface WorkflowCollectionSettings {
|
|
4324
3880
|
/** The alignment for collecting the pending line items into an invoice. */
|
|
4325
|
-
alignment:
|
|
3881
|
+
alignment: WorkflowCollectionAlignment;
|
|
4326
3882
|
/**
|
|
4327
3883
|
* This grace period can be used to delay the collection of the pending line items
|
|
4328
3884
|
* specified in alignment.
|
|
@@ -4334,17 +3890,17 @@ export interface WorkflowCollectionSettings {
|
|
|
4334
3890
|
}
|
|
4335
3891
|
/** Page paginated response. */
|
|
4336
3892
|
export interface AppPagePaginatedResponse {
|
|
4337
|
-
data:
|
|
3893
|
+
data: App[];
|
|
4338
3894
|
meta: PaginatedMeta;
|
|
4339
3895
|
}
|
|
4340
3896
|
/** Applications used by a billing profile. */
|
|
4341
3897
|
export interface ProfileApps {
|
|
4342
3898
|
/** The tax app used for this workflow. */
|
|
4343
|
-
tax:
|
|
3899
|
+
tax: App;
|
|
4344
3900
|
/** The invoicing app used for this workflow. */
|
|
4345
|
-
invoicing:
|
|
3901
|
+
invoicing: App;
|
|
4346
3902
|
/** The payment app used for this workflow. */
|
|
4347
|
-
payment:
|
|
3903
|
+
payment: App;
|
|
4348
3904
|
}
|
|
4349
3905
|
/** Response of the governance query. */
|
|
4350
3906
|
export interface GovernanceQueryResponse {
|
|
@@ -4418,7 +3974,7 @@ export interface ChargeFlatFee {
|
|
|
4418
3974
|
/** Tax configuration of the charge. */
|
|
4419
3975
|
taxConfig?: TaxConfig;
|
|
4420
3976
|
/** Payment term of the flat fee charge. */
|
|
4421
|
-
paymentTerm:
|
|
3977
|
+
paymentTerm: PricePaymentTerm;
|
|
4422
3978
|
/** The discounts applied to the charge. */
|
|
4423
3979
|
discounts?: ChargeFlatFeeDiscounts;
|
|
4424
3980
|
/** The feature associated with the charge, when applicable. */
|
|
@@ -4428,7 +3984,7 @@ export interface ChargeFlatFee {
|
|
|
4428
3984
|
/** The amount after proration of the charge. */
|
|
4429
3985
|
amountAfterProration: CurrencyAmount;
|
|
4430
3986
|
/** The price of the charge. */
|
|
4431
|
-
price:
|
|
3987
|
+
price: Price;
|
|
4432
3988
|
/**
|
|
4433
3989
|
* Current intent from the system lifecycle controller for a charge that has an
|
|
4434
3990
|
* active manual override. The top-level charge fields remain the effective
|
|
@@ -4465,7 +4021,7 @@ export interface ChargeUsageBasedSystemIntent {
|
|
|
4465
4021
|
/** Discounts applied to the usage-based charge. */
|
|
4466
4022
|
discounts?: RateCardDiscounts;
|
|
4467
4023
|
/** The price of the charge. */
|
|
4468
|
-
price:
|
|
4024
|
+
price: Price;
|
|
4469
4025
|
/**
|
|
4470
4026
|
* The timestamp when the system lifecycle controller intent was deleted. The
|
|
4471
4027
|
* effective charge can remain visible while a manual override is active.
|
|
@@ -4506,7 +4062,7 @@ export interface CreateChargeUsageBasedRequest {
|
|
|
4506
4062
|
/** The feature associated with the charge. */
|
|
4507
4063
|
featureKey: string;
|
|
4508
4064
|
/** The price of the charge. */
|
|
4509
|
-
price:
|
|
4065
|
+
price: Price;
|
|
4510
4066
|
/** The full, unprorated service period of the charge. */
|
|
4511
4067
|
fullServicePeriod?: ClosedPeriod;
|
|
4512
4068
|
/** The billing period the charge belongs to. */
|
|
@@ -4536,7 +4092,7 @@ export interface RateCard {
|
|
|
4536
4092
|
*/
|
|
4537
4093
|
billingCadence?: string;
|
|
4538
4094
|
/** The price of the rate card. */
|
|
4539
|
-
price:
|
|
4095
|
+
price: Price;
|
|
4540
4096
|
/**
|
|
4541
4097
|
* Unit conversion configuration for the rate card.
|
|
4542
4098
|
*
|
|
@@ -4552,7 +4108,7 @@ export interface RateCard {
|
|
|
4552
4108
|
* The payment term of the rate card. In advance payment term can only be used for
|
|
4553
4109
|
* flat prices.
|
|
4554
4110
|
*/
|
|
4555
|
-
paymentTerm:
|
|
4111
|
+
paymentTerm: PricePaymentTerm;
|
|
4556
4112
|
/**
|
|
4557
4113
|
* Spend commitments for this rate card. Only applicable to usage-based prices
|
|
4558
4114
|
* (unit, graduated, volume).
|
|
@@ -4566,12 +4122,12 @@ export interface RateCard {
|
|
|
4566
4122
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
4567
4123
|
* this rate card. Requires `feature` to be set.
|
|
4568
4124
|
*/
|
|
4569
|
-
entitlement?:
|
|
4125
|
+
entitlement?: RateCardEntitlement;
|
|
4570
4126
|
}
|
|
4571
4127
|
/** Rate card configuration snapshot for a usage-based invoice line. */
|
|
4572
4128
|
export interface InvoiceLineRateCard {
|
|
4573
4129
|
/** The price definition used to calculate charges for this line. */
|
|
4574
|
-
price:
|
|
4130
|
+
price: Price;
|
|
4575
4131
|
/** Tax configuration snapshot for this line. */
|
|
4576
4132
|
taxConfig?: RateCardTaxConfig;
|
|
4577
4133
|
/** The feature key associated with this line's rate card. */
|
|
@@ -4582,7 +4138,7 @@ export interface InvoiceLineRateCard {
|
|
|
4582
4138
|
/** Rate card configuration snapshot for a usage-based invoice line. */
|
|
4583
4139
|
export interface UpdateInvoiceLineRateCard {
|
|
4584
4140
|
/** The price definition used to calculate charges for this line. */
|
|
4585
|
-
price:
|
|
4141
|
+
price: UpdatePrice;
|
|
4586
4142
|
/** Tax configuration snapshot for this line. */
|
|
4587
4143
|
taxConfig?: UpdateRateCardTaxConfig;
|
|
4588
4144
|
/** The feature key associated with this line's rate card. */
|
|
@@ -4602,7 +4158,7 @@ export interface Workflow {
|
|
|
4602
4158
|
/** The invoicing settings for this workflow */
|
|
4603
4159
|
invoicing?: WorkflowInvoicingSettings;
|
|
4604
4160
|
/** The payment settings for this workflow */
|
|
4605
|
-
payment?:
|
|
4161
|
+
payment?: WorkflowPaymentSettings;
|
|
4606
4162
|
/** The tax settings for this workflow */
|
|
4607
4163
|
tax?: WorkflowTaxSettings;
|
|
4608
4164
|
}
|
|
@@ -4672,7 +4228,7 @@ export interface ChargeUsageBased {
|
|
|
4672
4228
|
/** Aggregated booked and realtime totals for the charge. */
|
|
4673
4229
|
totals: ChargeTotals;
|
|
4674
4230
|
/** The price of the charge. */
|
|
4675
|
-
price:
|
|
4231
|
+
price: Price;
|
|
4676
4232
|
/**
|
|
4677
4233
|
* Current intent from the system lifecycle controller for a charge that has an
|
|
4678
4234
|
* active manual override. The top-level charge fields remain the effective
|
|
@@ -4750,7 +4306,7 @@ export interface Addon {
|
|
|
4750
4306
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
4751
4307
|
instanceType: 'single' | 'multiple';
|
|
4752
4308
|
/** The currency code of the add-on. */
|
|
4753
|
-
currency:
|
|
4309
|
+
currency: BillingCurrencyCode;
|
|
4754
4310
|
/**
|
|
4755
4311
|
* The date and time when the add-on becomes effective. When not specified, the
|
|
4756
4312
|
* add-on is a draft.
|
|
@@ -4799,7 +4355,7 @@ export interface CreateAddonRequest {
|
|
|
4799
4355
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
4800
4356
|
instanceType: 'single' | 'multiple';
|
|
4801
4357
|
/** The currency code of the add-on. */
|
|
4802
|
-
currency:
|
|
4358
|
+
currency: BillingCurrencyCode;
|
|
4803
4359
|
/** The rate cards of the add-on. */
|
|
4804
4360
|
rateCards: RateCard[];
|
|
4805
4361
|
}
|
|
@@ -5213,7 +4769,7 @@ export interface ProfilePagePaginatedResponse {
|
|
|
5213
4769
|
}
|
|
5214
4770
|
/** Page paginated response. */
|
|
5215
4771
|
export interface ChargePagePaginatedResponse {
|
|
5216
|
-
data:
|
|
4772
|
+
data: Charge[];
|
|
5217
4773
|
meta: PaginatedMeta;
|
|
5218
4774
|
}
|
|
5219
4775
|
/** Page paginated response. */
|
|
@@ -5305,7 +4861,7 @@ export interface InvoiceStandard {
|
|
|
5305
4861
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
5306
4862
|
* and cannot be edited directly.
|
|
5307
4863
|
*/
|
|
5308
|
-
lines?:
|
|
4864
|
+
lines?: InvoiceLine[];
|
|
5309
4865
|
}
|
|
5310
4866
|
/** InvoiceStandard update request. */
|
|
5311
4867
|
export interface UpdateInvoiceStandardRequest {
|
|
@@ -5336,19 +4892,152 @@ export interface UpdateInvoiceStandardRequest {
|
|
|
5336
4892
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
5337
4893
|
* and cannot be edited directly.
|
|
5338
4894
|
*/
|
|
5339
|
-
lines?:
|
|
4895
|
+
lines?: UpdateInvoiceLine[];
|
|
5340
4896
|
}
|
|
5341
4897
|
/** Page paginated response. */
|
|
5342
4898
|
export interface InvoicePagePaginatedResponse {
|
|
5343
|
-
data:
|
|
4899
|
+
data: Invoice[];
|
|
5344
4900
|
meta: PaginatedMeta;
|
|
5345
4901
|
}
|
|
4902
|
+
/**
|
|
4903
|
+
* Filters on the given string field value by either exact or fuzzy match. All
|
|
4904
|
+
* properties are optional; provide exactly one to specify the comparison.
|
|
4905
|
+
*/
|
|
4906
|
+
export type StringFieldFilter = string | {
|
|
4907
|
+
eq?: string;
|
|
4908
|
+
neq?: string;
|
|
4909
|
+
contains?: string;
|
|
4910
|
+
ocontains?: string[];
|
|
4911
|
+
oeq?: string[];
|
|
4912
|
+
gt?: string;
|
|
4913
|
+
gte?: string;
|
|
4914
|
+
lt?: string;
|
|
4915
|
+
lte?: string;
|
|
4916
|
+
exists?: boolean;
|
|
4917
|
+
};
|
|
4918
|
+
/** The aggregation type to use for the meter. */
|
|
4919
|
+
export type MeterAggregation = 'sum' | 'count' | 'unique_count' | 'avg' | 'min' | 'max' | 'latest';
|
|
4920
|
+
/**
|
|
4921
|
+
* The granularity of the time grouping. Time durations are specified in ISO 8601
|
|
4922
|
+
* format.
|
|
4923
|
+
*/
|
|
4924
|
+
export type MeterQueryGranularity = 'PT1M' | 'PT1H' | 'P1D' | 'P1M';
|
|
4925
|
+
/**
|
|
4926
|
+
* Filters on the given string field value by exact match. All properties are
|
|
4927
|
+
* optional; provide exactly one to specify the comparison.
|
|
4928
|
+
*/
|
|
4929
|
+
export type StringFieldFilterExact = string | {
|
|
4930
|
+
eq?: string;
|
|
4931
|
+
oeq?: string[];
|
|
4932
|
+
neq?: string;
|
|
4933
|
+
};
|
|
4934
|
+
/** The payment term of a flat price. */
|
|
4935
|
+
export type PricePaymentTerm = 'in_advance' | 'in_arrears';
|
|
4936
|
+
/** Fiat or custom currency code. */
|
|
4937
|
+
export type BillingCurrencyCode = string;
|
|
4938
|
+
/** Fiat or custom currency code. */
|
|
4939
|
+
export type CreateCurrencyCode = string;
|
|
4940
|
+
/**
|
|
4941
|
+
* Filters on the given ULID field value by exact match. All properties are
|
|
4942
|
+
* optional; provide exactly one to specify the comparison.
|
|
4943
|
+
*/
|
|
4944
|
+
export type UlidFieldFilter = string | {
|
|
4945
|
+
eq?: string;
|
|
4946
|
+
oeq?: string[];
|
|
4947
|
+
neq?: string;
|
|
4948
|
+
};
|
|
4949
|
+
/**
|
|
4950
|
+
* Filters on the given datetime (RFC-3339) field value. All properties are
|
|
4951
|
+
* optional; provide exactly one to specify the comparison.
|
|
4952
|
+
*/
|
|
4953
|
+
export type DateTimeFieldFilter = Date | {
|
|
4954
|
+
eq?: Date;
|
|
4955
|
+
lt?: Date;
|
|
4956
|
+
lte?: Date;
|
|
4957
|
+
gt?: Date;
|
|
4958
|
+
gte?: Date;
|
|
4959
|
+
};
|
|
4960
|
+
/**
|
|
4961
|
+
* Subscription edit timing defined when the changes should take effect. If the
|
|
4962
|
+
* provided configuration is not supported by the subscription, an error will be
|
|
4963
|
+
* returned.
|
|
4964
|
+
*/
|
|
4965
|
+
export type SubscriptionEditTiming = 'immediate' | 'next_billing_cycle' | Date;
|
|
4966
|
+
/** Payment settings for a billing workflow. */
|
|
4967
|
+
export type WorkflowPaymentSettings = WorkflowPaymentChargeAutomaticallySettings | WorkflowPaymentSendInvoiceSettings;
|
|
4968
|
+
/** Payment settings for a billing workflow. */
|
|
4969
|
+
export type UpdateBillingWorkflowPaymentSettings = UpdateBillingWorkflowPaymentChargeAutomaticallySettings | UpdateBillingWorkflowPaymentSendInvoiceSettings;
|
|
4970
|
+
/** A parameter that failed validation. */
|
|
4971
|
+
export type InvalidParameter = InvalidParameterStandard | InvalidParameterMinimumLength | InvalidParameterMaximumLength | InvalidParameterChoiceItem | InvalidParameterDependentItem;
|
|
4972
|
+
/**
|
|
4973
|
+
* Entitlement template configured on a rate card. The feature is taken from the
|
|
4974
|
+
* rate card itself, so it is omitted here.
|
|
4975
|
+
*/
|
|
4976
|
+
export type RateCardEntitlement = RateCardMeteredEntitlement | RateCardStaticEntitlement | RateCardBooleanEntitlement;
|
|
4977
|
+
/** Fiat or custom currency. */
|
|
4978
|
+
export type Currency = CurrencyFiat | CurrencyCustom;
|
|
4979
|
+
/**
|
|
4980
|
+
* Per-unit cost configuration for a feature. Either a fixed manual amount or a
|
|
4981
|
+
* dynamic LLM cost lookup.
|
|
4982
|
+
*/
|
|
4983
|
+
export type FeatureUnitCost = FeatureManualUnitCost | FeatureLlmUnitCost;
|
|
4984
|
+
/**
|
|
4985
|
+
* The alignment for collecting the pending line items into an invoice.
|
|
4986
|
+
*
|
|
4987
|
+
* Defaults to subscription, which means that we are to create a new invoice every
|
|
4988
|
+
* time the a subscription period starts (for in advance items) or ends (for in
|
|
4989
|
+
* arrears items).
|
|
4990
|
+
*/
|
|
4991
|
+
export type WorkflowCollectionAlignment = WorkflowCollectionAlignmentSubscription | WorkflowCollectionAlignmentAnchored;
|
|
4992
|
+
/** Installed application. */
|
|
4993
|
+
export type App = AppStripe | AppSandbox | AppExternalInvoicing;
|
|
4994
|
+
/** Price. */
|
|
4995
|
+
export type Price = PriceFree | PriceFlat | PriceUnit | PriceGraduated | PriceVolume;
|
|
4996
|
+
/** Price. */
|
|
4997
|
+
export type UpdatePrice = UpdatePriceFree | UpdatePriceFlat | UpdatePriceUnit | UpdatePriceGraduated | UpdatePriceVolume;
|
|
4998
|
+
/** Customer charge. */
|
|
4999
|
+
export type CreateChargeRequest = CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest;
|
|
5000
|
+
/** Customer charge. */
|
|
5001
|
+
export type Charge = ChargeFlatFee | ChargeUsageBased;
|
|
5002
|
+
/**
|
|
5003
|
+
* A top-level line item on an invoice.
|
|
5004
|
+
*
|
|
5005
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
5006
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
5007
|
+
* present.
|
|
5008
|
+
*/
|
|
5009
|
+
export type InvoiceLine = InvoiceStandardLine;
|
|
5010
|
+
/**
|
|
5011
|
+
* A top-level line item on an invoice.
|
|
5012
|
+
*
|
|
5013
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
5014
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
5015
|
+
* present.
|
|
5016
|
+
*/
|
|
5017
|
+
export type UpdateInvoiceLine = UpdateInvoiceStandardLine;
|
|
5018
|
+
/**
|
|
5019
|
+
* An invoice issued to a customer.
|
|
5020
|
+
*
|
|
5021
|
+
* The `type` field determines the concrete variant:
|
|
5022
|
+
*
|
|
5023
|
+
* - `standard`: a standard invoice for charges owed.
|
|
5024
|
+
*/
|
|
5025
|
+
export type Invoice = InvoiceStandard;
|
|
5026
|
+
/** UpdateInvoiceRequest update request. */
|
|
5027
|
+
export type UpdateInvoiceRequest = UpdateInvoiceStandardRequest;
|
|
5028
|
+
/**
|
|
5029
|
+
* Sort query.
|
|
5030
|
+
*
|
|
5031
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
5032
|
+
* suffix is used to specify a descending order.
|
|
5033
|
+
*/
|
|
5346
5034
|
export interface SortQueryInput {
|
|
5347
5035
|
/** The attribute to sort by. */
|
|
5348
5036
|
by: string;
|
|
5349
5037
|
/** The sort order. `asc` for ascending, `desc` for descending. */
|
|
5350
5038
|
order?: 'asc' | 'desc';
|
|
5351
5039
|
}
|
|
5040
|
+
/** Standard error response. */
|
|
5352
5041
|
export interface BaseErrorInput {
|
|
5353
5042
|
/** Type contains a URI that identifies the problem type. */
|
|
5354
5043
|
type?: string;
|
|
@@ -5365,6 +5054,10 @@ export interface BaseErrorInput {
|
|
|
5365
5054
|
instance: string;
|
|
5366
5055
|
[key: string]: unknown;
|
|
5367
5056
|
}
|
|
5057
|
+
/**
|
|
5058
|
+
* Payment settings for a billing workflow when the collection method is send
|
|
5059
|
+
* invoice.
|
|
5060
|
+
*/
|
|
5368
5061
|
export interface WorkflowPaymentSendInvoiceSettingsInput {
|
|
5369
5062
|
/** The collection method for the invoice. */
|
|
5370
5063
|
collectionMethod: 'send_invoice';
|
|
@@ -5374,6 +5067,13 @@ export interface WorkflowPaymentSendInvoiceSettingsInput {
|
|
|
5374
5067
|
*/
|
|
5375
5068
|
dueAfter?: string;
|
|
5376
5069
|
}
|
|
5070
|
+
/**
|
|
5071
|
+
* Invoice-level invoicing settings.
|
|
5072
|
+
*
|
|
5073
|
+
* A subset of BillingWorkflowInvoicingSettings limited to fields that are
|
|
5074
|
+
* meaningful per-invoice. progressive_billing is omitted as it is a gather-time /
|
|
5075
|
+
* profile-level decision.
|
|
5076
|
+
*/
|
|
5377
5077
|
export interface InvoiceWorkflowInvoicingSettingsInput {
|
|
5378
5078
|
/** Whether to automatically issue the invoice after the draft_period has passed. */
|
|
5379
5079
|
autoAdvance?: boolean;
|
|
@@ -5382,12 +5082,23 @@ export interface InvoiceWorkflowInvoicingSettingsInput {
|
|
|
5382
5082
|
/** The period after which the invoice is considered overdue if not paid. */
|
|
5383
5083
|
dueAfter?: string;
|
|
5384
5084
|
}
|
|
5085
|
+
/**
|
|
5086
|
+
* Invoice-level invoicing settings.
|
|
5087
|
+
*
|
|
5088
|
+
* A subset of BillingWorkflowInvoicingSettings limited to fields that are
|
|
5089
|
+
* meaningful per-invoice. progressive_billing is omitted as it is a gather-time /
|
|
5090
|
+
* profile-level decision.
|
|
5091
|
+
*/
|
|
5385
5092
|
export interface UpdateBillingInvoiceWorkflowInvoicingSettingsInput {
|
|
5386
5093
|
/** Whether to automatically issue the invoice after the draft_period has passed. */
|
|
5387
5094
|
autoAdvance?: boolean;
|
|
5388
5095
|
/** The period for the invoice to be kept in draft status for manual reviews. */
|
|
5389
5096
|
draftPeriod?: string;
|
|
5390
5097
|
}
|
|
5098
|
+
/**
|
|
5099
|
+
* Payment settings for a billing workflow when the collection method is send
|
|
5100
|
+
* invoice.
|
|
5101
|
+
*/
|
|
5391
5102
|
export interface UpdateBillingWorkflowPaymentSendInvoiceSettingsInput {
|
|
5392
5103
|
/** The collection method for the invoice. */
|
|
5393
5104
|
collectionMethod: 'send_invoice';
|
|
@@ -5397,6 +5108,7 @@ export interface UpdateBillingWorkflowPaymentSendInvoiceSettingsInput {
|
|
|
5397
5108
|
*/
|
|
5398
5109
|
dueAfter?: string;
|
|
5399
5110
|
}
|
|
5111
|
+
/** Metering event following the CloudEvents specification. */
|
|
5400
5112
|
export interface EventInput {
|
|
5401
5113
|
/** Identifies the event. */
|
|
5402
5114
|
id: string;
|
|
@@ -5426,30 +5138,43 @@ export interface EventInput {
|
|
|
5426
5138
|
/** The event payload. Optional, if present it must be a JSON object. */
|
|
5427
5139
|
data?: Record<string, unknown> | null;
|
|
5428
5140
|
}
|
|
5141
|
+
/** Unauthorized. */
|
|
5429
5142
|
export interface UnauthorizedInput extends BaseErrorInput {
|
|
5430
5143
|
}
|
|
5144
|
+
/** Forbidden. */
|
|
5431
5145
|
export interface ForbiddenInput extends BaseErrorInput {
|
|
5432
5146
|
}
|
|
5147
|
+
/** Not Found. */
|
|
5433
5148
|
export interface NotFoundInput extends BaseErrorInput {
|
|
5434
5149
|
}
|
|
5150
|
+
/** Gone. */
|
|
5435
5151
|
export interface GoneInput extends BaseErrorInput {
|
|
5436
5152
|
}
|
|
5153
|
+
/** Conflict. */
|
|
5437
5154
|
export interface ConflictInput extends BaseErrorInput {
|
|
5438
5155
|
}
|
|
5156
|
+
/** Payload Too Large. */
|
|
5439
5157
|
export interface PayloadTooLargeInput extends BaseErrorInput {
|
|
5440
5158
|
}
|
|
5159
|
+
/** Unsupported Media Type. */
|
|
5441
5160
|
export interface UnsupportedMediaTypeInput extends BaseErrorInput {
|
|
5442
5161
|
}
|
|
5162
|
+
/** Unprocessable Content. */
|
|
5443
5163
|
export interface UnprocessableContentInput extends BaseErrorInput {
|
|
5444
5164
|
}
|
|
5165
|
+
/** Too Many Requests. */
|
|
5445
5166
|
export interface TooManyRequestsInput extends BaseErrorInput {
|
|
5446
5167
|
}
|
|
5168
|
+
/** Internal Server Error. */
|
|
5447
5169
|
export interface InternalInput extends BaseErrorInput {
|
|
5448
5170
|
}
|
|
5171
|
+
/** Not Implemented. */
|
|
5449
5172
|
export interface NotImplementedInput extends BaseErrorInput {
|
|
5450
5173
|
}
|
|
5174
|
+
/** Not Available. */
|
|
5451
5175
|
export interface NotAvailableInput extends BaseErrorInput {
|
|
5452
5176
|
}
|
|
5177
|
+
/** Controls which customer fields can be updated by the checkout session. */
|
|
5453
5178
|
export interface AppStripeCreateCheckoutSessionCustomerUpdateInput {
|
|
5454
5179
|
/**
|
|
5455
5180
|
* Whether to save the billing address to customer.address.
|
|
@@ -5470,6 +5195,7 @@ export interface AppStripeCreateCheckoutSessionCustomerUpdateInput {
|
|
|
5470
5195
|
*/
|
|
5471
5196
|
shipping?: 'auto' | 'never';
|
|
5472
5197
|
}
|
|
5198
|
+
/** Tax ID collection configuration for checkout sessions. */
|
|
5473
5199
|
export interface AppStripeCreateCheckoutSessionTaxIdCollectionInput {
|
|
5474
5200
|
/**
|
|
5475
5201
|
* Enable tax ID collection during checkout.
|
|
@@ -5484,6 +5210,7 @@ export interface AppStripeCreateCheckoutSessionTaxIdCollectionInput {
|
|
|
5484
5210
|
*/
|
|
5485
5211
|
required?: 'if_supported' | 'never';
|
|
5486
5212
|
}
|
|
5213
|
+
/** Purchase and payment terms of the grant. */
|
|
5487
5214
|
export interface CreateCreditGrantPurchaseInput {
|
|
5488
5215
|
/** Currency of the purchase amount. */
|
|
5489
5216
|
currency: string;
|
|
@@ -5504,6 +5231,7 @@ export interface CreateCreditGrantPurchaseInput {
|
|
|
5504
5231
|
*/
|
|
5505
5232
|
availabilityPolicy?: 'on_creation';
|
|
5506
5233
|
}
|
|
5234
|
+
/** The entitlement template of a metered entitlement. */
|
|
5507
5235
|
export interface RateCardMeteredEntitlementInput {
|
|
5508
5236
|
/** The type of the entitlement template. */
|
|
5509
5237
|
type: 'metered';
|
|
@@ -5525,6 +5253,7 @@ export interface RateCardMeteredEntitlementInput {
|
|
|
5525
5253
|
*/
|
|
5526
5254
|
usagePeriod?: string;
|
|
5527
5255
|
}
|
|
5256
|
+
/** Purchase and payment terms of the grant. */
|
|
5528
5257
|
export interface CreditGrantPurchaseInput {
|
|
5529
5258
|
/** Currency of the purchase amount. */
|
|
5530
5259
|
currency: string;
|
|
@@ -5549,6 +5278,41 @@ export interface CreditGrantPurchaseInput {
|
|
|
5549
5278
|
/** Current payment settlement status. */
|
|
5550
5279
|
settlementStatus?: 'pending' | 'authorized' | 'settled';
|
|
5551
5280
|
}
|
|
5281
|
+
/** Request body for voiding a credit grant. */
|
|
5282
|
+
export interface VoidCreditGrantRequestInput {
|
|
5283
|
+
/**
|
|
5284
|
+
* How voiding adjusts payment state related to the grant.
|
|
5285
|
+
*
|
|
5286
|
+
* Currently only `none` is supported: voiding does not adjust invoices, payment
|
|
5287
|
+
* authorization, settlement, payment intents, or external collection state. If
|
|
5288
|
+
* payment later completes, the original invoiced amount may still be collected.
|
|
5289
|
+
*/
|
|
5290
|
+
paymentAdjustment?: 'none';
|
|
5291
|
+
}
|
|
5292
|
+
/**
|
|
5293
|
+
* Unit conversion configuration.
|
|
5294
|
+
*
|
|
5295
|
+
* Transforms raw metered quantities into billing-ready units before pricing and
|
|
5296
|
+
* entitlement evaluation. Applied at the rate card level so the same feature can
|
|
5297
|
+
* be billed in different units across plans.
|
|
5298
|
+
*
|
|
5299
|
+
* Examples:
|
|
5300
|
+
*
|
|
5301
|
+
* - Meter bytes, bill GB: operation=divide, conversionFactor=1e9,
|
|
5302
|
+
* rounding=ceiling, displayUnit="GB"
|
|
5303
|
+
* - Meter seconds, bill hours: operation=divide, conversionFactor=3600,
|
|
5304
|
+
* rounding=ceiling, displayUnit="hours"
|
|
5305
|
+
* - Cost + 20% margin: operation=multiply, conversionFactor=1.2
|
|
5306
|
+
* - Bill per million tokens: operation=divide, conversionFactor=1e6,
|
|
5307
|
+
* rounding=ceiling, displayUnit="M"
|
|
5308
|
+
*
|
|
5309
|
+
* v1 equivalents:
|
|
5310
|
+
*
|
|
5311
|
+
* - DynamicPrice(multiplier): operation=multiply, conversionFactor=multiplier +
|
|
5312
|
+
* UnitPrice(amount=1)
|
|
5313
|
+
* - PackagePrice(amount, quantityPerPkg): operation=divide,
|
|
5314
|
+
* conversionFactor=quantityPerPkg, rounding=ceiling + UnitPrice(amount)
|
|
5315
|
+
*/
|
|
5552
5316
|
export interface UnitConfigInput {
|
|
5553
5317
|
/** The arithmetic operation to apply to the raw metered quantity. */
|
|
5554
5318
|
operation: 'divide' | 'multiply';
|
|
@@ -5583,6 +5347,7 @@ export interface UnitConfigInput {
|
|
|
5583
5347
|
*/
|
|
5584
5348
|
displayUnit?: string;
|
|
5585
5349
|
}
|
|
5350
|
+
/** Invoice settings for a billing workflow. */
|
|
5586
5351
|
export interface WorkflowInvoicingSettingsInput {
|
|
5587
5352
|
/** Whether to automatically issue the invoice after the draftPeriod has passed. */
|
|
5588
5353
|
autoAdvance?: boolean;
|
|
@@ -5593,6 +5358,7 @@ export interface WorkflowInvoicingSettingsInput {
|
|
|
5593
5358
|
/** Controls how subscription-ending shortened service periods are billed. */
|
|
5594
5359
|
subscriptionEndProrationMode?: 'bill_full_period' | 'bill_actual_period';
|
|
5595
5360
|
}
|
|
5361
|
+
/** Query to evaluate feature access for a list of customers. */
|
|
5596
5362
|
export interface GovernanceQueryRequestInput {
|
|
5597
5363
|
/**
|
|
5598
5364
|
* Whether to include credit balance availability for each resolved customer. When
|
|
@@ -5604,6 +5370,7 @@ export interface GovernanceQueryRequestInput {
|
|
|
5604
5370
|
customer: GovernanceQueryRequestCustomers;
|
|
5605
5371
|
feature?: GovernanceQueryRequestFeatures;
|
|
5606
5372
|
}
|
|
5373
|
+
/** An ingested metering event with ingestion metadata. */
|
|
5607
5374
|
export interface IngestedEventInput {
|
|
5608
5375
|
/** The original event ingested. */
|
|
5609
5376
|
event: EventInput;
|
|
@@ -5616,10 +5383,16 @@ export interface IngestedEventInput {
|
|
|
5616
5383
|
/** The validation errors of the ingested event. */
|
|
5617
5384
|
validationErrors?: IngestedEventValidationError[];
|
|
5618
5385
|
}
|
|
5386
|
+
/** Request for canceling a subscription. */
|
|
5619
5387
|
export interface SubscriptionCancelInput {
|
|
5620
5388
|
/** If not provided the subscription is canceled immediately. */
|
|
5621
|
-
timing?:
|
|
5389
|
+
timing?: SubscriptionEditTiming;
|
|
5622
5390
|
}
|
|
5391
|
+
/**
|
|
5392
|
+
* Usage quantity details on an invoice line item when UnitConfig is in effect.
|
|
5393
|
+
*
|
|
5394
|
+
* Provides the full audit trail from raw meter output to the invoiced amount.
|
|
5395
|
+
*/
|
|
5623
5396
|
export interface InvoiceUsageQuantityDetailInput {
|
|
5624
5397
|
/** The raw quantity as reported by the meter (native units). */
|
|
5625
5398
|
rawQuantity: string;
|
|
@@ -5638,18 +5411,33 @@ export interface InvoiceUsageQuantityDetailInput {
|
|
|
5638
5411
|
*/
|
|
5639
5412
|
appliedUnitConfig: UnitConfigInput;
|
|
5640
5413
|
}
|
|
5414
|
+
/**
|
|
5415
|
+
* Invoice-level snapshot of the workflow configuration.
|
|
5416
|
+
*
|
|
5417
|
+
* Contains only the settings that are meaningful for an already-created invoice:
|
|
5418
|
+
* invoicing behaviour and payment settings. Collection alignment and tax policy
|
|
5419
|
+
* are gather-time / profile-wide concerns and are not included.
|
|
5420
|
+
*/
|
|
5641
5421
|
export interface InvoiceWorkflowInput {
|
|
5642
5422
|
/** Invoicing settings for this invoice. */
|
|
5643
5423
|
invoicing?: InvoiceWorkflowInvoicingSettingsInput;
|
|
5644
5424
|
/** Payment settings for this invoice. */
|
|
5645
|
-
payment?:
|
|
5425
|
+
payment?: WorkflowPaymentSettingsInput;
|
|
5646
5426
|
}
|
|
5427
|
+
/**
|
|
5428
|
+
* Invoice-level snapshot of the workflow configuration.
|
|
5429
|
+
*
|
|
5430
|
+
* Contains only the settings that are meaningful for an already-created invoice:
|
|
5431
|
+
* invoicing behaviour and payment settings. Collection alignment and tax policy
|
|
5432
|
+
* are gather-time / profile-wide concerns and are not included.
|
|
5433
|
+
*/
|
|
5647
5434
|
export interface UpdateBillingInvoiceWorkflowInput {
|
|
5648
5435
|
/** Invoicing settings for this invoice. */
|
|
5649
5436
|
invoicing?: UpdateBillingInvoiceWorkflowInvoicingSettingsInput;
|
|
5650
5437
|
/** Payment settings for this invoice. */
|
|
5651
|
-
payment?:
|
|
5438
|
+
payment?: UpdateBillingWorkflowPaymentSettingsInput;
|
|
5652
5439
|
}
|
|
5440
|
+
/** CreditGrant create request. */
|
|
5653
5441
|
export interface CreateCreditGrantRequestInput {
|
|
5654
5442
|
/**
|
|
5655
5443
|
* Display name of the resource.
|
|
@@ -5667,7 +5455,7 @@ export interface CreateCreditGrantRequestInput {
|
|
|
5667
5455
|
/** Funding method of the grant. */
|
|
5668
5456
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
5669
5457
|
/** The currency of the granted credits. */
|
|
5670
|
-
currency:
|
|
5458
|
+
currency: CreateCurrencyCode;
|
|
5671
5459
|
/** Granted credit amount. */
|
|
5672
5460
|
amount: string;
|
|
5673
5461
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -5704,6 +5492,12 @@ export interface CreateCreditGrantRequestInput {
|
|
|
5704
5492
|
*/
|
|
5705
5493
|
key?: string;
|
|
5706
5494
|
}
|
|
5495
|
+
/**
|
|
5496
|
+
* A credit grant allocates credits to a customer.
|
|
5497
|
+
*
|
|
5498
|
+
* Credits are drawn down against charges according to the settlement mode
|
|
5499
|
+
* configured on the rate card.
|
|
5500
|
+
*/
|
|
5707
5501
|
export interface CreditGrantInput {
|
|
5708
5502
|
id: string;
|
|
5709
5503
|
/**
|
|
@@ -5728,7 +5522,7 @@ export interface CreditGrantInput {
|
|
|
5728
5522
|
/** Funding method of the grant. */
|
|
5729
5523
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
5730
5524
|
/** The currency of the granted credits. */
|
|
5731
|
-
currency:
|
|
5525
|
+
currency: BillingCurrencyCode;
|
|
5732
5526
|
/** Granted credit amount. */
|
|
5733
5527
|
amount: string;
|
|
5734
5528
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -5771,6 +5565,7 @@ export interface CreditGrantInput {
|
|
|
5771
5565
|
/** Current lifecycle status of the grant. */
|
|
5772
5566
|
status: 'pending' | 'active' | 'expired' | 'voided';
|
|
5773
5567
|
}
|
|
5568
|
+
/** Tax settings for a billing workflow. */
|
|
5774
5569
|
export interface WorkflowTaxSettingsInput {
|
|
5775
5570
|
/**
|
|
5776
5571
|
* Enable automatic tax calculation when tax is supported by the app. For example,
|
|
@@ -5794,10 +5589,12 @@ export interface WorkflowTaxSettingsInput {
|
|
|
5794
5589
|
*/
|
|
5795
5590
|
defaultTaxConfig?: TaxConfig;
|
|
5796
5591
|
}
|
|
5592
|
+
/** Cursor paginated response. */
|
|
5797
5593
|
export interface IngestedEventPaginatedResponseInput {
|
|
5798
5594
|
data: IngestedEventInput[];
|
|
5799
5595
|
meta: CursorMeta;
|
|
5800
5596
|
}
|
|
5597
|
+
/** A meter query request. */
|
|
5801
5598
|
export interface MeterQueryRequestInput {
|
|
5802
5599
|
/** The start of the period the usage is queried from. */
|
|
5803
5600
|
from?: Date;
|
|
@@ -5807,7 +5604,7 @@ export interface MeterQueryRequestInput {
|
|
|
5807
5604
|
* The size of the time buckets to group the usage into. If not specified, the
|
|
5808
5605
|
* usage is aggregated over the entire period.
|
|
5809
5606
|
*/
|
|
5810
|
-
granularity?:
|
|
5607
|
+
granularity?: MeterQueryGranularity;
|
|
5811
5608
|
/**
|
|
5812
5609
|
* The value is the name of the time zone as defined in the IANA Time Zone Database
|
|
5813
5610
|
* (http://www.iana.org/time-zones). The time zone is used to determine the start
|
|
@@ -5819,6 +5616,12 @@ export interface MeterQueryRequestInput {
|
|
|
5819
5616
|
/** Filters to apply to the query. */
|
|
5820
5617
|
filters?: MeterQueryFilters;
|
|
5821
5618
|
}
|
|
5619
|
+
/**
|
|
5620
|
+
* Configuration options for creating a Stripe Checkout Session.
|
|
5621
|
+
*
|
|
5622
|
+
* Based on Stripe's
|
|
5623
|
+
* [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create).
|
|
5624
|
+
*/
|
|
5822
5625
|
export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
|
|
5823
5626
|
/**
|
|
5824
5627
|
* Whether to collect the customer's billing address.
|
|
@@ -5906,6 +5709,7 @@ export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
|
|
|
5906
5709
|
/** Configuration for collecting tax IDs during checkout. */
|
|
5907
5710
|
taxIdCollection?: AppStripeCreateCheckoutSessionTaxIdCollectionInput;
|
|
5908
5711
|
}
|
|
5712
|
+
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
5909
5713
|
export interface InvoiceWorkflowSettingsInput {
|
|
5910
5714
|
/** The apps that will be used to orchestrate the invoice's workflow. */
|
|
5911
5715
|
apps?: InvoiceWorkflowAppsReferences;
|
|
@@ -5921,6 +5725,12 @@ export interface InvoiceWorkflowSettingsInput {
|
|
|
5921
5725
|
*/
|
|
5922
5726
|
workflow: InvoiceWorkflowInput;
|
|
5923
5727
|
}
|
|
5728
|
+
/**
|
|
5729
|
+
* A detailed (child) sub-line belonging to a parent invoice line.
|
|
5730
|
+
*
|
|
5731
|
+
* Detailed lines represent the individual flat-fee components that make up a
|
|
5732
|
+
* usage-based parent line after quantity snapshotting.
|
|
5733
|
+
*/
|
|
5924
5734
|
export interface InvoiceDetailedLineInput {
|
|
5925
5735
|
id: string;
|
|
5926
5736
|
/**
|
|
@@ -5959,6 +5769,7 @@ export interface InvoiceDetailedLineInput {
|
|
|
5959
5769
|
/** The unit price of the detailed line. */
|
|
5960
5770
|
unitPrice: string;
|
|
5961
5771
|
}
|
|
5772
|
+
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
5962
5773
|
export interface UpdateInvoiceWorkflowSettingsInput {
|
|
5963
5774
|
/**
|
|
5964
5775
|
* The workflow configuration that was active when the invoice was created.
|
|
@@ -5970,14 +5781,23 @@ export interface UpdateInvoiceWorkflowSettingsInput {
|
|
|
5970
5781
|
*/
|
|
5971
5782
|
workflow: UpdateBillingInvoiceWorkflowInput;
|
|
5972
5783
|
}
|
|
5784
|
+
/** Page paginated response. */
|
|
5973
5785
|
export interface CreditGrantPagePaginatedResponseInput {
|
|
5974
5786
|
data: CreditGrantInput[];
|
|
5975
5787
|
meta: PaginatedMeta;
|
|
5976
5788
|
}
|
|
5789
|
+
/** Bad Request. */
|
|
5977
5790
|
export interface BadRequestInput extends BaseErrorInput {
|
|
5978
5791
|
/** The list of parameters that failed validation. */
|
|
5979
|
-
invalidParameters:
|
|
5792
|
+
invalidParameters: InvalidParameter[];
|
|
5980
5793
|
}
|
|
5794
|
+
/**
|
|
5795
|
+
* Request to create a Stripe Checkout Session for the customer.
|
|
5796
|
+
*
|
|
5797
|
+
* Checkout Sessions are used to collect payment method information from customers
|
|
5798
|
+
* in a secure, Stripe-hosted interface. This integration uses setup mode to
|
|
5799
|
+
* collect payment methods that can be charged later for subscription billing.
|
|
5800
|
+
*/
|
|
5981
5801
|
export interface CustomerStripeCreateCheckoutSessionRequestInput {
|
|
5982
5802
|
/**
|
|
5983
5803
|
* Options for configuring the Stripe Checkout Session.
|
|
@@ -5987,9 +5807,13 @@ export interface CustomerStripeCreateCheckoutSessionRequestInput {
|
|
|
5987
5807
|
*/
|
|
5988
5808
|
stripeOptions: AppStripeCreateCheckoutSessionRequestOptionsInput;
|
|
5989
5809
|
}
|
|
5810
|
+
/**
|
|
5811
|
+
* Workflow collection specifies how to collect the pending line items for an
|
|
5812
|
+
* invoice.
|
|
5813
|
+
*/
|
|
5990
5814
|
export interface WorkflowCollectionSettingsInput {
|
|
5991
5815
|
/** The alignment for collecting the pending line items into an invoice. */
|
|
5992
|
-
alignment?:
|
|
5816
|
+
alignment?: WorkflowCollectionAlignment;
|
|
5993
5817
|
/**
|
|
5994
5818
|
* This grace period can be used to delay the collection of the pending line items
|
|
5995
5819
|
* specified in alignment.
|
|
@@ -5999,6 +5823,7 @@ export interface WorkflowCollectionSettingsInput {
|
|
|
5999
5823
|
*/
|
|
6000
5824
|
interval?: string;
|
|
6001
5825
|
}
|
|
5826
|
+
/** A rate card defines the pricing and entitlement of a feature or service. */
|
|
6002
5827
|
export interface RateCardInput {
|
|
6003
5828
|
/**
|
|
6004
5829
|
* Display name of the resource.
|
|
@@ -6022,7 +5847,7 @@ export interface RateCardInput {
|
|
|
6022
5847
|
*/
|
|
6023
5848
|
billingCadence?: string;
|
|
6024
5849
|
/** The price of the rate card. */
|
|
6025
|
-
price:
|
|
5850
|
+
price: Price;
|
|
6026
5851
|
/**
|
|
6027
5852
|
* Unit conversion configuration for the rate card.
|
|
6028
5853
|
*
|
|
@@ -6038,7 +5863,7 @@ export interface RateCardInput {
|
|
|
6038
5863
|
* The payment term of the rate card. In advance payment term can only be used for
|
|
6039
5864
|
* flat prices.
|
|
6040
5865
|
*/
|
|
6041
|
-
paymentTerm?:
|
|
5866
|
+
paymentTerm?: PricePaymentTerm;
|
|
6042
5867
|
/**
|
|
6043
5868
|
* Spend commitments for this rate card. Only applicable to usage-based prices
|
|
6044
5869
|
* (unit, graduated, volume).
|
|
@@ -6052,24 +5877,30 @@ export interface RateCardInput {
|
|
|
6052
5877
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
6053
5878
|
* this rate card. Requires `feature` to be set.
|
|
6054
5879
|
*/
|
|
6055
|
-
entitlement?:
|
|
5880
|
+
entitlement?: RateCardEntitlementInput;
|
|
6056
5881
|
}
|
|
5882
|
+
/** Billing workflow settings. */
|
|
6057
5883
|
export interface WorkflowInput {
|
|
6058
5884
|
/** The collection settings for this workflow */
|
|
6059
5885
|
collection?: WorkflowCollectionSettingsInput;
|
|
6060
5886
|
/** The invoicing settings for this workflow */
|
|
6061
5887
|
invoicing?: WorkflowInvoicingSettingsInput;
|
|
6062
5888
|
/** The payment settings for this workflow */
|
|
6063
|
-
payment?:
|
|
5889
|
+
payment?: WorkflowPaymentSettingsInput;
|
|
6064
5890
|
/** The tax settings for this workflow */
|
|
6065
5891
|
tax?: WorkflowTaxSettingsInput;
|
|
6066
5892
|
}
|
|
5893
|
+
/** A rate card for a subscription add-on. */
|
|
6067
5894
|
export interface SubscriptionAddonRateCardInput {
|
|
6068
5895
|
/** The rate card. */
|
|
6069
5896
|
rateCard: RateCardInput;
|
|
6070
5897
|
/** The IDs of the subscription items that this rate card belongs to. */
|
|
6071
5898
|
affectedSubscriptionItemIds: string[];
|
|
6072
5899
|
}
|
|
5900
|
+
/**
|
|
5901
|
+
* The plan phase or pricing ramp allows changing a plan's rate cards over time as
|
|
5902
|
+
* a subscription progresses.
|
|
5903
|
+
*/
|
|
6073
5904
|
export interface PlanPhaseInput {
|
|
6074
5905
|
/**
|
|
6075
5906
|
* Display name of the resource.
|
|
@@ -6093,6 +5924,10 @@ export interface PlanPhaseInput {
|
|
|
6093
5924
|
/** The rate cards of the plan. */
|
|
6094
5925
|
rateCards: RateCardInput[];
|
|
6095
5926
|
}
|
|
5927
|
+
/**
|
|
5928
|
+
* Add-on allows extending subscriptions with compatible plans with additional
|
|
5929
|
+
* ratecards.
|
|
5930
|
+
*/
|
|
6096
5931
|
export interface AddonInput {
|
|
6097
5932
|
id: string;
|
|
6098
5933
|
/**
|
|
@@ -6125,7 +5960,7 @@ export interface AddonInput {
|
|
|
6125
5960
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
6126
5961
|
instanceType: 'single' | 'multiple';
|
|
6127
5962
|
/** The currency code of the add-on. */
|
|
6128
|
-
currency:
|
|
5963
|
+
currency: BillingCurrencyCode;
|
|
6129
5964
|
/**
|
|
6130
5965
|
* The date and time when the add-on becomes effective. When not specified, the
|
|
6131
5966
|
* add-on is a draft.
|
|
@@ -6150,6 +5985,7 @@ export interface AddonInput {
|
|
|
6150
5985
|
/** List of validation errors. */
|
|
6151
5986
|
validationErrors?: ProductCatalogValidationError[];
|
|
6152
5987
|
}
|
|
5988
|
+
/** Addon create request. */
|
|
6153
5989
|
export interface CreateAddonRequestInput {
|
|
6154
5990
|
/**
|
|
6155
5991
|
* Display name of the resource.
|
|
@@ -6173,10 +6009,11 @@ export interface CreateAddonRequestInput {
|
|
|
6173
6009
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
6174
6010
|
instanceType: 'single' | 'multiple';
|
|
6175
6011
|
/** The currency code of the add-on. */
|
|
6176
|
-
currency:
|
|
6012
|
+
currency: BillingCurrencyCode;
|
|
6177
6013
|
/** The rate cards of the add-on. */
|
|
6178
6014
|
rateCards: RateCardInput[];
|
|
6179
6015
|
}
|
|
6016
|
+
/** Addon upsert request. */
|
|
6180
6017
|
export interface UpsertAddonRequestInput {
|
|
6181
6018
|
/**
|
|
6182
6019
|
* Display name of the resource.
|
|
@@ -6196,6 +6033,13 @@ export interface UpsertAddonRequestInput {
|
|
|
6196
6033
|
/** The rate cards of the add-on. */
|
|
6197
6034
|
rateCards: RateCardInput[];
|
|
6198
6035
|
}
|
|
6036
|
+
/**
|
|
6037
|
+
* A top-level line item on an invoice.
|
|
6038
|
+
*
|
|
6039
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
6040
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
6041
|
+
* present.
|
|
6042
|
+
*/
|
|
6199
6043
|
export interface InvoiceStandardLineInput {
|
|
6200
6044
|
/**
|
|
6201
6045
|
* Display name of the resource.
|
|
@@ -6260,6 +6104,10 @@ export interface InvoiceStandardLineInput {
|
|
|
6260
6104
|
/** Reference to the charge associated with this line item. */
|
|
6261
6105
|
charge?: ChargeReference;
|
|
6262
6106
|
}
|
|
6107
|
+
/**
|
|
6108
|
+
* Billing profiles contain the settings for billing and controls invoice
|
|
6109
|
+
* generation.
|
|
6110
|
+
*/
|
|
6263
6111
|
export interface ProfileInput {
|
|
6264
6112
|
id: string;
|
|
6265
6113
|
/**
|
|
@@ -6293,6 +6141,7 @@ export interface ProfileInput {
|
|
|
6293
6141
|
/** Whether this is the default profile. */
|
|
6294
6142
|
default: boolean;
|
|
6295
6143
|
}
|
|
6144
|
+
/** BillingProfile create request. */
|
|
6296
6145
|
export interface CreateBillingProfileRequestInput {
|
|
6297
6146
|
/**
|
|
6298
6147
|
* Display name of the resource.
|
|
@@ -6319,6 +6168,7 @@ export interface CreateBillingProfileRequestInput {
|
|
|
6319
6168
|
/** Whether this is the default profile. */
|
|
6320
6169
|
default: boolean;
|
|
6321
6170
|
}
|
|
6171
|
+
/** BillingProfile upsert request. */
|
|
6322
6172
|
export interface UpsertBillingProfileRequestInput {
|
|
6323
6173
|
/**
|
|
6324
6174
|
* Display name of the resource.
|
|
@@ -6343,6 +6193,7 @@ export interface UpsertBillingProfileRequestInput {
|
|
|
6343
6193
|
/** Whether this is the default profile. */
|
|
6344
6194
|
default: boolean;
|
|
6345
6195
|
}
|
|
6196
|
+
/** Addon purchased with a subscription. */
|
|
6346
6197
|
export interface SubscriptionAddonInput {
|
|
6347
6198
|
id: string;
|
|
6348
6199
|
labels?: Labels;
|
|
@@ -6382,6 +6233,7 @@ export interface SubscriptionAddonInput {
|
|
|
6382
6233
|
/** The rate cards of the add-on. */
|
|
6383
6234
|
rateCards: SubscriptionAddonRateCardInput[];
|
|
6384
6235
|
}
|
|
6236
|
+
/** Plans provide a template for subscriptions. */
|
|
6385
6237
|
export interface PlanInput {
|
|
6386
6238
|
id: string;
|
|
6387
6239
|
/**
|
|
@@ -6461,6 +6313,7 @@ export interface PlanInput {
|
|
|
6461
6313
|
*/
|
|
6462
6314
|
validationErrors?: ProductCatalogValidationError[];
|
|
6463
6315
|
}
|
|
6316
|
+
/** Plan create request. */
|
|
6464
6317
|
export interface CreatePlanRequestInput {
|
|
6465
6318
|
/**
|
|
6466
6319
|
* Display name of the resource.
|
|
@@ -6493,6 +6346,7 @@ export interface CreatePlanRequestInput {
|
|
|
6493
6346
|
*/
|
|
6494
6347
|
phases: PlanPhaseInput[];
|
|
6495
6348
|
}
|
|
6349
|
+
/** Plan upsert request. */
|
|
6496
6350
|
export interface UpsertPlanRequestInput {
|
|
6497
6351
|
/**
|
|
6498
6352
|
* Display name of the resource.
|
|
@@ -6515,22 +6369,27 @@ export interface UpsertPlanRequestInput {
|
|
|
6515
6369
|
*/
|
|
6516
6370
|
phases: PlanPhaseInput[];
|
|
6517
6371
|
}
|
|
6372
|
+
/** Page paginated response. */
|
|
6518
6373
|
export interface AddonPagePaginatedResponseInput {
|
|
6519
6374
|
data: AddonInput[];
|
|
6520
6375
|
meta: PaginatedMeta;
|
|
6521
6376
|
}
|
|
6377
|
+
/** Page paginated response. */
|
|
6522
6378
|
export interface ProfilePagePaginatedResponseInput {
|
|
6523
6379
|
data: ProfileInput[];
|
|
6524
6380
|
meta: PaginatedMeta;
|
|
6525
6381
|
}
|
|
6382
|
+
/** Page paginated response. */
|
|
6526
6383
|
export interface SubscriptionAddonPagePaginatedResponseInput {
|
|
6527
6384
|
data: SubscriptionAddonInput[];
|
|
6528
6385
|
meta: PaginatedMeta;
|
|
6529
6386
|
}
|
|
6387
|
+
/** Page paginated response. */
|
|
6530
6388
|
export interface PlanPagePaginatedResponseInput {
|
|
6531
6389
|
data: PlanInput[];
|
|
6532
6390
|
meta: PaginatedMeta;
|
|
6533
6391
|
}
|
|
6392
|
+
/** A standard invoice for charges owed by the customer. */
|
|
6534
6393
|
export interface InvoiceStandardInput {
|
|
6535
6394
|
id: string;
|
|
6536
6395
|
/**
|
|
@@ -6609,8 +6468,9 @@ export interface InvoiceStandardInput {
|
|
|
6609
6468
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
6610
6469
|
* and cannot be edited directly.
|
|
6611
6470
|
*/
|
|
6612
|
-
lines?:
|
|
6471
|
+
lines?: InvoiceLineInput[];
|
|
6613
6472
|
}
|
|
6473
|
+
/** InvoiceStandard update request. */
|
|
6614
6474
|
export interface UpdateInvoiceStandardRequestInput {
|
|
6615
6475
|
/**
|
|
6616
6476
|
* Optional description of the resource.
|
|
@@ -6639,10 +6499,37 @@ export interface UpdateInvoiceStandardRequestInput {
|
|
|
6639
6499
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
6640
6500
|
* and cannot be edited directly.
|
|
6641
6501
|
*/
|
|
6642
|
-
lines?:
|
|
6502
|
+
lines?: UpdateInvoiceLine[];
|
|
6643
6503
|
}
|
|
6504
|
+
/** Page paginated response. */
|
|
6644
6505
|
export interface InvoicePagePaginatedResponseInput {
|
|
6645
|
-
data:
|
|
6506
|
+
data: InvoiceInput[];
|
|
6646
6507
|
meta: PaginatedMeta;
|
|
6647
6508
|
}
|
|
6648
|
-
|
|
6509
|
+
/** Payment settings for a billing workflow. */
|
|
6510
|
+
export type WorkflowPaymentSettingsInput = WorkflowPaymentChargeAutomaticallySettings | WorkflowPaymentSendInvoiceSettingsInput;
|
|
6511
|
+
/** Payment settings for a billing workflow. */
|
|
6512
|
+
export type UpdateBillingWorkflowPaymentSettingsInput = UpdateBillingWorkflowPaymentChargeAutomaticallySettings | UpdateBillingWorkflowPaymentSendInvoiceSettingsInput;
|
|
6513
|
+
/**
|
|
6514
|
+
* Entitlement template configured on a rate card. The feature is taken from the
|
|
6515
|
+
* rate card itself, so it is omitted here.
|
|
6516
|
+
*/
|
|
6517
|
+
export type RateCardEntitlementInput = RateCardMeteredEntitlementInput | RateCardStaticEntitlement | RateCardBooleanEntitlement;
|
|
6518
|
+
/**
|
|
6519
|
+
* A top-level line item on an invoice.
|
|
6520
|
+
*
|
|
6521
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
6522
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
6523
|
+
* present.
|
|
6524
|
+
*/
|
|
6525
|
+
export type InvoiceLineInput = InvoiceStandardLineInput;
|
|
6526
|
+
/**
|
|
6527
|
+
* An invoice issued to a customer.
|
|
6528
|
+
*
|
|
6529
|
+
* The `type` field determines the concrete variant:
|
|
6530
|
+
*
|
|
6531
|
+
* - `standard`: a standard invoice for charges owed.
|
|
6532
|
+
*/
|
|
6533
|
+
export type InvoiceInput = InvoiceStandardInput;
|
|
6534
|
+
/** UpdateInvoiceRequest update request. */
|
|
6535
|
+
export type UpdateInvoiceRequestInput = UpdateInvoiceStandardRequestInput;
|