@fantastic.dev/better-stripe 0.58.0 → 0.60.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 +12 -0
- package/README.md +3 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +888 -62
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +428 -15
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +856 -30
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +444 -31
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.d.ts +12 -1
- package/dist/client/paymentSource/resolver.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.fixtures.d.ts +220 -0
- package/dist/client/paymentSource/resolver.fixtures.d.ts.map +1 -0
- package/dist/client/paymentSource/resolver.fixtures.js +189 -0
- package/dist/client/paymentSource/resolver.fixtures.js.map +1 -0
- package/dist/client/paymentSource/resolver.js +28 -3
- package/dist/client/paymentSource/resolver.js.map +1 -1
- package/dist/client/settlement/execution.d.ts +25 -0
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js +2 -0
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/usage/allowanceClient.d.ts +1 -1
- package/dist/client/usage/catalogPrices.d.ts +1 -1
- package/dist/client/usage/catalogPrices.d.ts.map +1 -1
- package/dist/client/usage/catalogPrices.js +4 -4
- package/dist/client/usage/catalogPrices.js.map +1 -1
- package/dist/client/usage/client.d.ts +2 -2
- package/dist/client/usage/client.d.ts.map +1 -1
- package/dist/client/usage/client.js +2 -2
- package/dist/client/usage/client.js.map +1 -1
- package/dist/client/usage/correctionClient.d.ts +33 -0
- package/dist/client/usage/correctionClient.d.ts.map +1 -0
- package/dist/client/usage/correctionClient.js +27 -0
- package/dist/client/usage/correctionClient.js.map +1 -0
- package/dist/client/usage/correctionEligibility.d.ts +4 -0
- package/dist/client/usage/correctionEligibility.d.ts.map +1 -0
- package/dist/client/usage/correctionEligibility.js +7 -0
- package/dist/client/usage/correctionEligibility.js.map +1 -0
- package/dist/client/usage/correctionInvoice.d.ts +9 -0
- package/dist/client/usage/correctionInvoice.d.ts.map +1 -0
- package/dist/client/usage/correctionInvoice.js +218 -0
- package/dist/client/usage/correctionInvoice.js.map +1 -0
- package/dist/client/usage/correctionInvoiceProof.d.ts +29 -0
- package/dist/client/usage/correctionInvoiceProof.d.ts.map +1 -0
- package/dist/client/usage/correctionInvoiceProof.js +41 -0
- package/dist/client/usage/correctionInvoiceProof.js.map +1 -0
- package/dist/client/usage/correctionProofs.d.ts +36 -0
- package/dist/client/usage/correctionProofs.d.ts.map +1 -0
- package/dist/client/usage/correctionProofs.js +41 -0
- package/dist/client/usage/correctionProofs.js.map +1 -0
- package/dist/client/usage/correctionProvider.d.ts +6 -0
- package/dist/client/usage/correctionProvider.d.ts.map +1 -0
- package/dist/client/usage/correctionProvider.js +243 -0
- package/dist/client/usage/correctionProvider.js.map +1 -0
- package/dist/client/usage/correctionRead.d.ts +27 -0
- package/dist/client/usage/correctionRead.d.ts.map +1 -0
- package/dist/client/usage/correctionRead.js +36 -0
- package/dist/client/usage/correctionRead.js.map +1 -0
- package/dist/client/usage/correctionTerms.d.ts +64 -0
- package/dist/client/usage/correctionTerms.d.ts.map +1 -0
- package/dist/client/usage/correctionTerms.js +65 -0
- package/dist/client/usage/correctionTerms.js.map +1 -0
- package/dist/client/usage/correctionTransport.fixtures.d.ts +37 -0
- package/dist/client/usage/correctionTransport.fixtures.d.ts.map +1 -0
- package/dist/client/usage/correctionTransport.fixtures.js +322 -0
- package/dist/client/usage/correctionTransport.fixtures.js.map +1 -0
- package/dist/client/usage/creditClient.d.ts +1 -1
- package/dist/client/usage/creditRevenue.d.ts +22 -0
- package/dist/client/usage/creditRevenue.d.ts.map +1 -0
- package/dist/client/usage/creditRevenue.js +118 -0
- package/dist/client/usage/creditRevenue.js.map +1 -0
- package/dist/client/usage/creditSettlement.d.ts +29 -0
- package/dist/client/usage/creditSettlement.d.ts.map +1 -0
- package/dist/client/usage/creditSettlement.fixtures.d.ts +215 -0
- package/dist/client/usage/creditSettlement.fixtures.d.ts.map +1 -0
- package/dist/client/usage/creditSettlement.fixtures.js +59 -0
- package/dist/client/usage/creditSettlement.fixtures.js.map +1 -0
- package/dist/client/usage/creditSettlement.js +70 -0
- package/dist/client/usage/creditSettlement.js.map +1 -0
- package/dist/client/usage/creditTransport.fixtures.d.ts +7 -1
- package/dist/client/usage/creditTransport.fixtures.d.ts.map +1 -1
- package/dist/client/usage/creditTransport.fixtures.js +25 -4
- package/dist/client/usage/creditTransport.fixtures.js.map +1 -1
- package/dist/client/usage/index.d.ts +6 -0
- package/dist/client/usage/index.d.ts.map +1 -1
- package/dist/client/usage/invoiceSale.d.ts +22 -0
- package/dist/client/usage/invoiceSale.d.ts.map +1 -0
- package/dist/client/usage/invoiceSale.fixtures.d.ts +285 -0
- package/dist/client/usage/invoiceSale.fixtures.d.ts.map +1 -0
- package/dist/client/usage/invoiceSale.fixtures.js +104 -0
- package/dist/client/usage/invoiceSale.fixtures.js.map +1 -0
- package/dist/client/usage/invoiceSale.js +117 -0
- package/dist/client/usage/invoiceSale.js.map +1 -0
- package/dist/client/usage/observationClient.d.ts +20 -0
- package/dist/client/usage/observationClient.d.ts.map +1 -1
- package/dist/client/usage/observationClient.js +20 -6
- package/dist/client/usage/observationClient.js.map +1 -1
- package/dist/client/usage/records.d.ts +1 -1
- package/dist/client/usage/records.d.ts.map +1 -1
- package/dist/client/usage/records.js.map +1 -1
- package/dist/client/usage/settlement.d.ts +32 -0
- package/dist/client/usage/settlement.d.ts.map +1 -0
- package/dist/client/usage/settlement.js +60 -0
- package/dist/client/usage/settlement.js.map +1 -0
- package/dist/client/usage/settlementClient.d.ts +51 -0
- package/dist/client/usage/settlementClient.d.ts.map +1 -0
- package/dist/client/usage/settlementClient.js +35 -0
- package/dist/client/usage/settlementClient.js.map +1 -0
- package/dist/client/usage/summary.d.ts +3 -0
- package/dist/client/usage/summary.d.ts.map +1 -1
- package/dist/client/usage/summary.js +9 -4
- package/dist/client/usage/summary.js.map +1 -1
- package/dist/client/usageExports.d.ts +2 -0
- package/dist/client/usageExports.d.ts.map +1 -1
- package/dist/component/_generated/api.d.ts +12 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +380 -14
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/accountClosure/mutations.d.ts.map +1 -1
- package/dist/component/accountClosure/mutations.js +13 -0
- package/dist/component/accountClosure/mutations.js.map +1 -1
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
- package/dist/component/earnings/triggers.d.ts +368 -32
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -1
- package/dist/component/financialObservations/settlementHelpers.js +2 -0
- package/dist/component/financialObservations/settlementHelpers.js.map +1 -1
- package/dist/component/recoveryWorkflow/helpers.d.ts +25 -0
- package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/mutations.d.ts +25 -0
- package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/queries.d.ts +50 -0
- package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/schema.d.ts +566 -10
- package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -1
- package/dist/component/schema.d.ts +428 -15
- package/dist/component/schema.js +4 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/settlement/mutations.d.ts +50 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +8 -1
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +25 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/schema.d.ts +128 -1
- package/dist/component/settlement/schema.d.ts.map +1 -1
- package/dist/component/settlement/schema.js +22 -0
- package/dist/component/settlement/schema.js.map +1 -1
- package/dist/component/usage/queries.d.ts +2 -2
- package/dist/component/usage/schema.d.ts +18 -13
- package/dist/component/usage/schema.d.ts.map +1 -1
- package/dist/component/usage/schema.js +2 -1
- package/dist/component/usage/schema.js.map +1 -1
- package/dist/component/usageAllowance/queries.d.ts +1 -1
- package/dist/component/usageAllowance/queries.d.ts.map +1 -1
- package/dist/component/usageAllowance/queries.js +10 -1
- package/dist/component/usageAllowance/queries.js.map +1 -1
- package/dist/component/usageAllowance/schema.d.ts +5 -5
- package/dist/component/usageAllowance/schema.d.ts.map +1 -1
- package/dist/component/usageAllowance/schema.js +1 -1
- package/dist/component/usageAllowance/schema.js.map +1 -1
- package/dist/component/usageCorrections/accounting.d.ts +5 -0
- package/dist/component/usageCorrections/accounting.d.ts.map +1 -0
- package/dist/component/usageCorrections/accounting.js +55 -0
- package/dist/component/usageCorrections/accounting.js.map +1 -0
- package/dist/component/usageCorrections/cancellation.d.ts +6 -0
- package/dist/component/usageCorrections/cancellation.d.ts.map +1 -0
- package/dist/component/usageCorrections/cancellation.js +29 -0
- package/dist/component/usageCorrections/cancellation.js.map +1 -0
- package/dist/component/usageCorrections/helpers.d.ts +60 -0
- package/dist/component/usageCorrections/helpers.d.ts.map +1 -0
- package/dist/component/usageCorrections/helpers.js +52 -0
- package/dist/component/usageCorrections/helpers.js.map +1 -0
- package/dist/component/usageCorrections/invoice.d.ts +38 -0
- package/dist/component/usageCorrections/invoice.d.ts.map +1 -0
- package/dist/component/usageCorrections/invoice.js +82 -0
- package/dist/component/usageCorrections/invoice.js.map +1 -0
- package/dist/component/usageCorrections/mutations.d.ts +121 -0
- package/dist/component/usageCorrections/mutations.d.ts.map +1 -0
- package/dist/component/usageCorrections/mutations.js +256 -0
- package/dist/component/usageCorrections/mutations.js.map +1 -0
- package/dist/component/usageCorrections/queries.d.ts +115 -0
- package/dist/component/usageCorrections/queries.d.ts.map +1 -0
- package/dist/component/usageCorrections/queries.js +84 -0
- package/dist/component/usageCorrections/queries.js.map +1 -0
- package/dist/component/usageCorrections/schema.d.ts +248 -0
- package/dist/component/usageCorrections/schema.d.ts.map +1 -0
- package/dist/component/usageCorrections/schema.js +74 -0
- package/dist/component/usageCorrections/schema.js.map +1 -0
- package/dist/component/usageCredits/queries.d.ts +1 -1
- package/dist/component/usageCredits/queries.d.ts.map +1 -1
- package/dist/component/usageCredits/queries.js +6 -0
- package/dist/component/usageCredits/queries.js.map +1 -1
- package/dist/component/usageCredits/schema.d.ts +5 -5
- package/dist/component/usageCredits/schema.d.ts.map +1 -1
- package/dist/component/usageCredits/schema.js +1 -1
- package/dist/component/usageCredits/schema.js.map +1 -1
- package/dist/component/usageDelivery/fields.d.ts +2 -2
- package/dist/component/usageDelivery/fields.d.ts.map +1 -1
- package/dist/component/usageDelivery/fields.js +1 -1
- package/dist/component/usageDelivery/fields.js.map +1 -1
- package/dist/component/usageDelivery/helpers.d.ts +7 -6
- package/dist/component/usageDelivery/helpers.d.ts.map +1 -1
- package/dist/component/usageDelivery/mutations.d.ts +6 -6
- package/dist/component/usageDelivery/mutations.d.ts.map +1 -1
- package/dist/component/usageDelivery/mutations.js +9 -1
- package/dist/component/usageDelivery/mutations.js.map +1 -1
- package/dist/component/usageDelivery/queries.d.ts +8 -6
- package/dist/component/usageDelivery/queries.d.ts.map +1 -1
- package/dist/component/usageDelivery/schema.d.ts +4 -4
- package/dist/component/usageDelivery/steps.d.ts +2 -2
- package/dist/component/usageDelivery/steps.js +1 -1
- package/dist/component/usageDelivery/steps.js.map +1 -1
- package/dist/component/usageObservations/queries.d.ts.map +1 -1
- package/dist/component/usageObservations/queries.js +4 -2
- package/dist/component/usageObservations/queries.js.map +1 -1
- package/dist/component/usageSubscriptions/retirement.d.ts.map +1 -1
- package/dist/component/usageSubscriptions/retirement.js +24 -2
- package/dist/component/usageSubscriptions/retirement.js.map +1 -1
- package/docs/README.md +4 -0
- package/docs/settlement.md +4 -0
- package/docs/usage-corrections.md +249 -0
- package/docs/usage-limits.md +1 -1
- package/docs/usage-settlement.md +162 -0
- package/package.json +3 -1
- package/src/client/index.ts +9 -0
- package/src/client/paymentSource/resolver.fixtures.ts +216 -0
- package/src/client/paymentSource/resolver.test.ts +11 -207
- package/src/client/paymentSource/resolver.ts +54 -2
- package/src/client/settlement/execution.ts +24 -0
- package/src/client/usage/catalogPrices.ts +4 -2
- package/src/client/usage/client.ts +2 -2
- package/src/client/usage/correctionClient.test.ts +153 -0
- package/src/client/usage/correctionClient.ts +62 -0
- package/src/client/usage/correctionCredits.test.ts +156 -0
- package/src/client/usage/correctionEligibility.ts +14 -0
- package/src/client/usage/correctionInvoice.test.ts +127 -0
- package/src/client/usage/correctionInvoice.ts +269 -0
- package/src/client/usage/correctionInvoiceProof.ts +40 -0
- package/src/client/usage/correctionProofs.ts +40 -0
- package/src/client/usage/correctionProvider.ts +326 -0
- package/src/client/usage/correctionRead.ts +73 -0
- package/src/client/usage/correctionRecovery.test.ts +113 -0
- package/src/client/usage/correctionTerms.ts +98 -0
- package/src/client/usage/correctionTransport.fixtures.ts +372 -0
- package/src/client/usage/creditRevenue.test.ts +105 -0
- package/src/client/usage/creditRevenue.ts +163 -0
- package/src/client/usage/creditSettlement.fixtures.ts +70 -0
- package/src/client/usage/creditSettlement.test.ts +66 -0
- package/src/client/usage/creditSettlement.ts +94 -0
- package/src/client/usage/creditSettlementRecovery.test.ts +173 -0
- package/src/client/usage/creditTransport.fixtures.ts +29 -4
- package/src/client/usage/index.ts +20 -0
- package/src/client/usage/invoiceSale.fixtures.ts +103 -0
- package/src/client/usage/invoiceSale.test.ts +184 -0
- package/src/client/usage/invoiceSale.ts +155 -0
- package/src/client/usage/observationClient.ts +20 -6
- package/src/client/usage/records.ts +7 -1
- package/src/client/usage/settlement.test.ts +179 -0
- package/src/client/usage/settlement.ts +81 -0
- package/src/client/usage/settlementClient.ts +84 -0
- package/src/client/usage/summary.ts +12 -4
- package/src/client/usageExports.ts +11 -0
- package/src/component/_generated/api.ts +12 -0
- package/src/component/_generated/component.ts +440 -2
- package/src/component/accountClosure/mutations.ts +17 -0
- package/src/component/financialObservations/settlementHelpers.ts +2 -0
- package/src/component/schema.ts +8 -0
- package/src/component/settlement/mutations.ts +10 -1
- package/src/component/settlement/schema.ts +26 -0
- package/src/component/settlement/settlement-claims.test.ts +54 -0
- package/src/component/usage/schema.ts +2 -0
- package/src/component/usageAllowance/queries.ts +8 -1
- package/src/component/usageAllowance/schema.ts +1 -0
- package/src/component/usageCorrections/accounting.ts +79 -0
- package/src/component/usageCorrections/cancellation.ts +32 -0
- package/src/component/usageCorrections/corrections.test.ts +389 -0
- package/src/component/usageCorrections/helpers.ts +57 -0
- package/src/component/usageCorrections/invoice.ts +103 -0
- package/src/component/usageCorrections/mutations.ts +278 -0
- package/src/component/usageCorrections/queries.ts +94 -0
- package/src/component/usageCorrections/schema.ts +90 -0
- package/src/component/usageCredits/queries.ts +4 -0
- package/src/component/usageCredits/schema.ts +1 -0
- package/src/component/usageDelivery/fields.ts +1 -0
- package/src/component/usageDelivery/mutations.ts +8 -3
- package/src/component/usageDelivery/steps.ts +1 -1
- package/src/component/usageObservations/queries.ts +5 -2
- package/src/component/usageSubscriptions/retirement.ts +31 -2
package/dist/component/schema.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { claimsTable as usageCorrectionClaims, operationsTable as usageCorrections, historyTable as usageCorrectionHistory, } from "./usageCorrections/schema.js";
|
|
1
2
|
import { policiesTable as usageAllowancePolicies, historyTable as usageAllowanceHistory, } from "./usageAllowance/schema.js";
|
|
2
3
|
import { accountsTable as usageCreditAccounts, purchasesTable as usageCreditPurchases, grantsTable as usageCreditGrants, historyTable as usageCreditHistory, } from "./usageCredits/schema.js";
|
|
3
4
|
import { controlsTable as usageSubscriptionControls, intentsTable as usageSubscriptionIntents, locksTable as usageSubscriptionLocks, historyTable as usageSubscriptionHistory, } from "./usageSubscriptions/schema.js";
|
|
@@ -32,6 +33,9 @@ import { accountsTable } from "./core/schema";
|
|
|
32
33
|
import { pricesTable, productsTable } from "./products/schema";
|
|
33
34
|
import { webhookEventsTable } from "./webhooks/schema";
|
|
34
35
|
export default defineSchema({
|
|
36
|
+
usageCorrectionClaims,
|
|
37
|
+
usageCorrections,
|
|
38
|
+
usageCorrectionHistory,
|
|
35
39
|
usageAllowancePolicies,
|
|
36
40
|
usageAllowanceHistory,
|
|
37
41
|
usageSubscriptionControls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,GACtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,IAAI,mBAAmB,EACpC,cAAc,IAAI,oBAAoB,EACtC,WAAW,IAAI,iBAAiB,EAChC,YAAY,IAAI,kBAAkB,GACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,IAAI,yBAAyB,EAC1C,YAAY,IAAI,wBAAwB,EACxC,UAAU,IAAI,sBAAsB,EACpC,YAAY,IAAI,wBAAwB,GACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,YAAY,IAAI,oBAAoB,EACpC,iBAAiB,IAAI,yBAAyB,GAC/C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,IAAI,mBAAmB,EAClC,UAAU,IAAI,kBAAkB,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,IAAI,qBAAqB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BAAoB,EAAE,iBAAiB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,oBAAoB;IACrC,mBAAmB,EAAE,wBAAwB;IAC7C,OAAO;IACP,QAAQ,EAAE,aAAa;IACvB,eAAe,EAAE,oBAAoB;IAErC,WAAW;IACX,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IAEnB,UAAU;IACV,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,qBAAqB;IACvC,QAAQ,EAAE,aAAa;IAEvB,UAAU;IACV,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,iBAAiB,EAAE,sBAAsB;IACzC,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;IACzB,mBAAmB,EAAE,wBAAwB;IAE7C,WAAW;IACX,aAAa,EAAE,kBAAkB;CAClC,CAAC,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
export declare const reserveSettlementAllocation: import("convex/server").RegisteredMutation<"public", {
|
|
2
2
|
adjustmentAmount?: number | undefined;
|
|
3
|
+
creditSource?: {
|
|
4
|
+
creditGrantId: string;
|
|
5
|
+
customerAccount: string;
|
|
6
|
+
livemode: boolean;
|
|
7
|
+
purchaseId: string;
|
|
8
|
+
stripeAccountId: string;
|
|
9
|
+
stripePriceId: string;
|
|
10
|
+
stripeProductId: string;
|
|
11
|
+
} | undefined;
|
|
3
12
|
currency: string;
|
|
4
13
|
gross: number;
|
|
5
14
|
paymentId?: string | undefined;
|
|
@@ -13,10 +22,35 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
|
|
|
13
22
|
destinationAccountId: string;
|
|
14
23
|
role: "affiliate" | "other" | "store";
|
|
15
24
|
}[];
|
|
25
|
+
usageSource?: {
|
|
26
|
+
customerAccount: string;
|
|
27
|
+
invoicePaymentId: string;
|
|
28
|
+
livemode: boolean;
|
|
29
|
+
meterId: string;
|
|
30
|
+
model: "included_overage" | "pay_as_you_go";
|
|
31
|
+
period: {
|
|
32
|
+
end: number;
|
|
33
|
+
start: number;
|
|
34
|
+
};
|
|
35
|
+
stripeAccountId: string;
|
|
36
|
+
stripePriceId: string;
|
|
37
|
+
stripeProductId: string;
|
|
38
|
+
subscriptionId: string;
|
|
39
|
+
subscriptionItemId: string;
|
|
40
|
+
} | undefined;
|
|
16
41
|
}, Promise<{
|
|
17
42
|
_creationTime: number;
|
|
18
43
|
_id: import("convex/values").GenericId<"settlementAllocations">;
|
|
19
44
|
adjustmentAmount?: number | undefined;
|
|
45
|
+
creditSource?: {
|
|
46
|
+
creditGrantId: string;
|
|
47
|
+
customerAccount: string;
|
|
48
|
+
livemode: boolean;
|
|
49
|
+
purchaseId: string;
|
|
50
|
+
stripeAccountId: string;
|
|
51
|
+
stripePriceId: string;
|
|
52
|
+
stripeProductId: string;
|
|
53
|
+
} | undefined;
|
|
20
54
|
currency: string;
|
|
21
55
|
gross: number;
|
|
22
56
|
paymentId?: string | undefined;
|
|
@@ -30,6 +64,22 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
|
|
|
30
64
|
destinationAccountId: string;
|
|
31
65
|
role: "affiliate" | "other" | "store";
|
|
32
66
|
}[];
|
|
67
|
+
usageSource?: {
|
|
68
|
+
customerAccount: string;
|
|
69
|
+
invoicePaymentId: string;
|
|
70
|
+
livemode: boolean;
|
|
71
|
+
meterId: string;
|
|
72
|
+
model: "included_overage" | "pay_as_you_go";
|
|
73
|
+
period: {
|
|
74
|
+
end: number;
|
|
75
|
+
start: number;
|
|
76
|
+
};
|
|
77
|
+
stripeAccountId: string;
|
|
78
|
+
stripePriceId: string;
|
|
79
|
+
stripeProductId: string;
|
|
80
|
+
subscriptionId: string;
|
|
81
|
+
subscriptionItemId: string;
|
|
82
|
+
} | undefined;
|
|
33
83
|
}>>;
|
|
34
84
|
export declare const claimCommissionInvoice: import("convex/server").RegisteredMutation<"public", {
|
|
35
85
|
affiliateAccountId?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DtC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GA2DjC,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;GA8CtC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canonicalFingerprint } from "../operationEvidence/canonical.js";
|
|
1
2
|
import { observeSettlementAllocation } from "../financialObservations/settlement.js";
|
|
2
3
|
import { paginator } from "convex-helpers/server/pagination";
|
|
3
4
|
import schema from "../schema.js";
|
|
@@ -16,6 +17,8 @@ export const reserveSettlementAllocation = mutation({
|
|
|
16
17
|
args: allocationFields,
|
|
17
18
|
returns: doc,
|
|
18
19
|
handler: async (ctx, args) => {
|
|
20
|
+
if (args.usageSource && args.creditSource)
|
|
21
|
+
throw new Error("Settlement cannot combine invoice and credit purchase sources");
|
|
19
22
|
const existing = await ctx.db
|
|
20
23
|
.query("settlementAllocations")
|
|
21
24
|
.withIndex("by_source_charge", (q) => q.eq("sourceChargeId", args.sourceChargeId))
|
|
@@ -23,7 +26,11 @@ export const reserveSettlementAllocation = mutation({
|
|
|
23
26
|
if (existing) {
|
|
24
27
|
if (existing.currency !== args.currency ||
|
|
25
28
|
existing.paymentIntentId !== args.paymentIntentId ||
|
|
26
|
-
existing.sourceInvoiceId !== args.sourceInvoiceId
|
|
29
|
+
existing.sourceInvoiceId !== args.sourceInvoiceId ||
|
|
30
|
+
(await canonicalFingerprint(existing.usageSource ?? null)) !==
|
|
31
|
+
(await canonicalFingerprint(args.usageSource ?? null)) ||
|
|
32
|
+
(await canonicalFingerprint(existing.creditSource ?? null)) !==
|
|
33
|
+
(await canonicalFingerprint(args.creditSource ?? null)))
|
|
27
34
|
throw new Error("Settlement source identity cannot change.");
|
|
28
35
|
await observeSettlementAllocation(ctx, existing);
|
|
29
36
|
return existing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAChF,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,GAAG,gBAAgB;IACnB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,uBAAuB,CAAC;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IAClD,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC3B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,EAAE;aAC1B,KAAK,CAAC,uBAAuB,CAAC;a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0BAA0B,CACjD,GAAG,EACH,QAAQ,EACR,UAAU,CAAC,KAAK,CACjB,CAAC;YACF,MAAM,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;YAC5C,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,OAAO;YACL,QAAQ;YACR,OAAO;YACP,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -4,6 +4,15 @@ export declare const getSettlementAllocation: import("convex/server").Registered
|
|
|
4
4
|
_creationTime: number;
|
|
5
5
|
_id: import("convex/values").GenericId<"settlementAllocations">;
|
|
6
6
|
adjustmentAmount?: number | undefined;
|
|
7
|
+
creditSource?: {
|
|
8
|
+
creditGrantId: string;
|
|
9
|
+
customerAccount: string;
|
|
10
|
+
livemode: boolean;
|
|
11
|
+
purchaseId: string;
|
|
12
|
+
stripeAccountId: string;
|
|
13
|
+
stripePriceId: string;
|
|
14
|
+
stripeProductId: string;
|
|
15
|
+
} | undefined;
|
|
7
16
|
currency: string;
|
|
8
17
|
gross: number;
|
|
9
18
|
paymentId?: string | undefined;
|
|
@@ -17,6 +26,22 @@ export declare const getSettlementAllocation: import("convex/server").Registered
|
|
|
17
26
|
destinationAccountId: string;
|
|
18
27
|
role: "affiliate" | "other" | "store";
|
|
19
28
|
}[];
|
|
29
|
+
usageSource?: {
|
|
30
|
+
customerAccount: string;
|
|
31
|
+
invoicePaymentId: string;
|
|
32
|
+
livemode: boolean;
|
|
33
|
+
meterId: string;
|
|
34
|
+
model: "included_overage" | "pay_as_you_go";
|
|
35
|
+
period: {
|
|
36
|
+
end: number;
|
|
37
|
+
start: number;
|
|
38
|
+
};
|
|
39
|
+
stripeAccountId: string;
|
|
40
|
+
stripePriceId: string;
|
|
41
|
+
stripeProductId: string;
|
|
42
|
+
subscriptionId: string;
|
|
43
|
+
subscriptionItemId: string;
|
|
44
|
+
} | undefined;
|
|
20
45
|
} | null>>;
|
|
21
46
|
export declare const getCommissionTerm: import("convex/server").RegisteredQuery<"public", {
|
|
22
47
|
subscriptionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/queries.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/queries.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAUlC,CAAC;AACH,eAAO,MAAM,iBAAiB;;;;;;;UAkB5B,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyBnC,CAAC"}
|
|
@@ -3,6 +3,57 @@ export declare const allocationFields: {
|
|
|
3
3
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
4
4
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
5
5
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
6
|
+
usageSource: import("convex/values").VObject<{
|
|
7
|
+
customerAccount: string;
|
|
8
|
+
invoicePaymentId: string;
|
|
9
|
+
livemode: boolean;
|
|
10
|
+
meterId: string;
|
|
11
|
+
model: "included_overage" | "pay_as_you_go";
|
|
12
|
+
period: {
|
|
13
|
+
end: number;
|
|
14
|
+
start: number;
|
|
15
|
+
};
|
|
16
|
+
stripeAccountId: string;
|
|
17
|
+
stripePriceId: string;
|
|
18
|
+
stripeProductId: string;
|
|
19
|
+
subscriptionId: string;
|
|
20
|
+
subscriptionItemId: string;
|
|
21
|
+
} | undefined, {
|
|
22
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
23
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
24
|
+
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
25
|
+
meterId: import("convex/values").VString<string, "required">;
|
|
26
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
27
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
28
|
+
subscriptionId: import("convex/values").VString<string, "required">;
|
|
29
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
30
|
+
invoicePaymentId: import("convex/values").VString<string, "required">;
|
|
31
|
+
period: import("convex/values").VObject<{
|
|
32
|
+
end: number;
|
|
33
|
+
start: number;
|
|
34
|
+
}, {
|
|
35
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
36
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
37
|
+
}, "required", "end" | "start">;
|
|
38
|
+
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>;
|
|
39
|
+
}, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
40
|
+
creditSource: import("convex/values").VObject<{
|
|
41
|
+
creditGrantId: string;
|
|
42
|
+
customerAccount: string;
|
|
43
|
+
livemode: boolean;
|
|
44
|
+
purchaseId: string;
|
|
45
|
+
stripeAccountId: string;
|
|
46
|
+
stripePriceId: string;
|
|
47
|
+
stripeProductId: string;
|
|
48
|
+
} | undefined, {
|
|
49
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
50
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
51
|
+
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
52
|
+
purchaseId: import("convex/values").VString<string, "required">;
|
|
53
|
+
creditGrantId: import("convex/values").VString<string, "required">;
|
|
54
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
55
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
56
|
+
}, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
|
|
6
57
|
gross: import("convex/values").VFloat64<number, "required">;
|
|
7
58
|
currency: import("convex/values").VString<string, "required">;
|
|
8
59
|
processingFee: import("convex/values").VFloat64<number, "required">;
|
|
@@ -25,6 +76,15 @@ export declare const allocationFields: {
|
|
|
25
76
|
};
|
|
26
77
|
export declare const allocationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
27
78
|
adjustmentAmount?: number | undefined;
|
|
79
|
+
creditSource?: {
|
|
80
|
+
creditGrantId: string;
|
|
81
|
+
customerAccount: string;
|
|
82
|
+
livemode: boolean;
|
|
83
|
+
purchaseId: string;
|
|
84
|
+
stripeAccountId: string;
|
|
85
|
+
stripePriceId: string;
|
|
86
|
+
stripeProductId: string;
|
|
87
|
+
} | undefined;
|
|
28
88
|
currency: string;
|
|
29
89
|
gross: number;
|
|
30
90
|
paymentId?: string | undefined;
|
|
@@ -38,10 +98,77 @@ export declare const allocationsTable: import("convex/server").TableDefinition<i
|
|
|
38
98
|
destinationAccountId: string;
|
|
39
99
|
role: "affiliate" | "other" | "store";
|
|
40
100
|
}[];
|
|
101
|
+
usageSource?: {
|
|
102
|
+
customerAccount: string;
|
|
103
|
+
invoicePaymentId: string;
|
|
104
|
+
livemode: boolean;
|
|
105
|
+
meterId: string;
|
|
106
|
+
model: "included_overage" | "pay_as_you_go";
|
|
107
|
+
period: {
|
|
108
|
+
end: number;
|
|
109
|
+
start: number;
|
|
110
|
+
};
|
|
111
|
+
stripeAccountId: string;
|
|
112
|
+
stripePriceId: string;
|
|
113
|
+
stripeProductId: string;
|
|
114
|
+
subscriptionId: string;
|
|
115
|
+
subscriptionItemId: string;
|
|
116
|
+
} | undefined;
|
|
41
117
|
}, {
|
|
42
118
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
43
119
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
44
120
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
121
|
+
usageSource: import("convex/values").VObject<{
|
|
122
|
+
customerAccount: string;
|
|
123
|
+
invoicePaymentId: string;
|
|
124
|
+
livemode: boolean;
|
|
125
|
+
meterId: string;
|
|
126
|
+
model: "included_overage" | "pay_as_you_go";
|
|
127
|
+
period: {
|
|
128
|
+
end: number;
|
|
129
|
+
start: number;
|
|
130
|
+
};
|
|
131
|
+
stripeAccountId: string;
|
|
132
|
+
stripePriceId: string;
|
|
133
|
+
stripeProductId: string;
|
|
134
|
+
subscriptionId: string;
|
|
135
|
+
subscriptionItemId: string;
|
|
136
|
+
} | undefined, {
|
|
137
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
138
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
139
|
+
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
140
|
+
meterId: import("convex/values").VString<string, "required">;
|
|
141
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
142
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
143
|
+
subscriptionId: import("convex/values").VString<string, "required">;
|
|
144
|
+
subscriptionItemId: import("convex/values").VString<string, "required">;
|
|
145
|
+
invoicePaymentId: import("convex/values").VString<string, "required">;
|
|
146
|
+
period: import("convex/values").VObject<{
|
|
147
|
+
end: number;
|
|
148
|
+
start: number;
|
|
149
|
+
}, {
|
|
150
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
151
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
152
|
+
}, "required", "end" | "start">;
|
|
153
|
+
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>;
|
|
154
|
+
}, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
|
|
155
|
+
creditSource: import("convex/values").VObject<{
|
|
156
|
+
creditGrantId: string;
|
|
157
|
+
customerAccount: string;
|
|
158
|
+
livemode: boolean;
|
|
159
|
+
purchaseId: string;
|
|
160
|
+
stripeAccountId: string;
|
|
161
|
+
stripePriceId: string;
|
|
162
|
+
stripeProductId: string;
|
|
163
|
+
} | undefined, {
|
|
164
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
165
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
166
|
+
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
167
|
+
purchaseId: import("convex/values").VString<string, "required">;
|
|
168
|
+
creditGrantId: import("convex/values").VString<string, "required">;
|
|
169
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
170
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
171
|
+
}, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
|
|
45
172
|
gross: import("convex/values").VFloat64<number, "required">;
|
|
46
173
|
currency: import("convex/values").VString<string, "required">;
|
|
47
174
|
processingFee: import("convex/values").VFloat64<number, "required">;
|
|
@@ -61,7 +188,7 @@ export declare const allocationsTable: import("convex/server").TableDefinition<i
|
|
|
61
188
|
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>;
|
|
62
189
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
63
190
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
64
|
-
}, "required", "adjustmentAmount" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers">, {
|
|
191
|
+
}, "required", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "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">, {
|
|
65
192
|
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
66
193
|
}, {}, {}>;
|
|
67
194
|
export declare const commissionFields: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,gMAGzB,CAAC;AACF,eAAO,MAAM,gBAAgB;IAC3B,cAAc;IACd,eAAe;IACf,eAAe;IACf,KAAK;IACL,QAAQ;IACR,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,SAAS;IACT,SAAS;;;;;;;;;;;;;CAOV,CAAC;AACF,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,gMAGzB,CAAC;AACF,eAAO,MAAM,gBAAgB;IAC3B,cAAc;IACd,eAAe;IACf,eAAe;IACf,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeX,YAAY;;;;;;;;;;;;;;;;;IAWZ,KAAK;IACL,QAAQ;IACR,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,SAAS;IACT,SAAS;;;;;;;;;;;;;CAOV,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAG5B,CAAC;AACF,eAAO,MAAM,gBAAgB;IAC3B,cAAc;IACd,IAAI;IACJ,kBAAkB;IAClB,kBAAkB;CACnB,CAAC;AACF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;UAGhC,CAAC;AACF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;UAK+B,CAAC"}
|
|
@@ -6,6 +6,28 @@ export const allocationFields = {
|
|
|
6
6
|
sourceChargeId: v.string(),
|
|
7
7
|
paymentIntentId: v.optional(v.string()),
|
|
8
8
|
sourceInvoiceId: v.optional(v.string()),
|
|
9
|
+
usageSource: v.optional(v.object({
|
|
10
|
+
stripeAccountId: v.string(),
|
|
11
|
+
customerAccount: v.string(),
|
|
12
|
+
livemode: v.boolean(),
|
|
13
|
+
meterId: v.string(),
|
|
14
|
+
stripePriceId: v.string(),
|
|
15
|
+
stripeProductId: v.string(),
|
|
16
|
+
subscriptionId: v.string(),
|
|
17
|
+
subscriptionItemId: v.string(),
|
|
18
|
+
invoicePaymentId: v.string(),
|
|
19
|
+
period: v.object({ start: v.number(), end: v.number() }),
|
|
20
|
+
model: v.union(v.literal("pay_as_you_go"), v.literal("included_overage")),
|
|
21
|
+
})),
|
|
22
|
+
creditSource: v.optional(v.object({
|
|
23
|
+
stripeAccountId: v.string(),
|
|
24
|
+
customerAccount: v.string(),
|
|
25
|
+
livemode: v.boolean(),
|
|
26
|
+
purchaseId: v.string(),
|
|
27
|
+
creditGrantId: v.string(),
|
|
28
|
+
stripePriceId: v.string(),
|
|
29
|
+
stripeProductId: v.string(),
|
|
30
|
+
})),
|
|
9
31
|
gross: v.number(),
|
|
10
32
|
currency: v.string(),
|
|
11
33
|
processingFee: v.number(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/settlement/schema.ts"],"names":[],"mappings":"AAAA,OAAO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|
@@ -19,7 +19,7 @@ export declare const get: import("convex/server").RegisteredQuery<"public", {
|
|
|
19
19
|
subscriptionId?: string | undefined;
|
|
20
20
|
subscriptionJson: string;
|
|
21
21
|
};
|
|
22
|
-
delivery: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
22
|
+
delivery: "canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
23
23
|
} | null>>;
|
|
24
24
|
export declare const read: import("convex/server").RegisteredQuery<"public", {
|
|
25
25
|
paginationOpts: {
|
|
@@ -58,7 +58,7 @@ export declare const read: import("convex/server").RegisteredQuery<"public", {
|
|
|
58
58
|
subscriptionId?: string | undefined;
|
|
59
59
|
subscriptionJson: string;
|
|
60
60
|
};
|
|
61
|
-
delivery: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
61
|
+
delivery: "canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
62
62
|
}[];
|
|
63
63
|
}>>;
|
|
64
64
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -9,7 +9,7 @@ export declare const scopeValidator: import("convex/values").VObject<{
|
|
|
9
9
|
meterId: import("convex/values").VString<string, "required">;
|
|
10
10
|
livemode: import("convex/values").VBoolean<boolean, "required">;
|
|
11
11
|
}, "required", "customerAccount" | "livemode" | "meterId" | "stripeAccountId">;
|
|
12
|
-
export declare const deliveryValidator: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
12
|
+
export declare const deliveryValidator: import("convex/values").VUnion<"canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
13
13
|
export declare const eventFields: {
|
|
14
14
|
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
15
15
|
reservationId: import("convex/values").VId<import("convex/values").GenericId<"usageReservations"> | undefined, "optional">;
|
|
@@ -75,7 +75,7 @@ export declare const outboxFields: {
|
|
|
75
75
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
76
76
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
77
77
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
78
|
-
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
78
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined, [import("convex/values").VLiteral<"usage_canceled", "required">, import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
79
79
|
receipt: import("convex/values").VObject<{
|
|
80
80
|
created: number;
|
|
81
81
|
identifier: string;
|
|
@@ -83,9 +83,10 @@ export declare const outboxFields: {
|
|
|
83
83
|
identifier: import("convex/values").VString<string, "required">;
|
|
84
84
|
created: import("convex/values").VFloat64<number, "required">;
|
|
85
85
|
}, "optional", "created" | "identifier">;
|
|
86
|
+
correctionKey: import("convex/values").VString<string | undefined, "optional">;
|
|
86
87
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
|
|
87
88
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
88
|
-
state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
89
|
+
state: import("convex/values").VUnion<"canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
89
90
|
attempts: import("convex/values").VFloat64<number, "required">;
|
|
90
91
|
nextAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
91
92
|
providerIdentifier: import("convex/values").VString<string, "required">;
|
|
@@ -95,6 +96,7 @@ export declare const outboxDoc: import("convex/values").VObject<{
|
|
|
95
96
|
_creationTime: number;
|
|
96
97
|
_id: import("convex/values").GenericId<"usageOutbox">;
|
|
97
98
|
attempts: number;
|
|
99
|
+
correctionKey?: string | undefined;
|
|
98
100
|
definitionVersion?: 1 | undefined;
|
|
99
101
|
dispatch?: string | undefined;
|
|
100
102
|
eventId: import("convex/values").GenericId<"usageEvents">;
|
|
@@ -105,13 +107,13 @@ export declare const outboxDoc: import("convex/values").VObject<{
|
|
|
105
107
|
nextAttemptAt: number;
|
|
106
108
|
provider?: string | undefined;
|
|
107
109
|
providerIdentifier: string;
|
|
108
|
-
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
110
|
+
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined;
|
|
109
111
|
receipt?: {
|
|
110
112
|
created: number;
|
|
111
113
|
identifier: string;
|
|
112
114
|
} | undefined;
|
|
113
115
|
scopeKey: string;
|
|
114
|
-
state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
116
|
+
state: "canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
115
117
|
workflowId?: string | undefined;
|
|
116
118
|
}, {
|
|
117
119
|
historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -121,7 +123,7 @@ export declare const outboxDoc: import("convex/values").VObject<{
|
|
|
121
123
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
122
124
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
123
125
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
124
|
-
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
126
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined, [import("convex/values").VLiteral<"usage_canceled", "required">, import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
125
127
|
receipt: import("convex/values").VObject<{
|
|
126
128
|
created: number;
|
|
127
129
|
identifier: string;
|
|
@@ -129,18 +131,20 @@ export declare const outboxDoc: import("convex/values").VObject<{
|
|
|
129
131
|
identifier: import("convex/values").VString<string, "required">;
|
|
130
132
|
created: import("convex/values").VFloat64<number, "required">;
|
|
131
133
|
}, "optional", "created" | "identifier">;
|
|
134
|
+
correctionKey: import("convex/values").VString<string | undefined, "optional">;
|
|
132
135
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
|
|
133
136
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
134
|
-
state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
137
|
+
state: import("convex/values").VUnion<"canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
135
138
|
attempts: import("convex/values").VFloat64<number, "required">;
|
|
136
139
|
nextAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
137
140
|
providerIdentifier: import("convex/values").VString<string, "required">;
|
|
138
141
|
dispatch: import("convex/values").VString<string | undefined, "optional">;
|
|
139
142
|
_id: import("convex/values").VId<import("convex/values").GenericId<"usageOutbox">, "required">;
|
|
140
143
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
141
|
-
}, "required", "_creationTime" | "_id" | "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">;
|
|
144
|
+
}, "required", "_creationTime" | "_id" | "attempts" | "correctionKey" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">;
|
|
142
145
|
export declare const usageOutboxTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
143
146
|
attempts: number;
|
|
147
|
+
correctionKey?: string | undefined;
|
|
144
148
|
definitionVersion?: 1 | undefined;
|
|
145
149
|
dispatch?: string | undefined;
|
|
146
150
|
eventId: import("convex/values").GenericId<"usageEvents">;
|
|
@@ -151,13 +155,13 @@ export declare const usageOutboxTable: import("convex/server").TableDefinition<i
|
|
|
151
155
|
nextAttemptAt: number;
|
|
152
156
|
provider?: string | undefined;
|
|
153
157
|
providerIdentifier: string;
|
|
154
|
-
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
158
|
+
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined;
|
|
155
159
|
receipt?: {
|
|
156
160
|
created: number;
|
|
157
161
|
identifier: string;
|
|
158
162
|
} | undefined;
|
|
159
163
|
scopeKey: string;
|
|
160
|
-
state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
164
|
+
state: "canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
|
|
161
165
|
workflowId?: string | undefined;
|
|
162
166
|
}, {
|
|
163
167
|
historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -167,7 +171,7 @@ export declare const usageOutboxTable: import("convex/server").TableDefinition<i
|
|
|
167
171
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
168
172
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
169
173
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
170
|
-
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
174
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined, [import("convex/values").VLiteral<"usage_canceled", "required">, import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
|
|
171
175
|
receipt: import("convex/values").VObject<{
|
|
172
176
|
created: number;
|
|
173
177
|
identifier: string;
|
|
@@ -175,14 +179,15 @@ export declare const usageOutboxTable: import("convex/server").TableDefinition<i
|
|
|
175
179
|
identifier: import("convex/values").VString<string, "required">;
|
|
176
180
|
created: import("convex/values").VFloat64<number, "required">;
|
|
177
181
|
}, "optional", "created" | "identifier">;
|
|
182
|
+
correctionKey: import("convex/values").VString<string | undefined, "optional">;
|
|
178
183
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
|
|
179
184
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
180
|
-
state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
185
|
+
state: import("convex/values").VUnion<"canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
181
186
|
attempts: import("convex/values").VFloat64<number, "required">;
|
|
182
187
|
nextAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
183
188
|
providerIdentifier: import("convex/values").VString<string, "required">;
|
|
184
189
|
dispatch: import("convex/values").VString<string | undefined, "optional">;
|
|
185
|
-
}, "required", "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
|
|
190
|
+
}, "required", "attempts" | "correctionKey" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
|
|
186
191
|
by_event: ["eventId", "_creationTime"];
|
|
187
192
|
by_provider_identifier: ["providerIdentifier", "_creationTime"];
|
|
188
193
|
by_scope_state: ["scopeKey", "state", "_creationTime"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/usage/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;8EAKzB,CAAC;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/usage/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;8EAKzB,CAAC;AACH,eAAO,MAAM,iBAAiB,uiBAQ7B,CAAC;AACF,eAAO,MAAM,WAAW;IACtB,cAAc;IACd,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,UAAU;IACV,UAAU;CACX,CAAC;AACF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;wKAInB,CAAC;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;UAQwB,CAAC;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+UAIpB,CAAC;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIoB,CAAC;AAClD,eAAO,MAAM,uBAAuB;;;;;;;;UAGF,CAAC;AAInC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsBc,CAAC"}
|