0.10.0: Photo Mockups adları — JobKind, webhook olayları, event_naming - #2
Merged
Merged
Conversation
… yazımı da kabul eder - models.py: JobKind Literal (render, video, upload, 2d_create, 2d_render, photo_mockup_create, photo_mockup_render) ve PHOTO_MOCKUP_CREATE_KINDS / PHOTO_MOCKUP_RENDER_KINDS çiftleri. Job.kind ve JobAccepted.kind ileri uyumluluk için düz string kalır. - client.py / async_client.py: wait_for_2d_mockup kind kapısı tek literal yerine aile çiftini sorar; hata mesajı iki yazımı da sayar. jobs.list(kind=) JobKind ile tiplenir, docstring yeni kind'ları listeler. - __init__.py: JobKind export'u. - Testler: aile kind'lı job kabulü (sync + async), JobKind sözleşmesi ve bilinmeyen kind'ın parse edilmeye devam ettiği pini. - README ve CHANGELOG [Unreleased] güncellendi.
API bir webhook endpoint'ini fotoğraf-mockup olaylarının tek bir yazımına bağlar: 'current' (photo_mockup.*, photo_mockup_render.*) ya da 'legacy' (2d_mockup.*, 2d_render.*). SDK bu pini ne gönderebiliyor ne de yanıttan tipli okuyabiliyordu. - models.py: WebhookEventNaming Literal['legacy', 'current'] ve WebhookEndpoint.event_naming alanı. Alan Optional[str] kalır: pini olmayan eski dağıtımda None, ileride eklenecek bir yazım ValidationError yerine parse edilir (Job.kind ile aynı ilke). - client.py / async_client.py: webhook_endpoints.create ve update event_naming kabul eder. create'te verilmezse gövdeye yazılmaz, API varsayılanı 'current' geçerli olur; update'te verilmezse pin dokunulmaz. - __init__.py: WebhookEventNaming export'u. - Testler (RED->GREEN): create gövdesinde event_naming, verilmeyince alan yok, update gövdesi yalnız verilen alanları taşır, get/list yanıtında pin okunur, alanı olmayan eski yanıt None verir, Literal ve export pini; sync + asyncio. conftest fixture'ı API'nin döndürdüğü event_naming'i taşır. - README: webhook örneği ve referans tablosu event_naming'i anlatır. - Sürüm 0.9.1 -> 0.10.0; CHANGELOG [Unreleased] 2026-09-18 tarihli 0.10.0 başlığına döndü, karşılaştırma bağlantıları eklendi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Photo Mockups adlandırması: yeni webhook olay adları ve iş türleri, endpoint ad pini (event_naming), sürüm bump. Önceki adlar ve yollar çalışmaya devam eder.