Skip to content

Commit

Permalink
Merge pull request #614 from plaid/generated_20240117T212409Z
Browse files Browse the repository at this point in the history
OpenAPI generated code at 2024-01-17T21:24:09Z
  • Loading branch information
jking-plaid authored Jan 17, 2024
2 parents b285d0c + e838177 commit 9970aef
Show file tree
Hide file tree
Showing 18 changed files with 58 additions and 3,454 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
See full changelog for the OpenAPI schema (OAS) [here](https://github.com/plaid/plaid-openapi/blob/master/CHANGELOG.md).

# 19.0.0
- Updating to OAS 2020-09-14_1.485.1

## Breaking changes in this version
- Most usage of index signatures has been removed. This will allow for stricter types and improved type safety for a better developer experience.
- For versions `19.0.0` and beyond, Plaid recommends updating to the latest version of `plaid-node` to access the latest type definitions.
- In most cases, updating to the latest version of `plaid-node` will not require code changes - available fields should be explicitly defined on the provided types.
- When upgrading from `<19.0.0`, there is a small chance that code depending on properties that previously were not explicitly defined on a type may need to be updated. To do so:
- Identify properties that the index signature previously covered.
- Identify uses of these properties in your code.
- Refactor your code. Some possible solutions include:
- No longer using these properties.
- Defining a new type that re-introduces index signatures via type intersection. For example:
```typescript
type ExtendedSandboxPublicTokenCreateResponse = SandboxPublicTokenCreateResponse & { [key: string]: any; }
```
- Using type assertions. For example, if your code previously relied on a string property `foo` of `SandboxPublicTokenCreateResponse`:
```typescript
type ExtendedSandboxPublicTokenCreateResponse = SandboxPublicTokenCreateResponse & { foo: string }

const response = await plaidClient.sandboxPublicTokenCreate(request);

if ((response.data as any).foo != null) {
const { foo } = response.data as ExtendedSandboxPublicTokenCreateResponse;
}
```
- If you are unable to update `plaid-node`, previous versions of `plaid-node` will not have index signatures removed. If you wish to improve type safety, consider using type assertions and defining custom types based on the types available in the currently-used version of `plaid-node` (See the example above for a suggested approach).

## OpenAPI Schema Changes
### 2020-09-14_1.485.1
- Update `legal_name` description in `user` object in `/link/token.create` request

# 18.3.0
- Updating to OAS 2020-09-14_1.485.0

Expand Down
2,690 changes: 2 additions & 2,688 deletions api.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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.485.0
* The version of the OpenAPI document: 2020-09-14_1.485.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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.485.0
* The version of the OpenAPI document: 2020-09-14_1.485.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
4 changes: 2 additions & 2 deletions configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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.485.0
* The version of the OpenAPI document: 2020-09-14_1.485.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -97,7 +97,7 @@ export class Configuration {
if(!this.baseOptions) this.baseOptions = {};
if(!this.baseOptions.headers) this.baseOptions.headers = {};
this.baseOptions.headers = {
['User-Agent']: `Plaid Node v18.3.0`,
['User-Agent']: `Plaid Node v19.0.0`,
['Plaid-Version']: '2020-09-14',
...this.baseOptions.headers,
}
Expand Down
Loading

0 comments on commit 9970aef

Please sign in to comment.