Add EntityNote resource, contact task/note helpers and new contact/task filters - #161
Open
keith-chartmogul wants to merge 2 commits into
Open
keith-chartmogul wants to merge 2 commits into
keith-chartmogul wants to merge 2 commits into
Conversation
keith-chartmogul
requested review from
a team,
loomchild,
tudorpavel and
ya-petrov-evgeniy
and removed request for
a team
September 15, 2026 11:04
loomchild
approved these changes
Sep 15, 2026
| CustomerNote[methodName] = function (...args) { | ||
| console.warn(`[DEPRECATED] CustomerNote.${methodName} is deprecated. Use ChartMogul.EntityNote.${methodName} instead.`); | ||
| return original.apply(this, args); | ||
| }; |
There was a problem hiding this comment.
[minor] Isn't this too smart - I'd repat the same thing like below for consistency.
Contributor
Author
There was a problem hiding this comment.
Good call, I've replaced the loop with five explicit wrappers matching the Customer.notes / Subscription.all style 👍
loomchild
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aligns the SDK with recent changes to the public v1 API for Contacts, Tasks and Notes. All changes are additive; no existing method changes its behavior or endpoint.
Notes and call logs
ChartMogul.EntityNoteresource for/v1/notes, which supersedes/v1/customer_notes. Notes can be attached to a customer viacustomer_uuidor to a customer or contact viaassociated_object_identifier. Supportsall,create,retrieve,patchanddestroy, withcustomer_uuid,contact_uuid,typeandauthor_emaillist filters.ChartMogul.CustomerNoteis deprecated. Its five methods still call/v1/customer_notesunchanged but now emit a[DEPRECATED]warning pointing at theEntityNoteequivalent.Customer.entityNotesandCustomer.createEntityNoteadded;Customer.notesandCustomer.createNoteare deprecated with a warning.Contacts
Contact.tasks,Contact.createTask,Contact.entityNotesandContact.createEntityNote. The list helpers filter bycontact_uuid. The create helpers attach the task or note to the contact viaassociated_object_identifierunless the caller suppliescustomer_uuidor their own identifier.Contact.alldocuments the newemail,customer_external_idandexternal_idfilters.Contact.createno longer requirescustomer_uuidanddata_source_uuid, andlast_active_at/last_seenare covered by tests.Tasks
Task.createacceptsassociated_object_identifier, withcustomer_uuidnow optional.Task.alldocuments thecontact_uuid,assignee,due_date_on_or_after,due_date_on_or_beforeandcompletedfilters. Tests confirmcompleted: falseis serialized rather than dropped.HTTP layer
Resource.requestnow resolves with{}on a304 Not Modifiedresponse. The API returns this with an empty body when a PATCH to/v1/notesor/v1/taskscarries nothing to update; previously superagent surfaced it as an error.Tests and docs
test/chartmogul/entity-note.jssuite; extended task, contact, customer, customer-note and resource suites, including assertions that the deprecation warnings fire and the legacy endpoints are still hit.task_uuidresponse key, and the contact create fixture usescustomer_external_idwith a 201.No version bump in this PR; release via
bin/release.sh minorafter merge.