@fantastic.dev/better-stripe 0.71.0 → 0.72.1
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 +12 -0
- package/README.md +1 -1
- package/dist/client/billing/checkoutPages.d.ts.map +1 -1
- package/dist/client/billing/checkoutPages.js +0 -1
- package/dist/client/billing/checkoutPages.js.map +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +524 -50
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +246 -9
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +524 -50
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +246 -9
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.d.ts +6 -1
- package/dist/client/paymentSource/resolver.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.js +49 -41
- package/dist/client/paymentSource/resolver.js.map +1 -1
- package/dist/client/processingCostReconciliation/provider.d.ts.map +1 -1
- package/dist/client/processingCostReconciliation/provider.js +14 -2
- package/dist/client/processingCostReconciliation/provider.js.map +1 -1
- package/dist/client/settlement/authorization.fixture.d.ts +26 -0
- package/dist/client/settlement/authorization.fixture.d.ts.map +1 -1
- package/dist/client/settlement/execution.d.ts +2 -0
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/usage/index.d.ts +1 -0
- package/dist/client/usage/index.d.ts.map +1 -1
- package/dist/client/usage/invoiceSale.d.ts +8 -0
- package/dist/client/usage/invoiceSale.d.ts.map +1 -1
- package/dist/client/usage/invoiceSale.js +3 -0
- package/dist/client/usage/invoiceSale.js.map +1 -1
- package/dist/client/usage/mixedInvoice.fixtures.d.ts +315 -0
- package/dist/client/usage/mixedInvoice.fixtures.d.ts.map +1 -0
- package/dist/client/usage/mixedInvoice.fixtures.js +55 -0
- package/dist/client/usage/mixedInvoice.fixtures.js.map +1 -0
- package/dist/client/usage/mixedInvoiceSale.d.ts +6 -0
- package/dist/client/usage/mixedInvoiceSale.d.ts.map +1 -0
- package/dist/client/usage/mixedInvoiceSale.js +160 -0
- package/dist/client/usage/mixedInvoiceSale.js.map +1 -0
- package/dist/client/usage/observationClient.d.ts +2 -2
- package/dist/client/usage/observationClient.d.ts.map +1 -1
- package/dist/client/usage/retainedInvoiceSource.d.ts +20 -0
- package/dist/client/usage/retainedInvoiceSource.d.ts.map +1 -0
- package/dist/client/usage/retainedInvoiceSource.js +92 -0
- package/dist/client/usage/retainedInvoiceSource.js.map +1 -0
- package/dist/client/usage/settlement.d.ts +5 -0
- package/dist/client/usage/settlement.d.ts.map +1 -1
- package/dist/client/usage/settlement.js +28 -9
- package/dist/client/usage/settlement.js.map +1 -1
- package/dist/component/_generated/component.d.ts +65 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/balanceFunding/mutations.d.ts +16 -16
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
- package/dist/component/earnings/triggers.d.ts +84 -6
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
- package/dist/component/recoveryWorkflow/helpers.d.ts +13 -0
- package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/mutations.d.ts +13 -0
- package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/queries.d.ts +26 -0
- package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/schema.d.ts +464 -16
- package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -1
- package/dist/component/schema.d.ts +246 -9
- package/dist/component/settlement/mutations.d.ts +26 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/queries.d.ts +13 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/schema.d.ts +122 -3
- package/dist/component/settlement/schema.d.ts.map +1 -1
- package/dist/component/settlement/schema.js +2 -0
- package/dist/component/settlement/schema.js.map +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +262 -25
- package/dist/component/usage/allowance.fixtures.d.ts.map +1 -1
- package/dist/component/usageCredits/accounting.fixtures.d.ts +246 -9
- package/dist/component/usageCredits/accounting.fixtures.d.ts.map +1 -1
- package/dist/shared/usageInvoiceLines.d.ts +32 -0
- package/dist/shared/usageInvoiceLines.d.ts.map +1 -0
- package/dist/shared/usageInvoiceLines.js +13 -0
- package/dist/shared/usageInvoiceLines.js.map +1 -0
- package/docs/checkout-session-pages.md +5 -0
- package/docs/evidence/native-metering/mixed-settlement-2026-10-20.json +284 -0
- package/docs/metering-setup.md +3 -2
- package/docs/usage-example.md +24 -5
- package/docs/usage-settlement.md +74 -8
- package/docs/usage-verification.md +22 -2
- package/package.json +1 -1
- package/src/client/billing/checkoutPages.test.ts +20 -1
- package/src/client/billing/checkoutPages.ts +0 -1
- package/src/client/paymentSource/resolver.ts +80 -59
- package/src/client/processingCostReconciliation/provider.ts +20 -2
- package/src/client/settlement/execution.ts +2 -0
- package/src/client/usage/index.ts +2 -0
- package/src/client/usage/invoiceSale.ts +10 -0
- package/src/client/usage/mixedInvoice.fixtures.ts +54 -0
- package/src/client/usage/mixedInvoiceSale.test.ts +92 -0
- package/src/client/usage/mixedInvoiceSale.ts +196 -0
- package/src/client/usage/mixedSettlement.test.ts +187 -0
- package/src/client/usage/retainedInvoiceSource.ts +118 -0
- package/src/client/usage/settlement.ts +47 -9
- package/src/component/_generated/component.ts +50 -0
- package/src/component/settlement/schema.ts +2 -0
- package/src/shared/usageInvoiceLines.ts +14 -0
|
@@ -1418,6 +1418,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1418
1418
|
}[];
|
|
1419
1419
|
usageSource?: {
|
|
1420
1420
|
customerAccount: string;
|
|
1421
|
+
invoiceLines?: {
|
|
1422
|
+
amount: number;
|
|
1423
|
+
kind: "fixed" | "metered";
|
|
1424
|
+
lineId: string;
|
|
1425
|
+
period: {
|
|
1426
|
+
end: number;
|
|
1427
|
+
start: number;
|
|
1428
|
+
};
|
|
1429
|
+
quantity: string;
|
|
1430
|
+
stripePriceId: string;
|
|
1431
|
+
stripeProductId: string;
|
|
1432
|
+
subscriptionItemId: string;
|
|
1433
|
+
}[] | undefined;
|
|
1421
1434
|
invoicePaymentId: string;
|
|
1422
1435
|
livemode: boolean;
|
|
1423
1436
|
meterId: string;
|
|
@@ -1495,6 +1508,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1495
1508
|
}[];
|
|
1496
1509
|
usageSource?: {
|
|
1497
1510
|
customerAccount: string;
|
|
1511
|
+
invoiceLines?: {
|
|
1512
|
+
amount: number;
|
|
1513
|
+
kind: "fixed" | "metered";
|
|
1514
|
+
lineId: string;
|
|
1515
|
+
period: {
|
|
1516
|
+
end: number;
|
|
1517
|
+
start: number;
|
|
1518
|
+
};
|
|
1519
|
+
quantity: string;
|
|
1520
|
+
stripePriceId: string;
|
|
1521
|
+
stripeProductId: string;
|
|
1522
|
+
subscriptionItemId: string;
|
|
1523
|
+
}[] | undefined;
|
|
1498
1524
|
invoicePaymentId: string;
|
|
1499
1525
|
livemode: boolean;
|
|
1500
1526
|
meterId: string;
|
|
@@ -1524,6 +1550,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1524
1550
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1525
1551
|
usageSource: import("convex/values").VObject<{
|
|
1526
1552
|
customerAccount: string;
|
|
1553
|
+
invoiceLines?: {
|
|
1554
|
+
amount: number;
|
|
1555
|
+
kind: "fixed" | "metered";
|
|
1556
|
+
lineId: string;
|
|
1557
|
+
period: {
|
|
1558
|
+
end: number;
|
|
1559
|
+
start: number;
|
|
1560
|
+
};
|
|
1561
|
+
quantity: string;
|
|
1562
|
+
stripePriceId: string;
|
|
1563
|
+
stripeProductId: string;
|
|
1564
|
+
subscriptionItemId: string;
|
|
1565
|
+
}[] | undefined;
|
|
1527
1566
|
invoicePaymentId: string;
|
|
1528
1567
|
livemode: boolean;
|
|
1529
1568
|
meterId: string;
|
|
@@ -1538,6 +1577,46 @@ export declare function setupCredits(): Promise<{
|
|
|
1538
1577
|
subscriptionId: string;
|
|
1539
1578
|
subscriptionItemId: string;
|
|
1540
1579
|
} | undefined, {
|
|
1580
|
+
invoiceLines: import("convex/values").VArray<{
|
|
1581
|
+
amount: number;
|
|
1582
|
+
kind: "fixed" | "metered";
|
|
1583
|
+
lineId: string;
|
|
1584
|
+
period: {
|
|
1585
|
+
end: number;
|
|
1586
|
+
start: number;
|
|
1587
|
+
};
|
|
1588
|
+
quantity: string;
|
|
1589
|
+
stripePriceId: string;
|
|
1590
|
+
stripeProductId: string;
|
|
1591
|
+
subscriptionItemId: string;
|
|
1592
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1593
|
+
amount: number;
|
|
1594
|
+
kind: "fixed" | "metered";
|
|
1595
|
+
lineId: string;
|
|
1596
|
+
period: {
|
|
1597
|
+
end: number;
|
|
1598
|
+
start: number;
|
|
1599
|
+
};
|
|
1600
|
+
quantity: string;
|
|
1601
|
+
stripePriceId: string;
|
|
1602
|
+
stripeProductId: string;
|
|
1603
|
+
subscriptionItemId: string;
|
|
1604
|
+
}, {
|
|
1605
|
+
lineId: import("convex/values").VString<string, "required">;
|
|
1606
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
1607
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
1608
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
1609
|
+
period: import("convex/values").VObject<{
|
|
1610
|
+
end: number;
|
|
1611
|
+
start: number;
|
|
1612
|
+
}, {
|
|
1613
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
1614
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
1615
|
+
}, "required", "end" | "start">;
|
|
1616
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1617
|
+
quantity: import("convex/values").VString<string, "required">;
|
|
1618
|
+
kind: import("convex/values").VUnion<"fixed" | "metered", [import("convex/values").VLiteral<"fixed", "required">, import("convex/values").VLiteral<"metered", "required">], "required", never>;
|
|
1619
|
+
}, "required", "amount" | "kind" | "lineId" | "period" | "period.end" | "period.start" | "quantity" | "stripePriceId" | "stripeProductId" | "subscriptionItemId">, "optional">;
|
|
1541
1620
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
1542
1621
|
customerAccount: import("convex/values").VString<string, "required">;
|
|
1543
1622
|
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
@@ -1555,7 +1634,7 @@ export declare function setupCredits(): Promise<{
|
|
|
1555
1634
|
end: import("convex/values").VFloat64<number, "required">;
|
|
1556
1635
|
}, "required", "end" | "start">;
|
|
1557
1636
|
model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
|
|
1558
|
-
}, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
1637
|
+
}, "optional", "customerAccount" | "invoiceLines" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
1559
1638
|
creditSource: import("convex/values").VObject<{
|
|
1560
1639
|
creditGrantId: string;
|
|
1561
1640
|
customerAccount: string;
|
|
@@ -1592,7 +1671,7 @@ export declare function setupCredits(): Promise<{
|
|
|
1592
1671
|
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1593
1672
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
1594
1673
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1595
|
-
}, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>;
|
|
1674
|
+
}, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoiceLines" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>;
|
|
1596
1675
|
version: import("convex/values").VFloat64<number, "required">;
|
|
1597
1676
|
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
1598
1677
|
sourceId: import("convex/values").VString<string, "required">;
|
|
@@ -1603,7 +1682,7 @@ export declare function setupCredits(): Promise<{
|
|
|
1603
1682
|
activePhase: import("convex/values").VUnion<"execute" | "reconcile" | undefined, [import("convex/values").VLiteral<"execute", "required">, import("convex/values").VLiteral<"reconcile", "required">], "optional", never>;
|
|
1604
1683
|
resumeQueued: import("convex/values").VBoolean<boolean, "required">;
|
|
1605
1684
|
outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
|
|
1606
|
-
}, "required", "accountId" | "activePhase" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.policyContext" | "allocation.policyContext.fields" | "allocation.policyContext.namespace" | "allocation.policyContext.version" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "cancelRequested" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "outcome" | "provider" | "providerApiVersion" | "providerStarted" | "releaseUncollectible" | "resumeQueued" | "retryDelayMs" | "scopeKey" | "sourceId" | "sourceKind" | "status" | "version" | "workflowId" | `allocation.policyContext.fields.${string}`>, {
|
|
1685
|
+
}, "required", "accountId" | "activePhase" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.policyContext" | "allocation.policyContext.fields" | "allocation.policyContext.namespace" | "allocation.policyContext.version" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoiceLines" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "cancelRequested" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "outcome" | "provider" | "providerApiVersion" | "providerStarted" | "releaseUncollectible" | "resumeQueued" | "retryDelayMs" | "scopeKey" | "sourceId" | "sourceKind" | "status" | "version" | "workflowId" | `allocation.policyContext.fields.${string}`>, {
|
|
1607
1686
|
by_group: ["groupKey", "_creationTime"];
|
|
1608
1687
|
by_source: ["sourceKind", "sourceId", "_creationTime"];
|
|
1609
1688
|
}, {}, {}>;
|
|
@@ -1641,6 +1720,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1641
1720
|
}[];
|
|
1642
1721
|
usageSource?: {
|
|
1643
1722
|
customerAccount: string;
|
|
1723
|
+
invoiceLines?: {
|
|
1724
|
+
amount: number;
|
|
1725
|
+
kind: "fixed" | "metered";
|
|
1726
|
+
lineId: string;
|
|
1727
|
+
period: {
|
|
1728
|
+
end: number;
|
|
1729
|
+
start: number;
|
|
1730
|
+
};
|
|
1731
|
+
quantity: string;
|
|
1732
|
+
stripePriceId: string;
|
|
1733
|
+
stripeProductId: string;
|
|
1734
|
+
subscriptionItemId: string;
|
|
1735
|
+
}[] | undefined;
|
|
1644
1736
|
invoicePaymentId: string;
|
|
1645
1737
|
livemode: boolean;
|
|
1646
1738
|
meterId: string;
|
|
@@ -1704,6 +1796,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1704
1796
|
}[];
|
|
1705
1797
|
usageSource?: {
|
|
1706
1798
|
customerAccount: string;
|
|
1799
|
+
invoiceLines?: {
|
|
1800
|
+
amount: number;
|
|
1801
|
+
kind: "fixed" | "metered";
|
|
1802
|
+
lineId: string;
|
|
1803
|
+
period: {
|
|
1804
|
+
end: number;
|
|
1805
|
+
start: number;
|
|
1806
|
+
};
|
|
1807
|
+
quantity: string;
|
|
1808
|
+
stripePriceId: string;
|
|
1809
|
+
stripeProductId: string;
|
|
1810
|
+
subscriptionItemId: string;
|
|
1811
|
+
}[] | undefined;
|
|
1707
1812
|
invoicePaymentId: string;
|
|
1708
1813
|
livemode: boolean;
|
|
1709
1814
|
meterId: string;
|
|
@@ -1772,6 +1877,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1772
1877
|
}[];
|
|
1773
1878
|
usageSource?: {
|
|
1774
1879
|
customerAccount: string;
|
|
1880
|
+
invoiceLines?: {
|
|
1881
|
+
amount: number;
|
|
1882
|
+
kind: "fixed" | "metered";
|
|
1883
|
+
lineId: string;
|
|
1884
|
+
period: {
|
|
1885
|
+
end: number;
|
|
1886
|
+
start: number;
|
|
1887
|
+
};
|
|
1888
|
+
quantity: string;
|
|
1889
|
+
stripePriceId: string;
|
|
1890
|
+
stripeProductId: string;
|
|
1891
|
+
subscriptionItemId: string;
|
|
1892
|
+
}[] | undefined;
|
|
1775
1893
|
invoicePaymentId: string;
|
|
1776
1894
|
livemode: boolean;
|
|
1777
1895
|
meterId: string;
|
|
@@ -1801,6 +1919,19 @@ export declare function setupCredits(): Promise<{
|
|
|
1801
1919
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1802
1920
|
usageSource: import("convex/values").VObject<{
|
|
1803
1921
|
customerAccount: string;
|
|
1922
|
+
invoiceLines?: {
|
|
1923
|
+
amount: number;
|
|
1924
|
+
kind: "fixed" | "metered";
|
|
1925
|
+
lineId: string;
|
|
1926
|
+
period: {
|
|
1927
|
+
end: number;
|
|
1928
|
+
start: number;
|
|
1929
|
+
};
|
|
1930
|
+
quantity: string;
|
|
1931
|
+
stripePriceId: string;
|
|
1932
|
+
stripeProductId: string;
|
|
1933
|
+
subscriptionItemId: string;
|
|
1934
|
+
}[] | undefined;
|
|
1804
1935
|
invoicePaymentId: string;
|
|
1805
1936
|
livemode: boolean;
|
|
1806
1937
|
meterId: string;
|
|
@@ -1815,6 +1946,46 @@ export declare function setupCredits(): Promise<{
|
|
|
1815
1946
|
subscriptionId: string;
|
|
1816
1947
|
subscriptionItemId: string;
|
|
1817
1948
|
} | undefined, {
|
|
1949
|
+
invoiceLines: import("convex/values").VArray<{
|
|
1950
|
+
amount: number;
|
|
1951
|
+
kind: "fixed" | "metered";
|
|
1952
|
+
lineId: string;
|
|
1953
|
+
period: {
|
|
1954
|
+
end: number;
|
|
1955
|
+
start: number;
|
|
1956
|
+
};
|
|
1957
|
+
quantity: string;
|
|
1958
|
+
stripePriceId: string;
|
|
1959
|
+
stripeProductId: string;
|
|
1960
|
+
subscriptionItemId: string;
|
|
1961
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1962
|
+
amount: number;
|
|
1963
|
+
kind: "fixed" | "metered";
|
|
1964
|
+
lineId: string;
|
|
1965
|
+
period: {
|
|
1966
|
+
end: number;
|
|
1967
|
+
start: number;
|
|
1968
|
+
};
|
|
1969
|
+
quantity: string;
|
|
1970
|
+
stripePriceId: string;
|
|
1971
|
+
stripeProductId: string;
|
|
1972
|
+
subscriptionItemId: string;
|
|
1973
|
+
}, {
|
|
1974
|
+
lineId: import("convex/values").VString<string, "required">;
|
|
1975
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
1976
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
1977
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
1978
|
+
period: import("convex/values").VObject<{
|
|
1979
|
+
end: number;
|
|
1980
|
+
start: number;
|
|
1981
|
+
}, {
|
|
1982
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
1983
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
1984
|
+
}, "required", "end" | "start">;
|
|
1985
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1986
|
+
quantity: import("convex/values").VString<string, "required">;
|
|
1987
|
+
kind: import("convex/values").VUnion<"fixed" | "metered", [import("convex/values").VLiteral<"fixed", "required">, import("convex/values").VLiteral<"metered", "required">], "required", never>;
|
|
1988
|
+
}, "required", "amount" | "kind" | "lineId" | "period" | "period.end" | "period.start" | "quantity" | "stripePriceId" | "stripeProductId" | "subscriptionItemId">, "optional">;
|
|
1818
1989
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
1819
1990
|
customerAccount: import("convex/values").VString<string, "required">;
|
|
1820
1991
|
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
@@ -1832,7 +2003,7 @@ export declare function setupCredits(): Promise<{
|
|
|
1832
2003
|
end: import("convex/values").VFloat64<number, "required">;
|
|
1833
2004
|
}, "required", "end" | "start">;
|
|
1834
2005
|
model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
|
|
1835
|
-
}, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
2006
|
+
}, "optional", "customerAccount" | "invoiceLines" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
1836
2007
|
creditSource: import("convex/values").VObject<{
|
|
1837
2008
|
creditGrantId: string;
|
|
1838
2009
|
customerAccount: string;
|
|
@@ -1869,10 +2040,10 @@ export declare function setupCredits(): Promise<{
|
|
|
1869
2040
|
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1870
2041
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
1871
2042
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1872
|
-
}, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>;
|
|
1873
|
-
}, "required", "accountId" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.policyContext" | "allocation.policyContext.fields" | "allocation.policyContext.namespace" | "allocation.policyContext.version" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "provider" | "providerApiVersion" | "releaseUncollectible" | "retryDelayMs" | "scopeKey" | `allocation.policyContext.fields.${string}`>;
|
|
2043
|
+
}, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoiceLines" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>;
|
|
2044
|
+
}, "required", "accountId" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.policyContext" | "allocation.policyContext.fields" | "allocation.policyContext.namespace" | "allocation.policyContext.version" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoiceLines" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "provider" | "providerApiVersion" | "releaseUncollectible" | "retryDelayMs" | "scopeKey" | `allocation.policyContext.fields.${string}`>;
|
|
1874
2045
|
operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
|
|
1875
|
-
}, "required", "binding" | "binding.accountId" | "binding.allocation" | "binding.allocation.adjustmentAmount" | "binding.allocation.creditSource" | "binding.allocation.creditSource.creditGrantId" | "binding.allocation.creditSource.customerAccount" | "binding.allocation.creditSource.livemode" | "binding.allocation.creditSource.purchaseId" | "binding.allocation.creditSource.stripeAccountId" | "binding.allocation.creditSource.stripePriceId" | "binding.allocation.creditSource.stripeProductId" | "binding.allocation.currency" | "binding.allocation.gross" | "binding.allocation.paymentId" | "binding.allocation.paymentIntentId" | "binding.allocation.platformNet" | "binding.allocation.policyContext" | "binding.allocation.policyContext.fields" | "binding.allocation.policyContext.namespace" | "binding.allocation.policyContext.version" | "binding.allocation.processingFee" | "binding.allocation.sourceChargeId" | "binding.allocation.sourceInvoiceId" | "binding.allocation.transfers" | "binding.allocation.usageSource" | "binding.allocation.usageSource.customerAccount" | "binding.allocation.usageSource.invoicePaymentId" | "binding.allocation.usageSource.livemode" | "binding.allocation.usageSource.meterId" | "binding.allocation.usageSource.model" | "binding.allocation.usageSource.period" | "binding.allocation.usageSource.period.end" | "binding.allocation.usageSource.period.start" | "binding.allocation.usageSource.stripeAccountId" | "binding.allocation.usageSource.stripePriceId" | "binding.allocation.usageSource.stripeProductId" | "binding.allocation.usageSource.subscriptionId" | "binding.allocation.usageSource.subscriptionItemId" | "binding.completion" | "binding.currency" | "binding.definitionVersion" | "binding.groupKey" | "binding.maxAttempts" | "binding.provider" | "binding.providerApiVersion" | "binding.releaseUncollectible" | "binding.retryDelayMs" | "binding.scopeKey" | "operationId" | "requestKey" | `binding.allocation.policyContext.fields.${string}`>, {
|
|
2046
|
+
}, "required", "binding" | "binding.accountId" | "binding.allocation" | "binding.allocation.adjustmentAmount" | "binding.allocation.creditSource" | "binding.allocation.creditSource.creditGrantId" | "binding.allocation.creditSource.customerAccount" | "binding.allocation.creditSource.livemode" | "binding.allocation.creditSource.purchaseId" | "binding.allocation.creditSource.stripeAccountId" | "binding.allocation.creditSource.stripePriceId" | "binding.allocation.creditSource.stripeProductId" | "binding.allocation.currency" | "binding.allocation.gross" | "binding.allocation.paymentId" | "binding.allocation.paymentIntentId" | "binding.allocation.platformNet" | "binding.allocation.policyContext" | "binding.allocation.policyContext.fields" | "binding.allocation.policyContext.namespace" | "binding.allocation.policyContext.version" | "binding.allocation.processingFee" | "binding.allocation.sourceChargeId" | "binding.allocation.sourceInvoiceId" | "binding.allocation.transfers" | "binding.allocation.usageSource" | "binding.allocation.usageSource.customerAccount" | "binding.allocation.usageSource.invoiceLines" | "binding.allocation.usageSource.invoicePaymentId" | "binding.allocation.usageSource.livemode" | "binding.allocation.usageSource.meterId" | "binding.allocation.usageSource.model" | "binding.allocation.usageSource.period" | "binding.allocation.usageSource.period.end" | "binding.allocation.usageSource.period.start" | "binding.allocation.usageSource.stripeAccountId" | "binding.allocation.usageSource.stripePriceId" | "binding.allocation.usageSource.stripeProductId" | "binding.allocation.usageSource.subscriptionId" | "binding.allocation.usageSource.subscriptionItemId" | "binding.completion" | "binding.currency" | "binding.definitionVersion" | "binding.groupKey" | "binding.maxAttempts" | "binding.provider" | "binding.providerApiVersion" | "binding.releaseUncollectible" | "binding.retryDelayMs" | "binding.scopeKey" | "operationId" | "requestKey" | `binding.allocation.policyContext.fields.${string}`>, {
|
|
1876
2047
|
by_key: ["requestKey", "_creationTime"];
|
|
1877
2048
|
}, {}, {}>;
|
|
1878
2049
|
balanceFundingPreparations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -3700,6 +3871,19 @@ export declare function setupCredits(): Promise<{
|
|
|
3700
3871
|
}[];
|
|
3701
3872
|
usageSource?: {
|
|
3702
3873
|
customerAccount: string;
|
|
3874
|
+
invoiceLines?: {
|
|
3875
|
+
amount: number;
|
|
3876
|
+
kind: "fixed" | "metered";
|
|
3877
|
+
lineId: string;
|
|
3878
|
+
period: {
|
|
3879
|
+
end: number;
|
|
3880
|
+
start: number;
|
|
3881
|
+
};
|
|
3882
|
+
quantity: string;
|
|
3883
|
+
stripePriceId: string;
|
|
3884
|
+
stripeProductId: string;
|
|
3885
|
+
subscriptionItemId: string;
|
|
3886
|
+
}[] | undefined;
|
|
3703
3887
|
invoicePaymentId: string;
|
|
3704
3888
|
livemode: boolean;
|
|
3705
3889
|
meterId: string;
|
|
@@ -3729,6 +3913,19 @@ export declare function setupCredits(): Promise<{
|
|
|
3729
3913
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
3730
3914
|
usageSource: import("convex/values").VObject<{
|
|
3731
3915
|
customerAccount: string;
|
|
3916
|
+
invoiceLines?: {
|
|
3917
|
+
amount: number;
|
|
3918
|
+
kind: "fixed" | "metered";
|
|
3919
|
+
lineId: string;
|
|
3920
|
+
period: {
|
|
3921
|
+
end: number;
|
|
3922
|
+
start: number;
|
|
3923
|
+
};
|
|
3924
|
+
quantity: string;
|
|
3925
|
+
stripePriceId: string;
|
|
3926
|
+
stripeProductId: string;
|
|
3927
|
+
subscriptionItemId: string;
|
|
3928
|
+
}[] | undefined;
|
|
3732
3929
|
invoicePaymentId: string;
|
|
3733
3930
|
livemode: boolean;
|
|
3734
3931
|
meterId: string;
|
|
@@ -3743,6 +3940,46 @@ export declare function setupCredits(): Promise<{
|
|
|
3743
3940
|
subscriptionId: string;
|
|
3744
3941
|
subscriptionItemId: string;
|
|
3745
3942
|
} | undefined, {
|
|
3943
|
+
invoiceLines: import("convex/values").VArray<{
|
|
3944
|
+
amount: number;
|
|
3945
|
+
kind: "fixed" | "metered";
|
|
3946
|
+
lineId: string;
|
|
3947
|
+
period: {
|
|
3948
|
+
end: number;
|
|
3949
|
+
start: number;
|
|
3950
|
+
};
|
|
3951
|
+
quantity: string;
|
|
3952
|
+
stripePriceId: string;
|
|
3953
|
+
stripeProductId: string;
|
|
3954
|
+
subscriptionItemId: string;
|
|
3955
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
3956
|
+
amount: number;
|
|
3957
|
+
kind: "fixed" | "metered";
|
|
3958
|
+
lineId: string;
|
|
3959
|
+
period: {
|
|
3960
|
+
end: number;
|
|
3961
|
+
start: number;
|
|
3962
|
+
};
|
|
3963
|
+
quantity: string;
|
|
3964
|
+
stripePriceId: string;
|
|
3965
|
+
stripeProductId: string;
|
|
3966
|
+
subscriptionItemId: string;
|
|
3967
|
+
}, {
|
|
3968
|
+
lineId: import("convex/values").VString<string, "required">;
|
|
3969
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
3970
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
3971
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
3972
|
+
period: import("convex/values").VObject<{
|
|
3973
|
+
end: number;
|
|
3974
|
+
start: number;
|
|
3975
|
+
}, {
|
|
3976
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
3977
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
3978
|
+
}, "required", "end" | "start">;
|
|
3979
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
3980
|
+
quantity: import("convex/values").VString<string, "required">;
|
|
3981
|
+
kind: import("convex/values").VUnion<"fixed" | "metered", [import("convex/values").VLiteral<"fixed", "required">, import("convex/values").VLiteral<"metered", "required">], "required", never>;
|
|
3982
|
+
}, "required", "amount" | "kind" | "lineId" | "period" | "period.end" | "period.start" | "quantity" | "stripePriceId" | "stripeProductId" | "subscriptionItemId">, "optional">;
|
|
3746
3983
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
3747
3984
|
customerAccount: import("convex/values").VString<string, "required">;
|
|
3748
3985
|
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
@@ -3760,7 +3997,7 @@ export declare function setupCredits(): Promise<{
|
|
|
3760
3997
|
end: import("convex/values").VFloat64<number, "required">;
|
|
3761
3998
|
}, "required", "end" | "start">;
|
|
3762
3999
|
model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
|
|
3763
|
-
}, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
4000
|
+
}, "optional", "customerAccount" | "invoiceLines" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
3764
4001
|
creditSource: import("convex/values").VObject<{
|
|
3765
4002
|
creditGrantId: string;
|
|
3766
4003
|
customerAccount: string;
|
|
@@ -3797,7 +4034,7 @@ export declare function setupCredits(): Promise<{
|
|
|
3797
4034
|
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
3798
4035
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
3799
4036
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
3800
|
-
}, "required", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>, {
|
|
4037
|
+
}, "required", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "policyContext" | "policyContext.fields" | "policyContext.namespace" | "policyContext.version" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoiceLines" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId" | `policyContext.fields.${string}`>, {
|
|
3801
4038
|
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
3802
4039
|
}, {}, {}>;
|
|
3803
4040
|
commissionTerms: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounting.fixtures.d.ts","sourceRoot":"","sources":["../../../src/component/usageCredits/accounting.fixtures.ts"],"names":[],"mappings":"AAgBA,wBAAsB,YAAY
|
|
1
|
+
{"version":3,"file":"accounting.fixtures.d.ts","sourceRoot":"","sources":["../../../src/component/usageCredits/accounting.fixtures.ts"],"names":[],"mappings":"AAgBA,wBAAsB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;yBAS1B,GAAG,EAAE,OAAO;yBACZ,OAAO,EAAE,IAAI;yBACb,KAAK,EAAE,SAAS;yBAChB,IAAI;6BAAI,IAAI,EAAE,MAAM;6BAAE,SAAS,EAAE,CAAC;;yBAClC,IAAI;6BAAI,QAAQ,EAAE,KAAK;6BAAE,iBAAiB,EAAE,GAAG;;yBAC/C,mBAAmB,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuDvB,KAAK;YAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAU5B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Infer } from "convex/values";
|
|
2
|
+
/** Complete, canonical native invoice provenance retained with the charge allocation. */
|
|
3
|
+
export declare const usageInvoiceLineProof: import("convex/values").VObject<{
|
|
4
|
+
amount: number;
|
|
5
|
+
kind: "fixed" | "metered";
|
|
6
|
+
lineId: string;
|
|
7
|
+
period: {
|
|
8
|
+
end: number;
|
|
9
|
+
start: number;
|
|
10
|
+
};
|
|
11
|
+
quantity: string;
|
|
12
|
+
stripePriceId: string;
|
|
13
|
+
stripeProductId: string;
|
|
14
|
+
subscriptionItemId: string;
|
|
15
|
+
}, {
|
|
16
|
+
lineId: import("convex/values").VString<string, "required">;
|
|
17
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
18
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
19
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
20
|
+
period: import("convex/values").VObject<{
|
|
21
|
+
end: number;
|
|
22
|
+
start: number;
|
|
23
|
+
}, {
|
|
24
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
25
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
26
|
+
}, "required", "end" | "start">;
|
|
27
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
28
|
+
quantity: import("convex/values").VString<string, "required">;
|
|
29
|
+
kind: import("convex/values").VUnion<"fixed" | "metered", [import("convex/values").VLiteral<"fixed", "required">, import("convex/values").VLiteral<"metered", "required">], "required", never>;
|
|
30
|
+
}, "required", "amount" | "kind" | "lineId" | "period" | "period.end" | "period.start" | "quantity" | "stripePriceId" | "stripeProductId" | "subscriptionItemId">;
|
|
31
|
+
export type UsageInvoiceLineProof = Infer<typeof usageInvoiceLineProof>;
|
|
32
|
+
//# sourceMappingURL=usageInvoiceLines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usageInvoiceLines.d.ts","sourceRoot":"","sources":["../../src/shared/usageInvoiceLines.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,yFAAyF;AACzF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;iKAShC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
/** Complete, canonical native invoice provenance retained with the charge allocation. */
|
|
3
|
+
export const usageInvoiceLineProof = v.object({
|
|
4
|
+
lineId: v.string(),
|
|
5
|
+
stripePriceId: v.string(),
|
|
6
|
+
stripeProductId: v.string(),
|
|
7
|
+
subscriptionItemId: v.string(),
|
|
8
|
+
period: v.object({ start: v.number(), end: v.number() }),
|
|
9
|
+
amount: v.number(),
|
|
10
|
+
quantity: v.string(),
|
|
11
|
+
kind: v.union(v.literal("fixed"), v.literal("metered")),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=usageInvoiceLines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usageInvoiceLines.js","sourceRoot":"","sources":["../../src/shared/usageInvoiceLines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,yFAAyF;AACzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -69,3 +69,8 @@ actual supported session, subscription and invoice reads with immutable trusted
|
|
|
69
69
|
paid facts. Guard provider-read/database races and same-second ordering; do not
|
|
70
70
|
replace historical payment time with event arrival or deployment dates. This
|
|
71
71
|
reader does not fill referral locks or change already settled awards.
|
|
72
|
+
|
|
73
|
+
Buyer ownership is determined by the required, exact `customer_account` value.
|
|
74
|
+
Stripe may also return a legacy `customer` projection on the same session;
|
|
75
|
+
that field is preserved without being used for ownership. A legacy customer
|
|
76
|
+
alone, a missing V2 account, or a different V2 account is rejected.
|