@fantastic.dev/better-stripe 0.45.2 → 0.47.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +46 -0
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +39 -16
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +78 -32
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +23 -0
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/connect/refundSync.d.ts +32 -0
  12. package/dist/client/connect/refundSync.d.ts.map +1 -0
  13. package/dist/client/connect/refundSync.js +61 -0
  14. package/dist/client/connect/refundSync.js.map +1 -0
  15. package/dist/client/connect/refundSyncValidation.d.ts +16 -0
  16. package/dist/client/connect/refundSyncValidation.d.ts.map +1 -0
  17. package/dist/client/connect/refundSyncValidation.js +87 -0
  18. package/dist/client/connect/refundSyncValidation.js.map +1 -0
  19. package/dist/client/index.d.ts +54 -1
  20. package/dist/client/index.d.ts.map +1 -1
  21. package/dist/client/index.js +10 -3
  22. package/dist/client/index.js.map +1 -1
  23. package/dist/client/types/triggers.d.ts +3 -2
  24. package/dist/client/types/triggers.d.ts.map +1 -1
  25. package/dist/client/webhooks/helpers.d.ts.map +1 -1
  26. package/dist/client/webhooks/helpers.js +1 -0
  27. package/dist/client/webhooks/helpers.js.map +1 -1
  28. package/dist/client/webhooks/refundReconciliation.d.ts +10 -0
  29. package/dist/client/webhooks/refundReconciliation.d.ts.map +1 -0
  30. package/dist/client/webhooks/refundReconciliation.js +41 -0
  31. package/dist/client/webhooks/refundReconciliation.js.map +1 -0
  32. package/dist/client/webhooks/refundReconciliationValidators.d.ts +68 -0
  33. package/dist/client/webhooks/refundReconciliationValidators.d.ts.map +1 -0
  34. package/dist/client/webhooks/refundReconciliationValidators.js +11 -0
  35. package/dist/client/webhooks/refundReconciliationValidators.js.map +1 -0
  36. package/dist/component/_generated/api.d.ts +12 -0
  37. package/dist/component/_generated/api.d.ts.map +1 -1
  38. package/dist/component/_generated/api.js.map +1 -1
  39. package/dist/component/_generated/component.d.ts +67 -0
  40. package/dist/component/_generated/component.d.ts.map +1 -1
  41. package/dist/component/balanceFunding/mutations.d.ts +27 -27
  42. package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
  43. package/dist/component/connect/mutations.d.ts.map +1 -1
  44. package/dist/component/connect/mutations.js +2 -53
  45. package/dist/component/connect/mutations.js.map +1 -1
  46. package/dist/component/connect/refundWrites.d.ts +6 -0
  47. package/dist/component/connect/refundWrites.d.ts.map +1 -0
  48. package/dist/component/connect/refundWrites.js +56 -0
  49. package/dist/component/connect/refundWrites.js.map +1 -0
  50. package/dist/component/earnings/triggers.d.ts +46 -0
  51. package/dist/component/earnings/triggers.d.ts.map +1 -1
  52. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  53. package/dist/component/refundHistory/originalSeller.d.ts +1 -1
  54. package/dist/component/refundHistory/originalSeller.d.ts.map +1 -1
  55. package/dist/component/refundHistory/originalSeller.js.map +1 -1
  56. package/dist/component/refundSync/helpers.d.ts +43 -0
  57. package/dist/component/refundSync/helpers.d.ts.map +1 -0
  58. package/dist/component/refundSync/helpers.js +71 -0
  59. package/dist/component/refundSync/helpers.js.map +1 -0
  60. package/dist/component/refundSync/mutations.d.ts +56 -0
  61. package/dist/component/refundSync/mutations.d.ts.map +1 -0
  62. package/dist/component/refundSync/mutations.js +113 -0
  63. package/dist/component/refundSync/mutations.js.map +1 -0
  64. package/dist/component/refundSync/queries.d.ts +12 -0
  65. package/dist/component/refundSync/queries.d.ts.map +1 -0
  66. package/dist/component/refundSync/queries.js +10 -0
  67. package/dist/component/refundSync/queries.js.map +1 -0
  68. package/dist/component/refundSync/routing.d.ts +8 -0
  69. package/dist/component/refundSync/routing.d.ts.map +1 -0
  70. package/dist/component/refundSync/routing.js +42 -0
  71. package/dist/component/refundSync/routing.js.map +1 -0
  72. package/dist/component/refundSync/schema.d.ts +25 -0
  73. package/dist/component/refundSync/schema.d.ts.map +1 -0
  74. package/dist/component/refundSync/schema.js +15 -0
  75. package/dist/component/refundSync/schema.js.map +1 -0
  76. package/dist/component/refundSync/validators.d.ts +164 -0
  77. package/dist/component/refundSync/validators.d.ts.map +1 -0
  78. package/dist/component/refundSync/validators.js +32 -0
  79. package/dist/component/refundSync/validators.js.map +1 -0
  80. package/dist/component/schema.d.ts +23 -0
  81. package/dist/component/schema.js +2 -0
  82. package/dist/component/schema.js.map +1 -1
  83. package/docs/refund-context.md +82 -0
  84. package/package.json +1 -1
  85. package/src/client/connect/refundSync.test.ts +239 -0
  86. package/src/client/connect/refundSync.transport.test.ts +396 -0
  87. package/src/client/connect/refundSync.ts +125 -0
  88. package/src/client/connect/refundSyncValidation.ts +120 -0
  89. package/src/client/index.ts +34 -6
  90. package/src/client/types/triggers.ts +3 -1
  91. package/src/client/webhooks/helpers.ts +1 -0
  92. package/src/client/webhooks/refund-reconciliation.test.ts +320 -0
  93. package/src/client/webhooks/refundReconciliation.ts +80 -0
  94. package/src/client/webhooks/refundReconciliationValidators.ts +15 -0
  95. package/src/component/_generated/api.ts +12 -0
  96. package/src/component/_generated/component.ts +100 -0
  97. package/src/component/connect/mutations.ts +2 -67
  98. package/src/component/connect/refundWrites.ts +76 -0
  99. package/src/component/refundHistory/originalSeller.ts +4 -1
  100. package/src/component/refundSync/helpers.ts +99 -0
  101. package/src/component/refundSync/mutations.ts +131 -0
  102. package/src/component/refundSync/queries.ts +10 -0
  103. package/src/component/refundSync/refund-sync.test.ts +255 -0
  104. package/src/component/refundSync/routing.ts +55 -0
  105. package/src/component/refundSync/schema.ts +19 -0
  106. package/src/component/refundSync/validators.ts +35 -0
  107. package/src/component/schema.ts +2 -0
@@ -0,0 +1,113 @@
1
+ import { v } from "convex/values";
2
+ import { mutation } from "../earnings/triggers.js";
3
+ import { writeRefund } from "../connect/refundWrites.js";
4
+ import { claimByRefund, refundById, validateIdentity, validateSnapshot, assertOriginal, fingerprint, } from "./helpers.js";
5
+ import { refundRouting } from "./routing.js";
6
+ import { identity, prepared, result } from "./validators.js";
7
+ /** Failed first reads cannot permanently claim an unverified provider API namespace. */
8
+ export const begin = mutation({
9
+ args: identity,
10
+ returns: v.number(),
11
+ handler: async (ctx, args) => {
12
+ validateIdentity(args);
13
+ const claim = await claimByRefund(ctx, args.stripeRefundId);
14
+ await refundById(ctx, args.stripeRefundId);
15
+ if (claim?.acceptedContext !== undefined &&
16
+ claim.acceptedContext !== args.apiContext)
17
+ throw new Error("Accepted refund API context does not match.");
18
+ const generation = (claim?.generation ?? 0) + 1;
19
+ if (!Number.isSafeInteger(generation) || generation <= 0)
20
+ throw new Error("Refund synchronization generation exhausted.");
21
+ const fields = {
22
+ generation,
23
+ requestedContext: args.apiContext,
24
+ status: "pending",
25
+ startedAt: Date.now(),
26
+ };
27
+ if (claim)
28
+ await ctx.db.patch("refundSyncClaims", claim._id, fields);
29
+ else
30
+ await ctx.db.insert("refundSyncClaims", {
31
+ stripeRefundId: args.stripeRefundId,
32
+ ...fields,
33
+ });
34
+ return generation;
35
+ },
36
+ });
37
+ /** Accept the qualified observation and unchanged financial writer atomically. */
38
+ export const finish = mutation({
39
+ args: prepared,
40
+ returns: result,
41
+ handler: async (ctx, args) => {
42
+ validateIdentity(args);
43
+ if (!Number.isSafeInteger(args.generation) || args.generation <= 0)
44
+ throw new Error("Invalid refund synchronization generation.");
45
+ const claim = await claimByRefund(ctx, args.stripeRefundId);
46
+ if (!claim)
47
+ throw new Error("Refund synchronization claim is missing.");
48
+ if (claim.generation !== args.generation)
49
+ return { status: "superseded", generation: args.generation };
50
+ if (claim.requestedContext !== args.apiContext ||
51
+ (claim.acceptedContext !== undefined &&
52
+ claim.acceptedContext !== args.apiContext))
53
+ throw new Error("Refund synchronization API context does not match.");
54
+ validateSnapshot(args.refund);
55
+ if (args.refund.stripeRefundId !== args.stripeRefundId)
56
+ throw new Error("Refund synchronization identity does not match.");
57
+ const routing = await refundRouting(ctx, args.refund);
58
+ if (routing.status === "held" ||
59
+ (routing.merchantAccount !== null &&
60
+ routing.merchantAccount !== args.refund.accountId) ||
61
+ (routing.requiresChargeProof && args.refund.accountId === undefined))
62
+ throw new Error("Original refund merchant is unavailable or contradictory.");
63
+ const existing = await refundById(ctx, args.stripeRefundId);
64
+ assertOriginal(existing, args.refund);
65
+ const nextFingerprint = await fingerprint(args.refund);
66
+ const changed = !existing || (await fingerprint(existing)) !== nextFingerprint;
67
+ if (claim.status === "accepted") {
68
+ if (claim.acceptedFingerprint !== nextFingerprint || changed || !existing)
69
+ throw new Error("Accepted refund observation changed outside its generation.");
70
+ return {
71
+ status: "accepted",
72
+ generation: args.generation,
73
+ changed: false,
74
+ refund: existing,
75
+ };
76
+ }
77
+ await writeRefund(ctx, {
78
+ ...args.refund,
79
+ reason: args.refund.reason,
80
+ failureReason: args.refund.failureReason,
81
+ });
82
+ const refund = await refundById(ctx, args.stripeRefundId);
83
+ if (!refund)
84
+ throw new Error("Accepted refund was not persisted.");
85
+ await ctx.db.patch("refundSyncClaims", claim._id, {
86
+ status: "accepted",
87
+ acceptedContext: args.apiContext,
88
+ acceptedGeneration: args.generation,
89
+ acceptedAt: Date.now(),
90
+ acceptedFingerprint: nextFingerprint,
91
+ });
92
+ return {
93
+ status: "accepted",
94
+ generation: args.generation,
95
+ changed,
96
+ refund,
97
+ };
98
+ },
99
+ });
100
+ export const markUnknown = mutation({
101
+ args: { ...identity, generation: v.number() },
102
+ returns: v.null(),
103
+ handler: async (ctx, args) => {
104
+ validateIdentity(args);
105
+ const claim = await claimByRefund(ctx, args.stripeRefundId);
106
+ if (claim?.generation === args.generation &&
107
+ claim.requestedContext === args.apiContext &&
108
+ claim.status === "pending")
109
+ await ctx.db.patch("refundSyncClaims", claim._id, { status: "unknown" });
110
+ return null;
111
+ },
112
+ });
113
+ //# sourceMappingURL=mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/refundSync/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE7D,wFAAwF;AACxF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC3B,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3C,IACE,KAAK,EAAE,eAAe,KAAK,SAAS;YACpC,KAAK,CAAC,eAAe,KAAK,IAAI,CAAC,UAAU;YAEzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,UAAU,IAAI,CAAC,CAAC,GAAG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C;QACvB,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5D,IACE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC,UAAU;YACrC,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,UAAU;YAC1C,KAAK,CAAC,MAAM,KAAK,SAAS;YAE1B,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3E,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** Trusted-host routing proof only; this does not establish seller dispatch authority. */
2
+ export declare const routing: import("convex/server").RegisteredQuery<"public", {
3
+ stripeRefundId: string;
4
+ stripePaymentIntentId: string;
5
+ stripeChargeId: string;
6
+ currency: string;
7
+ }, Promise<{
8
+ merchantAccount: string | null;
9
+ requiresChargeProof: boolean;
10
+ status: "held" | "known" | "unknown";
11
+ }>>;
12
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/refundSync/queries.ts"],"names":[],"mappings":"AAIA,0FAA0F;AAC1F,eAAO,MAAM,OAAO;;;;;;;;;GAIlB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { query } from "../_generated/server.js";
2
+ import { routingInput, routingResult } from "./validators.js";
3
+ import { refundRouting } from "./routing.js";
4
+ /** Trusted-host routing proof only; this does not establish seller dispatch authority. */
5
+ export const routing = query({
6
+ args: routingInput,
7
+ returns: routingResult,
8
+ handler: refundRouting,
9
+ });
10
+ //# sourceMappingURL=queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/component/refundSync/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,0FAA0F;AAC1F,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;IAC3B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,aAAa;CACvB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Infer } from "convex/values";
2
+ import type { QueryCtx, MutationCtx } from "../_generated/server.js";
3
+ import type { routingInput, routingResult } from "./validators.js";
4
+ /** Unknown attribution cannot silently inherit a mutable payment's current destination. */
5
+ export declare function refundRouting(ctx: QueryCtx | MutationCtx, input: {
6
+ [K in keyof typeof routingInput]: Infer<(typeof routingInput)[K]>;
7
+ }): Promise<Infer<typeof routingResult>>;
8
+ //# sourceMappingURL=routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/component/refundSync/routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnE,2FAA2F;AAC3F,wBAAsB,aAAa,CACjC,GAAG,EAAE,QAAQ,GAAG,WAAW,EAC3B,KAAK,EAAE;KAAG,CAAC,IAAI,MAAM,OAAO,YAAY,GAAG,KAAK,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC3E,OAAO,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC,CA4CtC"}
@@ -0,0 +1,42 @@
1
+ import { originalRefundSeller } from "../refundHistory/originalSeller.js";
2
+ import { refundById } from "./helpers.js";
3
+ /** Unknown attribution cannot silently inherit a mutable payment's current destination. */
4
+ export async function refundRouting(ctx, input) {
5
+ const existing = await refundById(ctx, input.stripeRefundId);
6
+ const allocations = await ctx.db
7
+ .query("settlementAllocations")
8
+ .withIndex("by_source_charge", (q) => q.eq("sourceChargeId", input.stripeChargeId))
9
+ .take(2);
10
+ const merchant = await originalRefundSeller(ctx, input);
11
+ const payments = await ctx.db
12
+ .query("payments")
13
+ .withIndex("by_stripe_payment_intent_id", (q) => q.eq("stripePaymentIntentId", input.stripePaymentIntentId))
14
+ .take(2);
15
+ if (payments.length > 1 ||
16
+ (payments[0] !== undefined && payments[0].currency !== input.currency) ||
17
+ (allocations.length > 0 && !merchant) ||
18
+ (existing?.accountId !== undefined &&
19
+ !/^acct_[A-Za-z0-9_]{1,250}$/.test(existing.accountId)) ||
20
+ (merchant &&
21
+ existing?.accountId !== undefined &&
22
+ merchant !== existing.accountId))
23
+ return {
24
+ status: "held",
25
+ merchantAccount: null,
26
+ requiresChargeProof: false,
27
+ };
28
+ if (merchant)
29
+ return {
30
+ status: "known",
31
+ merchantAccount: merchant,
32
+ requiresChargeProof: false,
33
+ };
34
+ const payment = payments[0];
35
+ const fallback = payment?.destinationAccountId;
36
+ return {
37
+ status: "unknown",
38
+ merchantAccount: null,
39
+ requiresChargeProof: existing?.accountId !== undefined || fallback !== undefined,
40
+ };
41
+ }
42
+ //# sourceMappingURL=routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../src/component/refundSync/routing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAA2B,EAC3B,KAA4E;IAE5E,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;I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AAC;IACJ,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,OAAO,EAAE,oBAAoB,CAAC;IAC/C,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,eAAe,EAAE,IAAI;QACrB,mBAAmB,EACjB,QAAQ,EAAE,SAAS,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS;KAC9D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ /** Observation claims only; refunds and payment aggregates remain in existing tables. */
2
+ export declare const claimsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ acceptedAt?: number | undefined;
4
+ acceptedContext?: string | undefined;
5
+ acceptedFingerprint?: string | undefined;
6
+ acceptedGeneration?: number | undefined;
7
+ generation: number;
8
+ requestedContext: string;
9
+ startedAt: number;
10
+ status: "accepted" | "pending" | "unknown";
11
+ stripeRefundId: string;
12
+ }, {
13
+ stripeRefundId: import("convex/values").VString<string, "required">;
14
+ requestedContext: import("convex/values").VString<string, "required">;
15
+ generation: import("convex/values").VFloat64<number, "required">;
16
+ status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
17
+ startedAt: import("convex/values").VFloat64<number, "required">;
18
+ acceptedContext: import("convex/values").VString<string | undefined, "optional">;
19
+ acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
20
+ acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
21
+ acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
22
+ }, "required", "acceptedAt" | "acceptedContext" | "acceptedFingerprint" | "acceptedGeneration" | "generation" | "requestedContext" | "startedAt" | "status" | "stripeRefundId">, {
23
+ by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
24
+ }, {}, {}>;
25
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/refundSync/schema.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;UAc2B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ /** Observation claims only; refunds and payment aggregates remain in existing tables. */
4
+ export const claimsTable = defineTable({
5
+ stripeRefundId: v.string(),
6
+ requestedContext: v.string(),
7
+ generation: v.number(),
8
+ status: v.union(v.literal("pending"), v.literal("accepted"), v.literal("unknown")),
9
+ startedAt: v.number(),
10
+ acceptedContext: v.optional(v.string()),
11
+ acceptedGeneration: v.optional(v.number()),
12
+ acceptedAt: v.optional(v.number()),
13
+ acceptedFingerprint: v.optional(v.string()),
14
+ }).index("by_stripe_refund_id", ["stripeRefundId"]);
15
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/refundSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,yFAAyF;AACzF,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CACrB;IACD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,mBAAmB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,164 @@
1
+ export declare const identity: {
2
+ stripeRefundId: import("convex/values").VString<string, "required">;
3
+ apiContext: import("convex/values").VString<string, "required">;
4
+ };
5
+ export declare const snapshot: import("convex/values").VObject<{
6
+ accountId?: string | undefined;
7
+ amount: number;
8
+ currency: string;
9
+ failureReason?: string | undefined;
10
+ metadata?: Record<string, string> | undefined;
11
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
12
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
13
+ stripeChargeId: string;
14
+ stripePaymentIntentId: string;
15
+ stripeRefundId: string;
16
+ }, {
17
+ stripeRefundId: import("convex/values").VString<string, "required">;
18
+ accountId: import("convex/values").VString<string | undefined, "optional">;
19
+ amount: import("convex/values").VFloat64<number, "required">;
20
+ currency: import("convex/values").VString<string, "required">;
21
+ status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
22
+ reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
23
+ failureReason: import("convex/values").VString<string | undefined, "optional">;
24
+ stripePaymentIntentId: import("convex/values").VString<string, "required">;
25
+ stripeChargeId: import("convex/values").VString<string, "required">;
26
+ metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
27
+ }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>;
28
+ export declare const prepared: {
29
+ stripeRefundId: import("convex/values").VString<string, "required">;
30
+ apiContext: import("convex/values").VString<string, "required">;
31
+ generation: import("convex/values").VFloat64<number, "required">;
32
+ refund: import("convex/values").VObject<{
33
+ accountId?: string | undefined;
34
+ amount: number;
35
+ currency: string;
36
+ failureReason?: string | undefined;
37
+ metadata?: Record<string, string> | undefined;
38
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
39
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
40
+ stripeChargeId: string;
41
+ stripePaymentIntentId: string;
42
+ stripeRefundId: string;
43
+ }, {
44
+ stripeRefundId: import("convex/values").VString<string, "required">;
45
+ accountId: import("convex/values").VString<string | undefined, "optional">;
46
+ amount: import("convex/values").VFloat64<number, "required">;
47
+ currency: import("convex/values").VString<string, "required">;
48
+ status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
49
+ reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
50
+ failureReason: import("convex/values").VString<string | undefined, "optional">;
51
+ stripePaymentIntentId: import("convex/values").VString<string, "required">;
52
+ stripeChargeId: import("convex/values").VString<string, "required">;
53
+ metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
54
+ }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>;
55
+ };
56
+ export declare const result: import("convex/values").VUnion<{
57
+ changed: boolean;
58
+ generation: number;
59
+ refund: {
60
+ _creationTime: number;
61
+ _id: import("convex/values").GenericId<"refunds">;
62
+ accountId?: string | undefined;
63
+ amount: number;
64
+ currency: string;
65
+ failureReason?: string | undefined;
66
+ metadata?: any;
67
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
68
+ refundCommandConflict?: boolean | undefined;
69
+ refundCommandKey?: string | undefined;
70
+ refundCommandNormalizationVersion?: 1 | undefined;
71
+ refundCommandObservedAt?: number | undefined;
72
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
73
+ stripeChargeId?: string | undefined;
74
+ stripePaymentIntentId?: string | undefined;
75
+ stripeRefundId: string;
76
+ };
77
+ status: "accepted";
78
+ } | {
79
+ generation: number;
80
+ status: "superseded";
81
+ }, [import("convex/values").VObject<{
82
+ changed: boolean;
83
+ generation: number;
84
+ refund: {
85
+ _creationTime: number;
86
+ _id: import("convex/values").GenericId<"refunds">;
87
+ accountId?: string | undefined;
88
+ amount: number;
89
+ currency: string;
90
+ failureReason?: string | undefined;
91
+ metadata?: any;
92
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
93
+ refundCommandConflict?: boolean | undefined;
94
+ refundCommandKey?: string | undefined;
95
+ refundCommandNormalizationVersion?: 1 | undefined;
96
+ refundCommandObservedAt?: number | undefined;
97
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
98
+ stripeChargeId?: string | undefined;
99
+ stripePaymentIntentId?: string | undefined;
100
+ stripeRefundId: string;
101
+ };
102
+ status: "accepted";
103
+ }, {
104
+ status: import("convex/values").VLiteral<"accepted", "required">;
105
+ generation: import("convex/values").VFloat64<number, "required">;
106
+ changed: import("convex/values").VBoolean<boolean, "required">;
107
+ refund: import("convex/values").VObject<{
108
+ _creationTime: number;
109
+ _id: import("convex/values").GenericId<"refunds">;
110
+ accountId?: string | undefined;
111
+ amount: number;
112
+ currency: string;
113
+ failureReason?: string | undefined;
114
+ metadata?: any;
115
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
116
+ refundCommandConflict?: boolean | undefined;
117
+ refundCommandKey?: string | undefined;
118
+ refundCommandNormalizationVersion?: 1 | undefined;
119
+ refundCommandObservedAt?: number | undefined;
120
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
121
+ stripeChargeId?: string | undefined;
122
+ stripePaymentIntentId?: string | undefined;
123
+ stripeRefundId: string;
124
+ }, {
125
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
126
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
127
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
128
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
129
+ stripeRefundId: import("convex/values").VString<string, "required">;
130
+ stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
131
+ stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
132
+ accountId: import("convex/values").VString<string | undefined, "optional">;
133
+ amount: import("convex/values").VFloat64<number, "required">;
134
+ currency: import("convex/values").VString<string, "required">;
135
+ status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
136
+ reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
137
+ failureReason: import("convex/values").VString<string | undefined, "optional">;
138
+ metadata: import("convex/values").VAny<any, "optional", string>;
139
+ _id: import("convex/values").VId<import("convex/values").GenericId<"refunds">, "required">;
140
+ _creationTime: import("convex/values").VFloat64<number, "required">;
141
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>;
142
+ }, "required", "changed" | "generation" | "refund" | "refund._creationTime" | "refund._id" | "refund.accountId" | "refund.amount" | "refund.currency" | "refund.failureReason" | "refund.metadata" | "refund.reason" | "refund.refundCommandConflict" | "refund.refundCommandKey" | "refund.refundCommandNormalizationVersion" | "refund.refundCommandObservedAt" | "refund.status" | "refund.stripeChargeId" | "refund.stripePaymentIntentId" | "refund.stripeRefundId" | "status" | `refund.metadata.${string}`>, import("convex/values").VObject<{
143
+ generation: number;
144
+ status: "superseded";
145
+ }, {
146
+ status: import("convex/values").VLiteral<"superseded", "required">;
147
+ generation: import("convex/values").VFloat64<number, "required">;
148
+ }, "required", "generation" | "status">], "required", "changed" | "generation" | "refund" | "refund._creationTime" | "refund._id" | "refund.accountId" | "refund.amount" | "refund.currency" | "refund.failureReason" | "refund.metadata" | "refund.reason" | "refund.refundCommandConflict" | "refund.refundCommandKey" | "refund.refundCommandNormalizationVersion" | "refund.refundCommandObservedAt" | "refund.status" | "refund.stripeChargeId" | "refund.stripePaymentIntentId" | "refund.stripeRefundId" | "status" | `refund.metadata.${string}`>;
149
+ export declare const routingInput: {
150
+ stripeRefundId: import("convex/values").VString<string, "required">;
151
+ stripePaymentIntentId: import("convex/values").VString<string, "required">;
152
+ stripeChargeId: import("convex/values").VString<string, "required">;
153
+ currency: import("convex/values").VString<string, "required">;
154
+ };
155
+ export declare const routingResult: import("convex/values").VObject<{
156
+ merchantAccount: string | null;
157
+ requiresChargeProof: boolean;
158
+ status: "held" | "known" | "unknown";
159
+ }, {
160
+ status: import("convex/values").VUnion<"held" | "known" | "unknown", [import("convex/values").VLiteral<"known", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
161
+ merchantAccount: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
162
+ requiresChargeProof: import("convex/values").VBoolean<boolean, "required">;
163
+ }, "required", "merchantAccount" | "requiresChargeProof" | "status">;
164
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/component/refundSync/validators.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;IAAK,cAAc;IAAc,UAAU;CAAc,CAAC;AAC/E,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;+LAKnB,CAAC;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC;AACF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yhBAQlB,CAAC;AACF,eAAO,MAAM,YAAY;IACvB,cAAc;IACd,qBAAqB;IACrB,cAAc;IACd,QAAQ;CACT,CAAC;AACF,eAAO,MAAM,aAAa;;;;;;;;oEAIxB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { v } from "convex/values";
2
+ import { refundFields, refundDocValidator } from "../connect/validators.js";
3
+ export const identity = { stripeRefundId: v.string(), apiContext: v.string() };
4
+ export const snapshot = v.object({
5
+ ...refundFields,
6
+ stripePaymentIntentId: v.string(),
7
+ stripeChargeId: v.string(),
8
+ metadata: v.optional(v.record(v.string(), v.string())),
9
+ });
10
+ export const prepared = {
11
+ ...identity,
12
+ generation: v.number(),
13
+ refund: snapshot,
14
+ };
15
+ export const result = v.union(v.object({
16
+ status: v.literal("accepted"),
17
+ generation: v.number(),
18
+ changed: v.boolean(),
19
+ refund: refundDocValidator,
20
+ }), v.object({ status: v.literal("superseded"), generation: v.number() }));
21
+ export const routingInput = {
22
+ stripeRefundId: v.string(),
23
+ stripePaymentIntentId: v.string(),
24
+ stripeChargeId: v.string(),
25
+ currency: v.string(),
26
+ };
27
+ export const routingResult = v.object({
28
+ status: v.union(v.literal("known"), v.literal("unknown"), v.literal("held")),
29
+ merchantAccount: v.union(v.string(), v.null()),
30
+ requiresChargeProof: v.boolean(),
31
+ });
32
+ //# sourceMappingURL=validators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/component/refundSync/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE5E,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,YAAY;IACf,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,C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AC9C,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;CACjC,CAAC,CAAC"}
@@ -1,4 +1,27 @@
1
1
  declare const _default: import("convex/server").SchemaDefinition<{
2
+ refundSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ acceptedAt?: number | undefined;
4
+ acceptedContext?: string | undefined;
5
+ acceptedFingerprint?: string | undefined;
6
+ acceptedGeneration?: number | undefined;
7
+ generation: number;
8
+ requestedContext: string;
9
+ startedAt: number;
10
+ status: "accepted" | "pending" | "unknown";
11
+ stripeRefundId: string;
12
+ }, {
13
+ stripeRefundId: import("convex/values").VString<string, "required">;
14
+ requestedContext: import("convex/values").VString<string, "required">;
15
+ generation: import("convex/values").VFloat64<number, "required">;
16
+ status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
17
+ startedAt: import("convex/values").VFloat64<number, "required">;
18
+ acceptedContext: import("convex/values").VString<string | undefined, "optional">;
19
+ acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
20
+ acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
21
+ acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
22
+ }, "required", "acceptedAt" | "acceptedContext" | "acceptedFingerprint" | "acceptedGeneration" | "generation" | "requestedContext" | "startedAt" | "status" | "stripeRefundId">, {
23
+ by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
24
+ }, {}, {}>;
2
25
  processingCostReconciliationOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
26
  accountId: string;
4
27
  claimKey: string;
@@ -1,3 +1,4 @@
1
+ import { claimsTable as refundSyncClaimsTable } from "./refundSync/schema.js";
1
2
  import { operationsTable as processingCostReconciliationOperations } from "./processingCostReconciliation/schema.js";
2
3
  import { operationsTable as recoveryWorkflowOperations, requestsTable as recoveryWorkflowRequests, } from "./recoveryWorkflow/schema.js";
3
4
  import { preparationsTable as balanceFundingPreparations, operationsTable as balanceFundingOperations, requestsTable as balanceFundingRequests, } from "./balanceFunding/schema.js";
@@ -24,6 +25,7 @@ import { accountsTable } from "./core/schema";
24
25
  import { pricesTable, productsTable } from "./products/schema";
25
26
  import { webhookEventsTable } from "./webhooks/schema";
26
27
  export default defineSchema({
28
+ refundSyncClaims: refundSyncClaimsTable,
27
29
  processingCostReconciliationOperations,
28
30
  recoveryWorkflowOperations,
29
31
  recoveryWorkflowRequests,
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EACL,eAAe,IAAI,0BAA0B,EAC7C,aAAa,IAAI,wBAAwB,GAC1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iBAAiB,IAAI,0BAA0B,EAC/C,eAAe,IAAI,wBAAwB,EAC3C,aAAa,IAAI,sBAAsB,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,IAAI,yBAAyB,EAC1C,YAAY,IAAI,wBAAwB,GACzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB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