Updated constants

This commit is contained in:
Eldad Fux
2020-11-08 00:14:48 +02:00
parent 3e1a3e24bb
commit 4d3c5a39cc
27 changed files with 190 additions and 190 deletions
@@ -24,7 +24,7 @@ class BaseList extends Model
if ($paging) {
$this->addRule('sum', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Total sum of items in the list.',
'example' => '5',
]);
@@ -11,7 +11,7 @@ class Collection extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Collection ID.',
'example' => '5e5ea5c16897e',
])
@@ -22,17 +22,17 @@ class Collection extends Model
'array' => false,
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Collection name.',
'example' => 'Movies',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Collection creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('dateUpdated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Collection creation date in Unix timestamp.',
'example' => 1592981550,
])
@@ -11,12 +11,12 @@ class Continent extends Model
{
$this
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Continent name.',
'example' => 'Europe',
])
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Continent two letter code.',
'example' => 'EU',
])
@@ -11,12 +11,12 @@ class Country extends Model
{
$this
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country name.',
'example' => 'United States',
])
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country two-character ISO 3166-1 alpha code.',
'example' => 'US',
])
@@ -11,42 +11,42 @@ class Currency extends Model
{
$this
->addRule('symbol', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency symbol.',
'example' => '$',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency name.',
'example' => 'US dollar',
])
->addRule('symbolNative', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency native symbol.',
'example' => '$',
])
->addRule('decimalDigits', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Number of decimal digits.',
'example' => 2,
])
->addRule('rounding', [
'type' => 'float',
'type' => self::TYPE_FLOAT,
'description' => 'Currency digit rounding.',
'example' => 0,
])
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.',
'example' => 'USD',
])
->addRule('namePlural', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency plural name',
'example' => 'US dollars',
])
// ->addRule('locations', [
// 'type' => 'string',
// 'type' => self::TYPE_STRING,
// 'description' => 'Currency locations list. List of location in two-character ISO 3166-1 alpha code.',
// 'example' => ['US'],
// 'array' => true,
@@ -11,27 +11,27 @@ class Domain extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Domain ID.',
'example' => '5e5ea5c16897e',
])
->addRule('domain', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Domain name.',
'example' => 'appwrite.company.com',
])
->addRule('registerable', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Registerable domain name.',
'example' => 'company.com',
])
->addRule('tld', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'TLD name.',
'example' => 'com',
])
->addRule('verification', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Verification process status.',
'example' => true,
])
+3 -3
View File
@@ -11,17 +11,17 @@ class Error extends Model
{
$this
->addRule('message', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Error message.',
'example' => 'Not found',
])
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Error code.',
'example' => '404',
])
->addRule('version', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Server version number.',
'example' => '1.0',
])
@@ -12,17 +12,17 @@ class ErrorDev extends Error
$this
->addRule('file', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'File path.',
'example' => '/usr/code/vendor/utopia-php/framework/src/App.php',
])
->addRule('line', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Line number.',
'example' => 209,
])
->addRule('trace', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Error trace.',
'example' => [
''
@@ -11,47 +11,47 @@ class Execution extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Execution ID.',
'example' => '5e5ea5c16897e',
])
->addRule('functionId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function ID.',
'example' => '5e5ea6g16897e',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'The execution creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('trigger', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.',
'example' => 'http',
])
->addRule('status', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.',
'example' => 'processing',
])
->addRule('exitCode', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'The script exit code.',
'example' => 0,
])
->addRule('stdout', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The script stdout output string.',
'example' => '',
])
->addRule('stderr', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The script stderr output string.',
'example' => '',
])
->addRule('time', [
'type' => 'float',
'type' => self::TYPE_FLOAT,
'description' => 'The script execution time in seconds.',
'example' => 0.400,
])
+6 -6
View File
@@ -11,7 +11,7 @@ class File extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'File ID.',
'example' => '5e5ea5c16897e',
])
@@ -22,27 +22,27 @@ class File extends Model
'array' => false,
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'File name.',
'example' => 'Pink.png',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'File creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('signature', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'File MD5 signature.',
'example' => '5d529fd02b544198ae075bd57c1762bb',
])
->addRule('mimeType', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'File mime type.',
'example' => 'image/png',
])
->addRule('sizeOriginal', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'File original size in bytes.',
'example' => 17890,
])
+13 -13
View File
@@ -11,74 +11,74 @@ class Func extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function name.',
'example' => 'My Function',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Function creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('dateUpdated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Function update date in Unix timestamp.',
'example' => 1592981257,
])
->addRule('status', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function status. Possible values: disabled, enabled',
'example' => 'enabled',
])
->addRule('env', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function execution environment.',
'example' => 'python-3.8',
])
->addRule('tag', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function active tag ID.',
'default' => '',
'example' => '5e5ea5c16897e',
])
->addRule('vars', [
'type' => 'json',
'type' => self::TYPE_JSON,
'description' => 'Function environment variables.',
'default' => new \stdClass,
'example' => ['key' => 'value'],
])
->addRule('events', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function trigger events.',
'default' => [],
'example' => ['account.create'],
'array' => true,
])
->addRule('schedule', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function execution schedult in CRON format.',
'default' => '',
'example' => '5 4 * * *',
])
->addRule('scheduleNext', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Function next scheduled execution date in Unix timestamp.',
'example' => 1592981292,
'default' => 0,
])
->addRule('schedulePrevious', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Function next scheduled execution date in Unix timestamp.',
'example' => 1592981237,
'default' => 0,
])
->addRule('timeout', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Function execution timeout in seconds.',
'default' => 15,
'example' => 1592981237,
+4 -4
View File
@@ -11,24 +11,24 @@ class Key extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Key ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Key name.',
'example' => 'My API Key',
])
->addRule('scopes', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Allowed permission scopes.',
'default' => [],
'example' => ['users.read', 'documents.write'],
'array' => true,
])
->addRule('secret', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Secret key.',
'example' => '919c2d18fb5d4...a2ae413da83346ad2',
])
@@ -11,17 +11,17 @@ class Language extends Model
{
$this
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Language name.',
'example' => 'Italian',
])
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Language two-character ISO 639-1 codes.',
'example' => 'it',
])
->addRule('nativeName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Language native name.',
'example' => 'Italiano',
])
@@ -11,38 +11,38 @@ class Locale extends Model
{
$this
->addRule('ip', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User IP address.',
'example' => '127.0.0.1',
])
->addRule('countryCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format',
'example' => 'US',
])
->addRule('country', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country name. This field support localization.',
'example' => 'United States',
])
->addRule('continentCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America.',
'example' => 'NA',
])
->addRule('continent', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Continent name. This field support localization.',
'example' => 'North America',
])
->addRule('eu', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'True if country is part of the Europian Union.',
'default' => false,
'example' => false,
])
->addRule('currency', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format',
'example' => 'USD',
])
+17 -17
View File
@@ -11,100 +11,100 @@ class Log extends Model
{
$this
->addRule('event', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Event name.',
'example' => 'account.sessions.create',
])
->addRule('ip', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'IP session in use when the session was created.',
'example' => '127.0.0.1',
])
->addRule('time', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Log creation time in Unix timestamp.',
'example' => 1592981250,
])
->addRule('osCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).',
'default' => '',
'example' => 'Mac',
])
->addRule('osName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system name.',
'default' => '',
'example' => 'Mac',
])
->addRule('osVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system version.',
'default' => '',
'example' => 'Mac',
])
->addRule('clientType', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client type.',
'default' => '',
'example' => 'browser',
])
->addRule('clientCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).',
'default' => '',
'example' => 'CM',
])
->addRule('clientName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client name.',
'default' => '',
'example' => 'Chrome Mobile iOS',
])
->addRule('clientVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client version.',
'default' => '',
'example' => '84.0',
])
->addRule('clientEngine', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client engine name.',
'default' => '',
'example' => 'WebKit',
])
->addRule('clientEngineVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client engine name.',
'default' => '',
'example' => '605.1.15',
])
->addRule('deviceName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device name.',
'default' => '',
'example' => 'smartphone',
])
->addRule('deviceBrand', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device brand name.',
'default' => '',
'example' => 'Google',
])
->addRule('deviceModel', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device model name.',
'default' => '',
'example' => 'Nexus 5',
])
->addRule('countryCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country two-character ISO 3166-1 alpha code.',
'default' => '',
'example' => 'US',
])
->addRule('countryName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country name.',
'default' => '',
'example' => 'United States',
@@ -11,49 +11,49 @@ class Membership extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Membership ID.',
'example' => '5e5ea5c16897e',
])
->addRule('userId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User ID.',
'example' => '5e5ea5c16897e',
])
->addRule('teamId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Team ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User name.',
'default' => '',
'example' => 'VIP',
])
->addRule('email', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User email address.',
'default' => '',
'example' => 'john@appwrite.io',
])
->addRule('invited', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Date, the user has been invited to join the team in Unix timestamp.',
'example' => 1592981250,
])
->addRule('joined', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Date, the user has accepted the invitation to join the team in Unix timestamp.',
'example' => 1592981250,
])
->addRule('confirm', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'User confirmation status, true if the user has joined the team or false otherwise.',
'example' => false,
])
->addRule('roles', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User list of roles',
'default' => [],
'example' => [],
@@ -11,13 +11,13 @@ class Permissions extends Model
{
$this
->addRule('read', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Read permissions.',
'example' => ['*', 'user:5e5ea5c16897e'],
'array' => true,
])
->addRule('write', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Write permissions.',
'example' => ['*', 'user:5e5ea5c16897e'],
'array' => true,
+3 -3
View File
@@ -11,17 +11,17 @@ class Phone extends Model
{
$this
->addRule('code', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Phone code.',
'example' => '+1',
])
->addRule('countryCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country two-character ISO 3166-1 alpha code.',
'example' => 'US',
])
->addRule('countryName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country name.',
'example' => 'United States',
])
@@ -11,43 +11,43 @@ class Platform extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Platform ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Platform name.',
'example' => 'My Web App',
])
->addRule('type', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.',
'example' => 'My Web App',
])
->addRule('key', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.',
'example' => 'com.company.appname',
])
// ->addRule('store', [
// 'type' => 'string',
// 'type' => self::TYPE_STRING,
// 'description' => 'Link to platform store.',
// 'example' => '',
// ])
->addRule('hostname', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Web app hostname. Empty string for other platforms.',
'example' => true,
])
->addRule('httpUser', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication username.',
'default' => '',
'example' => 'username',
])
->addRule('httpPass', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication password.',
'default' => '',
'example' => 'password',
+14 -14
View File
@@ -12,71 +12,71 @@ class Project extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project name.',
'default' => '',
'example' => 'New Project',
])
->addRule('description', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project description.',
'default' => '',
'example' => 'This is a new project.',
])
->addRule('teamId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project team ID.',
'example' => '1592981250',
])
->addRule('logo', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project logo file ID.',
'default' => '',
'example' => '5f5c451b403cb',
])
->addRule('url', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Project website URL.',
'default' => '',
'example' => '5f5c451b403cb',
])
->addRule('legalName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Company legal name.',
'default' => '',
'example' => 'Company LTD.',
])
->addRule('legalCountry', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format.',
'default' => '',
'example' => 'US',
])
->addRule('legalState', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'State name.',
'default' => '',
'example' => 'New York',
])
->addRule('legalCity', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'City name.',
'default' => '',
'example' => 'New York City.',
])
->addRule('legalAddress', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Company Address.',
'default' => '',
'example' => '620 Eighth Avenue, New York, NY 10018',
])
->addRule('legalTaxId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Company Tax ID.',
'default' => '',
'example' => '131102020',
@@ -129,13 +129,13 @@ class Project extends Model
$this
->addRule('usersOauth2'.\ucfirst($index).'Appid', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => $name.' OAuth app ID.',
'example' => '123247283472834787438',
'default' => '',
])
->addRule('usersOauth2'.\ucfirst($index).'Secret', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => $name.' OAuth secret ID.',
'example' => 'djsgudsdsewe43434343dd34...',
'default' => '',
+9 -9
View File
@@ -11,48 +11,48 @@ class Rule extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule ID.',
'example' => '5e5ea5c16897e',
])
->addRule('$collection', [ // TODO remove this from public response
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule Collection.',
'example' => '5e5e66c16897e',
])
->addRule('type', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule type. Possible values: ',
'example' => 'title',
])
->addRule('key', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule key.',
'example' => 'title',
])
->addRule('label', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule label.',
'example' => 'Title',
])
->addRule('default', [ // TODO should be of mixed types
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Rule default value.',
'example' => 'Movie Name',
'default' => '',
])
->addRule('array', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Is array?',
'example' => false,
])
->addRule('required', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Is required?',
'example' => true,
])
->addRule('list', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'List of allowed values',
'array' => true,
'default' => [],
+18 -18
View File
@@ -11,108 +11,108 @@ class Session extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Session ID.',
'example' => '5e5ea5c16897e',
])
->addRule('expire', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Session expiration date in Unix timestamp.',
'default' => 0,
'example' => 1592981250,
])
->addRule('ip', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'IP in use when the session was created.',
'default' => '',
'example' => '127.0.0.1',
])
->addRule('osCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).',
'default' => '',
'example' => 'Mac',
])
->addRule('osName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system name.',
'default' => '',
'example' => 'Mac',
])
->addRule('osVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Operating system version.',
'default' => '',
'example' => 'Mac',
])
->addRule('clientType', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client type.',
'default' => '',
'example' => 'browser',
])
->addRule('clientCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).',
'default' => '',
'example' => 'CM',
])
->addRule('clientName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client name.',
'default' => '',
'example' => 'Chrome Mobile iOS',
])
->addRule('clientVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client version.',
'default' => '',
'example' => '84.0',
])
->addRule('clientEngine', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client engine name.',
'default' => '',
'example' => 'WebKit',
])
->addRule('clientEngineVersion', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Client engine name.',
'default' => '',
'example' => '605.1.15',
])
->addRule('deviceName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device name.',
'default' => '',
'example' => 'smartphone',
])
->addRule('deviceBrand', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device brand name.',
'default' => '',
'example' => 'Google',
])
->addRule('deviceModel', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Device model name.',
'default' => '',
'example' => 'Nexus 5',
])
->addRule('countryCode', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country two-character ISO 3166-1 alpha code.',
'default' => '',
'example' => 'US',
])
->addRule('countryName', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Country name.',
'default' => '',
'example' => 'United States',
])
->addRule('current', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Returns true if this the current user session.',
'default' => '',
'example' => true,
+5 -5
View File
@@ -11,27 +11,27 @@ class Tag extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Tag ID.',
'example' => '5e5ea5c16897e',
])
->addRule('functionId', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Function ID.',
'example' => '5e5ea6g16897e',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'The tag creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('command', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The entrypoint command in use to execute the tag code.',
'example' => 'enabled',
])
->addRule('size', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'The code size in bytes.',
'example' => 'python-3.8',
])
+16 -16
View File
@@ -11,91 +11,91 @@ class Task extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task name.',
'example' => 'My Task',
])
->addRule('security', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Indicated if SSL / TLS Certificate verification is enabled.',
'example' => true,
])
->addRule('httpMethod', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task HTTP Method.',
'example' => 'POST',
])
->addRule('httpUrl', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task HTTP URL.',
'example' => 'https://example.com/task',
])
->addRule('httpHeaders', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task HTTP headers.',
'default' => [],
'example' => ['key:value'],
'array' => true,
])
->addRule('httpUser', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication username.',
'default' => '',
'example' => 'username',
])
->addRule('httpPass', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication password.',
'default' => '',
'example' => 'password',
])
->addRule('duration', [
'type' => 'float',
'type' => self::TYPE_FLOAT,
'description' => 'Task duration in seconds.',
'default' => 0,
'example' => 1.2,
])
->addRule('delay', [
'type' => 'float',
'type' => self::TYPE_FLOAT,
'description' => 'Task delay time in seconds.',
'default' => 0,
'example' => 1.2,
])
->addRule('failures', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Number of recurring task failures.',
'default' => 0,
'example' => 0,
])
->addRule('schedule', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task schedule in CRON syntax.',
'example' => '* * * * *',
])
->addRule('status', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Task status. Possible values: play, pause', // TODO - change to enabled disabled
'example' => 'enabled',
])
->addRule('updated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Task last updated time in Unix timestamp.',
'default' => 0,
'example' => 1592981250,
])
->addRule('previous', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Task previous run time in Unix timestamp.',
'default' => 0,
'example' => 1592981250,
])
->addRule('next', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Task next run time in Unix timestamp.',
'default' => 0,
'example' => 1592981650,
+4 -4
View File
@@ -11,23 +11,23 @@ class Team extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Team ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Team name.',
'default' => '',
'example' => 'VIP',
])
->addRule('dateCreated', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Team creation date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('sum', [ // TODO change key name?
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'Total sum of team members.',
'example' => 7,
])
+8 -8
View File
@@ -11,44 +11,44 @@ class User extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User name.',
'example' => 'John Doe',
])
->addRule('registration', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'User registration date in Unix timestamp.',
'example' => 1592981250,
])
->addRule('status', [
'type' => 'integer',
'type' => self::TYPE_INTEGER,
'description' => 'User status. 0 for Unavtivated, 1 for active and 2 is blocked.',
'example' => 0,
])
->addRule('email', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User email address.',
'example' => 'john@appwrite.io',
])
->addRule('emailVerification', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Email verification status.',
'default' => false,
'example' => true,
])
->addRule('prefs', [
'type' => 'json',
'type' => self::TYPE_JSON,
'description' => 'User preferences as a key-value object',
'default' => new \stdClass,
'example' => ['theme' => 'pink', 'timezone' => 'UTC'],
])
->addRule('roles', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'User list of roles',
'default' => [],
'example' => [],
@@ -11,40 +11,40 @@ class Webhook extends Model
{
$this
->addRule('$id', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Webhook ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Webhook name.',
'example' => 'My Webhook',
])
->addRule('url', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Webhook URL endpoint.',
'example' => 'https://example.com/webhook',
])
->addRule('events', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'Webhook trigger events.',
'default' => [],
'example' => ['database.collections.update', 'database.collections.delete'],
'array' => true,
])
->addRule('security', [
'type' => 'boolean',
'type' => self::TYPE_BOOLEAN,
'description' => 'Indicated if SSL / TLS Certificate verification is enabled.',
'example' => true,
])
->addRule('httpUser', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication username.',
'default' => '',
'example' => 'username',
])
->addRule('httpPass', [
'type' => 'string',
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication password.',
'default' => '',
'example' => 'password',