From de6509dd102f3db32bd4ea00986aa21c6dce6241 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Thu, 4 Dec 2025 09:12:55 -0700 Subject: [PATCH 1/9] Create intial CHANGELOG and rev versions --- CHANGELOG.md | 100 ++++++++++++++++++++++++++++++ openapi/config-latest.yml | 2 +- openapi/config-v20111101.yml | 2 +- openapi/config-v20250224.yml | 2 +- openapi/config.yml | 2 +- openapi/templates/README.mustache | 73 +++++++++++++++++++++- package.json | 2 +- 7 files changed, 175 insertions(+), 8 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5d1d271 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,100 @@ +# 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). + +## [Unreleased] + +## [2.0.0] - TBD + +### 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 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. + +#### Migration Required + +**Before (v1.10.0 and earlier):** +```javascript +import { Configuration, MxPlatformApi } from 'mx-platform-node'; + +const client = new MxPlatformApi(configuration); +await client.listMembers(userGuid); +await client.listAccounts(userGuid); +await client.listTransactions(userGuid, accountGuid); +``` + +**After (v1.10.1+):** +```javascript +import { + Configuration, + MembersApi, + AccountsApi, + TransactionsApi +} from 'mx-platform-node'; + +const membersApi = new MembersApi(configuration); +const accountsApi = new AccountsApi(configuration); +const transactionsApi = new TransactionsApi(configuration); + +await membersApi.listMembers(userGuid); +await accountsApi.listAccounts(userGuid); +await transactionsApi.listTransactions(userGuid, accountGuid); +``` + +#### 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 + +### Changed +- Restructured API classes from single `MxPlatformApi` to domain-specific classes + +## [1.12.1] and earlier (1.10.1 - 1.12.1) - Various dates + +### ⚠️ DEPRECATED +These versions (v1.10.1 through v1.12.1) 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 (code is identical to v1.12.1, just properly versioned). + +## [1.10.0] - Various dates + +### Note +- Last stable version with unified `MxPlatformApi` class +- Upgrade from this version to v2.0.0 requires code changes (see migration guide above) + +--- + +**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) and [releases page](https://github.com/mxenabled/mx-platform-node/releases). diff --git a/openapi/config-latest.yml b/openapi/config-latest.yml index 9338ab5..d2b2b24 100644 --- a/openapi/config-latest.yml +++ b/openapi/config-latest.yml @@ -3,5 +3,5 @@ --- generatorName: typescript-axios npmName: mx-platform-node -npmVersion: 1.12.1 +npmVersion: 2.0.0 supportsES6: true diff --git a/openapi/config-v20111101.yml b/openapi/config-v20111101.yml index 9479856..5e3a8dc 100644 --- a/openapi/config-v20111101.yml +++ b/openapi/config-v20111101.yml @@ -1,5 +1,5 @@ --- generatorName: typescript-axios npmName: mx-platform-node-v20111101 -npmVersion: 1.12.1 +npmVersion: 2.0.0 supportsES6: true diff --git a/openapi/config-v20250224.yml b/openapi/config-v20250224.yml index 0602cfe..5a3e7e1 100644 --- a/openapi/config-v20250224.yml +++ b/openapi/config-v20250224.yml @@ -1,5 +1,5 @@ --- generatorName: typescript-axios npmName: mx-platform-node-v20250224 -npmVersion: 2.0.0 +npmVersion: 3.0.0 supportsES6: true diff --git a/openapi/config.yml b/openapi/config.yml index 64b895d..3116f8b 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -1,4 +1,4 @@ --- npmName: mx-platform-node -npmVersion: 1.12.1 +npmVersion: 2.0.0 supportsES6: true diff --git a/openapi/templates/README.mustache b/openapi/templates/README.mustache index d6d1c3a..eb4ccfa 100644 --- a/openapi/templates/README.mustache +++ b/openapi/templates/README.mustache @@ -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 @@ -57,7 +57,7 @@ const configuration = new Configuration({ } }); -const client = new MxPlatformApi(configuration); +const usersApi = new UsersApi(configuration); const requestBody = { user: { @@ -65,11 +65,78 @@ const requestBody = { } }; -const response = await client.createUser(requestBody); +const response = await usersApi.createUser(requestBody); console.log(response.data); ``` +## Migration Guide + +### Breaking Change in v2.0.0 (and v1.10.1-v1.12.1) + +**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 + +- `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). + ## 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) diff --git a/package.json b/package.json index a7b501a..505409c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mx-platform-node", - "version": "1.12.1", + "version": "2.0.0", "description": "A Node library for the MX Platform API.", "author": "MX", "keywords": [ From 3906fb3725bd19a0ad4e67bf5efdc33506ad8ee5 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Tue, 6 Jan 2026 10:45:39 -0700 Subject: [PATCH 2/9] Preserve local node-modules (they're git ignored) --- .github/clean.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/clean.rb b/.github/clean.rb index dacc03d..f96b550 100644 --- a/.github/clean.rb +++ b/.github/clean.rb @@ -5,6 +5,7 @@ ".github", ".openapi-generator-ignore", "LICENSE", + "node_modules", "openapi", "openapitools.json", "tmp" From 722f5913e2f83b25ae14f198f1a373e17b19329d Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 08:45:55 -0700 Subject: [PATCH 3/9] Update ALLOW_LIST to include new docs and ignore files --- .github/clean.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/clean.rb b/.github/clean.rb index f96b550..6a45569 100644 --- a/.github/clean.rb +++ b/.github/clean.rb @@ -3,8 +3,13 @@ ALLOW_LIST = [ ".git", ".github", + ".gitignore", + ".npmignore", ".openapi-generator-ignore", + "CHANGELOG", "LICENSE", + "MIGRATION", + "latest", "node_modules", "openapi", "openapitools.json", From 77105675a0e55a3c99c3b92b6f9b8f23934d14bb Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 08:46:59 -0700 Subject: [PATCH 4/9] Move Migration details to own doc and link --- CHANGELOG.md | 85 +++++++------------------------ MIGRATION.md | 82 +++++++++++++++++++++++++++++ openapi/templates/README.mustache | 67 +----------------------- 3 files changed, 103 insertions(+), 131 deletions(-) create mode 100644 MIGRATION.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d1d271..f6bfdd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,7 @@ 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). -## [Unreleased] - -## [2.0.0] - TBD +## [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 @@ -16,84 +14,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### ⚠️ BREAKING CHANGES (from v1.10.0) -**API Class Restructure:** The unified `MxPlatformApi` class has been replaced with granular, domain-specific API classes to better align with the OpenAPI specification structure. This change improves code organization and maintainability but requires migration of existing code. +**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. -#### Migration Required - -**Before (v1.10.0 and earlier):** -```javascript -import { Configuration, MxPlatformApi } from 'mx-platform-node'; - -const client = new MxPlatformApi(configuration); -await client.listMembers(userGuid); -await client.listAccounts(userGuid); -await client.listTransactions(userGuid, accountGuid); -``` - -**After (v1.10.1+):** -```javascript -import { - Configuration, - MembersApi, - AccountsApi, - TransactionsApi -} from 'mx-platform-node'; - -const membersApi = new MembersApi(configuration); -const accountsApi = new AccountsApi(configuration); -const transactionsApi = new TransactionsApi(configuration); - -await membersApi.listMembers(userGuid); -await accountsApi.listAccounts(userGuid); -await transactionsApi.listTransactions(userGuid, accountGuid); -``` - -#### 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 +**See [MIGRATION.md](MIGRATION.md) for detailed upgrade instructions.** ### Changed - Restructured API classes from single `MxPlatformApi` to domain-specific classes -## [1.12.1] and earlier (1.10.1 - 1.12.1) - Various dates +## [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.1) 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. +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 (code is identical to v1.12.1, just properly versioned). -## [1.10.0] - Various dates +## [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 guide above) +- Upgrade from this version to v2.0.0 requires code changes (see [MIGRATION.md](MIGRATION.md)) --- diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..c77937e --- /dev/null +++ b/MIGRATION.md @@ -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. diff --git a/openapi/templates/README.mustache b/openapi/templates/README.mustache index eb4ccfa..777ca83 100644 --- a/openapi/templates/README.mustache +++ b/openapi/templates/README.mustache @@ -70,72 +70,9 @@ const response = await usersApi.createUser(requestBody); console.log(response.data); ``` -## Migration Guide +## Upgrading from v1.x? -### Breaking Change in v2.0.0 (and v1.10.1-v1.12.1) - -**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 - -- `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). +> **⚠️ 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 From f105676a6a3f1672102c44eef88e5fff604228f9 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 08:48:20 -0700 Subject: [PATCH 5/9] Ensure gitignore is not overwritten by generator --- .openapi-generator-ignore | 1 + openapi/config.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 056a14c..3530143 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1 +1,2 @@ git_push.sh +.gitignore \ No newline at end of file diff --git a/openapi/config.yml b/openapi/config.yml index 3116f8b..5efac3a 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -1,4 +1,5 @@ --- npmName: mx-platform-node -npmVersion: 2.0.0 +npmVersion: 2.0.0-rc.1 # Pre-release for testing new directory structure supportsES6: true +.openapi-generator-ignore: true From 547d0c2e6e7bbd74a9d5d5f9043eb23cabb252ea Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 08:52:41 -0700 Subject: [PATCH 6/9] Fix allow list --- .github/clean.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/clean.rb b/.github/clean.rb index 6a45569..c4b6f30 100644 --- a/.github/clean.rb +++ b/.github/clean.rb @@ -6,9 +6,9 @@ ".gitignore", ".npmignore", ".openapi-generator-ignore", - "CHANGELOG", + "CHANGELOG.md", "LICENSE", - "MIGRATION", + "MIGRATION.md", "latest", "node_modules", "openapi", From f50a7554bb4b8fa0308115b756e2705381f45075 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 09:57:27 -0700 Subject: [PATCH 7/9] Whitelist published files --- openapi/templates/package.mustache | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openapi/templates/package.mustache b/openapi/templates/package.mustache index 19dd5bf..b1334f2 100644 --- a/openapi/templates/package.mustache +++ b/openapi/templates/package.mustache @@ -12,6 +12,12 @@ "license": "MIT", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "files": [ + "dist/", + "CHANGELOG.md", + "README.md", + "MIGRATION.md" + ], "scripts": { "build": "tsc --outDir dist/", "prepare": "npm run build" From 9d3de85deaed9d03784c66d4803e3f5dfb0ebc89 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 09:57:49 -0700 Subject: [PATCH 8/9] Regenerated v2.0.0-rc.1 in latest directory --- .github/clean.rb | 2 +- CHANGELOG.md | 4 +- README.md | 10 +- latest/.gitignore | 4 + .npmignore => latest/.npmignore | 0 latest/.openapi-generator-ignore | 23 +++++ .../.openapi-generator}/FILES | 2 + .../.openapi-generator}/VERSION | 0 latest/CHANGELOG.md | 53 +++++++++++ latest/LICENSE | 21 +++++ latest/MIGRATION.md | 82 +++++++++++++++++ latest/README.md | 92 +++++++++++++++++++ api.ts => latest/api.ts | 0 base.ts => latest/base.ts | 0 common.ts => latest/common.ts | 0 configuration.ts => latest/configuration.ts | 0 latest/git_push.sh | 57 ++++++++++++ index.ts => latest/index.ts | 0 package.json => latest/package.json | 6 ++ tsconfig.esm.json => latest/tsconfig.esm.json | 0 tsconfig.json => latest/tsconfig.json | 0 21 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 latest/.gitignore rename .npmignore => latest/.npmignore (100%) create mode 100644 latest/.openapi-generator-ignore rename {.openapi-generator => latest/.openapi-generator}/FILES (77%) rename {.openapi-generator => latest/.openapi-generator}/VERSION (100%) create mode 100644 latest/CHANGELOG.md create mode 100644 latest/LICENSE create mode 100644 latest/MIGRATION.md create mode 100644 latest/README.md rename api.ts => latest/api.ts (100%) rename base.ts => latest/base.ts (100%) rename common.ts => latest/common.ts (100%) rename configuration.ts => latest/configuration.ts (100%) create mode 100644 latest/git_push.sh rename index.ts => latest/index.ts (100%) rename package.json => latest/package.json (89%) rename tsconfig.esm.json => latest/tsconfig.esm.json (100%) rename tsconfig.json => latest/tsconfig.json (100%) diff --git a/.github/clean.rb b/.github/clean.rb index c4b6f30..189d4b5 100644 --- a/.github/clean.rb +++ b/.github/clean.rb @@ -9,7 +9,7 @@ "CHANGELOG.md", "LICENSE", "MIGRATION.md", - "latest", + "README.md", "node_modules", "openapi", "openapitools.json", diff --git a/CHANGELOG.md b/CHANGELOG.md index f6bfdd9..330816d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ This version contains breaking API changes that should have been released as v2. ### ⚠️ 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 (code is identical to v1.12.1, just properly versioned). +**If you are on any of these versions:** Please upgrade to v2.0.0. ## [1.10.0] - 11/5/2025 @@ -50,4 +50,4 @@ These versions (v1.10.1 through v1.12.0) contain the breaking API restructure bu --- -**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) and [releases page](https://github.com/mxenabled/mx-platform-node/releases). +**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). diff --git a/README.md b/README.md index d6d1c3a..777ca83 100644 --- a/README.md +++ b/README.md @@ -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 @@ -57,7 +57,7 @@ const configuration = new Configuration({ } }); -const client = new MxPlatformApi(configuration); +const usersApi = new UsersApi(configuration); const requestBody = { user: { @@ -65,11 +65,15 @@ const requestBody = { } }; -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) diff --git a/latest/.gitignore b/latest/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/latest/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/.npmignore b/latest/.npmignore similarity index 100% rename from .npmignore rename to latest/.npmignore diff --git a/latest/.openapi-generator-ignore b/latest/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/latest/.openapi-generator-ignore @@ -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 diff --git a/.openapi-generator/FILES b/latest/.openapi-generator/FILES similarity index 77% rename from .openapi-generator/FILES rename to latest/.openapi-generator/FILES index 8a11f47..b616f87 100644 --- a/.openapi-generator/FILES +++ b/latest/.openapi-generator/FILES @@ -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 diff --git a/.openapi-generator/VERSION b/latest/.openapi-generator/VERSION similarity index 100% rename from .openapi-generator/VERSION rename to latest/.openapi-generator/VERSION diff --git a/latest/CHANGELOG.md b/latest/CHANGELOG.md new file mode 100644 index 0000000..330816d --- /dev/null +++ b/latest/CHANGELOG.md @@ -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). diff --git a/latest/LICENSE b/latest/LICENSE new file mode 100644 index 0000000..1f8e9a2 --- /dev/null +++ b/latest/LICENSE @@ -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. diff --git a/latest/MIGRATION.md b/latest/MIGRATION.md new file mode 100644 index 0000000..c77937e --- /dev/null +++ b/latest/MIGRATION.md @@ -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. diff --git a/latest/README.md b/latest/README.md new file mode 100644 index 0000000..777ca83 --- /dev/null +++ b/latest/README.md @@ -0,0 +1,92 @@ +*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-node/issues) to report issues using the MX Platform Node.js library.* + +# MX Platform Node.js + +The [MX Platform API](https://www.mx.com/products/platform-api) is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +## Documentation + +Examples for the API endpoints can be found [here.](https://docs.mx.com/api) + +## Requirements + +The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +## Installation + +To build and compile the TypeScript sources to JavaScript use: + +```shell +npm install mx-platform-node +``` + +## Getting Started + +In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`. + +Please follow the [installation](#installation) procedure and then run the following code to create your first User: + +```javascript +import { Configuration, UsersApi } from 'mx-platform-node'; + +const configuration = new Configuration({ + // Configure with your Client ID/API Key from https://dashboard.mx.com + username: 'Your Client ID', + password: 'Your API Key', + + // Configure environment. https://int-api.mx.com for development, https://api.mx.com for production + basePath: 'https://int-api.mx.com', + + baseOptions: { + headers: { + Accept: 'application/vnd.mx.api.v1+json' + } + } +}); + +const usersApi = new UsersApi(configuration); + +const requestBody = { + user: { + metadata: 'Creating a user!' + } +}; + +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) + +Running the following command in this repo's directory will generate this library using the [MX Platform API OpenAPI spec](https://github.com/mxenabled/openapi/blob/master/openapi/mx_platform_api.yml) with our [configuration and templates.](https://github.com/mxenabled/mx-platform-ruby/tree/master/openapi) +```shell +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 +``` + +## Contributing + +Please [open an issue](https://github.com/mxenabled/mx-platform-node/issues) or [submit a pull request.](https://github.com/mxenabled/mx-platform-node/pulls) diff --git a/api.ts b/latest/api.ts similarity index 100% rename from api.ts rename to latest/api.ts diff --git a/base.ts b/latest/base.ts similarity index 100% rename from base.ts rename to latest/base.ts diff --git a/common.ts b/latest/common.ts similarity index 100% rename from common.ts rename to latest/common.ts diff --git a/configuration.ts b/latest/configuration.ts similarity index 100% rename from configuration.ts rename to latest/configuration.ts diff --git a/latest/git_push.sh b/latest/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/latest/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/index.ts b/latest/index.ts similarity index 100% rename from index.ts rename to latest/index.ts diff --git a/package.json b/latest/package.json similarity index 89% rename from package.json rename to latest/package.json index 505409c..6210ff0 100644 --- a/package.json +++ b/latest/package.json @@ -12,6 +12,12 @@ "license": "MIT", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "files": [ + "dist/", + "CHANGELOG.md", + "README.md", + "MIGRATION.md" + ], "scripts": { "build": "tsc --outDir dist/", "prepare": "npm run build" diff --git a/tsconfig.esm.json b/latest/tsconfig.esm.json similarity index 100% rename from tsconfig.esm.json rename to latest/tsconfig.esm.json diff --git a/tsconfig.json b/latest/tsconfig.json similarity index 100% rename from tsconfig.json rename to latest/tsconfig.json From 60a1e90830ecacdea83bbd4be39d7547a984ae91 Mon Sep 17 00:00:00 2001 From: Genevieve Nuebel Date: Wed, 7 Jan 2026 11:56:13 -0700 Subject: [PATCH 9/9] Update workflow files for latest directory migration --- .github/workflows/generate.yml | 10 ++++++++-- .github/workflows/generate_publish_release.yml | 8 +++++++- .github/workflows/on-push-master.yml | 14 ++------------ .github/workflows/publish.yml | 7 +++++-- .github/workflows/release.yml | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 4ec7986..1c4f2bc 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -27,7 +27,7 @@ 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: | @@ -35,7 +35,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: Create branch run: git checkout -b "openapi-generator-${{ steps.bump_version.outputs.version }}" - name: Create commit diff --git a/.github/workflows/generate_publish_release.yml b/.github/workflows/generate_publish_release.yml index e61f376..10832e6 100644 --- a/.github/workflows/generate_publish_release.yml +++ b/.github/workflows/generate_publish_release.yml @@ -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 diff --git a/.github/workflows/on-push-master.yml b/.github/workflows/on-push-master.yml index c8b8fb6..d064f38 100644 --- a/.github/workflows/on-push-master.yml +++ b/.github/workflows/on-push-master.yml @@ -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: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0962935..26e32f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2e4a17..35ae98a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}"