@edge-markets/connect 1.9.2 → 1.10.1
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 +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +108 -13
- package/dist/index.mjs +101 -13
- package/package.json +1 -1
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,73 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
|
|
|
97
104
|
|
|
98
105
|
// src/config/environments.ts
|
|
99
106
|
var EDGE_LINK_PATH = "/oauth/link";
|
|
100
|
-
var
|
|
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
|
+
// Keep the public sandbox default on the accepted staging-account cell until
|
|
160
|
+
// sandbox-production Link, DNS, and Alexandria acceptance are complete.
|
|
161
|
+
// The canonical cell remains available through getDeploymentCellConfig for
|
|
162
|
+
// explicit internal rollout testing.
|
|
163
|
+
sandbox: EDGE_DEPLOYMENT_CELLS["sandbox-staging"]
|
|
164
|
+
};
|
|
119
165
|
function getEnvironmentConfig(environment) {
|
|
120
166
|
return EDGE_ENVIRONMENTS[environment];
|
|
121
167
|
}
|
|
168
|
+
function getDeploymentCellConfig(cell) {
|
|
169
|
+
return EDGE_DEPLOYMENT_CELLS[cell];
|
|
170
|
+
}
|
|
171
|
+
function getAvailableDeploymentCells() {
|
|
172
|
+
return Object.keys(EDGE_DEPLOYMENT_CELLS);
|
|
173
|
+
}
|
|
122
174
|
function getLinkUrl(environment, linkUrl) {
|
|
123
175
|
const configuredUrl = linkUrl?.trim();
|
|
124
176
|
const url = new URL(configuredUrl || `${EDGE_ENVIRONMENTS[environment].userClientUrl}${EDGE_LINK_PATH}`);
|
|
@@ -149,6 +201,12 @@ var EDGE_SCOPES = {
|
|
|
149
201
|
* Required for: `GET /v1/balance`
|
|
150
202
|
*/
|
|
151
203
|
BALANCE_READ: "balance.read",
|
|
204
|
+
/**
|
|
205
|
+
* Compare partner-held identity data with the authenticated EDGE profile.
|
|
206
|
+
* This is separately allowlisted and returns only a coarse advisory result.
|
|
207
|
+
* Required for: `POST /connect/v2/identity/match`
|
|
208
|
+
*/
|
|
209
|
+
IDENTITY_MATCH: "identity.match",
|
|
152
210
|
/**
|
|
153
211
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
154
212
|
* Not available in sandbox or production. Requesting this scope from Link
|
|
@@ -160,16 +218,18 @@ var EDGE_SCOPES = {
|
|
|
160
218
|
TRANSFER_WRITE: "transfer.write"
|
|
161
219
|
};
|
|
162
220
|
var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
|
|
163
|
-
var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.TRANSFER_WRITE];
|
|
221
|
+
var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.IDENTITY_MATCH, EDGE_SCOPES.TRANSFER_WRITE];
|
|
164
222
|
var ALL_EDGE_SCOPES = ACTIVE_EDGE_SCOPES;
|
|
165
223
|
var SCOPE_DESCRIPTIONS = {
|
|
166
224
|
[EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
|
|
167
225
|
[EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
|
|
226
|
+
[EDGE_SCOPES.IDENTITY_MATCH]: "Compare partner-held identity details and return a coarse advisory result",
|
|
168
227
|
[EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
|
|
169
228
|
};
|
|
170
229
|
var SCOPE_ICONS = {
|
|
171
230
|
[EDGE_SCOPES.USER_READ]: "user",
|
|
172
231
|
[EDGE_SCOPES.BALANCE_READ]: "wallet",
|
|
232
|
+
[EDGE_SCOPES.IDENTITY_MATCH]: "shield-check",
|
|
173
233
|
[EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
|
|
174
234
|
};
|
|
175
235
|
function formatScopeForEnvironment(scope, environment) {
|
|
@@ -289,6 +349,31 @@ var EdgeIdentityVerificationError = class extends EdgeError {
|
|
|
289
349
|
this.fieldErrors = fieldErrors;
|
|
290
350
|
}
|
|
291
351
|
};
|
|
352
|
+
var EdgeIdentityMatchConflictError = class extends EdgeError {
|
|
353
|
+
constructor(code, message) {
|
|
354
|
+
super(code, message || "Identity match could not be completed because a request precondition failed.", 409);
|
|
355
|
+
this.name = "EdgeIdentityMatchConflictError";
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
var EdgeIdentityMatchAttemptLimitError = class extends EdgeError {
|
|
359
|
+
constructor(retryAfterSeconds, message) {
|
|
360
|
+
super("identity_match_attempt_limit", message || "Identity match attempt limit reached. Retry later.", 429, {
|
|
361
|
+
retryAfterSeconds
|
|
362
|
+
});
|
|
363
|
+
this.name = "EdgeIdentityMatchAttemptLimitError";
|
|
364
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
var EdgeIdentityMatchUnavailableError = class extends EdgeError {
|
|
368
|
+
constructor(message) {
|
|
369
|
+
super(
|
|
370
|
+
"identity_match_unavailable",
|
|
371
|
+
message || "Identity match is temporarily unavailable. Retry with the same idempotency key.",
|
|
372
|
+
503
|
|
373
|
+
);
|
|
374
|
+
this.name = "EdgeIdentityMatchUnavailableError";
|
|
375
|
+
}
|
|
376
|
+
};
|
|
292
377
|
var EdgePopupBlockedError = class extends EdgeError {
|
|
293
378
|
constructor() {
|
|
294
379
|
super("popup_blocked", "Popup was blocked by the browser. Please allow popups for this site and try again.");
|
|
@@ -334,6 +419,9 @@ function isApiError(error) {
|
|
|
334
419
|
function isIdentityVerificationError(error) {
|
|
335
420
|
return error instanceof EdgeIdentityVerificationError;
|
|
336
421
|
}
|
|
422
|
+
function isIdentityMatchError(error) {
|
|
423
|
+
return error instanceof EdgeIdentityMatchConflictError || error instanceof EdgeIdentityMatchAttemptLimitError || error instanceof EdgeIdentityMatchUnavailableError;
|
|
424
|
+
}
|
|
337
425
|
function isNetworkError(error) {
|
|
338
426
|
return error instanceof EdgeNetworkError;
|
|
339
427
|
}
|
|
@@ -349,6 +437,7 @@ var SDK_NAME = "@edge-markets/connect";
|
|
|
349
437
|
ACTIVE_EDGE_SCOPES,
|
|
350
438
|
ALL_EDGE_SCOPES,
|
|
351
439
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
440
|
+
EDGE_DEPLOYMENT_CELLS,
|
|
352
441
|
EDGE_ENVIRONMENTS,
|
|
353
442
|
EDGE_LINK_PATH,
|
|
354
443
|
EDGE_SCOPES,
|
|
@@ -358,6 +447,9 @@ var SDK_NAME = "@edge-markets/connect";
|
|
|
358
447
|
EdgeConsentRequiredError,
|
|
359
448
|
EdgeError,
|
|
360
449
|
EdgeFeatureUnavailableError,
|
|
450
|
+
EdgeIdentityMatchAttemptLimitError,
|
|
451
|
+
EdgeIdentityMatchConflictError,
|
|
452
|
+
EdgeIdentityMatchUnavailableError,
|
|
361
453
|
EdgeIdentityVerificationError,
|
|
362
454
|
EdgeInsufficientScopeError,
|
|
363
455
|
EdgeNetworkError,
|
|
@@ -378,7 +470,9 @@ var SDK_NAME = "@edge-markets/connect";
|
|
|
378
470
|
TRANSFER_TYPES,
|
|
379
471
|
formatScopeForEnvironment,
|
|
380
472
|
formatScopesForEnvironment,
|
|
473
|
+
getAvailableDeploymentCells,
|
|
381
474
|
getAvailableEnvironments,
|
|
475
|
+
getDeploymentCellConfig,
|
|
382
476
|
getEnvironmentConfig,
|
|
383
477
|
getLinkUrl,
|
|
384
478
|
isApiError,
|
|
@@ -386,6 +480,7 @@ var SDK_NAME = "@edge-markets/connect";
|
|
|
386
480
|
isConsentRequiredError,
|
|
387
481
|
isEdgeError,
|
|
388
482
|
isFeatureUnavailableError,
|
|
483
|
+
isIdentityMatchError,
|
|
389
484
|
isIdentityVerificationError,
|
|
390
485
|
isNetworkError,
|
|
391
486
|
isProductionEnvironment,
|
package/dist/index.mjs
CHANGED
|
@@ -26,28 +26,73 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
|
|
|
26
26
|
|
|
27
27
|
// src/config/environments.ts
|
|
28
28
|
var EDGE_LINK_PATH = "/oauth/link";
|
|
29
|
-
var
|
|
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
|
+
// Keep the public sandbox default on the accepted staging-account cell until
|
|
82
|
+
// sandbox-production Link, DNS, and Alexandria acceptance are complete.
|
|
83
|
+
// The canonical cell remains available through getDeploymentCellConfig for
|
|
84
|
+
// explicit internal rollout testing.
|
|
85
|
+
sandbox: EDGE_DEPLOYMENT_CELLS["sandbox-staging"]
|
|
86
|
+
};
|
|
48
87
|
function getEnvironmentConfig(environment) {
|
|
49
88
|
return EDGE_ENVIRONMENTS[environment];
|
|
50
89
|
}
|
|
90
|
+
function getDeploymentCellConfig(cell) {
|
|
91
|
+
return EDGE_DEPLOYMENT_CELLS[cell];
|
|
92
|
+
}
|
|
93
|
+
function getAvailableDeploymentCells() {
|
|
94
|
+
return Object.keys(EDGE_DEPLOYMENT_CELLS);
|
|
95
|
+
}
|
|
51
96
|
function getLinkUrl(environment, linkUrl) {
|
|
52
97
|
const configuredUrl = linkUrl?.trim();
|
|
53
98
|
const url = new URL(configuredUrl || `${EDGE_ENVIRONMENTS[environment].userClientUrl}${EDGE_LINK_PATH}`);
|
|
@@ -78,6 +123,12 @@ var EDGE_SCOPES = {
|
|
|
78
123
|
* Required for: `GET /v1/balance`
|
|
79
124
|
*/
|
|
80
125
|
BALANCE_READ: "balance.read",
|
|
126
|
+
/**
|
|
127
|
+
* Compare partner-held identity data with the authenticated EDGE profile.
|
|
128
|
+
* This is separately allowlisted and returns only a coarse advisory result.
|
|
129
|
+
* Required for: `POST /connect/v2/identity/match`
|
|
130
|
+
*/
|
|
131
|
+
IDENTITY_MATCH: "identity.match",
|
|
81
132
|
/**
|
|
82
133
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
83
134
|
* Not available in sandbox or production. Requesting this scope from Link
|
|
@@ -89,16 +140,18 @@ var EDGE_SCOPES = {
|
|
|
89
140
|
TRANSFER_WRITE: "transfer.write"
|
|
90
141
|
};
|
|
91
142
|
var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
|
|
92
|
-
var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.TRANSFER_WRITE];
|
|
143
|
+
var RESERVED_EDGE_SCOPES = [EDGE_SCOPES.IDENTITY_MATCH, EDGE_SCOPES.TRANSFER_WRITE];
|
|
93
144
|
var ALL_EDGE_SCOPES = ACTIVE_EDGE_SCOPES;
|
|
94
145
|
var SCOPE_DESCRIPTIONS = {
|
|
95
146
|
[EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
|
|
96
147
|
[EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
|
|
148
|
+
[EDGE_SCOPES.IDENTITY_MATCH]: "Compare partner-held identity details and return a coarse advisory result",
|
|
97
149
|
[EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
|
|
98
150
|
};
|
|
99
151
|
var SCOPE_ICONS = {
|
|
100
152
|
[EDGE_SCOPES.USER_READ]: "user",
|
|
101
153
|
[EDGE_SCOPES.BALANCE_READ]: "wallet",
|
|
154
|
+
[EDGE_SCOPES.IDENTITY_MATCH]: "shield-check",
|
|
102
155
|
[EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
|
|
103
156
|
};
|
|
104
157
|
function formatScopeForEnvironment(scope, environment) {
|
|
@@ -218,6 +271,31 @@ var EdgeIdentityVerificationError = class extends EdgeError {
|
|
|
218
271
|
this.fieldErrors = fieldErrors;
|
|
219
272
|
}
|
|
220
273
|
};
|
|
274
|
+
var EdgeIdentityMatchConflictError = class extends EdgeError {
|
|
275
|
+
constructor(code, message) {
|
|
276
|
+
super(code, message || "Identity match could not be completed because a request precondition failed.", 409);
|
|
277
|
+
this.name = "EdgeIdentityMatchConflictError";
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
var EdgeIdentityMatchAttemptLimitError = class extends EdgeError {
|
|
281
|
+
constructor(retryAfterSeconds, message) {
|
|
282
|
+
super("identity_match_attempt_limit", message || "Identity match attempt limit reached. Retry later.", 429, {
|
|
283
|
+
retryAfterSeconds
|
|
284
|
+
});
|
|
285
|
+
this.name = "EdgeIdentityMatchAttemptLimitError";
|
|
286
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
var EdgeIdentityMatchUnavailableError = class extends EdgeError {
|
|
290
|
+
constructor(message) {
|
|
291
|
+
super(
|
|
292
|
+
"identity_match_unavailable",
|
|
293
|
+
message || "Identity match is temporarily unavailable. Retry with the same idempotency key.",
|
|
294
|
+
503
|
|
295
|
+
);
|
|
296
|
+
this.name = "EdgeIdentityMatchUnavailableError";
|
|
297
|
+
}
|
|
298
|
+
};
|
|
221
299
|
var EdgePopupBlockedError = class extends EdgeError {
|
|
222
300
|
constructor() {
|
|
223
301
|
super("popup_blocked", "Popup was blocked by the browser. Please allow popups for this site and try again.");
|
|
@@ -263,6 +341,9 @@ function isApiError(error) {
|
|
|
263
341
|
function isIdentityVerificationError(error) {
|
|
264
342
|
return error instanceof EdgeIdentityVerificationError;
|
|
265
343
|
}
|
|
344
|
+
function isIdentityMatchError(error) {
|
|
345
|
+
return error instanceof EdgeIdentityMatchConflictError || error instanceof EdgeIdentityMatchAttemptLimitError || error instanceof EdgeIdentityMatchUnavailableError;
|
|
346
|
+
}
|
|
266
347
|
function isNetworkError(error) {
|
|
267
348
|
return error instanceof EdgeNetworkError;
|
|
268
349
|
}
|
|
@@ -277,6 +358,7 @@ export {
|
|
|
277
358
|
ACTIVE_EDGE_SCOPES,
|
|
278
359
|
ALL_EDGE_SCOPES,
|
|
279
360
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
361
|
+
EDGE_DEPLOYMENT_CELLS,
|
|
280
362
|
EDGE_ENVIRONMENTS,
|
|
281
363
|
EDGE_LINK_PATH,
|
|
282
364
|
EDGE_SCOPES,
|
|
@@ -286,6 +368,9 @@ export {
|
|
|
286
368
|
EdgeConsentRequiredError,
|
|
287
369
|
EdgeError,
|
|
288
370
|
EdgeFeatureUnavailableError,
|
|
371
|
+
EdgeIdentityMatchAttemptLimitError,
|
|
372
|
+
EdgeIdentityMatchConflictError,
|
|
373
|
+
EdgeIdentityMatchUnavailableError,
|
|
289
374
|
EdgeIdentityVerificationError,
|
|
290
375
|
EdgeInsufficientScopeError,
|
|
291
376
|
EdgeNetworkError,
|
|
@@ -306,7 +391,9 @@ export {
|
|
|
306
391
|
TRANSFER_TYPES,
|
|
307
392
|
formatScopeForEnvironment,
|
|
308
393
|
formatScopesForEnvironment,
|
|
394
|
+
getAvailableDeploymentCells,
|
|
309
395
|
getAvailableEnvironments,
|
|
396
|
+
getDeploymentCellConfig,
|
|
310
397
|
getEnvironmentConfig,
|
|
311
398
|
getLinkUrl,
|
|
312
399
|
isApiError,
|
|
@@ -314,6 +401,7 @@ export {
|
|
|
314
401
|
isConsentRequiredError,
|
|
315
402
|
isEdgeError,
|
|
316
403
|
isFeatureUnavailableError,
|
|
404
|
+
isIdentityMatchError,
|
|
317
405
|
isIdentityVerificationError,
|
|
318
406
|
isNetworkError,
|
|
319
407
|
isProductionEnvironment,
|