@astrasyncai/verification-gateway 5.3.0 → 5.4.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/dist/adapter-interface/interface.d.mts +2 -2
- package/dist/adapter-interface/interface.d.ts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.js +1 -1
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +1 -1
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.d.ts +2 -2
- package/dist/adapters/mcp.js +1 -1
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +2 -2
- package/dist/adapters/nextjs.d.ts +2 -2
- package/dist/adapters/nextjs.js +1 -1
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +1 -1
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +2 -2
- package/dist/adapters/sdk.d.ts +2 -2
- package/dist/adapters/sdk.js +40 -1
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +40 -1
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -2
- package/dist/agent/index.d.ts +2 -2
- 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 +1 -1
- package/dist/bin/astrasync-codex-hook.js +1 -1
- package/dist/bin/astrasync-guard.js +1 -1
- package/dist/bin/astrasync.js +1 -1
- package/dist/browser/background.js +1 -1
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +1 -1
- package/dist/browser/background.mjs.map +1 -1
- package/dist/browser/browser-adapter.d.mts +2 -2
- package/dist/browser/browser-adapter.d.ts +2 -2
- package/dist/claude-code/claude-code-adapter.d.mts +2 -2
- package/dist/claude-code/claude-code-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- 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.d.mts +2 -2
- package/dist/codex/index.d.ts +2 -2
- package/dist/codex/index.js +1 -1
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +1 -1
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/cursor-adapter.d.mts +2 -2
- package/dist/cursor/cursor-adapter.d.ts +2 -2
- package/dist/cursor/extension.d.mts +2 -2
- package/dist/cursor/extension.d.ts +2 -2
- package/dist/cursor/extension.js +1 -1
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +1 -1
- 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 +1 -1
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +1 -1
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/{express-PLYlCd5k.d.mts → express-BIAT2pe0.d.mts} +1 -1
- package/dist/{express-DHEz_6Rh.d.ts → express-D3Tf-b23.d.ts} +1 -1
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +1 -1
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +1 -1
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +2 -2
- package/dist/git-trigger/git-hooks.d.ts +2 -2
- package/dist/{index-D6HQmsVV.d.mts → index-BVJkTyIF.d.mts} +1 -1
- package/dist/{index-zD5AaJsO.d.mts → index-By021oSN.d.mts} +1 -1
- package/dist/{index-CdF7L5E0.d.ts → index-DaMXZabg.d.ts} +1 -1
- package/dist/{index-BnrhTsp7.d.ts → index-iJ9_DdLk.d.ts} +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +40 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -1
- package/dist/index.mjs.map +1 -1
- package/dist/local-evaluator/evaluator.d.mts +2 -2
- package/dist/local-evaluator/evaluator.d.ts +2 -2
- package/dist/{mcp-DDcGHRjo.d.mts → mcp-BqfTDZLh.d.mts} +1 -1
- package/dist/{mcp-BuKgYZsC.d.ts → mcp-OrVOrH-s.d.ts} +1 -1
- package/dist/{nextjs-w60J62Wj.d.mts → nextjs-DGJXzWst.d.mts} +1 -1
- package/dist/{nextjs-CX9X9okw.d.ts → nextjs-xM-jdNrX.d.ts} +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/{sdk-DbY7-3PJ.d.mts → sdk-C1IOA5LE.d.ts} +32 -1
- package/dist/{sdk-uzuKDTRU.d.ts → sdk-C6_-6D-9.d.mts} +32 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- 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-CA1ZhoaJ.d.ts → types-76TB0fxW.d.ts} +1 -1
- package/dist/{types-eSqHyFFH.d.mts → types-CD1F9fmp.d.mts} +1 -1
- package/dist/{types-C1s1z0VD.d.ts → types-DGh2akuh.d.ts} +1 -1
- package/dist/{types-1urxLCZv.d.mts → types-z_RNjHWm.d.mts} +1 -1
- 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 +1 -1
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +1 -1
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AstraSyncGateway } from '../gateway/gateway.mjs';
|
|
2
|
-
import { V as VerificationDecision, P as PDLSSContext } from '../types-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { V as VerificationDecision, P as PDLSSContext } from '../types-z_RNjHWm.mjs';
|
|
3
|
+
import '../types-CD1F9fmp.mjs';
|
|
4
4
|
import '../metadata-capture.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AstraSyncGateway } from '../gateway/gateway.js';
|
|
2
|
-
import { V as VerificationDecision, P as PDLSSContext } from '../types-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { V as VerificationDecision, P as PDLSSContext } from '../types-DGh2akuh.js';
|
|
3
|
+
import '../types-76TB0fxW.js';
|
|
4
4
|
import '../metadata-capture.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { G as GatewayConfig,
|
|
2
|
-
export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as StablecoinSettlementBinding, T as TokenGuidance,
|
|
3
|
-
export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-
|
|
1
|
+
import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CD1F9fmp.mjs';
|
|
2
|
+
export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as SettlementOutcomeInfo, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-CD1F9fmp.mjs';
|
|
3
|
+
export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-C6_-6D-9.mjs';
|
|
4
4
|
export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.mjs';
|
|
5
|
-
export { e as express } from './express-
|
|
6
|
-
export { n as nextjs } from './nextjs-
|
|
7
|
-
export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-
|
|
8
|
-
export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-
|
|
5
|
+
export { e as express } from './express-BIAT2pe0.mjs';
|
|
6
|
+
export { n as nextjs } from './nextjs-DGJXzWst.mjs';
|
|
7
|
+
export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-By021oSN.mjs';
|
|
8
|
+
export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-BqfTDZLh.mjs';
|
|
9
9
|
export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.mjs';
|
|
10
|
-
export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-
|
|
10
|
+
export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-BVJkTyIF.mjs';
|
|
11
11
|
export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.mjs';
|
|
12
12
|
export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.mjs';
|
|
13
13
|
export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
|
|
@@ -177,7 +177,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
177
177
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
178
178
|
* in a browser the page's real UA is the honest identity.
|
|
179
179
|
*/
|
|
180
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
180
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.4.0";
|
|
181
181
|
declare const sdkFetch: typeof fetch;
|
|
182
182
|
|
|
183
183
|
/**
|
|
@@ -198,6 +198,6 @@ declare const sdkFetch: typeof fetch;
|
|
|
198
198
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
199
199
|
* lockstep.
|
|
200
200
|
*/
|
|
201
|
-
declare const SDK_VERSION = "5.
|
|
201
|
+
declare const SDK_VERSION = "5.4.0";
|
|
202
202
|
|
|
203
203
|
export { EnhancedVerificationResult, GatewayConfig, RUNTIME_SIGNATURES, type RuntimeSignature, SDK_USER_AGENT, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, detectRuntime, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown, sdkFetch };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { G as GatewayConfig,
|
|
2
|
-
export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as StablecoinSettlementBinding, T as TokenGuidance,
|
|
3
|
-
export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-
|
|
1
|
+
import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-76TB0fxW.js';
|
|
2
|
+
export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as SettlementOutcomeInfo, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-76TB0fxW.js';
|
|
3
|
+
export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-C1IOA5LE.js';
|
|
4
4
|
export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.js';
|
|
5
|
-
export { e as express } from './express-
|
|
6
|
-
export { n as nextjs } from './nextjs-
|
|
7
|
-
export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-
|
|
8
|
-
export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-
|
|
5
|
+
export { e as express } from './express-D3Tf-b23.js';
|
|
6
|
+
export { n as nextjs } from './nextjs-xM-jdNrX.js';
|
|
7
|
+
export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-iJ9_DdLk.js';
|
|
8
|
+
export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-OrVOrH-s.js';
|
|
9
9
|
export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.js';
|
|
10
|
-
export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-
|
|
10
|
+
export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-DaMXZabg.js';
|
|
11
11
|
export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.js';
|
|
12
12
|
export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.js';
|
|
13
13
|
export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
|
|
@@ -177,7 +177,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
177
177
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
178
178
|
* in a browser the page's real UA is the honest identity.
|
|
179
179
|
*/
|
|
180
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
180
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.4.0";
|
|
181
181
|
declare const sdkFetch: typeof fetch;
|
|
182
182
|
|
|
183
183
|
/**
|
|
@@ -198,6 +198,6 @@ declare const sdkFetch: typeof fetch;
|
|
|
198
198
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
199
199
|
* lockstep.
|
|
200
200
|
*/
|
|
201
|
-
declare const SDK_VERSION = "5.
|
|
201
|
+
declare const SDK_VERSION = "5.4.0";
|
|
202
202
|
|
|
203
203
|
export { EnhancedVerificationResult, GatewayConfig, RUNTIME_SIGNATURES, type RuntimeSignature, SDK_USER_AGENT, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, detectRuntime, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown, sdkFetch };
|
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.4.0";
|
|
116
116
|
|
|
117
117
|
// src/http.ts
|
|
118
118
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -2707,6 +2707,45 @@ var VerificationGatewayClient = class {
|
|
|
2707
2707
|
})
|
|
2708
2708
|
);
|
|
2709
2709
|
}
|
|
2710
|
+
/**
|
|
2711
|
+
* 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
|
|
2712
|
+
* first-party charge-at-redeem (server-side settlement on the owner's saved
|
|
2713
|
+
* instrument). This is the supported public surface for the confirm leg;
|
|
2714
|
+
* `verify()` deliberately does not expose the checkout fields, so settlement
|
|
2715
|
+
* can never fire by accident from a generic verify.
|
|
2716
|
+
*
|
|
2717
|
+
* Sends `commercePhase: 'confirm'` plus the checkout session id (per-cart
|
|
2718
|
+
* idempotency) and line items (order/receipt plane), and identifies the
|
|
2719
|
+
* merchant via `counterpartyUrl`/`counterpartyType` (required — the backend
|
|
2720
|
+
* only settles a merchant-mediated grant against a first-party storefront).
|
|
2721
|
+
* `purpose`/`action` default to the canonical shopping pair.
|
|
2722
|
+
*
|
|
2723
|
+
* Returns the full `VerificationResult`: read `.settlementOutcome` for the
|
|
2724
|
+
* settled/failed/requires_action/no_instrument outcome (+ `orderId`), and the
|
|
2725
|
+
* identity/policy/`failures` fields for a denial. On any non-`confirm`/first-
|
|
2726
|
+
* party path `settlementOutcome` is simply absent — no money moves.
|
|
2727
|
+
*/
|
|
2728
|
+
async confirmCheckout(options) {
|
|
2729
|
+
const credentials = {
|
|
2730
|
+
astraId: options.astraId,
|
|
2731
|
+
apiKey: options.apiKey,
|
|
2732
|
+
jwt: options.jwt
|
|
2733
|
+
};
|
|
2734
|
+
return this.executeWithRetry(
|
|
2735
|
+
() => verify(this.config, {
|
|
2736
|
+
credentials,
|
|
2737
|
+
purpose: options.purpose ?? "shopping",
|
|
2738
|
+
action: options.action ?? "shopping.purchase",
|
|
2739
|
+
transactionValue: options.transactionValue,
|
|
2740
|
+
currency: options.currency,
|
|
2741
|
+
commercePhase: "confirm",
|
|
2742
|
+
checkoutSessionId: options.checkoutSessionId,
|
|
2743
|
+
checkoutItems: options.checkoutItems,
|
|
2744
|
+
counterpartyUrl: options.counterpartyUrl,
|
|
2745
|
+
counterpartyType: options.counterpartyType
|
|
2746
|
+
})
|
|
2747
|
+
);
|
|
2748
|
+
}
|
|
2710
2749
|
/**
|
|
2711
2750
|
* Quick verification — checks credentials and policy in one call.
|
|
2712
2751
|
*
|