Skip to content

feat: introduce data interfaces#866

Merged
johngeorgewright merged 3 commits into
masterfrom
interfaceable
Apr 10, 2026
Merged

feat: introduce data interfaces#866
johngeorgewright merged 3 commits into
masterfrom
interfaceable

Conversation

@johngeorgewright

Copy link
Copy Markdown
Collaborator

Introduce ConfigurableData, InsertableData, and QueryableData.

Introduce ConfigurableData, InsertableData, and QueryableData.
Copilot AI review requested due to automatic review settings April 10, 2026 11:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a set of narrower Data-related interfaces (ConfigurableData, InsertableData, QueryableData) and updates the server/client layers to consume them, including a new endpoint + client method to fetch all matching payloads for a given name.

Changes:

  • Added ConfigurableData, InsertableData, and QueryableData interfaces and refactored IData into an intersection of those interfaces.
  • Updated Data and PromisedData to implement the new interfaces.
  • Added GET /:name/all on the server and Client.getPayloads() on the client to retrieve all matching payloads for a name.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/server/src/index.ts Adds GET /:name/all route to return all matching payloads for a specific payload name.
packages/client/src/index.ts Makes Client implement QueryableData and adds getPayloads(); updates query typing for existing methods.
packages/api/src/ConfigurableData.ts New interface for configuration-related methods (usePayload, useTargeting, useFallThroughTargeting).
packages/api/src/InsertableData.ts New interface for insert-related method (insert).
packages/api/src/QueryableData.ts New interface for query-related methods (getPayload, getPayloadForEachName, getPayloads).
packages/api/src/IData.ts Replaces the old IData interface with an intersection type of the three new interfaces.
packages/api/src/Data.ts Updates Data to implement the new interfaces (no functional behavior change intended).
packages/api/src/PromisedData.ts Updates PromisedData to implement the new interfaces.
packages/api/src/index.ts Re-exports the new interfaces from the public API entrypoint.

Comment thread packages/client/src/index.ts Outdated
Comment thread packages/client/src/index.ts Outdated
Comment thread packages/server/src/index.ts
Comment thread packages/client/src/index.ts
@johngeorgewright johngeorgewright merged commit 4dfe412 into master Apr 10, 2026
5 checks passed
@johngeorgewright johngeorgewright deleted the interfaceable branch April 10, 2026 12:42
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