|
|
|
@ -886,7 +886,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_STRING)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
@ -932,7 +932,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email'
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_EMAIL)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('default', null, new Email(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
|
|
|
@ -972,7 +972,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_ENUM)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('elements', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
@ -1028,7 +1028,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_IP)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('default', null, new IP(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
|
|
|
@ -1068,7 +1068,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_URL)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('default', null, new URL(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
|
|
|
@ -1108,7 +1108,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_INTEGER)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true)
|
|
|
|
@ -1177,7 +1177,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float'
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_FLOAT)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true)
|
|
|
|
@ -1249,7 +1249,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_BOOLEAN)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->param('required', null, new Boolean(), 'Is attribute required?')
|
|
|
|
|
->param('default', null, new Boolean(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
|
|
|
@ -1287,7 +1287,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_ATTRIBUTE_LIST)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
|
->inject('usage')
|
|
|
|
@ -1337,7 +1337,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key')
|
|
|
|
|
Response::MODEL_ATTRIBUTE_IP,
|
|
|
|
|
Response::MODEL_ATTRIBUTE_STRING,])// needs to be last, since its condition would dominate any other string attribute
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
@ -1400,7 +1400,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key
|
|
|
|
|
->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_NONE)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Attribute Key.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
@ -1495,7 +1495,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_INDEX)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', null, new Key(), 'Index Key.')
|
|
|
|
|
->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE, Database::INDEX_SPATIAL, Database::INDEX_ARRAY]), 'Index type.')
|
|
|
|
|
->param('attributes', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attributes to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' attributes are allowed, each 32 characters long.')
|
|
|
|
@ -1650,7 +1650,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_INDEX_LIST)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
|
->inject('usage')
|
|
|
|
@ -1692,7 +1692,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_INDEX)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', null, new Key(), 'Index Key.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
@ -1743,7 +1743,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|
|
|
|
->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_NONE)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('key', '', new Key(), 'Index Key.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
@ -1820,7 +1820,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_DOCUMENT)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('documentId', '', new CustomId(), 'Document ID. Choose your own unique ID or pass the string "unique()" to auto generate it. 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('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.')
|
|
|
|
|
->param('data', [], new JSON(), 'Document data as JSON object.')
|
|
|
|
|
->param('read', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.', true)
|
|
|
|
|
->param('write', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.', true)
|
|
|
|
@ -1941,8 +1941,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true)
|
|
|
|
|
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true)
|
|
|
|
|
->param('limit', 25, new Range(0, 100), 'Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' results allowed per request.', true)
|
|
|
|
|
->param('offset', 0, new Range(0, APP_LIMIT_COUNT), 'Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)', true)
|
|
|
|
|
->param('cursor', '', new UID(), 'ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)', true)
|
|
|
|
@ -2055,7 +2055,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
|
|
|
|
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_DOCUMENT)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('documentId', null, new UID(), 'Document ID.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
@ -2358,7 +2358,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|
|
|
|
->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT)
|
|
|
|
|
->label('sdk.response.model', Response::MODEL_NONE)
|
|
|
|
|
->param('databaseId', '', new UID(), 'Database ID.')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
|
|
|
|
|
->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
|
|
|
|
|
->param('documentId', null, new UID(), 'Document ID.')
|
|
|
|
|
->inject('response')
|
|
|
|
|
->inject('dbForProject')
|
|
|
|
|