@edge-markets/connect 1.9.2 → 1.10.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/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  type EdgeEnvironment = 'production' | 'sandbox';
2
+ type EdgeDeploymentCell = 'staging' | 'sandbox-staging' | 'sandbox-production' | 'production';
2
3
  declare const EDGE_LINK_PATH = "/oauth/link";
3
4
  interface EdgeEnvironmentConfig {
4
5
  apiBaseUrl: string;
@@ -7,8 +8,18 @@ interface EdgeEnvironmentConfig {
7
8
  displayName: string;
8
9
  isProduction: boolean;
9
10
  }
11
+ interface EdgeDeploymentCellConfig extends EdgeEnvironmentConfig {
12
+ environment: EdgeEnvironment;
13
+ awsAccountId: '124355668944' | '471257598653';
14
+ issuer: string;
15
+ scopePrefix: 'edge-connect-staging/' | 'edge-connect-sandbox/' | 'edge-connect/';
16
+ partnerFacing: boolean;
17
+ }
18
+ declare const EDGE_DEPLOYMENT_CELLS: Readonly<Record<EdgeDeploymentCell, EdgeDeploymentCellConfig>>;
10
19
  declare const EDGE_ENVIRONMENTS: Readonly<Record<EdgeEnvironment, EdgeEnvironmentConfig>>;
11
20
  declare function getEnvironmentConfig(environment: EdgeEnvironment): EdgeEnvironmentConfig;
21
+ declare function getDeploymentCellConfig(cell: EdgeDeploymentCell): EdgeDeploymentCellConfig;
22
+ declare function getAvailableDeploymentCells(): readonly EdgeDeploymentCell[];
12
23
  /**
13
24
  * Resolves the hosted Link UI URL for an environment.
14
25
  *
@@ -59,6 +70,12 @@ declare const EDGE_SCOPES: {
59
70
  * Required for: `GET /v1/balance`
60
71
  */
61
72
  readonly BALANCE_READ: "balance.read";
73
+ /**
74
+ * Compare partner-held identity data with the authenticated EDGE profile.
75
+ * This is separately allowlisted and returns only a coarse advisory result.
76
+ * Required for: `POST /connect/v2/identity/match`
77
+ */
78
+ readonly IDENTITY_MATCH: "identity.match";
62
79
  /**
63
80
  * Reserved for future fund transfers and EDGE-hosted verification sessions.
64
81
  * Not available in sandbox or production. Requesting this scope from Link
@@ -2469,6 +2486,32 @@ interface VerifyIdentityResult {
2469
2486
  verified: true;
2470
2487
  scores: VerifyIdentityScores;
2471
2488
  }
2489
+ interface IdentityMatchLegalName {
2490
+ givenName: string;
2491
+ familyName: string;
2492
+ }
2493
+ interface IdentityMatchAddress {
2494
+ line1: string;
2495
+ line2?: string;
2496
+ locality: string;
2497
+ region: string;
2498
+ postalCode: string;
2499
+ country: 'US';
2500
+ }
2501
+ /** Partner-held data only. Never populate this from `getUser()`. */
2502
+ interface IdentityMatchOptions {
2503
+ /** Opaque 16-255 character key. Reuse it only when retrying the exact same request. */
2504
+ idempotencyKey: string;
2505
+ legalName: IdentityMatchLegalName;
2506
+ address?: IdentityMatchAddress;
2507
+ }
2508
+ type IdentityMatchResultValue = 'match' | 'no_match' | 'insufficient_data';
2509
+ interface IdentityMatchResult {
2510
+ decisionId: string;
2511
+ result: IdentityMatchResultValue;
2512
+ matcherVersion: string;
2513
+ evaluatedAt: string;
2514
+ }
2472
2515
  /**
2473
2516
  * Geolocation data collected by the SDK from the browser or device.
2474
2517
  *
@@ -3109,6 +3152,17 @@ declare class EdgeIdentityVerificationError extends EdgeError {
3109
3152
  readonly fieldErrors: Record<string, string>;
3110
3153
  constructor(fieldErrors: Record<string, string>, message?: string);
3111
3154
  }
3155
+ /** Stable identity-match precondition/idempotency failure. Submitted identity data is never attached. */
3156
+ declare class EdgeIdentityMatchConflictError extends EdgeError {
3157
+ constructor(code: 'idempotency_conflict' | 'idempotency_in_progress' | 'match_not_eligible', message?: string);
3158
+ }
3159
+ declare class EdgeIdentityMatchAttemptLimitError extends EdgeError {
3160
+ readonly retryAfterSeconds?: number;
3161
+ constructor(retryAfterSeconds?: number, message?: string);
3162
+ }
3163
+ declare class EdgeIdentityMatchUnavailableError extends EdgeError {
3164
+ constructor(message?: string);
3165
+ }
3112
3166
  /**
3113
3167
  * Thrown when a popup is blocked by the browser.
3114
3168
  *
@@ -3191,6 +3245,7 @@ declare function isApiError(error: unknown): error is EdgeApiError;
3191
3245
  * Type guard for identity verification errors.
3192
3246
  */
3193
3247
  declare function isIdentityVerificationError(error: unknown): error is EdgeIdentityVerificationError;
3248
+ declare function isIdentityMatchError(error: unknown): error is EdgeIdentityMatchConflictError | EdgeIdentityMatchAttemptLimitError | EdgeIdentityMatchUnavailableError;
3194
3249
  /**
3195
3250
  * Type guard for network errors.
3196
3251
  */
@@ -3244,4 +3299,4 @@ declare const SDK_VERSION = "1.0.0";
3244
3299
  */
3245
3300
  declare const SDK_NAME = "@edge-markets/connect";
3246
3301
 
3247
- export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, type EdgeLinkConfigBase, type EdgeLinkEvent, type EdgeLinkEventName, type EdgeLinkExit, type EdgeLinkSuccess, EdgeNetworkError, EdgeNotFoundError, EdgePopupBlockedError, EdgePopupClosedError, type EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, type EdgeTokens, EdgeValidationError, type EdgeWebhookEvent, type EdgeWebhookEventType, type InitiateTransferRequest, type ListTransfersParams, OTP_METHODS, type OtpMethod, type PKCEPair, RESERVED_EDGE_SCOPES, type RevokeConsentResponse, SCOPE_DESCRIPTIONS, SCOPE_ICONS, SDK_NAME, SDK_VERSION, type SdkGeolocation, TRANSFER_CATEGORIES, TRANSFER_STATUSES, TRANSFER_TYPES, type Transfer, type TransferCategory, type TransferCompletedEventData, type TransferExpiredEventData, type TransferFailedEventData, type TransferList, type TransferListItem, type TransferProcessingEventData, type TransferStatus, type TransferType, type User, type UserAddress, type VerificationSession, type VerificationSessionStatus, type VerificationSessionStatusResponse, type VerifyIdentityAddress, type VerifyIdentityOptions, type VerifyIdentityResult, type VerifyIdentityScores, type components, formatScopeForEnvironment, formatScopesForEnvironment, getAvailableEnvironments, getEnvironmentConfig, getLinkUrl, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isTransferWriteScope, isValidScope, type operations, parseScope, type paths };
3302
+ export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_DEPLOYMENT_CELLS, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeDeploymentCell, type EdgeDeploymentCellConfig, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityMatchAttemptLimitError, EdgeIdentityMatchConflictError, EdgeIdentityMatchUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, type EdgeLinkConfigBase, type EdgeLinkEvent, type EdgeLinkEventName, type EdgeLinkExit, type EdgeLinkSuccess, EdgeNetworkError, EdgeNotFoundError, EdgePopupBlockedError, EdgePopupClosedError, type EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, type EdgeTokens, EdgeValidationError, type EdgeWebhookEvent, type EdgeWebhookEventType, type IdentityMatchAddress, type IdentityMatchLegalName, type IdentityMatchOptions, type IdentityMatchResult, type IdentityMatchResultValue, type InitiateTransferRequest, type ListTransfersParams, OTP_METHODS, type OtpMethod, type PKCEPair, RESERVED_EDGE_SCOPES, type RevokeConsentResponse, SCOPE_DESCRIPTIONS, SCOPE_ICONS, SDK_NAME, SDK_VERSION, type SdkGeolocation, TRANSFER_CATEGORIES, TRANSFER_STATUSES, TRANSFER_TYPES, type Transfer, type TransferCategory, type TransferCompletedEventData, type TransferExpiredEventData, type TransferFailedEventData, type TransferList, type TransferListItem, type TransferProcessingEventData, type TransferStatus, type TransferType, type User, type UserAddress, type VerificationSession, type VerificationSessionStatus, type VerificationSessionStatusResponse, type VerifyIdentityAddress, type VerifyIdentityOptions, type VerifyIdentityResult, type VerifyIdentityScores, type components, formatScopeForEnvironment, formatScopesForEnvironment, getAvailableDeploymentCells, getAvailableEnvironments, getDeploymentCellConfig, getEnvironmentConfig, getLinkUrl, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityMatchError, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isTransferWriteScope, isValidScope, type operations, parseScope, type paths };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type EdgeEnvironment = 'production' | 'sandbox';
2
+ type EdgeDeploymentCell = 'staging' | 'sandbox-staging' | 'sandbox-production' | 'production';
2
3
  declare const EDGE_LINK_PATH = "/oauth/link";
3
4
  interface EdgeEnvironmentConfig {
4
5
  apiBaseUrl: string;
@@ -7,8 +8,18 @@ interface EdgeEnvironmentConfig {
7
8
  displayName: string;
8
9
  isProduction: boolean;
9
10
  }
11
+ interface EdgeDeploymentCellConfig extends EdgeEnvironmentConfig {
12
+ environment: EdgeEnvironment;
13
+ awsAccountId: '124355668944' | '471257598653';
14
+ issuer: string;
15
+ scopePrefix: 'edge-connect-staging/' | 'edge-connect-sandbox/' | 'edge-connect/';
16
+ partnerFacing: boolean;
17
+ }
18
+ declare const EDGE_DEPLOYMENT_CELLS: Readonly<Record<EdgeDeploymentCell, EdgeDeploymentCellConfig>>;
10
19
  declare const EDGE_ENVIRONMENTS: Readonly<Record<EdgeEnvironment, EdgeEnvironmentConfig>>;
11
20
  declare function getEnvironmentConfig(environment: EdgeEnvironment): EdgeEnvironmentConfig;
21
+ declare function getDeploymentCellConfig(cell: EdgeDeploymentCell): EdgeDeploymentCellConfig;
22
+ declare function getAvailableDeploymentCells(): readonly EdgeDeploymentCell[];
12
23
  /**
13
24
  * Resolves the hosted Link UI URL for an environment.
14
25
  *
@@ -59,6 +70,12 @@ declare const EDGE_SCOPES: {
59
70
  * Required for: `GET /v1/balance`
60
71
  */
61
72
  readonly BALANCE_READ: "balance.read";
73
+ /**
74
+ * Compare partner-held identity data with the authenticated EDGE profile.
75
+ * This is separately allowlisted and returns only a coarse advisory result.
76
+ * Required for: `POST /connect/v2/identity/match`
77
+ */
78
+ readonly IDENTITY_MATCH: "identity.match";
62
79
  /**
63
80
  * Reserved for future fund transfers and EDGE-hosted verification sessions.
64
81
  * Not available in sandbox or production. Requesting this scope from Link
@@ -2469,6 +2486,32 @@ interface VerifyIdentityResult {
2469
2486
  verified: true;
2470
2487
  scores: VerifyIdentityScores;
2471
2488
  }
2489
+ interface IdentityMatchLegalName {
2490
+ givenName: string;
2491
+ familyName: string;
2492
+ }
2493
+ interface IdentityMatchAddress {
2494
+ line1: string;
2495
+ line2?: string;
2496
+ locality: string;
2497
+ region: string;
2498
+ postalCode: string;
2499
+ country: 'US';
2500
+ }
2501
+ /** Partner-held data only. Never populate this from `getUser()`. */
2502
+ interface IdentityMatchOptions {
2503
+ /** Opaque 16-255 character key. Reuse it only when retrying the exact same request. */
2504
+ idempotencyKey: string;
2505
+ legalName: IdentityMatchLegalName;
2506
+ address?: IdentityMatchAddress;
2507
+ }
2508
+ type IdentityMatchResultValue = 'match' | 'no_match' | 'insufficient_data';
2509
+ interface IdentityMatchResult {
2510
+ decisionId: string;
2511
+ result: IdentityMatchResultValue;
2512
+ matcherVersion: string;
2513
+ evaluatedAt: string;
2514
+ }
2472
2515
  /**
2473
2516
  * Geolocation data collected by the SDK from the browser or device.
2474
2517
  *
@@ -3109,6 +3152,17 @@ declare class EdgeIdentityVerificationError extends EdgeError {
3109
3152
  readonly fieldErrors: Record<string, string>;
3110
3153
  constructor(fieldErrors: Record<string, string>, message?: string);
3111
3154
  }
3155
+ /** Stable identity-match precondition/idempotency failure. Submitted identity data is never attached. */
3156
+ declare class EdgeIdentityMatchConflictError extends EdgeError {
3157
+ constructor(code: 'idempotency_conflict' | 'idempotency_in_progress' | 'match_not_eligible', message?: string);
3158
+ }
3159
+ declare class EdgeIdentityMatchAttemptLimitError extends EdgeError {
3160
+ readonly retryAfterSeconds?: number;
3161
+ constructor(retryAfterSeconds?: number, message?: string);
3162
+ }
3163
+ declare class EdgeIdentityMatchUnavailableError extends EdgeError {
3164
+ constructor(message?: string);
3165
+ }
3112
3166
  /**
3113
3167
  * Thrown when a popup is blocked by the browser.
3114
3168
  *
@@ -3191,6 +3245,7 @@ declare function isApiError(error: unknown): error is EdgeApiError;
3191
3245
  * Type guard for identity verification errors.
3192
3246
  */
3193
3247
  declare function isIdentityVerificationError(error: unknown): error is EdgeIdentityVerificationError;
3248
+ declare function isIdentityMatchError(error: unknown): error is EdgeIdentityMatchConflictError | EdgeIdentityMatchAttemptLimitError | EdgeIdentityMatchUnavailableError;
3194
3249
  /**
3195
3250
  * Type guard for network errors.
3196
3251
  */
@@ -3244,4 +3299,4 @@ declare const SDK_VERSION = "1.0.0";
3244
3299
  */
3245
3300
  declare const SDK_NAME = "@edge-markets/connect";
3246
3301
 
3247
- export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, type EdgeLinkConfigBase, type EdgeLinkEvent, type EdgeLinkEventName, type EdgeLinkExit, type EdgeLinkSuccess, EdgeNetworkError, EdgeNotFoundError, EdgePopupBlockedError, EdgePopupClosedError, type EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, type EdgeTokens, EdgeValidationError, type EdgeWebhookEvent, type EdgeWebhookEventType, type InitiateTransferRequest, type ListTransfersParams, OTP_METHODS, type OtpMethod, type PKCEPair, RESERVED_EDGE_SCOPES, type RevokeConsentResponse, SCOPE_DESCRIPTIONS, SCOPE_ICONS, SDK_NAME, SDK_VERSION, type SdkGeolocation, TRANSFER_CATEGORIES, TRANSFER_STATUSES, TRANSFER_TYPES, type Transfer, type TransferCategory, type TransferCompletedEventData, type TransferExpiredEventData, type TransferFailedEventData, type TransferList, type TransferListItem, type TransferProcessingEventData, type TransferStatus, type TransferType, type User, type UserAddress, type VerificationSession, type VerificationSessionStatus, type VerificationSessionStatusResponse, type VerifyIdentityAddress, type VerifyIdentityOptions, type VerifyIdentityResult, type VerifyIdentityScores, type components, formatScopeForEnvironment, formatScopesForEnvironment, getAvailableEnvironments, getEnvironmentConfig, getLinkUrl, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isTransferWriteScope, isValidScope, type operations, parseScope, type paths };
3302
+ export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_DEPLOYMENT_CELLS, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeDeploymentCell, type EdgeDeploymentCellConfig, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityMatchAttemptLimitError, EdgeIdentityMatchConflictError, EdgeIdentityMatchUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, type EdgeLinkConfigBase, type EdgeLinkEvent, type EdgeLinkEventName, type EdgeLinkExit, type EdgeLinkSuccess, EdgeNetworkError, EdgeNotFoundError, EdgePopupBlockedError, EdgePopupClosedError, type EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, type EdgeTokens, EdgeValidationError, type EdgeWebhookEvent, type EdgeWebhookEventType, type IdentityMatchAddress, type IdentityMatchLegalName, type IdentityMatchOptions, type IdentityMatchResult, type IdentityMatchResultValue, type InitiateTransferRequest, type ListTransfersParams, OTP_METHODS, type OtpMethod, type PKCEPair, RESERVED_EDGE_SCOPES, type RevokeConsentResponse, SCOPE_DESCRIPTIONS, SCOPE_ICONS, SDK_NAME, SDK_VERSION, type SdkGeolocation, TRANSFER_CATEGORIES, TRANSFER_STATUSES, TRANSFER_TYPES, type Transfer, type TransferCategory, type TransferCompletedEventData, type TransferExpiredEventData, type TransferFailedEventData, type TransferList, type TransferListItem, type TransferProcessingEventData, type TransferStatus, type TransferType, type User, type UserAddress, type VerificationSession, type VerificationSessionStatus, type VerificationSessionStatusResponse, type VerifyIdentityAddress, type VerifyIdentityOptions, type VerifyIdentityResult, type VerifyIdentityScores, type components, formatScopeForEnvironment, formatScopesForEnvironment, getAvailableDeploymentCells, getAvailableEnvironments, getDeploymentCellConfig, getEnvironmentConfig, getLinkUrl, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityMatchError, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isTransferWriteScope, isValidScope, type operations, parseScope, type paths };
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ __export(index_exports, {
23
23
  ACTIVE_EDGE_SCOPES: () => ACTIVE_EDGE_SCOPES,
24
24
  ALL_EDGE_SCOPES: () => ALL_EDGE_SCOPES,
25
25
  EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE: () => EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
26
+ EDGE_DEPLOYMENT_CELLS: () => EDGE_DEPLOYMENT_CELLS,
26
27
  EDGE_ENVIRONMENTS: () => EDGE_ENVIRONMENTS,
27
28
  EDGE_LINK_PATH: () => EDGE_LINK_PATH,
28
29
  EDGE_SCOPES: () => EDGE_SCOPES,
@@ -32,6 +33,9 @@ __export(index_exports, {
32
33
  EdgeConsentRequiredError: () => EdgeConsentRequiredError,
33
34
  EdgeError: () => EdgeError,
34
35
  EdgeFeatureUnavailableError: () => EdgeFeatureUnavailableError,
36
+ EdgeIdentityMatchAttemptLimitError: () => EdgeIdentityMatchAttemptLimitError,
37
+ EdgeIdentityMatchConflictError: () => EdgeIdentityMatchConflictError,
38
+ EdgeIdentityMatchUnavailableError: () => EdgeIdentityMatchUnavailableError,
35
39
  EdgeIdentityVerificationError: () => EdgeIdentityVerificationError,
36
40
  EdgeInsufficientScopeError: () => EdgeInsufficientScopeError,
37
41
  EdgeNetworkError: () => EdgeNetworkError,
@@ -52,7 +56,9 @@ __export(index_exports, {
52
56
  TRANSFER_TYPES: () => TRANSFER_TYPES,
53
57
  formatScopeForEnvironment: () => formatScopeForEnvironment,
54
58
  formatScopesForEnvironment: () => formatScopesForEnvironment,
59
+ getAvailableDeploymentCells: () => getAvailableDeploymentCells,
55
60
  getAvailableEnvironments: () => getAvailableEnvironments,
61
+ getDeploymentCellConfig: () => getDeploymentCellConfig,
56
62
  getEnvironmentConfig: () => getEnvironmentConfig,
57
63
  getLinkUrl: () => getLinkUrl,
58
64
  isApiError: () => isApiError,
@@ -60,6 +66,7 @@ __export(index_exports, {
60
66
  isConsentRequiredError: () => isConsentRequiredError,
61
67
  isEdgeError: () => isEdgeError,
62
68
  isFeatureUnavailableError: () => isFeatureUnavailableError,
69
+ isIdentityMatchError: () => isIdentityMatchError,
63
70
  isIdentityVerificationError: () => isIdentityVerificationError,
64
71
  isNetworkError: () => isNetworkError,
65
72
  isProductionEnvironment: () => isProductionEnvironment,
@@ -97,28 +104,72 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
97
104
 
98
105
  // src/config/environments.ts
99
106
  var EDGE_LINK_PATH = "/oauth/link";
100
- var EDGE_ENVIRONMENTS = {
107
+ var EDGE_DEPLOYMENT_CELLS = {
108
+ staging: {
109
+ environment: "sandbox",
110
+ apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
111
+ oauthBaseUrl: "https://connect-staging.edgeboost.io/connect/oauth",
112
+ userClientUrl: "https://oauth.staging-app.edgeboost.io",
113
+ issuer: "https://jwks.connect-staging.edgeboost.io",
114
+ scopePrefix: "edge-connect-staging/",
115
+ awsAccountId: "124355668944",
116
+ displayName: "Staging",
117
+ isProduction: false,
118
+ partnerFacing: false
119
+ },
120
+ "sandbox-staging": {
121
+ environment: "sandbox",
122
+ apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
123
+ oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
124
+ userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
125
+ issuer: "https://jwks.sandbox.connect.staging.edgeboost.io",
126
+ scopePrefix: "edge-connect-sandbox/",
127
+ awsAccountId: "124355668944",
128
+ displayName: "Sandbox staging",
129
+ isProduction: false,
130
+ partnerFacing: false
131
+ },
132
+ "sandbox-production": {
133
+ environment: "sandbox",
134
+ apiBaseUrl: "https://sandbox.connect.edgeboost.io/connect/v1",
135
+ oauthBaseUrl: "https://sandbox.connect.edgeboost.io/connect/oauth",
136
+ userClientUrl: "https://sandbox-oauth.edgeboost.io",
137
+ issuer: "https://jwks.sandbox.connect.edgeboost.io",
138
+ scopePrefix: "edge-connect-sandbox/",
139
+ awsAccountId: "471257598653",
140
+ displayName: "Sandbox production",
141
+ isProduction: false,
142
+ partnerFacing: true
143
+ },
101
144
  production: {
145
+ environment: "production",
102
146
  apiBaseUrl: "https://connect.edgeboost.io/connect/v1",
103
147
  oauthBaseUrl: "https://connect.edgeboost.io/connect/oauth",
104
148
  userClientUrl: "https://oauth.edgeboost.io",
149
+ issuer: "https://jwks.connect.edgeboost.io",
150
+ scopePrefix: "edge-connect/",
151
+ awsAccountId: "471257598653",
105
152
  displayName: "Production",
106
- isProduction: true
107
- },
108
- sandbox: {
109
- // Sandbox partner API — mTLS-enforced. Uses its own sandbox gateway and
110
- // sandbox OAuth/JWKS issuer. The browser Link UI is served from a separate
111
- // sandbox host.
112
- apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
113
- oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
114
- userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
115
- displayName: "Sandbox",
116
- isProduction: false
153
+ isProduction: true,
154
+ partnerFacing: true
117
155
  }
118
156
  };
157
+ var EDGE_ENVIRONMENTS = {
158
+ production: EDGE_DEPLOYMENT_CELLS.production,
159
+ // The public SDK has two choices. "sandbox" is the canonical partner
160
+ // sandbox in the production account; internal staging cells use explicit
161
+ // deployment-cell configuration instead of another public environment enum.
162
+ sandbox: EDGE_DEPLOYMENT_CELLS["sandbox-production"]
163
+ };
119
164
  function getEnvironmentConfig(environment) {
120
165
  return EDGE_ENVIRONMENTS[environment];
121
166
  }
167
+ function getDeploymentCellConfig(cell) {
168
+ return EDGE_DEPLOYMENT_CELLS[cell];
169
+ }
170
+ function getAvailableDeploymentCells() {
171
+ return Object.keys(EDGE_DEPLOYMENT_CELLS);
172
+ }
122
173
  function getLinkUrl(environment, linkUrl) {
123
174
  const configuredUrl = linkUrl?.trim();
124
175
  const url = new URL(configuredUrl || `${EDGE_ENVIRONMENTS[environment].userClientUrl}${EDGE_LINK_PATH}`);
@@ -149,6 +200,12 @@ var EDGE_SCOPES = {
149
200
  * Required for: `GET /v1/balance`
150
201
  */
151
202
  BALANCE_READ: "balance.read",
203
+ /**
204
+ * Compare partner-held identity data with the authenticated EDGE profile.
205
+ * This is separately allowlisted and returns only a coarse advisory result.
206
+ * Required for: `POST /connect/v2/identity/match`
207
+ */
208
+ IDENTITY_MATCH: "identity.match",
152
209
  /**
153
210
  * Reserved for future fund transfers and EDGE-hosted verification sessions.
154
211
  * Not available in sandbox or production. Requesting this scope from Link
@@ -160,16 +217,18 @@ var EDGE_SCOPES = {
160
217
  TRANSFER_WRITE: "transfer.write"
161
218
  };
162
219
  var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
163
- var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.TRANSFER_WRITE];
220
+ var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.IDENTITY_MATCH, EDGE_SCOPES.TRANSFER_WRITE];
164
221
  var ALL_EDGE_SCOPES = ACTIVE_EDGE_SCOPES;
165
222
  var SCOPE_DESCRIPTIONS = {
166
223
  [EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
167
224
  [EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
225
+ [EDGE_SCOPES.IDENTITY_MATCH]: "Compare partner-held identity details and return a coarse advisory result",
168
226
  [EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
169
227
  };
170
228
  var SCOPE_ICONS = {
171
229
  [EDGE_SCOPES.USER_READ]: "user",
172
230
  [EDGE_SCOPES.BALANCE_READ]: "wallet",
231
+ [EDGE_SCOPES.IDENTITY_MATCH]: "shield-check",
173
232
  [EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
174
233
  };
175
234
  function formatScopeForEnvironment(scope, environment) {
@@ -289,6 +348,31 @@ var EdgeIdentityVerificationError = class extends EdgeError {
289
348
  this.fieldErrors = fieldErrors;
290
349
  }
291
350
  };
351
+ var EdgeIdentityMatchConflictError = class extends EdgeError {
352
+ constructor(code, message) {
353
+ super(code, message || "Identity match could not be completed because a request precondition failed.", 409);
354
+ this.name = "EdgeIdentityMatchConflictError";
355
+ }
356
+ };
357
+ var EdgeIdentityMatchAttemptLimitError = class extends EdgeError {
358
+ constructor(retryAfterSeconds, message) {
359
+ super("identity_match_attempt_limit", message || "Identity match attempt limit reached. Retry later.", 429, {
360
+ retryAfterSeconds
361
+ });
362
+ this.name = "EdgeIdentityMatchAttemptLimitError";
363
+ this.retryAfterSeconds = retryAfterSeconds;
364
+ }
365
+ };
366
+ var EdgeIdentityMatchUnavailableError = class extends EdgeError {
367
+ constructor(message) {
368
+ super(
369
+ "identity_match_unavailable",
370
+ message || "Identity match is temporarily unavailable. Retry with the same idempotency key.",
371
+ 503
372
+ );
373
+ this.name = "EdgeIdentityMatchUnavailableError";
374
+ }
375
+ };
292
376
  var EdgePopupBlockedError = class extends EdgeError {
293
377
  constructor() {
294
378
  super("popup_blocked", "Popup was blocked by the browser. Please allow popups for this site and try again.");
@@ -334,6 +418,9 @@ function isApiError(error) {
334
418
  function isIdentityVerificationError(error) {
335
419
  return error instanceof EdgeIdentityVerificationError;
336
420
  }
421
+ function isIdentityMatchError(error) {
422
+ return error instanceof EdgeIdentityMatchConflictError || error instanceof EdgeIdentityMatchAttemptLimitError || error instanceof EdgeIdentityMatchUnavailableError;
423
+ }
337
424
  function isNetworkError(error) {
338
425
  return error instanceof EdgeNetworkError;
339
426
  }
@@ -349,6 +436,7 @@ var SDK_NAME = "@edge-markets/connect";
349
436
  ACTIVE_EDGE_SCOPES,
350
437
  ALL_EDGE_SCOPES,
351
438
  EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
439
+ EDGE_DEPLOYMENT_CELLS,
352
440
  EDGE_ENVIRONMENTS,
353
441
  EDGE_LINK_PATH,
354
442
  EDGE_SCOPES,
@@ -358,6 +446,9 @@ var SDK_NAME = "@edge-markets/connect";
358
446
  EdgeConsentRequiredError,
359
447
  EdgeError,
360
448
  EdgeFeatureUnavailableError,
449
+ EdgeIdentityMatchAttemptLimitError,
450
+ EdgeIdentityMatchConflictError,
451
+ EdgeIdentityMatchUnavailableError,
361
452
  EdgeIdentityVerificationError,
362
453
  EdgeInsufficientScopeError,
363
454
  EdgeNetworkError,
@@ -378,7 +469,9 @@ var SDK_NAME = "@edge-markets/connect";
378
469
  TRANSFER_TYPES,
379
470
  formatScopeForEnvironment,
380
471
  formatScopesForEnvironment,
472
+ getAvailableDeploymentCells,
381
473
  getAvailableEnvironments,
474
+ getDeploymentCellConfig,
382
475
  getEnvironmentConfig,
383
476
  getLinkUrl,
384
477
  isApiError,
@@ -386,6 +479,7 @@ var SDK_NAME = "@edge-markets/connect";
386
479
  isConsentRequiredError,
387
480
  isEdgeError,
388
481
  isFeatureUnavailableError,
482
+ isIdentityMatchError,
389
483
  isIdentityVerificationError,
390
484
  isNetworkError,
391
485
  isProductionEnvironment,
package/dist/index.mjs CHANGED
@@ -26,28 +26,72 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
26
26
 
27
27
  // src/config/environments.ts
28
28
  var EDGE_LINK_PATH = "/oauth/link";
29
- var EDGE_ENVIRONMENTS = {
29
+ var EDGE_DEPLOYMENT_CELLS = {
30
+ staging: {
31
+ environment: "sandbox",
32
+ apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
33
+ oauthBaseUrl: "https://connect-staging.edgeboost.io/connect/oauth",
34
+ userClientUrl: "https://oauth.staging-app.edgeboost.io",
35
+ issuer: "https://jwks.connect-staging.edgeboost.io",
36
+ scopePrefix: "edge-connect-staging/",
37
+ awsAccountId: "124355668944",
38
+ displayName: "Staging",
39
+ isProduction: false,
40
+ partnerFacing: false
41
+ },
42
+ "sandbox-staging": {
43
+ environment: "sandbox",
44
+ apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
45
+ oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
46
+ userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
47
+ issuer: "https://jwks.sandbox.connect.staging.edgeboost.io",
48
+ scopePrefix: "edge-connect-sandbox/",
49
+ awsAccountId: "124355668944",
50
+ displayName: "Sandbox staging",
51
+ isProduction: false,
52
+ partnerFacing: false
53
+ },
54
+ "sandbox-production": {
55
+ environment: "sandbox",
56
+ apiBaseUrl: "https://sandbox.connect.edgeboost.io/connect/v1",
57
+ oauthBaseUrl: "https://sandbox.connect.edgeboost.io/connect/oauth",
58
+ userClientUrl: "https://sandbox-oauth.edgeboost.io",
59
+ issuer: "https://jwks.sandbox.connect.edgeboost.io",
60
+ scopePrefix: "edge-connect-sandbox/",
61
+ awsAccountId: "471257598653",
62
+ displayName: "Sandbox production",
63
+ isProduction: false,
64
+ partnerFacing: true
65
+ },
30
66
  production: {
67
+ environment: "production",
31
68
  apiBaseUrl: "https://connect.edgeboost.io/connect/v1",
32
69
  oauthBaseUrl: "https://connect.edgeboost.io/connect/oauth",
33
70
  userClientUrl: "https://oauth.edgeboost.io",
71
+ issuer: "https://jwks.connect.edgeboost.io",
72
+ scopePrefix: "edge-connect/",
73
+ awsAccountId: "471257598653",
34
74
  displayName: "Production",
35
- isProduction: true
36
- },
37
- sandbox: {
38
- // Sandbox partner API — mTLS-enforced. Uses its own sandbox gateway and
39
- // sandbox OAuth/JWKS issuer. The browser Link UI is served from a separate
40
- // sandbox host.
41
- apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
42
- oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
43
- userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
44
- displayName: "Sandbox",
45
- isProduction: false
75
+ isProduction: true,
76
+ partnerFacing: true
46
77
  }
47
78
  };
79
+ var EDGE_ENVIRONMENTS = {
80
+ production: EDGE_DEPLOYMENT_CELLS.production,
81
+ // The public SDK has two choices. "sandbox" is the canonical partner
82
+ // sandbox in the production account; internal staging cells use explicit
83
+ // deployment-cell configuration instead of another public environment enum.
84
+ sandbox: EDGE_DEPLOYMENT_CELLS["sandbox-production"]
85
+ };
48
86
  function getEnvironmentConfig(environment) {
49
87
  return EDGE_ENVIRONMENTS[environment];
50
88
  }
89
+ function getDeploymentCellConfig(cell) {
90
+ return EDGE_DEPLOYMENT_CELLS[cell];
91
+ }
92
+ function getAvailableDeploymentCells() {
93
+ return Object.keys(EDGE_DEPLOYMENT_CELLS);
94
+ }
51
95
  function getLinkUrl(environment, linkUrl) {
52
96
  const configuredUrl = linkUrl?.trim();
53
97
  const url = new URL(configuredUrl || `${EDGE_ENVIRONMENTS[environment].userClientUrl}${EDGE_LINK_PATH}`);
@@ -78,6 +122,12 @@ var EDGE_SCOPES = {
78
122
  * Required for: `GET /v1/balance`
79
123
  */
80
124
  BALANCE_READ: "balance.read",
125
+ /**
126
+ * Compare partner-held identity data with the authenticated EDGE profile.
127
+ * This is separately allowlisted and returns only a coarse advisory result.
128
+ * Required for: `POST /connect/v2/identity/match`
129
+ */
130
+ IDENTITY_MATCH: "identity.match",
81
131
  /**
82
132
  * Reserved for future fund transfers and EDGE-hosted verification sessions.
83
133
  * Not available in sandbox or production. Requesting this scope from Link
@@ -89,16 +139,18 @@ var EDGE_SCOPES = {
89
139
  TRANSFER_WRITE: "transfer.write"
90
140
  };
91
141
  var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
92
- var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.TRANSFER_WRITE];
142
+ var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.IDENTITY_MATCH, EDGE_SCOPES.TRANSFER_WRITE];
93
143
  var ALL_EDGE_SCOPES = ACTIVE_EDGE_SCOPES;
94
144
  var SCOPE_DESCRIPTIONS = {
95
145
  [EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
96
146
  [EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
147
+ [EDGE_SCOPES.IDENTITY_MATCH]: "Compare partner-held identity details and return a coarse advisory result",
97
148
  [EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
98
149
  };
99
150
  var SCOPE_ICONS = {
100
151
  [EDGE_SCOPES.USER_READ]: "user",
101
152
  [EDGE_SCOPES.BALANCE_READ]: "wallet",
153
+ [EDGE_SCOPES.IDENTITY_MATCH]: "shield-check",
102
154
  [EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
103
155
  };
104
156
  function formatScopeForEnvironment(scope, environment) {
@@ -218,6 +270,31 @@ var EdgeIdentityVerificationError = class extends EdgeError {
218
270
  this.fieldErrors = fieldErrors;
219
271
  }
220
272
  };
273
+ var EdgeIdentityMatchConflictError = class extends EdgeError {
274
+ constructor(code, message) {
275
+ super(code, message || "Identity match could not be completed because a request precondition failed.", 409);
276
+ this.name = "EdgeIdentityMatchConflictError";
277
+ }
278
+ };
279
+ var EdgeIdentityMatchAttemptLimitError = class extends EdgeError {
280
+ constructor(retryAfterSeconds, message) {
281
+ super("identity_match_attempt_limit", message || "Identity match attempt limit reached. Retry later.", 429, {
282
+ retryAfterSeconds
283
+ });
284
+ this.name = "EdgeIdentityMatchAttemptLimitError";
285
+ this.retryAfterSeconds = retryAfterSeconds;
286
+ }
287
+ };
288
+ var EdgeIdentityMatchUnavailableError = class extends EdgeError {
289
+ constructor(message) {
290
+ super(
291
+ "identity_match_unavailable",
292
+ message || "Identity match is temporarily unavailable. Retry with the same idempotency key.",
293
+ 503
294
+ );
295
+ this.name = "EdgeIdentityMatchUnavailableError";
296
+ }
297
+ };
221
298
  var EdgePopupBlockedError = class extends EdgeError {
222
299
  constructor() {
223
300
  super("popup_blocked", "Popup was blocked by the browser. Please allow popups for this site and try again.");
@@ -263,6 +340,9 @@ function isApiError(error) {
263
340
  function isIdentityVerificationError(error) {
264
341
  return error instanceof EdgeIdentityVerificationError;
265
342
  }
343
+ function isIdentityMatchError(error) {
344
+ return error instanceof EdgeIdentityMatchConflictError || error instanceof EdgeIdentityMatchAttemptLimitError || error instanceof EdgeIdentityMatchUnavailableError;
345
+ }
266
346
  function isNetworkError(error) {
267
347
  return error instanceof EdgeNetworkError;
268
348
  }
@@ -277,6 +357,7 @@ export {
277
357
  ACTIVE_EDGE_SCOPES,
278
358
  ALL_EDGE_SCOPES,
279
359
  EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
360
+ EDGE_DEPLOYMENT_CELLS,
280
361
  EDGE_ENVIRONMENTS,
281
362
  EDGE_LINK_PATH,
282
363
  EDGE_SCOPES,
@@ -286,6 +367,9 @@ export {
286
367
  EdgeConsentRequiredError,
287
368
  EdgeError,
288
369
  EdgeFeatureUnavailableError,
370
+ EdgeIdentityMatchAttemptLimitError,
371
+ EdgeIdentityMatchConflictError,
372
+ EdgeIdentityMatchUnavailableError,
289
373
  EdgeIdentityVerificationError,
290
374
  EdgeInsufficientScopeError,
291
375
  EdgeNetworkError,
@@ -306,7 +390,9 @@ export {
306
390
  TRANSFER_TYPES,
307
391
  formatScopeForEnvironment,
308
392
  formatScopesForEnvironment,
393
+ getAvailableDeploymentCells,
309
394
  getAvailableEnvironments,
395
+ getDeploymentCellConfig,
310
396
  getEnvironmentConfig,
311
397
  getLinkUrl,
312
398
  isApiError,
@@ -314,6 +400,7 @@ export {
314
400
  isConsentRequiredError,
315
401
  isEdgeError,
316
402
  isFeatureUnavailableError,
403
+ isIdentityMatchError,
317
404
  isIdentityVerificationError,
318
405
  isNetworkError,
319
406
  isProductionEnvironment,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edge-markets/connect",
3
- "version": "1.9.2",
3
+ "version": "1.10.0",
4
4
  "description": "Core types, configuration, and utilities for EDGE Connect SDK",
5
5
  "author": "EdgeBoost",
6
6
  "license": "MIT",