├── .editorconfig ├── .gitignore ├── LICENSE.txt ├── README.md ├── api ├── cdTermsClient.js ├── config │ └── config.js.sample ├── createAccountClient.js └── oauth │ └── index.js ├── app.js ├── notices.txt ├── package.json ├── public ├── app │ ├── app.component.ts │ ├── app.module.ts │ ├── app.routing.ts │ ├── app.service.ts │ ├── data │ │ └── data-constants.ts │ ├── models │ │ ├── address-model.ts │ │ ├── applicant-model.ts │ │ ├── deposit-application-model.ts │ │ ├── external-account-details-model.ts │ │ ├── funding-details-model.ts │ │ ├── phone-number-model.ts │ │ ├── products-disclosures-model.ts │ │ └── terms-and-conditions-model.ts │ ├── rxjs-operators.ts │ └── views │ │ ├── confirm-info │ │ ├── confirm-info.component.html │ │ └── confirm-info.component.ts │ │ ├── personal-info │ │ ├── prospect-form.component.html │ │ └── prospect-form.component.ts │ │ └── summary │ │ ├── summary.component.html │ │ └── summary.component.ts ├── components │ └── slide-toggle │ │ ├── index.ts │ │ ├── slide-toggle.component.html │ │ └── slide-toggle.component.ts ├── custom-typings.d.ts ├── index.html ├── main.browser.ts ├── polyfills.browser.ts ├── styles │ ├── css │ │ └── master.css │ ├── fonts │ │ ├── 360icons │ │ │ ├── CapitalOneIcons-Regular.eot │ │ │ ├── CapitalOneIcons-Regular.otf │ │ │ ├── CapitalOneIcons-Regular.svg │ │ │ ├── CapitalOneIcons-Regular.ttf │ │ │ ├── CapitalOneIcons-Regular.woff │ │ │ ├── CapitalOneIcons-Regular.woff2 │ │ │ └── icons-key.png │ │ ├── ui-icons.eot │ │ ├── ui-icons.svg │ │ ├── ui-icons.ttf │ │ ├── ui-icons.woff │ │ └── ui-icons.woff2 │ └── images │ │ ├── circle-dollar-fill.svg │ │ ├── circle-mail.png │ │ ├── circle-mail.svg │ │ ├── favicon.ico │ │ ├── oao-sprite-360-1x.png │ │ ├── oao-sprite-360-2x.png │ │ ├── oao_streamline_sprite_1x.png │ │ ├── oao_streamline_sprite_2x.png │ │ └── text-select.png └── vendor.browser.ts ├── tsconfig.json ├── typings.json └── webpack.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | # http://editorconfig.org 17 | 18 | root = true 19 | 20 | [*] 21 | charset = utf-8 22 | indent_style = space 23 | indent_size = 2 24 | end_of_line = lf 25 | insert_final_newline = true 26 | trim_trailing_whitespace = true 27 | 28 | [*.md] 29 | insert_final_newline = false 30 | trim_trailing_whitespace = false 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | typings 3 | node_modules 4 | jspm_packages 5 | link-checker-results.txt 6 | **/*npm-debug.log.* 7 | *.js 8 | *.js.map 9 | e2e/**/*.js 10 | e2e/**/*.js.map 11 | _test-output 12 | _temp 13 | dist 14 | *.map 15 | public/release 16 | 17 | !karma*.js 18 | !protractor*.js 19 | !systemjs.config.js 20 | !typings/typings.d.ts 21 | !wallaby.js 22 | !webpack.config.js 23 | !app.js 24 | !api/**/*.js 25 | api/config/config.js 26 | api/config/config.js 27 | api/config/hybrid.pem 28 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Capital One built this project to help the users of this API. We are no longer actively enhancing this API. We have archived the project as of Jul 23 2019 where it will be available in a read-only state. 2 | 3 | ## Capitalone OAO Demo app 4 | 5 | A simple starter project demonstrating on how to use capitalone public api to create an account. 6 | 7 | | **Note** | As of 08/15/2017, Bank Account Starter API has released a version 2 which is the only version supported in Production. The reference application code built against version 1 (branch: bas-v1) is preserved for history only and should not be used past 08/15/2017. 'master' branch is updated to use version 2 of BAS API. | 8 | | ---- | ---- | 9 | 10 | ### Usage 11 | - Clone or fork this repository 12 | - Make sure you have [node.js](https://nodejs.org/) installed version 5+ 13 | - Make sure you have NPM installed version 3+ 14 | - `WINDOWS ONLY` run `npm install -g webpack webpack-dev-server typings typescript` to install global dependencies 15 | - run `npm install` to install dependencies 16 | - `WINDOWS ONLY` run `npm run typings-install` to install typings 17 | - run `npm start` to fire up dev server 18 | - open browser to [`http://localhost:8001`](http://localhost:8001) 19 | 20 | ### Debug 21 | Although the reference application doesn’t write a formal log file, it does write all of the received JSON responses to the terminal window; you can use this information to match what you’re seeing in the app’s UI with the data the API is returning. 22 | - ```DEBUG=http npm start``` : starts the app in debug mode where you can see the request/responses from the app to api 23 | 24 | ## Contributors 25 | We welcome your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project must accept and sign a CLA indicating agreement to the license terms. Except for the license granted in this CLA to Capital One and to recipients of software distributed by Capital One, You reserve all right, title, and interest in and to your Contributions; this CLA does not impact your rights to use your own contributions for any other purpose. 26 | 27 | ##### [Link to CLA] (https://docs.google.com/forms/d/19LpBBjykHPox18vrZvBbZUcK6gQTj7qv1O5hCduAZFU/viewform) 28 | 29 | This project adheres to the [Open Source Code of Conduct][code-of-conduct]. By participating, you are expected to honor this code. 30 | 31 | [code-of-conduct]: https://developer.capitalone.com/single/code-of-conduct/ 32 | 33 | ### Contribution Guidelines 34 | We encourage any contributions that align with the intent of this project and add more functionality or languages that other developers can make use of. To contribute to the project, please submit a PR for our review. Before contributing any source code, familiarize yourself with the Apache License 2.0 (LICENSE.txt), which controls the licensing for this project. 35 | -------------------------------------------------------------------------------- /api/cdTermsClient.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | 17 | var request = require('request'); 18 | var _ = require('lodash'); 19 | var format = require('util').format; 20 | var config = require('./config/config'); 21 | 22 | const CD_PRODUCT_ID = '3500'; 23 | const CD_PRODUCT_URL = '/deposits/account-products/'; 24 | 25 | // Default to a secure call to the API endpoint 26 | var defaultOptions = { 27 | // TODO: update this value with actual/staging api host 28 | url: config.BASE_URI, 29 | apiVersion: 2 30 | }; 31 | 32 | /** 33 | * The API client class 34 | * @param options {object} Client options (host url, API version) 35 | */ 36 | function CDTermsClient (options, oauth) { 37 | if (!this instanceof CDTermsClient) { 38 | return new CDTermsClient(options); 39 | } 40 | 41 | // Store the supplied options, using default values if not specified 42 | this.options = _.defaults({}, options, defaultOptions); 43 | this.oauth = oauth; 44 | } 45 | module.exports = CDTermsClient 46 | 47 | 48 | /** 49 | * Perform a request to retrieve credit offers for a customer 50 | * @param customerInfo {object} Represents the customer info to pass to the API 51 | */ 52 | CDTermsClient.prototype.getCDTerms = function getCDTerms (callback) { 53 | console.log("CDTermsClient.prototype.getCDTerms"); 54 | var client = this 55 | this.oauth.withToken(function (err, token) { 56 | if (err) { return callback(err) } 57 | 58 | var reqOptions = { 59 | baseUrl: client.options.url, 60 | url: CD_PRODUCT_URL+CD_PRODUCT_ID, 61 | method: 'GET', 62 | json: true, 63 | headers: { 64 | 'Accept': 'application/json; v=' + client.options.apiVersion, 65 | 'content-type': 'application/json' 66 | }, 67 | auth: { 68 | bearer: token.access_token 69 | } 70 | } 71 | client._sendRequest(reqOptions, callback) 72 | }) 73 | } 74 | 75 | 76 | /** 77 | * A private function to send a request to the API and parse the response, handling errors as needed 78 | */ 79 | CDTermsClient.prototype._sendRequest = function _sendRequest (reqOptions, callback) { 80 | console.log("CDTermsClient.prototype._sendRequest"); 81 | request(reqOptions, function (err, response, body) { 82 | console.log("CDTermsClient.prototype._sendRequest.request"); 83 | if (err) { return callback(err) } 84 | if (response.statusCode === 400) { 85 | return processResponseErrors(body, callback) 86 | } else if (response.statusCode === 200) { 87 | parseResponse(body, callback) 88 | } else { 89 | var errorMessage = 'Received unexpected status code: ' + response.statusCode 90 | console.error(errorMessage) 91 | return callback(new Error(errorMessage)) 92 | } 93 | }) 94 | 95 | function parseResponse (responseBody, callback) { 96 | if (!responseBody) { 97 | return callback(null, null) 98 | } 99 | 100 | try { 101 | var responseObject = responseBody; 102 | return callback(null, responseObject) 103 | } catch (error) { 104 | return callback(error) 105 | } 106 | } 107 | 108 | function processResponseErrors (responseBody, callback) { 109 | parseResponse(responseBody, function (err, data) { 110 | if (err) { return callback(err) } 111 | 112 | var errorCode = data.code || '' 113 | var errorDescription = data.description || '' 114 | var documentationUrl = data.documentationUrl || '' 115 | var message = format('Received an error from the API: code=%s | description=%s | documentation=%s', errorCode, errorDescription, documentationUrl) 116 | console.error(message) 117 | callback(new Error(message)) 118 | }) 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /api/config/config.js.sample: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | /* 17 | * Copy this file to config.js and enter your configuration info. 18 | * config.js should not be under version control since it contains your 19 | * client_id and client_secret. 20 | */ 21 | 22 | var config = { 23 | CLIENT_ID:'', //Replace this with the client id received from the developer portal 24 | CLIENT_SECRET:'', //Replace this with the client secret received from the developer portal 25 | BASE_URI:'https://api.capitalone.com' // Replace this with api host 26 | }; 27 | 28 | module.exports = config; 29 | -------------------------------------------------------------------------------- /api/createAccountClient.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | var request = require('request'); 17 | var _ = require('lodash'); 18 | var format = require('util').format; 19 | var config = require('./config/config'); 20 | 21 | // Default to a secure call to the API endpoint 22 | var defaultOptions = { 23 | // TODO: update this value with actual/staging api host 24 | url: config.BASE_URI, 25 | apiVersion: 1 26 | }; 27 | 28 | /** 29 | * The API client class 30 | * @param options {object} Client options (host url, API version) 31 | */ 32 | function CreateAccountClient (options, oauth) { 33 | if (!this instanceof CreateAccountClient) { 34 | return new CreateAccountClient(options); 35 | } 36 | 37 | // Store the supplied options, using default values if not specified 38 | this.options = _.defaults({}, options, defaultOptions); 39 | this.oauth = oauth; 40 | } 41 | module.exports = CreateAccountClient 42 | 43 | /** 44 | * Perform a request to retrieve credit offers for a customer 45 | * @param customerInfo {object} Represents the customer info to pass to the API 46 | */ 47 | CreateAccountClient.prototype.createAccount = function createAccount (customerInfo, callback) { 48 | var client = this 49 | this.oauth.withToken(function (err, token) { 50 | if (err) { return callback(err) } 51 | 52 | var reqOptions = { 53 | baseUrl: client.options.url, 54 | url: '/deposits/account-applications', 55 | method: 'POST', 56 | body:customerInfo, 57 | json: true, 58 | headers: { 59 | 'Accept': 'application/json; v=' + client.options.apiVersion, 60 | 'content-type': 'application/json' 61 | }, 62 | auth: { 63 | bearer: token.access_token 64 | } 65 | } 66 | client._sendRequest(reqOptions, callback) 67 | }) 68 | } 69 | 70 | /** 71 | * A private function to send a request to the API and parse the response, handling errors as needed 72 | */ 73 | CreateAccountClient.prototype._sendRequest = function _sendRequest (reqOptions, callback) { 74 | request(reqOptions, function (err, response, body) { 75 | if (err) { return callback(err) } 76 | if (response.statusCode === 400) { 77 | return processResponseErrors(body, callback) 78 | } else if (response.statusCode === 201) { 79 | parseResponse(body, callback) 80 | } else { 81 | var errorMessage = 'Received unexpected status code: ' + response.statusCode 82 | console.error(errorMessage) 83 | return callback(new Error(errorMessage)) 84 | } 85 | }) 86 | 87 | function parseResponse (responseBody, callback) { 88 | if (!responseBody) { 89 | return callback(null, null) 90 | } 91 | 92 | try { 93 | var responseObject = responseBody; 94 | return callback(null, responseObject) 95 | } catch (error) { 96 | return callback(error) 97 | } 98 | } 99 | 100 | function processResponseErrors (responseBody, callback) { 101 | parseResponse(responseBody, function (err, data) { 102 | if (err) { return callback(err) } 103 | 104 | var errorCode = data.code || '' 105 | var errorDescription = data.description || '' 106 | var documentationUrl = data.documentationUrl || '' 107 | var message = format('Received an error from the API: code=%s | description=%s | documentation=%s', errorCode, errorDescription, documentationUrl) 108 | console.error(message) 109 | callback(new Error(message)) 110 | }) 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /api/oauth/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | var request = require('request') 17 | var debug = require('debug')('credit-offers:oauth') 18 | 19 | /** 20 | * Provides functions for oauth token management 21 | */ 22 | module.exports = function (options) { 23 | debug('Initializing oauth module', options) 24 | var clientID = options.clientID 25 | var clientSecret = options.clientSecret 26 | var tokenURL = options.tokenURL 27 | 28 | /** 29 | * Get a new access token using client credentials 30 | */ 31 | function withToken (callback) { 32 | debug('Getting a new access token') 33 | var reqOptions = { 34 | url: tokenURL, 35 | method: 'POST', 36 | form: { 37 | 'client_id': clientID, 38 | 'client_secret': clientSecret, 39 | 'grant_type': 'client_credentials' 40 | } 41 | } 42 | 43 | request(reqOptions, function (error, response, body) { 44 | if (error) { 45 | return callback(error) 46 | } 47 | if (response.status >= 400) { 48 | return callback(new Error('OAuth access token exchange failed')) 49 | } 50 | 51 | if (!body) { 52 | var missingTokenError = new Error('OAuth response body did not include an access token') 53 | console.error(missingTokenError) 54 | return callback(missingTokenError) 55 | } 56 | 57 | debug('Received token response', body) 58 | try { 59 | var newToken = JSON.parse(body) 60 | } catch (parseError) { 61 | return callback(parseError) 62 | } 63 | debug('Parsed new token', newToken) 64 | 65 | return callback(null, newToken) 66 | }) 67 | } 68 | 69 | return { 70 | withToken: withToken 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and limitations under the License. 11 | */ 12 | 13 | var express = require('express'); 14 | var cors = require('cors'); 15 | var app = express(); 16 | app.use(cors()); 17 | app.options('*', cors()); 18 | var bodyParser = require('body-parser'); 19 | var jsonParser = bodyParser.json(); 20 | var config = require('./api/config/config'); 21 | var request = require('request'); 22 | if(process.env.DEBUG && process.env.DEBUG=='http'){ 23 | require('request-debug')(request); 24 | } 25 | var https = require('http'); 26 | var querystring = require('querystring'); 27 | var CreateAccountClient = require('./api/CreateAccountClient'); 28 | var CDTermsClient = require('./api/CDTermsClient'); 29 | var oauth = require('./api/oauth'); 30 | var oauthOptions = { 31 | tokenURL: config.BASE_URI + '/oauth2/token', 32 | // The clientId and clientSecret you received when registering your app. 33 | clientID: config.CLIENT_ID, 34 | clientSecret: config.CLIENT_SECRET 35 | }; 36 | var ClientOptions = { 37 | // The URL of the Credit Offers environment you are connecting to. 38 | url: config.BASE_URI, 39 | apiVersion: 2 40 | }; 41 | var PORT = process.env.PORT || 8001; 42 | 43 | app.use(express.static(__dirname + '/public')); 44 | app.use(bodyParser.json()); 45 | 46 | app.post("/deposits/account-applications", function(req, res, next) { 47 | var customerInfo = req.body; 48 | var client = new CreateAccountClient(ClientOptions, oauth(oauthOptions)); 49 | client.createAccount(customerInfo, function (err, response) { 50 | if (err) { return next(err) } 51 | res.json(response); 52 | }) 53 | }); 54 | 55 | app.get("/deposits/account-products/3500", function(req, res, next) { 56 | var client = new CDTermsClient(ClientOptions, oauth(oauthOptions)); 57 | client.getCDTerms(function (err, response) { 58 | if (err) { return next(err) } 59 | res.json(response); 60 | }) 61 | }); 62 | 63 | app.listen(PORT, 'localhost', function() { 64 | console.log('express server listening on port', PORT); 65 | }); 66 | -------------------------------------------------------------------------------- /notices.txt: -------------------------------------------------------------------------------- 1 | NodeJS Package Dependencies: 2 | 3 | "devDependencies": { 4 | "angular2-template-loader": "^0.4.0", 5 | "awesome-typescript-loader": "^1.1.1", 6 | "compass-mixins": "^0.12.10", 7 | "css-loader": "^0.23.1", 8 | "extract-text-webpack-plugin": "^1.0.1", 9 | "node-sass": "^3.10.0", 10 | "raw-loader": "^0.5.1", 11 | "sass-loader": "^4.0.2", 12 | "style-loader": "^0.13.1", 13 | "to-string-loader": "^1.1.4", 14 | "typescript": "^2.0.2", 15 | "typings": "~1.0.3", 16 | "webpack": "^1.13.2", 17 | "webpack-dev-server": "^1.14.0", 18 | "webpack-merge": "^0.8.4" 19 | }, 20 | "dependencies": { 21 | "@angular/common": "2.0.0", 22 | "@angular/compiler": "2.0.0", 23 | "@angular/core": "2.0.0", 24 | "@angular/forms": "2.0.0", 25 | "@angular/http": "2.0.0", 26 | "@angular/platform-browser": "2.0.0", 27 | "@angular/platform-browser-dynamic": "2.0.0", 28 | "@angular/platform-server": "2.0.0", 29 | "@angular/router": "3.0.0", 30 | "core-js": "^2.4.0", 31 | "extract-text-webpack-plugin": "^1.0.1", 32 | "ie-shim": "^0.1.0", 33 | "rxjs": "5.0.0-beta.12", 34 | "zone.js": "~0.6.17" 35 | } 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BankAccountStarter-API-reference-app", 3 | "version": "1.0.0", 4 | "description": "A simple starter project demonstrating on how to use capitalone public api to create an account.", 5 | "scripts": { 6 | "typings-install": "typings install", 7 | "postinstall": "npm run typings-install", 8 | "build": "webpack --inline --colors --progress --display-error-details --display-cached", 9 | "watch": "npm run build -- --watch", 10 | "server": "webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src", 11 | "prestart": "npm run build", 12 | "start": "node app" 13 | }, 14 | "contributors": [ 15 | "Tirumala Rao Kavala " 16 | ], 17 | "license": "MIT", 18 | "devDependencies": { 19 | "angular2-template-loader": "^0.4.0", 20 | "awesome-typescript-loader": "^1.1.1", 21 | "extract-text-webpack-plugin": "^1.0.1", 22 | "raw-loader": "^0.5.1", 23 | "request-debug": "^0.2.0", 24 | "typescript": "2.0.3", 25 | "typings": "~1.0.3", 26 | "webpack": "^1.13.2", 27 | "webpack-dev-server": "^1.14.0", 28 | "webpack-merge": "^0.8.4" 29 | }, 30 | "dependencies": { 31 | "@angular/common": "2.0.0", 32 | "@angular/compiler": "2.0.0", 33 | "@angular/core": "2.0.0", 34 | "@angular/forms": "2.0.0", 35 | "@angular/http": "2.0.0", 36 | "@angular/platform-browser": "2.0.0", 37 | "@angular/platform-browser-dynamic": "2.0.0", 38 | "@angular/router": "3.0.0", 39 | "core-js": "^2.4.0", 40 | "debug": "^2.2.0", 41 | "extract-text-webpack-plugin": "^1.0.1", 42 | "ie-shim": "^0.1.0", 43 | "lodash": "^4.16.4", 44 | "request": "^2.76.0", 45 | "rxjs": "5.0.0-beta.12", 46 | "zone.js": "~0.6.17", 47 | "body-parser": "^1.15.2", 48 | "cors": "^2.8.1", 49 | "express": "^4.14.0" 50 | }, 51 | "keywords": [ 52 | "Angular2", 53 | "BankAccountStarter-API-reference-app" 54 | ], 55 | "repository": { 56 | "type": "git", 57 | "url": "git+https://github.com/capitalone/BankAccountStarter-API-reference-app.git" 58 | }, 59 | "bugs": { 60 | "url": "https://github.com/capitalone/BankAccountStarter-API-reference-app/issues" 61 | }, 62 | "homepage": "https://github.com/capitalone/BankAccountStarter-API-reference-app#readme" 63 | } 64 | -------------------------------------------------------------------------------- /public/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Component } from '@angular/core'; 17 | 18 | @Component({ 19 | selector: 'my-app', 20 | template: '' 21 | }) 22 | export class AppComponent { } 23 | -------------------------------------------------------------------------------- /public/app/app.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { NgModule } from '@angular/core'; 17 | import { BrowserModule } from '@angular/platform-browser'; 18 | import { FormsModule } from '@angular/forms'; 19 | import { AppComponent } from './app.component'; 20 | import { ProspectFormComponent } from './views/personal-info/prospect-form.component'; 21 | import { SlideToggleComponent } from '../components/slide-toggle/slide-toggle.component'; 22 | import { routing } from './app.routing'; 23 | import { AppService } from './app.service'; 24 | import {ConfirmInfoComponent} from './views/confirm-info/confirm-info.component'; 25 | import {SummaryComponent} from './views/summary/summary.component'; 26 | import {LocationStrategy, HashLocationStrategy} from '@angular/common'; 27 | import { HttpModule } from '@angular/http'; 28 | 29 | 30 | @NgModule({ 31 | imports: [ 32 | BrowserModule, 33 | FormsModule, 34 | routing, 35 | HttpModule 36 | ], 37 | declarations: [ 38 | AppComponent, 39 | ProspectFormComponent, 40 | SlideToggleComponent, 41 | ConfirmInfoComponent, 42 | SummaryComponent 43 | ], 44 | bootstrap: [AppComponent], 45 | providers:[AppService, {provide: LocationStrategy, useClass: HashLocationStrategy}] 46 | }) 47 | 48 | export class AppModule {} 49 | -------------------------------------------------------------------------------- /public/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { ModuleWithProviders } from '@angular/core'; 17 | import { Routes, RouterModule } from '@angular/router'; 18 | 19 | import { ProspectFormComponent } from './views/personal-info/prospect-form.component'; 20 | import {ConfirmInfoComponent} from './views/confirm-info/confirm-info.component'; 21 | import {SummaryComponent} from './views/summary/summary.component'; 22 | 23 | const appRoutes: Routes = [ 24 | { 25 | path: '', 26 | redirectTo: 'personal-info', 27 | pathMatch: 'full' 28 | }, 29 | { 30 | path: 'personal-info', 31 | component: ProspectFormComponent 32 | }, 33 | { 34 | path: 'confirm-info', 35 | component: ConfirmInfoComponent 36 | }, 37 | { 38 | path: 'summary', 39 | component: SummaryComponent 40 | } 41 | ]; 42 | 43 | export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes); 44 | -------------------------------------------------------------------------------- /public/app/app.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Injectable } from '@angular/core'; 17 | import { DepositApplicationModel } from './models/deposit-application-model'; 18 | import { AddressModel } from './models/address-model'; 19 | import {FundingDetailsModel} from './models/funding-details-model'; 20 | import {ExternalAccountDetailsModel} from './models/external-account-details-model'; 21 | import {TermsAndConditionsModel} from './models/terms-and-conditions-model'; 22 | import { ApplicantModel } from './models/applicant-model'; 23 | import { Observable } from 'rxjs/Observable'; 24 | import { Http, Response, Headers, RequestOptions} from '@angular/http'; 25 | 26 | // Add the RxJS Observable operators we need in this app. 27 | import './rxjs-operators'; 28 | 29 | 30 | @Injectable() 31 | export class AppService { 32 | depositApplicationModel:DepositApplicationModel; 33 | bankABANumber: String; 34 | accountNumber: String; 35 | jointAccount:boolean; 36 | private httpHeaders:Headers; 37 | private depositApplicationUrl = '/deposits/account-applications'; // URL to web API 38 | 39 | constructor(private http: Http){ 40 | this.depositApplicationModel= new DepositApplicationModel(); 41 | this.jointAccount = false; 42 | this.httpHeaders = new Headers( 43 | { 44 | 'Content-Type': 'application/json', 45 | 'Accept':'application/json;v=2' 46 | }); 47 | } 48 | 49 | createAccount(): Observable { 50 | let body = JSON.stringify(this.depositApplicationModel); 51 | let options = new RequestOptions({ headers: this.httpHeaders }); 52 | 53 | return this.http.post(this.depositApplicationUrl, body,options) 54 | .map(this.extractData) 55 | .catch(this.handleError); 56 | } 57 | 58 | getCDTerms(): Observable { 59 | let url = '/deposits/account-products/3500'; 60 | let options = new RequestOptions({ headers: this.httpHeaders }); 61 | 62 | return this.http.get(url, options) 63 | .map(this.extractData) 64 | .catch(this.handleError); 65 | } 66 | 67 | private extractData(res: Response) { 68 | let body = res.json(); 69 | return body || { }; 70 | } 71 | private handleError (error: any) { 72 | // In a real world app, we might use a remote logging infrastructure 73 | // We'd also dig deeper into the error to get a better message 74 | let errMsg = (error.message) ? error.message : 75 | error.status ? `${error.status} - ${error.statusText}` : 'Server error'; 76 | console.error(errMsg); // log to console instead 77 | return Observable.throw(errMsg); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /public/app/data/data-constants.ts: -------------------------------------------------------------------------------- 1 | export const countries: Array = [ 2 | {name: 'Afghanistan', code: 'AFG'}, 3 | {name: 'Aland Islands', code: 'ALA'}, 4 | {name: 'Albania', code: 'ALB'}, 5 | {name: 'Algeria', code: 'DZa'}, 6 | {name: 'American Samoa', code: 'ASM'}, 7 | {name: 'AndorrA', code: 'ADD'}, 8 | {name: 'Angola', code: 'AO'}, 9 | {name: 'Anguilla', code: 'AIA'}, 10 | {name: 'Antarctica', code: 'ATA'}, 11 | {name: 'Antigua and Barbuda', code: 'ATG'}, 12 | {name: 'Argentina', code: 'ARG'}, 13 | {name: 'Armenia', code: 'AMM'}, 14 | {name: 'Aruba', code: 'ABW'}, 15 | {name: 'Australia', code: 'AUS'}, 16 | {name: 'Austria', code: 'AUT'}, 17 | {name: 'Azerbaijan', code: 'AZE'}, 18 | {name: 'Bahamas', code: 'BHS'}, 19 | {name: 'Bahrain', code: 'BHR'}, 20 | {name: 'Bangladesh', code: 'BGD'}, 21 | {name: 'Barbados', code: 'BRB'}, 22 | {name: 'Belarus', code: 'BLR'}, 23 | {name: 'Belgium', code: 'BEL'}, 24 | {name: 'Belize', code: 'BLZ'}, 25 | {name: 'Benin', code: 'BEN'}, 26 | {name: 'Bermuda', code: 'BMU'}, 27 | {name: 'Bhutan', code: 'BTN'}, 28 | {name: 'Bolivia', code: 'BOL'}, 29 | {name: 'Bosnia and Herzegovina', code: 'BIH'}, 30 | {name: 'Botswana', code: 'BWA'}, 31 | {name: 'Bouvet Island', code: 'BVT'}, 32 | {name: 'Brazil', code: 'BRA'}, 33 | {name: 'British Indian Ocean Territory', code: 'IOT'}, 34 | {name: 'Brunei Darussalam', code: 'BRN'}, 35 | {name: 'Bulgaria', code: 'BGR'}, 36 | {name: 'Burkina Faso', code: 'BFA'}, 37 | {name: 'Burundi', code: 'BDI'}, 38 | {name: 'Cambodia', code: 'KHM'}, 39 | {name: 'Cameroon', code: 'CMR'}, 40 | {name: 'Canada', code: 'CAN'}, 41 | {name: 'Cape Verde', code: 'CPV'}, 42 | {name: 'Cayman Islands', code: 'CYM'}, 43 | {name: 'Central African Republic', code: 'CAF'}, 44 | {name: 'Chad', code: 'TCD'}, 45 | {name: 'Chile', code: 'CHL'}, 46 | {name: 'China', code: 'CHN'}, 47 | {name: 'Christmas Island', code: 'CXR'}, 48 | {name: 'Cocos (Keeling) Islands', code: 'CCK'}, 49 | {name: 'Colombia', code: 'COL'}, 50 | {name: 'Comoros', code: 'COM'}, 51 | {name: 'Congo', code: 'COG'}, 52 | {name: 'Congo, The Democratic Republic of the', code: 'COD'}, 53 | {name: 'Cook Islands', code: 'COK'}, 54 | {name: 'Costa Rica', code: 'CRI'}, 55 | {name: 'Cote D\'Ivoire', code: 'CIV'}, 56 | {name: 'Croatia', code: 'HRV'}, 57 | {name: 'Cuba', code: 'CUB'}, 58 | {name: 'Cyprus', code: 'CYP'}, 59 | {name: 'Czech Republic', code: 'CZE'}, 60 | {name: 'Denmark', code: 'DNK'}, 61 | {name: 'Djibouti', code: 'DJI'}, 62 | {name: 'Dominica', code: 'DMA'}, 63 | {name: 'Dominican Republic', code: 'DOM'}, 64 | {name: 'Ecuador', code: 'ECU'}, 65 | {name: 'Egypt', code: 'EGY'}, 66 | {name: 'El Salvador', code: 'SLV'}, 67 | {name: 'Equatorial Guinea', code: 'GNQ'}, 68 | {name: 'Eritrea', code: 'ERI'}, 69 | {name: 'Estonia', code: 'EST'}, 70 | {name: 'Ethiopia', code: 'ETH'}, 71 | {name: 'Falkland Islands (Malvinas)', code: 'FLK'}, 72 | {name: 'Faroe Islands', code: 'FRO'}, 73 | {name: 'Fiji', code: 'FJI'}, 74 | {name: 'Finland', code: 'FIN'}, 75 | {name: 'France', code: 'FRA'}, 76 | {name: 'French Guiana', code: 'GUF'}, 77 | {name: 'French Polynesia', code: 'PYF'}, 78 | {name: 'French Southern Territories', code: 'ATF'}, 79 | {name: 'Gabon', code: 'GAB'}, 80 | {name: 'Gambia', code: 'GMB'}, 81 | {name: 'Georgia', code: 'GEO'}, 82 | {name: 'Germany', code: 'DEU'}, 83 | {name: 'Ghana', code: 'GHA'}, 84 | {name: 'Gibraltar', code: 'GIB'}, 85 | {name: 'Greece', code: 'GRC'}, 86 | {name: 'Greenland', code: 'GRL'}, 87 | {name: 'Grenada', code: 'GRD'}, 88 | {name: 'Guadeloupe', code: 'GLP'}, 89 | {name: 'Guam', code: 'GUM'}, 90 | {name: 'Guatemala', code: 'GTM'}, 91 | {name: 'Guernsey', code: 'GGY'}, 92 | {name: 'Guinea', code: 'GIN'}, 93 | {name: 'Guinea-Bissau', code: 'GNB'}, 94 | {name: 'Guyana', code: 'GUY'}, 95 | {name: 'Haiti', code: 'HTI'}, 96 | {name: 'Heard Island and Mcdonald Islands', code: 'HMD'}, 97 | {name: 'Holy See (Vatican City State)', code: 'VAT'}, 98 | {name: 'Honduras', code: 'HND'}, 99 | {name: 'Hong Kong', code: 'HKG'}, 100 | {name: 'Hungary', code: 'HUN'}, 101 | {name: 'Iceland', code: 'ISL'}, 102 | {name: 'India', code: 'IND'}, 103 | {name: 'Indonesia', code: 'IDN'}, 104 | {name: 'Iran, Islamic Republic Of', code: 'IRN'}, 105 | {name: 'Iraq', code: 'IRQ'}, 106 | {name: 'Ireland', code: 'IRE'}, 107 | {name: 'Isle of Man', code: 'IMN'}, 108 | {name: 'Israel', code: 'ISR'}, 109 | {name: 'Italy', code: 'ITA'}, 110 | {name: 'Jamaica', code: 'JAM'}, 111 | {name: 'Japan', code: 'JPN'}, 112 | {name: 'Jersey', code: 'JEY'}, 113 | {name: 'Jordan', code: 'JOR'}, 114 | {name: 'Kazakhstan', code: 'KAZ'}, 115 | {name: 'Kenya', code: 'KEN'}, 116 | {name: 'Kiribati', code: 'KIR'}, 117 | {name: 'Korea, Democratic People\'S Republic of', code: 'PRK'}, 118 | {name: 'Korea, Republic of', code: 'KOR'}, 119 | {name: 'Kuwait', code: 'KWT'}, 120 | {name: 'Kyrgyzstan', code: 'KGZ'}, 121 | {name: 'Lao People\'S Democratic Republic', code: 'LAO'}, 122 | {name: 'Latvia', code: 'LVA'}, 123 | {name: 'Lebanon', code: 'LBN'}, 124 | {name: 'Lesotho', code: 'LSO'}, 125 | {name: 'Liberia', code: 'LBR'}, 126 | {name: 'Libya', code: 'LBY'}, 127 | {name: 'Liechtenstein', code: 'LIE'}, 128 | {name: 'Lithuania', code: 'LTU'}, 129 | {name: 'Luxembourg', code: 'LUX'}, 130 | {name: 'Macao', code: 'MAC'}, 131 | {name: 'Macedonia, The Former Yugoslav Republic of', code: 'MKD'}, 132 | {name: 'Madagascar', code: 'MDG'}, 133 | {name: 'Malawi', code: 'MWI'}, 134 | {name: 'Malaysia', code: 'MYS'}, 135 | {name: 'Maldives', code: 'MDV'}, 136 | {name: 'Mali', code: 'MLI'}, 137 | {name: 'Malta', code: 'MLT'}, 138 | {name: 'Marshall Islands', code: 'MHL'}, 139 | {name: 'Martinique', code: 'MTQ'}, 140 | {name: 'Mauritania', code: 'MRT'}, 141 | {name: 'Mauritius', code: 'MUS'}, 142 | {name: 'Mayotte', code: 'MYT'}, 143 | {name: 'Mexico', code: 'MEX'}, 144 | {name: 'Micronesia, Federated States of', code: 'FSM'}, 145 | {name: 'Moldova, Republic of', code: 'MDA'}, 146 | {name: 'Monaco', code: 'MCO'}, 147 | {name: 'Mongolia', code: 'MNG'}, 148 | {name: 'Montserrat', code: 'MNE'}, 149 | {name: 'Morocco', code: 'MAR'}, 150 | {name: 'Mozambique', code: 'MOZ'}, 151 | {name: 'Myanmar', code: 'MMR'}, 152 | {name: 'Namibia', code: 'NAM'}, 153 | {name: 'Nauru', code: 'NRU'}, 154 | {name: 'Nepal', code: 'NPL'}, 155 | {name: 'Netherlands', code: 'NLD'}, 156 | {name: 'New Caledonia', code: 'NCL'}, 157 | {name: 'New Zealand', code: 'NZL'}, 158 | {name: 'Nicaragua', code: 'NIC'}, 159 | {name: 'Niger', code: 'NER'}, 160 | {name: 'Nigeria', code: 'NGA'}, 161 | {name: 'Niue', code: 'NIU'}, 162 | {name: 'Norfolk Island', code: 'NFK'}, 163 | {name: 'Northern Mariana Islands', code: 'MNP'}, 164 | {name: 'Norway', code: 'NOR'}, 165 | {name: 'Oman', code: 'OMN'}, 166 | {name: 'Pakistan', code: 'PAK'}, 167 | {name: 'Palau', code: 'PLW'}, 168 | {name: 'Palestine, State of', code: 'PSE'}, 169 | {name: 'Panama', code: 'PAN'}, 170 | {name: 'Papua New Guinea', code: 'PNG'}, 171 | {name: 'Paraguay', code: 'PRY'}, 172 | {name: 'Peru', code: 'PER'}, 173 | {name: 'Philippines', code: 'PHL'}, 174 | {name: 'Pitcairn', code: 'PCN'}, 175 | {name: 'Poland', code: 'POL'}, 176 | {name: 'Portugal', code: 'PRT'}, 177 | {name: 'Puerto Rico', code: 'PRI'}, 178 | {name: 'Qatar', code: 'QAT'}, 179 | {name: 'Reunion', code: 'REU'}, 180 | {name: 'Romania', code: 'ROU'}, 181 | {name: 'Russian Federation', code: 'RUS'}, 182 | {name: 'Rwanda', code: 'RWA'}, 183 | {name: 'Saint Helena', code: 'SHN'}, 184 | {name: 'Saint Kitts and Nevis', code: 'KNA'}, 185 | {name: 'Saint Lucia', code: 'LCA'}, 186 | {name: 'Saint Pierre and Miquelon', code: 'SPM'}, 187 | {name: 'Saint Vincent and the Grenadines', code: 'VCT'}, 188 | {name: 'Samoa', code: 'WSM'}, 189 | {name: 'San Marino', code: 'SMR'}, 190 | {name: 'Sao Tome and Principe', code: 'STP'}, 191 | {name: 'Saudi Arabia', code: 'SAU'}, 192 | {name: 'Senegal', code: 'SEN'}, 193 | {name: 'Serbia and Montenegro', code: 'SRB'}, 194 | {name: 'Seychelles', code: 'SYC'}, 195 | {name: 'Sierra Leone', code: 'SLE'}, 196 | {name: 'Singapore', code: 'SGP'}, 197 | {name: 'Slovakia', code: 'SVK'}, 198 | {name: 'Slovenia', code: 'SVN'}, 199 | {name: 'Solomon Islands', code: 'SLB'}, 200 | {name: 'Somalia', code: 'SOM'}, 201 | {name: 'South Africa', code: 'ZAF'}, 202 | {name: 'South Georgia and the South Sandwich Islands', code: 'SGS'}, 203 | {name: 'Spain', code: 'ESP'}, 204 | {name: 'Sri Lanka', code: 'LKA'}, 205 | {name: 'Sudan', code: 'SDN'}, 206 | {name: 'Suriname', code: 'SUR'}, 207 | {name: 'Svalbard and Jan Mayen', code: 'SJM'}, 208 | {name: 'Swaziland', code: 'SWZ'}, 209 | {name: 'Sweden', code: 'SWE'}, 210 | {name: 'Switzerland', code: 'CHE'}, 211 | {name: 'Syrian Arab Republic', code: 'SYR'}, 212 | {name: 'Taiwan, Province of China', code: 'TWN'}, 213 | {name: 'Tajikistan', code: 'TJK'}, 214 | {name: 'Tanzania, United Republic of', code: 'TZA'}, 215 | {name: 'Thailand', code: 'THA'}, 216 | {name: 'Timor-Leste', code: 'TLS'}, 217 | {name: 'Togo', code: 'TGO'}, 218 | {name: 'Tokelau', code: 'TLK'}, 219 | {name: 'Tonga', code: 'TON'}, 220 | {name: 'Trinidad and Tobago', code: 'TTO'}, 221 | {name: 'Tunisia', code: 'TUN'}, 222 | {name: 'Turkey', code: 'TUR'}, 223 | {name: 'Turkmenistan', code: 'TKM'}, 224 | {name: 'Turks and Caicos Islands', code: 'TCA'}, 225 | {name: 'Tuvalu', code: 'TUV'}, 226 | {name: 'Uganda', code: 'UGA'}, 227 | {name: 'Ukraine', code: 'UKR'}, 228 | {name: 'United Arab Emirates', code: 'ARE'}, 229 | {name: 'United Kingdom', code: 'GBR'}, 230 | {name: 'United States', code: 'USA'}, 231 | {name: 'United States Minor Outlying Islands', code: 'UMI'}, 232 | {name: 'Uruguay', code: 'URY'}, 233 | {name: 'Uzbekistan', code: 'UZB'}, 234 | {name: 'Vanuatu', code: 'VUT'}, 235 | {name: 'Venezuela', code: 'VEN'}, 236 | {name: 'Viet Nam', code: 'VNM'}, 237 | {name: 'Virgin Islands, British', code: 'VGB'}, 238 | {name: 'Virgin Islands, U.S.', code: 'VIR'}, 239 | {name: 'Wallis and Futuna', code: 'WLF'}, 240 | {name: 'Western Sahara', code: 'ESH'}, 241 | {name: 'Yemen', code: 'YEM'}, 242 | {name: 'Zambia', code: 'ZMB'}, 243 | {name: 'Zimbabwe', code: 'ZWE'} 244 | ]; 245 | 246 | export const employmentTypes: Array = [ 247 | 'Employed', 248 | 'Self-Employed', 249 | 'Retired', 250 | 'Student', 251 | 'Unemployed' 252 | ]; 253 | 254 | export const incomeRange: Array = [ 255 | {name: 'No Income', code: '0'}, 256 | {name: '$1-$50,000', code: '25000'}, 257 | {name: '$50,001-$100,000', code: '75000'}, 258 | {name: '$100,001-$150,000', code: '125000'}, 259 | {name: '$150,001-$250,000', code: '200000'}, 260 | {name: 'Over $250,000', code: '250000'} 261 | ]; 262 | -------------------------------------------------------------------------------- /public/app/models/address-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | export class AddressModel{ 16 | 17 | type:string; 18 | addressLine1: string; 19 | city: string; 20 | stateCode: string; 21 | postalCode: string; 22 | addressLine2: string; 23 | constructor(){ 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /public/app/models/applicant-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { AddressModel } from './address-model'; 17 | import { PhoneNumberModel } from './phone-number-model'; 18 | 19 | export class ApplicantModel { 20 | applicantRole: string; 21 | firstName: string; 22 | lastName: string; 23 | taxIdType: string; 24 | taxId: string; 25 | dateOfBirth: string; 26 | mobilePhoneNumber: PhoneNumberModel; 27 | homePhoneNumber: PhoneNumberModel; 28 | workPhoneNumber: PhoneNumberModel; 29 | emailAddress: string; 30 | backupWithholding: boolean; 31 | homeAddress: AddressModel; 32 | mailingAddress: AddressModel; 33 | middleName: string; 34 | jobTitle: string; 35 | employmentStatus: string; 36 | annualIncome: string; 37 | citizenshipCountry: string; 38 | 39 | constructor(){ 40 | this.homeAddress = new AddressModel(); 41 | this.mailingAddress = new AddressModel(); 42 | this.mobilePhoneNumber = new PhoneNumberModel(); 43 | this.taxIdType = "SSN"; 44 | this.applicantRole = "primary"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /public/app/models/deposit-application-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import {ApplicantModel} from './applicant-model'; 17 | import {FundingDetailsModel} from './funding-details-model'; 18 | import {TermsAndConditionsModel} from './terms-and-conditions-model' 19 | 20 | export class DepositApplicationModel{ 21 | applicants:ApplicantModel[]=[]; 22 | productId:string; 23 | cdTerm:string; 24 | fundingDetails:FundingDetailsModel; 25 | termsAndConditions:TermsAndConditionsModel; 26 | constructor(){ 27 | this.applicants.push(new ApplicantModel()); 28 | this.productId= "3000"; 29 | this.fundingDetails= new FundingDetailsModel(); 30 | this.termsAndConditions= new TermsAndConditionsModel(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /public/app/models/external-account-details-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | export class ExternalAccountDetailsModel{ 17 | accountNumber:string; 18 | bankABANumber: string; 19 | accountOwnership: string; 20 | constructor(){} 21 | } 22 | -------------------------------------------------------------------------------- /public/app/models/funding-details-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import {ExternalAccountDetailsModel} from './external-account-details-model'; 17 | 18 | export class FundingDetailsModel{ 19 | 20 | fundingType:string; 21 | fundingAmount: number; 22 | externalAccountDetails: ExternalAccountDetailsModel; 23 | 24 | constructor( 25 | ){ 26 | this.fundingType="fundach"; 27 | this.externalAccountDetails= new ExternalAccountDetailsModel(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /public/app/models/phone-number-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | export class PhoneNumberModel{ 16 | 17 | phoneNumber: string; 18 | acceptedTcpa: boolean; 19 | 20 | constructor(){ 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /public/app/models/products-disclosures-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | export class ProductsDisclosuresModel{ 16 | 17 | productDisclosureUrl: string; 18 | termsAndConditionsUrl: string; 19 | electronicFundTransferDisclosureUrl: string; 20 | privacyPolicyUrl: string; 21 | wireTransferAgreementUrl: string; 22 | paperlessAgreementUrl: string; 23 | fraudProtectionAgreementUrl: string; 24 | tcpaDisclosureContent: string; 25 | 26 | constructor(){ 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /public/app/models/terms-and-conditions-model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | export class TermsAndConditionsModel{ 17 | acceptAccountDisclosures:boolean; 18 | acceptPaperlessAgreement: boolean; 19 | acceptFraudProtection: boolean; 20 | constructor(){} 21 | } 22 | -------------------------------------------------------------------------------- /public/app/rxjs-operators.ts: -------------------------------------------------------------------------------- 1 | // import 'rxjs/Rx'; // adds ALL RxJS statics & operators to Observable 2 | 3 | // See node_module/rxjs/Rxjs.js 4 | // Import just the rxjs statics and operators we need for THIS app. 5 | 6 | // Statics 7 | import 'rxjs/add/observable/throw'; 8 | 9 | // Operators 10 | import 'rxjs/add/operator/catch'; 11 | import 'rxjs/add/operator/debounceTime'; 12 | import 'rxjs/add/operator/distinctUntilChanged'; 13 | import 'rxjs/add/operator/map'; 14 | import 'rxjs/add/operator/switchMap'; 15 | import 'rxjs/add/operator/toPromise'; 16 | -------------------------------------------------------------------------------- /public/app/views/confirm-info/confirm-info.component.html: -------------------------------------------------------------------------------- 1 | 15 |
16 |
17 |
18 |

Let's make sure we got this right.

19 |

Review your information before we make the transfer. If something isn't right, you can make changes.

20 |
21 |
22 | 23 |
24 | 27 |
28 |
29 |

Primary Account Holder

30 |

Secondary Account Holder

31 |
32 |
NAME
33 |
{{applicant.firstName}} {{applicant.lastName}}
34 |
DOB
35 |
{{applicant.dateOfBirth}}
36 |
SSN
37 |
{{applicant.taxId}}
38 |
Street address, apt/suite
39 |
{{applicant.homeAddress.addressLine1}}, {{applicant.homeAddress.city}}, {{applicant.homeAddress.stateCode}} {{applicant.homeAddress.postalCode}}
40 |
Mobile number
41 |
{{applicant.mobilePhoneNumber.phoneNumber}}
42 |
Email address
43 |
{{applicant.emailAddress}}
44 |
45 |
46 |
47 | 48 |
49 |
50 |
51 |

Funding information

52 |
53 |
54 |
Routing Number
55 |
{{depositApplicationModel.fundingDetails.externalAccountDetails.bankABANumber}}
56 |
Account Number
57 |
{{depositApplicationModel.fundingDetails.externalAccountDetails.accountNumber}}
58 |
59 |

{{depositApplicationModel.fundingDetails.fundingAmount}}

60 |
61 |
62 |
63 |
64 |
65 |
66 | 67 |
68 |
69 |
70 | 71 | -------------------------------------------------------------------------------- /public/app/views/confirm-info/confirm-info.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Component, OnInit, Injectable} from '@angular/core'; 17 | import {DepositApplicationModel} from '../../models/deposit-application-model'; 18 | import { AppService } from '../../app.service'; 19 | import { NgClass } from '@angular/common'; 20 | import {Router} from '@angular/router'; 21 | @Component({ 22 | selector: 'app-confirm-info', 23 | templateUrl: './confirm-info.component.html' 24 | }) 25 | 26 | @Injectable() 27 | export class ConfirmInfoComponent { 28 | depositApplicationModel:DepositApplicationModel; 29 | joint:boolean; 30 | errorMessage:any; 31 | constructor(private appService: AppService, private _router: Router) { 32 | //this.depositApplicationModel = appService.getConfirmInfo(); 33 | this.depositApplicationModel = appService.depositApplicationModel; 34 | } 35 | ngOnInit(){ 36 | if(this.depositApplicationModel.applicants.length==2){ 37 | this.joint=true; 38 | }else{ 39 | this.joint=false; 40 | } 41 | } 42 | get diagnostic() { return JSON.stringify(this.depositApplicationModel); } 43 | 44 | createAccount(){ 45 | this.appService.createAccount().subscribe( 46 | data => { 47 | if(data.applicationStatus && data.applicationStatus=="Approved"){ 48 | this.appService.bankABANumber=data.bankABANumber; 49 | this.appService.accountNumber =data.accountNumber; 50 | this._router.navigateByUrl('/summary'); 51 | } 52 | }, 53 | error => {this.errorMessage = error}); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /public/app/views/personal-info/prospect-form.component.html: -------------------------------------------------------------------------------- 1 | 15 |
16 |
17 |
18 |

First, tell us about yourself.

19 |
We need some basic information to confirm your identity.
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 | 28 |
29 | 33 |
34 |
35 |
36 | 37 | 38 | 40 | This field is required. 41 | 42 |
43 | 44 |
45 | 46 | 47 | 49 | This field is required. 50 | 51 |
52 | 53 |
54 | 55 |
56 |
57 | 58 | 59 | 61 | This field is required. 62 | 63 |
64 |
65 | 66 | 67 |
68 |
69 | 70 | 71 | 73 | This field is required. 74 | 75 |
76 |
77 | 78 |
79 |
80 | 81 | 82 | 88 | 90 | This field is required. 91 | 92 | 93 |
94 |
95 | 96 | 97 | 98 |
99 |
100 | 101 | 102 | 108 | 110 | 111 | 112 |
113 |
114 | 115 |
116 |
117 | 118 | 119 | 125 | 127 | This field is required. 128 | 129 | 130 |
131 |
132 | 133 |
134 |
135 | 136 | 137 |
138 |
139 | 140 |
141 |
142 | 143 | 144 | 150 | 152 | This field is required. 153 | 154 | 155 |
156 |
157 | 158 | 159 | 160 | 161 |
162 | 163 |
164 |
165 |
166 |
167 | 168 | 169 | 171 | This field is required. 172 | 173 |
174 | 175 | 176 |
177 |
178 | 179 | 180 | 182 | This field is required. 183 | 184 |
185 | 186 | 187 |
188 | 189 | 190 | 192 | This field is required. 193 | 194 |
195 | 196 | 197 |
198 | 199 | 200 | 202 | This field is required. 203 | 204 |
205 | 206 |
207 | 208 |
209 | 210 |
211 | 212 | 213 |
214 |
215 |
216 |
217 |
218 | 219 | 220 | 222 | This field is required. 223 | 224 |
225 |
226 |
227 |
228 |
229 |
230 | 231 | 232 | 234 | This field is required. 235 | 236 |
237 |
238 |
239 |
240 |
241 |
242 | 243 | 244 | If number(s) provided above is(are) mobile phone number(s), it is (they are) my mobile phone number(s), by clicking on the button below, I consent to receive autodialed 245 | and prerecorded/artificial calls, including texts, relating to my relationship with Capital One (which may include handling, servicing, and billing for any of my accounts). 246 | Message and Data rates may apply. You can stop these types of messages by replying STOP in response to a text message, or by following any other instructions 247 | contained in the time-sensitive call. 248 | 249 |
250 | Consent to use mobile number 251 |
252 | 253 | 256 |
257 |
258 | 259 | 262 |
263 |
264 | 267 | 271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 | 282 |
    283 |
  • The number shown is my correct Social Security Number/Taxpayer ID Number
  • 284 |
  • I am a U.S. citizen or other US person.
  • 285 |
  • The FATCA code(s) entered on this form (if any) indicating that I am exempt from FATCA reporting is correct. (Because we have not requested a FATCA exemption code from you, this certification does not apply.)
  • 286 |
287 |

My backup withholding status is:

288 |
289 | Certify that you are or are not subject to backup withholding 290 |
291 | 292 | 295 |
296 |
297 | 298 | 301 |
302 |
303 |
304 |
305 |
306 | 307 |
308 |
309 |

310 |
311 |
312 |
313 |
314 |
315 | 316 | 317 | 323 | 325 | This field is required. 326 | 327 | 328 | 329 |
330 |
331 |
332 |
333 |
334 | 335 | 336 |
337 |
338 |
339 | 340 | 341 | 343 | This field is required. 344 | 345 |
346 |
347 | 348 |
349 |
350 | 351 | 352 | 354 | This field is required. 355 | 356 |
357 |
358 | 359 |
360 |
361 | 362 | 363 | 365 | This field is required. 366 | 367 |
368 |
369 | 370 |
371 |
372 | 373 | 374 | 380 | 382 | This field is required. 383 | 384 | 385 |
386 |
387 |
388 |
389 | 390 |
391 |

Now the legal details. Please read through the following documents and let us know you're OK with the account conditions.

392 | 468 |
469 | 470 | 483 | 484 |
485 |
486 | 487 |
488 | -------------------------------------------------------------------------------- /public/app/views/personal-info/prospect-form.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Component, OnInit, Injectable } from '@angular/core'; 17 | import { NgClass } from '@angular/common'; 18 | import {Router, ActivatedRoute, Params} from '@angular/router'; 19 | import {NgForm} from '@angular/forms'; 20 | import { DepositApplicationModel } from '../../models/deposit-application-model'; 21 | import { AppService } from '../../app.service'; 22 | import {AddressModel} from '../../models/address-model'; 23 | import { ApplicantModel } from '../../models/applicant-model'; 24 | import {ProductsDisclosuresModel} from '../../models/products-disclosures-model'; 25 | import {countries,incomeRange, employmentTypes} from '../../data/data-constants'; 26 | import { Observable } from 'rxjs/Observable'; 27 | 28 | 29 | //console.log(countries); 30 | 31 | @Component({ 32 | selector: 'prospect-form', 33 | templateUrl: './prospect-form.component.html' 34 | }) 35 | @Injectable() 36 | export class ProspectFormComponent implements OnInit { 37 | jointAccount: boolean; 38 | submitted: boolean = false; 39 | depositApplicationModel:DepositApplicationModel; 40 | active:boolean = true; 41 | fundOwnershipArray:string[]; 42 | fundingTypeArray:string[]; 43 | citizenshipCountryArray:string[]; 44 | annualIncomeArray:string[]; 45 | employmentStatusArray:string[]; 46 | productId:string[]; 47 | cdTerm:string; 48 | errorMessage:any; 49 | router:Router; 50 | route: ActivatedRoute; 51 | cdRateAndTermsArray:any[]; 52 | disclosures:ProductsDisclosuresModel; 53 | 54 | constructor(private appService: AppService, router: Router, route: ActivatedRoute) { 55 | this.router = router; 56 | this.depositApplicationModel = appService.depositApplicationModel; 57 | this.jointAccount = appService.jointAccount; 58 | this.citizenshipCountryArray = countries; 59 | this.annualIncomeArray = incomeRange; 60 | this.employmentStatusArray = employmentTypes; 61 | this.route = route; 62 | this.productId; 63 | this.cdTerm; 64 | 65 | if(this.jointAccount){ 66 | this.fundOwnershipArray = ["primary","secondary","both"]; 67 | }else{ 68 | this.fundOwnershipArray = ["primary"]; 69 | this.depositApplicationModel.fundingDetails.externalAccountDetails.accountOwnership = "primary"; 70 | } 71 | } 72 | 73 | 74 | 75 | submitPersonalInfo(personalInfoForm:NgForm) { 76 | this.submitted = true; 77 | if(personalInfoForm.form.valid){ 78 | this.defaultMailingAddress(); 79 | this.appService.jointAccount = this.jointAccount; 80 | this.router.navigateByUrl('/confirm-info'); 81 | } 82 | } 83 | 84 | defaultMailingAddress(){ 85 | for(var a in this.depositApplicationModel.applicants){ 86 | if(this.depositApplicationModel.applicants[a]){ 87 | this.depositApplicationModel.applicants[a].mailingAddress = this.depositApplicationModel.applicants[a].homeAddress; 88 | } 89 | } 90 | } 91 | 92 | get diagnostic() { return JSON.stringify(this.depositApplicationModel); } 93 | 94 | ngOnInit() { 95 | this.active = false; 96 | setTimeout(() => this.active = true, 0); 97 | 98 | this.productId = this.route.snapshot.queryParams['productId']; 99 | if(typeof this.productId != 'undefined') { 100 | this.depositApplicationModel.productId = this.productId.toString(); 101 | } 102 | } 103 | 104 | ngAfterContentInit() { 105 | this.appService.getCDTerms().subscribe( 106 | data => { 107 | if(data){ 108 | this.cdRateAndTermsArray = data.annualPercentageYieldDetails.termBasedAnnualPercentageYield; 109 | this.disclosures = data.disclosures; 110 | } 111 | }, 112 | error => {this.errorMessage = error}); 113 | } 114 | 115 | onSliderToggle(jointAccount: boolean){ 116 | this.jointAccount=jointAccount; 117 | if(jointAccount){ 118 | this.addApplicant(); 119 | }else{ 120 | this.removeApplicant(); 121 | } 122 | } 123 | 124 | addApplicant(){ 125 | if(this.depositApplicationModel.applicants.length == 1){ 126 | let applicant2: ApplicantModel = new ApplicantModel(); 127 | applicant2.applicantRole = "Secondary"; 128 | this.depositApplicationModel.applicants.push(applicant2); 129 | this.fundOwnershipArray = ["primary","secondary","both"]; 130 | } 131 | } 132 | removeApplicant(){ 133 | if(this.depositApplicationModel.applicants.length == 2){ 134 | this.depositApplicationModel.applicants.splice(1,1); 135 | this.fundOwnershipArray = ["primary"]; 136 | this.depositApplicationModel.fundingDetails.externalAccountDetails.accountOwnership = "primary"; 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /public/app/views/summary/summary.component.html: -------------------------------------------------------------------------------- 1 | 15 |
16 |
17 |
18 |

Welcome aboard.

19 | Here's your new account information: 20 |
21 |
22 |
23 | 24 |
25 |
26 |

Routing Number

27 |

{{ routingNumber }}

28 |
29 |
30 |

Account Number

31 | 32 |
33 |
34 |
35 |
36 |
37 |

What's next?

38 |
39 |

Confirm your other account

40 |

Before you can use your money, we need you to verify your other bank account. We'll be sending you an email soon with more instructions.

41 |

Check your mail

42 |

We're sending you a letter in the mail with your new 360 Checking® Debit MasterCard. It should arrive in a few business days.

43 |
44 |
45 |
46 |
47 | -------------------------------------------------------------------------------- /public/app/views/summary/summary.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Component, OnInit } from '@angular/core'; 17 | import {DepositApplicationModel} from '../../models/deposit-application-model'; 18 | import { AppService } from '../../app.service'; 19 | import { NgClass } from '@angular/common'; 20 | 21 | @Component({ 22 | selector: 'app-confirm-info', 23 | templateUrl: './summary.component.html' 24 | }) 25 | 26 | export class SummaryComponent { 27 | routingNumber: String; 28 | accountNumber: String; 29 | constructor(private appService: AppService) { 30 | this.routingNumber = appService.bankABANumber; 31 | this.accountNumber = appService.accountNumber; 32 | } 33 | ngOnInit(){ 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /public/components/slide-toggle/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | export { SlideToggleComponent } from './slide-toggle.component'; 17 | -------------------------------------------------------------------------------- /public/components/slide-toggle/slide-toggle.component.html: -------------------------------------------------------------------------------- 1 | 15 |
16 | 20 | 21 | 22 | 23 | 24 | 28 |
29 | -------------------------------------------------------------------------------- /public/components/slide-toggle/slide-toggle.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core'; 17 | import { AppService } from '../../app/app.service'; 18 | 19 | @Component({ 20 | selector: 'app-slide-toggle', 21 | templateUrl: 'slide-toggle.component.html' 22 | }) 23 | export class SlideToggleComponent implements OnInit { 24 | leftRight: number; 25 | slideClicked: number; 26 | isActiveIconLeft: boolean; 27 | leftText:string = "Individual Account"; 28 | leftTextShort:string = "Single"; 29 | rightText:string = "Joint Account"; 30 | rightTextShort:string = "Joint"; 31 | jointAccount: boolean; 32 | @Output() onSliderToggle = new EventEmitter(); 33 | 34 | constructor(private appService: AppService) { 35 | this.jointAccount = appService.jointAccount; 36 | } 37 | 38 | ngOnInit() { 39 | this.toggleClick(this.jointAccount?1:0); 40 | } 41 | 42 | toggleClick(slideClicked: number) { 43 | // Left is 0, right is 1 44 | this.leftRight = slideClicked === 0 ? 0 : 1; 45 | if(slideClicked==1){ 46 | this.jointAccount=true; 47 | this.isActiveIconLeft = false; 48 | }else{ 49 | this.jointAccount=false; 50 | this.isActiveIconLeft = true; 51 | } 52 | this.onSliderToggle.emit(this.jointAccount); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /public/custom-typings.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | /* 17 | * Custom Type Definitions 18 | * When including 3rd party modules you also need to include the type definition for the module 19 | * if they don't provide one within the module. You can try to install it with typings 20 | 21 | typings install node --save 22 | 23 | * If you can't find the type definition in the registry we can make an ambient definition in 24 | * this file for now. For example 25 | 26 | declare module "my-module" { 27 | export function doesSomething(value: string): string; 28 | } 29 | 30 | * 31 | * If you're prototying and you will fix the types later you can also declare it as type any 32 | * 33 | 34 | declare var assert: any; 35 | 36 | * 37 | * If you're importing a module that uses Node.js modules which are CommonJS you need to import as 38 | * 39 | 40 | import * as _ from 'lodash' 41 | 42 | * You can include your type definitions in this file until you create one for the typings registry 43 | * see https://github.com/typings/registry 44 | * 45 | */ 46 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Capital One - Apply 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Loading... 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /public/main.browser.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 17 | import {AppModule} from './app/app.module'; 18 | 19 | platformBrowserDynamic().bootstrapModule(AppModule) 20 | .catch(err => console.error(err)); 21 | -------------------------------------------------------------------------------- /public/polyfills.browser.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | // Polyfills 17 | 18 | import 'ie-shim'; // Internet Explorer 9 support 19 | 20 | // import 'core-js/es6'; 21 | // Added parts of es6 which are necessary for your project or your browser support requirements. 22 | import 'core-js/es6/symbol'; 23 | import 'core-js/es6/object'; 24 | import 'core-js/es6/function'; 25 | import 'core-js/es6/parse-int'; 26 | import 'core-js/es6/parse-float'; 27 | import 'core-js/es6/number'; 28 | import 'core-js/es6/math'; 29 | import 'core-js/es6/string'; 30 | import 'core-js/es6/date'; 31 | import 'core-js/es6/array'; 32 | import 'core-js/es6/regexp'; 33 | import 'core-js/es6/map'; 34 | import 'core-js/es6/set'; 35 | import 'core-js/es6/weak-map'; 36 | import 'core-js/es6/weak-set'; 37 | import 'core-js/es6/typed'; 38 | import 'core-js/es6/reflect'; 39 | // see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709 40 | // import 'core-js/es6/promise'; 41 | 42 | import 'core-js/es7/reflect'; 43 | import 'zone.js/dist/zone'; 44 | import 'zone.js/dist/long-stack-trace-zone'; 45 | -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/CapitalOneIcons-Regular.eot -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/CapitalOneIcons-Regular.otf -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/CapitalOneIcons-Regular.ttf -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/CapitalOneIcons-Regular.woff -------------------------------------------------------------------------------- /public/styles/fonts/360icons/CapitalOneIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/CapitalOneIcons-Regular.woff2 -------------------------------------------------------------------------------- /public/styles/fonts/360icons/icons-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/360icons/icons-key.png -------------------------------------------------------------------------------- /public/styles/fonts/ui-icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/ui-icons.eot -------------------------------------------------------------------------------- /public/styles/fonts/ui-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/ui-icons.ttf -------------------------------------------------------------------------------- /public/styles/fonts/ui-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/ui-icons.woff -------------------------------------------------------------------------------- /public/styles/fonts/ui-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/fonts/ui-icons.woff2 -------------------------------------------------------------------------------- /public/styles/images/circle-dollar-fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /public/styles/images/circle-mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/circle-mail.png -------------------------------------------------------------------------------- /public/styles/images/circle-mail.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 12 | 13 | 14 | 15 | 19 | 21 | 23 | 25 | 27 | 29 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /public/styles/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/favicon.ico -------------------------------------------------------------------------------- /public/styles/images/oao-sprite-360-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/oao-sprite-360-1x.png -------------------------------------------------------------------------------- /public/styles/images/oao-sprite-360-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/oao-sprite-360-2x.png -------------------------------------------------------------------------------- /public/styles/images/oao_streamline_sprite_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/oao_streamline_sprite_1x.png -------------------------------------------------------------------------------- /public/styles/images/oao_streamline_sprite_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/oao_streamline_sprite_2x.png -------------------------------------------------------------------------------- /public/styles/images/text-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/capitalone/BankAccountStarter-API-reference-app/ca8ff2e2527bd1c77ea01c190389ea52ad5b8774/public/styles/images/text-select.png -------------------------------------------------------------------------------- /public/vendor.browser.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | // Vendors 17 | 18 | // Angular 2 19 | import '@angular/platform-browser-dynamic'; 20 | import '@angular/platform-browser'; 21 | import '@angular/core'; 22 | import '@angular/http'; 23 | import '@angular/router'; 24 | 25 | 26 | // RxJS 5 27 | // import 'rxjs/Rx'; 28 | 29 | 30 | // For vendors for example jQuery, Lodash, angular2-jwt import them here 31 | // Also see src/typings.d.ts as you also need to run `typings install x` where `x` is your module 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "outDir": "dist", 6 | "rootDir": ".", 7 | "sourceMap": true, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "moduleResolution": "node" 11 | }, 12 | "exclude": [ 13 | "node_modules" 14 | ], 15 | "awesomeTypescriptLoaderOptions": { 16 | "useWebpackText": true 17 | }, 18 | "compileOnSave": false, 19 | "buildOnSave": false, 20 | "atom": { "rewriteTsconfig": false } 21 | } 22 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BankAccountStarter-API-reference-app", 3 | "version": false, 4 | "dependencies": {}, 5 | "globalDependencies": { 6 | "core-js": "registry:dt/core-js#0.0.0+20160914114559", 7 | "node": "registry:dt/node#6.0.0+20160919063032" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Capital One Services, LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and limitations under the License. 14 | */ 15 | 16 | var webpack = require('webpack'); 17 | var path = require('path'); 18 | var ExtractTextPlugin = require("extract-text-webpack-plugin"); 19 | 20 | // Webpack Config 21 | var webpackConfig = { 22 | entry: { 23 | 'polyfills': './public/polyfills.browser.ts', 24 | 'vendor': './public/vendor.browser.ts', 25 | 'main': './public/main.browser.ts' 26 | }, 27 | output: { 28 | path: './public', 29 | }, 30 | 31 | plugins: [ 32 | new webpack.optimize.OccurenceOrderPlugin(true), 33 | new webpack.optimize.CommonsChunkPlugin({ name: ['main', 'vendor', 'polyfills'], minChunks: Infinity }) 34 | ], 35 | 36 | module: { 37 | loaders: [ 38 | // .ts files for TypeScript 39 | { test: /\.ts$/, loaders: ['awesome-typescript-loader', 'angular2-template-loader'] }, 40 | { test: /\.html$/, loader: 'raw-loader' } 41 | ] 42 | } 43 | }; 44 | 45 | 46 | // Our Webpack Defaults 47 | var defaultConfig = { 48 | devtool: 'cheap-module-source-map', 49 | cache: true, 50 | debug: true, 51 | output: { 52 | filename: '[name].bundle.js', 53 | sourceMapFilename: '[name].map', 54 | chunkFilename: '[id].chunk.js' 55 | }, 56 | 57 | resolve: { 58 | root: [ path.join(__dirname, 'public') ], 59 | extensions: ['', '.ts', '.js', '.scss'] 60 | }, 61 | 62 | devServer: { 63 | historyApiFallback: true, 64 | watchOptions: { aggregateTimeout: 300, poll: 1000 } 65 | }, 66 | 67 | node: { 68 | global: 1, 69 | crypto: 'empty', 70 | module: 0, 71 | Buffer: 0, 72 | clearImmediate: 0, 73 | setImmediate: 0 74 | } 75 | }; 76 | 77 | var webpackMerge = require('webpack-merge'); 78 | module.exports = webpackMerge(defaultConfig, webpackConfig); 79 | --------------------------------------------------------------------------------