Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adapt api v8 changes [WPB-15722] #3288

Merged
merged 5 commits into from
Feb 11, 2025
Merged

feat: adapt api v8 changes [WPB-15722] #3288

merged 5 commits into from
Feb 11, 2025

Conversation

MohamadJaara
Copy link
Member

@MohamadJaara MohamadJaara commented Feb 10, 2025

TaskWPB-15722 [Android] - Adopt API v8 changes in existing endpoints


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

add the following changes

Removed endpoints in V8

  • GET /calls/config. Use GET /calls/config/v2 instead. (Do not mind the double versioning. This will be cleaned up as soon as we get to it)

    • already used
  • POST /password-reset/:key. Use POST /password-reset/complete instead.

    • not used
  • POST /onboarding/v3

    • not used
  • PUT /conversations/:cnv. Use PUT /conversations/:domain/:conv/name instead.

    • already uesd
  • PUT /conversations/:cnv/name. Use PUT /conversations/:domain/:conv/name instead.

    • already used
    • PUT /conversations/:cnv/message-timer. Use /conversations/:domain/:cnv/message-timer instead
      • done
  • PUT /conversations/:cnv/receit-mode. Use PUT /conversations/:domain/:cnv/receipt-mode instead

    • already used
  • PUT /conversations/:cnv/self. Use /conversations/:domain/:conv/self instead.

    • already used
  • GET /conversations/:cnv/self.

    • not used

Changed endpoints in V8

  • There is a new type of capability in capabilities field for Client: consumable-notifications. This will only show up when using API v7. In the notifications containing the Client structure, this capability will not be visible.

    • done
  • GET /scim/auth-tokens returns an array of ScimTokenInfoitems which now have a (non-optional) additional field: name.

    • not used in the app
  • POST /scim/auth-tokens request has a new optional field: name. If not specified, the name will be set to the ID of the SCIM token by the backend. (Same for scim token info coming back from the server in this or other routes, except on the way back from the server the name field is always set to a value, either user-specified or the UUID, like in get.)

    • not used
  • POST /scim/auth-tokens request has a new optional field: idp id (UUIDv4). If specified, the scim peer will associate with the given idp and share the same user base. If not, the scim peer will provision password-authenticated users. (Same field in idp info coming back from the server in this or other routes; the idp id field may be missing if no idp id was specified).
    NOTE: this changes the behavior of a request without idp:

    • V1..V7: if there is an idp registered with the team, associate.
    • V8 and higher (later, younger): never associate.
    • The restriction that you can only have at least one scim token or multiple IdPs configured in one team, but not both, has been lifted: you can now create multiple IdPs, and associate multiple scim tokens with 0 or 1 or the existing idps.
      • not used
  • The ciphersuite or ciphersuites query parameters were optional before and are required now for the endpoints

    • POST /mls/key-packages/claim/{user_domain}/{user} (claim key packages),

      • already required
    • DELETE /mls/key-packages/self/{client} (delete key packages),

      • not used
    • PUT /mls/key-packages/self/{client} (replace key packages), and

      • already done
    • GET /mls/key-packages/self/{client}/count (count key packages).

      • done

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@MohamadJaara MohamadJaara changed the title feat: adapt api v8 changes feat: adapt api v8 changes [WPB-15722] Feb 10, 2025
@@ -370,7 +370,7 @@ internal open class ConversationApiV0 internal constructor(
messageTimer: Long?
): NetworkResponse<EventContentDTO.Conversation.MessageTimerUpdate> =
wrapKaliumResponse {
httpClient.put("$PATH_CONVERSATIONS/${conversationId.value}/$PATH_MESSAGE_TIMER") {
httpClient.put("$PATH_CONVERSATIONS/${conversationId.domain}/${conversationId.value}/$PATH_MESSAGE_TIMER") {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change log mentions that the nonqualified will be removed in v8 but checking swagger the qualified one exists since v0 so i just changed it to all versions

Copy link
Contributor

github-actions bot commented Feb 10, 2025

Test Results

3 519 tests  +4   3 411 ✅ +4   6m 4s ⏱️ +5s
  603 suites ±0     108 💤 ±0 
  603 files   ±0       0 ❌ ±0 

Results for commit f0e8c18. ± Comparison against base commit a5d42e4.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

Copy link
Contributor

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.84%. Comparing base (a5d42e4) to head (f0e8c18).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3288      +/-   ##
===========================================
- Coverage    50.84%   50.84%   -0.01%     
===========================================
  Files         1607     1607              
  Lines        58059    58082      +23     
  Branches      5204     5208       +4     
===========================================
+ Hits         29521    29531      +10     
- Misses       26522    26535      +13     
  Partials      2016     2016              

see 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5d42e4...f0e8c18. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: feat/api-v8
Commit report: 80e4a8b
Test service: kalium-jvm

✅ 0 Failed, 3411 Passed, 108 Skipped, 1m 0.69s Total Time

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 11, 2025
Merged via the queue into develop with commit 23e2243 Feb 11, 2025
22 checks passed
@MohamadJaara MohamadJaara deleted the feat/api-v8 branch February 11, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants