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

Implemented all documents endpoints #557

Merged
merged 22 commits into from
Dec 10, 2024
Merged

Implemented all documents endpoints #557

merged 22 commits into from
Dec 10, 2024

Conversation

pingu2k4
Copy link
Contributor

@pingu2k4 pingu2k4 commented Dec 10, 2024

Changes

  • Added Create Document endpoint
  • Added Delete Document endpoint
  • Added Get Document Endpoint
  • Added List Documents endpoint
  • Added Update Document endpoint
  • Added Utility for creating document to compare a before and after snapshot of a concrete class

Issue

Categorise the PR

  • feature
  • bug
  • docs
  • security
  • meta
  • patch
  • minor
  • major

Description by Korbit AI

What change is being made?

Implement all CRUD endpoints for documents within the database client, including corresponding tests and updates to the README progress indicators.

Why are these changes being made?

This change addresses the integration of document-level operations, allowing users to list, create, update, fetch, and delete documents within collections. Implementing these endpoints fills a critical gap in the client functionality, provides a complete interface for document manipulation, and aligns with backend capabilities. Some adjustments in exception handling facilitate robustness and error management, and comprehensive tests ensure reliability.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@pingu2k4 pingu2k4 self-assigned this Dec 10, 2024
Copy link

korbit-ai bot commented Dec 10, 2024

Korbit doesn't automatically review large (500+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
PinguApps.Appwrite.Client 100% 100% 136
PinguApps.Appwrite.Server 100% 100% 150
PinguApps.Appwrite.Shared 100% 100% 1318
Summary 100% (3625 / 3626) 100% (649 / 651) 1604

Copy link

Test Results

3 652 tests  +50   3 652 ✅ +50   26s ⏱️ ±0s
    3 suites ± 0       0 💤 ± 0 
    3 files   ± 0       0 ❌ ± 0 

Results for commit 7cb674e. ± Comparison against base commit c929cf8.

This pull request removes 342 and adds 392 tests. Note that renamed tests count towards both.
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = 1800, SessionId = "675348660027f7a3b4d7", UserId = "675348660027f693a53e", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = null, SessionId = null, UserId = "675348660027eabeb0e2", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "675348660027f2235519", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "675348660027f555ce09", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "67534866002808399203", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "6753486600280ab3c4a0", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label1", "label2"], UserId = "675348660028045cdaa7", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label3", "label4"], UserId = "675348660028089b2af1", ValidationContext = None })
PinguApps.Appwrite.Shared.Tests.Converters.DocumentConverterTests ‑ Read_MissingCreatedAt_ThrowsJsonException
PinguApps.Appwrite.Shared.Tests.Converters.DocumentConverterTests ‑ Read_MissingUpdatedAt_ThrowsJsonException
…
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ CreateDocument_ShouldHandleException_WhenApiCallFails
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ CreateDocument_ShouldIncludeSessionHeaders_WhenProvided
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ CreateDocument_ShouldReturnErrorResponse_WhenExceptionOccurs
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ CreateDocument_ShouldReturnSuccess_WhenApiCallSucceeds
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ DeleteDocument_ShouldHandleException_WhenApiCallFails
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ DeleteDocument_ShouldIncludeSessionHeaders_WhenProvided
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ DeleteDocument_ShouldReturnErrorResponse_WhenExceptionOccurs
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ DeleteDocument_ShouldReturnSuccess_WhenApiCallSucceeds
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ GetDocument_ShouldHandleException_WhenApiCallFails
PinguApps.Appwrite.Client.Tests.Clients.Databases.DatabasesClientTests ‑ GetDocument_ShouldIncludeSessionHeaders_WhenProvided
…

@pingu2k4 pingu2k4 merged commit 9301dbe into dev Dec 10, 2024
6 checks passed
@pingu2k4 pingu2k4 deleted the database-documents branch December 10, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete Document Update Document Get Document Create Document List Documents
1 participant