onesignal-node-api icon indicating copy to clipboard operation
onesignal-node-api copied to clipboard

feat(email): add the missing REST API parameter disable_email_click_tracking

Open CHC383 opened this issue 10 months ago • 2 comments
trafficstars

close https://github.com/OneSignal/onesignal-node-api/issues/61

Description

One Line Summary

Add the missing REST API parameter disable_email_click_tracking

Details

Motivation

The parameter of the REST API create email message disable_email_click_tracking (https://documentation.onesignal.com/reference/email#disable_email_click_tracking) is missing in the Notification model. Without this users won't be able to disable link tracking using the node api sdk, which is important for transactional emails and could affect email inbox placement.

Scope

Links in emails are not wrapped with trackable links when disable_email_click_tracking is set to true, not enabled by default.

OPTIONAL - Other

Testing

Manual testing

  • npm run prepare
  • The changes are tested by patching the distributed @onesignal/node-onesignal js and d.ts files through pnpm, but not on the repository itself as I am not sure about the testing process.

Checklist

Overview

  • [x] I have filled out all REQUIRED sections above
  • [x] PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • [x] Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • [x] I have personally tested this on my device, or explained why that is not possible

Final pass

  • [x] Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • [x] I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

CHC383 avatar Jan 09 '25 01:01 CHC383

Per https://github.com/OneSignal/onesignal-node-api/issues/61#issuecomment-2580890780, the SDK needs to be fixed in an upstream project.

CHC383 avatar Jan 09 '25 17:01 CHC383

Reopen the PR as a reminder until the fix is applied in the upstream project

CHC383 avatar Feb 11 '25 17:02 CHC383

Hi @sherwinski, any plan to add the missing parameters to the upstream project?

CHC383 avatar Jun 25 '25 19:06 CHC383

Hey @CHC383, I'll work on adding it in now.

sherwinski avatar Jul 08 '25 17:07 sherwinski

Thanks for your patience on this issue, this parameter has been added in the latest release https://github.com/OneSignal/onesignal-node-api/releases/tag/5.2.0-beta1 🚀 Please let me know if you have any questions.

sherwinski avatar Jul 09 '25 22:07 sherwinski