Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Oct 8, 2025

This PR contains updates to the Apple SDK for version 13.1.0.

@coderabbitai
Copy link

coderabbitai bot commented Oct 8, 2025

Warning

Rate limit exceeded

@ChiragAgg5k has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 31 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b821328 and baf0d22.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • Sources/Appwrite/Client.swift (1 hunks)

Walkthrough

Introduces version 13.0.1 updates across docs and SDK. Adds Account APIs createEmailVerification and updateEmailVerification. Marks createVerification and updateVerification as deprecated and points them to the email verification endpoints. Updates internal paths for phone verification endpoints to /account/verifications/phone. Bumps x-sdk-version header to 13.0.1 and updates README Swift Package Manager version to 13.0.1. Adds documentation examples for creating and updating email verification. Updates TablesDb inline documentation links without changing behavior.

Possibly related PRs

Suggested reviewers

  • abnegate

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title specifies an Apple SDK update to version 13.1.0, but the changeset clearly bumps the SDK to version 13.0.1 and adds email verification endpoints; this mismatch makes the title misleading and does not accurately reflect the primary change. Please update the title to correctly reference version 13.0.1 and, if space permits, mention the addition of email verification methods to clearly summarize the main changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
Sources/Appwrite/Services/Account.swift (2)

2261-2286: Consider refactoring to reduce code duplication.

The deprecated createVerification method duplicates the entire implementation of the new createEmailVerification method. To improve maintainability and reduce duplication, the deprecated method could simply delegate to the new one.

Apply this diff to eliminate duplication:

 @available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.createEmailVerification` instead.")
 open func createVerification(
     url: String
 ) async throws -> AppwriteModels.Token {
-    let apiPath: String = "/account/verifications/email"
-
-    let apiParams: [String: Any?] = [
-        "url": url
-    ]
-
-    let apiHeaders: [String: String] = [
-        "content-type": "application/json"
-    ]
-
-    let converter: (Any) -> AppwriteModels.Token = { response in
-        return AppwriteModels.Token.from(map: response as! [String: Any])
-    }
-
-    return try await client.call(
-        method: "POST",
-        path: apiPath,
-        headers: apiHeaders,
-        params: apiParams,
-        converter: converter
-    )
+    return try await createEmailVerification(url: url)
 }

2340-2367: Consider refactoring to reduce code duplication.

The deprecated updateVerification method duplicates the entire implementation of the new updateEmailVerification method. Similar to createVerification, this could be refactored to delegate to the new method.

Apply this diff to eliminate duplication:

 @available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.updateEmailVerification` instead.")
 open func updateVerification(
     userId: String,
     secret: String
 ) async throws -> AppwriteModels.Token {
-    let apiPath: String = "/account/verifications/email"
-
-    let apiParams: [String: Any?] = [
-        "userId": userId,
-        "secret": secret
-    ]
-
-    let apiHeaders: [String: String] = [
-        "content-type": "application/json"
-    ]
-
-    let converter: (Any) -> AppwriteModels.Token = { response in
-        return AppwriteModels.Token.from(map: response as! [String: Any])
-    }
-
-    return try await client.call(
-        method: "PUT",
-        path: apiPath,
-        headers: apiHeaders,
-        params: apiParams,
-        converter: converter
-    )
+    return try await updateEmailVerification(userId: userId, secret: secret)
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f79e67 and b821328.

📒 Files selected for processing (7)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • Sources/Appwrite/Client.swift (1 hunks)
  • Sources/Appwrite/Services/Account.swift (4 hunks)
  • Sources/Appwrite/Services/TablesDb.swift (4 hunks)
  • docs/examples/account/create-email-verification.md (1 hunks)
  • docs/examples/account/update-email-verification.md (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
Sources/Appwrite/Services/Account.swift (2)
Sources/Appwrite/Client.swift (1)
  • call (301-332)
Sources/Appwrite/Services/Databases.swift (15)
  • deprecated (22-50)
  • deprecated (63-75)
  • deprecated (92-126)
  • deprecated (143-159)
  • deprecated (173-203)
  • deprecated (217-231)
  • deprecated (248-282)
  • deprecated (299-315)
  • deprecated (330-364)
  • deprecated (379-395)
  • deprecated (407-429)
  • deprecated (444-480)
  • deprecated (495-513)
  • deprecated (528-564)
  • deprecated (579-597)
🪛 markdownlint-cli2 (0.18.1)
docs/examples/account/create-email-verification.md

10-10: Bare URL used

(MD034, no-bare-urls)

🪛 SwiftLint (0.57.0)
Sources/Appwrite/Services/Account.swift

[Error] 2227-2227: Force casts should be avoided

(force_cast)


[Error] 2316-2316: Force casts should be avoided

(force_cast)

🔇 Additional comments (8)
Sources/Appwrite/Services/TablesDb.swift (1)

78-81: Keep camelCase slug for tablesDB

Requests to https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable return 200 OK while the lowercase slug returns 404, so no change is needed.

Likely an incorrect or invalid review comment.

Sources/Appwrite/Client.swift (1)

26-26: LGTM! Version header updated correctly.

The SDK version header has been properly incremented to 13.0.1, consistent with the version bump across the PR.

README.md (1)

34-34: LGTM! Swift Package Manager dependency version updated correctly.

The dependency version has been properly updated to 13.0.1, consistent with the SDK version bump.

docs/examples/account/update-email-verification.md (1)

1-13: LGTM! Clear and correct example.

The example demonstrates proper usage of the new updateEmailVerification API with appropriate placeholders and async/await syntax.

docs/examples/account/create-email-verification.md (1)

1-12: LGTM! Clear and correct example.

The example demonstrates proper usage of the new createEmailVerification API with appropriate async/await syntax.

Sources/Appwrite/Services/Account.swift (3)

2213-2237: LGTM! New email verification method implemented correctly.

The new createEmailVerification method is properly implemented with correct endpoint path, HTTP method, and return type. The implementation follows established patterns in the codebase.


2300-2326: LGTM! New email verification update method implemented correctly.

The new updateEmailVerification method is properly implemented with the correct endpoint, HTTP method, and parameters. The implementation is consistent with other methods in the service.


2382-2403: LGTM! Phone verification paths updated consistently.

The phone verification endpoint paths have been properly updated to use the /account/verifications/phone namespace, maintaining consistency with the new email verification structure. The method signatures remain unchanged, preserving backward compatibility.

Also applies to: 2417-2443

CHANGELOG.md Outdated
Comment on lines 3 to 7
## 13.0.1

* Deprecate `createVerification` method in `Account` service
* Add `createEmailVerification` method in `Account` service

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Changelog is incomplete.

The changelog entry for version 13.0.1 only documents the deprecation of createVerification and the addition of createEmailVerification. However, based on the changes in Sources/Appwrite/Services/Account.swift, the following are also missing:

  • Deprecation of updateVerification method
  • Addition of updateEmailVerification method
  • Internal path updates for phone verification endpoints (createPhoneVerification and updatePhoneVerification now use /account/verifications/phone)

Apply this diff to complete the changelog:

 ## 13.0.1
 
 * Deprecate `createVerification` method in `Account` service
+* Deprecate `updateVerification` method in `Account` service
 * Add `createEmailVerification` method in `Account` service
+* Add `updateEmailVerification` method in `Account` service
+* Update phone verification endpoints to use `/account/verifications/phone` path
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 13.0.1
* Deprecate `createVerification` method in `Account` service
* Add `createEmailVerification` method in `Account` service
## 13.0.1
* Deprecate `createVerification` method in `Account` service
* Deprecate `updateVerification` method in `Account` service
* Add `createEmailVerification` method in `Account` service
* Add `updateEmailVerification` method in `Account` service
* Update phone verification endpoints to use `/account/verifications/phone` path
🤖 Prompt for AI Agents
In CHANGELOG.md around lines 3 to 7, the 13.0.1 entry is missing several items
present in Sources/Appwrite/Services/Account.swift: add a bullet marking the
deprecation of the updateVerification method, add a bullet for the new
updateEmailVerification method in the Account service, and add a note that
internal paths for phone verification endpoints have changed so
createPhoneVerification and updatePhoneVerification now use
/account/verifications/phone; update the changelog section to include these
three items consistent with the existing style.

@ChiragAgg5k ChiragAgg5k changed the title feat: Apple SDK update for version 13.0.1 feat: Apple SDK update for version 13.1.0 Oct 8, 2025
@abnegate abnegate merged commit 907ac8a into main Oct 8, 2025
1 check passed
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