@types/plaid-link
Advanced tools
Comparing version 2.0.11 to 2.0.12
@@ -1,7 +0,8 @@ | ||
// Type definitions for non-npm package plaid-link-browser 2.0 | ||
// Project: https://github.com/plaid/link | ||
// Type definitions for non-npm package Plaid Link 2.0 | ||
// Project: https://cdn.plaid.com/link/v2/stable/link-initialize.js | ||
// Definitions by: Aaron Holderman <https://github.com/afholderman> | ||
// Brian Howald <https://github.com/bdhowald> | ||
// Hannes Kindströmmer <https://github.com/brolaugh> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.4 | ||
// TypeScript Version: 4.3 | ||
@@ -18,30 +19,46 @@ declare global { | ||
export namespace Plaid { | ||
interface Account { | ||
class_type: string | null; | ||
id: string; | ||
mask: string | null; | ||
name: string; | ||
subtype: string; | ||
type: string; | ||
verification_status: VerificationStatus | null; | ||
} | ||
interface CreateConfig { | ||
clientName?: string | undefined; | ||
product?: Product[] | undefined; | ||
key?: string | undefined; | ||
env?: Environment | undefined; | ||
clientName?: string; | ||
countryCodes?: Country[]; | ||
env?: Environment; | ||
isWebView?: boolean; | ||
key?: string; | ||
language?: Language; | ||
linkCustomizationName?: string; | ||
oauthNonce?: string; | ||
oauthRedirectUri?: string; | ||
oauthStateId?: string; | ||
onLoad?: OnLoad; | ||
onEvent?: OnEvent; | ||
onExit?: OnExit; | ||
onSuccess: OnSuccess; | ||
onExit?: OnExit | undefined; | ||
onEvent?: OnEvent | undefined; | ||
onLoad?: OnLoad | undefined; | ||
language?: Language | undefined; | ||
linkCustomizationName?: string | undefined; | ||
countryCodes?: Country[] | undefined; | ||
webhook?: string | undefined; | ||
userLegalName?: string | undefined; | ||
userEmailAddress?: string | undefined; | ||
token?: string | undefined; | ||
isWebView?: boolean | undefined; | ||
oauthNonce?: string | undefined; | ||
oauthRedirectUri?: string | undefined; | ||
oauthStateId?: string | undefined; | ||
receivedRedirectUri?: string | null | undefined; | ||
product?: Product[]; | ||
receivedRedirectUri?: string | null; | ||
token?: string; | ||
userEmailAddress?: string; | ||
userLegalName?: string; | ||
webhook?: string; | ||
} | ||
type OnSuccess = (public_token: string, metadata: OnSuccessMetaData) => void; | ||
type OnExit = (error: Error | null, metadata: OnExitMetaData) => void; | ||
type OnEvent = (eventName: EventName, metadata: OnEventMetaData) => void; | ||
type OnLoad = () => void; | ||
interface Error { | ||
display_message: string | null; | ||
error_code: string; | ||
error_message: string; | ||
error_type: string; | ||
} | ||
interface ExitOptions { | ||
force: boolean; | ||
} | ||
interface Institution { | ||
institution_id: string; | ||
name: string; | ||
} | ||
interface LinkHandler { | ||
@@ -51,92 +68,184 @@ open: (institution_id?: string) => void; // the connect flow skips the 'Select your bank' step if `institution_id` is provided | ||
destroy: () => void; | ||
institutions: Institution[]; | ||
} | ||
interface OnEventMetaData { | ||
account_number_mask: string | null; | ||
error_code: string | null; | ||
error_message: string | null; | ||
error_type: string | null; | ||
exit_status: ExitStatus | null; | ||
institution_id: string | null; | ||
institution_name: string | null; | ||
institution_search_query: string | null; | ||
link_session_id: string; | ||
match_reason: string | null; | ||
mfa_type: string | null; | ||
request_id: string; | ||
routing_number: string | null; | ||
selection: AuthTypeSelectFlow | VerificationMethod | null; | ||
timestamp: string; | ||
view_name: ViewName; | ||
} | ||
interface OnExitMetaData { | ||
institution: Institution | null; | ||
link_session_id: string; | ||
request_id: string; | ||
status: ExitStatus; | ||
} | ||
interface OnSuccessMetaData { | ||
accounts: Account[]; | ||
institution: Institution | null; | ||
link_session_id: string; | ||
transfer_status: TransferStatus | null; | ||
wallet: { | ||
name: string; | ||
} | null; | ||
} | ||
type Product = 'transactions' | 'auth' | 'identity' | 'income' | 'assets' | 'investments' | 'liabilities'; | ||
type AuthTypeSelectFlow = 'flow_type_instant' | 'flow_type_manual'; | ||
type Country = | ||
| 'CA' | ||
| 'DE' | ||
| 'DK' | ||
| 'EE' | ||
| 'ES' | ||
| 'FR' | ||
| 'GB' | ||
| 'IE' | ||
| 'IT' | ||
| 'LT' | ||
| 'LV' | ||
| 'NL' | ||
| 'NO' | ||
| 'PL' | ||
| 'SE' | ||
| 'US'; | ||
type Environment = 'development' | 'sandbox' | 'production'; | ||
type Language = 'en' | 'fr' | 'es'; | ||
type Country = 'US' | 'CA' | 'GB'; | ||
type VerificationStatus = 'pending_automatic_verification' | 'pending_manual_verification' | 'manually_verified'; | ||
type ViewName = | ||
| 'CONNECTED' | ||
| 'CREDENTIAL' | ||
| 'ERROR' | ||
| 'EXIT' | ||
| 'LOADING' | ||
| 'MFA' | ||
| 'NUMBERS' | ||
| 'RECAPTCHA' | ||
| 'SELECT_ACCOUNT' | ||
| 'SELECT_INSTITUTION'; | ||
type EventName = | ||
| 'BANK_INCOME_INSIGHTS_COMPLETED' | ||
| 'CLOSE_OAUTH' | ||
| 'ERROR' | ||
| 'EXIT' | ||
| 'FAIL_OAUTH' | ||
| 'HANDOFF' | ||
| 'IDENTITY_VERIFICATION_CLOSE_UI' | ||
| 'IDENTITY_VERIFICATION_CREATE_SESSION' | ||
| 'IDENTITY_VERIFICATION_FAIL_SESSION' | ||
| 'IDENTITY_VERIFICATION_FAIL_STEP' | ||
| 'IDENTITY_VERIFICATION_OPEN_UI' | ||
| 'IDENTITY_VERIFICATION_PASS_SESSION' | ||
| 'IDENTITY_VERIFICATION_PASS_STEP' | ||
| 'IDENTITY_VERIFICATION_PENDING_REVIEW_STEP' | ||
| 'IDENTITY_VERIFICATION_RESUME_SESSION' | ||
| 'IDENTITY_VERIFICATION_RESUME_UI' | ||
| 'IDENTITY_VERIFICATION_START_STEP' | ||
| 'MATCHED_SELECT_INSTITUTION' | ||
| 'MATCHED_SELECT_VERIFY_METHOD' | ||
| 'OPEN' | ||
| 'OPEN_MY_PLAID' | ||
| 'OPEN_OAUTH' | ||
| 'SEARCH_INSTITUTION' | ||
| 'SELECT_AUTH_TYPE' | ||
| 'SELECT_BRAND' | ||
| 'SELECT_DEGRADED_INSTITUTION' | ||
| 'SELECT_DOWN_INSTITUTION' | ||
| 'SELECT_INSTITUTION' | ||
| 'SUBMIT_ACCOUNT_NUMBER' | ||
| 'SUBMIT_CREDENTIALS' | ||
| 'SUBMIT_DOCUMENTS' | ||
| 'SUBMIT_DOCUMENTS_ERROR' | ||
| 'SUBMIT_DOCUMENTS_SUCCESS' | ||
| 'SUBMIT_MFA' | ||
| 'TRANSITION_VIEW'; | ||
| 'SUBMIT_ROUTING_NUMBER' | ||
| 'TRANSITION_VIEW' | ||
| 'VIEW_DATA_TYPES'; | ||
type ExitStatus = | ||
| 'requires_questions' | ||
| 'requires_selections' | ||
| 'choose_device' | ||
| 'institution_not_found' | ||
| 'requires_account_selection' | ||
| 'requires_code' | ||
| 'choose_device' | ||
| 'requires_credentials' | ||
| 'institution_not_found'; | ||
| 'requires_oauth' | ||
| 'requires_questions' | ||
| 'requires_selections'; | ||
interface Institution { | ||
name: string; | ||
institution_id: string; | ||
auth: boolean; | ||
transactions: boolean; | ||
} | ||
interface Account { | ||
id: string; | ||
name: string; | ||
mask: string; | ||
type: string; | ||
subtype: string; | ||
verification_status: VerificationStatus; | ||
} | ||
interface Error { | ||
display_message: string; | ||
error_code: string; | ||
error_message: string; | ||
error_type: string; | ||
} | ||
interface OnSuccessMetaData { | ||
link_session_id: string; | ||
institution: { | ||
name: string; | ||
institution_id: string; | ||
}; | ||
accounts: Account[]; | ||
} | ||
interface OnExitMetaData { | ||
link_session_id: string; | ||
request_id: string; | ||
institution: Institution; | ||
status: ExitStatus; | ||
} | ||
interface OnEventMetaData { | ||
error_code: string; | ||
error_message: string; | ||
error_type: string; | ||
exit_status: ExitStatus; | ||
institution_id: string; | ||
institution_name: string; | ||
institution_search_query: string; | ||
link_session_id: string; | ||
mfa_type: string; | ||
request_id: string; | ||
timestamp: string; | ||
view_name: ViewName; | ||
} | ||
interface ExitOptions { | ||
force: boolean; | ||
} | ||
type Language = | ||
| 'da' | ||
| 'de' | ||
| 'en' | ||
| 'es' | ||
| 'et' | ||
| 'fr' | ||
| 'it' | ||
| 'lt' | ||
| 'lv' | ||
| 'nl' | ||
| 'no' | ||
| 'po' | ||
| 'ro' | ||
| 'se'; | ||
type OnSuccess = (public_token: string, metadata: OnSuccessMetaData) => void; | ||
type OnExit = (error: Error | null, metadata: OnExitMetaData) => void; | ||
type OnEvent = (eventName: EventName, metadata: OnEventMetaData) => void; | ||
type OnLoad = () => void; | ||
type Product = | ||
| 'assets' | ||
| 'auth' | ||
| 'employment' | ||
| 'identity' | ||
| 'identity_verification' | ||
| 'income' | ||
| 'income_verification' | ||
| 'investments' | ||
| 'payment_initiation' | ||
| 'liabilities' | ||
| 'standing_orders' | ||
| 'transactions' | ||
| 'transfer'; | ||
type TransferStatus = 'COMPLETE' | 'INCOMPLETE'; | ||
type VerificationMethod = 'password' | 'phoneotp'; | ||
type VerificationStatus = | ||
| 'automatically_verified' | ||
| 'manually_verified' | ||
| 'pending_automatic_verification' | ||
| 'pending_manual_verification' | ||
| 'verification_expired' | ||
| 'verification_failed'; | ||
type ViewName = | ||
| 'ACCEPT_TOS' | ||
| 'CONNECTED' | ||
| 'CONSENT' | ||
| 'CREDENTIAL' | ||
| 'DATA_TRANSPARENCY' | ||
| 'DATA_TRANSPARENCY_CONSENT' | ||
| 'DOCUMENTARY_VERIFICATION' | ||
| 'ERROR' | ||
| 'EXIT' | ||
| 'KYC_CHECK' | ||
| 'LOADING' | ||
| 'MATCHED_CONSENT' | ||
| 'MATCHED_CREDENTIAL' | ||
| 'MATCHED_MFA' | ||
| 'MFA' | ||
| 'NUMBERS' | ||
| 'OAUTH' | ||
| 'RECAPTCHA' | ||
| 'RISK_CHECK' | ||
| 'SCREENING' | ||
| 'SELECT_ACCOUNT' | ||
| 'SELECT_AUTH_TYPE' | ||
| 'SELECT_BRAND' | ||
| 'SELECT_INSTITUTION' | ||
| 'SELFIE_CHECK' | ||
| 'UPLOAD_DOCUMENTS' | ||
| 'VERIFY_SMS'; | ||
} |
{ | ||
"name": "@types/plaid-link", | ||
"version": "2.0.11", | ||
"description": "TypeScript definitions for plaid-link-browser", | ||
"version": "2.0.12", | ||
"description": "TypeScript definitions for Plaid Link", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/plaid-link", | ||
@@ -14,2 +14,7 @@ "license": "MIT", | ||
{ | ||
"name": "Brian Howald", | ||
"url": "https://github.com/bdhowald", | ||
"githubUsername": "bdhowald" | ||
}, | ||
{ | ||
"name": "Hannes Kindströmmer", | ||
@@ -29,4 +34,4 @@ "url": "https://github.com/brolaugh", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "25fdb2208e1c272b4eb2e0ee98fa287a6725ec0d89ab18c16bb449294a362895", | ||
"typeScriptVersion": "4.0" | ||
"typesPublisherContentHash": "7cd5c8ed90f6af355555e3b88e3bfdc2bbbb044b50f1a247b095e37b09d1c0f0", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for plaid-link-browser (https://github.com/plaid/link). | ||
This package contains type definitions for Plaid Link (https://cdn.plaid.com/link/v2/stable/link-initialize.js). | ||
@@ -12,3 +12,3 @@ # Details | ||
### Additional Details | ||
* Last updated: Wed, 20 Jul 2022 00:02:18 GMT | ||
* Last updated: Wed, 15 Mar 2023 00:02:37 GMT | ||
* Dependencies: none | ||
@@ -18,2 +18,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by [Aaron Holderman](https://github.com/afholderman), and [Hannes Kindströmmer](https://github.com/brolaugh). | ||
These definitions were written by [Aaron Holderman](https://github.com/afholderman), [Brian Howald](https://github.com/bdhowald), and [Hannes Kindströmmer](https://github.com/brolaugh). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9835
235
1