@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.
- package/README.md +14 -5
- package/dist/adapters/express.d.mts +1 -1
- package/dist/adapters/express.d.ts +1 -1
- package/dist/adapters/express.js +8 -3
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +8 -3
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.d.ts +1 -1
- package/dist/adapters/mcp.js +8 -3
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +8 -3
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +1 -1
- package/dist/adapters/nextjs.d.ts +1 -1
- package/dist/adapters/nextjs.js +8 -3
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +8 -3
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +12 -1
- package/dist/adapters/sdk.d.ts +12 -1
- package/dist/adapters/sdk.js +17 -3
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +17 -3
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +8 -3
- package/dist/bin/astrasync-codex-hook.js +8 -3
- package/dist/bin/astrasync-guard.js +8 -3
- package/dist/bin/astrasync.js +8 -3
- package/dist/browser/background.js +8 -3
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +8 -3
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +8 -3
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +8 -3
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +8 -3
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +8 -3
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +1 -1
- package/dist/edge-core/index.d.ts +1 -1
- package/dist/edge-core/index.js +8 -3
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +8 -3
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +8 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +8 -3
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +1 -1
- package/dist/git-trigger/git-hooks.d.ts +1 -1
- package/dist/index.d.mts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-C-hPsi9M.d.mts → types-BCmHFdkJ.d.mts} +33 -0
- package/dist/{types-D8DDG-qK.d.mts → types-BK_pRNSs.d.mts} +33 -0
- package/dist/{types-D8DDG-qK.d.ts → types-BK_pRNSs.d.ts} +33 -0
- package/dist/{types-CKouL1Tv.d.ts → types-CwY5IY-0.d.ts} +33 -0
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +8 -3
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +8 -3
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -665,6 +665,18 @@ interface VerificationResult {
|
|
|
665
665
|
* your report never arrives.
|
|
666
666
|
*/
|
|
667
667
|
settlementToken?: MerchantSettlementToken;
|
|
668
|
+
/**
|
|
669
|
+
* 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
|
|
670
|
+
* The platform always resolves an email for the merchant — the agent's
|
|
671
|
+
* `buyerEmail` when one was supplied, else the buyer's account email
|
|
672
|
+
* (`emailSource` says which). Present on every first-party confirm leg that
|
|
673
|
+
* progressed (settled, pending_merchant, held, requires_action) so it can be
|
|
674
|
+
* stored with a pending order; only FULFIL against it once the order is
|
|
675
|
+
* settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
|
|
676
|
+
* the bridge strips it from the agent plane. An explicit `buyerEmail` on the
|
|
677
|
+
* confirm handoff body wins over `fulfilment.email` (the platform default).
|
|
678
|
+
*/
|
|
679
|
+
fulfilment?: FulfilmentInfo;
|
|
668
680
|
/** Timestamp of verification */
|
|
669
681
|
verifiedAt: Date;
|
|
670
682
|
/** TTL for this result (seconds) */
|
|
@@ -695,6 +707,18 @@ interface MerchantSettlementToken {
|
|
|
695
707
|
/** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
|
|
696
708
|
expiresAt: string;
|
|
697
709
|
}
|
|
710
|
+
/**
|
|
711
|
+
* 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
|
|
712
|
+
* (same rule as settlement statuses): treat unknown sources like
|
|
713
|
+
* 'agent_provided' — the email is still the one to use.
|
|
714
|
+
*/
|
|
715
|
+
interface FulfilmentInfo {
|
|
716
|
+
/** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
|
|
717
|
+
email: string;
|
|
718
|
+
/** 'agent_provided' = the agent passed buyerEmail on this confirm;
|
|
719
|
+
* 'account' = platform default — the buyer's account email. */
|
|
720
|
+
emailSource: 'agent_provided' | 'account' | (string & {});
|
|
721
|
+
}
|
|
698
722
|
/**
|
|
699
723
|
* 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
|
|
700
724
|
* settlement. Carries NO voucher/instrument material — the settlement channel
|
|
@@ -804,6 +828,15 @@ interface VerificationRequest {
|
|
|
804
828
|
currency: string;
|
|
805
829
|
};
|
|
806
830
|
}>;
|
|
831
|
+
/**
|
|
832
|
+
* 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
|
|
833
|
+
* confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
|
|
834
|
+
* back (canonicalized) in `VerificationResult.fulfilment` for first-party
|
|
835
|
+
* merchants and never persists it. When omitted, the platform defaults
|
|
836
|
+
* `fulfilment.email` to the buyer's account email, so supplying this is
|
|
837
|
+
* only needed for an alternate contact (gift delivery etc.).
|
|
838
|
+
*/
|
|
839
|
+
buyerEmail?: string;
|
|
807
840
|
/** Whether this is a sub-agent request */
|
|
808
841
|
isSubAgentRequest?: boolean;
|
|
809
842
|
/** Parent agent ID for sub-agent requests */
|
|
@@ -1736,6 +1769,14 @@ declare class VerificationGatewayClient {
|
|
|
1736
1769
|
* `metadata: { jti: token.jti, sessionId: token.sessionId }`, then call
|
|
1737
1770
|
* `reportSettlement()` with the outcome. Treat any `settlementOutcome.status`
|
|
1738
1771
|
* you don't recognize (e.g. `pending_merchant`) as PENDING, never failed.
|
|
1772
|
+
*
|
|
1773
|
+
* 5.6.0 fulfilment contact: first-party confirm results carry
|
|
1774
|
+
* `.fulfilment { email, emailSource }` — the buyer's receipt/delivery
|
|
1775
|
+
* email. You always get one: the platform defaults to the buyer's account
|
|
1776
|
+
* email when no `buyerEmail` was passed. Store it with the pending order;
|
|
1777
|
+
* fulfil against it only once the order is settled / pending_merchant. An
|
|
1778
|
+
* explicit `buyerEmail` (here or on the bridge handoff body) wins over the
|
|
1779
|
+
* account default.
|
|
1739
1780
|
*/
|
|
1740
1781
|
confirmCheckout(options: {
|
|
1741
1782
|
astraId?: string;
|
|
@@ -1747,6 +1788,9 @@ declare class VerificationGatewayClient {
|
|
|
1747
1788
|
currency?: string;
|
|
1748
1789
|
checkoutSessionId?: string;
|
|
1749
1790
|
checkoutItems?: VerificationRequest['checkoutItems'];
|
|
1791
|
+
/** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
|
|
1792
|
+
* the platform default `fulfilment.email` to the buyer's account email. */
|
|
1793
|
+
buyerEmail?: string;
|
|
1750
1794
|
counterpartyUrl?: string;
|
|
1751
1795
|
counterpartyType?: string;
|
|
1752
1796
|
}): Promise<VerificationResult>;
|
|
@@ -4714,7 +4758,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
4714
4758
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
4715
4759
|
* in a browser the page's real UA is the honest identity.
|
|
4716
4760
|
*/
|
|
4717
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
4761
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.6.0";
|
|
4718
4762
|
declare const sdkFetch: typeof fetch;
|
|
4719
4763
|
|
|
4720
4764
|
/**
|
|
@@ -4735,6 +4779,6 @@ declare const sdkFetch: typeof fetch;
|
|
|
4735
4779
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
4736
4780
|
* lockstep.
|
|
4737
4781
|
*/
|
|
4738
|
-
declare const SDK_VERSION = "5.
|
|
4782
|
+
declare const SDK_VERSION = "5.6.0";
|
|
4739
4783
|
|
|
4740
|
-
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
|
|
4784
|
+
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
|
package/dist/index.d.ts
CHANGED
|
@@ -665,6 +665,18 @@ interface VerificationResult {
|
|
|
665
665
|
* your report never arrives.
|
|
666
666
|
*/
|
|
667
667
|
settlementToken?: MerchantSettlementToken;
|
|
668
|
+
/**
|
|
669
|
+
* 5.6.0 (astra-pay): fulfilment contact for first-party confirm legs.
|
|
670
|
+
* The platform always resolves an email for the merchant — the agent's
|
|
671
|
+
* `buyerEmail` when one was supplied, else the buyer's account email
|
|
672
|
+
* (`emailSource` says which). Present on every first-party confirm leg that
|
|
673
|
+
* progressed (settled, pending_merchant, held, requires_action) so it can be
|
|
674
|
+
* stored with a pending order; only FULFIL against it once the order is
|
|
675
|
+
* settled / pending_merchant. MERCHANT-ONLY lane like `settlementToken` —
|
|
676
|
+
* the bridge strips it from the agent plane. An explicit `buyerEmail` on the
|
|
677
|
+
* confirm handoff body wins over `fulfilment.email` (the platform default).
|
|
678
|
+
*/
|
|
679
|
+
fulfilment?: FulfilmentInfo;
|
|
668
680
|
/** Timestamp of verification */
|
|
669
681
|
verifiedAt: Date;
|
|
670
682
|
/** TTL for this result (seconds) */
|
|
@@ -695,6 +707,18 @@ interface MerchantSettlementToken {
|
|
|
695
707
|
/** Advisory charge-by bound (ISO); stuck orders are ops-swept after it. */
|
|
696
708
|
expiresAt: string;
|
|
697
709
|
}
|
|
710
|
+
/**
|
|
711
|
+
* 5.6.0 (astra-pay): fulfilment contact block. `emailSource` is an OPEN union
|
|
712
|
+
* (same rule as settlement statuses): treat unknown sources like
|
|
713
|
+
* 'agent_provided' — the email is still the one to use.
|
|
714
|
+
*/
|
|
715
|
+
interface FulfilmentInfo {
|
|
716
|
+
/** Canonicalized (trimmed, lower-cased) receipt/delivery email. */
|
|
717
|
+
email: string;
|
|
718
|
+
/** 'agent_provided' = the agent passed buyerEmail on this confirm;
|
|
719
|
+
* 'account' = platform default — the buyer's account email. */
|
|
720
|
+
emailSource: 'agent_provided' | 'account' | (string & {});
|
|
721
|
+
}
|
|
698
722
|
/**
|
|
699
723
|
* 5.3.0 (astra-pay): sanitized outcome of first-party charge-at-redeem
|
|
700
724
|
* settlement. Carries NO voucher/instrument material — the settlement channel
|
|
@@ -804,6 +828,15 @@ interface VerificationRequest {
|
|
|
804
828
|
currency: string;
|
|
805
829
|
};
|
|
806
830
|
}>;
|
|
831
|
+
/**
|
|
832
|
+
* 5.6.0 (astra-pay): buyer's receipt/delivery email, forwarded on the
|
|
833
|
+
* confirm leg only. TRANSIT-ONLY fulfilment PII — the platform echoes it
|
|
834
|
+
* back (canonicalized) in `VerificationResult.fulfilment` for first-party
|
|
835
|
+
* merchants and never persists it. When omitted, the platform defaults
|
|
836
|
+
* `fulfilment.email` to the buyer's account email, so supplying this is
|
|
837
|
+
* only needed for an alternate contact (gift delivery etc.).
|
|
838
|
+
*/
|
|
839
|
+
buyerEmail?: string;
|
|
807
840
|
/** Whether this is a sub-agent request */
|
|
808
841
|
isSubAgentRequest?: boolean;
|
|
809
842
|
/** Parent agent ID for sub-agent requests */
|
|
@@ -1736,6 +1769,14 @@ declare class VerificationGatewayClient {
|
|
|
1736
1769
|
* `metadata: { jti: token.jti, sessionId: token.sessionId }`, then call
|
|
1737
1770
|
* `reportSettlement()` with the outcome. Treat any `settlementOutcome.status`
|
|
1738
1771
|
* you don't recognize (e.g. `pending_merchant`) as PENDING, never failed.
|
|
1772
|
+
*
|
|
1773
|
+
* 5.6.0 fulfilment contact: first-party confirm results carry
|
|
1774
|
+
* `.fulfilment { email, emailSource }` — the buyer's receipt/delivery
|
|
1775
|
+
* email. You always get one: the platform defaults to the buyer's account
|
|
1776
|
+
* email when no `buyerEmail` was passed. Store it with the pending order;
|
|
1777
|
+
* fulfil against it only once the order is settled / pending_merchant. An
|
|
1778
|
+
* explicit `buyerEmail` (here or on the bridge handoff body) wins over the
|
|
1779
|
+
* account default.
|
|
1739
1780
|
*/
|
|
1740
1781
|
confirmCheckout(options: {
|
|
1741
1782
|
astraId?: string;
|
|
@@ -1747,6 +1788,9 @@ declare class VerificationGatewayClient {
|
|
|
1747
1788
|
currency?: string;
|
|
1748
1789
|
checkoutSessionId?: string;
|
|
1749
1790
|
checkoutItems?: VerificationRequest['checkoutItems'];
|
|
1791
|
+
/** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
|
|
1792
|
+
* the platform default `fulfilment.email` to the buyer's account email. */
|
|
1793
|
+
buyerEmail?: string;
|
|
1750
1794
|
counterpartyUrl?: string;
|
|
1751
1795
|
counterpartyType?: string;
|
|
1752
1796
|
}): Promise<VerificationResult>;
|
|
@@ -4714,7 +4758,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
4714
4758
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
4715
4759
|
* in a browser the page's real UA is the honest identity.
|
|
4716
4760
|
*/
|
|
4717
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
4761
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.6.0";
|
|
4718
4762
|
declare const sdkFetch: typeof fetch;
|
|
4719
4763
|
|
|
4720
4764
|
/**
|
|
@@ -4735,6 +4779,6 @@ declare const sdkFetch: typeof fetch;
|
|
|
4735
4779
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
4736
4780
|
* lockstep.
|
|
4737
4781
|
*/
|
|
4738
|
-
declare const SDK_VERSION = "5.
|
|
4782
|
+
declare const SDK_VERSION = "5.6.0";
|
|
4739
4783
|
|
|
4740
|
-
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
|
|
4784
|
+
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ function getTrustLevel(score) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// src/version.ts
|
|
115
|
-
var SDK_VERSION = "5.
|
|
115
|
+
var SDK_VERSION = "5.6.0";
|
|
116
116
|
|
|
117
117
|
// src/http.ts
|
|
118
118
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -475,6 +475,7 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
475
475
|
if (requestData.commercePhase) body.commercePhase = requestData.commercePhase;
|
|
476
476
|
if (requestData.checkoutSessionId) body.checkoutSessionId = requestData.checkoutSessionId;
|
|
477
477
|
if (requestData.checkoutItems) body.checkoutItems = requestData.checkoutItems;
|
|
478
|
+
if (requestData.buyerEmail) body.buyerEmail = requestData.buyerEmail;
|
|
478
479
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
479
480
|
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
480
481
|
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
@@ -650,7 +651,9 @@ async function verify(config, request, options) {
|
|
|
650
651
|
settlementOutcome: apiResponse.settlementOutcome,
|
|
651
652
|
// 5.5.0 self-settlement: merchant-only material — passes through to the
|
|
652
653
|
// MERCHANT caller only (bridge callers strip it before the agent plane).
|
|
653
|
-
settlementToken: apiResponse.settlementToken
|
|
654
|
+
settlementToken: apiResponse.settlementToken,
|
|
655
|
+
// 5.6.0: fulfilment contact — merchant-only lane, same strip rule.
|
|
656
|
+
fulfilment: apiResponse.fulfilment
|
|
654
657
|
};
|
|
655
658
|
return result2;
|
|
656
659
|
}
|
|
@@ -709,7 +712,9 @@ async function verify(config, request, options) {
|
|
|
709
712
|
stepUpApproval: apiResponse.stepUpApproval,
|
|
710
713
|
settlement: apiResponse.settlement,
|
|
711
714
|
settlementOutcome: apiResponse.settlementOutcome,
|
|
712
|
-
settlementToken: apiResponse.settlementToken
|
|
715
|
+
settlementToken: apiResponse.settlementToken,
|
|
716
|
+
// 5.6.0: fulfilment contact — merchant-only lane, same strip rule.
|
|
717
|
+
fulfilment: apiResponse.fulfilment
|
|
713
718
|
};
|
|
714
719
|
if (result.recommendation === "deny") {
|
|
715
720
|
result.policyAllowed = false;
|
|
@@ -2748,6 +2753,14 @@ var VerificationGatewayClient = class {
|
|
|
2748
2753
|
* `metadata: { jti: token.jti, sessionId: token.sessionId }`, then call
|
|
2749
2754
|
* `reportSettlement()` with the outcome. Treat any `settlementOutcome.status`
|
|
2750
2755
|
* you don't recognize (e.g. `pending_merchant`) as PENDING, never failed.
|
|
2756
|
+
*
|
|
2757
|
+
* 5.6.0 fulfilment contact: first-party confirm results carry
|
|
2758
|
+
* `.fulfilment { email, emailSource }` — the buyer's receipt/delivery
|
|
2759
|
+
* email. You always get one: the platform defaults to the buyer's account
|
|
2760
|
+
* email when no `buyerEmail` was passed. Store it with the pending order;
|
|
2761
|
+
* fulfil against it only once the order is settled / pending_merchant. An
|
|
2762
|
+
* explicit `buyerEmail` (here or on the bridge handoff body) wins over the
|
|
2763
|
+
* account default.
|
|
2751
2764
|
*/
|
|
2752
2765
|
async confirmCheckout(options) {
|
|
2753
2766
|
const credentials = {
|
|
@@ -2767,6 +2780,7 @@ var VerificationGatewayClient = class {
|
|
|
2767
2780
|
commercePhase: "confirm",
|
|
2768
2781
|
checkoutSessionId: options.checkoutSessionId,
|
|
2769
2782
|
checkoutItems: options.checkoutItems,
|
|
2783
|
+
buyerEmail: options.buyerEmail,
|
|
2770
2784
|
counterpartyUrl: options.counterpartyUrl,
|
|
2771
2785
|
counterpartyType: options.counterpartyType
|
|
2772
2786
|
},
|