@fantastic.dev/better-stripe 0.66.0 → 0.67.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 +22 -0
- package/README.md +17 -20
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +126 -12
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +79 -22
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +158 -44
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +63 -6
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/recoveryWorkflow/provider.fixture.d.ts +21 -0
- package/dist/client/recoveryWorkflow/provider.fixture.d.ts.map +1 -0
- package/dist/client/recoveryWorkflow/provider.fixture.js +125 -0
- package/dist/client/recoveryWorkflow/provider.fixture.js.map +1 -0
- package/dist/client/settlement/authorization.d.ts.map +1 -1
- package/dist/client/settlement/authorization.fixture.d.ts +10 -0
- package/dist/client/settlement/authorization.fixture.d.ts.map +1 -1
- package/dist/client/settlement/authorization.js +1 -0
- package/dist/client/settlement/authorization.js.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 +3 -0
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/settlement/settleSale.d.ts +2 -0
- package/dist/client/settlement/settleSale.d.ts.map +1 -1
- package/dist/client/settlement/settleSale.js +4 -0
- package/dist/client/settlement/settleSale.js.map +1 -1
- package/dist/client/usage/observationClient.d.ts +2 -2
- package/dist/client/usage/observationClient.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +25 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/mutations.d.ts +27 -27
- package/dist/component/balanceFunding/queries.d.ts +1 -1
- package/dist/component/earnings/triggers.d.ts +36 -6
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/helpers.d.ts +5 -0
- package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/mutations.d.ts +5 -0
- package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/mutations.js +2 -0
- package/dist/component/recoveryWorkflow/mutations.js.map +1 -1
- package/dist/component/recoveryWorkflow/queries.d.ts +10 -0
- package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/schema.d.ts +114 -10
- package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -1
- package/dist/component/schema.d.ts +63 -6
- package/dist/component/settlement/mutations.d.ts +10 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +3 -0
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +5 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/schema.d.ts +24 -1
- package/dist/component/settlement/schema.d.ts.map +1 -1
- package/dist/component/settlement/schema.js +5 -0
- package/dist/component/settlement/schema.js.map +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +79 -22
- package/dist/component/usage/allowance.fixtures.d.ts.map +1 -1
- package/dist/component/usageCredits/accounting.fixtures.d.ts +63 -6
- package/dist/component/usageCredits/accounting.fixtures.d.ts.map +1 -1
- package/dist/shared/settlementPolicyContext.d.ts +10 -0
- package/dist/shared/settlementPolicyContext.d.ts.map +1 -0
- package/dist/shared/settlementPolicyContext.js +40 -0
- package/dist/shared/settlementPolicyContext.js.map +1 -0
- package/docs/README.md +2 -1
- package/docs/metered-usage.md +174 -356
- package/docs/metering-setup.md +175 -168
- package/docs/settlement.md +38 -0
- package/docs/usage-catalog.md +1 -1
- package/docs/usage-ledger.md +9 -8
- package/docs/usage-rollout.md +147 -0
- package/package.json +3 -2
- package/src/client/index.ts +1 -0
- package/src/client/recoveryWorkflow/provider.fixture.ts +143 -0
- package/src/client/recoveryWorkflow/provider.test.ts +83 -140
- package/src/client/settlement/authorization.ts +1 -0
- package/src/client/settlement/execution.ts +7 -0
- package/src/client/settlement/policy-context.test.ts +277 -0
- package/src/client/settlement/settleSale.ts +12 -0
- package/src/component/_generated/component.ts +25 -0
- package/src/component/recoveryWorkflow/mutations.ts +2 -0
- package/src/component/settlement/mutations.ts +6 -0
- package/src/component/settlement/schema.ts +7 -0
- package/src/component/tsconfig.json +5 -0
- package/src/shared/settlementPolicyContext.ts +62 -0
|
@@ -26,6 +26,11 @@ export declare const bindingFields: {
|
|
|
26
26
|
paymentId?: string | undefined;
|
|
27
27
|
paymentIntentId?: string | undefined;
|
|
28
28
|
platformNet: number;
|
|
29
|
+
policyContext?: {
|
|
30
|
+
fields: Record<string, string>;
|
|
31
|
+
namespace: string;
|
|
32
|
+
version: 1;
|
|
33
|
+
} | undefined;
|
|
29
34
|
processingFee: number;
|
|
30
35
|
sourceChargeId: string;
|
|
31
36
|
sourceInvoiceId?: string | undefined;
|
|
@@ -51,6 +56,15 @@ export declare const bindingFields: {
|
|
|
51
56
|
subscriptionItemId: string;
|
|
52
57
|
} | undefined;
|
|
53
58
|
} | undefined, {
|
|
59
|
+
policyContext: import("convex/values").VObject<{
|
|
60
|
+
fields: Record<string, string>;
|
|
61
|
+
namespace: string;
|
|
62
|
+
version: 1;
|
|
63
|
+
} | undefined, {
|
|
64
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
65
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
66
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
67
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
54
68
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
55
69
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
56
70
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -124,7 +138,7 @@ export declare const bindingFields: {
|
|
|
124
138
|
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>;
|
|
125
139
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
126
140
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
127
|
-
}, "optional", "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"
|
|
141
|
+
}, "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}`>;
|
|
128
142
|
};
|
|
129
143
|
export declare const startFields: {
|
|
130
144
|
accountId: import("convex/values").VString<string, "required">;
|
|
@@ -154,6 +168,11 @@ export declare const startFields: {
|
|
|
154
168
|
paymentId?: string | undefined;
|
|
155
169
|
paymentIntentId?: string | undefined;
|
|
156
170
|
platformNet: number;
|
|
171
|
+
policyContext?: {
|
|
172
|
+
fields: Record<string, string>;
|
|
173
|
+
namespace: string;
|
|
174
|
+
version: 1;
|
|
175
|
+
} | undefined;
|
|
157
176
|
processingFee: number;
|
|
158
177
|
sourceChargeId: string;
|
|
159
178
|
sourceInvoiceId?: string | undefined;
|
|
@@ -179,6 +198,15 @@ export declare const startFields: {
|
|
|
179
198
|
subscriptionItemId: string;
|
|
180
199
|
} | undefined;
|
|
181
200
|
} | undefined, {
|
|
201
|
+
policyContext: import("convex/values").VObject<{
|
|
202
|
+
fields: Record<string, string>;
|
|
203
|
+
namespace: string;
|
|
204
|
+
version: 1;
|
|
205
|
+
} | undefined, {
|
|
206
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
207
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
208
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
209
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
182
210
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
183
211
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
184
212
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -252,7 +280,7 @@ export declare const startFields: {
|
|
|
252
280
|
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>;
|
|
253
281
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
254
282
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
255
|
-
}, "optional", "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"
|
|
283
|
+
}, "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}`>;
|
|
256
284
|
requestKey: import("convex/values").VString<string, "required">;
|
|
257
285
|
};
|
|
258
286
|
export declare const refFields: {
|
|
@@ -292,6 +320,11 @@ export declare const operationFields: {
|
|
|
292
320
|
paymentId?: string | undefined;
|
|
293
321
|
paymentIntentId?: string | undefined;
|
|
294
322
|
platformNet: number;
|
|
323
|
+
policyContext?: {
|
|
324
|
+
fields: Record<string, string>;
|
|
325
|
+
namespace: string;
|
|
326
|
+
version: 1;
|
|
327
|
+
} | undefined;
|
|
295
328
|
processingFee: number;
|
|
296
329
|
sourceChargeId: string;
|
|
297
330
|
sourceInvoiceId?: string | undefined;
|
|
@@ -317,6 +350,15 @@ export declare const operationFields: {
|
|
|
317
350
|
subscriptionItemId: string;
|
|
318
351
|
} | undefined;
|
|
319
352
|
} | undefined, {
|
|
353
|
+
policyContext: import("convex/values").VObject<{
|
|
354
|
+
fields: Record<string, string>;
|
|
355
|
+
namespace: string;
|
|
356
|
+
version: 1;
|
|
357
|
+
} | undefined, {
|
|
358
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
359
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
360
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
361
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
320
362
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
321
363
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
322
364
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -390,7 +432,7 @@ export declare const operationFields: {
|
|
|
390
432
|
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>;
|
|
391
433
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
392
434
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
393
|
-
}, "optional", "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"
|
|
435
|
+
}, "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}`>;
|
|
394
436
|
version: import("convex/values").VFloat64<number, "required">;
|
|
395
437
|
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
396
438
|
sourceId: import("convex/values").VString<string, "required">;
|
|
@@ -421,6 +463,11 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
|
|
|
421
463
|
paymentId?: string | undefined;
|
|
422
464
|
paymentIntentId?: string | undefined;
|
|
423
465
|
platformNet: number;
|
|
466
|
+
policyContext?: {
|
|
467
|
+
fields: Record<string, string>;
|
|
468
|
+
namespace: string;
|
|
469
|
+
version: 1;
|
|
470
|
+
} | undefined;
|
|
424
471
|
processingFee: number;
|
|
425
472
|
sourceChargeId: string;
|
|
426
473
|
sourceInvoiceId?: string | undefined;
|
|
@@ -493,6 +540,11 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
|
|
|
493
540
|
paymentId?: string | undefined;
|
|
494
541
|
paymentIntentId?: string | undefined;
|
|
495
542
|
platformNet: number;
|
|
543
|
+
policyContext?: {
|
|
544
|
+
fields: Record<string, string>;
|
|
545
|
+
namespace: string;
|
|
546
|
+
version: 1;
|
|
547
|
+
} | undefined;
|
|
496
548
|
processingFee: number;
|
|
497
549
|
sourceChargeId: string;
|
|
498
550
|
sourceInvoiceId?: string | undefined;
|
|
@@ -518,6 +570,15 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
|
|
|
518
570
|
subscriptionItemId: string;
|
|
519
571
|
} | undefined;
|
|
520
572
|
} | undefined, {
|
|
573
|
+
policyContext: import("convex/values").VObject<{
|
|
574
|
+
fields: Record<string, string>;
|
|
575
|
+
namespace: string;
|
|
576
|
+
version: 1;
|
|
577
|
+
} | undefined, {
|
|
578
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
579
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
580
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
581
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
521
582
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
522
583
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
523
584
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -591,7 +652,7 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
|
|
|
591
652
|
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>;
|
|
592
653
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
593
654
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
594
|
-
}, "optional", "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"
|
|
655
|
+
}, "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}`>;
|
|
595
656
|
version: import("convex/values").VFloat64<number, "required">;
|
|
596
657
|
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
597
658
|
sourceId: import("convex/values").VString<string, "required">;
|
|
@@ -602,7 +663,7 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
|
|
|
602
663
|
activePhase: import("convex/values").VUnion<"execute" | "reconcile" | undefined, [import("convex/values").VLiteral<"execute", "required">, import("convex/values").VLiteral<"reconcile", "required">], "optional", never>;
|
|
603
664
|
resumeQueued: import("convex/values").VBoolean<boolean, "required">;
|
|
604
665
|
outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
|
|
605
|
-
}, "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.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"
|
|
666
|
+
}, "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}`>, {
|
|
606
667
|
by_group: ["groupKey", "_creationTime"];
|
|
607
668
|
by_source: ["sourceKind", "sourceId", "_creationTime"];
|
|
608
669
|
}, {}, {}>;
|
|
@@ -625,6 +686,11 @@ export declare const requestsTable: import("convex/server").TableDefinition<impo
|
|
|
625
686
|
paymentId?: string | undefined;
|
|
626
687
|
paymentIntentId?: string | undefined;
|
|
627
688
|
platformNet: number;
|
|
689
|
+
policyContext?: {
|
|
690
|
+
fields: Record<string, string>;
|
|
691
|
+
namespace: string;
|
|
692
|
+
version: 1;
|
|
693
|
+
} | undefined;
|
|
628
694
|
processingFee: number;
|
|
629
695
|
sourceChargeId: string;
|
|
630
696
|
sourceInvoiceId?: string | undefined;
|
|
@@ -683,6 +749,11 @@ export declare const requestsTable: import("convex/server").TableDefinition<impo
|
|
|
683
749
|
paymentId?: string | undefined;
|
|
684
750
|
paymentIntentId?: string | undefined;
|
|
685
751
|
platformNet: number;
|
|
752
|
+
policyContext?: {
|
|
753
|
+
fields: Record<string, string>;
|
|
754
|
+
namespace: string;
|
|
755
|
+
version: 1;
|
|
756
|
+
} | undefined;
|
|
686
757
|
processingFee: number;
|
|
687
758
|
sourceChargeId: string;
|
|
688
759
|
sourceInvoiceId?: string | undefined;
|
|
@@ -746,6 +817,11 @@ export declare const requestsTable: import("convex/server").TableDefinition<impo
|
|
|
746
817
|
paymentId?: string | undefined;
|
|
747
818
|
paymentIntentId?: string | undefined;
|
|
748
819
|
platformNet: number;
|
|
820
|
+
policyContext?: {
|
|
821
|
+
fields: Record<string, string>;
|
|
822
|
+
namespace: string;
|
|
823
|
+
version: 1;
|
|
824
|
+
} | undefined;
|
|
749
825
|
processingFee: number;
|
|
750
826
|
sourceChargeId: string;
|
|
751
827
|
sourceInvoiceId?: string | undefined;
|
|
@@ -771,6 +847,15 @@ export declare const requestsTable: import("convex/server").TableDefinition<impo
|
|
|
771
847
|
subscriptionItemId: string;
|
|
772
848
|
} | undefined;
|
|
773
849
|
} | undefined, {
|
|
850
|
+
policyContext: import("convex/values").VObject<{
|
|
851
|
+
fields: Record<string, string>;
|
|
852
|
+
namespace: string;
|
|
853
|
+
version: 1;
|
|
854
|
+
} | undefined, {
|
|
855
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
856
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
857
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
858
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
774
859
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
775
860
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
776
861
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -844,10 +929,10 @@ export declare const requestsTable: import("convex/server").TableDefinition<impo
|
|
|
844
929
|
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>;
|
|
845
930
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
846
931
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
847
|
-
}, "optional", "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"
|
|
848
|
-
}, "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.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"
|
|
932
|
+
}, "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}`>;
|
|
933
|
+
}, "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}`>;
|
|
849
934
|
operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
|
|
850
|
-
}, "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.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"
|
|
935
|
+
}, "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}`>, {
|
|
851
936
|
by_key: ["requestKey", "_creationTime"];
|
|
852
937
|
}, {}, {}>;
|
|
853
938
|
export declare const operationDoc: import("convex/values").VObject<{
|
|
@@ -871,6 +956,11 @@ export declare const operationDoc: import("convex/values").VObject<{
|
|
|
871
956
|
paymentId?: string | undefined;
|
|
872
957
|
paymentIntentId?: string | undefined;
|
|
873
958
|
platformNet: number;
|
|
959
|
+
policyContext?: {
|
|
960
|
+
fields: Record<string, string>;
|
|
961
|
+
namespace: string;
|
|
962
|
+
version: 1;
|
|
963
|
+
} | undefined;
|
|
874
964
|
processingFee: number;
|
|
875
965
|
sourceChargeId: string;
|
|
876
966
|
sourceInvoiceId?: string | undefined;
|
|
@@ -943,6 +1033,11 @@ export declare const operationDoc: import("convex/values").VObject<{
|
|
|
943
1033
|
paymentId?: string | undefined;
|
|
944
1034
|
paymentIntentId?: string | undefined;
|
|
945
1035
|
platformNet: number;
|
|
1036
|
+
policyContext?: {
|
|
1037
|
+
fields: Record<string, string>;
|
|
1038
|
+
namespace: string;
|
|
1039
|
+
version: 1;
|
|
1040
|
+
} | undefined;
|
|
946
1041
|
processingFee: number;
|
|
947
1042
|
sourceChargeId: string;
|
|
948
1043
|
sourceInvoiceId?: string | undefined;
|
|
@@ -968,6 +1063,15 @@ export declare const operationDoc: import("convex/values").VObject<{
|
|
|
968
1063
|
subscriptionItemId: string;
|
|
969
1064
|
} | undefined;
|
|
970
1065
|
} | undefined, {
|
|
1066
|
+
policyContext: import("convex/values").VObject<{
|
|
1067
|
+
fields: Record<string, string>;
|
|
1068
|
+
namespace: string;
|
|
1069
|
+
version: 1;
|
|
1070
|
+
} | undefined, {
|
|
1071
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
1072
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
1073
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
1074
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
971
1075
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
972
1076
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
973
1077
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -1041,7 +1145,7 @@ export declare const operationDoc: import("convex/values").VObject<{
|
|
|
1041
1145
|
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>;
|
|
1042
1146
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
1043
1147
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1044
|
-
}, "optional", "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"
|
|
1148
|
+
}, "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}`>;
|
|
1045
1149
|
version: import("convex/values").VFloat64<number, "required">;
|
|
1046
1150
|
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
1047
1151
|
sourceId: import("convex/values").VString<string, "required">;
|
|
@@ -1054,7 +1158,7 @@ export declare const operationDoc: import("convex/values").VObject<{
|
|
|
1054
1158
|
outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
|
|
1055
1159
|
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
|
|
1056
1160
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
1057
|
-
}, "required", "_creationTime" | "_id" | "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.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"
|
|
1161
|
+
}, "required", "_creationTime" | "_id" | "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}`>;
|
|
1058
1162
|
export declare const statusFields: {
|
|
1059
1163
|
accountId: import("convex/values").VString<string, "required">;
|
|
1060
1164
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzB,CAAC;AACF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+C,CAAC;AACxE,eAAO,MAAM,SAAS;;;;;;;CAKrB,CAAC;AACF,eAAO,MAAM,KAAK,kMAAwD,CAAC;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEqB,CAAC;AAClD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIQ,CAAC;AACnC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;orDAIvB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;CAOxB,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;qKAAyB,CAAC;AACjD,eAAO,MAAM,QAAQ;;;;;;;;iDAInB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;iDAItB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+OAA6C,CAAC;AACtE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAcnB,CAAC"}
|
|
@@ -1402,6 +1402,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1402
1402
|
paymentId?: string | undefined;
|
|
1403
1403
|
paymentIntentId?: string | undefined;
|
|
1404
1404
|
platformNet: number;
|
|
1405
|
+
policyContext?: {
|
|
1406
|
+
fields: Record<string, string>;
|
|
1407
|
+
namespace: string;
|
|
1408
|
+
version: 1;
|
|
1409
|
+
} | undefined;
|
|
1405
1410
|
processingFee: number;
|
|
1406
1411
|
sourceChargeId: string;
|
|
1407
1412
|
sourceInvoiceId?: string | undefined;
|
|
@@ -1474,6 +1479,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1474
1479
|
paymentId?: string | undefined;
|
|
1475
1480
|
paymentIntentId?: string | undefined;
|
|
1476
1481
|
platformNet: number;
|
|
1482
|
+
policyContext?: {
|
|
1483
|
+
fields: Record<string, string>;
|
|
1484
|
+
namespace: string;
|
|
1485
|
+
version: 1;
|
|
1486
|
+
} | undefined;
|
|
1477
1487
|
processingFee: number;
|
|
1478
1488
|
sourceChargeId: string;
|
|
1479
1489
|
sourceInvoiceId?: string | undefined;
|
|
@@ -1499,6 +1509,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1499
1509
|
subscriptionItemId: string;
|
|
1500
1510
|
} | undefined;
|
|
1501
1511
|
} | undefined, {
|
|
1512
|
+
policyContext: import("convex/values").VObject<{
|
|
1513
|
+
fields: Record<string, string>;
|
|
1514
|
+
namespace: string;
|
|
1515
|
+
version: 1;
|
|
1516
|
+
} | undefined, {
|
|
1517
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
1518
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
1519
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
1520
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
1502
1521
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
1503
1522
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1504
1523
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -1572,7 +1591,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1572
1591
|
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>;
|
|
1573
1592
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
1574
1593
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1575
|
-
}, "optional", "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"
|
|
1594
|
+
}, "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}`>;
|
|
1576
1595
|
version: import("convex/values").VFloat64<number, "required">;
|
|
1577
1596
|
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
1578
1597
|
sourceId: import("convex/values").VString<string, "required">;
|
|
@@ -1583,7 +1602,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1583
1602
|
activePhase: import("convex/values").VUnion<"execute" | "reconcile" | undefined, [import("convex/values").VLiteral<"execute", "required">, import("convex/values").VLiteral<"reconcile", "required">], "optional", never>;
|
|
1584
1603
|
resumeQueued: import("convex/values").VBoolean<boolean, "required">;
|
|
1585
1604
|
outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
|
|
1586
|
-
}, "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.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"
|
|
1605
|
+
}, "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}`>, {
|
|
1587
1606
|
by_group: ["groupKey", "_creationTime"];
|
|
1588
1607
|
by_source: ["sourceKind", "sourceId", "_creationTime"];
|
|
1589
1608
|
}, {}, {}>;
|
|
@@ -1606,6 +1625,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1606
1625
|
paymentId?: string | undefined;
|
|
1607
1626
|
paymentIntentId?: string | undefined;
|
|
1608
1627
|
platformNet: number;
|
|
1628
|
+
policyContext?: {
|
|
1629
|
+
fields: Record<string, string>;
|
|
1630
|
+
namespace: string;
|
|
1631
|
+
version: 1;
|
|
1632
|
+
} | undefined;
|
|
1609
1633
|
processingFee: number;
|
|
1610
1634
|
sourceChargeId: string;
|
|
1611
1635
|
sourceInvoiceId?: string | undefined;
|
|
@@ -1664,6 +1688,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1664
1688
|
paymentId?: string | undefined;
|
|
1665
1689
|
paymentIntentId?: string | undefined;
|
|
1666
1690
|
platformNet: number;
|
|
1691
|
+
policyContext?: {
|
|
1692
|
+
fields: Record<string, string>;
|
|
1693
|
+
namespace: string;
|
|
1694
|
+
version: 1;
|
|
1695
|
+
} | undefined;
|
|
1667
1696
|
processingFee: number;
|
|
1668
1697
|
sourceChargeId: string;
|
|
1669
1698
|
sourceInvoiceId?: string | undefined;
|
|
@@ -1727,6 +1756,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1727
1756
|
paymentId?: string | undefined;
|
|
1728
1757
|
paymentIntentId?: string | undefined;
|
|
1729
1758
|
platformNet: number;
|
|
1759
|
+
policyContext?: {
|
|
1760
|
+
fields: Record<string, string>;
|
|
1761
|
+
namespace: string;
|
|
1762
|
+
version: 1;
|
|
1763
|
+
} | undefined;
|
|
1730
1764
|
processingFee: number;
|
|
1731
1765
|
sourceChargeId: string;
|
|
1732
1766
|
sourceInvoiceId?: string | undefined;
|
|
@@ -1752,6 +1786,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1752
1786
|
subscriptionItemId: string;
|
|
1753
1787
|
} | undefined;
|
|
1754
1788
|
} | undefined, {
|
|
1789
|
+
policyContext: import("convex/values").VObject<{
|
|
1790
|
+
fields: Record<string, string>;
|
|
1791
|
+
namespace: string;
|
|
1792
|
+
version: 1;
|
|
1793
|
+
} | undefined, {
|
|
1794
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
1795
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
1796
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
1797
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
1755
1798
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
1756
1799
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1757
1800
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -1825,10 +1868,10 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1825
1868
|
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>;
|
|
1826
1869
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
1827
1870
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1828
|
-
}, "optional", "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"
|
|
1829
|
-
}, "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.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"
|
|
1871
|
+
}, "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}`>;
|
|
1872
|
+
}, "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}`>;
|
|
1830
1873
|
operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
|
|
1831
|
-
}, "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.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"
|
|
1874
|
+
}, "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}`>, {
|
|
1832
1875
|
by_key: ["requestKey", "_creationTime"];
|
|
1833
1876
|
}, {}, {}>;
|
|
1834
1877
|
balanceFundingPreparations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -3641,6 +3684,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
3641
3684
|
paymentId?: string | undefined;
|
|
3642
3685
|
paymentIntentId?: string | undefined;
|
|
3643
3686
|
platformNet: number;
|
|
3687
|
+
policyContext?: {
|
|
3688
|
+
fields: Record<string, string>;
|
|
3689
|
+
namespace: string;
|
|
3690
|
+
version: 1;
|
|
3691
|
+
} | undefined;
|
|
3644
3692
|
processingFee: number;
|
|
3645
3693
|
sourceChargeId: string;
|
|
3646
3694
|
sourceInvoiceId?: string | undefined;
|
|
@@ -3666,6 +3714,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
3666
3714
|
subscriptionItemId: string;
|
|
3667
3715
|
} | undefined;
|
|
3668
3716
|
}, {
|
|
3717
|
+
policyContext: import("convex/values").VObject<{
|
|
3718
|
+
fields: Record<string, string>;
|
|
3719
|
+
namespace: string;
|
|
3720
|
+
version: 1;
|
|
3721
|
+
} | undefined, {
|
|
3722
|
+
namespace: import("convex/values").VString<string, "required">;
|
|
3723
|
+
version: import("convex/values").VLiteral<1, "required">;
|
|
3724
|
+
fields: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
3725
|
+
}, "optional", "fields" | "namespace" | "version" | `fields.${string}`>;
|
|
3669
3726
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
3670
3727
|
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
3671
3728
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -3739,7 +3796,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
3739
3796
|
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>;
|
|
3740
3797
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
3741
3798
|
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
3742
|
-
}, "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"
|
|
3799
|
+
}, "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}`>, {
|
|
3743
3800
|
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
3744
3801
|
}, {}, {}>;
|
|
3745
3802
|
commissionTerms: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -14,6 +14,11 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
|
|
|
14
14
|
paymentId?: string | undefined;
|
|
15
15
|
paymentIntentId?: string | undefined;
|
|
16
16
|
platformNet: number;
|
|
17
|
+
policyContext?: {
|
|
18
|
+
fields: Record<string, string>;
|
|
19
|
+
namespace: string;
|
|
20
|
+
version: 1;
|
|
21
|
+
} | undefined;
|
|
17
22
|
processingFee: number;
|
|
18
23
|
sourceChargeId: string;
|
|
19
24
|
sourceInvoiceId?: string | undefined;
|
|
@@ -56,6 +61,11 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
|
|
|
56
61
|
paymentId?: string | undefined;
|
|
57
62
|
paymentIntentId?: string | undefined;
|
|
58
63
|
platformNet: number;
|
|
64
|
+
policyContext?: {
|
|
65
|
+
fields: Record<string, string>;
|
|
66
|
+
namespace: string;
|
|
67
|
+
version: 1;
|
|
68
|
+
} | undefined;
|
|
59
69
|
processingFee: number;
|
|
60
70
|
sourceChargeId: string;
|
|
61
71
|
sourceInvoiceId?: 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":"AAmBA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DtC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GA2DjC,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;GA8CtC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { policyContextBinding, assertPolicyContextMatches, } from "../../shared/settlementPolicyContext.js";
|
|
1
2
|
import { canonicalFingerprint } from "../operationEvidence/canonical.js";
|
|
2
3
|
import { observeSettlementAllocation } from "../financialObservations/settlement.js";
|
|
3
4
|
import { paginator } from "convex-helpers/server/pagination";
|
|
@@ -17,6 +18,7 @@ export const reserveSettlementAllocation = mutation({
|
|
|
17
18
|
args: allocationFields,
|
|
18
19
|
returns: doc,
|
|
19
20
|
handler: async (ctx, args) => {
|
|
21
|
+
policyContextBinding(args.policyContext);
|
|
20
22
|
if (args.usageSource && args.creditSource)
|
|
21
23
|
throw new Error("Settlement cannot combine invoice and credit purchase sources");
|
|
22
24
|
const existing = await ctx.db
|
|
@@ -24,6 +26,7 @@ export const reserveSettlementAllocation = mutation({
|
|
|
24
26
|
.withIndex("by_source_charge", (q) => q.eq("sourceChargeId", args.sourceChargeId))
|
|
25
27
|
.first();
|
|
26
28
|
if (existing) {
|
|
29
|
+
assertPolicyContextMatches(existing.policyContext, args.policyContext);
|
|
27
30
|
if (existing.currency !== args.currency ||
|
|
28
31
|
existing.paymentIntentId !== args.paymentIntentId ||
|
|
29
32
|
existing.sourceInvoiceId !== args.sourceInvoiceId ||
|