version 1

the reminder not showing content on the card at dashboard view and the quizes are hardcoded must move to the db make api's for it
This commit is contained in:
Mann Patel
2025-02-16 00:05:12 -07:00
parent c1728153d2
commit 807dd273fd
1130 changed files with 306733 additions and 0 deletions

14
backend/node_modules/plaid/.circleci/config.yml generated vendored Normal file
View File

@@ -0,0 +1,14 @@
version: 2
jobs:
build:
machine:
image: ubuntu-2204:edge
steps:
- checkout
- run:
name: Build Docker image for running node tests
command: docker build -t plaid-node .
- run:
name: Run node tests in Docker
command: docker run --rm -e CLIENT_ID=$CLIENT_ID -e SECRET=$SECRET plaid-node

2
backend/node_modules/plaid/.dockerignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules
npm-debug.log

89
backend/node_modules/plaid/.eslintrc.json generated vendored Normal file
View File

@@ -0,0 +1,89 @@
{
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"no-empty": [
2,
{
"allowEmptyCatch": true
}
],
"no-implicit-coercion": [
2,
{
"boolean": true,
"string": true,
"number": true
}
],
"indent": [2, 2],
"brace-style": [
2,
"1tbs",
{
"allowSingleLine": true
}
],
"no-mixed-spaces-and-tabs": 2,
"no-multi-str": 2,
"key-spacing": [
2,
{
"beforeColon": false,
"afterColon": true
}
],
"space-unary-ops": [
2,
{
"words": false,
"nonwords": false
}
],
"space-before-function-paren": [2, "never"],
"array-bracket-spacing": [
2,
"never",
{
"singleValue": false
}
],
"space-in-parens": [2, "never"],
"no-trailing-spaces": 2,
"yoda": [2, "never"],
"max-len": [2, 79],
"comma-style": [2, "last"],
"curly": [2, "all"],
"dot-notation": 2,
"eol-last": 2,
"wrap-iife": 2,
"space-infix-ops": 2,
"keyword-spacing": [
2,
{
"overrides": {
"else": {
"before": true
},
"catch": {
"before": true
},
"finally": {
"before": true
}
}
}
],
"spaced-comment": [2, "always"],
"space-before-blocks": [2, "always"],
"linebreak-style": [2, "unix"],
"quotes": [
2,
"single",
{
"avoidEscape": true
}
]
}
}

View File

@@ -0,0 +1,21 @@
name: Auto Assign to CLIB Project
on:
issues:
types: [opened]
pull_request:
types: [opened]
env:
MY_GITHUB_TOKEN: ${{ secrets.CLIB_AUTOMATION_TOKEN }}
jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign NEW issues and NEW pull requests to project 1
uses: srggrs/assign-one-project-github-action@1.2.0
if: github.event.action == 'opened'
with:
project: 'https://github.com/orgs/plaid/projects/1'
column_name: 'Needs Investigation'

1
backend/node_modules/plaid/.nvmrc generated vendored Normal file
View File

@@ -0,0 +1 @@
v15.8.0

7
backend/node_modules/plaid/.openapi-generator-ignore generated vendored Normal file
View File

@@ -0,0 +1,7 @@
.gitignore
.npmignore
README.md
git_push.sh
package.json
package-lock.json
tsconfig.json

5
backend/node_modules/plaid/.openapi-generator/FILES generated vendored Normal file
View File

@@ -0,0 +1,5 @@
api.ts
base.ts
common.ts
configuration.ts
index.ts

View File

@@ -0,0 +1 @@
5.1.1

7
backend/node_modules/plaid/.prettierrc generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"bracketSpacing": true,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}

4507
backend/node_modules/plaid/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

25
backend/node_modules/plaid/CONTRIBUTING.md generated vendored Executable file
View File

@@ -0,0 +1,25 @@
# Contributing
Instructions for contributing to [plaid-node][1]. A node.js client library for the [Plaid API][2]. This library is fully generated from the [Plaid OpenAPI spec](3).
This library cannot directly accept PRs from the public as it is generated from internal Plaid sources on the internal Plaid Github instance and any changes made directly to this repo will be overwritten. If you submit a PR and it is accepted, a member of Plaid engineering will copy and paste your change into the upstream, internal version of this repo rather than merging your PR.
Plaid employees should make any changes on the internal Plaid GitHub and not on the public repo.
## Setup
If you find an issue, please investigate whether it is a type problem with [OpenAPI](3) or a problem with the [typescript-axios](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/typescript-axios.md) generator. Then open an issue and Plaid will investigate further.
## Running Tests
1. To build the docker image for the client tests, run `docker build -t plaid-node .`.
2. Go to the [Plaid Dashboard](https://dashboard.plaid.com/) and copy and paste your `client_id` and sandbox `secret` into the following command.
3. Run `docker run --rm -e CLIENT_ID=$CLIENT_ID -e SECRET=$SECRET plaid-node`.
If you wish to run a single test, edit the `Makefile` and rebuild the docker image using the command from step 1.
Code coverage information is written to `/coverage`.
[1]: https://github.com/plaid/plaid-node
[2]: https://plaid.com
[3]: https://github.com/plaid/plaid-openapi

12
backend/node_modules/plaid/Dockerfile generated vendored Normal file
View File

@@ -0,0 +1,12 @@
# Note: This image is also built in CircleCI, so limit references to internal repositories.
FROM node:15
# Create app directory
WORKDIR /usr/src/app
# Copy app to directory
COPY . /usr/src/app
RUN npm install
CMD ["make", "test"]

21
backend/node_modules/plaid/LICENSE generated vendored Executable file
View File

@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2021 Plaid Inc. <support@plaid.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

467
backend/node_modules/plaid/README.md generated vendored Executable file
View File

@@ -0,0 +1,467 @@
# plaid-node [![npm version](https://badge.fury.io/js/plaid.svg)](http://badge.fury.io/js/plaid)
The official Node.js client library for the [Plaid API][1].
## Table of Contents
- [Installation](#install)
- [Versioning](#versioning)
- [Getting started](#getting-started)
- [Error Handling](#error-handling)
- [Examples](#examples)
- [Promise Support](#promise-support)
- [Migration Guide](#migration-guide)
- [Support](#support)
- [Contributing](#contributing)
- [License](#license)
## Install
```console
$ npm install plaid
```
## Versioning
This release only supports the latest Plaid API version, `2020-09-14`, and is generated from our [OpenAPI schema](https://github.com/plaid/plaid-openapi).
For information about what has changed between versions and how to update your integration, head to the [API upgrade guide][api-upgrades].
The plaid-node client library is typically updated on a monthly basis. The canonical source for the latest version number is the [client library changelog](https://github.com/plaid/plaid-node/blob/master/CHANGELOG.md). New versions are published as [GitHub tags](https://github.com/plaid/plaid-node/tags), not as Releases. New versions are also published on [npm](https://www.npmjs.com/package/plaid). Plaid uses semantic versioning to version the client libraries, with potentially breaking changes being indicated by a major version bump.
All users are strongly recommended to use a recent version of the library, as older versions do not contain support for new endpoints and fields. For more details, see the [Migration Guide](#migration-guide).
## Getting started
Most endpoints require a valid `client_id` and `secret` as authentication. Attach them via the configuration.
```typescript
import { Configuration, PlaidApi, PlaidEnvironments } from 'plaid';
const configuration = new Configuration({
basePath: PlaidEnvironments.sandbox,
baseOptions: {
headers: {
'PLAID-CLIENT-ID': CLIENT_ID,
'PLAID-SECRET': SECRET,
},
},
});
```
The `PlaidEnvironments` parameter dictates which Plaid API environment you will access. Values are:
- `PlaidEnvironments.production` - production use and live data testing, creates `Item`s on https://production.plaid.com
- `PlaidEnvironments.sandbox` - quickly build out your integration with stateful test data, creates `Item`s on https://sandbox.plaid.com
The `baseOptions` field allows for clients to override the default options used to make requests. e.g.
```typescript
const configuration = new Configuration({
basePath: PlaidEnvironments.sandbox,
baseOptions: {
// Axios request options
},
});
```
## Dates
Dates and datetimes in requests and responses are represented as strings.
Time zone information is required for request fields that accept datetimes. Failing to include time zone information will result in an error. See the following examples for guidance on syntax.
If the API reference documentation for a field specifies `format: date`, use a string formatted as `'YYYY-MM-DD'`:
```js
const start_date = '2022-05-05';
```
If the API reference documentation for a field specifies `format: date-time`, use a string formatted as `'YYYY-MM-DDTHH:mm:ssZ'`:
```js
const start_date = '2019-12-12T22:35:49Z';
```
## Error Handling
All errors can now be caught using `try/catch` with `async/await` or through promise chaining.
```typescript
try {
await plaidClient.transactionsSync(request);
} catch (error) {
const err = error.response.data;
}
// or
plaidClient
.transactionsSync(request)
.then((data) => {
console.log(data);
})
.catch((e) => {
console.log(e.response.data);
});
```
Note that the full error object includes the API configuration object, including the request headers, which in turn include the API key and secret. To avoid logging your API secret, log only `error.data` and/or avoid logging the full `error.config.headers` object.
## Examples
For more examples, see the [test suites](https://github.com/plaid/plaid-node/tree/master/test), [Quickstart](https://github.com/plaid/quickstart/tree/master/node), or [API Reference documentation](https://plaid.com/docs/api/).
Exchange a `public_token` from [Plaid Link][6] for a Plaid `access_token` and then
retrieve account data:
```typescript
const response = await plaidClient.itemPublicTokenExchange({ public_token });
const access_token = response.data.access_token;
const accounts_response = await plaidClient.accountsGet({ access_token });
const accounts = accounts_response.data.accounts;
```
Retrieve the last 100 transactions for a transactions user (new, recommended method):
```typescript
const response = await plaidClient.transactionsSync({
access_token
});
const transactions = response.data.transactions;
);
```
Retrieve the transactions for a transactions user for the last thirty days (using the older method):
```typescript
const now = moment();
const today = now.format('YYYY-MM-DD');
const thirtyDaysAgo = now.subtract(30, 'days').format('YYYY-MM-DD');
const response = await plaidClient.transactionsGet({
access_token,
start_date: thirtyDaysAgo,
end_date: today,
});
const transactions = response.data.transactions;
console.log(
`You have ${transactions.length} transactions from the last thirty days.`,
);
```
Get accounts for a particular `Item`:
```typescript
const response = await plaidClient.accountsGet({
access_token,
options: {
account_ids: ['123456790'],
},
});
console.log(response.data.accounts);
```
Download Asset Report PDF:
```typescript
const pdfResp = await plaidClient.assetReportPdfGet(
{
asset_report_token: assetReportToken,
},
{
responseType: 'arraybuffer',
},
);
fs.writeFileSync('asset_report.pdf', pdfResp.data);
```
## Promise Support
Every method returns a promise, so you can use `async/await` or promise chaining.
API methods that return either a success or an error can be used with the
usual `then/catch` paradigm, e.g.
```typescript
plaidPromise
.then((successResponse) => {
// ...
})
.catch((err) => {
// ...
});
```
For example:
```typescript
import * as bodyParser from 'body-parser';
import * as express from 'express';
import { Configuration, PlaidApi, PlaidEnvironments } from 'plaid';
const configuration = new Configuration({
basePath: PlaidEnvironments.sandbox,
baseOptions: {
headers: {
'PLAID-CLIENT-ID': CLIENT_ID,
'PLAID-SECRET': SECRET,
'Plaid-Version': '2020-09-14',
},
},
});
const plaidClient = new PlaidApi(configuration);
const app = express();
const port = process.env.PORT || 3000;
app.use(
bodyParser.urlencoded({
extended: true,
}),
);
app.use(bodyParser.json());
app.post('/plaid_exchange', (req, res) => {
var public_token = req.body.public_token;
return plaidClient
.itemPublicTokenExchange({ public_token })
.then((tokenResponse) => tokenResponse.access_token)
.then((access_token) => plaidClient.accountsGet({ access_token }))
.then((accountsResponse) => console.log(accountsResponse.data.accounts))
.catch((error) => {
const err = error.response.data;
// Indicates plaid API error
console.error('/exchange token returned an error', {
error_type: err.error_type,
error_code: err.error_code,
error_message: err.error_message,
display_message: err.display_message,
documentation_url: err.documentation_url,
request_id: err.request_id,
});
// Inspect error_type to handle the error in your application
switch (err.error_type) {
case 'INVALID_REQUEST':
// ...
break;
case 'INVALID_INPUT':
// ...
break;
case 'RATE_LIMIT_EXCEEDED':
// ...
break;
case 'API_ERROR':
// ...
break;
case 'ITEM_ERROR':
// ...
break;
default:
// fallthrough
}
res.sendStatus(500);
});
});
app.listen(port, () => {
console.log(`Listening on port ${port}`);
});
```
## Migration guide
### 9.0.0 or later to latest
Migrating from version 9.0.0 or later of the library to a recent version should involve very minor integration changes. Many customers will not need to make changes to their integrations at all. To see a list of all potentially-breaking changes since your current version, see the [client library changelog](https://github.com/plaid/plaid-node/blob/master/CHANGELOG.md) and search for "Breaking changes in this version". Breaking changes are annotated at the top of each major version header.
### Pre-9.0.0 to latest
Version 9.0.0 of the client library was released in August 2021 and represents a major interface change. Any customer migrating from a version prior to 9.0.0 should consult the migration guide below.
This version represents a transition in how we maintain our external client libraries. We are now using an [API spec](https://github.com/plaid/plaid-openapi) written in `OpenAPI 3.0.0` and running our definition file through [OpenAPITool's `typescript-axios` generator](https://github.com/OpenAPITools/openapi-generator). All tests have been rewritten in Typescript.
#### Client initialization
From:
```javascript
const configs = {
clientID: CLIENT_ID,
secret: SECRET,
env: plaid.environments.sandbox,
options: {
version: '2020-09-14',
},
};
new plaid.Client(configs);
```
To:
```typescript
const configuration = new Configuration({
basePath: PlaidEnvironments.sandbox,
baseOptions: {
headers: {
'PLAID-CLIENT-ID': CLIENT_ID,
'PLAID-SECRET': SECRET,
'Plaid-Version': '2020-09-14',
},
},
});
new PlaidApi(configuration);
```
#### Endpoints
All endpoint requests now take a request model, have better Typescript support and the functions have been renamed to move the verb to the end (e.g `getTransactions` is now `transactionsGet`).
Callbacks are no longer supported.
From:
```javascript
pCl.sandboxPublicTokenCreate(
testConstants.INSTITUTION,
testConstants.PRODUCTS,
{},
cb,
);
```
To:
```typescript
const request: SandboxPublicTokenCreateRequest = {
institution_id: TestConstants.INSTITUTION,
initial_products: TestConstants.PRODUCTS as Products[],
options,
};
const response = await plaidClient.sandboxPublicTokenCreate(request);
```
#### Errors
From:
```javascript
pCl.getTransactions(
accessToken,
startDate,
endDate,
{ count: count, offset: offset },
(err, response) => {
if (err) {
if (err.status_code === 400 && err.error_code === 'PRODUCT_NOT_READY') {
setTimeout(() => {
getTransactionsWithRetries(
accessToken,
startDate,
endDate,
count,
offset,
num_retries_remaining - 1,
cb,
);
}, 1000);
} else {
throw new Error('Unexpected error while polling for transactions', err);
}
} else {
cb(null, response);
}
},
);
```
To:
```typescript
plaidClient
.transactionsGet(request)
.then((response) => resolve(response.data))
.catch(() => {
setTimeout(() => {
if (retriesLeft === 1) {
return reject('Ran out of retries while polling for transactions');
}
getTransactionsWithRetries(
plaidClient,
access_token,
start_date,
end_date,
count,
offset,
ms,
retriesLeft - 1,
).then((response) => resolve(response));
}, ms);
});
or use `try/catch`
try {
await plaidClient.transactionsGet(request);
} catch (error) {
const err = error.response.data;
...
}
```
#### Enums
While the API and pre-9.0.0 versions represent enums using strings, 9.0.0 and later allows either strings or Node enums.
Old:
```typescript
products: ['auth', 'transactions'],
```
Current:
```typescript
products: ['auth', 'transactions'],
// or
const { Products } = require("plaid");
products: [Products.Auth, Products.Transactions],
```
## Support
Open an [issue][4]!
## Contributing
Click [here][7]!
## License
[MIT][5]
[1]: https://plaid.com
[2]: https://plaid.com/docs
[3]: https://plaid.com/docs/api/#errors-overview
[4]: https://github.com/plaid/plaid-node/issues/new
[5]: https://github.com/plaid/plaid-node/blob/master/LICENSE
[6]: https://plaid.com/docs/link/
[7]: ./CONTRIBUTING.md
[9]: https://plaid.com/docs/link/stripe
[10]: https://stripe.com/docs/api#create_bank_account_token
[11]: https://blog.plaid.com/improving-our-api/
[13]: https://github.com/plaid/plaid-node-legacy
[api-upgrades]: https://plaid.com/docs/api/versioning/
[14]: https://plaid.com/docs/payment-initiation/

77017
backend/node_modules/plaid/api.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

71
backend/node_modules/plaid/base.ts generated vendored Normal file
View File

@@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
// Some imports not used depending on template conditions
// @ts-ignore
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
export const BASE_PATH = "https://production.plaid.com".replace(/\/+$/, "");
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
};
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {
super(msg);
}
}

138
backend/node_modules/plaid/common.ts generated vendored Normal file
View File

@@ -0,0 +1,138 @@
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { RequiredError, RequestArgs } from "./base";
import { AxiosInstance } from 'axios';
/**
*
* @export
*/
export const DUMMY_BASE_URL = 'https://example.com'
/**
*
* @throws {RequiredError}
* @export
*/
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
if (paramValue === null || paramValue === undefined) {
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
}
}
/**
*
* @export
*/
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? await configuration.apiKey(keyParamName)
: await configuration.apiKey;
object[keyParamName] = localVarApiKeyValue;
}
}
/**
*
* @export
*/
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
}
}
/**
*
* @export
*/
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
object["Authorization"] = "Bearer " + accessToken;
}
}
/**
*
* @export
*/
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
}
}
/**
*
* @export
*/
export const setSearchParams = function (url: URL, ...objects: any[]) {
const searchParams = new URLSearchParams(url.search);
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (const item of object[key]) {
searchParams.append(key, item);
}
} else {
searchParams.set(key, object[key]);
}
}
}
url.search = searchParams.toString();
}
/**
*
* @export
*/
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
const nonString = typeof value !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
}
/**
*
* @export
*/
export const toPathString = function (url: URL) {
return url.pathname + url.search + url.hash
}
/**
*
* @export
*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
return axios.request(axiosRequestArgs);
};
}

119
backend/node_modules/plaid/configuration.ts generated vendored Normal file
View File

@@ -0,0 +1,119 @@
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}
// Edited by Plaid, lines 16-25
interface PlaidEnvironment {
[env: string]: string;
}
export const PlaidEnvironments: PlaidEnvironment = {
production: 'https://production.plaid.com',
sandbox: 'https://sandbox.plaid.com',
};
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
if(!this.baseOptions) this.baseOptions = {};
if(!this.baseOptions.headers) this.baseOptions.headers = {};
this.baseOptions.headers = {
['User-Agent']: `Plaid Node v31.0.0`,
['Plaid-Version']: '2020-09-14',
...this.baseOptions.headers,
}
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}

63461
backend/node_modules/plaid/dist/api.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

24797
backend/node_modules/plaid/dist/api.js generated vendored Normal file

File diff suppressed because one or more lines are too long

55
backend/node_modules/plaid/dist/base.d.ts generated vendored Normal file
View File

@@ -0,0 +1,55 @@
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { AxiosInstance } from 'axios';
export declare const BASE_PATH: string;
/**
*
* @export
*/
export declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export declare class BaseAPI {
protected basePath: string;
protected axios: AxiosInstance;
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}

65
backend/node_modules/plaid/dist/base.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
// Some imports not used depending on template conditions
// @ts-ignore
const axios_1 = __importDefault(require("axios"));
exports.BASE_PATH = "https://production.plaid.com".replace(/\/+$/, "");
/**
*
* @export
*/
exports.COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @class BaseAPI
*/
class BaseAPI {
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
this.basePath = basePath;
this.axios = axios;
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
exports.BaseAPI = BaseAPI;
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
class RequiredError extends Error {
constructor(field, msg) {
super(msg);
this.field = field;
this.name = "RequiredError";
}
}
exports.RequiredError = RequiredError;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL2Jhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9CQUFvQjtBQUNwQixvQkFBb0I7QUFDcEI7Ozs7Ozs7Ozs7R0FVRzs7Ozs7O0FBSUgseURBQXlEO0FBQ3pELGFBQWE7QUFDYixrREFBaUU7QUFFcEQsUUFBQSxTQUFTLEdBQUcsOEJBQThCLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsQ0FBQztBQUU1RTs7O0dBR0c7QUFDVSxRQUFBLGtCQUFrQixHQUFHO0lBQzlCLEdBQUcsRUFBRSxHQUFHO0lBQ1IsR0FBRyxFQUFFLEdBQUc7SUFDUixHQUFHLEVBQUUsSUFBSTtJQUNULEtBQUssRUFBRSxHQUFHO0NBQ2IsQ0FBQztBQVlGOzs7O0dBSUc7QUFDSCxNQUFhLE9BQU87SUFHaEIsWUFBWSxhQUE2QixFQUFZLFdBQW1CLGlCQUFTLEVBQVksUUFBdUIsZUFBVztRQUExRSxhQUFRLEdBQVIsUUFBUSxDQUFvQjtRQUFZLFVBQUssR0FBTCxLQUFLLENBQTZCO1FBQzNILElBQUksYUFBYSxFQUFFO1lBQ2YsSUFBSSxDQUFDLGFBQWEsR0FBRyxhQUFhLENBQUM7WUFDbkMsSUFBSSxDQUFDLFFBQVEsR0FBRyxhQUFhLENBQUMsUUFBUSxJQUFJLElBQUksQ0FBQyxRQUFRLENBQUM7U0FDM0Q7SUFDTCxDQUFDO0NBQ0o7QUFURCwwQkFTQztBQUFBLENBQUM7QUFFRjs7Ozs7R0FLRztBQUNILE1BQWEsYUFBYyxTQUFRLEtBQUs7SUFFcEMsWUFBbUIsS0FBYSxFQUFFLEdBQVk7UUFDMUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBREksVUFBSyxHQUFMLEtBQUssQ0FBUTtRQURoQyxTQUFJLEdBQW9CLGVBQWUsQ0FBQztJQUd4QyxDQUFDO0NBQ0o7QUFMRCxzQ0FLQyIsInNvdXJjZXNDb250ZW50IjpbIi8qIHRzbGludDpkaXNhYmxlICovXG4vKiBlc2xpbnQtZGlzYWJsZSAqL1xuLyoqXG4gKiBUaGUgUGxhaWQgQVBJXG4gKiBUaGUgUGxhaWQgUkVTVCBBUEkuIFBsZWFzZSBzZWUgaHR0cHM6Ly9wbGFpZC5jb20vZG9jcy9hcGkgZm9yIG1vcmUgZGV0YWlscy5cbiAqXG4gKiBUaGUgdmVyc2lvbiBvZiB0aGUgT3BlbkFQSSBkb2N1bWVudDogMjAyMC0wOS0xNF8xLjYxNy4xXG4gKiBcbiAqXG4gKiBOT1RFOiBUaGlzIGNsYXNzIGlzIGF1dG8gZ2VuZXJhdGVkIGJ5IE9wZW5BUEkgR2VuZXJhdG9yIChodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2gpLlxuICogaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoXG4gKiBEbyBub3QgZWRpdCB0aGUgY2xhc3MgbWFudWFsbHkuXG4gKi9cblxuXG5pbXBvcnQgeyBDb25maWd1cmF0aW9uIH0gZnJvbSBcIi4vY29uZmlndXJhdGlvblwiO1xuLy8gU29tZSBpbXBvcnRzIG5vdCB1c2VkIGRlcGVuZGluZyBvbiB0ZW1wbGF0ZSBjb25kaXRpb25zXG4vLyBAdHMtaWdub3JlXG5pbXBvcnQgZ2xvYmFsQXhpb3MsIHsgQXhpb3NQcm9taXNlLCBBeGlvc0luc3RhbmNlIH0gZnJvbSAnYXhpb3MnO1xuXG5leHBvcnQgY29uc3QgQkFTRV9QQVRIID0gXCJodHRwczovL3Byb2R1Y3Rpb24ucGxhaWQuY29tXCIucmVwbGFjZSgvXFwvKyQvLCBcIlwiKTtcblxuLyoqXG4gKlxuICogQGV4cG9ydFxuICovXG5leHBvcnQgY29uc3QgQ09MTEVDVElPTl9GT1JNQVRTID0ge1xuICAgIGNzdjogXCIsXCIsXG4gICAgc3N2OiBcIiBcIixcbiAgICB0c3Y6IFwiXFx0XCIsXG4gICAgcGlwZXM6IFwifFwiLFxufTtcblxuLyoqXG4gKlxuICogQGV4cG9ydFxuICogQGludGVyZmFjZSBSZXF1ZXN0QXJnc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIFJlcXVlc3RBcmdzIHtcbiAgICB1cmw6IHN0cmluZztcbiAgICBvcHRpb25zOiBhbnk7XG59XG5cbi8qKlxuICpcbiAqIEBleHBvcnRcbiAqIEBjbGFzcyBCYXNlQVBJXG4gKi9cbmV4cG9ydCBjbGFzcyBCYXNlQVBJIHtcbiAgICBwcm90ZWN0ZWQgY29uZmlndXJhdGlvbjogQ29uZmlndXJhdGlvbiB8IHVuZGVmaW5lZDtcblxuICAgIGNvbnN0cnVjdG9yKGNvbmZpZ3VyYXRpb24/OiBDb25maWd1cmF0aW9uLCBwcm90ZWN0ZWQgYmFzZVBhdGg6IHN0cmluZyA9IEJBU0VfUEFUSCwgcHJvdGVjdGVkIGF4aW9zOiBBeGlvc0luc3RhbmNlID0gZ2xvYmFsQXhpb3MpIHtcbiAgICAgICAgaWYgKGNvbmZpZ3VyYXRpb24pIHtcbiAgICAgICAgICAgIHRoaXMuY29uZmlndXJhdGlvbiA9IGNvbmZpZ3VyYXRpb247XG4gICAgICAgICAgICB0aGlzLmJhc2VQYXRoID0gY29uZmlndXJhdGlvbi5iYXNlUGF0aCB8fCB0aGlzLmJhc2VQYXRoO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuLyoqXG4gKlxuICogQGV4cG9ydFxuICogQGNsYXNzIFJlcXVpcmVkRXJyb3JcbiAqIEBleHRlbmRzIHtFcnJvcn1cbiAqL1xuZXhwb3J0IGNsYXNzIFJlcXVpcmVkRXJyb3IgZXh0ZW5kcyBFcnJvciB7XG4gICAgbmFtZTogXCJSZXF1aXJlZEVycm9yXCIgPSBcIlJlcXVpcmVkRXJyb3JcIjtcbiAgICBjb25zdHJ1Y3RvcihwdWJsaWMgZmllbGQ6IHN0cmluZywgbXNnPzogc3RyaW5nKSB7XG4gICAgICAgIHN1cGVyKG1zZyk7XG4gICAgfVxufVxuIl19

65
backend/node_modules/plaid/dist/common.d.ts generated vendored Normal file
View File

@@ -0,0 +1,65 @@
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { RequestArgs } from "./base";
import { AxiosInstance } from 'axios';
/**
*
* @export
*/
export declare const DUMMY_BASE_URL = "https://example.com";
/**
*
* @throws {RequiredError}
* @export
*/
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
/**
*
* @export
*/
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration | undefined) => Promise<void>;
/**
*
* @export
*/
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration | undefined) => void;
/**
*
* @export
*/
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration | undefined) => Promise<void>;
/**
*
* @export
*/
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration | undefined) => Promise<void>;
/**
*
* @export
*/
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
/**
*
* @export
*/
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration | undefined) => any;
/**
*
* @export
*/
export declare const toPathString: (url: URL) => string;
/**
*
* @export
*/
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;

153
backend/node_modules/plaid/dist/common.js generated vendored Normal file

File diff suppressed because one or more lines are too long

88
backend/node_modules/plaid/dist/configuration.d.ts generated vendored Normal file
View File

@@ -0,0 +1,88 @@
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}
interface PlaidEnvironment {
[env: string]: string;
}
export declare const PlaidEnvironments: PlaidEnvironment;
export declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}
export {};

52
backend/node_modules/plaid/dist/configuration.js generated vendored Normal file

File diff suppressed because one or more lines are too long

13
backend/node_modules/plaid/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export * from "./api";
export * from "./configuration";

28
backend/node_modules/plaid/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./api"), exports);
__exportStar(require("./configuration"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3BCLG9CQUFvQjtBQUNwQjs7Ozs7Ozs7OztHQVVHOzs7Ozs7Ozs7Ozs7QUFHSCx3Q0FBc0I7QUFDdEIsa0RBQWdDIiwic291cmNlc0NvbnRlbnQiOlsiLyogdHNsaW50OmRpc2FibGUgKi9cbi8qIGVzbGludC1kaXNhYmxlICovXG4vKipcbiAqIFRoZSBQbGFpZCBBUElcbiAqIFRoZSBQbGFpZCBSRVNUIEFQSS4gUGxlYXNlIHNlZSBodHRwczovL3BsYWlkLmNvbS9kb2NzL2FwaSBmb3IgbW9yZSBkZXRhaWxzLlxuICpcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBPcGVuQVBJIGRvY3VtZW50OiAyMDIwLTA5LTE0XzEuNjE3LjFcbiAqIFxuICpcbiAqIE5PVEU6IFRoaXMgY2xhc3MgaXMgYXV0byBnZW5lcmF0ZWQgYnkgT3BlbkFQSSBHZW5lcmF0b3IgKGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaCkuXG4gKiBodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2hcbiAqIERvIG5vdCBlZGl0IHRoZSBjbGFzcyBtYW51YWxseS5cbiAqL1xuXG5cbmV4cG9ydCAqIGZyb20gXCIuL2FwaVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vY29uZmlndXJhdGlvblwiO1xuXG4iXX0=

18
backend/node_modules/plaid/index.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
/* tslint:disable */
/* eslint-disable */
/**
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.617.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export * from "./api";
export * from "./configuration";

42
backend/node_modules/plaid/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "plaid",
"version": "31.0.0",
"description": "A node.js client for the Plaid API",
"keywords": [
"plaid",
"plaid.com"
],
"repository": {
"type": "git",
"url": "git@github.com:plaid/plaid-node.git"
},
"engines": {
"node": ">=10.0.0"
},
"bugs": {
"url": "https://github.com/plaid/plaid-node/issues"
},
"main": "dist/index.js",
"license": "MIT",
"types": "dist/index.d.ts",
"dependencies": {
"axios": "^1.7.4"
},
"publishConfig": {
"registry": "https://registry.npmjs.com"
},
"scripts": {
"build": "tsc --outDir dist/"
},
"devDependencies": {
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.14",
"chai": "^4.2.0",
"expect.js": "0.3.x",
"jshint": "^2.13.6",
"mocha": "^10.2.0",
"ts-node": "^9.1.1",
"typescript": "4.1.3"
}
}

View File

@@ -0,0 +1,109 @@
/* tslint:disable */
/* eslint-disable */
{{>licenseInfo}}
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}
// Edited by Plaid, lines 16-25
interface PlaidEnvironment {
[env: string]: string;
}
export const PlaidEnvironments: PlaidEnvironment = {
production: 'https://production.plaid.com',
sandbox: 'https://sandbox.plaid.com',
};
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
{{! Edited by Plaid, lines 87-93 }}
if(!this.baseOptions) this.baseOptions = {};
if(!this.baseOptions.headers) this.baseOptions.headers = {};
this.baseOptions.headers = {
['User-Agent']: `Plaid Node v{{npmVersion}}`,
['Plaid-Version']: '{{{plaidApiVersion}}}',
...this.baseOptions.headers,
}
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}

View File

@@ -0,0 +1,41 @@
/**
* {{{description}}}
* @export
* @interface {{classname}}
*/
{{! Edited by Plaid, line 8. remove index signature }}
export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
{{#vars}}
/**
* {{{description}}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @memberof {{classname}}
{{#deprecated}}
* @deprecated
{{/deprecated}}
*/
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{/vars}}
}{{#hasEnums}}
{{#vars}}
{{#isEnum}}
/**
* @export
* @enum {string}
*/
export enum {{enumName}} {
{{#allowableValues}}
{{#enumVars}}
{{#enumDescription}}
/**
* {{enumDescription}}
*/
{{/enumDescription}}
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
}
{{/isEnum}}
{{/vars}}
{{/hasEnums}}