@vorim/sdk 4.6.0 → 4.8.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 (120) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{_commerce-core-QF7IKCKQ.d.cts → _commerce-core-Be_kkFtf.d.cts} +1 -1
  3. package/dist/{_commerce-core-jih7k4hQ.d.ts → _commerce-core-C496pk4y.d.ts} +1 -1
  4. package/dist/index.cjs +166 -4
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +190 -3
  7. package/dist/index.d.ts +190 -3
  8. package/dist/index.js +164 -4
  9. package/dist/index.js.map +1 -1
  10. package/dist/integrations/amazon.d.cts +2 -2
  11. package/dist/integrations/amazon.d.ts +2 -2
  12. package/dist/integrations/anthropic.d.cts +1 -1
  13. package/dist/integrations/anthropic.d.ts +1 -1
  14. package/dist/integrations/ap2.d.cts +1 -1
  15. package/dist/integrations/ap2.d.ts +1 -1
  16. package/dist/integrations/aws-iam.d.cts +1 -1
  17. package/dist/integrations/aws-iam.d.ts +1 -1
  18. package/dist/integrations/bank-rails.d.cts +1 -1
  19. package/dist/integrations/bank-rails.d.ts +1 -1
  20. package/dist/integrations/circle.d.cts +1 -1
  21. package/dist/integrations/circle.d.ts +1 -1
  22. package/dist/integrations/cloudflare.d.cts +1 -1
  23. package/dist/integrations/cloudflare.d.ts +1 -1
  24. package/dist/integrations/coinbase-cdp.d.cts +1 -1
  25. package/dist/integrations/coinbase-cdp.d.ts +1 -1
  26. package/dist/integrations/commerce-agents.d.cts +1 -1
  27. package/dist/integrations/commerce-agents.d.ts +1 -1
  28. package/dist/integrations/crewai.d.cts +1 -1
  29. package/dist/integrations/crewai.d.ts +1 -1
  30. package/dist/integrations/delivery.d.cts +2 -2
  31. package/dist/integrations/delivery.d.ts +2 -2
  32. package/dist/integrations/ebay.d.cts +2 -2
  33. package/dist/integrations/ebay.d.ts +2 -2
  34. package/dist/integrations/entra.d.cts +1 -1
  35. package/dist/integrations/entra.d.ts +1 -1
  36. package/dist/integrations/etsy.d.cts +2 -2
  37. package/dist/integrations/etsy.d.ts +2 -2
  38. package/dist/integrations/eu-providers.d.cts +1 -1
  39. package/dist/integrations/eu-providers.d.ts +1 -1
  40. package/dist/integrations/fhir.d.cts +1 -1
  41. package/dist/integrations/fhir.d.ts +1 -1
  42. package/dist/integrations/google-merchant.d.cts +2 -2
  43. package/dist/integrations/google-merchant.d.ts +2 -2
  44. package/dist/integrations/grok.d.cts +1 -1
  45. package/dist/integrations/grok.d.ts +1 -1
  46. package/dist/integrations/guidewire.d.cts +1 -1
  47. package/dist/integrations/guidewire.d.ts +1 -1
  48. package/dist/integrations/hermes.d.cts +1 -1
  49. package/dist/integrations/hermes.d.ts +1 -1
  50. package/dist/integrations/jira.d.cts +1 -1
  51. package/dist/integrations/jira.d.ts +1 -1
  52. package/dist/integrations/langchain.d.cts +1 -1
  53. package/dist/integrations/langchain.d.ts +1 -1
  54. package/dist/integrations/langgraph.d.cts +1 -1
  55. package/dist/integrations/langgraph.d.ts +1 -1
  56. package/dist/integrations/legal.d.cts +1 -1
  57. package/dist/integrations/legal.d.ts +1 -1
  58. package/dist/integrations/life-sciences.d.cts +1 -1
  59. package/dist/integrations/life-sciences.d.ts +1 -1
  60. package/dist/integrations/linear.d.cts +1 -1
  61. package/dist/integrations/linear.d.ts +1 -1
  62. package/dist/integrations/lithic.d.cts +1 -1
  63. package/dist/integrations/lithic.d.ts +1 -1
  64. package/dist/integrations/llamaindex.d.cts +1 -1
  65. package/dist/integrations/llamaindex.d.ts +1 -1
  66. package/dist/integrations/marqeta.d.cts +1 -1
  67. package/dist/integrations/marqeta.d.ts +1 -1
  68. package/dist/integrations/meta.d.cts +2 -2
  69. package/dist/integrations/meta.d.ts +2 -2
  70. package/dist/integrations/mistral.d.cts +1 -1
  71. package/dist/integrations/mistral.d.ts +1 -1
  72. package/dist/integrations/modern-treasury.d.cts +1 -1
  73. package/dist/integrations/modern-treasury.d.ts +1 -1
  74. package/dist/integrations/muse.d.cts +1 -1
  75. package/dist/integrations/muse.d.ts +1 -1
  76. package/dist/integrations/nekuda.d.cts +1 -1
  77. package/dist/integrations/nekuda.d.ts +1 -1
  78. package/dist/integrations/okta.d.cts +1 -1
  79. package/dist/integrations/okta.d.ts +1 -1
  80. package/dist/integrations/openai.d.cts +1 -1
  81. package/dist/integrations/openai.d.ts +1 -1
  82. package/dist/integrations/openrouter.d.cts +1 -1
  83. package/dist/integrations/openrouter.d.ts +1 -1
  84. package/dist/integrations/paypal-agent.d.cts +1 -1
  85. package/dist/integrations/paypal-agent.d.ts +1 -1
  86. package/dist/integrations/perplexity.d.cts +1 -1
  87. package/dist/integrations/perplexity.d.ts +1 -1
  88. package/dist/integrations/plaid.d.cts +1 -1
  89. package/dist/integrations/plaid.d.ts +1 -1
  90. package/dist/integrations/ramp.d.cts +1 -1
  91. package/dist/integrations/ramp.d.ts +1 -1
  92. package/dist/integrations/shopify.d.cts +1 -1
  93. package/dist/integrations/shopify.d.ts +1 -1
  94. package/dist/integrations/siem.d.cts +1 -1
  95. package/dist/integrations/siem.d.ts +1 -1
  96. package/dist/integrations/skyfire.d.cts +1 -1
  97. package/dist/integrations/skyfire.d.ts +1 -1
  98. package/dist/integrations/social-ads.d.cts +2 -2
  99. package/dist/integrations/social-ads.d.ts +2 -2
  100. package/dist/integrations/stripe-acp.d.cts +1 -1
  101. package/dist/integrations/stripe-acp.d.ts +1 -1
  102. package/dist/integrations/stripe-issuing.d.cts +1 -1
  103. package/dist/integrations/stripe-issuing.d.ts +1 -1
  104. package/dist/integrations/tiktok-shop.d.cts +2 -2
  105. package/dist/integrations/tiktok-shop.d.ts +2 -2
  106. package/dist/integrations/truanon.d.cts +1 -1
  107. package/dist/integrations/truanon.d.ts +1 -1
  108. package/dist/integrations/typesafe.d.cts +1 -1
  109. package/dist/integrations/typesafe.d.ts +1 -1
  110. package/dist/integrations/ucp.d.cts +1 -1
  111. package/dist/integrations/ucp.d.ts +1 -1
  112. package/dist/integrations/vercel-ai.d.cts +1 -1
  113. package/dist/integrations/vercel-ai.d.ts +1 -1
  114. package/dist/integrations/walmart.d.cts +2 -2
  115. package/dist/integrations/walmart.d.ts +2 -2
  116. package/dist/integrations/x402.d.cts +1 -1
  117. package/dist/integrations/x402.d.ts +1 -1
  118. package/dist/{types-3hhqtL0W.d.cts → types-B0UJBwuB.d.cts} +35 -0
  119. package/dist/{types-3hhqtL0W.d.ts → types-B0UJBwuB.d.ts} +35 -0
  120. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog — @vorim/sdk
2
2
 
3
+ ## 4.8.0
4
+
5
+ ### Added
6
+
7
+ - **What the agent relied on.** `beforeAction({ ..., sources })` takes up to 20 of `{ name, kind?, hash? }` (`kind`: document, tool_result, web, message, data, other; `hash`: `sha256:<hex>` of the content). Vorim keeps names and hashes, never content, and the payment's consent record and case pack show them.
8
+ - **Customer agents contacting you.** `openInboundAgentContact({ ref, channel, verify, customerRef?, caseRef?, firmAgentId? })` records a contact from a customer's own AI agent and checks it (`verify` is an RFC 9421 signed request, a Visa TAP signature, a Vorim Know Your Agent document, or nothing). `addInboundAgentEvent(ref, { kind, summary?, decisionId? })` logs what it asked, what your agent did, and when a person was offered or took over; `listInboundAgentContacts` and `getInboundAgentRecord` (sealed, with gaps).
9
+ - **Human review on request.** `updateComplaint` takes `reviewRequestedAt`, `reviewBy`, `reviewDoneAt` and `reviewAnswer`: the customer asked for a person to look again, who did, when, and the plain-English answer given.
10
+ - Consent records now carry `rationale` (why the payment went ahead, waited or was refused, in plain English, from what Vorim checked) and `relied_on`; case packs carry `why` per decision. No code change needed to read them.
11
+
12
+ ## 4.7.0
13
+
14
+ ### Added
15
+
16
+ - **Board report and DORA register.** `getBoardReportDraft`, `issueBoardReport`, `listBoardReports`, `getBoardReport` (Consumer Duty board report, PRIN 2A.8; the firm's actions need an owner and a due date). `getIctRegister` and `setIctProviderRecord` (DORA register of information rows for model providers and agent vendors).
17
+ - **Payments and consent.** `listHeldPayments` and `resolveHeldPayment` (the customer approves a payment above `stepUpAbove` with the mandate key), `listCancellablePayments` and `cancelPayment` (the customer cancels inside `cancelWithinMinutes`), `getPaymentConsent` and `getCaseConsent` (the consent record per payment), and the helpers `paymentApprovalLine` and `paymentCancelLine`, which match the server byte for byte. `beforeAction` returns `cancelUntil` when a payment can still be cancelled: hold it until then.
18
+ - **Mandate terms.** `createMandate` now sends `periodicLimits`, `validFrom`, `stepUpAbove`, `targetLimits` (caps per merchant inside one mandate) and `cancelWithinMinutes`. `importVrpConsent` and `exportMandateVrp` mirror a UK Open Banking VRP consent (not tested with a bank or PISP).
19
+ - **Agents and firm.** `getKyaDocument` (Know Your Agent document, now with read, instruct or transact and onward delegation), `getReadinessStatement`, `getVendorReport` (what each vendor's agents did; set `metadata.vendor`), `getAgentModels`, `getAppFraudPack` and `saveAppFraudClaim`, `listComplaints`, `openComplaint` and `updateComplaint` (DISP 1.6 clocks), and `getPublicSampleEvidence`. `verifyEvidence` returns `sample` for Vorim's public samples.
20
+
3
21
  ## 4.6.0
4
22
 
5
23
  ### Added
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from './index.cjs';
2
- import { P as PermissionScope } from './types-3hhqtL0W.cjs';
2
+ import { P as PermissionScope } from './types-B0UJBwuB.cjs';
3
3
  import { E as EscalationPolicy } from './_runtime-gate-DOJUKJBu.cjs';
4
4
 
5
5
  /** What a ceiling an operation is measured against. */
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from './index.js';
2
- import { P as PermissionScope } from './types-3hhqtL0W.js';
2
+ import { P as PermissionScope } from './types-B0UJBwuB.js';
3
3
  import { E as EscalationPolicy } from './_runtime-gate-DOJUKJBu.js';
4
4
 
5
5
  /** What a ceiling an operation is measured against. */
package/dist/index.cjs CHANGED
@@ -57,6 +57,8 @@ __export(index_exports, {
57
57
  isKeyedCommitment: () => isKeyedCommitment,
58
58
  jcsCanonicalise: () => jcsCanonicalise,
59
59
  mandateWithdrawalLine: () => mandateWithdrawalLine,
60
+ paymentApprovalLine: () => paymentApprovalLine,
61
+ paymentCancelLine: () => paymentCancelLine,
60
62
  portableReceiptCanonicalBytes: () => portableReceiptCanonicalBytes,
61
63
  prepareReplayContext: () => prepareReplayContext,
62
64
  signHttpRequest: () => signHttpRequest,
@@ -941,7 +943,7 @@ function canonicalIntent(value) {
941
943
  const keys = Object.keys(obj).filter((k) => obj[k] !== void 0).sort();
942
944
  return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalIntent(obj[k])}`).join(",")}}`;
943
945
  }
944
- var SDK_VERSION = true ? "4.6.0" : "0.0.0";
946
+ var SDK_VERSION = true ? "4.8.0" : "0.0.0";
945
947
  var USER_AGENT = `vorim-sdk/${SDK_VERSION}`;
946
948
  function sleep(ms) {
947
949
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -1565,7 +1567,8 @@ var VorimSDK = class _VorimSDK {
1565
1567
  traceparent: input.traceparent,
1566
1568
  intent_id: input.intentId,
1567
1569
  case_ref: input.caseRef,
1568
- mandate_id: input.mandateId
1570
+ mandate_id: input.mandateId,
1571
+ sources: input.sources
1569
1572
  };
1570
1573
  let raw;
1571
1574
  try {
@@ -1742,7 +1745,8 @@ var VorimSDK = class _VorimSDK {
1742
1745
  id: typeof raw.intent.id === "string" ? raw.intent.id : null,
1743
1746
  alignment: raw.intent.alignment === "aligned" || raw.intent.alignment === "off_intent" ? raw.intent.alignment : "none",
1744
1747
  reasons: Array.isArray(raw.intent.reasons) ? raw.intent.reasons.filter((r) => typeof r === "string") : []
1745
- } : null
1748
+ } : null,
1749
+ ...typeof raw?.cancel_until === "string" ? { cancelUntil: raw.cancel_until } : {}
1746
1750
  };
1747
1751
  }
1748
1752
  // ─── Audit ────────────────────────────────────────────────────────
@@ -2160,7 +2164,12 @@ var VorimSDK = class _VorimSDK {
2160
2164
  max_total: t.maxTotal,
2161
2165
  max_uses: t.maxUses,
2162
2166
  read_only: t.readOnly,
2163
- amount_field: t.amountField
2167
+ amount_field: t.amountField,
2168
+ periodic_limits: t.periodicLimits,
2169
+ valid_from: t.validFrom,
2170
+ step_up_above: t.stepUpAbove,
2171
+ target_limits: t.targetLimits?.map((l) => ({ target: l.target, max_amount: l.maxAmount, max_total: l.maxTotal })),
2172
+ cancel_within_minutes: t.cancelWithinMinutes
2164
2173
  },
2165
2174
  expires_at: input.expiresAt,
2166
2175
  key_attestation: !input.keyAttestation ? void 0 : input.keyAttestation.format === "android-key" ? { format: "android-key", certificate_chain: input.keyAttestation.certificateChain, challenge: input.keyAttestation.challenge } : {
@@ -2364,6 +2373,151 @@ var VorimSDK = class _VorimSDK {
2364
2373
  async verifyTap(input) {
2365
2374
  return this.post("/gateway/tap/verify", { url: input.url, headers: input.headers, keys: input.keys, require_tag: input.requireTag });
2366
2375
  }
2376
+ // ─── Evidence and mandates, rounds three to five (4.7) ────────────────
2377
+ /** The Consumer Duty board report as it stands (PRIN 2A.8): harm signals, data gaps, unanswered signals. Not sealed. */
2378
+ async getBoardReportDraft(params = {}) {
2379
+ return this.get(`/evidence/board-report/draft${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2380
+ }
2381
+ /**
2382
+ * Issue a sealed board report with the firm's actions (each needs an owner
2383
+ * and a due date) and the board's own words. Field names as the REST API
2384
+ * names them: `{ days, actions: [{ title, owner, due, status, signal, measure, evidence_of_effect }], board: { approved_by, approved_on, conclusion, strategy, challenge, contributors } }`.
2385
+ */
2386
+ async issueBoardReport(input) {
2387
+ return this.post("/evidence/board-reports", input);
2388
+ }
2389
+ async listBoardReports() {
2390
+ return this.get("/evidence/board-reports");
2391
+ }
2392
+ /** One sealed board report with its verification result and the platform key. */
2393
+ async getBoardReport(id) {
2394
+ return this.get(`/evidence/board-reports/${encodeURIComponent(id)}`);
2395
+ }
2396
+ /** DORA register of information rows (B_05.01, B_02.02, B_07.01) for the model providers and agent vendors in use, sealed. */
2397
+ async getIctRegister(params = {}) {
2398
+ return this.get(`/evidence/ict-register${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2399
+ }
2400
+ /** Save what only the firm knows about a provider or vendor (LEI, contract, criticality...). Field names as the REST API names them. */
2401
+ async setIctProviderRecord(providerKey, record) {
2402
+ return this.put(`/evidence/ict-register/providers/${encodeURIComponent(providerKey)}`, record);
2403
+ }
2404
+ /** Mirror a UK Open Banking domestic VRP consent as a pending mandate the customer's key signs. Not tested with a bank or PISP. */
2405
+ async importVrpConsent(input) {
2406
+ return this.post("/mandates/import-vrp", {
2407
+ consent: input.consent,
2408
+ agent_id: input.agentId,
2409
+ customer_ref: input.customerRef,
2410
+ alg: input.alg,
2411
+ public_key_jwk: input.publicKeyJwk,
2412
+ action_types: input.actionTypes,
2413
+ expires_at: input.expiresAt
2414
+ });
2415
+ }
2416
+ /** The mandate as draft VRP ControlParameters, with what a VRP consent cannot carry. */
2417
+ async exportMandateVrp(mandateId, params = {}) {
2418
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/vrp${params.vrpType ? `?vrp_type=${encodeURIComponent(params.vrpType)}` : ""}`);
2419
+ }
2420
+ /** The models an agent's own events showed, against the model recorded on its page. */
2421
+ async getAgentModels(agentId) {
2422
+ return this.get(`/agents/${encodeURIComponent(agentId)}/models`);
2423
+ }
2424
+ /** Sealed APP scam claim pack for a case: payments, interventions, scope, deadlines. Never decides the claim. */
2425
+ async getAppFraudPack(caseRef) {
2426
+ return this.get(`/evidence/app-fraud/${encodeURIComponent(caseRef)}`);
2427
+ }
2428
+ /** The firm's facts about the claim (reported date, rail, customer type, recovered amount...). Field names as the REST API names them. */
2429
+ async saveAppFraudClaim(caseRef, claim) {
2430
+ return this.put(`/evidence/app-fraud/${encodeURIComponent(caseRef)}/claim`, claim);
2431
+ }
2432
+ /** Payments under a mandate waiting for the customer (above `stepUpAbove`), each with the lines to sign. */
2433
+ async listHeldPayments(mandateId) {
2434
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/held`);
2435
+ }
2436
+ /**
2437
+ * The customer approves or refuses a held payment with the mandate key; no
2438
+ * Vorim account is involved. Sign `paymentApprovalLine(...)` (or the line
2439
+ * from `listHeldPayments`) on the device; `signedAt` within 5 minutes.
2440
+ */
2441
+ async resolveHeldPayment(mandateId, decisionId, input) {
2442
+ return this.post(`/mandates/${encodeURIComponent(mandateId)}/payments/${encodeURIComponent(decisionId)}`, { resolution: input.resolution, signed_at: input.signedAt, signature: input.signature });
2443
+ }
2444
+ /** Payments under a mandate the customer can still cancel (`cancelWithinMinutes`), each with the line to sign. */
2445
+ async listCancellablePayments(mandateId) {
2446
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/cancellable`);
2447
+ }
2448
+ /**
2449
+ * The customer cancels a payment inside its cancel window with the mandate
2450
+ * key; no Vorim account is involved. Sign `paymentCancelLine(...)` (or the
2451
+ * line from `listCancellablePayments`); `signedAt` within 5 minutes. The
2452
+ * amount goes back to the mandate; the firm must not release the payment.
2453
+ */
2454
+ async cancelPayment(mandateId, decisionId, input) {
2455
+ return this.post(`/mandates/${encodeURIComponent(mandateId)}/payments/${encodeURIComponent(decisionId)}/cancel`, { signed_at: input.signedAt, signature: input.signature });
2456
+ }
2457
+ /** Sealed consent record for one agent payment (PSRs 2017); with `reportedAt`, the refund and complaint deadlines. */
2458
+ async getPaymentConsent(decisionId, params = {}) {
2459
+ return this.get(`/evidence/payments/${encodeURIComponent(decisionId)}/consent${params.reportedAt ? `?reported_at=${encodeURIComponent(params.reportedAt)}` : ""}`);
2460
+ }
2461
+ /** Every payment in a case with its consent verdict (not sealed). */
2462
+ async getCaseConsent(caseRef) {
2463
+ return this.get(`/evidence/cases/${encodeURIComponent(caseRef)}/consent`);
2464
+ }
2465
+ /** Sealed Know Your Agent document for one agent, valid 24 hours. Not a KYA standard or certification. */
2466
+ async getKyaDocument(agentId) {
2467
+ return this.get(`/evidence/kya/${encodeURIComponent(agentId)}`);
2468
+ }
2469
+ /** Sealed agentic finance readiness statement for the firm, under the Mills Review headings, with gaps. */
2470
+ async getReadinessStatement() {
2471
+ return this.get("/evidence/readiness");
2472
+ }
2473
+ /** Sealed third-party agents report: what each vendor's agents (agent `metadata.vendor`) did through Vorim. */
2474
+ async getVendorReport(params = {}) {
2475
+ return this.get(`/evidence/vendors${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2476
+ }
2477
+ /** Complaints with their DISP 1.6 clocks and a summary (agent end to end, handed to a person, overdue). */
2478
+ async listComplaints(params = {}) {
2479
+ return this.get(`/evidence/complaints${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2480
+ }
2481
+ /** Record a complaint as taken; name the agent if one took it. `ref` is the firm's opaque reference, never a name. */
2482
+ async openComplaint(input) {
2483
+ return this.post("/evidence/complaints", { ref: input.ref, kind: input.kind, received_at: input.receivedAt, agent_id: input.agentId, case_ref: input.caseRef });
2484
+ }
2485
+ /** Record when a person stepped in, any holding reply, and the final response. `null` clears a field. */
2486
+ async updateComplaint(ref, input) {
2487
+ const body = {};
2488
+ if (input.reviewRequestedAt !== void 0) body.review_requested_at = input.reviewRequestedAt;
2489
+ if (input.reviewBy !== void 0) body.review_by = input.reviewBy;
2490
+ if (input.reviewDoneAt !== void 0) body.review_done_at = input.reviewDoneAt;
2491
+ if (input.reviewAnswer !== void 0) body.review_answer = input.reviewAnswer;
2492
+ if (input.toPersonAt !== void 0) body.to_person_at = input.toPersonAt;
2493
+ if (input.holdingReplyAt !== void 0) body.holding_reply_at = input.holdingReplyAt;
2494
+ if (input.finalResponseAt !== void 0) body.final_response_at = input.finalResponseAt;
2495
+ if (input.exceptional !== void 0) body.exceptional = input.exceptional;
2496
+ return this.patch(`/evidence/complaints/${encodeURIComponent(ref)}`, body);
2497
+ }
2498
+ /**
2499
+ * A customer's own AI agent has contacted you (4.8). Record it: Vorim checks
2500
+ * the agent (`verify` is `{ method: 'rfc9421', request }`, `{ method: 'tap', url, headers }`,
2501
+ * `{ method: 'kya', document }` or `{ method: 'none', claimed_as? }`) and keeps the result.
2502
+ */
2503
+ async openInboundAgentContact(input) {
2504
+ return this.post("/evidence/inbound-agents", { ref: input.ref, channel: input.channel, customer_ref: input.customerRef, case_ref: input.caseRef, firm_agent_id: input.firmAgentId, verify: input.verify });
2505
+ }
2506
+ /** What happened next: asked, answered, action (with its decisionId), person_offered, handed_to_person, closed. */
2507
+ async addInboundAgentEvent(ref, input) {
2508
+ return this.post(`/evidence/inbound-agents/${encodeURIComponent(ref)}/events`, { kind: input.kind, summary: input.summary, decision_id: input.decisionId, at: input.at });
2509
+ }
2510
+ async listInboundAgentContacts(params = {}) {
2511
+ return this.get(`/evidence/inbound-agents${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2512
+ }
2513
+ /** The sealed record of one contact, with the gaps a complaint handler will ask about. */
2514
+ async getInboundAgentRecord(ref) {
2515
+ return this.get(`/evidence/inbound-agents/${encodeURIComponent(ref)}`);
2516
+ }
2517
+ /** Three sealed sample documents (made-up facts, real signatures) and the platform key. Public. */
2518
+ async getPublicSampleEvidence() {
2519
+ return this.get("/evidence/public-sample");
2520
+ }
2367
2521
  /** Check any sealed Vorim document (case pack, sign-off, gateway verdict, mandate record). Public endpoint. */
2368
2522
  async verifyEvidence(doc) {
2369
2523
  return this.post("/evidence/verify", { payload: doc.payload, hash: doc.hash, signature: doc.signature });
@@ -2785,6 +2939,12 @@ async function deviceLogin(opts) {
2785
2939
  function mandateWithdrawalLine(mandateId, signedAt) {
2786
2940
  return `vorim-mandate-withdraw|v1|${mandateId}|${signedAt}`;
2787
2941
  }
2942
+ function paymentApprovalLine(p) {
2943
+ return ["vorim-payment-approval", "v1", p.mandateId, p.decisionId, p.resolution, String(p.amount), p.currency ?? "", p.payee ?? "", p.signedAt].join("|");
2944
+ }
2945
+ function paymentCancelLine(p) {
2946
+ return ["vorim-payment-cancel", "v1", p.mandateId, p.decisionId, String(p.amount), p.currency ?? "", p.payee ?? "", p.signedAt].join("|");
2947
+ }
2788
2948
  // Annotate the CommonJS export names for ESM import in node:
2789
2949
  0 && (module.exports = {
2790
2950
  CANONICAL_TOOL_CATALOGUE_VERSION,
@@ -2813,6 +2973,8 @@ function mandateWithdrawalLine(mandateId, signedAt) {
2813
2973
  isKeyedCommitment,
2814
2974
  jcsCanonicalise,
2815
2975
  mandateWithdrawalLine,
2976
+ paymentApprovalLine,
2977
+ paymentCancelLine,
2816
2978
  portableReceiptCanonicalBytes,
2817
2979
  prepareReplayContext,
2818
2980
  signHttpRequest,