@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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrationInput, T as TrustRecord, b as Agent, S as SuspendPreview, P as PermissionScope, c as PermissionCheckResult, D as DelegationLinkClaims, d as AgentDelegationRecord, W as WorkflowProvenanceGraph, C as CapabilityProfile, e as SharedMemoryWriteInput, f as SharedMemoryEntry, g as SharedMemoryListResult, B as BeforeActionInput, h as TokenBudgetInput, i as TokenBudget, j as BudgetSpend, k as AuditEventInput, l as SwarmView, m as DeclareIntentInput, I as Intent, n as CreateMandateInput, o as CustomerSignature, G as GatewayCheckInput } from './types-3hhqtL0W.cjs';
2
- export { p as AgentStatus, q as ApprovalAttestation, r as AuditEventType, s as AuditResult, t as BudgetEnforcement, u as BudgetScope, v as DecisionVerdict, M as MandateTerms, w as WorkflowGraphEdge, x as WorkflowGraphEvent, y as WorkflowGraphNode } from './types-3hhqtL0W.cjs';
1
+ import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrationInput, T as TrustRecord, b as Agent, S as SuspendPreview, P as PermissionScope, c as PermissionCheckResult, D as DelegationLinkClaims, d as AgentDelegationRecord, W as WorkflowProvenanceGraph, C as CapabilityProfile, e as SharedMemoryWriteInput, f as SharedMemoryEntry, g as SharedMemoryListResult, B as BeforeActionInput, h as TokenBudgetInput, i as TokenBudget, j as BudgetSpend, k as AuditEventInput, l as SwarmView, m as DeclareIntentInput, I as Intent, n as CreateMandateInput, o as CustomerSignature, G as GatewayCheckInput } from './types-B0UJBwuB.cjs';
2
+ export { p as AgentStatus, q as ApprovalAttestation, r as AuditEventType, s as AuditResult, t as BudgetEnforcement, u as BudgetScope, v as DecisionVerdict, M as MandateTerms, w as WorkflowGraphEdge, x as WorkflowGraphEvent, y as WorkflowGraphNode } from './types-B0UJBwuB.cjs';
3
3
  import { PortableSignedReceipt } from '@vorim/shared-types';
4
4
  export { PortableSignedReceipt, portableReceiptCanonicalBytes } from '@vorim/shared-types';
5
5
  import { HttpRequestLike, SignHttpRequestOptions, SignHttpRequestResult } from './httpSignatures.cjs';
@@ -1287,6 +1287,173 @@ declare class VorimSDK {
1287
1287
  alg: string | null;
1288
1288
  nonce: string | null;
1289
1289
  }>;
1290
+ /** The Consumer Duty board report as it stands (PRIN 2A.8): harm signals, data gaps, unanswered signals. Not sealed. */
1291
+ getBoardReportDraft(params?: {
1292
+ days?: number;
1293
+ }): Promise<any>;
1294
+ /**
1295
+ * Issue a sealed board report with the firm's actions (each needs an owner
1296
+ * and a due date) and the board's own words. Field names as the REST API
1297
+ * names them: `{ days, actions: [{ title, owner, due, status, signal, measure, evidence_of_effect }], board: { approved_by, approved_on, conclusion, strategy, challenge, contributors } }`.
1298
+ */
1299
+ issueBoardReport(input: Record<string, unknown>): Promise<any>;
1300
+ listBoardReports(): Promise<any[]>;
1301
+ /** One sealed board report with its verification result and the platform key. */
1302
+ getBoardReport(id: string): Promise<any>;
1303
+ /** DORA register of information rows (B_05.01, B_02.02, B_07.01) for the model providers and agent vendors in use, sealed. */
1304
+ getIctRegister(params?: {
1305
+ days?: number;
1306
+ }): Promise<any>;
1307
+ /** Save what only the firm knows about a provider or vendor (LEI, contract, criticality...). Field names as the REST API names them. */
1308
+ setIctProviderRecord(providerKey: string, record: Record<string, unknown>): Promise<any>;
1309
+ /** Mirror a UK Open Banking domestic VRP consent as a pending mandate the customer's key signs. Not tested with a bank or PISP. */
1310
+ importVrpConsent(input: {
1311
+ consent: unknown;
1312
+ agentId: string;
1313
+ customerRef: string;
1314
+ alg: 'ES256' | 'EdDSA';
1315
+ publicKeyJwk: Record<string, unknown>;
1316
+ actionTypes?: string[];
1317
+ expiresAt?: string;
1318
+ }): Promise<{
1319
+ mandate: any;
1320
+ signing_input: string;
1321
+ imported_from: any;
1322
+ }>;
1323
+ /** The mandate as draft VRP ControlParameters, with what a VRP consent cannot carry. */
1324
+ exportMandateVrp(mandateId: string, params?: {
1325
+ vrpType?: string;
1326
+ }): Promise<any>;
1327
+ /** The models an agent's own events showed, against the model recorded on its page. */
1328
+ getAgentModels(agentId: string): Promise<any>;
1329
+ /** Sealed APP scam claim pack for a case: payments, interventions, scope, deadlines. Never decides the claim. */
1330
+ getAppFraudPack(caseRef: string): Promise<any>;
1331
+ /** The firm's facts about the claim (reported date, rail, customer type, recovered amount...). Field names as the REST API names them. */
1332
+ saveAppFraudClaim(caseRef: string, claim: Record<string, unknown>): Promise<any>;
1333
+ /** Payments under a mandate waiting for the customer (above `stepUpAbove`), each with the lines to sign. */
1334
+ listHeldPayments(mandateId: string): Promise<{
1335
+ mandate_id: string;
1336
+ held: Array<{
1337
+ decision_id: string;
1338
+ amount: number;
1339
+ currency: string | null;
1340
+ payee: string | null;
1341
+ signed_at: string;
1342
+ approve_line: string;
1343
+ refuse_line: string;
1344
+ }>;
1345
+ }>;
1346
+ /**
1347
+ * The customer approves or refuses a held payment with the mandate key; no
1348
+ * Vorim account is involved. Sign `paymentApprovalLine(...)` (or the line
1349
+ * from `listHeldPayments`) on the device; `signedAt` within 5 minutes.
1350
+ */
1351
+ resolveHeldPayment(mandateId: string, decisionId: string, input: {
1352
+ resolution: 'approved' | 'denied';
1353
+ signedAt: string;
1354
+ signature: CustomerSignature;
1355
+ }): Promise<any>;
1356
+ /** Payments under a mandate the customer can still cancel (`cancelWithinMinutes`), each with the line to sign. */
1357
+ listCancellablePayments(mandateId: string): Promise<{
1358
+ mandate_id: string;
1359
+ cancellable: Array<{
1360
+ decision_id: string;
1361
+ amount: number;
1362
+ currency: string | null;
1363
+ payee: string | null;
1364
+ cancel_until: string;
1365
+ signed_at: string;
1366
+ cancel_line: string;
1367
+ }>;
1368
+ }>;
1369
+ /**
1370
+ * The customer cancels a payment inside its cancel window with the mandate
1371
+ * key; no Vorim account is involved. Sign `paymentCancelLine(...)` (or the
1372
+ * line from `listCancellablePayments`); `signedAt` within 5 minutes. The
1373
+ * amount goes back to the mandate; the firm must not release the payment.
1374
+ */
1375
+ cancelPayment(mandateId: string, decisionId: string, input: {
1376
+ signedAt: string;
1377
+ signature: CustomerSignature;
1378
+ }): Promise<{
1379
+ decision_id: string;
1380
+ mandate_id: string;
1381
+ cancelled_at: string;
1382
+ amount_given_back: number;
1383
+ }>;
1384
+ /** Sealed consent record for one agent payment (PSRs 2017); with `reportedAt`, the refund and complaint deadlines. */
1385
+ getPaymentConsent(decisionId: string, params?: {
1386
+ reportedAt?: string;
1387
+ }): Promise<any>;
1388
+ /** Every payment in a case with its consent verdict (not sealed). */
1389
+ getCaseConsent(caseRef: string): Promise<any[]>;
1390
+ /** Sealed Know Your Agent document for one agent, valid 24 hours. Not a KYA standard or certification. */
1391
+ getKyaDocument(agentId: string): Promise<any>;
1392
+ /** Sealed agentic finance readiness statement for the firm, under the Mills Review headings, with gaps. */
1393
+ getReadinessStatement(): Promise<any>;
1394
+ /** Sealed third-party agents report: what each vendor's agents (agent `metadata.vendor`) did through Vorim. */
1395
+ getVendorReport(params?: {
1396
+ days?: number;
1397
+ }): Promise<any>;
1398
+ /** Complaints with their DISP 1.6 clocks and a summary (agent end to end, handed to a person, overdue). */
1399
+ listComplaints(params?: {
1400
+ days?: number;
1401
+ }): Promise<any>;
1402
+ /** Record a complaint as taken; name the agent if one took it. `ref` is the firm's opaque reference, never a name. */
1403
+ openComplaint(input: {
1404
+ ref: string;
1405
+ kind: 'payment' | 'other';
1406
+ receivedAt?: string;
1407
+ agentId?: string;
1408
+ caseRef?: string;
1409
+ }): Promise<any>;
1410
+ /** Record when a person stepped in, any holding reply, and the final response. `null` clears a field. */
1411
+ updateComplaint(ref: string, input: {
1412
+ toPersonAt?: string | null;
1413
+ holdingReplyAt?: string | null;
1414
+ finalResponseAt?: string | null;
1415
+ exceptional?: boolean;
1416
+ /** 4.8: the customer asked for a person to review, who did, when, and the plain-English answer given. */
1417
+ reviewRequestedAt?: string | null;
1418
+ reviewBy?: string | null;
1419
+ reviewDoneAt?: string | null;
1420
+ reviewAnswer?: string | null;
1421
+ }): Promise<any>;
1422
+ /**
1423
+ * A customer's own AI agent has contacted you (4.8). Record it: Vorim checks
1424
+ * the agent (`verify` is `{ method: 'rfc9421', request }`, `{ method: 'tap', url, headers }`,
1425
+ * `{ method: 'kya', document }` or `{ method: 'none', claimed_as? }`) and keeps the result.
1426
+ */
1427
+ openInboundAgentContact(input: {
1428
+ ref: string;
1429
+ channel: 'chat' | 'api' | 'voice' | 'email' | 'other';
1430
+ customerRef?: string;
1431
+ caseRef?: string;
1432
+ firmAgentId?: string;
1433
+ verify: Record<string, unknown>;
1434
+ }): Promise<any>;
1435
+ /** What happened next: asked, answered, action (with its decisionId), person_offered, handed_to_person, closed. */
1436
+ addInboundAgentEvent(ref: string, input: {
1437
+ kind: 'asked' | 'answered' | 'action' | 'person_offered' | 'handed_to_person' | 'closed';
1438
+ summary?: string;
1439
+ decisionId?: string;
1440
+ at?: string;
1441
+ }): Promise<any>;
1442
+ listInboundAgentContacts(params?: {
1443
+ days?: number;
1444
+ }): Promise<any>;
1445
+ /** The sealed record of one contact, with the gaps a complaint handler will ask about. */
1446
+ getInboundAgentRecord(ref: string): Promise<any>;
1447
+ /** Three sealed sample documents (made-up facts, real signatures) and the platform key. Public. */
1448
+ getPublicSampleEvidence(): Promise<{
1449
+ generated_at: string;
1450
+ documents: Record<'case_pack' | 'payment_consent' | 'kya', any>;
1451
+ public_key: {
1452
+ kid: string;
1453
+ alg: string;
1454
+ pem: string;
1455
+ };
1456
+ }>;
1290
1457
  /** Check any sealed Vorim document (case pack, sign-off, gateway verdict, mandate record). Public endpoint. */
1291
1458
  verifyEvidence(doc: {
1292
1459
  payload: unknown;
@@ -1296,6 +1463,7 @@ declare class VorimSDK {
1296
1463
  type: string;
1297
1464
  ok: boolean;
1298
1465
  reason: string | null;
1466
+ sample?: boolean;
1299
1467
  }>;
1300
1468
  /** Close an intent when the job ends. Further actions under it are off intent. */
1301
1469
  completeIntent(intentId: string, status?: 'completed' | 'abandoned', outcome?: string): Promise<any>;
@@ -1566,5 +1734,24 @@ declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResul
1566
1734
 
1567
1735
  /** The exact line a customer signs to withdraw a mandate (signedAt: ISO, within 5 minutes of sending). */
1568
1736
  declare function mandateWithdrawalLine(mandateId: string, signedAt: string): string;
1737
+ /** The line a customer signs to approve or refuse one held payment (4.7). Must match the server byte for byte. */
1738
+ declare function paymentApprovalLine(p: {
1739
+ mandateId: string;
1740
+ decisionId: string;
1741
+ resolution: 'approved' | 'denied';
1742
+ amount: number;
1743
+ currency: string | null;
1744
+ payee: string | null;
1745
+ signedAt: string;
1746
+ }): string;
1747
+ /** The line a customer signs to cancel one payment inside its cancel window (4.7). Must match the server byte for byte. */
1748
+ declare function paymentCancelLine(p: {
1749
+ mandateId: string;
1750
+ decisionId: string;
1751
+ amount: number;
1752
+ currency: string | null;
1753
+ payee: string | null;
1754
+ signedAt: string;
1755
+ }): string;
1569
1756
 
1570
- export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, CreateMandateInput, CustomerSignature, DeclareIntentInput, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, GatewayCheckInput, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, Intent, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, SuspendPreview, SwarmView, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalIntent, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, foldTraceparent, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, mandateWithdrawalLine, prepareReplayContext };
1757
+ export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, CreateMandateInput, CustomerSignature, DeclareIntentInput, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, GatewayCheckInput, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, Intent, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, SuspendPreview, SwarmView, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalIntent, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, foldTraceparent, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, mandateWithdrawalLine, paymentApprovalLine, paymentCancelLine, prepareReplayContext };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrationInput, T as TrustRecord, b as Agent, S as SuspendPreview, P as PermissionScope, c as PermissionCheckResult, D as DelegationLinkClaims, d as AgentDelegationRecord, W as WorkflowProvenanceGraph, C as CapabilityProfile, e as SharedMemoryWriteInput, f as SharedMemoryEntry, g as SharedMemoryListResult, B as BeforeActionInput, h as TokenBudgetInput, i as TokenBudget, j as BudgetSpend, k as AuditEventInput, l as SwarmView, m as DeclareIntentInput, I as Intent, n as CreateMandateInput, o as CustomerSignature, G as GatewayCheckInput } from './types-3hhqtL0W.js';
2
- export { p as AgentStatus, q as ApprovalAttestation, r as AuditEventType, s as AuditResult, t as BudgetEnforcement, u as BudgetScope, v as DecisionVerdict, M as MandateTerms, w as WorkflowGraphEdge, x as WorkflowGraphEvent, y as WorkflowGraphNode } from './types-3hhqtL0W.js';
1
+ import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrationInput, T as TrustRecord, b as Agent, S as SuspendPreview, P as PermissionScope, c as PermissionCheckResult, D as DelegationLinkClaims, d as AgentDelegationRecord, W as WorkflowProvenanceGraph, C as CapabilityProfile, e as SharedMemoryWriteInput, f as SharedMemoryEntry, g as SharedMemoryListResult, B as BeforeActionInput, h as TokenBudgetInput, i as TokenBudget, j as BudgetSpend, k as AuditEventInput, l as SwarmView, m as DeclareIntentInput, I as Intent, n as CreateMandateInput, o as CustomerSignature, G as GatewayCheckInput } from './types-B0UJBwuB.js';
2
+ export { p as AgentStatus, q as ApprovalAttestation, r as AuditEventType, s as AuditResult, t as BudgetEnforcement, u as BudgetScope, v as DecisionVerdict, M as MandateTerms, w as WorkflowGraphEdge, x as WorkflowGraphEvent, y as WorkflowGraphNode } from './types-B0UJBwuB.js';
3
3
  import { PortableSignedReceipt } from '@vorim/shared-types';
4
4
  export { PortableSignedReceipt, portableReceiptCanonicalBytes } from '@vorim/shared-types';
5
5
  import { HttpRequestLike, SignHttpRequestOptions, SignHttpRequestResult } from './httpSignatures.js';
@@ -1287,6 +1287,173 @@ declare class VorimSDK {
1287
1287
  alg: string | null;
1288
1288
  nonce: string | null;
1289
1289
  }>;
1290
+ /** The Consumer Duty board report as it stands (PRIN 2A.8): harm signals, data gaps, unanswered signals. Not sealed. */
1291
+ getBoardReportDraft(params?: {
1292
+ days?: number;
1293
+ }): Promise<any>;
1294
+ /**
1295
+ * Issue a sealed board report with the firm's actions (each needs an owner
1296
+ * and a due date) and the board's own words. Field names as the REST API
1297
+ * names them: `{ days, actions: [{ title, owner, due, status, signal, measure, evidence_of_effect }], board: { approved_by, approved_on, conclusion, strategy, challenge, contributors } }`.
1298
+ */
1299
+ issueBoardReport(input: Record<string, unknown>): Promise<any>;
1300
+ listBoardReports(): Promise<any[]>;
1301
+ /** One sealed board report with its verification result and the platform key. */
1302
+ getBoardReport(id: string): Promise<any>;
1303
+ /** DORA register of information rows (B_05.01, B_02.02, B_07.01) for the model providers and agent vendors in use, sealed. */
1304
+ getIctRegister(params?: {
1305
+ days?: number;
1306
+ }): Promise<any>;
1307
+ /** Save what only the firm knows about a provider or vendor (LEI, contract, criticality...). Field names as the REST API names them. */
1308
+ setIctProviderRecord(providerKey: string, record: Record<string, unknown>): Promise<any>;
1309
+ /** Mirror a UK Open Banking domestic VRP consent as a pending mandate the customer's key signs. Not tested with a bank or PISP. */
1310
+ importVrpConsent(input: {
1311
+ consent: unknown;
1312
+ agentId: string;
1313
+ customerRef: string;
1314
+ alg: 'ES256' | 'EdDSA';
1315
+ publicKeyJwk: Record<string, unknown>;
1316
+ actionTypes?: string[];
1317
+ expiresAt?: string;
1318
+ }): Promise<{
1319
+ mandate: any;
1320
+ signing_input: string;
1321
+ imported_from: any;
1322
+ }>;
1323
+ /** The mandate as draft VRP ControlParameters, with what a VRP consent cannot carry. */
1324
+ exportMandateVrp(mandateId: string, params?: {
1325
+ vrpType?: string;
1326
+ }): Promise<any>;
1327
+ /** The models an agent's own events showed, against the model recorded on its page. */
1328
+ getAgentModels(agentId: string): Promise<any>;
1329
+ /** Sealed APP scam claim pack for a case: payments, interventions, scope, deadlines. Never decides the claim. */
1330
+ getAppFraudPack(caseRef: string): Promise<any>;
1331
+ /** The firm's facts about the claim (reported date, rail, customer type, recovered amount...). Field names as the REST API names them. */
1332
+ saveAppFraudClaim(caseRef: string, claim: Record<string, unknown>): Promise<any>;
1333
+ /** Payments under a mandate waiting for the customer (above `stepUpAbove`), each with the lines to sign. */
1334
+ listHeldPayments(mandateId: string): Promise<{
1335
+ mandate_id: string;
1336
+ held: Array<{
1337
+ decision_id: string;
1338
+ amount: number;
1339
+ currency: string | null;
1340
+ payee: string | null;
1341
+ signed_at: string;
1342
+ approve_line: string;
1343
+ refuse_line: string;
1344
+ }>;
1345
+ }>;
1346
+ /**
1347
+ * The customer approves or refuses a held payment with the mandate key; no
1348
+ * Vorim account is involved. Sign `paymentApprovalLine(...)` (or the line
1349
+ * from `listHeldPayments`) on the device; `signedAt` within 5 minutes.
1350
+ */
1351
+ resolveHeldPayment(mandateId: string, decisionId: string, input: {
1352
+ resolution: 'approved' | 'denied';
1353
+ signedAt: string;
1354
+ signature: CustomerSignature;
1355
+ }): Promise<any>;
1356
+ /** Payments under a mandate the customer can still cancel (`cancelWithinMinutes`), each with the line to sign. */
1357
+ listCancellablePayments(mandateId: string): Promise<{
1358
+ mandate_id: string;
1359
+ cancellable: Array<{
1360
+ decision_id: string;
1361
+ amount: number;
1362
+ currency: string | null;
1363
+ payee: string | null;
1364
+ cancel_until: string;
1365
+ signed_at: string;
1366
+ cancel_line: string;
1367
+ }>;
1368
+ }>;
1369
+ /**
1370
+ * The customer cancels a payment inside its cancel window with the mandate
1371
+ * key; no Vorim account is involved. Sign `paymentCancelLine(...)` (or the
1372
+ * line from `listCancellablePayments`); `signedAt` within 5 minutes. The
1373
+ * amount goes back to the mandate; the firm must not release the payment.
1374
+ */
1375
+ cancelPayment(mandateId: string, decisionId: string, input: {
1376
+ signedAt: string;
1377
+ signature: CustomerSignature;
1378
+ }): Promise<{
1379
+ decision_id: string;
1380
+ mandate_id: string;
1381
+ cancelled_at: string;
1382
+ amount_given_back: number;
1383
+ }>;
1384
+ /** Sealed consent record for one agent payment (PSRs 2017); with `reportedAt`, the refund and complaint deadlines. */
1385
+ getPaymentConsent(decisionId: string, params?: {
1386
+ reportedAt?: string;
1387
+ }): Promise<any>;
1388
+ /** Every payment in a case with its consent verdict (not sealed). */
1389
+ getCaseConsent(caseRef: string): Promise<any[]>;
1390
+ /** Sealed Know Your Agent document for one agent, valid 24 hours. Not a KYA standard or certification. */
1391
+ getKyaDocument(agentId: string): Promise<any>;
1392
+ /** Sealed agentic finance readiness statement for the firm, under the Mills Review headings, with gaps. */
1393
+ getReadinessStatement(): Promise<any>;
1394
+ /** Sealed third-party agents report: what each vendor's agents (agent `metadata.vendor`) did through Vorim. */
1395
+ getVendorReport(params?: {
1396
+ days?: number;
1397
+ }): Promise<any>;
1398
+ /** Complaints with their DISP 1.6 clocks and a summary (agent end to end, handed to a person, overdue). */
1399
+ listComplaints(params?: {
1400
+ days?: number;
1401
+ }): Promise<any>;
1402
+ /** Record a complaint as taken; name the agent if one took it. `ref` is the firm's opaque reference, never a name. */
1403
+ openComplaint(input: {
1404
+ ref: string;
1405
+ kind: 'payment' | 'other';
1406
+ receivedAt?: string;
1407
+ agentId?: string;
1408
+ caseRef?: string;
1409
+ }): Promise<any>;
1410
+ /** Record when a person stepped in, any holding reply, and the final response. `null` clears a field. */
1411
+ updateComplaint(ref: string, input: {
1412
+ toPersonAt?: string | null;
1413
+ holdingReplyAt?: string | null;
1414
+ finalResponseAt?: string | null;
1415
+ exceptional?: boolean;
1416
+ /** 4.8: the customer asked for a person to review, who did, when, and the plain-English answer given. */
1417
+ reviewRequestedAt?: string | null;
1418
+ reviewBy?: string | null;
1419
+ reviewDoneAt?: string | null;
1420
+ reviewAnswer?: string | null;
1421
+ }): Promise<any>;
1422
+ /**
1423
+ * A customer's own AI agent has contacted you (4.8). Record it: Vorim checks
1424
+ * the agent (`verify` is `{ method: 'rfc9421', request }`, `{ method: 'tap', url, headers }`,
1425
+ * `{ method: 'kya', document }` or `{ method: 'none', claimed_as? }`) and keeps the result.
1426
+ */
1427
+ openInboundAgentContact(input: {
1428
+ ref: string;
1429
+ channel: 'chat' | 'api' | 'voice' | 'email' | 'other';
1430
+ customerRef?: string;
1431
+ caseRef?: string;
1432
+ firmAgentId?: string;
1433
+ verify: Record<string, unknown>;
1434
+ }): Promise<any>;
1435
+ /** What happened next: asked, answered, action (with its decisionId), person_offered, handed_to_person, closed. */
1436
+ addInboundAgentEvent(ref: string, input: {
1437
+ kind: 'asked' | 'answered' | 'action' | 'person_offered' | 'handed_to_person' | 'closed';
1438
+ summary?: string;
1439
+ decisionId?: string;
1440
+ at?: string;
1441
+ }): Promise<any>;
1442
+ listInboundAgentContacts(params?: {
1443
+ days?: number;
1444
+ }): Promise<any>;
1445
+ /** The sealed record of one contact, with the gaps a complaint handler will ask about. */
1446
+ getInboundAgentRecord(ref: string): Promise<any>;
1447
+ /** Three sealed sample documents (made-up facts, real signatures) and the platform key. Public. */
1448
+ getPublicSampleEvidence(): Promise<{
1449
+ generated_at: string;
1450
+ documents: Record<'case_pack' | 'payment_consent' | 'kya', any>;
1451
+ public_key: {
1452
+ kid: string;
1453
+ alg: string;
1454
+ pem: string;
1455
+ };
1456
+ }>;
1290
1457
  /** Check any sealed Vorim document (case pack, sign-off, gateway verdict, mandate record). Public endpoint. */
1291
1458
  verifyEvidence(doc: {
1292
1459
  payload: unknown;
@@ -1296,6 +1463,7 @@ declare class VorimSDK {
1296
1463
  type: string;
1297
1464
  ok: boolean;
1298
1465
  reason: string | null;
1466
+ sample?: boolean;
1299
1467
  }>;
1300
1468
  /** Close an intent when the job ends. Further actions under it are off intent. */
1301
1469
  completeIntent(intentId: string, status?: 'completed' | 'abandoned', outcome?: string): Promise<any>;
@@ -1566,5 +1734,24 @@ declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResul
1566
1734
 
1567
1735
  /** The exact line a customer signs to withdraw a mandate (signedAt: ISO, within 5 minutes of sending). */
1568
1736
  declare function mandateWithdrawalLine(mandateId: string, signedAt: string): string;
1737
+ /** The line a customer signs to approve or refuse one held payment (4.7). Must match the server byte for byte. */
1738
+ declare function paymentApprovalLine(p: {
1739
+ mandateId: string;
1740
+ decisionId: string;
1741
+ resolution: 'approved' | 'denied';
1742
+ amount: number;
1743
+ currency: string | null;
1744
+ payee: string | null;
1745
+ signedAt: string;
1746
+ }): string;
1747
+ /** The line a customer signs to cancel one payment inside its cancel window (4.7). Must match the server byte for byte. */
1748
+ declare function paymentCancelLine(p: {
1749
+ mandateId: string;
1750
+ decisionId: string;
1751
+ amount: number;
1752
+ currency: string | null;
1753
+ payee: string | null;
1754
+ signedAt: string;
1755
+ }): string;
1569
1756
 
1570
- export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, CreateMandateInput, CustomerSignature, DeclareIntentInput, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, GatewayCheckInput, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, Intent, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, SuspendPreview, SwarmView, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalIntent, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, foldTraceparent, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, mandateWithdrawalLine, prepareReplayContext };
1757
+ export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, CreateMandateInput, CustomerSignature, DeclareIntentInput, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, GatewayCheckInput, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, Intent, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, SuspendPreview, SwarmView, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalIntent, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, foldTraceparent, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, mandateWithdrawalLine, paymentApprovalLine, paymentCancelLine, prepareReplayContext };
package/dist/index.js CHANGED
@@ -875,7 +875,7 @@ function canonicalIntent(value) {
875
875
  const keys = Object.keys(obj).filter((k) => obj[k] !== void 0).sort();
876
876
  return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalIntent(obj[k])}`).join(",")}}`;
877
877
  }
878
- var SDK_VERSION = true ? "4.6.0" : "0.0.0";
878
+ var SDK_VERSION = true ? "4.8.0" : "0.0.0";
879
879
  var USER_AGENT = `vorim-sdk/${SDK_VERSION}`;
880
880
  function sleep(ms) {
881
881
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -1499,7 +1499,8 @@ var VorimSDK = class _VorimSDK {
1499
1499
  traceparent: input.traceparent,
1500
1500
  intent_id: input.intentId,
1501
1501
  case_ref: input.caseRef,
1502
- mandate_id: input.mandateId
1502
+ mandate_id: input.mandateId,
1503
+ sources: input.sources
1503
1504
  };
1504
1505
  let raw;
1505
1506
  try {
@@ -1676,7 +1677,8 @@ var VorimSDK = class _VorimSDK {
1676
1677
  id: typeof raw.intent.id === "string" ? raw.intent.id : null,
1677
1678
  alignment: raw.intent.alignment === "aligned" || raw.intent.alignment === "off_intent" ? raw.intent.alignment : "none",
1678
1679
  reasons: Array.isArray(raw.intent.reasons) ? raw.intent.reasons.filter((r) => typeof r === "string") : []
1679
- } : null
1680
+ } : null,
1681
+ ...typeof raw?.cancel_until === "string" ? { cancelUntil: raw.cancel_until } : {}
1680
1682
  };
1681
1683
  }
1682
1684
  // ─── Audit ────────────────────────────────────────────────────────
@@ -2094,7 +2096,12 @@ var VorimSDK = class _VorimSDK {
2094
2096
  max_total: t.maxTotal,
2095
2097
  max_uses: t.maxUses,
2096
2098
  read_only: t.readOnly,
2097
- amount_field: t.amountField
2099
+ amount_field: t.amountField,
2100
+ periodic_limits: t.periodicLimits,
2101
+ valid_from: t.validFrom,
2102
+ step_up_above: t.stepUpAbove,
2103
+ target_limits: t.targetLimits?.map((l) => ({ target: l.target, max_amount: l.maxAmount, max_total: l.maxTotal })),
2104
+ cancel_within_minutes: t.cancelWithinMinutes
2098
2105
  },
2099
2106
  expires_at: input.expiresAt,
2100
2107
  key_attestation: !input.keyAttestation ? void 0 : input.keyAttestation.format === "android-key" ? { format: "android-key", certificate_chain: input.keyAttestation.certificateChain, challenge: input.keyAttestation.challenge } : {
@@ -2298,6 +2305,151 @@ var VorimSDK = class _VorimSDK {
2298
2305
  async verifyTap(input) {
2299
2306
  return this.post("/gateway/tap/verify", { url: input.url, headers: input.headers, keys: input.keys, require_tag: input.requireTag });
2300
2307
  }
2308
+ // ─── Evidence and mandates, rounds three to five (4.7) ────────────────
2309
+ /** The Consumer Duty board report as it stands (PRIN 2A.8): harm signals, data gaps, unanswered signals. Not sealed. */
2310
+ async getBoardReportDraft(params = {}) {
2311
+ return this.get(`/evidence/board-report/draft${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2312
+ }
2313
+ /**
2314
+ * Issue a sealed board report with the firm's actions (each needs an owner
2315
+ * and a due date) and the board's own words. Field names as the REST API
2316
+ * names them: `{ days, actions: [{ title, owner, due, status, signal, measure, evidence_of_effect }], board: { approved_by, approved_on, conclusion, strategy, challenge, contributors } }`.
2317
+ */
2318
+ async issueBoardReport(input) {
2319
+ return this.post("/evidence/board-reports", input);
2320
+ }
2321
+ async listBoardReports() {
2322
+ return this.get("/evidence/board-reports");
2323
+ }
2324
+ /** One sealed board report with its verification result and the platform key. */
2325
+ async getBoardReport(id) {
2326
+ return this.get(`/evidence/board-reports/${encodeURIComponent(id)}`);
2327
+ }
2328
+ /** DORA register of information rows (B_05.01, B_02.02, B_07.01) for the model providers and agent vendors in use, sealed. */
2329
+ async getIctRegister(params = {}) {
2330
+ return this.get(`/evidence/ict-register${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2331
+ }
2332
+ /** Save what only the firm knows about a provider or vendor (LEI, contract, criticality...). Field names as the REST API names them. */
2333
+ async setIctProviderRecord(providerKey, record) {
2334
+ return this.put(`/evidence/ict-register/providers/${encodeURIComponent(providerKey)}`, record);
2335
+ }
2336
+ /** Mirror a UK Open Banking domestic VRP consent as a pending mandate the customer's key signs. Not tested with a bank or PISP. */
2337
+ async importVrpConsent(input) {
2338
+ return this.post("/mandates/import-vrp", {
2339
+ consent: input.consent,
2340
+ agent_id: input.agentId,
2341
+ customer_ref: input.customerRef,
2342
+ alg: input.alg,
2343
+ public_key_jwk: input.publicKeyJwk,
2344
+ action_types: input.actionTypes,
2345
+ expires_at: input.expiresAt
2346
+ });
2347
+ }
2348
+ /** The mandate as draft VRP ControlParameters, with what a VRP consent cannot carry. */
2349
+ async exportMandateVrp(mandateId, params = {}) {
2350
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/vrp${params.vrpType ? `?vrp_type=${encodeURIComponent(params.vrpType)}` : ""}`);
2351
+ }
2352
+ /** The models an agent's own events showed, against the model recorded on its page. */
2353
+ async getAgentModels(agentId) {
2354
+ return this.get(`/agents/${encodeURIComponent(agentId)}/models`);
2355
+ }
2356
+ /** Sealed APP scam claim pack for a case: payments, interventions, scope, deadlines. Never decides the claim. */
2357
+ async getAppFraudPack(caseRef) {
2358
+ return this.get(`/evidence/app-fraud/${encodeURIComponent(caseRef)}`);
2359
+ }
2360
+ /** The firm's facts about the claim (reported date, rail, customer type, recovered amount...). Field names as the REST API names them. */
2361
+ async saveAppFraudClaim(caseRef, claim) {
2362
+ return this.put(`/evidence/app-fraud/${encodeURIComponent(caseRef)}/claim`, claim);
2363
+ }
2364
+ /** Payments under a mandate waiting for the customer (above `stepUpAbove`), each with the lines to sign. */
2365
+ async listHeldPayments(mandateId) {
2366
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/held`);
2367
+ }
2368
+ /**
2369
+ * The customer approves or refuses a held payment with the mandate key; no
2370
+ * Vorim account is involved. Sign `paymentApprovalLine(...)` (or the line
2371
+ * from `listHeldPayments`) on the device; `signedAt` within 5 minutes.
2372
+ */
2373
+ async resolveHeldPayment(mandateId, decisionId, input) {
2374
+ return this.post(`/mandates/${encodeURIComponent(mandateId)}/payments/${encodeURIComponent(decisionId)}`, { resolution: input.resolution, signed_at: input.signedAt, signature: input.signature });
2375
+ }
2376
+ /** Payments under a mandate the customer can still cancel (`cancelWithinMinutes`), each with the line to sign. */
2377
+ async listCancellablePayments(mandateId) {
2378
+ return this.get(`/mandates/${encodeURIComponent(mandateId)}/cancellable`);
2379
+ }
2380
+ /**
2381
+ * The customer cancels a payment inside its cancel window with the mandate
2382
+ * key; no Vorim account is involved. Sign `paymentCancelLine(...)` (or the
2383
+ * line from `listCancellablePayments`); `signedAt` within 5 minutes. The
2384
+ * amount goes back to the mandate; the firm must not release the payment.
2385
+ */
2386
+ async cancelPayment(mandateId, decisionId, input) {
2387
+ return this.post(`/mandates/${encodeURIComponent(mandateId)}/payments/${encodeURIComponent(decisionId)}/cancel`, { signed_at: input.signedAt, signature: input.signature });
2388
+ }
2389
+ /** Sealed consent record for one agent payment (PSRs 2017); with `reportedAt`, the refund and complaint deadlines. */
2390
+ async getPaymentConsent(decisionId, params = {}) {
2391
+ return this.get(`/evidence/payments/${encodeURIComponent(decisionId)}/consent${params.reportedAt ? `?reported_at=${encodeURIComponent(params.reportedAt)}` : ""}`);
2392
+ }
2393
+ /** Every payment in a case with its consent verdict (not sealed). */
2394
+ async getCaseConsent(caseRef) {
2395
+ return this.get(`/evidence/cases/${encodeURIComponent(caseRef)}/consent`);
2396
+ }
2397
+ /** Sealed Know Your Agent document for one agent, valid 24 hours. Not a KYA standard or certification. */
2398
+ async getKyaDocument(agentId) {
2399
+ return this.get(`/evidence/kya/${encodeURIComponent(agentId)}`);
2400
+ }
2401
+ /** Sealed agentic finance readiness statement for the firm, under the Mills Review headings, with gaps. */
2402
+ async getReadinessStatement() {
2403
+ return this.get("/evidence/readiness");
2404
+ }
2405
+ /** Sealed third-party agents report: what each vendor's agents (agent `metadata.vendor`) did through Vorim. */
2406
+ async getVendorReport(params = {}) {
2407
+ return this.get(`/evidence/vendors${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2408
+ }
2409
+ /** Complaints with their DISP 1.6 clocks and a summary (agent end to end, handed to a person, overdue). */
2410
+ async listComplaints(params = {}) {
2411
+ return this.get(`/evidence/complaints${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2412
+ }
2413
+ /** Record a complaint as taken; name the agent if one took it. `ref` is the firm's opaque reference, never a name. */
2414
+ async openComplaint(input) {
2415
+ return this.post("/evidence/complaints", { ref: input.ref, kind: input.kind, received_at: input.receivedAt, agent_id: input.agentId, case_ref: input.caseRef });
2416
+ }
2417
+ /** Record when a person stepped in, any holding reply, and the final response. `null` clears a field. */
2418
+ async updateComplaint(ref, input) {
2419
+ const body = {};
2420
+ if (input.reviewRequestedAt !== void 0) body.review_requested_at = input.reviewRequestedAt;
2421
+ if (input.reviewBy !== void 0) body.review_by = input.reviewBy;
2422
+ if (input.reviewDoneAt !== void 0) body.review_done_at = input.reviewDoneAt;
2423
+ if (input.reviewAnswer !== void 0) body.review_answer = input.reviewAnswer;
2424
+ if (input.toPersonAt !== void 0) body.to_person_at = input.toPersonAt;
2425
+ if (input.holdingReplyAt !== void 0) body.holding_reply_at = input.holdingReplyAt;
2426
+ if (input.finalResponseAt !== void 0) body.final_response_at = input.finalResponseAt;
2427
+ if (input.exceptional !== void 0) body.exceptional = input.exceptional;
2428
+ return this.patch(`/evidence/complaints/${encodeURIComponent(ref)}`, body);
2429
+ }
2430
+ /**
2431
+ * A customer's own AI agent has contacted you (4.8). Record it: Vorim checks
2432
+ * the agent (`verify` is `{ method: 'rfc9421', request }`, `{ method: 'tap', url, headers }`,
2433
+ * `{ method: 'kya', document }` or `{ method: 'none', claimed_as? }`) and keeps the result.
2434
+ */
2435
+ async openInboundAgentContact(input) {
2436
+ 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 });
2437
+ }
2438
+ /** What happened next: asked, answered, action (with its decisionId), person_offered, handed_to_person, closed. */
2439
+ async addInboundAgentEvent(ref, input) {
2440
+ return this.post(`/evidence/inbound-agents/${encodeURIComponent(ref)}/events`, { kind: input.kind, summary: input.summary, decision_id: input.decisionId, at: input.at });
2441
+ }
2442
+ async listInboundAgentContacts(params = {}) {
2443
+ return this.get(`/evidence/inbound-agents${params.days ? `?days=${encodeURIComponent(String(params.days))}` : ""}`);
2444
+ }
2445
+ /** The sealed record of one contact, with the gaps a complaint handler will ask about. */
2446
+ async getInboundAgentRecord(ref) {
2447
+ return this.get(`/evidence/inbound-agents/${encodeURIComponent(ref)}`);
2448
+ }
2449
+ /** Three sealed sample documents (made-up facts, real signatures) and the platform key. Public. */
2450
+ async getPublicSampleEvidence() {
2451
+ return this.get("/evidence/public-sample");
2452
+ }
2301
2453
  /** Check any sealed Vorim document (case pack, sign-off, gateway verdict, mandate record). Public endpoint. */
2302
2454
  async verifyEvidence(doc) {
2303
2455
  return this.post("/evidence/verify", { payload: doc.payload, hash: doc.hash, signature: doc.signature });
@@ -2719,6 +2871,12 @@ async function deviceLogin(opts) {
2719
2871
  function mandateWithdrawalLine(mandateId, signedAt) {
2720
2872
  return `vorim-mandate-withdraw|v1|${mandateId}|${signedAt}`;
2721
2873
  }
2874
+ function paymentApprovalLine(p) {
2875
+ return ["vorim-payment-approval", "v1", p.mandateId, p.decisionId, p.resolution, String(p.amount), p.currency ?? "", p.payee ?? "", p.signedAt].join("|");
2876
+ }
2877
+ function paymentCancelLine(p) {
2878
+ return ["vorim-payment-cancel", "v1", p.mandateId, p.decisionId, String(p.amount), p.currency ?? "", p.payee ?? "", p.signedAt].join("|");
2879
+ }
2722
2880
  export {
2723
2881
  CANONICAL_TOOL_CATALOGUE_VERSION,
2724
2882
  HMAC_SHA256_PREFIX,
@@ -2747,6 +2905,8 @@ export {
2747
2905
  isKeyedCommitment,
2748
2906
  jcsCanonicalise,
2749
2907
  mandateWithdrawalLine,
2908
+ paymentApprovalLine,
2909
+ paymentCancelLine,
2750
2910
  portableReceiptCanonicalBytes,
2751
2911
  prepareReplayContext,
2752
2912
  signHttpRequest,