@usebillow/sdk 0.5.0 → 0.6.0
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/CHANGELOG.md +11 -0
- package/README.md +9 -0
- package/dist/billing-B-VyZCXV.d.cts +371 -0
- package/dist/billing-CgjcWmvb.d.ts +371 -0
- package/dist/{chunk-Z6VXPONT.js → chunk-DYWGZRE2.js} +197 -15
- package/dist/chunk-DYWGZRE2.js.map +1 -0
- package/dist/config.d.cts +4 -3
- package/dist/config.d.ts +4 -3
- package/dist/{credits-C3Fe3TO0.d.ts → hosted-domains-BtCd-Rur.d.cts} +43 -1
- package/dist/{credits-C3Fe3TO0.d.cts → hosted-domains-CrVDsk2i.d.ts} +43 -1
- package/dist/index.cjs +195 -13
- package/dist/index.cjs.map +1 -1
- package/dist/{billing-C4RIMgH_.d.ts → index.d-CKQAhQfJ.d.cts} +180 -374
- package/dist/{billing-DZ4rIyg7.d.cts → index.d-CKQAhQfJ.d.ts} +180 -374
- package/dist/index.d.cts +547 -42
- package/dist/index.d.ts +547 -42
- package/dist/index.js +1 -1
- package/dist/ingestion.d.cts +3 -2
- package/dist/ingestion.d.ts +3 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -1
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -1
- package/dist/server.d.cts +3 -2
- package/dist/server.d.ts +3 -2
- package/dist/webhooks.cjs +10 -2
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +37 -21
- package/dist/webhooks.d.ts +37 -21
- package/dist/webhooks.js +10 -3
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-Z6VXPONT.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { f as SavedPaymentMethod, g as CreateHostedDomainInput, h as PayInvoiceInput } from './index.d-CKQAhQfJ.js';
|
|
2
|
+
export { i as ContractAddSubscriptionItemInput, j as ContractApplySubscriptionCouponInput, k as ContractCancelSubscriptionInput, l as ContractChangeSubscriptionPlanInput, m as ContractCreateChargeInput, n as ContractCreateCustomerInput, o as ContractCreateMerchantInitiatedChargeInput, p as ContractCreatePortalSessionInput, q as ContractCreateProductInput, r as ContractCreateSubscriptionInput, s as ContractCreateWebhookEndpointInput, M as ContractMigrateSubscribersInput, R as ContractRefundChargeInput, t as ContractResolveRefundInput, U as ContractUpdateProductInput, u as ContractUpdateSubscriptionItemInput, v as ContractUpdateWebhookEndpointInput, H as HostedDomain, w as HostedDomainList, I as InvoicePaymentResult } from './index.d-CKQAhQfJ.js';
|
|
3
3
|
import { C as ChargeStatus, P as PaymentMethodStatus, I as InvoiceStatus, R as RefundStatus, W as WebhookDeliveryStatus } from './billing-status-BZQN_gm7.js';
|
|
4
4
|
export { a as CHARGE_STATUSES, b as INVOICE_STATUSES, c as PAYMENT_METHOD_STATUSES, d as REFUND_STATUSES, e as WEBHOOK_DELIVERY_STATUSES } from './billing-status-BZQN_gm7.js';
|
|
5
5
|
import { SubscriptionStatus } from './status.js';
|
|
6
6
|
export { ACTIVE_SUBSCRIPTION_STATUSES, NEVER_ACTIVATED_SUBSCRIPTION_STATUSES, SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, grantsAccess, isTerminal } from './status.js';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
7
|
+
import { c as TaxBehavior, d as Customer, U as UnappliedPaymentReason, e as CreateChargeInput, R as RequestOptions, f as Charge, g as CreateMerchantInitiatedChargeInput, I as IdempotentRequestOptions, h as CallOptions, C as CreateProductInput, i as UpdateProductInput, j as MigrationResult, k as CreateSubscriptionInput, B as BillowOptions, a as CreateCouponInput, l as Coupon, F as FeatureKind, M as MeterConfig, m as Feature, n as UpdateFeatureInput, o as UsageAlert, p as CreateUsageAlertInput, b as CheckResult, T as TrackResult, E as EntitlementView, A as AttachResult } from './billing-CgjcWmvb.js';
|
|
8
|
+
export { q as ActivatedSubscriptionResult, r as BillingInterval, s as CouponDuration, t as CouponKind, u as CreateSubscriptionResult, v as EntitlementInput, w as MeterAggregation, x as MeterFilter, y as MeterRoundingMode, z as PendingSubscriptionCheckoutResult, D as PriceInput, P as Product, G as ProductEntitlement, H as ProductPrice, S as Subscription, J as SubscriptionDetail, K as SubscriptionItem, L as UpdatePriceInput, N as UsageAlertKind, O as UsageAlertMetric, Q as UsageModel, V as UsageTier } from './billing-CgjcWmvb.js';
|
|
9
|
+
import { a as CreditThresholdLevel, e as CreditGrant, f as CreditTopUp, g as CreateCreditGrantInput, h as CreditGrantRequestResult, i as CreditPacks, j as CreateCreditPackInput, k as CreditPack, U as UpdateCreditPackInput, l as CreateCreditTopUpInput, m as CreditTopUpRequestResult, n as CreditTopUpListParams, o as CreditBalance, p as CreditLedgerEntry, q as CreditUsageParams, r as CreditUsage } from './hosted-domains-CrVDsk2i.js';
|
|
10
|
+
export { s as CreditAccountStatus, C as CreditGrantKind, t as CreditMoney, u as CreditPackListItem, v as CreditTopUpStatus, w as CreditTransactionType, x as CreditUsageGroupBy, H as HostedDomainActivatedData, d as HostedDomainDisabledData, b as HostedDomainDnsFailingData, y as HostedDomainEventBase, c as HostedDomainReassignmentPendingData, z as HostedDomainStatus, A as HostedDomainStatusReason } from './hosted-domains-CrVDsk2i.js';
|
|
9
11
|
import 'zod';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -703,6 +705,192 @@ interface Whoami {
|
|
|
703
705
|
/** Currencies configured for this Project (payment credential sets). */
|
|
704
706
|
currencies: string[];
|
|
705
707
|
defaultCurrency: string;
|
|
708
|
+
/** Whether the Project's custom-domain endpoints (`hostedDomains`) are open: live only, behind a rollout flag. */
|
|
709
|
+
hostedDomainsEnabled: boolean;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Public SDK types for Rate Cards, quotes, credit reservations and consumption reversals.
|
|
714
|
+
* Re-exported by ../types.ts.
|
|
715
|
+
*
|
|
716
|
+
* Every credit quantity - and every count of units - is a `string` of a whole number, e.g.
|
|
717
|
+
* `"5000000"` for 5 credits: never a `number`, which would silently round past 2^53.
|
|
718
|
+
*/
|
|
719
|
+
/** One Credit Action's price in a Rate Card version: `ceil(units * unitPrice / perUnits)` a line. */
|
|
720
|
+
interface CreditRateCardItem {
|
|
721
|
+
/** The Credit Action key, e.g. `send_message`. */
|
|
722
|
+
action: string;
|
|
723
|
+
/** The category it is spent from: a reservation holds one category. */
|
|
724
|
+
category: string;
|
|
725
|
+
/** Microcredits per `perUnits` units. */
|
|
726
|
+
unitPrice: string;
|
|
727
|
+
/** How many units `unitPrice` buys. */
|
|
728
|
+
perUnits: string;
|
|
729
|
+
}
|
|
730
|
+
/** An immutable Rate Card version: a price change is a new version. */
|
|
731
|
+
interface CreditRateCard {
|
|
732
|
+
id: string;
|
|
733
|
+
/** 1, 2, 3... in the order versions were published (and take effect). */
|
|
734
|
+
version: number;
|
|
735
|
+
/** From when it prices new quotes and reservations made from items. */
|
|
736
|
+
effectiveAt: string;
|
|
737
|
+
/** Its prices, by action. */
|
|
738
|
+
items: CreditRateCardItem[];
|
|
739
|
+
createdAt: string;
|
|
740
|
+
}
|
|
741
|
+
/** Publish a new Rate Card version: every Credit Action it prices, once each. */
|
|
742
|
+
interface PublishCreditRateCardInput {
|
|
743
|
+
/**
|
|
744
|
+
* When it takes effect (ISO 8601 with a timezone): now when omitted; never in the past, nor
|
|
745
|
+
* before the version before it takes effect.
|
|
746
|
+
*/
|
|
747
|
+
effectiveAt?: string;
|
|
748
|
+
items: Array<{
|
|
749
|
+
/** 1-100 lowercase letters, digits, dots, hyphens or underscores. */
|
|
750
|
+
action: string;
|
|
751
|
+
category: string;
|
|
752
|
+
/** Whole microcredits as a decimal string; "0" for an action that costs nothing. */
|
|
753
|
+
unitPrice: string;
|
|
754
|
+
/** Whole units as a decimal string; "1" when omitted. */
|
|
755
|
+
perUnits?: string;
|
|
756
|
+
}>;
|
|
757
|
+
}
|
|
758
|
+
/** Opaque context on a line (e.g. a model name), unpriced: a JSON object of at most 4 KiB. */
|
|
759
|
+
type CreditDimensions = Record<string, unknown>;
|
|
760
|
+
/** One line of a quote or a commit: a Credit Action and how many units of it. */
|
|
761
|
+
interface CreditLineItem {
|
|
762
|
+
action: string;
|
|
763
|
+
/** Whole units as a decimal string, positive. */
|
|
764
|
+
units: string;
|
|
765
|
+
/** Never personal data: what a commit records stays with the ledger for good. */
|
|
766
|
+
dimensions?: CreditDimensions | null;
|
|
767
|
+
}
|
|
768
|
+
/** A line as priced, with the terms it was priced on. */
|
|
769
|
+
interface CreditPricedLine {
|
|
770
|
+
action: string;
|
|
771
|
+
units: string;
|
|
772
|
+
unitPrice: string;
|
|
773
|
+
perUnits: string;
|
|
774
|
+
/** `ceil(units * unitPrice / perUnits)` microcredits. */
|
|
775
|
+
amount: string;
|
|
776
|
+
dimensions: CreditDimensions | null;
|
|
777
|
+
}
|
|
778
|
+
/** Price a customer's Credit Actions (all of one category) at the current Rate Card version. */
|
|
779
|
+
interface CreateCreditQuoteInput {
|
|
780
|
+
/** The customer's external id. */
|
|
781
|
+
customerId: string;
|
|
782
|
+
/** 1 to 100 lines. */
|
|
783
|
+
items: CreditLineItem[];
|
|
784
|
+
}
|
|
785
|
+
/** A quote: what the lines cost at the version it pins, reservable until `expiresAt` (15 minutes). */
|
|
786
|
+
interface CreditQuote {
|
|
787
|
+
id: string;
|
|
788
|
+
/** The customer's external id. */
|
|
789
|
+
customerId: string;
|
|
790
|
+
rateCardVersion: number;
|
|
791
|
+
category: string;
|
|
792
|
+
/** What the lines cost in all: what a reservation over the quote holds. */
|
|
793
|
+
amount: string;
|
|
794
|
+
items: CreditPricedLine[];
|
|
795
|
+
expiresAt: string;
|
|
796
|
+
createdAt: string;
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* A credit reservation's state: `held` until committed, released or expired; `protected` (paid
|
|
800
|
+
* for, still being fulfilled) never expires; `committed`, `released` and `expired` are final.
|
|
801
|
+
*/
|
|
802
|
+
type CreditReservationStatus = "held" | "protected" | "committed" | "released" | "expired";
|
|
803
|
+
/** Credits held for one operation. */
|
|
804
|
+
interface CreditReservation {
|
|
805
|
+
id: string;
|
|
806
|
+
/** The customer's external id. */
|
|
807
|
+
customerId: string;
|
|
808
|
+
/** Your own id for the operation, unique per customer. */
|
|
809
|
+
operationKey: string;
|
|
810
|
+
category: string;
|
|
811
|
+
/** Microcredits held when it was made. */
|
|
812
|
+
amount: string;
|
|
813
|
+
/** Microcredits its commit consumed (the rest was released with it). */
|
|
814
|
+
consumed: string;
|
|
815
|
+
status: CreditReservationStatus;
|
|
816
|
+
/** The quote it was made over; null when made from items. */
|
|
817
|
+
quoteId: string | null;
|
|
818
|
+
/** The Rate Card version its commit prices at. */
|
|
819
|
+
rateCardVersion: number;
|
|
820
|
+
/** When it is released if still `held`. */
|
|
821
|
+
expiresAt: string;
|
|
822
|
+
protectedAt: string | null;
|
|
823
|
+
settledAt: string | null;
|
|
824
|
+
/**
|
|
825
|
+
* The commit's consumption: what `credits.consumptions.reverse` names. Null until committed, and
|
|
826
|
+
* for a commit that cost nothing (it consumed nothing).
|
|
827
|
+
*/
|
|
828
|
+
consumptionId: string | null;
|
|
829
|
+
metadata: Record<string, string> | null;
|
|
830
|
+
createdAt: string;
|
|
831
|
+
}
|
|
832
|
+
/** What a reservation holds for and how it is identified; give `quoteId` or `items`. */
|
|
833
|
+
interface CreateCreditReservationBase {
|
|
834
|
+
/** The customer's external id. */
|
|
835
|
+
customerId: string;
|
|
836
|
+
/**
|
|
837
|
+
* Your own id for the operation (1-255 characters), unique per customer. Never personal data:
|
|
838
|
+
* erasure replaces it with `erased_<reservation id>`, a prefix you may not use.
|
|
839
|
+
*/
|
|
840
|
+
operationKey: string;
|
|
841
|
+
/** How long the hold lasts unsettled; your project's default when omitted, up to its maximum. */
|
|
842
|
+
ttlSeconds?: number;
|
|
843
|
+
/** At most 20 keys (40 characters) and values (500 characters). Never personal data. */
|
|
844
|
+
metadata?: Record<string, string>;
|
|
845
|
+
}
|
|
846
|
+
/** Hold credits over a quote (its amount, at the version it pins), or over Credit Actions. */
|
|
847
|
+
type CreateCreditReservationInput = CreateCreditReservationBase & ({
|
|
848
|
+
quoteId: string;
|
|
849
|
+
items?: never;
|
|
850
|
+
} | {
|
|
851
|
+
/** Priced at the current version, all of one category; 1 to 100 lines. */
|
|
852
|
+
items: Array<{
|
|
853
|
+
action: string;
|
|
854
|
+
units: string;
|
|
855
|
+
}>;
|
|
856
|
+
quoteId?: never;
|
|
857
|
+
});
|
|
858
|
+
/** What `credits.reservations.create` answers: the reservation its idempotency key stands for. */
|
|
859
|
+
interface CreditReservationRequestResult extends CreditReservation {
|
|
860
|
+
/**
|
|
861
|
+
* `true` when the idempotency key was already used: this is the reservation that earlier request
|
|
862
|
+
* made, as it was made, and nothing new was held. `false` when this call made it.
|
|
863
|
+
*/
|
|
864
|
+
replayed: boolean;
|
|
865
|
+
}
|
|
866
|
+
/** Give back part or all of what a commit consumed. */
|
|
867
|
+
interface ReverseCreditConsumptionInput {
|
|
868
|
+
/** Positive whole microcredits as a decimal string. */
|
|
869
|
+
amount: string;
|
|
870
|
+
/** Why (at most 500 characters), kept on the reversal and cleared on erasure. */
|
|
871
|
+
reason?: string;
|
|
872
|
+
/** At most 20 keys (40 characters) and values (500 characters). Never personal data. */
|
|
873
|
+
metadata?: Record<string, string>;
|
|
874
|
+
}
|
|
875
|
+
/** A consumption reversal. */
|
|
876
|
+
interface CreditReversal {
|
|
877
|
+
id: string;
|
|
878
|
+
/** The customer's external id. */
|
|
879
|
+
customerId: string;
|
|
880
|
+
consumptionId: string;
|
|
881
|
+
/** The `reverse` ledger transaction. */
|
|
882
|
+
transactionId: string;
|
|
883
|
+
amount: string;
|
|
884
|
+
/** Of `amount`, what came back to a grant past its expiry and expired again at once. */
|
|
885
|
+
forfeited: string;
|
|
886
|
+
reason: string | null;
|
|
887
|
+
metadata: Record<string, string> | null;
|
|
888
|
+
createdAt: string;
|
|
889
|
+
}
|
|
890
|
+
/** What `credits.consumptions.reverse` answers: the reversal its idempotency key stands for. */
|
|
891
|
+
interface CreditReversalRequestResult extends CreditReversal {
|
|
892
|
+
/** `true` when an earlier request under the key made it, and nothing was given back again. */
|
|
893
|
+
replayed: boolean;
|
|
706
894
|
}
|
|
707
895
|
|
|
708
896
|
/** What surface a portal session lands the Customer on. */
|
|
@@ -944,41 +1132,13 @@ interface CustomerCreditsExport {
|
|
|
944
1132
|
updatedAt: string;
|
|
945
1133
|
} | null;
|
|
946
1134
|
grants: CreditGrant[];
|
|
947
|
-
reservations:
|
|
948
|
-
id: string;
|
|
949
|
-
/** The customer's external id. */
|
|
950
|
-
customerId: string;
|
|
951
|
-
operationKey: string;
|
|
952
|
-
category: string;
|
|
953
|
-
amount: string;
|
|
954
|
-
consumed: string;
|
|
955
|
-
status: "held" | "protected" | "committed" | "released" | "expired";
|
|
956
|
-
expiresAt: string;
|
|
957
|
-
protectedAt: string | null;
|
|
958
|
-
settledAt: string | null;
|
|
959
|
-
/** The commit's `consume` ledger transaction. */
|
|
960
|
-
consumptionId: string | null;
|
|
961
|
-
metadata: Record<string, string> | null;
|
|
962
|
-
createdAt: string;
|
|
963
|
-
}>;
|
|
1135
|
+
reservations: CreditReservation[];
|
|
964
1136
|
/** Every credit top-up, as it now stands. */
|
|
965
1137
|
topUps: CreditTopUp[];
|
|
966
1138
|
/** Every consumption reversal, with your own reason and metadata (cleared on erasure). */
|
|
967
|
-
reversals:
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
customerId: string;
|
|
971
|
-
/** The consumption reversed: its commit's `consume` ledger transaction. */
|
|
972
|
-
consumptionId: string;
|
|
973
|
-
/** The `reverse` ledger transaction. */
|
|
974
|
-
transactionId: string;
|
|
975
|
-
amount: string;
|
|
976
|
-
/** Of `amount`, what came back to an expired grant and expired again at once. */
|
|
977
|
-
forfeited: string;
|
|
978
|
-
reason: string | null;
|
|
979
|
-
metadata: Record<string, string> | null;
|
|
980
|
-
createdAt: string;
|
|
981
|
-
}>;
|
|
1139
|
+
reversals: CreditReversal[];
|
|
1140
|
+
/** Every quote made for the customer (even with no credit account), with its priced lines. */
|
|
1141
|
+
quotes: CreditQuote[];
|
|
982
1142
|
/** Every ledger transaction, in the order it was written, with its postings. */
|
|
983
1143
|
ledger: Array<{
|
|
984
1144
|
id: string;
|
|
@@ -1268,11 +1428,14 @@ declare function createCreditsResource(ctx: RequestContext): {
|
|
|
1268
1428
|
* checkout to send the buyer to. Credits are granted when the payment succeeds (listen for
|
|
1269
1429
|
* `credit_top_up.succeeded`). The `idempotencyKey` is required and must identify this one
|
|
1270
1430
|
* purchase: a retry under it answers the same top-up as it now stands (`replayed: true`) and
|
|
1271
|
-
* buys nothing again
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1431
|
+
* buys nothing again - asking the payment provider again for a checkout the first attempt
|
|
1432
|
+
* could not open, within its page's 40 minutes (Stripe only in the first 10, while 30
|
|
1433
|
+
* remain: it answers a timed-out first attempt with the checkout it made, or makes one never
|
|
1434
|
+
* made; Paymob only if the first attempt never made one); reusing it for another purchase
|
|
1435
|
+
* throws `idempotency_conflict` (409). A retry can also throw `conflict` (409), with
|
|
1436
|
+
* `details.reason`: `checkout_in_progress` - another request is still opening the
|
|
1437
|
+
* checkout, so retry the same key shortly - or `checkout_unavailable` - its checkout could
|
|
1438
|
+
* not be opened and never will be, so buy again under a new key.
|
|
1276
1439
|
*/
|
|
1277
1440
|
create: (input: CreateCreditTopUpInput, options: IdempotentRequestOptions) => Promise<CreditTopUpRequestResult>;
|
|
1278
1441
|
/** A top-up as it now stands: status, checkout, grants, and what refunds revoked. */
|
|
@@ -1307,6 +1470,80 @@ declare function createCreditsResource(ctx: RequestContext): {
|
|
|
1307
1470
|
*/
|
|
1308
1471
|
get: (customer: string, params?: CreditUsageParams, options?: CallOptions) => Promise<CreditUsage>;
|
|
1309
1472
|
};
|
|
1473
|
+
rateCards: {
|
|
1474
|
+
/**
|
|
1475
|
+
* Publish a new Rate Card version: what each Credit Action costs, as
|
|
1476
|
+
* `ceil(units * unitPrice / perUnits)` microcredits a line. Versions are immutable - a price
|
|
1477
|
+
* change is a new version - and take effect in order, at `effectiveAt` (now when omitted).
|
|
1478
|
+
*/
|
|
1479
|
+
publish: (input: PublishCreditRateCardInput, options?: CallOptions) => Promise<CreditRateCard>;
|
|
1480
|
+
/** The version in effect now (`not_found` before the first takes effect). */
|
|
1481
|
+
current: (options?: CallOptions) => Promise<CreditRateCard>;
|
|
1482
|
+
/** One version, by its number. */
|
|
1483
|
+
get: (version: number, options?: CallOptions) => Promise<CreditRateCard>;
|
|
1484
|
+
/**
|
|
1485
|
+
* The published versions, newest first. Auto-paginating by cursor: `await` the first page,
|
|
1486
|
+
* `for await (…)` every version, or `.listAll()` to collect them.
|
|
1487
|
+
*/
|
|
1488
|
+
list: (params?: CursorListParams, options?: CallOptions) => CursorListPromise<CreditRateCard>;
|
|
1489
|
+
};
|
|
1490
|
+
quotes: {
|
|
1491
|
+
/**
|
|
1492
|
+
* Price a customer's Credit Actions (all of one category) at the current Rate Card version
|
|
1493
|
+
* and keep the price for 15 minutes: a reservation over the quote holds exactly its
|
|
1494
|
+
* `amount`, and its commit prices at the version the quote pinned. A quote holds nothing.
|
|
1495
|
+
*/
|
|
1496
|
+
create: (input: CreateCreditQuoteInput, options?: CallOptions) => Promise<CreditQuote>;
|
|
1497
|
+
/** A quote as it was made. */
|
|
1498
|
+
get: (quoteId: string, options?: CallOptions) => Promise<CreditQuote>;
|
|
1499
|
+
};
|
|
1500
|
+
reservations: {
|
|
1501
|
+
/**
|
|
1502
|
+
* Hold credits for one operation: over a `quoteId`, or over `items` priced at the current
|
|
1503
|
+
* Rate Card version. The `idempotencyKey` is required: a retry under it - after a lost
|
|
1504
|
+
* reply, even once the quote expired - answers the same reservation (`replayed: true`) and
|
|
1505
|
+
* holds nothing again. Reusing it for another request, or a new key with an `operationKey`
|
|
1506
|
+
* the customer already used (`details.reason: "operation_key_used"`), throws
|
|
1507
|
+
* `idempotency_conflict` (409). Throws `insufficient_credits` (402), `account_frozen`
|
|
1508
|
+
* (423), `account_closed` (409), `conflict` (409, `details.reason: "quote_expired"`), or
|
|
1509
|
+
* `validation_error` (422) - e.g. `details.reason: "zero_amount"` when the items cost nothing.
|
|
1510
|
+
* The `operationKey` is an operation id, never personal data: erasure replaces it.
|
|
1511
|
+
*/
|
|
1512
|
+
create: (input: CreateCreditReservationInput, options: IdempotentRequestOptions) => Promise<CreditReservationRequestResult>;
|
|
1513
|
+
/** A reservation as it now stands. */
|
|
1514
|
+
get: (reservationId: string, options?: CallOptions) => Promise<CreditReservation>;
|
|
1515
|
+
/**
|
|
1516
|
+
* A customer's reservation (by external id) made with `operationKey` - how to find one whose
|
|
1517
|
+
* reply was lost. Throws `not_found` (404) when there is none.
|
|
1518
|
+
*/
|
|
1519
|
+
findByOperationKey: (customer: string, operationKey: string, options?: CallOptions) => Promise<CreditReservation>;
|
|
1520
|
+
/**
|
|
1521
|
+
* Commit what the operation used: lines priced at the reservation's Rate Card version,
|
|
1522
|
+
* consuming at most what it holds (`commit_exceeds_hold`, 409) and releasing the rest; lines
|
|
1523
|
+
* that cost nothing in all consume nothing (`consumed: "0"`, `consumptionId: null`). The
|
|
1524
|
+
* same commit again answers it again, so it is safe to retry; anything else after it throws
|
|
1525
|
+
* `invalid_state_transition` (409) with the reservation in `details` - with
|
|
1526
|
+
* `details.reason: "reservation_expired"` once the hold is past its `expiresAt`.
|
|
1527
|
+
*/
|
|
1528
|
+
commit: (reservationId: string, items: CreditLineItem[], options?: CallOptions) => Promise<CreditReservation>;
|
|
1529
|
+
/** Release the whole hold. Safe to retry; after a commit it throws (409). */
|
|
1530
|
+
release: (reservationId: string, options?: CallOptions) => Promise<CreditReservation>;
|
|
1531
|
+
/**
|
|
1532
|
+
* Protect a held reservation whose operation was paid for and is still being fulfilled: it
|
|
1533
|
+
* never expires (commit or release it when done). Safe to retry. A hold already past its
|
|
1534
|
+
* `expiresAt` throws `invalid_state_transition` (409, `details.reason: "reservation_expired"`).
|
|
1535
|
+
*/
|
|
1536
|
+
protect: (reservationId: string, options?: CallOptions) => Promise<CreditReservation>;
|
|
1537
|
+
};
|
|
1538
|
+
consumptions: {
|
|
1539
|
+
/**
|
|
1540
|
+
* Give back part or all of a commit's consumption (`consumptionId` on the committed
|
|
1541
|
+
* reservation), never more than is left (`reversal_exceeds_consumption`, 409). The
|
|
1542
|
+
* `idempotencyKey` is required: a retry under it answers the same reversal
|
|
1543
|
+
* (`replayed: true`) and gives nothing back again.
|
|
1544
|
+
*/
|
|
1545
|
+
reverse: (consumptionId: string, input: ReverseCreditConsumptionInput, options: IdempotentRequestOptions) => Promise<CreditReversalRequestResult>;
|
|
1546
|
+
};
|
|
1310
1547
|
};
|
|
1311
1548
|
|
|
1312
1549
|
declare function createCustomersResource(ctx: RequestContext): {
|
|
@@ -1376,6 +1613,272 @@ declare function createDeliverabilityResource(ctx: RequestContext): {
|
|
|
1376
1613
|
inbound: (params?: InboundWebhookListParams, options?: CallOptions) => ListPromise<InboundWebhookListItem>;
|
|
1377
1614
|
};
|
|
1378
1615
|
|
|
1616
|
+
/**
|
|
1617
|
+
* Custom domains for the hosted customer portal (live keys only, behind a per-Project rollout
|
|
1618
|
+
* flag). Add a hostname, create the two DNS records it answers, and Billow verifies them.
|
|
1619
|
+
*/
|
|
1620
|
+
declare function createHostedDomainsResource(ctx: RequestContext): {
|
|
1621
|
+
/** The Project's domains, and whether its plan allows adding more (`whiteLabel`). */
|
|
1622
|
+
list: (options?: CallOptions) => Promise<{
|
|
1623
|
+
data: {
|
|
1624
|
+
id: string;
|
|
1625
|
+
hostname: string;
|
|
1626
|
+
hostnameUnicode: string;
|
|
1627
|
+
environment: "live";
|
|
1628
|
+
status: "failed" | "active" | "pending_verification" | "verified" | "disabled";
|
|
1629
|
+
statusReason: "verification_expired" | "tls_unavailable" | "edge_blocked" | "dns_lost" | "reassigned" | "entitlement_lapsed" | "suspended" | null;
|
|
1630
|
+
isPrimary: boolean;
|
|
1631
|
+
records: {
|
|
1632
|
+
type: "TXT" | "CNAME";
|
|
1633
|
+
name: string;
|
|
1634
|
+
value: string;
|
|
1635
|
+
}[];
|
|
1636
|
+
dns: {
|
|
1637
|
+
checkedAt: string | null;
|
|
1638
|
+
failingSince: string | null;
|
|
1639
|
+
graceEndsAt: string | null;
|
|
1640
|
+
txt: {
|
|
1641
|
+
status: "found" | "missing" | "inconclusive" | null;
|
|
1642
|
+
values: string[];
|
|
1643
|
+
};
|
|
1644
|
+
cname: {
|
|
1645
|
+
status: "found" | "missing" | "inconclusive" | "wrong" | null;
|
|
1646
|
+
chain: string[];
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
edge: {
|
|
1650
|
+
status: string | null;
|
|
1651
|
+
sslStatus: string | null;
|
|
1652
|
+
errors: string[];
|
|
1653
|
+
certificateExpiresAt: string | null;
|
|
1654
|
+
checkedAt: string | null;
|
|
1655
|
+
};
|
|
1656
|
+
reassignment: {
|
|
1657
|
+
role: "owner" | "claimant";
|
|
1658
|
+
dueAt: string;
|
|
1659
|
+
} | null;
|
|
1660
|
+
entitlementLapse: {
|
|
1661
|
+
lapsedAt: string;
|
|
1662
|
+
servingEndsAt: string;
|
|
1663
|
+
disablesAt: string;
|
|
1664
|
+
} | null;
|
|
1665
|
+
verificationExpiresAt: string | null;
|
|
1666
|
+
verifiedAt: string | null;
|
|
1667
|
+
activatedAt: string | null;
|
|
1668
|
+
createdAt: string;
|
|
1669
|
+
updatedAt: string;
|
|
1670
|
+
}[];
|
|
1671
|
+
whiteLabel: {
|
|
1672
|
+
entitled: boolean;
|
|
1673
|
+
requiredPlan: string;
|
|
1674
|
+
};
|
|
1675
|
+
}>;
|
|
1676
|
+
/**
|
|
1677
|
+
* Add a subdomain such as `billing.example.com`. Answers the domain with the TXT and CNAME
|
|
1678
|
+
* `records` to create. Needs a plan with white-label branding (`permission_denied` otherwise).
|
|
1679
|
+
*/
|
|
1680
|
+
create: (input: CreateHostedDomainInput, options?: CallOptions) => Promise<{
|
|
1681
|
+
id: string;
|
|
1682
|
+
hostname: string;
|
|
1683
|
+
hostnameUnicode: string;
|
|
1684
|
+
environment: "live";
|
|
1685
|
+
status: "failed" | "active" | "pending_verification" | "verified" | "disabled";
|
|
1686
|
+
statusReason: "verification_expired" | "tls_unavailable" | "edge_blocked" | "dns_lost" | "reassigned" | "entitlement_lapsed" | "suspended" | null;
|
|
1687
|
+
isPrimary: boolean;
|
|
1688
|
+
records: {
|
|
1689
|
+
type: "TXT" | "CNAME";
|
|
1690
|
+
name: string;
|
|
1691
|
+
value: string;
|
|
1692
|
+
}[];
|
|
1693
|
+
dns: {
|
|
1694
|
+
checkedAt: string | null;
|
|
1695
|
+
failingSince: string | null;
|
|
1696
|
+
graceEndsAt: string | null;
|
|
1697
|
+
txt: {
|
|
1698
|
+
status: "found" | "missing" | "inconclusive" | null;
|
|
1699
|
+
values: string[];
|
|
1700
|
+
};
|
|
1701
|
+
cname: {
|
|
1702
|
+
status: "found" | "missing" | "inconclusive" | "wrong" | null;
|
|
1703
|
+
chain: string[];
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
edge: {
|
|
1707
|
+
status: string | null;
|
|
1708
|
+
sslStatus: string | null;
|
|
1709
|
+
errors: string[];
|
|
1710
|
+
certificateExpiresAt: string | null;
|
|
1711
|
+
checkedAt: string | null;
|
|
1712
|
+
};
|
|
1713
|
+
reassignment: {
|
|
1714
|
+
role: "owner" | "claimant";
|
|
1715
|
+
dueAt: string;
|
|
1716
|
+
} | null;
|
|
1717
|
+
entitlementLapse: {
|
|
1718
|
+
lapsedAt: string;
|
|
1719
|
+
servingEndsAt: string;
|
|
1720
|
+
disablesAt: string;
|
|
1721
|
+
} | null;
|
|
1722
|
+
verificationExpiresAt: string | null;
|
|
1723
|
+
verifiedAt: string | null;
|
|
1724
|
+
activatedAt: string | null;
|
|
1725
|
+
createdAt: string;
|
|
1726
|
+
updatedAt: string;
|
|
1727
|
+
}>;
|
|
1728
|
+
get: (id: string, options?: CallOptions) => Promise<{
|
|
1729
|
+
id: string;
|
|
1730
|
+
hostname: string;
|
|
1731
|
+
hostnameUnicode: string;
|
|
1732
|
+
environment: "live";
|
|
1733
|
+
status: "failed" | "active" | "pending_verification" | "verified" | "disabled";
|
|
1734
|
+
statusReason: "verification_expired" | "tls_unavailable" | "edge_blocked" | "dns_lost" | "reassigned" | "entitlement_lapsed" | "suspended" | null;
|
|
1735
|
+
isPrimary: boolean;
|
|
1736
|
+
records: {
|
|
1737
|
+
type: "TXT" | "CNAME";
|
|
1738
|
+
name: string;
|
|
1739
|
+
value: string;
|
|
1740
|
+
}[];
|
|
1741
|
+
dns: {
|
|
1742
|
+
checkedAt: string | null;
|
|
1743
|
+
failingSince: string | null;
|
|
1744
|
+
graceEndsAt: string | null;
|
|
1745
|
+
txt: {
|
|
1746
|
+
status: "found" | "missing" | "inconclusive" | null;
|
|
1747
|
+
values: string[];
|
|
1748
|
+
};
|
|
1749
|
+
cname: {
|
|
1750
|
+
status: "found" | "missing" | "inconclusive" | "wrong" | null;
|
|
1751
|
+
chain: string[];
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
edge: {
|
|
1755
|
+
status: string | null;
|
|
1756
|
+
sslStatus: string | null;
|
|
1757
|
+
errors: string[];
|
|
1758
|
+
certificateExpiresAt: string | null;
|
|
1759
|
+
checkedAt: string | null;
|
|
1760
|
+
};
|
|
1761
|
+
reassignment: {
|
|
1762
|
+
role: "owner" | "claimant";
|
|
1763
|
+
dueAt: string;
|
|
1764
|
+
} | null;
|
|
1765
|
+
entitlementLapse: {
|
|
1766
|
+
lapsedAt: string;
|
|
1767
|
+
servingEndsAt: string;
|
|
1768
|
+
disablesAt: string;
|
|
1769
|
+
} | null;
|
|
1770
|
+
verificationExpiresAt: string | null;
|
|
1771
|
+
verifiedAt: string | null;
|
|
1772
|
+
activatedAt: string | null;
|
|
1773
|
+
createdAt: string;
|
|
1774
|
+
updatedAt: string;
|
|
1775
|
+
}>;
|
|
1776
|
+
/** Check the DNS records now (2 per minute per domain); answers the refreshed domain. */
|
|
1777
|
+
verify: (id: string, options?: CallOptions) => Promise<{
|
|
1778
|
+
id: string;
|
|
1779
|
+
hostname: string;
|
|
1780
|
+
hostnameUnicode: string;
|
|
1781
|
+
environment: "live";
|
|
1782
|
+
status: "failed" | "active" | "pending_verification" | "verified" | "disabled";
|
|
1783
|
+
statusReason: "verification_expired" | "tls_unavailable" | "edge_blocked" | "dns_lost" | "reassigned" | "entitlement_lapsed" | "suspended" | null;
|
|
1784
|
+
isPrimary: boolean;
|
|
1785
|
+
records: {
|
|
1786
|
+
type: "TXT" | "CNAME";
|
|
1787
|
+
name: string;
|
|
1788
|
+
value: string;
|
|
1789
|
+
}[];
|
|
1790
|
+
dns: {
|
|
1791
|
+
checkedAt: string | null;
|
|
1792
|
+
failingSince: string | null;
|
|
1793
|
+
graceEndsAt: string | null;
|
|
1794
|
+
txt: {
|
|
1795
|
+
status: "found" | "missing" | "inconclusive" | null;
|
|
1796
|
+
values: string[];
|
|
1797
|
+
};
|
|
1798
|
+
cname: {
|
|
1799
|
+
status: "found" | "missing" | "inconclusive" | "wrong" | null;
|
|
1800
|
+
chain: string[];
|
|
1801
|
+
};
|
|
1802
|
+
};
|
|
1803
|
+
edge: {
|
|
1804
|
+
status: string | null;
|
|
1805
|
+
sslStatus: string | null;
|
|
1806
|
+
errors: string[];
|
|
1807
|
+
certificateExpiresAt: string | null;
|
|
1808
|
+
checkedAt: string | null;
|
|
1809
|
+
};
|
|
1810
|
+
reassignment: {
|
|
1811
|
+
role: "owner" | "claimant";
|
|
1812
|
+
dueAt: string;
|
|
1813
|
+
} | null;
|
|
1814
|
+
entitlementLapse: {
|
|
1815
|
+
lapsedAt: string;
|
|
1816
|
+
servingEndsAt: string;
|
|
1817
|
+
disablesAt: string;
|
|
1818
|
+
} | null;
|
|
1819
|
+
verificationExpiresAt: string | null;
|
|
1820
|
+
verifiedAt: string | null;
|
|
1821
|
+
activatedAt: string | null;
|
|
1822
|
+
createdAt: string;
|
|
1823
|
+
updatedAt: string;
|
|
1824
|
+
}>;
|
|
1825
|
+
/** Make an active domain the default host for new portal sessions. */
|
|
1826
|
+
makePrimary: (id: string, options?: CallOptions) => Promise<{
|
|
1827
|
+
id: string;
|
|
1828
|
+
hostname: string;
|
|
1829
|
+
hostnameUnicode: string;
|
|
1830
|
+
environment: "live";
|
|
1831
|
+
status: "failed" | "active" | "pending_verification" | "verified" | "disabled";
|
|
1832
|
+
statusReason: "verification_expired" | "tls_unavailable" | "edge_blocked" | "dns_lost" | "reassigned" | "entitlement_lapsed" | "suspended" | null;
|
|
1833
|
+
isPrimary: boolean;
|
|
1834
|
+
records: {
|
|
1835
|
+
type: "TXT" | "CNAME";
|
|
1836
|
+
name: string;
|
|
1837
|
+
value: string;
|
|
1838
|
+
}[];
|
|
1839
|
+
dns: {
|
|
1840
|
+
checkedAt: string | null;
|
|
1841
|
+
failingSince: string | null;
|
|
1842
|
+
graceEndsAt: string | null;
|
|
1843
|
+
txt: {
|
|
1844
|
+
status: "found" | "missing" | "inconclusive" | null;
|
|
1845
|
+
values: string[];
|
|
1846
|
+
};
|
|
1847
|
+
cname: {
|
|
1848
|
+
status: "found" | "missing" | "inconclusive" | "wrong" | null;
|
|
1849
|
+
chain: string[];
|
|
1850
|
+
};
|
|
1851
|
+
};
|
|
1852
|
+
edge: {
|
|
1853
|
+
status: string | null;
|
|
1854
|
+
sslStatus: string | null;
|
|
1855
|
+
errors: string[];
|
|
1856
|
+
certificateExpiresAt: string | null;
|
|
1857
|
+
checkedAt: string | null;
|
|
1858
|
+
};
|
|
1859
|
+
reassignment: {
|
|
1860
|
+
role: "owner" | "claimant";
|
|
1861
|
+
dueAt: string;
|
|
1862
|
+
} | null;
|
|
1863
|
+
entitlementLapse: {
|
|
1864
|
+
lapsedAt: string;
|
|
1865
|
+
servingEndsAt: string;
|
|
1866
|
+
disablesAt: string;
|
|
1867
|
+
} | null;
|
|
1868
|
+
verificationExpiresAt: string | null;
|
|
1869
|
+
verifiedAt: string | null;
|
|
1870
|
+
activatedAt: string | null;
|
|
1871
|
+
createdAt: string;
|
|
1872
|
+
updatedAt: string;
|
|
1873
|
+
}>;
|
|
1874
|
+
/** Remove a domain; the portal sessions on it end immediately. */
|
|
1875
|
+
remove: (id: string, options?: CallOptions) => Promise<{
|
|
1876
|
+
id: string;
|
|
1877
|
+
hostname: string;
|
|
1878
|
+
removed: true;
|
|
1879
|
+
}>;
|
|
1880
|
+
};
|
|
1881
|
+
|
|
1379
1882
|
declare function createInvoicesResource(ctx: RequestContext): {
|
|
1380
1883
|
/** List invoices. Filters: status, customer (external id), from, to. Auto-paginating. */
|
|
1381
1884
|
list: (params?: InvoiceListParams, options?: CallOptions) => ListPromise<InvoiceListItem>;
|
|
@@ -2066,6 +2569,8 @@ declare class Billow {
|
|
|
2066
2569
|
portalSessions: ReturnType<typeof createPortalSessionsResource>;
|
|
2067
2570
|
deliverability: ReturnType<typeof createDeliverabilityResource>;
|
|
2068
2571
|
marketplace: ReturnType<typeof createMarketplaceResource>;
|
|
2572
|
+
/** Custom domains for the hosted customer portal (live keys, behind a rollout flag). */
|
|
2573
|
+
hostedDomains: ReturnType<typeof createHostedDomainsResource>;
|
|
2069
2574
|
/**
|
|
2070
2575
|
* Organization settings (Phase D3, F) — the configurable dunning schedule, usage settlement grace,
|
|
2071
2576
|
* and the cross-currency reporting currency + FX-rate registry (ADR-0013).
|
|
@@ -2376,4 +2881,4 @@ declare class BillowPortal {
|
|
|
2376
2881
|
};
|
|
2377
2882
|
}
|
|
2378
2883
|
|
|
2379
|
-
export { AttachResult, BILLOW_ERROR_CODES, Billow, BillowApiError, type BillowErrorCode, BillowOptions, BillowPortal, BillowPublishable, type BusinessProfile, CallOptions, type CatalogItem, Charge, type ChargeListItem, type ChargeListParams, type ChargeSearchHit, ChargeStatus, CheckResult, type CheckoutMethodInfo, type ConfigField, type ConfigFieldOption, type ConfigFieldType, Coupon, CreateChargeInput, CreateCouponInput, CreateCreditGrantInput, CreateCreditPackInput, CreateCreditTopUpInput, CreateMerchantInitiatedChargeInput, type CreatePortalSessionInput, CreateProductInput, CreateSubscriptionInput, CreateUsageAlertInput, type CreateWebhookEndpointInput, type CredentialSet, CreditBalance, CreditGrant, CreditGrantRequestResult, CreditLedgerEntry, CreditPack, CreditPacks, CreditThresholdLevel, CreditTopUp, CreditTopUpListParams, CreditTopUpRequestResult, CreditUsage, CreditUsageParams, type CursorListParams, type CursorListPromise, type CursorPaginated, Customer, type CustomerAnonymizationResult, type CustomerCreditsExport, type CustomerDataExport, type CustomerListItem, type CustomerListParams, type CustomerOverview, type CustomerSearchHit, type CustomerUsage, type CustomerUsageDetail, type EmailDeliveryListItem, type EmailDeliveryListParams, type EmailDeliveryStatus, type EmailTemplateSetting, EntitlementView, type ExchangeRate, type ExportJsonValue, type ExternalPaymentMethod, type ExternalPaymentResult, Feature, FeatureKind, IdempotentRequestOptions, type InboundWebhookListItem, type InboundWebhookListParams, type InboundWebhookOutcome, type IntegrationDefinition, type IntegrationKind, type IntegrationTier, type Invoice, type InvoiceDetail, type InvoiceLineItem, type InvoiceListItem, type InvoiceListParams, type InvoiceSearchHit, InvoiceStatus, type ListParams, type ListPromise, MeterConfig, type MetricsOverview, type MetricsParams, type MetricsRollup, MigrationResult, type OutboxEventListItem, type OutboxEventListParams, type OutboxEventStatus, type Paginated, PayInvoiceInput, type PaymentMethod, PaymentMethodStatus, type PaymentProviderDefinition, type PortalCardSetupResult, type PortalCheckout, type PortalPlanChange, type PortalSession, type PortalSessionFlow, type PortalSessionInfo, type PortalSubscriptionStatus, type PortalView, type ProviderCredentialSummary, type ProviderVerifyResult, type ProviderVerifyTarget, type ProviderVerifyTargetResult, type RecordExternalPaymentInput, type Refund, type RefundChargeInput, type RefundRequestResult, type RefundReviewReason, RefundStatus, RequestOptions, type ResolveRefundInput, SavedPaymentMethod, type ScheduledSubscriptionChange, type SearchResults, type SubscriptionListItem, type SubscriptionListParams, type SubscriptionSearchHit, SubscriptionStatus, TaxBehavior, type TimeseriesInterval, type TimeseriesMetric, type TimeseriesParams, type TimeseriesPoint, type TimeseriesResult, TrackResult, UnappliedPaymentReason, type UpdateBusinessProfileInput, UpdateCreditPackInput, type UpdateEmailTemplateInput, UpdateFeatureInput, UpdateProductInput, type UpdateWebhookEndpointInput, type UpsertCredentialsInput, UsageAlert, type WebhookDelivery, WebhookDeliveryStatus, type WebhookEndpoint, type WebhookEndpointWithSecret, type Whoami, currencyExponent, formatMoney, isSecretField, toMajorUnits, toMinorUnits };
|
|
2884
|
+
export { AttachResult, BILLOW_ERROR_CODES, Billow, BillowApiError, type BillowErrorCode, BillowOptions, BillowPortal, BillowPublishable, type BusinessProfile, CallOptions, type CatalogItem, Charge, type ChargeListItem, type ChargeListParams, type ChargeSearchHit, ChargeStatus, CheckResult, type CheckoutMethodInfo, type ConfigField, type ConfigFieldOption, type ConfigFieldType, Coupon, CreateChargeInput, CreateCouponInput, CreateCreditGrantInput, CreateCreditPackInput, type CreateCreditQuoteInput, type CreateCreditReservationInput, CreateCreditTopUpInput, CreateHostedDomainInput, CreateMerchantInitiatedChargeInput, type CreatePortalSessionInput, CreateProductInput, CreateSubscriptionInput, CreateUsageAlertInput, type CreateWebhookEndpointInput, type CredentialSet, CreditBalance, type CreditDimensions, CreditGrant, CreditGrantRequestResult, CreditLedgerEntry, type CreditLineItem, CreditPack, CreditPacks, type CreditPricedLine, type CreditQuote, type CreditRateCard, type CreditRateCardItem, type CreditReservation, type CreditReservationRequestResult, type CreditReservationStatus, type CreditReversal, type CreditReversalRequestResult, CreditThresholdLevel, CreditTopUp, CreditTopUpListParams, CreditTopUpRequestResult, CreditUsage, CreditUsageParams, type CursorListParams, type CursorListPromise, type CursorPaginated, Customer, type CustomerAnonymizationResult, type CustomerCreditsExport, type CustomerDataExport, type CustomerListItem, type CustomerListParams, type CustomerOverview, type CustomerSearchHit, type CustomerUsage, type CustomerUsageDetail, type EmailDeliveryListItem, type EmailDeliveryListParams, type EmailDeliveryStatus, type EmailTemplateSetting, EntitlementView, type ExchangeRate, type ExportJsonValue, type ExternalPaymentMethod, type ExternalPaymentResult, Feature, FeatureKind, IdempotentRequestOptions, type InboundWebhookListItem, type InboundWebhookListParams, type InboundWebhookOutcome, type IntegrationDefinition, type IntegrationKind, type IntegrationTier, type Invoice, type InvoiceDetail, type InvoiceLineItem, type InvoiceListItem, type InvoiceListParams, type InvoiceSearchHit, InvoiceStatus, type ListParams, type ListPromise, MeterConfig, type MetricsOverview, type MetricsParams, type MetricsRollup, MigrationResult, type OutboxEventListItem, type OutboxEventListParams, type OutboxEventStatus, type Paginated, PayInvoiceInput, type PaymentMethod, PaymentMethodStatus, type PaymentProviderDefinition, type PortalCardSetupResult, type PortalCheckout, type PortalPlanChange, type PortalSession, type PortalSessionFlow, type PortalSessionInfo, type PortalSubscriptionStatus, type PortalView, type ProviderCredentialSummary, type ProviderVerifyResult, type ProviderVerifyTarget, type ProviderVerifyTargetResult, type PublishCreditRateCardInput, type RecordExternalPaymentInput, type Refund, type RefundChargeInput, type RefundRequestResult, type RefundReviewReason, RefundStatus, RequestOptions, type ResolveRefundInput, type ReverseCreditConsumptionInput, SavedPaymentMethod, type ScheduledSubscriptionChange, type SearchResults, type SubscriptionListItem, type SubscriptionListParams, type SubscriptionSearchHit, SubscriptionStatus, TaxBehavior, type TimeseriesInterval, type TimeseriesMetric, type TimeseriesParams, type TimeseriesPoint, type TimeseriesResult, TrackResult, UnappliedPaymentReason, type UpdateBusinessProfileInput, UpdateCreditPackInput, type UpdateEmailTemplateInput, UpdateFeatureInput, UpdateProductInput, type UpdateWebhookEndpointInput, type UpsertCredentialsInput, UsageAlert, type WebhookDelivery, WebhookDeliveryStatus, type WebhookEndpoint, type WebhookEndpointWithSecret, type Whoami, currencyExponent, formatMoney, isSecretField, toMajorUnits, toMinorUnits };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BILLOW_ERROR_CODES, Billow, BillowApiError, BillowPortal, BillowPublishable, currencyExponent, formatMoney, isSecretField, toMajorUnits, toMinorUnits } from './chunk-
|
|
1
|
+
export { BILLOW_ERROR_CODES, Billow, BillowApiError, BillowPortal, BillowPublishable, currencyExponent, formatMoney, isSecretField, toMajorUnits, toMinorUnits } from './chunk-DYWGZRE2.js';
|
|
2
2
|
export { ACTIVE_SUBSCRIPTION_STATUSES, CHARGE_STATUSES, INVOICE_STATUSES, NEVER_ACTIVATED_SUBSCRIPTION_STATUSES, PAYMENT_METHOD_STATUSES, REFUND_STATUSES, SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, WEBHOOK_DELIVERY_STATUSES, grantsAccess, isTerminal } from './chunk-CCG4F5FK.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|