From 6290a664e9f4b48fd0152e726adb279bf7c0edcd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 6 May 2026 14:16:59 +0530 Subject: [PATCH] refactor: rename presence methods for consistency and clarity --- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Get.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- tests/e2e/Services/GraphQL/PresenceTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 6963bda7d2..2d3950645f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -39,7 +39,7 @@ class Delete extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'deletePresence', + name: 'delete', description: 'Delete a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 058cb2fa6f..6c6f02e1ab 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -33,7 +33,7 @@ class Get extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'getPresence', + name: 'get', description: 'Get a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 336264730d..f59e85c0ed 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -50,7 +50,7 @@ class Update extends PlatformAction new Method( namespace: 'presences', group: 'presences', - name: 'updatePresence', + name: 'update', description: 'Update a presence log by its unique ID.', auth: [AuthType::SESSION], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 0be1c58402..e4a6e20da0 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -73,7 +73,7 @@ class Upsert extends PlatformAction new Method( namespace: 'presences', group: 'presences', - name: 'upsertPresence', + name: 'upsert', description: 'Create or update a presence log by its unique ID.', auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 94710715cc..19883181a5 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -43,7 +43,7 @@ class XList extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'listPresences', + name: 'list', description: 'List presence logs.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index d1fb786ac5..7fa5474e83 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -22,7 +22,7 @@ class PresenceTest extends Scope $payload = [ 'query' => <<<'GQL' mutation upsertPresence($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { - presencesUpsertPresence(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { + presencesUpsert(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { _id userId status