@edge-markets/connect-node 1.10.1 → 1.11.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34 -7
- package/dist/index.mjs +34 -7
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as node_https from 'node:https';
|
|
2
2
|
import { EdgeEnvironment, TransferCategory, Transfer, VerificationSession, TransferType, TransferStatus, User, VerifyIdentityOptions, VerifyIdentityResult, Balance, ListTransfersParams, TransferList, CreateVerificationSessionRequest, VerificationSessionStatusResponse, EdgeTokens, EdgeWebhookEvent, EdgeWebhookEventType } from '@edge-markets/connect';
|
|
3
|
-
export { ACTIVE_EDGE_SCOPES, Balance, BaseWebhookEvent, ConsentRevokedEventData, CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, EdgeNetworkError, EdgeNotFoundError, EdgeTokenExchangeError, EdgeTokens, EdgeValidationError, EdgeWebhookEvent, EdgeWebhookEventType, ListTransfersParams, SdkGeolocation, TRANSFER_CATEGORIES, Transfer, TransferCategory, TransferCompletedEventData, TransferExpiredEventData, TransferFailedEventData, TransferList, TransferListItem, TransferProcessingEventData, TransferStatus, TransferType, User, UserAddress, VerificationSession, VerificationSessionStatus, VerificationSessionStatusResponse, VerifyIdentityAddress, VerifyIdentityOptions, VerifyIdentityResult, VerifyIdentityScores, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment } from '@edge-markets/connect';
|
|
3
|
+
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, BaseWebhookEvent, ConsentRevokedEventData, CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, EdgeNetworkError, EdgeNotFoundError, EdgeTokenExchangeError, EdgeTokens, EdgeValidationError, EdgeWebhookEvent, EdgeWebhookEventType, ListTransfersParams, RESERVED_EDGE_SCOPES, SdkGeolocation, TRANSFER_CATEGORIES, Transfer, TransferCategory, TransferCompletedEventData, TransferExpiredEventData, TransferFailedEventData, TransferList, TransferListItem, TransferProcessingEventData, TransferStatus, TransferType, User, UserAddress, VerificationSession, VerificationSessionStatus, VerificationSessionStatusResponse, VerifyIdentityAddress, VerifyIdentityOptions, VerifyIdentityResult, VerifyIdentityScores, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment } from '@edge-markets/connect';
|
|
4
4
|
|
|
5
5
|
type RequestEndpoint = 'connect_api' | 'oauth_token' | 'partner_webhook_sync';
|
|
6
6
|
interface RequestInfo {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as node_https from 'node:https';
|
|
2
2
|
import { EdgeEnvironment, TransferCategory, Transfer, VerificationSession, TransferType, TransferStatus, User, VerifyIdentityOptions, VerifyIdentityResult, Balance, ListTransfersParams, TransferList, CreateVerificationSessionRequest, VerificationSessionStatusResponse, EdgeTokens, EdgeWebhookEvent, EdgeWebhookEventType } from '@edge-markets/connect';
|
|
3
|
-
export { ACTIVE_EDGE_SCOPES, Balance, BaseWebhookEvent, ConsentRevokedEventData, CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, EdgeNetworkError, EdgeNotFoundError, EdgeTokenExchangeError, EdgeTokens, EdgeValidationError, EdgeWebhookEvent, EdgeWebhookEventType, ListTransfersParams, SdkGeolocation, TRANSFER_CATEGORIES, Transfer, TransferCategory, TransferCompletedEventData, TransferExpiredEventData, TransferFailedEventData, TransferList, TransferListItem, TransferProcessingEventData, TransferStatus, TransferType, User, UserAddress, VerificationSession, VerificationSessionStatus, VerificationSessionStatusResponse, VerifyIdentityAddress, VerifyIdentityOptions, VerifyIdentityResult, VerifyIdentityScores, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment } from '@edge-markets/connect';
|
|
3
|
+
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, BaseWebhookEvent, ConsentRevokedEventData, CreateVerificationSessionRequest, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeIdentityVerificationError, EdgeInsufficientScopeError, EdgeNetworkError, EdgeNotFoundError, EdgeTokenExchangeError, EdgeTokens, EdgeValidationError, EdgeWebhookEvent, EdgeWebhookEventType, ListTransfersParams, RESERVED_EDGE_SCOPES, SdkGeolocation, TRANSFER_CATEGORIES, Transfer, TransferCategory, TransferCompletedEventData, TransferExpiredEventData, TransferFailedEventData, TransferList, TransferListItem, TransferProcessingEventData, TransferStatus, TransferType, User, UserAddress, VerificationSession, VerificationSessionStatus, VerificationSessionStatusResponse, VerifyIdentityAddress, VerifyIdentityOptions, VerifyIdentityResult, VerifyIdentityScores, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isEdgeError, isFeatureUnavailableError, isIdentityVerificationError, isNetworkError, isProductionEnvironment } from '@edge-markets/connect';
|
|
4
4
|
|
|
5
5
|
type RequestEndpoint = 'connect_api' | 'oauth_token' | 'partner_webhook_sync';
|
|
6
6
|
interface RequestInfo {
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ACTIVE_EDGE_SCOPES: () => import_connect16.ACTIVE_EDGE_SCOPES,
|
|
34
|
+
ALL_EDGE_SCOPES: () => import_connect16.ALL_EDGE_SCOPES,
|
|
34
35
|
CONNECT_TRANSFER_DIRECTIONS: () => CONNECT_TRANSFER_DIRECTIONS,
|
|
35
36
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE: () => import_connect15.EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
37
|
+
EDGE_SCOPES: () => import_connect16.EDGE_SCOPES,
|
|
36
38
|
EDGE_WEBHOOK_EVENT_TYPES: () => import_connect16.EDGE_WEBHOOK_EVENT_TYPES,
|
|
37
39
|
EdgeApiError: () => import_connect15.EdgeApiError,
|
|
38
40
|
EdgeAuthenticationError: () => import_connect15.EdgeAuthenticationError,
|
|
@@ -51,6 +53,7 @@ __export(index_exports, {
|
|
|
51
53
|
EdgeValidationError: () => import_connect15.EdgeValidationError,
|
|
52
54
|
EdgeWebhookInbox: () => EdgeWebhookInbox,
|
|
53
55
|
EdgeWebhookReconciler: () => EdgeWebhookReconciler,
|
|
56
|
+
RESERVED_EDGE_SCOPES: () => import_connect16.RESERVED_EDGE_SCOPES,
|
|
54
57
|
TRANSFER_CATEGORIES: () => import_connect16.TRANSFER_CATEGORIES,
|
|
55
58
|
assertSameTransferIntent: () => assertSameTransferIntent,
|
|
56
59
|
assertTransferEventMatchesIntent: () => assertTransferEventMatchesIntent,
|
|
@@ -856,7 +859,15 @@ function getInstanceKey(config) {
|
|
|
856
859
|
config.partnerClientId || ""
|
|
857
860
|
]);
|
|
858
861
|
}
|
|
859
|
-
var MTLS_ENFORCED_HOSTS = /* @__PURE__ */ new Set([
|
|
862
|
+
var MTLS_ENFORCED_HOSTS = /* @__PURE__ */ new Set([
|
|
863
|
+
"sandbox.connect.staging.edgeboost.io",
|
|
864
|
+
"connect-staging.edgeboost.io",
|
|
865
|
+
"connect.edgeboost.io"
|
|
866
|
+
]);
|
|
867
|
+
var CONNECT_INGRESS_REQUIRED_MESSAGE = "Edge Connect API requests must go through the mTLS Connect gateway. Set EDGE_API_BASE_URL and EDGE_OAUTH_BASE_URL to the Connect gateway for this environment and configure EDGE_MTLS_CERT and EDGE_MTLS_KEY.";
|
|
868
|
+
var MTLS_REQUIRED_MESSAGE = "Edge Connect rejected this request because no trusted partner mTLS client certificate was presented. Configure the issued EDGE_MTLS_CERT and EDGE_MTLS_KEY and retry through the Connect gateway.";
|
|
869
|
+
var MTLS_CLIENT_UNREGISTERED_MESSAGE = "Edge Connect accepted the client certificate at the gateway, but the certificate is not registered for this partner. Contact EDGE DevRel to bind the certificate fingerprint to your OAuth client ID.";
|
|
870
|
+
var MTLS_CLIENT_MISMATCH_MESSAGE = "Edge Connect accepted the client certificate at the gateway, but it is not bound to the OAuth client ID used by this request. Use the certificate issued for this client ID or contact EDGE DevRel.";
|
|
860
871
|
function isMtlsEnforcedHost(host) {
|
|
861
872
|
if (MTLS_ENFORCED_HOSTS.has(host)) {
|
|
862
873
|
return true;
|
|
@@ -869,7 +880,7 @@ function isMtlsEnforcedHost(host) {
|
|
|
869
880
|
return false;
|
|
870
881
|
}
|
|
871
882
|
function environmentRequiresMtls(environment, apiBaseUrl) {
|
|
872
|
-
if (environment === "staging" || environment === "production") {
|
|
883
|
+
if (environment === "sandbox" || environment === "staging" || environment === "production") {
|
|
873
884
|
return true;
|
|
874
885
|
}
|
|
875
886
|
try {
|
|
@@ -1487,18 +1498,31 @@ var EdgeConnectServer = class _EdgeConnectServer {
|
|
|
1487
1498
|
});
|
|
1488
1499
|
}
|
|
1489
1500
|
async handleApiErrorFromBody(error, status, path) {
|
|
1501
|
+
const errorCode = error.error || error.code;
|
|
1490
1502
|
if (status === 401) {
|
|
1491
1503
|
return new import_connect5.EdgeAuthenticationError(error.message || "Access token is invalid or expired", error);
|
|
1492
1504
|
}
|
|
1493
1505
|
if (status === 403) {
|
|
1494
|
-
if (
|
|
1506
|
+
if (errorCode === "connect_ingress_required") {
|
|
1507
|
+
return new import_connect5.EdgeApiError("connect_ingress_required", CONNECT_INGRESS_REQUIRED_MESSAGE, status, error);
|
|
1508
|
+
}
|
|
1509
|
+
if (errorCode === "mtls_required") {
|
|
1510
|
+
return new import_connect5.EdgeApiError("mtls_required", MTLS_REQUIRED_MESSAGE, status, error);
|
|
1511
|
+
}
|
|
1512
|
+
if (errorCode === "mtls_client_unregistered") {
|
|
1513
|
+
return new import_connect5.EdgeApiError("mtls_client_unregistered", MTLS_CLIENT_UNREGISTERED_MESSAGE, status, error);
|
|
1514
|
+
}
|
|
1515
|
+
if (errorCode === "mtls_client_mismatch") {
|
|
1516
|
+
return new import_connect5.EdgeApiError("mtls_client_mismatch", MTLS_CLIENT_MISMATCH_MESSAGE, status, error);
|
|
1517
|
+
}
|
|
1518
|
+
if (errorCode === "consent_required") {
|
|
1495
1519
|
return new import_connect5.EdgeConsentRequiredError(
|
|
1496
1520
|
this.config.clientId,
|
|
1497
1521
|
error.consentUrl,
|
|
1498
1522
|
error.message
|
|
1499
1523
|
);
|
|
1500
1524
|
}
|
|
1501
|
-
if (
|
|
1525
|
+
if (errorCode === "insufficient_scope" || errorCode === "insufficient_consent") {
|
|
1502
1526
|
return new import_connect5.EdgeInsufficientScopeError(
|
|
1503
1527
|
error.missing_scopes || error.missingScopes || [],
|
|
1504
1528
|
error.message
|
|
@@ -1642,11 +1666,11 @@ function buildMtlsConfig(env, requireMtls, warnings) {
|
|
|
1642
1666
|
};
|
|
1643
1667
|
}
|
|
1644
1668
|
function inferMtlsRequirement(environment, apiBaseUrl) {
|
|
1645
|
-
if (environment === "staging" || environment === "production") return true;
|
|
1669
|
+
if (environment === "sandbox" || environment === "staging" || environment === "production") return true;
|
|
1646
1670
|
const resolvedApiBaseUrl = apiBaseUrl || (0, import_connect6.getEnvironmentConfig)(environment).apiBaseUrl;
|
|
1647
1671
|
try {
|
|
1648
1672
|
const host = new URL(resolvedApiBaseUrl).host;
|
|
1649
|
-
return host === "connect-staging.edgeboost.io" || host === "connect.edgeboost.io";
|
|
1673
|
+
return host === "sandbox.connect.staging.edgeboost.io" || host === "connect-staging.edgeboost.io" || host === "connect.edgeboost.io";
|
|
1650
1674
|
} catch {
|
|
1651
1675
|
return false;
|
|
1652
1676
|
}
|
|
@@ -1657,7 +1681,7 @@ function createEdgeConnectServerFromEnv(options = {}) {
|
|
|
1657
1681
|
const environment = readEnvironment(env);
|
|
1658
1682
|
const apiBaseUrl = readEnv(env, "EDGE_API_BASE_URL");
|
|
1659
1683
|
const mtlsRequiredByTarget = inferMtlsRequirement(environment, apiBaseUrl);
|
|
1660
|
-
const requireMtls = options.requireMtls ?? readBooleanEnv(env, "EDGE_REQUIRE_MTLS") ??
|
|
1684
|
+
const requireMtls = options.requireMtls ?? readBooleanEnv(env, "EDGE_REQUIRE_MTLS") ?? mtlsRequiredByTarget;
|
|
1661
1685
|
const mtls = buildMtlsConfig(env, requireMtls, warnings);
|
|
1662
1686
|
const timeout = readTimeout(env, options.timeout);
|
|
1663
1687
|
const clientId = readFirstEnv(env, ["EDGE_CLIENT_ID", "EDGE_CONNECT_CLIENT_ID"]) || "";
|
|
@@ -2658,8 +2682,10 @@ var import_connect16 = require("@edge-markets/connect");
|
|
|
2658
2682
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2659
2683
|
0 && (module.exports = {
|
|
2660
2684
|
ACTIVE_EDGE_SCOPES,
|
|
2685
|
+
ALL_EDGE_SCOPES,
|
|
2661
2686
|
CONNECT_TRANSFER_DIRECTIONS,
|
|
2662
2687
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
2688
|
+
EDGE_SCOPES,
|
|
2663
2689
|
EDGE_WEBHOOK_EVENT_TYPES,
|
|
2664
2690
|
EdgeApiError,
|
|
2665
2691
|
EdgeAuthenticationError,
|
|
@@ -2678,6 +2704,7 @@ var import_connect16 = require("@edge-markets/connect");
|
|
|
2678
2704
|
EdgeValidationError,
|
|
2679
2705
|
EdgeWebhookInbox,
|
|
2680
2706
|
EdgeWebhookReconciler,
|
|
2707
|
+
RESERVED_EDGE_SCOPES,
|
|
2681
2708
|
TRANSFER_CATEGORIES,
|
|
2682
2709
|
assertSameTransferIntent,
|
|
2683
2710
|
assertTransferEventMatchesIntent,
|
package/dist/index.mjs
CHANGED
|
@@ -769,7 +769,15 @@ function getInstanceKey(config) {
|
|
|
769
769
|
config.partnerClientId || ""
|
|
770
770
|
]);
|
|
771
771
|
}
|
|
772
|
-
var MTLS_ENFORCED_HOSTS = /* @__PURE__ */ new Set([
|
|
772
|
+
var MTLS_ENFORCED_HOSTS = /* @__PURE__ */ new Set([
|
|
773
|
+
"sandbox.connect.staging.edgeboost.io",
|
|
774
|
+
"connect-staging.edgeboost.io",
|
|
775
|
+
"connect.edgeboost.io"
|
|
776
|
+
]);
|
|
777
|
+
var CONNECT_INGRESS_REQUIRED_MESSAGE = "Edge Connect API requests must go through the mTLS Connect gateway. Set EDGE_API_BASE_URL and EDGE_OAUTH_BASE_URL to the Connect gateway for this environment and configure EDGE_MTLS_CERT and EDGE_MTLS_KEY.";
|
|
778
|
+
var MTLS_REQUIRED_MESSAGE = "Edge Connect rejected this request because no trusted partner mTLS client certificate was presented. Configure the issued EDGE_MTLS_CERT and EDGE_MTLS_KEY and retry through the Connect gateway.";
|
|
779
|
+
var MTLS_CLIENT_UNREGISTERED_MESSAGE = "Edge Connect accepted the client certificate at the gateway, but the certificate is not registered for this partner. Contact EDGE DevRel to bind the certificate fingerprint to your OAuth client ID.";
|
|
780
|
+
var MTLS_CLIENT_MISMATCH_MESSAGE = "Edge Connect accepted the client certificate at the gateway, but it is not bound to the OAuth client ID used by this request. Use the certificate issued for this client ID or contact EDGE DevRel.";
|
|
773
781
|
function isMtlsEnforcedHost(host) {
|
|
774
782
|
if (MTLS_ENFORCED_HOSTS.has(host)) {
|
|
775
783
|
return true;
|
|
@@ -782,7 +790,7 @@ function isMtlsEnforcedHost(host) {
|
|
|
782
790
|
return false;
|
|
783
791
|
}
|
|
784
792
|
function environmentRequiresMtls(environment, apiBaseUrl) {
|
|
785
|
-
if (environment === "staging" || environment === "production") {
|
|
793
|
+
if (environment === "sandbox" || environment === "staging" || environment === "production") {
|
|
786
794
|
return true;
|
|
787
795
|
}
|
|
788
796
|
try {
|
|
@@ -1400,18 +1408,31 @@ var EdgeConnectServer = class _EdgeConnectServer {
|
|
|
1400
1408
|
});
|
|
1401
1409
|
}
|
|
1402
1410
|
async handleApiErrorFromBody(error, status, path) {
|
|
1411
|
+
const errorCode = error.error || error.code;
|
|
1403
1412
|
if (status === 401) {
|
|
1404
1413
|
return new EdgeAuthenticationError2(error.message || "Access token is invalid or expired", error);
|
|
1405
1414
|
}
|
|
1406
1415
|
if (status === 403) {
|
|
1407
|
-
if (
|
|
1416
|
+
if (errorCode === "connect_ingress_required") {
|
|
1417
|
+
return new EdgeApiError("connect_ingress_required", CONNECT_INGRESS_REQUIRED_MESSAGE, status, error);
|
|
1418
|
+
}
|
|
1419
|
+
if (errorCode === "mtls_required") {
|
|
1420
|
+
return new EdgeApiError("mtls_required", MTLS_REQUIRED_MESSAGE, status, error);
|
|
1421
|
+
}
|
|
1422
|
+
if (errorCode === "mtls_client_unregistered") {
|
|
1423
|
+
return new EdgeApiError("mtls_client_unregistered", MTLS_CLIENT_UNREGISTERED_MESSAGE, status, error);
|
|
1424
|
+
}
|
|
1425
|
+
if (errorCode === "mtls_client_mismatch") {
|
|
1426
|
+
return new EdgeApiError("mtls_client_mismatch", MTLS_CLIENT_MISMATCH_MESSAGE, status, error);
|
|
1427
|
+
}
|
|
1428
|
+
if (errorCode === "consent_required") {
|
|
1408
1429
|
return new EdgeConsentRequiredError(
|
|
1409
1430
|
this.config.clientId,
|
|
1410
1431
|
error.consentUrl,
|
|
1411
1432
|
error.message
|
|
1412
1433
|
);
|
|
1413
1434
|
}
|
|
1414
|
-
if (
|
|
1435
|
+
if (errorCode === "insufficient_scope" || errorCode === "insufficient_consent") {
|
|
1415
1436
|
return new EdgeInsufficientScopeError(
|
|
1416
1437
|
error.missing_scopes || error.missingScopes || [],
|
|
1417
1438
|
error.message
|
|
@@ -1555,11 +1576,11 @@ function buildMtlsConfig(env, requireMtls, warnings) {
|
|
|
1555
1576
|
};
|
|
1556
1577
|
}
|
|
1557
1578
|
function inferMtlsRequirement(environment, apiBaseUrl) {
|
|
1558
|
-
if (environment === "staging" || environment === "production") return true;
|
|
1579
|
+
if (environment === "sandbox" || environment === "staging" || environment === "production") return true;
|
|
1559
1580
|
const resolvedApiBaseUrl = apiBaseUrl || getEnvironmentConfig2(environment).apiBaseUrl;
|
|
1560
1581
|
try {
|
|
1561
1582
|
const host = new URL(resolvedApiBaseUrl).host;
|
|
1562
|
-
return host === "connect-staging.edgeboost.io" || host === "connect.edgeboost.io";
|
|
1583
|
+
return host === "sandbox.connect.staging.edgeboost.io" || host === "connect-staging.edgeboost.io" || host === "connect.edgeboost.io";
|
|
1563
1584
|
} catch {
|
|
1564
1585
|
return false;
|
|
1565
1586
|
}
|
|
@@ -1570,7 +1591,7 @@ function createEdgeConnectServerFromEnv(options = {}) {
|
|
|
1570
1591
|
const environment = readEnvironment(env);
|
|
1571
1592
|
const apiBaseUrl = readEnv(env, "EDGE_API_BASE_URL");
|
|
1572
1593
|
const mtlsRequiredByTarget = inferMtlsRequirement(environment, apiBaseUrl);
|
|
1573
|
-
const requireMtls = options.requireMtls ?? readBooleanEnv(env, "EDGE_REQUIRE_MTLS") ??
|
|
1594
|
+
const requireMtls = options.requireMtls ?? readBooleanEnv(env, "EDGE_REQUIRE_MTLS") ?? mtlsRequiredByTarget;
|
|
1574
1595
|
const mtls = buildMtlsConfig(env, requireMtls, warnings);
|
|
1575
1596
|
const timeout = readTimeout(env, options.timeout);
|
|
1576
1597
|
const clientId = readFirstEnv(env, ["EDGE_CLIENT_ID", "EDGE_CONNECT_CLIENT_ID"]) || "";
|
|
@@ -2600,6 +2621,9 @@ import {
|
|
|
2600
2621
|
} from "@edge-markets/connect";
|
|
2601
2622
|
import {
|
|
2602
2623
|
ACTIVE_EDGE_SCOPES,
|
|
2624
|
+
ALL_EDGE_SCOPES,
|
|
2625
|
+
EDGE_SCOPES,
|
|
2626
|
+
RESERVED_EDGE_SCOPES,
|
|
2603
2627
|
EDGE_WEBHOOK_EVENT_TYPES as EDGE_WEBHOOK_EVENT_TYPES2,
|
|
2604
2628
|
TRANSFER_CATEGORIES,
|
|
2605
2629
|
getEnvironmentConfig as getEnvironmentConfig3,
|
|
@@ -2607,8 +2631,10 @@ import {
|
|
|
2607
2631
|
} from "@edge-markets/connect";
|
|
2608
2632
|
export {
|
|
2609
2633
|
ACTIVE_EDGE_SCOPES,
|
|
2634
|
+
ALL_EDGE_SCOPES,
|
|
2610
2635
|
CONNECT_TRANSFER_DIRECTIONS,
|
|
2611
2636
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
2637
|
+
EDGE_SCOPES,
|
|
2612
2638
|
EDGE_WEBHOOK_EVENT_TYPES2 as EDGE_WEBHOOK_EVENT_TYPES,
|
|
2613
2639
|
EdgeApiError2 as EdgeApiError,
|
|
2614
2640
|
EdgeAuthenticationError4 as EdgeAuthenticationError,
|
|
@@ -2627,6 +2653,7 @@ export {
|
|
|
2627
2653
|
EdgeValidationError13 as EdgeValidationError,
|
|
2628
2654
|
EdgeWebhookInbox,
|
|
2629
2655
|
EdgeWebhookReconciler,
|
|
2656
|
+
RESERVED_EDGE_SCOPES,
|
|
2630
2657
|
TRANSFER_CATEGORIES,
|
|
2631
2658
|
assertSameTransferIntent,
|
|
2632
2659
|
assertTransferEventMatchesIntent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edge-markets/connect-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Server SDK for EDGE Connect token exchange and API calls",
|
|
5
5
|
"author": "Edge Markets",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"undici": "^5.29.0",
|
|
25
|
-
"@edge-markets/connect": "^1.
|
|
25
|
+
"@edge-markets/connect": "^1.9.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^8.0.0",
|