@astrasyncai/verification-gateway 5.5.0 → 5.6.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 (94) hide show
  1. package/README.md +14 -5
  2. package/dist/adapters/express.d.mts +1 -1
  3. package/dist/adapters/express.d.ts +1 -1
  4. package/dist/adapters/express.js +8 -3
  5. package/dist/adapters/express.js.map +1 -1
  6. package/dist/adapters/express.mjs +8 -3
  7. package/dist/adapters/express.mjs.map +1 -1
  8. package/dist/adapters/mcp.d.mts +1 -1
  9. package/dist/adapters/mcp.d.ts +1 -1
  10. package/dist/adapters/mcp.js +8 -3
  11. package/dist/adapters/mcp.js.map +1 -1
  12. package/dist/adapters/mcp.mjs +8 -3
  13. package/dist/adapters/mcp.mjs.map +1 -1
  14. package/dist/adapters/nextjs.d.mts +1 -1
  15. package/dist/adapters/nextjs.d.ts +1 -1
  16. package/dist/adapters/nextjs.js +8 -3
  17. package/dist/adapters/nextjs.js.map +1 -1
  18. package/dist/adapters/nextjs.mjs +8 -3
  19. package/dist/adapters/nextjs.mjs.map +1 -1
  20. package/dist/adapters/sdk.d.mts +12 -1
  21. package/dist/adapters/sdk.d.ts +12 -1
  22. package/dist/adapters/sdk.js +17 -3
  23. package/dist/adapters/sdk.js.map +1 -1
  24. package/dist/adapters/sdk.mjs +17 -3
  25. package/dist/adapters/sdk.mjs.map +1 -1
  26. package/dist/agent/index.js +1 -1
  27. package/dist/agent/index.js.map +1 -1
  28. package/dist/agent/index.mjs +1 -1
  29. package/dist/agent/index.mjs.map +1 -1
  30. package/dist/bin/astrasync-claude-hook.js +8 -3
  31. package/dist/bin/astrasync-codex-hook.js +8 -3
  32. package/dist/bin/astrasync-guard.js +8 -3
  33. package/dist/bin/astrasync.js +8 -3
  34. package/dist/browser/background.js +8 -3
  35. package/dist/browser/background.js.map +1 -1
  36. package/dist/browser/background.mjs +8 -3
  37. package/dist/browser/background.mjs.map +1 -1
  38. package/dist/cli/index.js +1 -1
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/cli/index.mjs +1 -1
  41. package/dist/cli/index.mjs.map +1 -1
  42. package/dist/codex/index.js +8 -3
  43. package/dist/codex/index.js.map +1 -1
  44. package/dist/codex/index.mjs +8 -3
  45. package/dist/codex/index.mjs.map +1 -1
  46. package/dist/cursor/extension.js +8 -3
  47. package/dist/cursor/extension.js.map +1 -1
  48. package/dist/cursor/extension.mjs +8 -3
  49. package/dist/cursor/extension.mjs.map +1 -1
  50. package/dist/edge-config.d.mts +1 -1
  51. package/dist/edge-config.d.ts +1 -1
  52. package/dist/edge-config.js +1 -1
  53. package/dist/edge-config.js.map +1 -1
  54. package/dist/edge-config.mjs +1 -1
  55. package/dist/edge-config.mjs.map +1 -1
  56. package/dist/edge-core/index.d.mts +1 -1
  57. package/dist/edge-core/index.d.ts +1 -1
  58. package/dist/edge-core/index.js +8 -3
  59. package/dist/edge-core/index.js.map +1 -1
  60. package/dist/edge-core/index.mjs +8 -3
  61. package/dist/edge-core/index.mjs.map +1 -1
  62. package/dist/gateway/gateway.js +8 -3
  63. package/dist/gateway/gateway.js.map +1 -1
  64. package/dist/gateway/gateway.mjs +8 -3
  65. package/dist/gateway/gateway.mjs.map +1 -1
  66. package/dist/git-trigger/git-hooks.d.mts +1 -1
  67. package/dist/git-trigger/git-hooks.d.ts +1 -1
  68. package/dist/index.d.mts +47 -3
  69. package/dist/index.d.ts +47 -3
  70. package/dist/index.js +17 -3
  71. package/dist/index.js.map +1 -1
  72. package/dist/index.mjs +17 -3
  73. package/dist/index.mjs.map +1 -1
  74. package/dist/registration/index.js +1 -1
  75. package/dist/registration/index.js.map +1 -1
  76. package/dist/registration/index.mjs +1 -1
  77. package/dist/registration/index.mjs.map +1 -1
  78. package/dist/transport/index.js +1 -1
  79. package/dist/transport/index.js.map +1 -1
  80. package/dist/transport/index.mjs +1 -1
  81. package/dist/transport/index.mjs.map +1 -1
  82. package/dist/{types-C-hPsi9M.d.mts → types-BCmHFdkJ.d.mts} +33 -0
  83. package/dist/{types-D8DDG-qK.d.mts → types-BK_pRNSs.d.mts} +33 -0
  84. package/dist/{types-D8DDG-qK.d.ts → types-BK_pRNSs.d.ts} +33 -0
  85. package/dist/{types-CKouL1Tv.d.ts → types-CwY5IY-0.d.ts} +33 -0
  86. package/dist/ui/index.d.mts +1 -1
  87. package/dist/ui/index.d.ts +1 -1
  88. package/dist/verify.d.mts +1 -1
  89. package/dist/verify.d.ts +1 -1
  90. package/dist/verify.js +8 -3
  91. package/dist/verify.js.map +1 -1
  92. package/dist/verify.mjs +8 -3
  93. package/dist/verify.mjs.map +1 -1
  94. package/package.json +1 -1
@@ -437,6 +437,18 @@ interface VerificationResult {
437
437
  * your report never arrives.
438
438
  */
439
439
  settlementToken?: MerchantSettlementToken;
440
+ /**
441
+ * 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
442
+ * The platform always resolves an email for the merchant — the agent's
443
+ * `buyerEmail` when one was supplied, else the buyer's account email
444
+ * (`emailSource` says which). Present on every first-party confirm leg that
445
+ * progressed (settled, pending_merchant, held, requires_action) so it can be
446
+ * stored with a pending order; only FULFIL against it once the order is
447
+ * settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
448
+ * the bridge strips it from the agent plane. An explicit `buyerEmail` on the
449
+ * confirm handoff body wins over `fulfilment.email` (the platform default).
450
+ */
451
+ fulfilment?: FulfilmentInfo;
440
452
  /** Timestamp of verification */
441
453
  verifiedAt: Date;
442
454
  /** TTL for this result (seconds) */
@@ -467,6 +479,18 @@ interface MerchantSettlementToken {
467
479
  /** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
468
480
  expiresAt: string;
469
481
  }
482
+ /**
483
+ * 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
484
+ * (same rule as settlement statuses): treat unknown sources like
485
+ * 'agent_provided' — the email is still the one to use.
486
+ */
487
+ interface FulfilmentInfo {
488
+ /** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
489
+ email: string;
490
+ /** 'agent_provided' = the agent passed buyerEmail on this confirm;
491
+ * 'account' = platform default — the buyer's account email. */
492
+ emailSource: 'agent_provided' | 'account' | (string & {});
493
+ }
470
494
  /**
471
495
  * 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
472
496
  * settlement. Carries NO voucher/instrument material — the settlement channel
@@ -576,6 +600,15 @@ interface VerificationRequest {
576
600
  currency: string;
577
601
  };
578
602
  }>;
603
+ /**
604
+ * 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
605
+ * confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
606
+ * back (canonicalized) in `VerificationResult.fulfilment` for first-party
607
+ * merchants and never persists it. When omitted, the platform defaults
608
+ * `fulfilment.email` to the buyer's account email, so supplying this is
609
+ * only needed for an alternate contact (gift delivery etc.).
610
+ */
611
+ buyerEmail?: string;
579
612
  /** Whether this is a sub-agent request */
580
613
  isSubAgentRequest?: boolean;
581
614
  /** Parent agent ID for sub-agent requests */
@@ -487,6 +487,18 @@ interface VerificationResult {
487
487
  * your report never arrives.
488
488
  */
489
489
  settlementToken?: MerchantSettlementToken;
490
+ /**
491
+ * 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
492
+ * The platform always resolves an email for the merchant — the agent's
493
+ * `buyerEmail` when one was supplied, else the buyer's account email
494
+ * (`emailSource` says which). Present on every first-party confirm leg that
495
+ * progressed (settled, pending_merchant, held, requires_action) so it can be
496
+ * stored with a pending order; only FULFIL against it once the order is
497
+ * settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
498
+ * the bridge strips it from the agent plane. An explicit `buyerEmail` on the
499
+ * confirm handoff body wins over `fulfilment.email` (the platform default).
500
+ */
501
+ fulfilment?: FulfilmentInfo;
490
502
  /** Timestamp of verification */
491
503
  verifiedAt: Date;
492
504
  /** TTL for this result (seconds) */
@@ -517,6 +529,18 @@ interface MerchantSettlementToken {
517
529
  /** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
518
530
  expiresAt: string;
519
531
  }
532
+ /**
533
+ * 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
534
+ * (same rule as settlement statuses): treat unknown sources like
535
+ * 'agent_provided' — the email is still the one to use.
536
+ */
537
+ interface FulfilmentInfo {
538
+ /** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
539
+ email: string;
540
+ /** 'agent_provided' = the agent passed buyerEmail on this confirm;
541
+ * 'account' = platform default — the buyer's account email. */
542
+ emailSource: 'agent_provided' | 'account' | (string & {});
543
+ }
520
544
  /**
521
545
  * 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
522
546
  * settlement. Carries NO voucher/instrument material — the settlement channel
@@ -626,6 +650,15 @@ interface VerificationRequest {
626
650
  currency: string;
627
651
  };
628
652
  }>;
653
+ /**
654
+ * 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
655
+ * confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
656
+ * back (canonicalized) in `VerificationResult.fulfilment` for first-party
657
+ * merchants and never persists it. When omitted, the platform defaults
658
+ * `fulfilment.email` to the buyer's account email, so supplying this is
659
+ * only needed for an alternate contact (gift delivery etc.).
660
+ */
661
+ buyerEmail?: string;
629
662
  /** Whether this is a sub-agent request */
630
663
  isSubAgentRequest?: boolean;
631
664
  /** Parent agent ID for sub-agent requests */
@@ -487,6 +487,18 @@ interface VerificationResult {
487
487
  * your report never arrives.
488
488
  */
489
489
  settlementToken?: MerchantSettlementToken;
490
+ /**
491
+ * 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
492
+ * The platform always resolves an email for the merchant — the agent's
493
+ * `buyerEmail` when one was supplied, else the buyer's account email
494
+ * (`emailSource` says which). Present on every first-party confirm leg that
495
+ * progressed (settled, pending_merchant, held, requires_action) so it can be
496
+ * stored with a pending order; only FULFIL against it once the order is
497
+ * settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
498
+ * the bridge strips it from the agent plane. An explicit `buyerEmail` on the
499
+ * confirm handoff body wins over `fulfilment.email` (the platform default).
500
+ */
501
+ fulfilment?: FulfilmentInfo;
490
502
  /** Timestamp of verification */
491
503
  verifiedAt: Date;
492
504
  /** TTL for this result (seconds) */
@@ -517,6 +529,18 @@ interface MerchantSettlementToken {
517
529
  /** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
518
530
  expiresAt: string;
519
531
  }
532
+ /**
533
+ * 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
534
+ * (same rule as settlement statuses): treat unknown sources like
535
+ * 'agent_provided' — the email is still the one to use.
536
+ */
537
+ interface FulfilmentInfo {
538
+ /** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
539
+ email: string;
540
+ /** 'agent_provided' = the agent passed buyerEmail on this confirm;
541
+ * 'account' = platform default — the buyer's account email. */
542
+ emailSource: 'agent_provided' | 'account' | (string & {});
543
+ }
520
544
  /**
521
545
  * 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
522
546
  * settlement. Carries NO voucher/instrument material — the settlement channel
@@ -626,6 +650,15 @@ interface VerificationRequest {
626
650
  currency: string;
627
651
  };
628
652
  }>;
653
+ /**
654
+ * 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
655
+ * confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
656
+ * back (canonicalized) in `VerificationResult.fulfilment` for first-party
657
+ * merchants and never persists it. When omitted, the platform defaults
658
+ * `fulfilment.email` to the buyer's account email, so supplying this is
659
+ * only needed for an alternate contact (gift delivery etc.).
660
+ */
661
+ buyerEmail?: string;
629
662
  /** Whether this is a sub-agent request */
630
663
  isSubAgentRequest?: boolean;
631
664
  /** Parent agent ID for sub-agent requests */
@@ -437,6 +437,18 @@ interface VerificationResult {
437
437
  * your report never arrives.
438
438
  */
439
439
  settlementToken?: MerchantSettlementToken;
440
+ /**
441
+ * 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
442
+ * The platform always resolves an email for the merchant — the agent's
443
+ * `buyerEmail` when one was supplied, else the buyer's account email
444
+ * (`emailSource` says which). Present on every first-party confirm leg that
445
+ * progressed (settled, pending_merchant, held, requires_action) so it can be
446
+ * stored with a pending order; only FULFIL against it once the order is
447
+ * settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
448
+ * the bridge strips it from the agent plane. An explicit `buyerEmail` on the
449
+ * confirm handoff body wins over `fulfilment.email` (the platform default).
450
+ */
451
+ fulfilment?: FulfilmentInfo;
440
452
  /** Timestamp of verification */
441
453
  verifiedAt: Date;
442
454
  /** TTL for this result (seconds) */
@@ -467,6 +479,18 @@ interface MerchantSettlementToken {
467
479
  /** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
468
480
  expiresAt: string;
469
481
  }
482
+ /**
483
+ * 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
484
+ * (same rule as settlement statuses): treat unknown sources like
485
+ * 'agent_provided' — the email is still the one to use.
486
+ */
487
+ interface FulfilmentInfo {
488
+ /** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
489
+ email: string;
490
+ /** 'agent_provided' = the agent passed buyerEmail on this confirm;
491
+ * 'account' = platform default — the buyer's account email. */
492
+ emailSource: 'agent_provided' | 'account' | (string & {});
493
+ }
470
494
  /**
471
495
  * 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
472
496
  * settlement. Carries NO voucher/instrument material — the settlement channel
@@ -576,6 +600,15 @@ interface VerificationRequest {
576
600
  currency: string;
577
601
  };
578
602
  }>;
603
+ /**
604
+ * 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
605
+ * confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
606
+ * back (canonicalized) in `VerificationResult.fulfilment` for first-party
607
+ * merchants and never persists it. When omitted, the platform defaults
608
+ * `fulfilment.email` to the buyer's account email, so supplying this is
609
+ * only needed for an alternate contact (gift delivery etc.).
610
+ */
611
+ buyerEmail?: string;
579
612
  /** Whether this is a sub-agent request */
580
613
  isSubAgentRequest?: boolean;
581
614
  /** Parent agent ID for sub-agent requests */
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-D8DDG-qK.mjs';
1
+ import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-BK_pRNSs.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Verification Interstitial Component
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-D8DDG-qK.js';
1
+ import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-BK_pRNSs.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Verification Interstitial Component
package/dist/verify.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-C-hPsi9M.mjs';
1
+ import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-BCmHFdkJ.mjs';
2
2
  import { ObservedMetadata } from './metadata-capture.mjs';
3
3
 
4
4
  /**
package/dist/verify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-CKouL1Tv.js';
1
+ import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-CwY5IY-0.js';
2
2
  import { ObservedMetadata } from './metadata-capture.js';
3
3
 
4
4
  /**
package/dist/verify.js CHANGED
@@ -36,7 +36,7 @@ __export(verify_exports, {
36
36
  module.exports = __toCommonJS(verify_exports);
37
37
 
38
38
  // src/version.ts
39
- var SDK_VERSION = "5.5.0";
39
+ var SDK_VERSION = "5.6.0";
40
40
 
41
41
  // src/http.ts
42
42
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
@@ -358,6 +358,7 @@ async function callVerifyAccessAPI(config, request) {
358
358
  if (requestData.commercePhase) body.commercePhase = requestData.commercePhase;
359
359
  if (requestData.checkoutSessionId) body.checkoutSessionId = requestData.checkoutSessionId;
360
360
  if (requestData.checkoutItems) body.checkoutItems = requestData.checkoutItems;
361
+ if (requestData.buyerEmail) body.buyerEmail = requestData.buyerEmail;
361
362
  if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
362
363
  if (requestData.attemptId) body.attemptId = requestData.attemptId;
363
364
  if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
@@ -533,7 +534,9 @@ async function verify(config, request, options) {
533
534
  settlementOutcome: apiResponse.settlementOutcome,
534
535
  // 5.5.0 self-settlement: merchant-only material — passes through to the
535
536
  // MERCHANT caller only (bridge callers strip it before the agent plane).
536
- settlementToken: apiResponse.settlementToken
537
+ settlementToken: apiResponse.settlementToken,
538
+ // 5.6.0: fulfilment contact — merchant-only lane, same strip rule.
539
+ fulfilment: apiResponse.fulfilment
537
540
  };
538
541
  return result2;
539
542
  }
@@ -592,7 +595,9 @@ async function verify(config, request, options) {
592
595
  stepUpApproval: apiResponse.stepUpApproval,
593
596
  settlement: apiResponse.settlement,
594
597
  settlementOutcome: apiResponse.settlementOutcome,
595
- settlementToken: apiResponse.settlementToken
598
+ settlementToken: apiResponse.settlementToken,
599
+ // 5.6.0: fulfilment contact — merchant-only lane, same strip rule.
600
+ fulfilment: apiResponse.fulfilment
596
601
  };
597
602
  if (result.recommendation === "deny") {
598
603
  result.policyAllowed = false;