Skip to content

Add FeedType and ReportType enums, make partnerTag required - #152

Merged
sergioteula merged 3 commits into
masterfrom
claude/amazon-creators-api-sdk-vqtm2e
Sep 3, 2026
Merged

sergioteula merged 3 commits into
masterfrom
claude/amazon-creators-api-sdk-vqtm2e

Conversation

@sergioteula

Copy link
Copy Markdown
Owner

Summary

This PR adds two new enum models (FeedType and ReportType) to the SDK and integrates them into existing models. It also makes the partnerTag parameter required in the SearchItemsRequestContent model. The SDK version is bumped from 1.2.0 to 1.3.0.

Key Changes

  • New Enum Models: Added FeedType and ReportType enum classes with their respective allowed values:

    • FeedType: PRODUCT_FEEDS, DEALS_FEEDS
    • ReportType: CREATOR_CENTRAL, CREATOR_CONNECTIONS
  • Model Updates: Integrated the new enums into existing models:

    • Added optional feedType field to Feed and GetFeedRequestContent models
    • Added optional reportType field to ReportMetadata and GetReportRequestContent models
  • API Changes: Made search_items_request_content parameter required (no longer Optional) in the search_items method and its variants in DefaultApi

  • Required Field: Changed partnerTag from optional to required in SearchItemsRequestContent model

  • Version Bump: Updated SDK version to 1.3.0 in api_client.py, pyproject.toml, and documentation

  • Exports: Added new enum classes to module __init__.py files for public API exposure

Implementation Details

Both enum classes follow the existing SDK pattern with:

  • String-based enum inheritance
  • JSON deserialization support via from_json() class method
  • Proper Apache 2.0 license headers
  • Type hints using typing_extensions.Self

https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5

Vendors the upstream 1.3.0 SDK archive. Changes relevant to the wrapper:

- `FeedType` and `ReportType` enums, with `feedType` on `Feed` /
  `GetFeedRequestContent` and `reportType` on `ReportMetadata` /
  `GetReportRequestContent`, so callers can tell Creator Central from
  Creator Connections reports and route `GetFeed` / `GetReport` explicitly.
- `partnerTag` is now required in `SearchItemsRequestContent` and the
  request body is now required in `DefaultApi.search_items`. Both wrapper
  layers already pass a partner tag and a request body on every call, so
  the public API is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
…t version

`test_search_items_returns_expected_count` asserted an exact page of 10
items; SearchItems treats 10 as a maximum, so a live search returning 9
failed CI in both the sync and async suites. Assert the upper bound
instead, the invariant the API actually guarantees.

The dev group allowed any ruff `>=0.14.11` while pre-commit pins
`v0.14.11`. With ruff 0.16 resolved locally, `make lint` reported 61
errors from newly stabilised rules (CPY001, PLR0917) that CI never sees.
Pin the exact version so both run the same linter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
The bundled SDK exposes listFeeds, getFeed, listReports and getReport, and
1.3.0 added the FeedType and ReportType enums that disambiguate a name
present in more than one program (a report in both Creator Central and
Creator Connections, for instance). None of it was reachable from the
wrapper, so the new types had no caller.

Both layers now expose `list_feeds`, `get_feed`, `list_reports` and
`get_report`, with the type as an optional filter. The get operations
return the download URL directly, the only field in their responses.

listFeeds and listReports take no request payload, so the async
`_make_request` and the HTTP client now accept an optional body and send
the request without one, matching what the SDK does over urllib3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
@sergioteula
sergioteula merged commit 1bc632a into master Sep 3, 2026
7 of 8 checks passed
@sergioteula
sergioteula deleted the claude/amazon-creators-api-sdk-vqtm2e branch September 3, 2026 21:59
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