refactor: rename ImpersonateUserIdQuery to ImpersonateUserQuery per ProjectQuery pattern

This commit is contained in:
harsh mahajan committed 2026-06-06 19:36:54 +05:30
1 parent dfbba81e91
commit c3c8fb5b9f
14 files changed
+16 -16

No files matched your search

@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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'])
@@ -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'])
@@ -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.')
@@ -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).')
@@ -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.')
+3 -3
View File
@@ -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.',