mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '0.7.x' of github.com:appwrite/appwrite into swoole-and-functions
This commit is contained in:
@@ -27,17 +27,17 @@ App::post('/v1/projects')
|
||||
->label('scope', 'projects.write')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'create')
|
||||
->param('name', null, function () { return new Text(100); }, 'Project name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Project name. Max length: 128 chars.')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('description', '', function () { return new Text(255); }, 'Project description.', true)
|
||||
->param('description', '', function () { return new Text(256); }, 'Project description. Max length: 256 chars.', true)
|
||||
->param('logo', '', function () { return new Text(1024); }, 'Project logo.', true)
|
||||
->param('url', '', function () { return new URL(); }, 'Project URL.', true)
|
||||
->param('legalName', '', function () { return new Text(256); }, 'Project legal Name.', true)
|
||||
->param('legalCountry', '', function () { return new Text(256); }, 'Project legal Country.', true)
|
||||
->param('legalState', '', function () { return new Text(256); }, 'Project legal State.', true)
|
||||
->param('legalCity', '', function () { return new Text(256); }, 'Project legal City.', true)
|
||||
->param('legalAddress', '', function () { return new Text(256); }, 'Project legal Address.', true)
|
||||
->param('legalTaxId', '', function () { return new Text(256); }, 'Project legal Tax ID.', true)
|
||||
->param('legalName', '', function () { return new Text(256); }, 'Project legal Name. Max length: 256 chars.', true)
|
||||
->param('legalCountry', '', function () { return new Text(256); }, 'Project legal Country. Max length: 256 chars.', true)
|
||||
->param('legalState', '', function () { return new Text(256); }, 'Project legal State. Max length: 256 chars.', true)
|
||||
->param('legalCity', '', function () { return new Text(256); }, 'Project legal City. Max length: 256 chars.', true)
|
||||
->param('legalAddress', '', function () { return new Text(256); }, 'Project legal Address. Max length: 256 chars.', true)
|
||||
->param('legalTaxId', '', function () { return new Text(256); }, 'Project legal Tax ID. Max length: 256 chars.', true)
|
||||
->action(function ($name, $teamId, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $consoleDB, $projectDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -92,7 +92,7 @@ App::get('/v1/projects')
|
||||
->label('scope', 'projects.read')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'list')
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true)
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||
->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true)
|
||||
->param('orderType', 'ASC', function () { return new WhiteList(['ASC', 'DESC']); }, 'Order result by ASC or DESC order.', true)
|
||||
@@ -349,16 +349,16 @@ App::patch('/v1/projects/:projectId')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'update')
|
||||
->param('projectId', '', function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('name', null, function () { return new Text(100); }, 'Project name.')
|
||||
->param('description', '', function () { return new Text(255); }, 'Project description.', true)
|
||||
->param('name', null, function () { return new Text(128); }, 'Project name. Max length: 128 chars.')
|
||||
->param('description', '', function () { return new Text(256); }, 'Project description. Max length: 256 chars.', true)
|
||||
->param('logo', '', function () { return new Text(1024); }, 'Project logo.', true)
|
||||
->param('url', '', function () { return new URL(); }, 'Project URL.', true)
|
||||
->param('legalName', '', function () { return new Text(256); }, 'Project legal name.', true)
|
||||
->param('legalCountry', '', function () { return new Text(256); }, 'Project legal country..', true)
|
||||
->param('legalState', '', function () { return new Text(256); }, 'Project legal state.', true)
|
||||
->param('legalCity', '', function () { return new Text(256); }, 'Project legal city.', true)
|
||||
->param('legalAddress', '', function () { return new Text(256); }, 'Project legal address.', true)
|
||||
->param('legalTaxId', '', function () { return new Text(256); }, 'Project legal tax ID.', true)
|
||||
->param('legalName', '', function () { return new Text(256); }, 'Project legal name. Max length: 256 chars.', true)
|
||||
->param('legalCountry', '', function () { return new Text(256); }, 'Project legal country. Max length: 256 chars.', true)
|
||||
->param('legalState', '', function () { return new Text(256); }, 'Project legal state. Max length: 256 chars.', true)
|
||||
->param('legalCity', '', function () { return new Text(256); }, 'Project legal city. Max length: 256 chars.', true)
|
||||
->param('legalAddress', '', function () { return new Text(256); }, 'Project legal address. Max length: 256 chars.', true)
|
||||
->param('legalTaxId', '', function () { return new Text(256); }, 'Project legal tax ID. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $name, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -397,8 +397,8 @@ App::patch('/v1/projects/:projectId/oauth2')
|
||||
->label('sdk.method', 'updateOAuth2')
|
||||
->param('projectId', '', function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('provider', '', function () { return new WhiteList(\array_keys(Config::getParam('providers'))); }, 'Provider Name', false)
|
||||
->param('appId', '', function () { return new Text(256); }, 'Provider app ID.', true)
|
||||
->param('secret', '', function () { return new text(512); }, 'Provider secret key.', true)
|
||||
->param('appId', '', function () { return new Text(256); }, 'Provider app ID. Max length: 256 chars.', true)
|
||||
->param('secret', '', function () { return new text(512); }, 'Provider secret key. Max length: 512 chars.', true)
|
||||
->action(function ($projectId, $provider, $appId, $secret, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -488,12 +488,12 @@ App::post('/v1/projects/:projectId/webhooks')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'createWebhook')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Webhook name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Webhook name. Max length: 128 chars.')
|
||||
->param('events', null, function () { return new ArrayList(new WhiteList(array_keys(Config::getParam('events')), true)); }, 'Events list.')
|
||||
->param('url', null, function () { return new URL(); }, 'Webhook URL.')
|
||||
->param('security', false, function () { return new Boolean(true); }, 'Certificate verification, false for disabled or true for enabled.')
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Webhook HTTP user.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Webhook HTTP password.', true)
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Webhook HTTP user. Max length: 256 chars.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Webhook HTTP password. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $name, $events, $url, $security, $httpUser, $httpPass, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -625,11 +625,12 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId')
|
||||
->label('sdk.method', 'updateWebhook')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('webhookId', null, function () { return new UID(); }, 'Webhook unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Webhook name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Webhook name. Max length: 128 chars.')
|
||||
->param('events', null, function () { return new ArrayList(new WhiteList(array_keys(Config::getParam('events')), true)); }, 'Events list.')
|
||||
->param('url', null, function () { return new URL(); }, 'Webhook URL.')
|
||||
->param('security', false, function () { return new Boolean(true); }, 'Certificate verification, false for disabled or true for enabled.') ->param('httpUser', '', function () { return new Text(256); }, 'Webhook HTTP user.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Webhook HTTP password.', true)
|
||||
->param('security', false, function () { return new Boolean(true); }, 'Certificate verification, false for disabled or true for enabled.')
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Webhook HTTP user. Max length: 256 chars.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Webhook HTTP password. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $webhookId, $name, $events, $url, $security, $httpUser, $httpPass, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -714,7 +715,7 @@ App::post('/v1/projects/:projectId/keys')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'createKey')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Key name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Key name. Max length: 128 chars.')
|
||||
->param('scopes', null, function () { return new ArrayList(new WhiteList(Config::getParam('scopes'))); }, 'Key scopes list.')
|
||||
->action(function ($projectId, $name, $scopes, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
@@ -810,7 +811,7 @@ App::put('/v1/projects/:projectId/keys/:keyId')
|
||||
->label('sdk.method', 'updateKey')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('keyId', null, function () { return new UID(); }, 'Key unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Key name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Key name. Max length: 128 chars.')
|
||||
->param('scopes', null, function () { return new ArrayList(new WhiteList(Config::getParam('scopes'))); }, 'Key scopes list')
|
||||
->action(function ($projectId, $keyId, $name, $scopes, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
@@ -880,15 +881,15 @@ App::post('/v1/projects/:projectId/tasks')
|
||||
->label('sdk.namespace', 'projects')
|
||||
->label('sdk.method', 'createTask')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Task name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Task name. Max length: 128 chars.')
|
||||
->param('status', null, function () { return new WhiteList(['play', 'pause']); }, 'Task status.')
|
||||
->param('schedule', null, function () { return new Cron(); }, 'Task schedule CRON syntax.')
|
||||
->param('security', false, function () { return new Boolean(true); }, 'Certificate verification, false for disabled or true for enabled.')
|
||||
->param('httpMethod', '', function () { return new WhiteList(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT']); }, 'Task HTTP method.')
|
||||
->param('httpUrl', '', function () { return new URL(); }, 'Task HTTP URL')
|
||||
->param('httpHeaders', null, function () { return new ArrayList(new Text(256)); }, 'Task HTTP headers list.', true)
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Task HTTP user.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Task HTTP password.', true)
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Task HTTP user. Max length: 256 chars.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Task HTTP password. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $name, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders, $httpUser, $httpPass, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -1035,15 +1036,15 @@ App::put('/v1/projects/:projectId/tasks/:taskId')
|
||||
->label('sdk.method', 'updateTask')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('taskId', null, function () { return new UID(); }, 'Task unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Task name.')
|
||||
->param('name', null, function () { return new Text(128); }, 'Task name. Max length: 128 chars.')
|
||||
->param('status', null, function () { return new WhiteList(['play', 'pause']); }, 'Task status.')
|
||||
->param('schedule', null, function () { return new Cron(); }, 'Task schedule CRON syntax.')
|
||||
->param('security', false, function () { return new Boolean(true); }, 'Certificate verification, false for disabled or true for enabled.')
|
||||
->param('httpMethod', '', function () { return new WhiteList(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT']); }, 'Task HTTP method.')
|
||||
->param('httpUrl', '', function () { return new URL(); }, 'Task HTTP URL.')
|
||||
->param('httpHeaders', null, function () { return new ArrayList(new Text(256)); }, 'Task HTTP headers list.', true)
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Task HTTP user.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Task HTTP password.', true)
|
||||
->param('httpUser', '', function () { return new Text(256); }, 'Task HTTP user. Max length: 256 chars.', true)
|
||||
->param('httpPass', '', function () { return new Text(256); }, 'Task HTTP password. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $taskId, $name, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders, $httpUser, $httpPass, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -1141,10 +1142,10 @@ App::post('/v1/projects/:projectId/platforms')
|
||||
->label('sdk.method', 'createPlatform')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('type', null, function () { return new WhiteList(['web', 'flutter-ios', 'flutter-android', 'ios', 'android', 'unity']); }, 'Platform type.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Platform name.')
|
||||
->param('key', '', function () { return new Text(256); }, 'Package name for android or bundle ID for iOS.', true)
|
||||
->param('store', '', function () { return new Text(256); }, 'App store or Google Play store ID.', true)
|
||||
->param('hostname', '', function () { return new Text(256); }, 'Platform client hostname.', true)
|
||||
->param('name', null, function () { return new Text(128); }, 'Platform name. Max length: 128 chars.')
|
||||
->param('key', '', function () { return new Text(256); }, 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true)
|
||||
->param('store', '', function () { return new Text(256); }, 'App store or Google Play store ID. Max length: 256 chars.', true)
|
||||
->param('hostname', '', function () { return new Text(256); }, 'Platform client hostname. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $type, $name, $key, $store, $hostname, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
@@ -1246,10 +1247,10 @@ App::put('/v1/projects/:projectId/platforms/:platformId')
|
||||
->label('sdk.method', 'updatePlatform')
|
||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||
->param('platformId', null, function () { return new UID(); }, 'Platform unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Platform name.')
|
||||
->param('key', '', function () { return new Text(256); }, 'Package name for android or bundle ID for iOS.', true)
|
||||
->param('store', '', function () { return new Text(256); }, 'App store or Google Play store ID.', true)
|
||||
->param('hostname', '', function () { return new Text(256); }, 'Platform client URL.', true)
|
||||
->param('name', null, function () { return new Text(128); }, 'Platform name. Max length: 128 chars.')
|
||||
->param('key', '', function () { return new Text(256); }, 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true)
|
||||
->param('store', '', function () { return new Text(256); }, 'App store or Google Play store ID. Max length: 256 chars.', true)
|
||||
->param('hostname', '', function () { return new Text(256); }, 'Platform client URL. Max length: 256 chars.', true)
|
||||
->action(function ($projectId, $platformId, $name, $key, $store, $hostname, $response, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $consoleDB */
|
||||
|
||||
Reference in New Issue
Block a user