From c3c8fb5b9f9f213e919b7f1d23decc8e2de6e679 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Sat, 6 Jun 2026 19:36:54 +0530 Subject: [PATCH] refactor: rename ImpersonateUserIdQuery to ImpersonateUserQuery per ProjectQuery pattern --- src/Appwrite/Platform/Modules/Avatars/Http/Browsers/Get.php | 2 +- .../Platform/Modules/Avatars/Http/CreditCards/Get.php | 2 +- src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php | 2 +- src/Appwrite/Platform/Modules/Avatars/Http/Flags/Get.php | 2 +- src/Appwrite/Platform/Modules/Avatars/Http/Image/Get.php | 2 +- src/Appwrite/Platform/Modules/Avatars/Http/Initials/Get.php | 2 +- src/Appwrite/Platform/Modules/Avatars/Http/QR/Get.php | 2 +- .../Platform/Modules/Avatars/Http/Screenshots/Get.php | 2 +- .../Modules/Functions/Http/Deployments/Download/Get.php | 2 +- .../Modules/Sites/Http/Deployments/Download/Get.php | 2 +- .../Modules/Storage/Http/Buckets/Files/Download/Get.php | 2 +- .../Modules/Storage/Http/Buckets/Files/Preview/Get.php | 2 +- .../Modules/Storage/Http/Buckets/Files/View/Get.php | 2 +- src/Appwrite/Platform/Tasks/Specs.php | 6 +++--- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Browsers/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Browsers/Get.php index 6bb6731c04..2d66b5b21b 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Browsers/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Browsers/Get.php @@ -42,7 +42,7 @@ class Get extends Action description: '/docs/references/avatars/get-browser.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/CreditCards/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/CreditCards/Get.php index 304c47583b..710c7cd61d 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/CreditCards/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/CreditCards/Get.php @@ -42,7 +42,7 @@ class Get extends Action description: '/docs/references/avatars/get-credit-card.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php index 89e9c73ab8..244f426c4d 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php @@ -54,7 +54,7 @@ class Get extends Action description: '/docs/references/avatars/get-favicon.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Flags/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Flags/Get.php index 11d3b50a99..dfeaff0f8a 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Flags/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Flags/Get.php @@ -42,7 +42,7 @@ class Get extends Action description: '/docs/references/avatars/get-flag.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Image/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Image/Get.php index 64ced4cc68..3c791aa128 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Image/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Image/Get.php @@ -45,7 +45,7 @@ class Get extends Action description: '/docs/references/avatars/get-image.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Initials/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Initials/Get.php index 93ca892f6c..792026577b 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Initials/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Initials/Get.php @@ -44,7 +44,7 @@ class Get extends Action description: '/docs/references/avatars/get-initials.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/QR/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/QR/Get.php index 67565220fc..b8f3d0247d 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/QR/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/QR/Get.php @@ -42,7 +42,7 @@ class Get extends Action description: '/docs/references/avatars/get-qr.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php index cf6b5e2b0a..63d7d3f85e 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php @@ -57,7 +57,7 @@ class Get extends Action description: '/docs/references/avatars/get-screenshot.md', auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Download/Get.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Download/Get.php index eb7d51921e..8adff12784 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Download/Get.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Download/Get.php @@ -53,7 +53,7 @@ class Get extends Action ], contentType: ContentType::ANY, type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], )) ->param('functionId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Function ID.', false, ['dbForProject']) ->param('deploymentId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Deployment ID.', false, ['dbForProject']) diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Download/Get.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Download/Get.php index 26987d145f..088bf6c499 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Download/Get.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Download/Get.php @@ -51,7 +51,7 @@ class Get extends Action ) ], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], contentType: ContentType::ANY, )) ->param('siteId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Site ID.', false, ['dbForProject']) diff --git a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Download/Get.php b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Download/Get.php index e24b6819fa..a11560cd5a 100644 --- a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Download/Get.php +++ b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Download/Get.php @@ -58,7 +58,7 @@ class Get extends Action ], contentType: ContentType::ANY, type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], )) ->param('bucketId', '', new UID(), 'Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') diff --git a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Preview/Get.php b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Preview/Get.php index 9c7c7ea1d1..dcc033260f 100644 --- a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Preview/Get.php +++ b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Preview/Get.php @@ -71,7 +71,7 @@ class Get extends Action ) ], type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], contentType: ContentType::IMAGE )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') diff --git a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/View/Get.php b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/View/Get.php index a0f2d3a0bc..a88b41b3bc 100644 --- a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/View/Get.php +++ b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/View/Get.php @@ -59,7 +59,7 @@ class Get extends Action ], contentType: ContentType::ANY, type: MethodType::LOCATION, - locationAuth: ['Project', 'ImpersonateUserIdQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], + locationAuth: ['Project', 'ImpersonateUserQuery', 'ImpersonateUserEmailQuery', 'ImpersonateUserPhoneQuery'], )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index ffe8757a78..fa3889125d 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -181,7 +181,7 @@ class Specs extends Action 'description' => 'Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.', 'in' => 'header', ], - 'ImpersonateUserIdQuery' => [ + 'ImpersonateUserQuery' => [ 'type' => 'apiKey', 'name' => 'impersonateUserId', 'description' => 'Impersonate a user by ID via query param. Used for location-type methods where headers cannot be set.', @@ -273,7 +273,7 @@ class Specs extends Action 'description' => 'Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.', 'in' => 'header', ], - 'ImpersonateUserIdQuery' => [ + 'ImpersonateUserQuery' => [ 'type' => 'apiKey', 'name' => 'impersonateUserId', 'description' => 'Impersonate a user by ID via query param. Used for location-type methods where headers cannot be set.', @@ -365,7 +365,7 @@ class Specs extends Action 'description' => 'Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.', 'in' => 'header', ], - 'ImpersonateUserIdQuery' => [ + 'ImpersonateUserQuery' => [ 'type' => 'apiKey', 'name' => 'impersonateUserId', 'description' => 'Impersonate a user by ID via query param. Used for location-type methods where headers cannot be set.',