Skip to content

feat: adds PayloadMode and Priority enums#6

Merged
thachp merged 2 commits intomainfrom
feat/sorting
Nov 25, 2025
Merged

feat: adds PayloadMode and Priority enums#6
thachp merged 2 commits intomainfrom
feat/sorting

Conversation

@thachp
Copy link
Collaborator

@thachp thachp commented Nov 25, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the TypeScript type safety for the EventDBX Node.js client by introducing strongly-typed enums for PayloadMode and Priority, along with formal type definitions for JSON-related types (JsonValue, JsonPatch variants). The changes also refactor inline validation logic into reusable functions (normalize_payload_mode and normalize_priority), improving code maintainability.

  • Adds PayloadMode and Priority enums with TypeScript definitions and exports
  • Introduces JsonValue and JsonPatch type definitions for better type safety
  • Refactors validation logic into dedicated normalization functions
  • Updates version from 1.4.3 to 1.4.4

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib.rs Adds PayloadMode and Priority enums with string_enum support, defines JsonValue and JsonPatch types, and refactors inline validation into normalize_payload_mode and normalize_priority functions
index.d.ts Adds TypeScript type definitions for JsonValue, JsonPatch variants, PayloadMode and Priority enums; updates interface properties to use strongly-typed enums instead of plain strings
index.js Exports PayloadMode and Priority enums to make them available to JavaScript consumers
eventdbx.wasi.cjs Exports PayloadMode and Priority enums for WASI CommonJS module
eventdbx.wasi-browser.js Exports PayloadMode and Priority enums for WASI browser module
package.json Bumps version to 1.4.4
Cargo.toml Bumps version to 1.4.4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@thachp thachp changed the title Feat/sorting feat: adds PayloadMode and Priority enums Nov 25, 2025
@thachp thachp merged commit 1c48414 into main Nov 25, 2025
7 of 27 checks passed
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.

2 participants