Skip to content

refactor: fix webhook create/update serialization, add payload types, and MEMORY_CATEGORIZED event#4429

Merged
whysosaket merged 8 commits intomainfrom
fix/webhook-mapping-in-ts-sdk
Mar 19, 2026
Merged

refactor: fix webhook create/update serialization, add payload types, and MEMORY_CATEGORIZED event#4429
whysosaket merged 8 commits intomainfrom
fix/webhook-mapping-in-ts-sdk

Conversation

@kartik-mem0
Copy link
Copy Markdown
Contributor

Description

Fix webhook createWebhook and updateWebhook methods in the TS SDK that were sending camelCase keys (eventTypes) in the HTTP request body instead of snake_case (event_types). This caused
createWebhook to fail with a 400 error and updateWebhook to silently ignore event type changes.

Also adds integration test coverage for webhook CRUD operations and bumps the SDK to v2.4.2.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit Test
  • Test Script (please provide)

Unit tests (84 pass):
npx jest --testPathPattern="memoryClient" --no-coverage

Integration tests against real API (7 pass):
MEM0_API_KEY= npx jest --testPathPattern="integration/management" --no-coverage --forceExit

Manual verification — raw HTTP calls confirming:

  • createWebhook with camelCase eventTypes → 400 error
  • createWebhook with snake_case event_types → 201 Created
  • updateWebhook with camelCase eventTypes → 200 but silently ignored
  • updateWebhook with snake_case event_types → 200 and actually updated

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

whysosaket
whysosaket previously approved these changes Mar 19, 2026
@whysosaket whysosaket merged commit 6663b73 into main Mar 19, 2026
9 checks passed
@whysosaket whysosaket deleted the fix/webhook-mapping-in-ts-sdk branch March 19, 2026 16:56
jamebobob pushed a commit to jamebobob/mem0-vigil-recall that referenced this pull request Mar 29, 2026
… and MEMORY_CATEGORIZED event (mem0ai#4429)

Co-authored-by: Saket Aryan <saketaryan2002@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants