Merge pull request #5126 from appwrite/feat-reset-sdk-account-model
switch SDK response model from account to user
This commit is contained in:
commit
8b79438755
1 changed files with 7 additions and 7 deletions
|
@ -62,7 +62,7 @@ App::post('/v1/account')
|
||||||
->label('sdk.description', '/docs/references/account/create.md')
|
->label('sdk.description', '/docs/references/account/create.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
|
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('abuse-limit', 10)
|
->label('abuse-limit', 10)
|
||||||
->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
|
->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
|
||||||
->param('email', '', new Email(), 'User email.')
|
->param('email', '', new Email(), 'User email.')
|
||||||
|
@ -1328,7 +1328,7 @@ App::get('/v1/account')
|
||||||
->label('sdk.description', '/docs/references/account/get.md')
|
->label('sdk.description', '/docs/references/account/get.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('sdk.offline.model', '/account')
|
->label('sdk.offline.model', '/account')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
->inject('response')
|
->inject('response')
|
||||||
|
@ -1520,7 +1520,7 @@ App::patch('/v1/account/name')
|
||||||
->label('sdk.description', '/docs/references/account/update-name.md')
|
->label('sdk.description', '/docs/references/account/update-name.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('sdk.offline.model', '/account')
|
->label('sdk.offline.model', '/account')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
->param('name', '', new Text(128), 'User name. Max length: 128 chars.')
|
->param('name', '', new Text(128), 'User name. Max length: 128 chars.')
|
||||||
|
@ -1558,9 +1558,9 @@ App::patch('/v1/account/password')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
||||||
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
|
|
||||||
->label('sdk.offline.model', '/account')
|
->label('sdk.offline.model', '/account')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
|
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
|
||||||
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
|
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
|
||||||
->inject('requestTimestamp')
|
->inject('requestTimestamp')
|
||||||
->inject('response')
|
->inject('response')
|
||||||
|
@ -1618,7 +1618,7 @@ App::patch('/v1/account/email')
|
||||||
->label('sdk.description', '/docs/references/account/update-email.md')
|
->label('sdk.description', '/docs/references/account/update-email.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('sdk.offline.model', '/account')
|
->label('sdk.offline.model', '/account')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
->param('email', '', new Email(), 'User email.')
|
->param('email', '', new Email(), 'User email.')
|
||||||
|
@ -1674,7 +1674,7 @@ App::patch('/v1/account/phone')
|
||||||
->label('sdk.description', '/docs/references/account/update-phone.md')
|
->label('sdk.description', '/docs/references/account/update-phone.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('sdk.offline.model', '/account')
|
->label('sdk.offline.model', '/account')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.')
|
->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.')
|
||||||
|
@ -1726,7 +1726,7 @@ App::patch('/v1/account/prefs')
|
||||||
->label('sdk.description', '/docs/references/account/update-prefs.md')
|
->label('sdk.description', '/docs/references/account/update-prefs.md')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_ACCOUNT)
|
->label('sdk.response.model', Response::MODEL_USER)
|
||||||
->label('sdk.offline.model', '/account/prefs')
|
->label('sdk.offline.model', '/account/prefs')
|
||||||
->label('sdk.offline.key', 'current')
|
->label('sdk.offline.key', 'current')
|
||||||
->param('prefs', [], new Assoc(), 'Prefs key-value JSON object.')
|
->param('prefs', [], new Assoc(), 'Prefs key-value JSON object.')
|
||||||
|
|
Loading…
Reference in a new issue