@edge-markets/connect 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.d.mts +12 -21
- package/dist/index.d.ts +12 -21
- package/dist/index.js +3 -40
- package/dist/index.mjs +3 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,13 +92,13 @@ import {
|
|
|
92
92
|
formatScopeForEnvironment,
|
|
93
93
|
} from '@edge-markets/connect'
|
|
94
94
|
|
|
95
|
-
const config = getEnvironmentConfig('
|
|
95
|
+
const config = getEnvironmentConfig('sandbox')
|
|
96
96
|
console.log(config.apiBaseUrl) // https://...
|
|
97
|
-
console.log(getLinkUrl('
|
|
97
|
+
console.log(getLinkUrl('sandbox')) // https://sandbox-oauth.staging-app.edgeboost.io/oauth/link
|
|
98
98
|
|
|
99
99
|
// Format scopes for your environment
|
|
100
|
-
const scopes = formatScopeForEnvironment(EDGE_SCOPES.BALANCE_READ, '
|
|
101
|
-
// Returns: 'edge-connect-
|
|
100
|
+
const scopes = formatScopeForEnvironment(EDGE_SCOPES.BALANCE_READ, 'sandbox')
|
|
101
|
+
// Returns: 'edge-connect-sandbox/balance.read'
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
### Error Handling
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
type EdgeEnvironment = 'production' | '
|
|
1
|
+
type EdgeEnvironment = 'production' | 'sandbox';
|
|
2
2
|
declare const EDGE_LINK_PATH = "/oauth/link";
|
|
3
3
|
interface EdgeEnvironmentConfig {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated cognitoDomain is no longer used. Token exchange now goes through EdgeBoost API.
|
|
6
|
-
*/
|
|
7
|
-
cognitoDomain: string;
|
|
8
4
|
apiBaseUrl: string;
|
|
9
5
|
oauthBaseUrl: string;
|
|
10
6
|
userClientUrl: string;
|
|
@@ -32,6 +28,7 @@ declare function getAvailableEnvironments(): readonly EdgeEnvironment[];
|
|
|
32
28
|
*
|
|
33
29
|
* @module @edge-markets/connect/config
|
|
34
30
|
*/
|
|
31
|
+
|
|
35
32
|
/**
|
|
36
33
|
* Available OAuth scopes for EDGE Connect.
|
|
37
34
|
*
|
|
@@ -64,7 +61,7 @@ declare const EDGE_SCOPES: {
|
|
|
64
61
|
readonly BALANCE_READ: "balance.read";
|
|
65
62
|
/**
|
|
66
63
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
67
|
-
* Not available in
|
|
64
|
+
* Not available in sandbox or production. Requesting this scope from Link
|
|
68
65
|
* SDKs fails with EdgeFeatureUnavailableError until EDGE enables transfers
|
|
69
66
|
* for a partner.
|
|
70
67
|
*
|
|
@@ -98,7 +95,7 @@ declare const RESERVED_EDGE_SCOPES: readonly EdgeScope[];
|
|
|
98
95
|
* ```typescript
|
|
99
96
|
* const link = new EdgeLink({
|
|
100
97
|
* clientId: 'your-client-id',
|
|
101
|
-
* environment: '
|
|
98
|
+
* environment: 'sandbox',
|
|
102
99
|
* scopes: ALL_EDGE_SCOPES, // Same values as ACTIVE_EDGE_SCOPES today
|
|
103
100
|
* onSuccess: handleSuccess,
|
|
104
101
|
* })
|
|
@@ -121,26 +118,20 @@ declare const SCOPE_ICONS: Readonly<Record<EdgeScope, string>>;
|
|
|
121
118
|
* Different environments may use different scope prefixes in the API Gateway.
|
|
122
119
|
* This function handles the prefix automatically.
|
|
123
120
|
*
|
|
124
|
-
* Note: 'development' environment uses 'staging' scope prefix because it
|
|
125
|
-
* connects to the staging API Gateway for local testing.
|
|
126
|
-
*
|
|
127
121
|
* @param scope - The scope to format
|
|
128
122
|
* @param environment - The target environment
|
|
129
123
|
* @returns The full scope string for API Gateway authorization
|
|
130
124
|
*
|
|
131
125
|
* @example
|
|
132
126
|
* ```typescript
|
|
133
|
-
* formatScopeForEnvironment('user.read', '
|
|
134
|
-
* // Returns: 'edge-connect-
|
|
127
|
+
* formatScopeForEnvironment('user.read', 'sandbox')
|
|
128
|
+
* // Returns: 'edge-connect-sandbox/user.read'
|
|
135
129
|
*
|
|
136
130
|
* formatScopeForEnvironment('user.read', 'production')
|
|
137
131
|
* // Returns: 'edge-connect/user.read'
|
|
138
|
-
*
|
|
139
|
-
* formatScopeForEnvironment('user.read', 'development')
|
|
140
|
-
* // Returns: 'edge-connect-staging/user.read' (maps to staging)
|
|
141
132
|
* ```
|
|
142
133
|
*/
|
|
143
|
-
declare function formatScopeForEnvironment(scope: EdgeScope, environment:
|
|
134
|
+
declare function formatScopeForEnvironment(scope: EdgeScope, environment: EdgeEnvironment): string;
|
|
144
135
|
/**
|
|
145
136
|
* Formats multiple scopes for an environment.
|
|
146
137
|
*
|
|
@@ -148,11 +139,11 @@ declare function formatScopeForEnvironment(scope: EdgeScope, environment: 'produ
|
|
|
148
139
|
* @param environment - The target environment
|
|
149
140
|
* @returns Array of full scope strings
|
|
150
141
|
*/
|
|
151
|
-
declare function formatScopesForEnvironment(scopes: readonly EdgeScope[] | EdgeScope[], environment:
|
|
142
|
+
declare function formatScopesForEnvironment(scopes: readonly EdgeScope[] | EdgeScope[], environment: EdgeEnvironment): string[];
|
|
152
143
|
/**
|
|
153
144
|
* Parses a full scope string to extract the base scope.
|
|
154
145
|
*
|
|
155
|
-
* @param fullScope - The full scope string (e.g., 'edge-connect-
|
|
146
|
+
* @param fullScope - The full scope string (e.g., 'edge-connect-sandbox/user.read')
|
|
156
147
|
* @returns The base scope (e.g., 'user.read') or null if invalid
|
|
157
148
|
*/
|
|
158
149
|
declare function parseScope(fullScope: string): EdgeScope | null;
|
|
@@ -163,7 +154,7 @@ declare function isValidScope(scope: string): scope is EdgeScope;
|
|
|
163
154
|
/**
|
|
164
155
|
* Checks whether a scope string requests the future transfer feature.
|
|
165
156
|
* Accepts either short scopes (`transfer.write`) or formatted environment
|
|
166
|
-
* scopes (`edge-connect-
|
|
157
|
+
* scopes (`edge-connect-sandbox/transfer.write`).
|
|
167
158
|
*/
|
|
168
159
|
declare function isTransferWriteScope(scope: string): boolean;
|
|
169
160
|
|
|
@@ -2790,7 +2781,7 @@ interface EdgeTokens {
|
|
|
2790
2781
|
* ```typescript
|
|
2791
2782
|
* const link = new EdgeLink({
|
|
2792
2783
|
* clientId: 'your-client-id',
|
|
2793
|
-
* environment: '
|
|
2784
|
+
* environment: 'sandbox',
|
|
2794
2785
|
* onSuccess: (result: EdgeLinkSuccess) => {
|
|
2795
2786
|
* // Send to your backend
|
|
2796
2787
|
* fetch('/api/edge/exchange', {
|
|
@@ -3213,7 +3204,7 @@ declare function isFeatureUnavailableError(error: unknown): error is EdgeFeature
|
|
|
3213
3204
|
*
|
|
3214
3205
|
* This package provides the foundation for building EDGE Connect integrations:
|
|
3215
3206
|
* - Type definitions generated from the OpenAPI spec
|
|
3216
|
-
* - Environment configuration (production,
|
|
3207
|
+
* - Environment configuration (production, sandbox)
|
|
3217
3208
|
* - OAuth scope constants
|
|
3218
3209
|
* - Typed error classes
|
|
3219
3210
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
type EdgeEnvironment = 'production' | '
|
|
1
|
+
type EdgeEnvironment = 'production' | 'sandbox';
|
|
2
2
|
declare const EDGE_LINK_PATH = "/oauth/link";
|
|
3
3
|
interface EdgeEnvironmentConfig {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated cognitoDomain is no longer used. Token exchange now goes through EdgeBoost API.
|
|
6
|
-
*/
|
|
7
|
-
cognitoDomain: string;
|
|
8
4
|
apiBaseUrl: string;
|
|
9
5
|
oauthBaseUrl: string;
|
|
10
6
|
userClientUrl: string;
|
|
@@ -32,6 +28,7 @@ declare function getAvailableEnvironments(): readonly EdgeEnvironment[];
|
|
|
32
28
|
*
|
|
33
29
|
* @module @edge-markets/connect/config
|
|
34
30
|
*/
|
|
31
|
+
|
|
35
32
|
/**
|
|
36
33
|
* Available OAuth scopes for EDGE Connect.
|
|
37
34
|
*
|
|
@@ -64,7 +61,7 @@ declare const EDGE_SCOPES: {
|
|
|
64
61
|
readonly BALANCE_READ: "balance.read";
|
|
65
62
|
/**
|
|
66
63
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
67
|
-
* Not available in
|
|
64
|
+
* Not available in sandbox or production. Requesting this scope from Link
|
|
68
65
|
* SDKs fails with EdgeFeatureUnavailableError until EDGE enables transfers
|
|
69
66
|
* for a partner.
|
|
70
67
|
*
|
|
@@ -98,7 +95,7 @@ declare const RESERVED_EDGE_SCOPES: readonly EdgeScope[];
|
|
|
98
95
|
* ```typescript
|
|
99
96
|
* const link = new EdgeLink({
|
|
100
97
|
* clientId: 'your-client-id',
|
|
101
|
-
* environment: '
|
|
98
|
+
* environment: 'sandbox',
|
|
102
99
|
* scopes: ALL_EDGE_SCOPES, // Same values as ACTIVE_EDGE_SCOPES today
|
|
103
100
|
* onSuccess: handleSuccess,
|
|
104
101
|
* })
|
|
@@ -121,26 +118,20 @@ declare const SCOPE_ICONS: Readonly<Record<EdgeScope, string>>;
|
|
|
121
118
|
* Different environments may use different scope prefixes in the API Gateway.
|
|
122
119
|
* This function handles the prefix automatically.
|
|
123
120
|
*
|
|
124
|
-
* Note: 'development' environment uses 'staging' scope prefix because it
|
|
125
|
-
* connects to the staging API Gateway for local testing.
|
|
126
|
-
*
|
|
127
121
|
* @param scope - The scope to format
|
|
128
122
|
* @param environment - The target environment
|
|
129
123
|
* @returns The full scope string for API Gateway authorization
|
|
130
124
|
*
|
|
131
125
|
* @example
|
|
132
126
|
* ```typescript
|
|
133
|
-
* formatScopeForEnvironment('user.read', '
|
|
134
|
-
* // Returns: 'edge-connect-
|
|
127
|
+
* formatScopeForEnvironment('user.read', 'sandbox')
|
|
128
|
+
* // Returns: 'edge-connect-sandbox/user.read'
|
|
135
129
|
*
|
|
136
130
|
* formatScopeForEnvironment('user.read', 'production')
|
|
137
131
|
* // Returns: 'edge-connect/user.read'
|
|
138
|
-
*
|
|
139
|
-
* formatScopeForEnvironment('user.read', 'development')
|
|
140
|
-
* // Returns: 'edge-connect-staging/user.read' (maps to staging)
|
|
141
132
|
* ```
|
|
142
133
|
*/
|
|
143
|
-
declare function formatScopeForEnvironment(scope: EdgeScope, environment:
|
|
134
|
+
declare function formatScopeForEnvironment(scope: EdgeScope, environment: EdgeEnvironment): string;
|
|
144
135
|
/**
|
|
145
136
|
* Formats multiple scopes for an environment.
|
|
146
137
|
*
|
|
@@ -148,11 +139,11 @@ declare function formatScopeForEnvironment(scope: EdgeScope, environment: 'produ
|
|
|
148
139
|
* @param environment - The target environment
|
|
149
140
|
* @returns Array of full scope strings
|
|
150
141
|
*/
|
|
151
|
-
declare function formatScopesForEnvironment(scopes: readonly EdgeScope[] | EdgeScope[], environment:
|
|
142
|
+
declare function formatScopesForEnvironment(scopes: readonly EdgeScope[] | EdgeScope[], environment: EdgeEnvironment): string[];
|
|
152
143
|
/**
|
|
153
144
|
* Parses a full scope string to extract the base scope.
|
|
154
145
|
*
|
|
155
|
-
* @param fullScope - The full scope string (e.g., 'edge-connect-
|
|
146
|
+
* @param fullScope - The full scope string (e.g., 'edge-connect-sandbox/user.read')
|
|
156
147
|
* @returns The base scope (e.g., 'user.read') or null if invalid
|
|
157
148
|
*/
|
|
158
149
|
declare function parseScope(fullScope: string): EdgeScope | null;
|
|
@@ -163,7 +154,7 @@ declare function isValidScope(scope: string): scope is EdgeScope;
|
|
|
163
154
|
/**
|
|
164
155
|
* Checks whether a scope string requests the future transfer feature.
|
|
165
156
|
* Accepts either short scopes (`transfer.write`) or formatted environment
|
|
166
|
-
* scopes (`edge-connect-
|
|
157
|
+
* scopes (`edge-connect-sandbox/transfer.write`).
|
|
167
158
|
*/
|
|
168
159
|
declare function isTransferWriteScope(scope: string): boolean;
|
|
169
160
|
|
|
@@ -2790,7 +2781,7 @@ interface EdgeTokens {
|
|
|
2790
2781
|
* ```typescript
|
|
2791
2782
|
* const link = new EdgeLink({
|
|
2792
2783
|
* clientId: 'your-client-id',
|
|
2793
|
-
* environment: '
|
|
2784
|
+
* environment: 'sandbox',
|
|
2794
2785
|
* onSuccess: (result: EdgeLinkSuccess) => {
|
|
2795
2786
|
* // Send to your backend
|
|
2796
2787
|
* fetch('/api/edge/exchange', {
|
|
@@ -3213,7 +3204,7 @@ declare function isFeatureUnavailableError(error: unknown): error is EdgeFeature
|
|
|
3213
3204
|
*
|
|
3214
3205
|
* This package provides the foundation for building EDGE Connect integrations:
|
|
3215
3206
|
* - Type definitions generated from the OpenAPI spec
|
|
3216
|
-
* - Environment configuration (production,
|
|
3207
|
+
* - Environment configuration (production, sandbox)
|
|
3217
3208
|
* - OAuth scope constants
|
|
3218
3209
|
* - Typed error classes
|
|
3219
3210
|
*
|
package/dist/index.js
CHANGED
|
@@ -99,57 +99,21 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
|
|
|
99
99
|
var EDGE_LINK_PATH = "/oauth/link";
|
|
100
100
|
var EDGE_ENVIRONMENTS = {
|
|
101
101
|
production: {
|
|
102
|
-
cognitoDomain: "https://edge-connect.auth.us-east-1.amazoncognito.com",
|
|
103
102
|
apiBaseUrl: "https://connect.edgeboost.io/connect/v1",
|
|
104
103
|
oauthBaseUrl: "https://connect.edgeboost.io/connect/oauth",
|
|
105
104
|
userClientUrl: "https://oauth.edgeboost.io",
|
|
106
105
|
displayName: "Production",
|
|
107
106
|
isProduction: true
|
|
108
107
|
},
|
|
109
|
-
staging: {
|
|
110
|
-
cognitoDomain: "https://edge-connect-staging.auth.us-east-1.amazoncognito.com",
|
|
111
|
-
// Staging partner API — mTLS-enforced. Requires a partner client
|
|
112
|
-
// certificate on every request. Routed through API Gateway → VPC Link →
|
|
113
|
-
// internal ALB → ECS. Direct routes to the backend (e.g.
|
|
114
|
-
// backend.connect-staging.edgeboost.io) no longer exist.
|
|
115
|
-
apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
|
|
116
|
-
// OAuth token exchange — partner-facing, also mTLS-enforced.
|
|
117
|
-
oauthBaseUrl: "https://connect-staging.edgeboost.io/connect/oauth",
|
|
118
|
-
// User-facing captive frame for the Link SDK enrollment and transfer
|
|
119
|
-
// verification flows. Served from the edge-connect-oauth Vite app
|
|
120
|
-
// deployed on Amplify. No mTLS — browser traffic.
|
|
121
|
-
userClientUrl: "https://oauth.staging-app.edgeboost.io",
|
|
122
|
-
displayName: "Staging",
|
|
123
|
-
isProduction: false
|
|
124
|
-
},
|
|
125
108
|
sandbox: {
|
|
126
|
-
cognitoDomain: "https://edge-connect-sandbox.auth.us-east-1.amazoncognito.com",
|
|
127
109
|
// Sandbox partner API — mTLS-enforced. Uses its own sandbox gateway and
|
|
128
110
|
// sandbox OAuth/JWKS issuer. The browser Link UI is served from a separate
|
|
129
|
-
// sandbox host
|
|
111
|
+
// sandbox host.
|
|
130
112
|
apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
|
|
131
113
|
oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
|
|
132
114
|
userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
|
|
133
115
|
displayName: "Sandbox",
|
|
134
116
|
isProduction: false
|
|
135
|
-
},
|
|
136
|
-
/**
|
|
137
|
-
* Development environment for local testing with API Gateway.
|
|
138
|
-
*
|
|
139
|
-
* Architecture:
|
|
140
|
-
* - apiBaseUrl: Goes through API Gateway → ngrok → local backend (JWT validated by API Gateway)
|
|
141
|
-
* - oauthBaseUrl: Goes directly to ngrok → local backend (consent/token exchange)
|
|
142
|
-
* - userClientUrl: ngrok tunnel to local edgeboost-user-client (consent popup)
|
|
143
|
-
*
|
|
144
|
-
* The ngrok URL is configured in edgeboost-api/ngrok.yml with a static domain.
|
|
145
|
-
*/
|
|
146
|
-
development: {
|
|
147
|
-
cognitoDomain: "https://edge-connect-staging.auth.us-east-1.amazoncognito.com",
|
|
148
|
-
apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
|
|
149
|
-
oauthBaseUrl: "https://revocable-overvaliantly-emmalyn.ngrok-free.app/oauth",
|
|
150
|
-
userClientUrl: "https://edgeboost-user-client.ngrok-free.app",
|
|
151
|
-
displayName: "Development",
|
|
152
|
-
isProduction: false
|
|
153
117
|
}
|
|
154
118
|
};
|
|
155
119
|
function getEnvironmentConfig(environment) {
|
|
@@ -187,7 +151,7 @@ var EDGE_SCOPES = {
|
|
|
187
151
|
BALANCE_READ: "balance.read",
|
|
188
152
|
/**
|
|
189
153
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
190
|
-
* Not available in
|
|
154
|
+
* Not available in sandbox or production. Requesting this scope from Link
|
|
191
155
|
* SDKs fails with EdgeFeatureUnavailableError until EDGE enables transfers
|
|
192
156
|
* for a partner.
|
|
193
157
|
*
|
|
@@ -209,8 +173,7 @@ var SCOPE_ICONS = {
|
|
|
209
173
|
[EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
|
|
210
174
|
};
|
|
211
175
|
function formatScopeForEnvironment(scope, environment) {
|
|
212
|
-
const
|
|
213
|
-
const prefix = effectiveEnv === "production" ? "edge-connect" : `edge-connect-${effectiveEnv}`;
|
|
176
|
+
const prefix = environment === "production" ? "edge-connect" : `edge-connect-${environment}`;
|
|
214
177
|
return `${prefix}/${scope}`;
|
|
215
178
|
}
|
|
216
179
|
function formatScopesForEnvironment(scopes, environment) {
|
package/dist/index.mjs
CHANGED
|
@@ -28,57 +28,21 @@ var EDGE_WEBHOOK_EVENT_TYPES = [
|
|
|
28
28
|
var EDGE_LINK_PATH = "/oauth/link";
|
|
29
29
|
var EDGE_ENVIRONMENTS = {
|
|
30
30
|
production: {
|
|
31
|
-
cognitoDomain: "https://edge-connect.auth.us-east-1.amazoncognito.com",
|
|
32
31
|
apiBaseUrl: "https://connect.edgeboost.io/connect/v1",
|
|
33
32
|
oauthBaseUrl: "https://connect.edgeboost.io/connect/oauth",
|
|
34
33
|
userClientUrl: "https://oauth.edgeboost.io",
|
|
35
34
|
displayName: "Production",
|
|
36
35
|
isProduction: true
|
|
37
36
|
},
|
|
38
|
-
staging: {
|
|
39
|
-
cognitoDomain: "https://edge-connect-staging.auth.us-east-1.amazoncognito.com",
|
|
40
|
-
// Staging partner API — mTLS-enforced. Requires a partner client
|
|
41
|
-
// certificate on every request. Routed through API Gateway → VPC Link →
|
|
42
|
-
// internal ALB → ECS. Direct routes to the backend (e.g.
|
|
43
|
-
// backend.connect-staging.edgeboost.io) no longer exist.
|
|
44
|
-
apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
|
|
45
|
-
// OAuth token exchange — partner-facing, also mTLS-enforced.
|
|
46
|
-
oauthBaseUrl: "https://connect-staging.edgeboost.io/connect/oauth",
|
|
47
|
-
// User-facing captive frame for the Link SDK enrollment and transfer
|
|
48
|
-
// verification flows. Served from the edge-connect-oauth Vite app
|
|
49
|
-
// deployed on Amplify. No mTLS — browser traffic.
|
|
50
|
-
userClientUrl: "https://oauth.staging-app.edgeboost.io",
|
|
51
|
-
displayName: "Staging",
|
|
52
|
-
isProduction: false
|
|
53
|
-
},
|
|
54
37
|
sandbox: {
|
|
55
|
-
cognitoDomain: "https://edge-connect-sandbox.auth.us-east-1.amazoncognito.com",
|
|
56
38
|
// Sandbox partner API — mTLS-enforced. Uses its own sandbox gateway and
|
|
57
39
|
// sandbox OAuth/JWKS issuer. The browser Link UI is served from a separate
|
|
58
|
-
// sandbox host
|
|
40
|
+
// sandbox host.
|
|
59
41
|
apiBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/v1",
|
|
60
42
|
oauthBaseUrl: "https://sandbox.connect.staging.edgeboost.io/connect/oauth",
|
|
61
43
|
userClientUrl: "https://sandbox-oauth.staging-app.edgeboost.io",
|
|
62
44
|
displayName: "Sandbox",
|
|
63
45
|
isProduction: false
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* Development environment for local testing with API Gateway.
|
|
67
|
-
*
|
|
68
|
-
* Architecture:
|
|
69
|
-
* - apiBaseUrl: Goes through API Gateway → ngrok → local backend (JWT validated by API Gateway)
|
|
70
|
-
* - oauthBaseUrl: Goes directly to ngrok → local backend (consent/token exchange)
|
|
71
|
-
* - userClientUrl: ngrok tunnel to local edgeboost-user-client (consent popup)
|
|
72
|
-
*
|
|
73
|
-
* The ngrok URL is configured in edgeboost-api/ngrok.yml with a static domain.
|
|
74
|
-
*/
|
|
75
|
-
development: {
|
|
76
|
-
cognitoDomain: "https://edge-connect-staging.auth.us-east-1.amazoncognito.com",
|
|
77
|
-
apiBaseUrl: "https://connect-staging.edgeboost.io/connect/v1",
|
|
78
|
-
oauthBaseUrl: "https://revocable-overvaliantly-emmalyn.ngrok-free.app/oauth",
|
|
79
|
-
userClientUrl: "https://edgeboost-user-client.ngrok-free.app",
|
|
80
|
-
displayName: "Development",
|
|
81
|
-
isProduction: false
|
|
82
46
|
}
|
|
83
47
|
};
|
|
84
48
|
function getEnvironmentConfig(environment) {
|
|
@@ -116,7 +80,7 @@ var EDGE_SCOPES = {
|
|
|
116
80
|
BALANCE_READ: "balance.read",
|
|
117
81
|
/**
|
|
118
82
|
* Reserved for future fund transfers and EDGE-hosted verification sessions.
|
|
119
|
-
* Not available in
|
|
83
|
+
* Not available in sandbox or production. Requesting this scope from Link
|
|
120
84
|
* SDKs fails with EdgeFeatureUnavailableError until EDGE enables transfers
|
|
121
85
|
* for a partner.
|
|
122
86
|
*
|
|
@@ -138,8 +102,7 @@ var SCOPE_ICONS = {
|
|
|
138
102
|
[EDGE_SCOPES.TRANSFER_WRITE]: "arrow-left-right"
|
|
139
103
|
};
|
|
140
104
|
function formatScopeForEnvironment(scope, environment) {
|
|
141
|
-
const
|
|
142
|
-
const prefix = effectiveEnv === "production" ? "edge-connect" : `edge-connect-${effectiveEnv}`;
|
|
105
|
+
const prefix = environment === "production" ? "edge-connect" : `edge-connect-${environment}`;
|
|
143
106
|
return `${prefix}/${scope}`;
|
|
144
107
|
}
|
|
145
108
|
function formatScopesForEnvironment(scopes, environment) {
|