Repository navigation
Add EntityNote resource and align Contacts and Tasks with the public API - #144
Conversation
|
Many changes there with some mocks in tests. Did you try to test it locally in devcontainer api and some python app with our lib? This will be e2e test, maybe it finds some issues. |
I don't use the platform devcontainer locally for development, so definitely did not do that. I've only run the existing test suite as it currently exists in the repo. I'll see about running the tests in a more realistic e2e way for better verification. 🫡 |
@ya-petrov-evgeniy Alright, I generated an e2e smoke script using this branch and ran it against the app running locally with all of the public API changes applied and the feature flag associated with this project enabled. It covered all of the new and updated code paths in this branch and passed with 100% success. ✅ |
|
Nice, It requires |
|
Also ran e2e tests, works as expected: |
@ya-petrov-evgeniy I will not deploy these SDK library changes until the feature flag has been enabled for all customers, so I am assuming this is the case with these library updates. The feature has not been released in platform yet, so any approvals in these SDKs will hold until that has been completed. 👍 |
briwa
left a comment
There was a problem hiding this comment.
LGTM 👍 Next time, I think you could tag the analytics/data team for a review, since they primarily use Python in day-to-day work
Aligns the SDK with recent public v1 API changes to Contacts, Tasks and Notes. Additive only; no breaking changes.
Notes
EntityNoteresource for/v1/notes, covering notes and call logs on customers and contacts. Exposesassociated_object/associated_object_uuidand a nullablecustomer_uuid.CustomerNoteandCustomer.notes/Customer.createNoteare deprecated. They keep their endpoint and behavior but now emit aDeprecationWarningpointing at theEntityNoteequivalent.Customer.entityNotes/Customer.createEntityNote.Tasks
Task.allsupportscontact_uuid,assignee,due_date_on_or_after,due_date_on_or_beforeandcompleted.completed=Falseis sent ascompleted=false.Task.createacceptsassociated_object_identifier;customer_uuidis now nullable in responses.associated_object/associated_object_uuidadded to the schema.Contacts
Contact.allsupportsemail,customer_external_idandexternal_idfilters.last_seenadded to the schema and accepted on create and modify. Contacts can be created withoutcustomer_uuid/data_source_uuid.Contact.tasks,Contact.createTask,Contact.entityNotes,Contact.createEntityNote. The create helpers inject anassociated_object_identifierfor the contact unless the payload already containscustomer_uuidor an identifier.Core
Resource._loadreturnsNonefor HTTP 304, whichPATCH /notesandPATCH /tasksreturn when nothing was updated.Resource._methodgainsuseAssociatedObjectFor, alongside the existinguseUUIDFor._deprecated_methodhelper reuses thelist_importeddeprecation approach.Tests and docs
test_entity_note.py; new cases in the task, contact, customer, customer-note and common test modules, including 304 handling, boolean filters, standalone contacts and identifier injection.