Sdk 2758 python add support for requesting and retrieving share code resources tasks#462
Conversation
There was a problem hiding this comment.
Pull request overview
The PR's stated purpose is to add support for parsing/retrieving share code resources and VERIFY_SHARE_CODE_TASK tasks from IDV session responses. In practice this branch bundles a much larger set of changes alongside that feature: a complete protobuf regeneration with renamed packages (share_public_api → sharepubapi_v1, attribute_public_api → attrpubapi_v1, common_public_api → compubapi_v1), a Python‑version drop (only 3.9+ supported), a dependency overhaul, plus several unrelated new features (Watchlist screening check, Static Liveness, Issuing Authority sub‑check, allow_handoff/privacy_policy_url SDK config, notification auth_type, allow_non_latin_documents, is_strictly_latin, session_deadline).
Changes:
- Add
ShareCodeResourceResponse,ShareCodeMediaResponse,VerifyShareCodeTaskResponseand wire them intoResourceContainer/ResourceResponse. - Regenerate all protobufs into new package names and drop the old
*_public_apidirectories. - Add many unrelated doc‑scan features (watchlist check, static liveness, sub‑checks, SDK config and notification options) and overhaul setup/requirements.
Reviewed changes
Copilot reviewed 131 out of 133 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| yoti_python_sdk/doc_scan/session/retrieve/share_code_resource_response.py | New share-code resource model |
| yoti_python_sdk/doc_scan/session/retrieve/share_code_media_response.py | New media wrapper for share-code fields |
| yoti_python_sdk/doc_scan/session/retrieve/verify_share_code_task_response.py | New task subclass |
| yoti_python_sdk/doc_scan/session/retrieve/resource_response.py | Map VERIFY_SHARE_CODE_TASK to new class |
| yoti_python_sdk/doc_scan/session/retrieve/resource_container.py | Parse share_codes and STATIC liveness; expose properties |
| yoti_python_sdk/doc_scan/session/retrieve/static_liveness_resource_response.py, image_response.py | New static liveness resource and image wrapper |
| yoti_python_sdk/doc_scan/session/retrieve/check_response.py, get_session_result.py, create_session_result.py | New WatchlistScreening response, session_deadline |
| yoti_python_sdk/doc_scan/session/create/check/liveness.py, watchlist_screen.py, init.py | Static liveness builder and new watchlist check |
| yoti_python_sdk/doc_scan/session/create/subcheck/* | New IssuingAuthority sub-check (incomplete impl) |
| yoti_python_sdk/doc_scan/session/create/sdk_config.py, notification_config.py, session_spec.py | New config options |
| yoti_python_sdk/doc_scan/session/create/filter/orthogonal_restrictions_filter.py | allow_non_latin_documents flag |
| yoti_python_sdk/doc_scan/support/supported_documents.py | is_strictly_latin field |
| yoti_python_sdk/doc_scan/constants.py | New constants |
| yoti_python_sdk/protobuf/{sharepubapi_v1,compubapi_v1,attrpubapi_v1}/* | New regenerated protobufs |
| yoti_python_sdk/protobuf/{share_public_api,common_public_api,attribute_public_api}/* | Removed old protobufs |
| yoti_python_sdk/protobuf/protobuf.py, anchor.py, share/extra_data.py | Switched to new protobuf import paths |
| yoti_python_sdk/init.py, version.py | Version bump and simplified version loading |
| yoti_python_sdk/tests/** | New tests for added features and updated protobuf imports |
| setup.py, requirements.in, requirements.txt | Dependency and Python version overhaul |
| examples/** | Updated example dependencies, Django URL conf, new privacy page |
| .github/workflows/*.yaml | CI matrix updated; reverted pull_request_target guards |
| sonar-project.properties, README.md | Misc updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* SDK-2648 updated version of protobuf * Update version to 2.14.4 * SDK-2648: Update protobuf to 4.21.12+ * Remove accidentally committed virtual environment files from Flask example * Update doc_scan example requirements for protobuf 4.21.12 and SDK v2.14.4 * Update Flask example requirements for protobuf 4.21.12 and SDK v2.14.4 * updated versions in examples * Fix GitHub Actions workflow to install local SDK before example requirements
* Python library updates * added python static liveness check (#425) * update version files
f4ec9af to
0aa9b4e
Compare
|



SDK-2758: Add support for retrieving share code resources & tasks
Summary
Adds support for parsing and retrieving share code resources and verify share code tasks from IDV session responses.
Changes
New Files
share_code_resource_response.py—ShareCodeResourceResponseextendingResourceResponsewith:source(supports both string and object formats)created_at,last_updatedlookup_profile,returned_profile,id_photo,file(asShareCodeMediaResponse)verify_share_code_tasksfiltered propertyshare_code_media_response.py—ShareCodeMediaResponsewrapping aMediaResponseverify_share_code_task_response.py—VerifyShareCodeTaskResponseextendingTaskResponseModified Files
constants.py— AddedVERIFY_SHARE_CODE_TASKconstantresource_container.py— Parseshare_codesfrom session response, expose viashare_codespropertyresource_response.py— MapVERIFY_SHARE_CODE_TASKtype toVerifyShareCodeTaskResponse