Skip to content

feat: feedback API v1#211

Open
heyalexej wants to merge 1 commit into
hendt:masterfrom
heyalexej:feat/feedback-api
Open

feat: feedback API v1#211
heyalexej wants to merge 1 commit into
hendt:masterfrom
heyalexej:feat/feedback-api

Conversation

@heyalexej

Copy link
Copy Markdown

Summary

Adds the Commerce Feedback API (commerce/feedback/v1), accessible via eBay.commerce.feedback. It mirrors the structure of the Message API (feat: message API v1).

Methods:

  • getItemsAwaitingFeedback
  • getFeedback
  • leaveFeedback
  • getFeedbackRatingSummary
  • respondToFeedback

Changes

  • Added OpenAPI spec specs/commerce_feedback_v1_beta_oas3.json, configured in redocly.yaml, generated types via openapi-typescript.
  • New Feedback class (src/api/restful/commerce/feedback/index.ts) extending Restful and implementing OpenApi<operations>.
  • Exported request body types LeaveFeedbackRequest and RespondToFeedbackRequest from restfulTypes.
  • Wired into ApiFactory.createCommerceApi() and the Commerce group type/exports.
  • Added to the OAS contract test (test/api/restful/commerce/index.ts); updated the README implementation status.

Testing

  • npm test → 1373 passing (includes the new Feedback OAS contract tests).
  • npm run lint and tsc --noEmit clean (noUnusedLocals/noUnusedParameters respected).
  • Smoke-tested against production: all read methods (getFeedback, getFeedbackRatingSummary, getItemsAwaitingFeedback) and leaveFeedback end-to-end.

Usage:

await eBay.commerce.feedback.getFeedback({ userId, feedbackType: 'FEEDBACK_RECEIVED' });
await eBay.commerce.feedback.leaveFeedback({ commentType: 'POSITIVE', orderLineItemId, commentText });
await eBay.commerce.feedback.respondToFeedback({ feedbackId, recipientUserId, responseType: 'FOLLOW_UP', responseText });

Add the Commerce Feedback API (commerce/feedback/v1):

- getItemsAwaitingFeedback, getFeedback, leaveFeedback,
  getFeedbackRatingSummary, respondToFeedback
- OpenAPI spec + generated types (redocly + openapi-typescript)
- Wired into ApiFactory and the Commerce group
- Contract test added; README implementation status updated
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.

1 participant