@edge-markets/connect 1.6.1 → 1.8.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
@@ -64,6 +64,9 @@ declare const EDGE_SCOPES: {
64
64
  readonly BALANCE_READ: "balance.read";
65
65
  /**
66
66
  * Initiate fund transfers and create EDGE-hosted verification sessions.
67
+ * Not available yet. Requesting this scope from Link SDKs fails with
68
+ * EdgeFeatureUnavailableError until EDGE enables transfers for partners.
69
+ *
67
70
  * Required for: `POST /v1/transfer`, `POST /v1/transfer/:id/verification-session`, `GET /v1/transfers`
68
71
  */
69
72
  readonly TRANSFER_WRITE: "transfer.write";
@@ -87,6 +90,13 @@ type EdgeScope = (typeof EDGE_SCOPES)[keyof typeof EDGE_SCOPES];
87
90
  * ```
88
91
  */
89
92
  declare const ALL_EDGE_SCOPES: readonly EdgeScope[];
93
+ /**
94
+ * Scopes active for current EDGE Connect partner integrations.
95
+ *
96
+ * Transfers are intentionally unavailable for now, so SDK default Link flows
97
+ * should request this set rather than {@link ALL_EDGE_SCOPES}.
98
+ */
99
+ declare const ACTIVE_EDGE_SCOPES: readonly EdgeScope[];
90
100
  /**
91
101
  * Human-readable descriptions for each scope.
92
102
  * Useful for building custom consent UIs or explaining permissions.
@@ -142,6 +152,12 @@ declare function parseScope(fullScope: string): EdgeScope | null;
142
152
  * Checks if a scope string is valid.
143
153
  */
144
154
  declare function isValidScope(scope: string): scope is EdgeScope;
155
+ /**
156
+ * Checks whether a scope string requests the future transfer feature.
157
+ * Accepts either short scopes (`transfer.write`) or formatted environment
158
+ * scopes (`edge-connect-staging/transfer.write`).
159
+ */
160
+ declare function isTransferWriteScope(scope: string): boolean;
145
161
 
146
162
  /**
147
163
  * This file was auto-generated by openapi-typescript.
@@ -695,17 +711,7 @@ interface paths {
695
711
  put?: never;
696
712
  /**
697
713
  * Initiate a transfer
698
- * @description Initiates a fund transfer that requires OTP verification.
699
- *
700
- * **Transfer Types:**
701
- * - `debit`: Pull funds FROM user's EdgeBoost TO partner (user deposits to partner platform)
702
- * - `credit`: Push funds FROM partner TO user's EdgeBoost (user withdraws from partner platform)
703
- *
704
- * **Idempotency:**
705
- * Use the `idempotencyKey` to safely retry requests. If a transfer with the same key exists, its current status will be returned.
706
- *
707
- * **OTP Verification:**
708
- * After initiating, the transfer will be in `pending_verification` status. Call `POST /transfer/{transferId}/verification-session` to create an EDGE-hosted verification session and embed the returned `verificationUrl` in your frontend.
714
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
709
715
  */
710
716
  post: operations['initiateTransfer'];
711
717
  delete?: never;
@@ -723,7 +729,7 @@ interface paths {
723
729
  };
724
730
  /**
725
731
  * Get transfer status
726
- * @description Returns the current status of a transfer. Use this for polling after initiating a transfer.
732
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
727
733
  */
728
734
  get: operations['getTransferStatus'];
729
735
  put?: never;
@@ -743,7 +749,7 @@ interface paths {
743
749
  };
744
750
  /**
745
751
  * List transfers
746
- * @description Returns a paginated list of transfers for the authenticated user. Useful for reconciliation.
752
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
747
753
  */
748
754
  get: operations['listTransfers'];
749
755
  put?: never;
@@ -2336,7 +2342,16 @@ type InitiateTransferRequest = components['schemas']['InitiateTransferRequestDto
2336
2342
  * }
2337
2343
  * ```
2338
2344
  */
2339
- type Transfer = components['schemas']['TransferResponseDto'];
2345
+ type Transfer = components['schemas']['TransferResponseDto'] & {
2346
+ /** Transfer direction. Present on status/list responses and newer initiate responses. */
2347
+ type?: TransferType;
2348
+ /** Transfer amount. String responses preserve cents; older list endpoints may use number. */
2349
+ amount?: string | number;
2350
+ /** Settlement category when attributed by the partner or default policy. */
2351
+ category?: TransferCategory;
2352
+ createdAt?: string;
2353
+ updatedAt?: string;
2354
+ };
2340
2355
  /**
2341
2356
  * Transfer item in a list (includes additional fields like amount and timestamps).
2342
2357
  */
@@ -3002,6 +3017,14 @@ declare class EdgeInsufficientScopeError extends EdgeError {
3002
3017
  readonly missingScopes: string[];
3003
3018
  constructor(missingScopes: string[], message?: string);
3004
3019
  }
3020
+ declare const EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE = "Feature not available yet, please contact Edge product team for more details";
3021
+ /**
3022
+ * Thrown when an SDK surface exists for a future EDGE Connect feature that is
3023
+ * not active for partners yet.
3024
+ */
3025
+ declare class EdgeFeatureUnavailableError extends EdgeError {
3026
+ constructor(message?: string);
3027
+ }
3005
3028
  /**
3006
3029
  * Thrown when an API request fails with a known error.
3007
3030
  *
@@ -3173,6 +3196,7 @@ declare function isIdentityVerificationError(error: unknown): error is EdgeIdent
3173
3196
  * Type guard for network errors.
3174
3197
  */
3175
3198
  declare function isNetworkError(error: unknown): error is EdgeNetworkError;
3199
+ declare function isFeatureUnavailableError(error: unknown): error is EdgeFeatureUnavailableError;
3176
3200
 
3177
3201
  /**
3178
3202
  * @edge-markets/connect
@@ -3221,4 +3245,4 @@ declare const SDK_VERSION = "1.0.0";
3221
3245
  */
3222
3246
  declare const SDK_NAME = "@edge-markets/connect";
3223
3247
 
3224
- export { ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, 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, 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, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isValidScope, type operations, parseScope, type paths };
3248
+ 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, 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 };
package/dist/index.d.ts CHANGED
@@ -64,6 +64,9 @@ declare const EDGE_SCOPES: {
64
64
  readonly BALANCE_READ: "balance.read";
65
65
  /**
66
66
  * Initiate fund transfers and create EDGE-hosted verification sessions.
67
+ * Not available yet. Requesting this scope from Link SDKs fails with
68
+ * EdgeFeatureUnavailableError until EDGE enables transfers for partners.
69
+ *
67
70
  * Required for: `POST /v1/transfer`, `POST /v1/transfer/:id/verification-session`, `GET /v1/transfers`
68
71
  */
69
72
  readonly TRANSFER_WRITE: "transfer.write";
@@ -87,6 +90,13 @@ type EdgeScope = (typeof EDGE_SCOPES)[keyof typeof EDGE_SCOPES];
87
90
  * ```
88
91
  */
89
92
  declare const ALL_EDGE_SCOPES: readonly EdgeScope[];
93
+ /**
94
+ * Scopes active for current EDGE Connect partner integrations.
95
+ *
96
+ * Transfers are intentionally unavailable for now, so SDK default Link flows
97
+ * should request this set rather than {@link ALL_EDGE_SCOPES}.
98
+ */
99
+ declare const ACTIVE_EDGE_SCOPES: readonly EdgeScope[];
90
100
  /**
91
101
  * Human-readable descriptions for each scope.
92
102
  * Useful for building custom consent UIs or explaining permissions.
@@ -142,6 +152,12 @@ declare function parseScope(fullScope: string): EdgeScope | null;
142
152
  * Checks if a scope string is valid.
143
153
  */
144
154
  declare function isValidScope(scope: string): scope is EdgeScope;
155
+ /**
156
+ * Checks whether a scope string requests the future transfer feature.
157
+ * Accepts either short scopes (`transfer.write`) or formatted environment
158
+ * scopes (`edge-connect-staging/transfer.write`).
159
+ */
160
+ declare function isTransferWriteScope(scope: string): boolean;
145
161
 
146
162
  /**
147
163
  * This file was auto-generated by openapi-typescript.
@@ -695,17 +711,7 @@ interface paths {
695
711
  put?: never;
696
712
  /**
697
713
  * Initiate a transfer
698
- * @description Initiates a fund transfer that requires OTP verification.
699
- *
700
- * **Transfer Types:**
701
- * - `debit`: Pull funds FROM user's EdgeBoost TO partner (user deposits to partner platform)
702
- * - `credit`: Push funds FROM partner TO user's EdgeBoost (user withdraws from partner platform)
703
- *
704
- * **Idempotency:**
705
- * Use the `idempotencyKey` to safely retry requests. If a transfer with the same key exists, its current status will be returned.
706
- *
707
- * **OTP Verification:**
708
- * After initiating, the transfer will be in `pending_verification` status. Call `POST /transfer/{transferId}/verification-session` to create an EDGE-hosted verification session and embed the returned `verificationUrl` in your frontend.
714
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
709
715
  */
710
716
  post: operations['initiateTransfer'];
711
717
  delete?: never;
@@ -723,7 +729,7 @@ interface paths {
723
729
  };
724
730
  /**
725
731
  * Get transfer status
726
- * @description Returns the current status of a transfer. Use this for polling after initiating a transfer.
732
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
727
733
  */
728
734
  get: operations['getTransferStatus'];
729
735
  put?: never;
@@ -743,7 +749,7 @@ interface paths {
743
749
  };
744
750
  /**
745
751
  * List transfers
746
- * @description Returns a paginated list of transfers for the authenticated user. Useful for reconciliation.
752
+ * @description Reserved for a future transfer release. Currently returns feature_unavailable with message: Feature not available yet, please contact Edge product team for more details.
747
753
  */
748
754
  get: operations['listTransfers'];
749
755
  put?: never;
@@ -2336,7 +2342,16 @@ type InitiateTransferRequest = components['schemas']['InitiateTransferRequestDto
2336
2342
  * }
2337
2343
  * ```
2338
2344
  */
2339
- type Transfer = components['schemas']['TransferResponseDto'];
2345
+ type Transfer = components['schemas']['TransferResponseDto'] & {
2346
+ /** Transfer direction. Present on status/list responses and newer initiate responses. */
2347
+ type?: TransferType;
2348
+ /** Transfer amount. String responses preserve cents; older list endpoints may use number. */
2349
+ amount?: string | number;
2350
+ /** Settlement category when attributed by the partner or default policy. */
2351
+ category?: TransferCategory;
2352
+ createdAt?: string;
2353
+ updatedAt?: string;
2354
+ };
2340
2355
  /**
2341
2356
  * Transfer item in a list (includes additional fields like amount and timestamps).
2342
2357
  */
@@ -3002,6 +3017,14 @@ declare class EdgeInsufficientScopeError extends EdgeError {
3002
3017
  readonly missingScopes: string[];
3003
3018
  constructor(missingScopes: string[], message?: string);
3004
3019
  }
3020
+ declare const EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE = "Feature not available yet, please contact Edge product team for more details";
3021
+ /**
3022
+ * Thrown when an SDK surface exists for a future EDGE Connect feature that is
3023
+ * not active for partners yet.
3024
+ */
3025
+ declare class EdgeFeatureUnavailableError extends EdgeError {
3026
+ constructor(message?: string);
3027
+ }
3005
3028
  /**
3006
3029
  * Thrown when an API request fails with a known error.
3007
3030
  *
@@ -3173,6 +3196,7 @@ declare function isIdentityVerificationError(error: unknown): error is EdgeIdent
3173
3196
  * Type guard for network errors.
3174
3197
  */
3175
3198
  declare function isNetworkError(error: unknown): error is EdgeNetworkError;
3199
+ declare function isFeatureUnavailableError(error: unknown): error is EdgeFeatureUnavailableError;
3176
3200
 
3177
3201
  /**
3178
3202
  * @edge-markets/connect
@@ -3221,4 +3245,4 @@ declare const SDK_VERSION = "1.0.0";
3221
3245
  */
3222
3246
  declare const SDK_NAME = "@edge-markets/connect";
3223
3247
 
3224
- export { ALL_EDGE_SCOPES, type ApiError, type Balance, type BaseWebhookEvent, type ConsentRequiredError, type ConsentRevokedEventData, type CreateVerificationSessionRequest, EDGE_ENVIRONMENTS, EDGE_LINK_PATH, EDGE_SCOPES, EDGE_WEBHOOK_EVENT_TYPES, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, type EdgeEnvironment, type EdgeEnvironmentConfig, EdgeError, 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, 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, isIdentityVerificationError, isNetworkError, isProductionEnvironment, isValidScope, type operations, parseScope, type paths };
3248
+ 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, 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 };
package/dist/index.js CHANGED
@@ -20,7 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ ACTIVE_EDGE_SCOPES: () => ACTIVE_EDGE_SCOPES,
23
24
  ALL_EDGE_SCOPES: () => ALL_EDGE_SCOPES,
25
+ EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE: () => EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
24
26
  EDGE_ENVIRONMENTS: () => EDGE_ENVIRONMENTS,
25
27
  EDGE_LINK_PATH: () => EDGE_LINK_PATH,
26
28
  EDGE_SCOPES: () => EDGE_SCOPES,
@@ -29,6 +31,7 @@ __export(index_exports, {
29
31
  EdgeAuthenticationError: () => EdgeAuthenticationError,
30
32
  EdgeConsentRequiredError: () => EdgeConsentRequiredError,
31
33
  EdgeError: () => EdgeError,
34
+ EdgeFeatureUnavailableError: () => EdgeFeatureUnavailableError,
32
35
  EdgeIdentityVerificationError: () => EdgeIdentityVerificationError,
33
36
  EdgeInsufficientScopeError: () => EdgeInsufficientScopeError,
34
37
  EdgeNetworkError: () => EdgeNetworkError,
@@ -55,9 +58,11 @@ __export(index_exports, {
55
58
  isAuthenticationError: () => isAuthenticationError,
56
59
  isConsentRequiredError: () => isConsentRequiredError,
57
60
  isEdgeError: () => isEdgeError,
61
+ isFeatureUnavailableError: () => isFeatureUnavailableError,
58
62
  isIdentityVerificationError: () => isIdentityVerificationError,
59
63
  isNetworkError: () => isNetworkError,
60
64
  isProductionEnvironment: () => isProductionEnvironment,
65
+ isTransferWriteScope: () => isTransferWriteScope,
61
66
  isValidScope: () => isValidScope,
62
67
  parseScope: () => parseScope
63
68
  });
@@ -178,15 +183,19 @@ var EDGE_SCOPES = {
178
183
  BALANCE_READ: "balance.read",
179
184
  /**
180
185
  * Initiate fund transfers and create EDGE-hosted verification sessions.
186
+ * Not available yet. Requesting this scope from Link SDKs fails with
187
+ * EdgeFeatureUnavailableError until EDGE enables transfers for partners.
188
+ *
181
189
  * Required for: `POST /v1/transfer`, `POST /v1/transfer/:id/verification-session`, `GET /v1/transfers`
182
190
  */
183
191
  TRANSFER_WRITE: "transfer.write"
184
192
  };
185
193
  var ALL_EDGE_SCOPES = Object.values(EDGE_SCOPES);
194
+ var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
186
195
  var SCOPE_DESCRIPTIONS = {
187
196
  [EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
188
197
  [EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
189
- [EDGE_SCOPES.TRANSFER_WRITE]: "Transfer funds to and from your EdgeBoost account"
198
+ [EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
190
199
  };
191
200
  var SCOPE_ICONS = {
192
201
  [EDGE_SCOPES.USER_READ]: "user",
@@ -210,6 +219,10 @@ function parseScope(fullScope) {
210
219
  function isValidScope(scope) {
211
220
  return Object.values(EDGE_SCOPES).includes(scope);
212
221
  }
222
+ function isTransferWriteScope(scope) {
223
+ const normalized = typeof scope === "string" ? scope.trim() : "";
224
+ return normalized === EDGE_SCOPES.TRANSFER_WRITE || normalized.endsWith(`/${EDGE_SCOPES.TRANSFER_WRITE}`);
225
+ }
213
226
 
214
227
  // src/errors/edge.error.ts
215
228
  var EdgeError = class _EdgeError extends Error {
@@ -270,6 +283,13 @@ var EdgeInsufficientScopeError = class extends EdgeError {
270
283
  this.missingScopes = missingScopes;
271
284
  }
272
285
  };
286
+ var EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE = "Feature not available yet, please contact Edge product team for more details";
287
+ var EdgeFeatureUnavailableError = class extends EdgeError {
288
+ constructor(message = EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE) {
289
+ super("feature_unavailable", message, 501);
290
+ this.name = "EdgeFeatureUnavailableError";
291
+ }
292
+ };
273
293
  var EdgeApiError = class extends EdgeError {
274
294
  constructor(code, message, statusCode, details) {
275
295
  super(code, message, statusCode, details);
@@ -348,13 +368,18 @@ function isIdentityVerificationError(error) {
348
368
  function isNetworkError(error) {
349
369
  return error instanceof EdgeNetworkError;
350
370
  }
371
+ function isFeatureUnavailableError(error) {
372
+ return error instanceof EdgeFeatureUnavailableError;
373
+ }
351
374
 
352
375
  // src/index.ts
353
376
  var SDK_VERSION = "1.0.0";
354
377
  var SDK_NAME = "@edge-markets/connect";
355
378
  // Annotate the CommonJS export names for ESM import in node:
356
379
  0 && (module.exports = {
380
+ ACTIVE_EDGE_SCOPES,
357
381
  ALL_EDGE_SCOPES,
382
+ EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
358
383
  EDGE_ENVIRONMENTS,
359
384
  EDGE_LINK_PATH,
360
385
  EDGE_SCOPES,
@@ -363,6 +388,7 @@ var SDK_NAME = "@edge-markets/connect";
363
388
  EdgeAuthenticationError,
364
389
  EdgeConsentRequiredError,
365
390
  EdgeError,
391
+ EdgeFeatureUnavailableError,
366
392
  EdgeIdentityVerificationError,
367
393
  EdgeInsufficientScopeError,
368
394
  EdgeNetworkError,
@@ -389,9 +415,11 @@ var SDK_NAME = "@edge-markets/connect";
389
415
  isAuthenticationError,
390
416
  isConsentRequiredError,
391
417
  isEdgeError,
418
+ isFeatureUnavailableError,
392
419
  isIdentityVerificationError,
393
420
  isNetworkError,
394
421
  isProductionEnvironment,
422
+ isTransferWriteScope,
395
423
  isValidScope,
396
424
  parseScope
397
425
  });
package/dist/index.mjs CHANGED
@@ -113,15 +113,19 @@ var EDGE_SCOPES = {
113
113
  BALANCE_READ: "balance.read",
114
114
  /**
115
115
  * Initiate fund transfers and create EDGE-hosted verification sessions.
116
+ * Not available yet. Requesting this scope from Link SDKs fails with
117
+ * EdgeFeatureUnavailableError until EDGE enables transfers for partners.
118
+ *
116
119
  * Required for: `POST /v1/transfer`, `POST /v1/transfer/:id/verification-session`, `GET /v1/transfers`
117
120
  */
118
121
  TRANSFER_WRITE: "transfer.write"
119
122
  };
120
123
  var ALL_EDGE_SCOPES = Object.values(EDGE_SCOPES);
124
+ var ACTIVE_EDGE_SCOPES = [EDGE_SCOPES.USER_READ, EDGE_SCOPES.BALANCE_READ];
121
125
  var SCOPE_DESCRIPTIONS = {
122
126
  [EDGE_SCOPES.USER_READ]: "View your profile information (name and email)",
123
127
  [EDGE_SCOPES.BALANCE_READ]: "View your EdgeBoost account balance",
124
- [EDGE_SCOPES.TRANSFER_WRITE]: "Transfer funds to and from your EdgeBoost account"
128
+ [EDGE_SCOPES.TRANSFER_WRITE]: "Transfers are not available yet"
125
129
  };
126
130
  var SCOPE_ICONS = {
127
131
  [EDGE_SCOPES.USER_READ]: "user",
@@ -145,6 +149,10 @@ function parseScope(fullScope) {
145
149
  function isValidScope(scope) {
146
150
  return Object.values(EDGE_SCOPES).includes(scope);
147
151
  }
152
+ function isTransferWriteScope(scope) {
153
+ const normalized = typeof scope === "string" ? scope.trim() : "";
154
+ return normalized === EDGE_SCOPES.TRANSFER_WRITE || normalized.endsWith(`/${EDGE_SCOPES.TRANSFER_WRITE}`);
155
+ }
148
156
 
149
157
  // src/errors/edge.error.ts
150
158
  var EdgeError = class _EdgeError extends Error {
@@ -205,6 +213,13 @@ var EdgeInsufficientScopeError = class extends EdgeError {
205
213
  this.missingScopes = missingScopes;
206
214
  }
207
215
  };
216
+ var EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE = "Feature not available yet, please contact Edge product team for more details";
217
+ var EdgeFeatureUnavailableError = class extends EdgeError {
218
+ constructor(message = EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE) {
219
+ super("feature_unavailable", message, 501);
220
+ this.name = "EdgeFeatureUnavailableError";
221
+ }
222
+ };
208
223
  var EdgeApiError = class extends EdgeError {
209
224
  constructor(code, message, statusCode, details) {
210
225
  super(code, message, statusCode, details);
@@ -283,12 +298,17 @@ function isIdentityVerificationError(error) {
283
298
  function isNetworkError(error) {
284
299
  return error instanceof EdgeNetworkError;
285
300
  }
301
+ function isFeatureUnavailableError(error) {
302
+ return error instanceof EdgeFeatureUnavailableError;
303
+ }
286
304
 
287
305
  // src/index.ts
288
306
  var SDK_VERSION = "1.0.0";
289
307
  var SDK_NAME = "@edge-markets/connect";
290
308
  export {
309
+ ACTIVE_EDGE_SCOPES,
291
310
  ALL_EDGE_SCOPES,
311
+ EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
292
312
  EDGE_ENVIRONMENTS,
293
313
  EDGE_LINK_PATH,
294
314
  EDGE_SCOPES,
@@ -297,6 +317,7 @@ export {
297
317
  EdgeAuthenticationError,
298
318
  EdgeConsentRequiredError,
299
319
  EdgeError,
320
+ EdgeFeatureUnavailableError,
300
321
  EdgeIdentityVerificationError,
301
322
  EdgeInsufficientScopeError,
302
323
  EdgeNetworkError,
@@ -323,9 +344,11 @@ export {
323
344
  isAuthenticationError,
324
345
  isConsentRequiredError,
325
346
  isEdgeError,
347
+ isFeatureUnavailableError,
326
348
  isIdentityVerificationError,
327
349
  isNetworkError,
328
350
  isProductionEnvironment,
351
+ isTransferWriteScope,
329
352
  isValidScope,
330
353
  parseScope
331
354
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edge-markets/connect",
3
- "version": "1.6.1",
3
+ "version": "1.8.0",
4
4
  "description": "Core types, configuration, and utilities for EDGE Connect SDK",
5
5
  "author": "EdgeBoost",
6
6
  "license": "MIT",