Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/clean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
ALLOW_LIST = [
".git",
".github",
".gitignore",
".npmignore",
".openapi-generator-ignore",
"CHANGELOG.md",
"LICENSE",
"MIGRATION.md",
"README.md",
"node_modules",
"openapi",
"openapitools.json",
"tmp"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ jobs:
run: echo "::set-output name=version::$(ruby .github/version.rb ${{ github.event.inputs.version_level }})"
- name: Clean repo
run: ruby .github/clean.rb
- name: Install openapi-generator-cli
- name: Install openapi-generator-cli and Generate SDK
run: |
npm install @openapitools/openapi-generator-cli -g
- run: |
openapi-generator-cli generate \
-i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api.yml \
-g typescript-axios \
-c ./openapi/config.yml \
-t ./openapi/templates
-t ./openapi/templates \
-o ./latest
- name: Copy documentation to latest
run: |
cp LICENSE ./latest/LICENSE
cp CHANGELOG.md ./latest/CHANGELOG.md
cp MIGRATION.md ./latest/MIGRATION.md
- name: Create branch
run: git checkout -b "openapi-generator-${{ steps.bump_version.outputs.version }}"
- name: Create commit
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/generate_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ jobs:
-i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api.yml \
-g typescript-axios \
-c ./openapi/config.yml \
-t ./openapi/templates
-t ./openapi/templates \
-o ./latest
- name: Copy documentation to latest
run: |
cp LICENSE ./latest/LICENSE
cp CHANGELOG.md ./latest/CHANGELOG.md
cp MIGRATION.md ./latest/MIGRATION.md
- name: Checkout master
run: git checkout master
- name: Create commit
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/on-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,8 @@ on:
push:
branches: [master]
paths:
# Root-level SDK files (current structure)
# Only trigger publish/release when SDK code changes
- 'api.ts'
- 'base.ts'
- 'common.ts'
- 'configuration.ts'
- 'index.ts'
- 'package.json'
- 'tsconfig.json'
- 'tsconfig.esm.json'
- 'dist/**'
- '.openapi-generator/**'
# Latest version SDK files
- 'latest/**'

jobs:
Publish:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ jobs:
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm publish
- name: Install and Publish
working-directory: ./latest
run: |
npm install
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
- name: Slack notification
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ruby-version: 3.1
- name: Read version
id: read_version
run: echo "::set-output name=version::$(ruby .github/version.rb)"
run: echo "::set-output name=version::$(jq -r '.version' ./latest/package.json)"
- name: Create tag and release
run: |
gh release create "v${{ steps.read_version.outputs.version }}"
Expand Down
1 change: 1 addition & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
git_push.sh
.gitignore
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 1/7/2026

### Changed
- **Versioning Correction:** Re-released as v2.0.0 to properly indicate breaking changes that were inadvertently introduced in v1.10.1
- No code changes from v1.12.1 - this is a versioning correction to follow semantic versioning
- Versions v1.10.1 through v1.12.1 are now deprecated on npm in favor of this properly versioned v2.0.0 release

### ⚠️ BREAKING CHANGES (from v1.10.0)

**API Class Restructure:** The unified `MxPlatformApi` class has been replaced with granular, domain-specific API classes (e.g., `UsersApi`, `MembersApi`, `AccountsApi`) to better align with the OpenAPI specification structure. This change improves code organization and maintainability but requires migration of existing code.

**Note:** This breaking change was originally introduced in v1.10.1 but should have been released as v2.0.0. If you are currently using v1.10.1 through v1.12.1, the code is functionally identical to v2.0.0.

**See [MIGRATION.md](MIGRATION.md) for detailed upgrade instructions.**

### Changed
- Restructured API classes from single `MxPlatformApi` to domain-specific classes

## [1.12.1] - 11/25/2025

### Fixed
- Updated package template (`package.mustache`) to fix recurring dependency regression
- axios: ^0.21.4 → ^1.6.8 (fixes CVE GHSA-wf5p-g6vw-rhxx)
- typescript: ^3.6.4 → ^5.4.5
- @types/node: ^12.11.5 → ^20.12.7
- Added automated validation workflow to prevent template/package.json drift

### ⚠️ DEPRECATED
This version contains breaking API changes that should have been released as v2.0.0. Please upgrade to v2.0.0 (code is functionally identical, just properly versioned).

## [1.12.0] and earlier (1.10.1 - 1.12.0) - Various dates

### ⚠️ DEPRECATED
These versions (v1.10.1 through v1.12.0) contain the breaking API restructure but were incorrectly published as minor/patch releases instead of a major version. They have been deprecated on npm in favor of v2.0.0.

**If you are on any of these versions:** Please upgrade to v2.0.0.

## [1.10.0] - 11/5/2025

### Note
- Last stable version with unified `MxPlatformApi` class
- Upgrade from this version to v2.0.0 requires code changes (see [MIGRATION.md](MIGRATION.md))

---

**Note:** This CHANGELOG was created retroactively. For detailed version history prior to v2.0.0, please refer to the [commit history](https://github.com/mxenabled/mx-platform-node/commits/master).
82 changes: 82 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Migration Guide

## Upgrading to v2.0.0 from v1.10.0 or earlier

### Breaking Change: API Class Restructure

**Important:** Starting with version 2.0.0 (originally introduced in v1.10.1, now properly versioned), the unified `MxPlatformApi` class has been replaced with domain-specific API classes. If you're upgrading from v1.10.0 or earlier, you'll need to update your imports and API instantiation.

**Note:** Versions v1.10.1 through v1.12.1 are deprecated. If you're on any of these versions, please upgrade to v2.0.0 (functionally identical to v1.12.1, just properly versioned).

### What Changed

The library now provides granular API classes organized by domain (Users, Members, Accounts, Transactions, etc.) instead of a single `MxPlatformApi` class. This aligns with the OpenAPI specification structure and provides better code organization.

### How to Migrate

**Before (v1.10.0 and earlier):**
```javascript
import { Configuration, MxPlatformApi } from 'mx-platform-node';

const client = new MxPlatformApi(configuration);
await client.createUser(requestBody);
await client.listMembers(userGuid);
await client.listAccounts(userGuid);
```

**After (v2.0.0+):**
```javascript
import { Configuration, UsersApi, MembersApi, AccountsApi } from 'mx-platform-node';

const usersApi = new UsersApi(configuration);
const membersApi = new MembersApi(configuration);
const accountsApi = new AccountsApi(configuration);

await usersApi.createUser(requestBody);
await membersApi.listMembers(userGuid);
await accountsApi.listAccounts(userGuid);
```

### Available API Classes

The new structure includes the following API classes:

- `AccountsApi` - Account operations
- `AuthorizationApi` - Authorization operations
- `BudgetsApi` - Budget operations
- `CategoriesApi` - Category operations
- `GoalsApi` - Goal operations
- `InsightsApi` - Insight operations
- `InstitutionsApi` - Institution operations
- `InvestmentHoldingsApi` - Investment holding operations
- `ManagedDataApi` - Managed data operations
- `MembersApi` - Member operations
- `MerchantsApi` - Merchant operations
- `MicrodepositsApi` - Microdeposit operations
- `MonthlyCashFlowProfileApi` - Monthly cash flow profile operations
- `NotificationsApi` - Notification operations
- `ProcessorTokenApi` - Processor token operations
- `RewardsApi` - Rewards operations
- `SpendingPlanApi` - Spending plan operations
- `StatementsApi` - Statement operations
- `TaggingsApi` - Tagging operations
- `TagsApi` - Tag operations
- `TransactionRulesApi` - Transaction rule operations
- `TransactionsApi` - Transaction operations
- `UsersApi` - User operations
- `VerifiableCredentialsApi` - Verifiable credential operations
- `WidgetsApi` - Widget operations

For the complete list of available methods, please refer to the [API documentation](https://docs.mx.com/api).

### Migration Checklist

1. **Update your imports**: Replace `MxPlatformApi` with the specific API classes you need
2. **Update instantiation**: Create separate instances for each API class instead of a single client
3. **Update method calls**: Call methods on the appropriate API class instance
4. **Test thoroughly**: Verify all API calls work as expected with the new structure
5. **Update documentation**: If you have internal docs referencing the old API, update them

### Need Help?

If you encounter any issues during migration, please [open an issue](https://github.com/mxenabled/mx-platform-node/issues) on GitHub.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ In order to make requests, you will need to [sign up](https://dashboard.mx.com/s
Please follow the [installation](#installation) procedure and then run the following code to create your first User:

```javascript
import { Configuration, MxPlatformApi } from 'mx-platform-node';
import { Configuration, UsersApi } from 'mx-platform-node';

const configuration = new Configuration({
// Configure with your Client ID/API Key from https://dashboard.mx.com
Expand All @@ -57,19 +57,23 @@ const configuration = new Configuration({
}
});

const client = new MxPlatformApi(configuration);
const usersApi = new UsersApi(configuration);

const requestBody = {
user: {
metadata: 'Creating a user!'
}
};

const response = await client.createUser(requestBody);
const response = await usersApi.createUser(requestBody);

console.log(response.data);
```

## Upgrading from v1.x?

> **⚠️ Breaking Changes in v2.0.0:** If you're upgrading from v1.10.0 or earlier, the API structure has changed significantly. See the [Migration Guide](MIGRATION.md) for detailed instructions on updating your code.

## Development

This project was generated by the [OpenAPI Generator](https://openapi-generator.tech). To generate this library, verify you have the latest version of the `openapi-generator-cli` found [here.](https://github.com/OpenAPITools/openapi-generator#17---npm)
Expand Down
4 changes: 4 additions & 0 deletions latest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
File renamed without changes.
23 changes: 23 additions & 0 deletions latest/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
2 changes: 2 additions & 0 deletions .openapi-generator/FILES → latest/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.gitignore
.npmignore
.openapi-generator-ignore
README.md
api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
package.json
tsconfig.esm.json
Expand Down
File renamed without changes.
53 changes: 53 additions & 0 deletions latest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 1/7/2026

### Changed
- **Versioning Correction:** Re-released as v2.0.0 to properly indicate breaking changes that were inadvertently introduced in v1.10.1
- No code changes from v1.12.1 - this is a versioning correction to follow semantic versioning
- Versions v1.10.1 through v1.12.1 are now deprecated on npm in favor of this properly versioned v2.0.0 release

### ⚠️ BREAKING CHANGES (from v1.10.0)

**API Class Restructure:** The unified `MxPlatformApi` class has been replaced with granular, domain-specific API classes (e.g., `UsersApi`, `MembersApi`, `AccountsApi`) to better align with the OpenAPI specification structure. This change improves code organization and maintainability but requires migration of existing code.

**Note:** This breaking change was originally introduced in v1.10.1 but should have been released as v2.0.0. If you are currently using v1.10.1 through v1.12.1, the code is functionally identical to v2.0.0.

**See [MIGRATION.md](MIGRATION.md) for detailed upgrade instructions.**

### Changed
- Restructured API classes from single `MxPlatformApi` to domain-specific classes

## [1.12.1] - 11/25/2025

### Fixed
- Updated package template (`package.mustache`) to fix recurring dependency regression
- axios: ^0.21.4 → ^1.6.8 (fixes CVE GHSA-wf5p-g6vw-rhxx)
- typescript: ^3.6.4 → ^5.4.5
- @types/node: ^12.11.5 → ^20.12.7
- Added automated validation workflow to prevent template/package.json drift

### ⚠️ DEPRECATED
This version contains breaking API changes that should have been released as v2.0.0. Please upgrade to v2.0.0 (code is functionally identical, just properly versioned).

## [1.12.0] and earlier (1.10.1 - 1.12.0) - Various dates

### ⚠️ DEPRECATED
These versions (v1.10.1 through v1.12.0) contain the breaking API restructure but were incorrectly published as minor/patch releases instead of a major version. They have been deprecated on npm in favor of v2.0.0.

**If you are on any of these versions:** Please upgrade to v2.0.0.

## [1.10.0] - 11/5/2025

### Note
- Last stable version with unified `MxPlatformApi` class
- Upgrade from this version to v2.0.0 requires code changes (see [MIGRATION.md](MIGRATION.md))

---

**Note:** This CHANGELOG was created retroactively. For detailed version history prior to v2.0.0, please refer to the [commit history](https://github.com/mxenabled/mx-platform-node/commits/master).
21 changes: 21 additions & 0 deletions latest/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 MX Technologies Inc.

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.
Loading