Skip to content

fix(types): add BannerImage to forum_update_params#46

Merged
jjantschulev merged 1 commit intonextfrom
fix-forum-update-params
Apr 20, 2026
Merged

fix(types): add BannerImage to forum_update_params#46
jjantschulev merged 1 commit intonextfrom
fix-forum-update-params

Conversation

@jjantschulev
Copy link
Copy Markdown
Contributor

Release PR #44 was failing pyright lint: "BannerImage" is not a known attribute of module ".forum_update_params".

resources/forums.py references forum_update_params.BannerImage but types/forum_update_params.py was missing both the BannerImage class and the banner_image field — a codegen-side artifact of the merge conflict resolution where forums.py was taken from the generated branch but the type file had a different cross-branch split (generated had BannerImage but was missing banned_words; integrated had banned_words but was missing BannerImage; no conflict raised, integrated side was used).

Unified forum_update_params.py to match the live public OpenAPI spec — both banned_words AND banner_image/BannerImage are present, matching api.whop.com/openapi.json PATCH /forums/{id}. ruff check + pyright pass clean locally.

forums.py resource references forum_update_params.BannerImage for the
banner_image parameter on PATCH /forums/{id}, but the type file was
missing the class and the banner_image field (a codegen-side artifact
of the recent merge conflict resolution where forums.py was taken from
the generated branch but forum_update_params.py was taken from the
integrated branch). Both fields are in the live public API (verified
against api.whop.com/openapi.json).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jjantschulev jjantschulev merged commit 256c465 into next Apr 20, 2026
6 checks passed
@stainless-app stainless-app Bot mentioned this pull request Apr 20, 2026
jjantschulev added a commit that referenced this pull request Apr 21, 2026
* codegen metadata

* codegen metadata

* codegen metadata

* codegen metadata

* fix: ensure file data are only sent as 1 parameter

* codegen metadata

* codegen metadata

* codegen metadata

* codegen metadata

* feat(api): api update

* codegen metadata

* feat(api): api update

* codegen metadata

* fix(lib): add verify_user_token helper with remote JWKS caching (#45)

Mirrors the TypeScript SDK's verify-user-token.ts so app-proxy-issued
x-whop-user-token JWTs can be verified in Python apps, with the same
key-rotation-friendly semantics (no SDK release needed when keys roll).

- src/whop_sdk/lib/verify_user_token.py (new):
  * verify_user_token() — validates against the canonical Whop JWKS at
    https://api.whop.com/.well-known/jwks.json by default, with a
    module-level cache (12h TTL, 30s cooldown-guarded refetch on kid
    miss) mirroring jose's createRemoteJWKSet.
  * try_verify_user_token() — returns None on failure instead of raising.
  * Accepts a raw token string OR a headers mapping (case-insensitive).
  * Options mirror TS: public_key (PEM or JWK JSON static override),
    jwks_url (override the endpoint), header_name, app_id.
  * Handles legacy kid-less tokens by trying each key in the current
    JWKS snapshot.
- src/whop_sdk/lib/__init__.py (new): marks lib/ as a package.
- pyproject.toml: adds optional user-tokens extra
    pip install 'whop-sdk[user-tokens]'
  which pulls in pyjwt[crypto]>=2.8,<3 for ES256 / ECDSA support.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* codegen metadata

* codegen metadata

* feat(api): api update

* fix(types): add BannerImage to forum_update_params (#46)

forums.py resource references forum_update_params.BannerImage for the
banner_image parameter on PATCH /forums/{id}, but the type file was
missing the class and the banner_image field (a codegen-side artifact
of the recent merge conflict resolution where forums.py was taken from
the generated branch but forum_update_params.py was taken from the
integrated branch). Both fields are in the live public API (verified
against api.whop.com/openapi.json).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(api): api update

* codegen metadata

* codegen metadata

* codegen metadata

* codegen metadata

* feat(api): api update

* perf(client): optimize file structure copying in multipart requests

* codegen metadata

* codegen metadata

* codegen metadata

* fix(tests): pass required company_id to invoices.list() calls (#47)

`invoices.list()` (resource) requires `company_id: str` (no Omit), but
the bare `test_method_list` / `test_raw_response_list` / `test_streaming_response_list`
variants (sync + async) call `list()` with no args. Pyright fails with
"Argument missing for parameter company_id". Fallout from the recent
merge conflict resolution on PR #884 where the test file was taken from
codegen but the resource file had `company_id` as required from a
different codegen run.

Added `company_id="biz_xxxxxxxxxxxxxx"` (matches the pattern used by
`test_method_list_with_all_params`) to the six affected list-variant
calls.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* codegen metadata

* feat(api): api update

* codegen metadata

* feat(api): manual updates

* release: 0.0.38

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Jordan Jantschulev <j.jantschulev@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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