@odla-ai/chapter 0.40.0 → 0.40.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.
@@ -273,6 +273,8 @@ interface ChapterPrices {
273
273
  interface ChapterPolicy {
274
274
  disclaimerText?: string;
275
275
  refundPolicyText?: string;
276
+ /** Plain-language merchant identity shown immediately before payment consent. */
277
+ merchantDisclosureText?: string;
276
278
  trustCopy?: string;
277
279
  commitmentText?: string;
278
280
  normsText?: string;
@@ -877,6 +879,8 @@ interface SignupControlApplication {
877
879
  interface SignupControlPolicy {
878
880
  disclaimerText: string;
879
881
  refundPolicyText: string;
882
+ /** Plain-language merchant identity displayed before payment consent. */
883
+ merchantDisclosureText?: string;
880
884
  trustCopy?: string;
881
885
  commitmentText?: string;
882
886
  normsText?: string;
@@ -273,6 +273,8 @@ interface ChapterPrices {
273
273
  interface ChapterPolicy {
274
274
  disclaimerText?: string;
275
275
  refundPolicyText?: string;
276
+ /** Plain-language merchant identity shown immediately before payment consent. */
277
+ merchantDisclosureText?: string;
276
278
  trustCopy?: string;
277
279
  commitmentText?: string;
278
280
  normsText?: string;
@@ -877,6 +879,8 @@ interface SignupControlApplication {
877
879
  interface SignupControlPolicy {
878
880
  disclaimerText: string;
879
881
  refundPolicyText: string;
882
+ /** Plain-language merchant identity displayed before payment consent. */
883
+ merchantDisclosureText?: string;
880
884
  trustCopy?: string;
881
885
  commitmentText?: string;
882
886
  normsText?: string;
@@ -317,6 +317,7 @@ function joinConfig(group, paymentsReady, tiers = [], conditions = {}) {
317
317
  conditions,
318
318
  disclaimerText: group.disclaimerText ?? "",
319
319
  refundPolicyText: group.refundPolicyText ?? "",
320
+ merchantDisclosureText: group.merchantDisclosureText ?? "",
320
321
  trustCopy: group.trustCopy ?? "",
321
322
  commitmentText: group.commitmentText ?? "",
322
323
  normsText: group.normsText ?? "",
@@ -2325,7 +2326,14 @@ function policyOf(value, errors) {
2325
2326
  errors.push("document.policy must be an object");
2326
2327
  return void 0;
2327
2328
  }
2328
- const allowed2 = /* @__PURE__ */ new Set(["disclaimerText", "refundPolicyText", "trustCopy", "commitmentText", "normsText"]);
2329
+ const allowed2 = /* @__PURE__ */ new Set([
2330
+ "disclaimerText",
2331
+ "refundPolicyText",
2332
+ "merchantDisclosureText",
2333
+ "trustCopy",
2334
+ "commitmentText",
2335
+ "normsText"
2336
+ ]);
2329
2337
  unknownKeys(input, allowed2, "document.policy", errors);
2330
2338
  const result = {};
2331
2339
  for (const key of allowed2) {
@@ -4162,7 +4170,8 @@ var handleGifts = async (req, url, env, ctx) => {
4162
4170
  return json({
4163
4171
  offers: publicGiftOffers(control3?.document.giftOffers, Date.now()),
4164
4172
  claims: buyerGiftClaims(rows2(found.giftClaims).sort((a, b) => Number(b.createdAt) - Number(a.createdAt)), Date.now()),
4165
- refundPolicyText: typeof group?.refundPolicyText === "string" ? group.refundPolicyText : ""
4173
+ refundPolicyText: typeof group?.refundPolicyText === "string" ? group.refundPolicyText : "",
4174
+ merchantDisclosureText: typeof group?.merchantDisclosureText === "string" ? group.merchantDisclosureText : ""
4166
4175
  });
4167
4176
  }
4168
4177
  if (req.method === "POST" && url.pathname === "/api/gifts/checkout") {