Skip to content

feat: update schemas, bump deps#10

Merged
petar-omni merged 1 commit intomainfrom
feat/update-schemas
Aug 22, 2025
Merged

feat: update schemas, bump deps#10
petar-omni merged 1 commit intomainfrom
feat/update-schemas

Conversation

@petar-omni
Copy link
Contributor

This pull request introduces several new features and schema updates to the SDK, focusing on expanding API capabilities for yield and transaction management, as well as improving schema flexibility and consistency. The changes include new API endpoints, additional filtering options, enhanced schema definitions, and dependency updates.

API Enhancements:

  • Added a new submitTransaction endpoint for submitting signed transactions, along with its DTO and result types. (src/api/index.ts, src/api/schemas/submitTransactionDto.ts, [1] [2] [3]
  • Included error response types for the new transaction submission endpoint. (src/api/schemas/transactionsControllerSubmitTransaction401.ts, src/api/schemas/transactionsControllerSubmitTransaction429.ts, src/api/schemas/transactionsControllerSubmitTransaction500.ts, [1] [2] [3] [4]

Schema and Filtering Improvements:

  • Expanded yield query and retrieval schemas to support additional filters: yield type, cooldown/warmup periods, and yield name search. Added corresponding types for yield type filtering. (src/api/schemas/yieldQueryDto.ts, src/api/schemas/yieldQueryDtoType.ts, src/api/schemas/yieldsControllerGetYieldsParams.ts, src/api/schemas/yieldsControllerGetYieldsType.ts, [1] [2] [3] [4] [5]
  • Updated YieldMetadataDto to include new fields: underMaintenance, deprecated, and supportedStandards (with a new ERCStandards enum). (src/api/schemas/yieldMetadataDto.ts, src/api/schemas/eRCStandards.ts, [1] [2]

Schema Flexibility and Consistency:

  • Made several fields in ValidatorDto and YieldStatisticsDto optional or nullable to better reflect real-world data variability. (src/api/schemas/validatorDto.ts, src/api/schemas/yieldStatisticsDto.ts, [1] [2]
  • Improved documentation and consistency for provider ID fields across multiple schemas. (src/api/schemas/validatorQueryDto.ts, src/api/schemas/yieldQueryDto.ts, src/api/schemas/yieldsControllerGetYieldValidatorsParams.ts, [1] [2] [3]

Dependency and Config Updates:

  • Updated multiple development dependencies and improved the biome.json include/exclude patterns for better project hygiene. (package.json, biome.json, [1] [2]

Release and Documentation:

@changeset-bot
Copy link

changeset-bot bot commented Aug 20, 2025

🦋 Changeset detected

Latest commit: fa4ae6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@yieldxyz/sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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 introduces expanded API capabilities for yield and transaction management, focusing on schema updates and dependency improvements. The changes add new transaction submission functionality, enhance filtering options for yield queries, and improve schema flexibility to better handle real-world data variations.

  • Added a new submitTransaction endpoint for directly submitting signed transactions to the blockchain
  • Expanded yield filtering capabilities with type, cooldown/warmup period, and name search options
  • Made validator and yield statistics fields optional/nullable to accommodate data variability

Reviewed Changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/api/index.ts Added submitTransaction endpoint and result type
src/api/schemas/submitTransactionDto.ts New DTO for transaction submission requests
src/api/schemas/transactionsControllerSubmitTransaction*.ts Error response schemas for transaction submission
src/api/schemas/yieldsControllerGetYieldsType.ts New enum for yield type filtering
src/api/schemas/yieldQueryDtoType.ts Yield type filter for query DTOs
src/api/schemas/yieldsControllerGetYieldsParams.ts Enhanced params with new filtering options
src/api/schemas/yieldQueryDto.ts Updated query interface with additional filters
src/api/schemas/yieldMetadataDto.ts Added maintenance, deprecation, and standards fields
src/api/schemas/eRCStandards.ts New enum for supported ERC standards
src/api/schemas/validatorDto.ts Made fields optional and added subnet-related properties
src/api/schemas/yieldStatisticsDto.ts Made all fields optional and nullable
src/api/index.msw.ts Updated mock handlers to reflect schema changes
package.json Updated development dependencies
biome.json Improved include/exclude patterns
.changeset/common-ghosts-share.md Added changeset for the release
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

(typeof YieldsControllerGetYieldsType)[keyof typeof YieldsControllerGetYieldsType];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const YieldsControllerGetYieldsType = {
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The type and const object have identical names, which creates a naming collision. Consider renaming the const object to something like YieldsControllerGetYieldsTypeValues to distinguish it from the type.

Suggested change
export const YieldsControllerGetYieldsType = {
(typeof YieldsControllerGetYieldsTypeValues)[keyof typeof YieldsControllerGetYieldsTypeValues];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const YieldsControllerGetYieldsTypeValues = {

Copilot uses AI. Check for mistakes.
(typeof YieldQueryDtoType)[keyof typeof YieldQueryDtoType];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const YieldQueryDtoType = {
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The type and const object have identical names, which creates a naming collision. Consider renaming the const object to something like YieldQueryDtoTypeValues to distinguish it from the type.

Suggested change
export const YieldQueryDtoType = {
(typeof YieldQueryDtoTypeValues)[keyof typeof YieldQueryDtoTypeValues];
export const YieldQueryDtoTypeValues = {

Copilot uses AI. Check for mistakes.
export type ERCStandards = (typeof ERCStandards)[keyof typeof ERCStandards];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ERCStandards = {
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The type and const object have identical names, which creates a naming collision. Consider renaming the const object to something like ERCStandardsValues to distinguish it from the type.

Suggested change
export const ERCStandards = {
export type ERCStandards = (typeof ERCStandardsValues)[keyof typeof ERCStandardsValues];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ERCStandardsValues = {

Copilot uses AI. Check for mistakes.
@petar-omni petar-omni force-pushed the feat/update-schemas branch 2 times, most recently from 3f68a23 to 3e3e2e0 Compare August 21, 2025 09:33
@petar-omni petar-omni requested a review from jdomingos August 21, 2025 09:34
@petar-omni petar-omni force-pushed the feat/update-schemas branch from 3e3e2e0 to f2ea79e Compare August 22, 2025 11:38
@petar-omni petar-omni force-pushed the feat/update-schemas branch from f2ea79e to fa4ae6d Compare August 22, 2025 13:25
@petar-omni petar-omni merged commit d8889e1 into main Aug 22, 2025
3 checks passed
@petar-omni petar-omni deleted the feat/update-schemas branch August 22, 2025 13:28
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