From 334a66f96256ee5172bd4cc8576cf825164d495f Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Thu, 31 Jul 2025 16:50:10 -0600 Subject: [PATCH 1/6] docs: add missing CHANGELOG for previous version --- docs/widget_callback_props.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/widget_callback_props.md b/docs/widget_callback_props.md index 378cfd5..d9cf99a 100644 --- a/docs/widget_callback_props.md +++ b/docs/widget_callback_props.md @@ -415,7 +415,7 @@ const widget = widgetSdk.ConnectWidget({ - Payload fields: - `user_guid` (`string`) - `session_guid` (`string`) - - `context` (`string`) + - `context` (optional) (`string`)
Click here to view a sample usage of onBackToSearch. @@ -434,3 +434,31 @@ const widget = widgetSdk.ConnectWidget({
+--- +### Invalid data (`mx/connect/invalidData`) + +- Widget callback prop name: `onInvalidData` +- Payload fields: + - `user_guid` (`string`) + - `session_guid` (`string`) + - `member_guid` (`string`) + - `code` (`number`) + +
+Click here to view a sample usage of onInvalidData. + +```javascript +const widget = widgetSdk.ConnectWidget({ + url: "https://widgets.moneydesktop.com/md/connect/...", + + onInvalidData: (payload) => { + console.log(`User guid: ${payload.user_guid}`) + console.log(`Session guid: ${payload.session_guid}`) + console.log(`Member guid: ${payload.member_guid}`) + console.log(`Code: ${payload.code}`) + } +}) +``` + +
+ From b250a5015dfe954ba5d9bbaba6364aaea92ab305 Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Thu, 31 Jul 2025 16:51:01 -0600 Subject: [PATCH 2/6] fix: add uncommitted version change from previous package version --- src/version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.ts b/src/version.ts index 6d96416..2084f3b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -4,4 +4,4 @@ * DO NOT MODIFY */ -export const sdkVersion = "0.0.11" +export const sdkVersion = "0.0.13" From 4ee760724b6d99d18009d277fc162dc66ec39178 Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Thu, 31 Jul 2025 16:51:51 -0600 Subject: [PATCH 3/6] feat: add additional_product_option and use_cases for Connect widget --- CHANGELOG.md | 9 +++++++-- src/sso/widget_configuration.ts | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f989f9..72d1510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,18 @@ 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] +## [0.0.14] - Date TBD ### Added +- Support for `additional_product_option` in Connect Widget configuration. +- Support for `use_cases` in Connect Widget configuration. + +## [0.0.13] - 2024-3-11 + ### Changed -### Fixed +- @mxenabled/widget-post-message-definitions to v1.4.0 ## [0.0.12] - 2024-2-12 diff --git a/src/sso/widget_configuration.ts b/src/sso/widget_configuration.ts index 9311cea..0fe2401 100644 --- a/src/sso/widget_configuration.ts +++ b/src/sso/widget_configuration.ts @@ -65,6 +65,7 @@ export type WidgetConfiguration = { export type ConnectWidgetConfigurationProps = Camelize export type ConnectWidgetConfiguration = WidgetConfiguration & { + additional_product_option?: "account_verification" | "transactions" client_redirect_url?: string current_institution_code?: string current_institution_guid?: string @@ -73,6 +74,7 @@ export type ConnectWidgetConfiguration = WidgetConfiguration & { include_transactions?: boolean mode?: ConnectWidgetMode update_credentials?: boolean + use_cases?: Array<"MONEY_MOVEMENT" | "PFM"> } export function getWidgetConfigurationFromProps( From f02087a84ae0b8cffdf2a4b3703643c1168f9d40 Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Fri, 1 Aug 2025 10:00:34 -0600 Subject: [PATCH 4/6] ci: update workflow actions --- .github/workflows/build-sdk.yml | 37 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-sdk.yml b/.github/workflows/build-sdk.yml index f587c08..3b78c97 100644 --- a/.github/workflows/build-sdk.yml +++ b/.github/workflows/build-sdk.yml @@ -4,29 +4,28 @@ on: pull_request: push: branches: - - master + - master jobs: Build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 16 - cache: npm - - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + cache: npm + - uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - - run: npm install - - run: npm run prettier -- --check - - run: npm run lint - - run: npm run build - - run: npm run test - - run: npm run spellcheck + - run: npm install + - run: npm run prettier -- --check + - run: npm run lint + - run: npm run build + - run: npm run test + - run: npm run spellcheck From 1a995d8ef9ff51d7ca6195eaeafaf44878158b43 Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Fri, 1 Aug 2025 12:14:54 -0600 Subject: [PATCH 5/6] feat: add additional_product_option, connections_use_case_filter, and use_cases to Connections widget --- CHANGELOG.md | 3 ++- example/index.html | 4 ---- src/sso/widget_configuration.ts | 14 +++++++++++++- src/widgets.ts | 10 ++++++++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d1510..b64211b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,13 @@ 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). -## [0.0.14] - Date TBD +## [0.0.14] - 2025-08-01 ### Added - Support for `additional_product_option` in Connect Widget configuration. - Support for `use_cases` in Connect Widget configuration. +- Support for `connections_use_case_filter` in Connections Widget configuration. ## [0.0.13] - 2024-3-11 diff --git a/example/index.html b/example/index.html index ca0ad66..0d67ee8 100644 --- a/example/index.html +++ b/example/index.html @@ -33,10 +33,6 @@ // language: "es", // colorScheme: "dark", // mode: "verification", - // - // Refer to https://docs.mx.com/connect/guides/sdk#react_native_widget_props and - // https://docs.mx.com/connect/guides/sdk#react_native_generating_the_widget_sso_url - // for information on all of the supported properties. onMessage: (event) => { logEvent(event.data) diff --git a/src/sso/widget_configuration.ts b/src/sso/widget_configuration.ts index 0fe2401..b7301c2 100644 --- a/src/sso/widget_configuration.ts +++ b/src/sso/widget_configuration.ts @@ -77,12 +77,23 @@ export type ConnectWidgetConfiguration = WidgetConfiguration & { use_cases?: Array<"MONEY_MOVEMENT" | "PFM"> } +export type ConnectionsWidgetConfigurationProps = Camelize +export type ConnectionsWidgetConfiguration = WidgetConfiguration & { + additional_product_option?: "account_verification" | "transactions" + connections_use_case_filter?: boolean + use_cases?: Array<"MONEY_MOVEMENT" | "PFM"> +} + export function getWidgetConfigurationFromProps( - props: ConnectWidgetConfigurationProps & InternalWidgetConfigurationProps, + props: ConnectWidgetConfigurationProps & + InternalWidgetConfigurationProps & + ConnectionsWidgetConfigurationProps, ) { return { + additional_product_option: props.additionalProductOption, client_redirect_url: props.clientRedirectUrl, color_scheme: props.colorScheme, + connections_use_case_filter: props.connectionsUseCaseFilter, // Connections specific current_institution_code: props.currentInstitutionCode, current_institution_guid: props.currentInstitutionGuid, current_member_guid: props.currentMemberGuid, @@ -94,6 +105,7 @@ export function getWidgetConfigurationFromProps( ui_message_version: props.uiMessageVersion || 4, ui_message_webview_url_scheme: props.uiMessageWebviewUrlScheme, update_credentials: props.updateCredentials, + use_cases: props.useCases, widget_type: props.widgetType, } } diff --git a/src/widgets.ts b/src/widgets.ts index ac925eb..21f6e24 100644 --- a/src/widgets.ts +++ b/src/widgets.ts @@ -1,4 +1,10 @@ -import { getSsoUrl, Props as UrlLoadingProps, Type, ConnectWidgetConfigurationProps } from "./sso" +import { + getSsoUrl, + Props as UrlLoadingProps, + Type, + ConnectWidgetConfigurationProps, + ConnectionsWidgetConfigurationProps, +} from "./sso" import { sdkVersion } from "./version" import { @@ -265,7 +271,7 @@ export class ConnectWidget extends Widget< } } -export class ConnectionsWidget extends Widget { +export class ConnectionsWidget extends Widget { get widgetType() { return Type.ConnectionsWidget } From 02be7a662bb92cda90ab9cf11747fdfd39489d55 Mon Sep 17 00:00:00 2001 From: Logan Rasmussen Date: Fri, 1 Aug 2025 15:09:43 -0600 Subject: [PATCH 6/6] ci: update integration test workflow --- .github/workflows/integration-tests.yml | 62 ++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 2a73550..d3cfd34 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -4,41 +4,41 @@ on: pull_request: push: branches: - - master - schedule: - - cron: "0 */6 * * *" # every 6 hours + - master + # schedule: + # - cron: "0 */6 * * *" # every 6 hours jobs: Tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 16 - cache: npm - - uses: actions/cache@v3 - with: - path: | - node_modules - ~/.cache/Cypress - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - uses: actions/cache@v3 - with: - path: cypress/application/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('cypress/application/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + cache: npm + - uses: actions/cache@v4 + with: + path: | + node_modules + ~/.cache/Cypress + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - uses: actions/cache@v4 + with: + path: cypress/application/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('cypress/application/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - run: npm install - - run: npm run test:build - - run: npm run test:integration - env: - CYPRESS_ENVIRONMENT: "${{ github.ref_name == 'master' && 'production' || 'staging' }}" - INTEGRATION_TEST_CLIENT_ID: ${{ secrets.INTEGRATION_TEST_CLIENT_ID }} - INTEGRATION_TEST_API_KEY: ${{ secrets.INTEGRATION_TEST_API_KEY }} - INTEGRATION_TEST_API_HOST: ${{ secrets.INTEGRATION_TEST_API_HOST }} - INTEGRATION_TEST_USER_GUID: ${{ secrets.INTEGRATION_TEST_USER_GUID }} + - run: npm install + - run: npm run test:build + - run: npm run test:integration + env: + CYPRESS_ENVIRONMENT: "${{ github.ref_name == 'master' && 'production' || 'staging' }}" + INTEGRATION_TEST_CLIENT_ID: ${{ secrets.INTEGRATION_TEST_CLIENT_ID }} + INTEGRATION_TEST_API_KEY: ${{ secrets.INTEGRATION_TEST_API_KEY }} + INTEGRATION_TEST_API_HOST: ${{ secrets.INTEGRATION_TEST_API_HOST }} + INTEGRATION_TEST_USER_GUID: ${{ secrets.INTEGRATION_TEST_USER_GUID }}