Skip to content

Conversation

@mehmet-yoti
Copy link
Contributor

Automated PR created by n8n. Related Jira Issue: SDK-2752

@mehmet-yoti
Copy link
Contributor Author

@copilot do To implement support for the new resource type SHARE_CODE in the SDKs, we'll approach the task in a series of well-defined steps. This will ensure that the SDKs can request and retrieve this new type of resource when creating and retrieving sessions. Below is a detailed implementation plan, broken down into subtasks:

1. Update SDK Data Models

  • Task 1.1: Extend the session creation model

    • Add a required_share_codes array to the session creation request model.
    • Each entry in this array should have fields:
      • issuer: string
      • scheme: string
    • Ensure no validation is performed on these fields at the SDK level.
  • Task 1.2: Extend the session retrieval response model

    • Add a share_codes array within the resources object.
    • Each entry in this array should include:
      • id: string
      • source: string
      • created_at: string
      • last_updated: string
      • lookup_profile, returned_profile, id_photo, file: objects containing media attributes using the existing media model.
      • tasks: an array containing task entries with the following fields:
        • type: string "VERIFY_SHARE_CODE_TASK"
        • id: string
        • state: string
        • created: string
        • last_updated: string
        • generated_media: array containing objects with id and type fields.

2. Implement Session Creation Logic

  • Task 2.1: Update the session creation request handler

    • Modify the API endpoint or method responsible for constructing session requests to include the required_share_codes field.
  • Task 2.2: Serialize the required_share_codes field into the JSON payload for session creation requests.

3. Implement Session Retrieval Logic

  • Task 3.1: Update the session retrieval response handler

    • Modify the method responsible for parsing the session retrieval response to handle share_codes.
  • Task 3.2: Deserialize the share_codes field from the JSON response into the SDK's data model.

4. Update Documentation

  • Task 4.1: Update developer documentation
    • Document the new required_share_codes field in session creation requests.
    • Document the share_codes field in session retrieval responses, including a detailed description of each component (e.g., lookup_profile, returned_profile, id_photo, file, tasks).

5. Testing

  • Task 5.1: Unit Testing

    • Write unit tests for session creation to ensure required_share_codes is properly serialized.
    • Write unit tests for session retrieval to verify correct parsing of share_codes.
  • Task 5.2: Integration Testing

    • Conduct end-to-end tests to ensure that session creation and retrieval work seamlessly with the updated data model.
    • Ensure compatibility with existing session management and retrieval functionalities.

6. Code Review and Deployment

  • Task 6.1: Conduct peer code reviews to ensure all changes adhere to coding standards and best practices.

  • Task 6.2: Merge approved changes into the main branch and deploy updates to the SDK.

This plan ensures that by following the steps, the SDKs will successfully support the new SHARE_CODE resource type, allowing clients to request and retrieve share code resources efficiently.

Copy link

Copilot AI commented Dec 10, 2025

@mehmet-yoti I've opened a new pull request, #442, to work on those changes. Once the pull request is ready, I'll request review from you.

@sonarqubecloud
Copy link

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