mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge branch 'appwrite:master' into fix-4846-added-expiry-value-to-account-sessions
This commit is contained in:
commit
ea53fe9025
183 changed files with 2617 additions and 316 deletions
|
|
@ -1,8 +1,15 @@
|
|||
# Version 1.3.5
|
||||
|
||||
## Bugs
|
||||
|
||||
- Fix minimum length for string attribute default values [#5606](https://github.com/appwrite/appwrite/pull/5606), [#5602](https://github.com/appwrite/appwrite/pull/5602)
|
||||
- Update framework to fix route mismatches [#5603](https://github.com/appwrite/appwrite/pull/5603)
|
||||
|
||||
# Version 1.3.4
|
||||
|
||||
## Bugs
|
||||
|
||||
- Update migration to properly migrate bucket permissiosn [#5497](https://github.com/appwrite/appwrite/pull/5497)
|
||||
- Update migration to properly migrate bucket permissions [#5497](https://github.com/appwrite/appwrite/pull/5497)
|
||||
|
||||
# Version 1.3.3
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ docker run -it --rm \
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
|
@ -78,7 +78,7 @@ docker run -it --rm ^
|
|||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
|
|
@ -88,7 +88,7 @@ docker run -it --rm `
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ docker run -it --rm \
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
|
@ -87,7 +87,7 @@ docker run -it --rm ^
|
|||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
|
|
@ -97,7 +97,7 @@ docker run -it --rm `
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.3.4
|
||||
appwrite/appwrite:1.3.5
|
||||
```
|
||||
|
||||
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,17 @@ $collections = [
|
|||
'array' => false,
|
||||
'filters' => [],
|
||||
],
|
||||
[
|
||||
'$id' => ID::custom('enabled'),
|
||||
'type' => Database::VAR_BOOLEAN,
|
||||
'signed' => true,
|
||||
'size' => 0,
|
||||
'format' => '',
|
||||
'filters' => [],
|
||||
'required' => false,
|
||||
'default' => true,
|
||||
'array' => false,
|
||||
],
|
||||
[
|
||||
'$id' => ID::custom('search'),
|
||||
'type' => Database::VAR_STRING,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ return [
|
|||
],
|
||||
Exception::USER_BLOCKED => [
|
||||
'name' => Exception::USER_BLOCKED,
|
||||
'description' => 'The current user has been blocked. You can unblock the user from the Appwrite console.',
|
||||
'description' => 'The current user has been blocked.',
|
||||
'code' => 401,
|
||||
],
|
||||
Exception::USER_INVALID_TOKEN => [
|
||||
|
|
|
|||
|
|
@ -357,12 +357,12 @@ return [
|
|||
[
|
||||
'key' => 'dotnet',
|
||||
'name' => '.NET',
|
||||
'version' => '2.0.0',
|
||||
'version' => '0.4.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
|
||||
'package' => 'https://www.nuget.org/packages/Appwrite',
|
||||
'enabled' => false,
|
||||
'enabled' => true,
|
||||
'beta' => true,
|
||||
'dev' => true,
|
||||
'dev' => false,
|
||||
'hidden' => false,
|
||||
'family' => APP_PLATFORM_SERVER,
|
||||
'prism' => 'csharp',
|
||||
|
|
|
|||
|
|
@ -1764,11 +1764,12 @@ App::patch('/v1/account/status')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_USER)
|
||||
->inject('requestTimestamp')
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('events')
|
||||
->action(function (?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $events) {
|
||||
->action(function (?\DateTime $requestTimestamp, Request $request, Response $response, Document $user, Database $dbForProject, Event $events) {
|
||||
|
||||
$user->setAttribute('status', false);
|
||||
|
||||
|
|
@ -1782,6 +1783,12 @@ App::patch('/v1/account/status')
|
|||
$response->addHeader('X-Fallback-Cookies', \json_encode([]));
|
||||
}
|
||||
|
||||
$protocol = $request->getProtocol();
|
||||
$response
|
||||
->addCookie(Auth::$cookieName . '_legacy', '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, null)
|
||||
->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite'))
|
||||
;
|
||||
|
||||
$response->dynamic($user, Response::MODEL_ACCOUNT);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -384,11 +384,12 @@ App::post('/v1/databases')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created
|
||||
->param('databaseId', '', 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('name', '', new Text(128), 'Collection name. Max length: 128 chars.')
|
||||
->param('name', '', new Text(128), 'Database name. Max length: 128 chars.')
|
||||
->param('enabled', true, new Boolean(), 'Is database enabled?', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('events')
|
||||
->action(function (string $databaseId, string $name, Response $response, Database $dbForProject, Event $events) {
|
||||
->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $events) {
|
||||
|
||||
$databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId;
|
||||
|
||||
|
|
@ -396,6 +397,7 @@ App::post('/v1/databases')
|
|||
$dbForProject->createDocument('databases', new Document([
|
||||
'$id' => $databaseId,
|
||||
'name' => $name,
|
||||
'enabled' => $enabled,
|
||||
'search' => implode(' ', [$databaseId, $name]),
|
||||
]));
|
||||
$database = $dbForProject->getDocument('databases', $databaseId);
|
||||
|
|
@ -507,7 +509,7 @@ App::get('/v1/databases/:databaseId')
|
|||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, Response $response, Database $dbForProject) {
|
||||
|
||||
$database = $dbForProject->getDocument('databases', $databaseId);
|
||||
$database = $dbForProject->getDocument('databases', $databaseId);
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -619,12 +621,13 @@ App::put('/v1/databases/:databaseId')
|
|||
->label('sdk.response.model', Response::MODEL_DATABASE)
|
||||
->param('databaseId', '', new UID(), 'Database ID.')
|
||||
->param('name', null, new Text(128), 'Database name. Max length: 128 chars.')
|
||||
->param('enabled', true, new Boolean(), 'Is database enabled?', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('events')
|
||||
->action(function (string $databaseId, string $name, Response $response, Database $dbForProject, Event $events) {
|
||||
->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $events) {
|
||||
|
||||
$database = $dbForProject->getDocument('databases', $databaseId);
|
||||
$database = $dbForProject->getDocument('databases', $databaseId);
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -633,6 +636,7 @@ App::put('/v1/databases/:databaseId')
|
|||
try {
|
||||
$database = $dbForProject->updateDocument('databases', $databaseId, $database
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('enabled', $enabled)
|
||||
->setAttribute('search', implode(' ', [$databaseId, $name])));
|
||||
} catch (AuthorizationException $exception) {
|
||||
throw new Exception(Exception::USER_UNAUTHORIZED);
|
||||
|
|
@ -714,14 +718,16 @@ App::post('/v1/databases/:databaseId/collections')
|
|||
->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.')
|
||||
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
|
||||
->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).', true)
|
||||
->param('enabled', true, new Boolean(), 'Is collection enabled?', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('mode')
|
||||
->inject('events')
|
||||
->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, Response $response, Database $dbForProject, Event $events) {
|
||||
->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $events) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -737,7 +743,7 @@ App::post('/v1/databases/:databaseId/collections')
|
|||
'databaseId' => $databaseId,
|
||||
'$permissions' => $permissions ?? [],
|
||||
'documentSecurity' => $documentSecurity,
|
||||
'enabled' => true,
|
||||
'enabled' => $enabled,
|
||||
'name' => $name,
|
||||
'search' => implode(' ', [$collectionId, $name]),
|
||||
]));
|
||||
|
|
@ -779,11 +785,12 @@ App::get('/v1/databases/:databaseId/collections')
|
|||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, array $queries, string $search, Response $response, Database $dbForProject) {
|
||||
->inject('mode')
|
||||
->action(function (string $databaseId, array $queries, string $search, Response $response, Database $dbForProject, string $mode) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -834,11 +841,12 @@ App::get('/v1/databases/:databaseId/collections/:collectionId')
|
|||
->param('collectionId', '', new UID(), 'Collection ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject) {
|
||||
->inject('mode')
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, string $mode) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -874,7 +882,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs')
|
|||
->inject('geodb')
|
||||
->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -972,12 +980,13 @@ App::put('/v1/databases/:databaseId/collections/:collectionId')
|
|||
->param('enabled', true, new Boolean(), 'Is collection enabled?', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('mode')
|
||||
->inject('events')
|
||||
->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, Event $events) {
|
||||
->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $events) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -1036,13 +1045,14 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId')
|
|||
->param('collectionId', '', new UID(), 'Collection ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('mode')
|
||||
->inject('events')
|
||||
->inject('deletes')
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, Event $events, Delete $deletes) {
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, string $mode, Event $events, Delete $deletes) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -1060,15 +1070,13 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId')
|
|||
|
||||
$deletes
|
||||
->setType(DELETE_TYPE_DOCUMENT)
|
||||
->setDocument($collection)
|
||||
;
|
||||
->setDocument($collection);
|
||||
|
||||
$events
|
||||
->setContext('database', $database)
|
||||
->setParam('databaseId', $databaseId)
|
||||
->setParam('collectionId', $collection->getId())
|
||||
->setPayload($response->output($collection, Response::MODEL_COLLECTION))
|
||||
;
|
||||
->setPayload($response->output($collection, Response::MODEL_COLLECTION));
|
||||
|
||||
$response->noContent();
|
||||
});
|
||||
|
|
@ -1095,7 +1103,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
|
|||
->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?')
|
||||
->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
||||
->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
|
||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
|
|
@ -1104,7 +1112,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
|
|||
->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $events) {
|
||||
|
||||
// Ensure attribute default is within required size
|
||||
$validator = new Text($size);
|
||||
$validator = new Text($size, 0);
|
||||
if (!is_null($default) && !$validator->isValid($default)) {
|
||||
throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription());
|
||||
}
|
||||
|
|
@ -1593,7 +1601,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati
|
|||
Database $dbForProject,
|
||||
EventDatabase $database,
|
||||
Event $events
|
||||
) {
|
||||
) {
|
||||
$key ??= $relatedCollectionId;
|
||||
$twoWayKey ??= $collectionId;
|
||||
|
||||
|
|
@ -1653,7 +1661,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes')
|
|||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -1704,7 +1712,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key')
|
|||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -1769,7 +1777,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin
|
|||
->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 Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
|
||||
->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('events')
|
||||
|
|
@ -2177,7 +2185,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
|
|||
$events,
|
||||
type: Database::VAR_RELATIONSHIP,
|
||||
required: false,
|
||||
options : [
|
||||
options: [
|
||||
'onDelete' => $onDelete
|
||||
]
|
||||
);
|
||||
|
|
@ -2218,7 +2226,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key
|
|||
->inject('events')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events) {
|
||||
|
||||
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$db = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($db->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -2271,8 +2279,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key
|
|||
->setType(DATABASE_TYPE_DELETE_ATTRIBUTE)
|
||||
->setCollection($collection)
|
||||
->setDatabase($db)
|
||||
->setDocument($attribute)
|
||||
;
|
||||
->setDocument($attribute);
|
||||
|
||||
// Select response model based on type and format
|
||||
$type = $attribute->getAttribute('type');
|
||||
|
|
@ -2300,8 +2307,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key
|
|||
->setParam('attributeId', $attribute->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $db)
|
||||
->setPayload($response->output($attribute, $model))
|
||||
;
|
||||
->setPayload($response->output($attribute, $model));
|
||||
|
||||
$response->noContent();
|
||||
});
|
||||
|
|
@ -2335,7 +2341,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|||
->inject('events')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, Response $response, Database $dbForProject, EventDatabase $database, Event $events) {
|
||||
|
||||
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$db = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($db->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -2358,7 +2364,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|||
}
|
||||
|
||||
// Convert Document[] to array of attribute metadata
|
||||
$oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes'));
|
||||
$oldAttributes = \array_map(fn($a) => $a->getArrayCopy(), $collection->getAttribute('attributes'));
|
||||
|
||||
$oldAttributes[] = [
|
||||
'key' => '$id',
|
||||
|
|
@ -2444,16 +2450,14 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|||
->setType(DATABASE_TYPE_CREATE_INDEX)
|
||||
->setDatabase($db)
|
||||
->setCollection($collection)
|
||||
->setDocument($index)
|
||||
;
|
||||
->setDocument($index);
|
||||
|
||||
$events
|
||||
->setParam('databaseId', $databaseId)
|
||||
->setParam('collectionId', $collection->getId())
|
||||
->setParam('indexId', $index->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $db)
|
||||
;
|
||||
->setContext('database', $db);
|
||||
|
||||
$response
|
||||
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
|
||||
|
|
@ -2480,7 +2484,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
|||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -2520,7 +2524,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|||
->inject('dbForProject')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -2571,7 +2575,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|||
->inject('events')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events) {
|
||||
|
||||
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$db = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($db->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -2599,8 +2603,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|||
->setType(DATABASE_TYPE_DELETE_INDEX)
|
||||
->setDatabase($db)
|
||||
->setCollection($collection)
|
||||
->setDocument($index)
|
||||
;
|
||||
->setDocument($index);
|
||||
|
||||
$events
|
||||
->setParam('databaseId', $databaseId)
|
||||
|
|
@ -2608,8 +2611,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
|
|||
->setParam('indexId', $index->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $db)
|
||||
->setPayload($response->output($index, Response::MODEL_INDEX))
|
||||
;
|
||||
->setPayload($response->output($index, Response::MODEL_INDEX));
|
||||
|
||||
$response->noContent();
|
||||
});
|
||||
|
|
@ -2660,7 +2662,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -2735,7 +2737,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -2814,7 +2816,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -2847,8 +2849,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
->setParam('collectionId', $collection->getId())
|
||||
->setParam('documentId', $document->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $database)
|
||||
;
|
||||
->setContext('database', $database);
|
||||
|
||||
$response
|
||||
->setStatusCode(Response::STATUS_CODE_CREATED)
|
||||
|
|
@ -2878,9 +2879,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
->inject('mode')
|
||||
->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject, string $mode) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -2940,7 +2941,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -2956,8 +2957,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
}
|
||||
|
||||
$relatedCollectionId = $relationship->getAttribute('relatedCollection');
|
||||
$relatedCollection = Authorization::skip(fn() =>
|
||||
$dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId));
|
||||
$relatedCollection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId));
|
||||
|
||||
foreach ($relations as $index => $doc) {
|
||||
if ($doc instanceof Document) {
|
||||
|
|
@ -2977,7 +2977,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
|||
return true;
|
||||
};
|
||||
|
||||
// The linter is forcing this indentation
|
||||
// The linter is forcing this indentation
|
||||
foreach ($documents as $document) {
|
||||
$processDocument($collection, $document);
|
||||
}
|
||||
|
|
@ -3013,9 +3013,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
|
|||
->inject('mode')
|
||||
->action(function (string $databaseId, string $collectionId, string $documentId, array $queries, Response $response, Database $dbForProject, string $mode) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -3053,7 +3053,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -3108,7 +3108,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
|
|||
->inject('geodb')
|
||||
->action(function (string $databaseId, string $collectionId, string $documentId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
|
|
@ -3225,9 +3225,9 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD);
|
||||
}
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -3304,7 +3304,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -3372,7 +3372,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
try {
|
||||
$document = $dbForProject->withRequestTimestamp(
|
||||
$requestTimestamp,
|
||||
fn () => $dbForProject->updateDocument(
|
||||
fn() => $dbForProject->updateDocument(
|
||||
'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(),
|
||||
$document->getId(),
|
||||
$newDocument
|
||||
|
|
@ -3393,7 +3393,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -3426,8 +3426,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
->setParam('collectionId', $collection->getId())
|
||||
->setParam('documentId', $document->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $database)
|
||||
;
|
||||
->setContext('database', $database);
|
||||
|
||||
$response->dynamic($document, Response::MODEL_DOCUMENT);
|
||||
});
|
||||
|
|
@ -3464,9 +3463,9 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
->inject('mode')
|
||||
->action(function (string $databaseId, string $collectionId, string $documentId, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $events, Delete $deletes, string $mode) {
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
$database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
if ($database->isEmpty() || (!$database->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
|
||||
throw new Exception(Exception::DATABASE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
@ -3501,7 +3500,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -3532,7 +3531,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
|
||||
$checkPermissions($collection, $document);
|
||||
|
||||
Authorization::skip(fn () => $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) {
|
||||
Authorization::skip(fn() => $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) {
|
||||
try {
|
||||
$dbForProject->deleteDocument(
|
||||
'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(),
|
||||
|
|
@ -3555,7 +3554,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
|
||||
$relationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
fn($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
|
||||
);
|
||||
|
||||
foreach ($relationships as $relationship) {
|
||||
|
|
@ -3585,8 +3584,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
|
||||
$deletes
|
||||
->setType(DELETE_TYPE_AUDIT)
|
||||
->setDocument($document)
|
||||
;
|
||||
->setDocument($document);
|
||||
|
||||
$events
|
||||
->setParam('databaseId', $databaseId)
|
||||
|
|
@ -3594,8 +3592,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
|||
->setParam('documentId', $document->getId())
|
||||
->setContext('collection', $collection)
|
||||
->setContext('database', $database)
|
||||
->setPayload($response->output($document, Response::MODEL_DOCUMENT))
|
||||
;
|
||||
->setPayload($response->output($document, Response::MODEL_DOCUMENT));
|
||||
|
||||
$response->noContent();
|
||||
});
|
||||
|
|
@ -3700,16 +3697,16 @@ App::get('/v1/databases/usage')
|
|||
'databasesCount' => $stats['databases.$all.count.total'] ?? [],
|
||||
'documentsCount' => $stats['documents.$all.count.total'] ?? [],
|
||||
'collectionsCount' => $stats['collections.$all.count.total'] ?? [],
|
||||
'documentsCreate' => $stats['documents.$all.requests.create'] ?? [],
|
||||
'documentsRead' => $stats['documents.$all.requests.read'] ?? [],
|
||||
'documentsCreate' => $stats['documents.$all.requests.create'] ?? [],
|
||||
'documentsRead' => $stats['documents.$all.requests.read'] ?? [],
|
||||
'documentsUpdate' => $stats['documents.$all.requests.update'] ?? [],
|
||||
'documentsDelete' => $stats['documents.$all.requests.delete'] ?? [],
|
||||
'collectionsCreate' => $stats['collections.$all.requests.create'] ?? [],
|
||||
'collectionsRead' => $stats['collections.$all.requests.read'] ?? [],
|
||||
'collectionsRead' => $stats['collections.$all.requests.read'] ?? [],
|
||||
'collectionsUpdate' => $stats['collections.$all.requests.update'] ?? [],
|
||||
'collectionsDelete' => $stats['collections.$all.requests.delete'] ?? [],
|
||||
'databasesCreate' => $stats['databases.$all.requests.create'] ?? [],
|
||||
'databasesRead' => $stats['databases.$all.requests.read'] ?? [],
|
||||
'databasesRead' => $stats['databases.$all.requests.read'] ?? [],
|
||||
'databasesUpdate' => $stats['databases.$all.requests.update'] ?? [],
|
||||
'databasesDelete' => $stats['databases.$all.requests.delete'] ?? [],
|
||||
]);
|
||||
|
|
@ -3813,12 +3810,12 @@ App::get('/v1/databases/:databaseId/usage')
|
|||
'range' => $range,
|
||||
'collectionsCount' => $stats["collections.{$databaseId}.count.total"] ?? [],
|
||||
'collectionsCreate' => $stats["collections.{$databaseId}.requests.create"] ?? [],
|
||||
'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [],
|
||||
'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [],
|
||||
'collectionsUpdate' => $stats["collections.{$databaseId}.requests.update"] ?? [],
|
||||
'collectionsDelete' => $stats["collections.{$databaseId}.requests.delete"] ?? [],
|
||||
'documentsCount' => $stats["documents.{$databaseId}.count.total"] ?? [],
|
||||
'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [],
|
||||
'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [],
|
||||
'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [],
|
||||
'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [],
|
||||
'documentsUpdate' => $stats["documents.{$databaseId}.requests.update"] ?? [],
|
||||
'documentsDelete' => $stats["documents.{$databaseId}.requests.delete"] ?? [],
|
||||
]);
|
||||
|
|
@ -3928,8 +3925,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage')
|
|||
'documentsCount' => $stats["documents.{$databaseId}/{$collectionId}.count.total"] ?? [],
|
||||
'documentsCreate' => $stats["documents.{$databaseId}/{$collectionId}.requests.create"] ?? [],
|
||||
'documentsRead' => $stats["documents.{$databaseId}/{$collectionId}.requests.read"] ?? [],
|
||||
'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [],
|
||||
'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []]
|
||||
'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [],
|
||||
'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ App::error()
|
|||
$log->addExtra('line', $error->getLine());
|
||||
$log->addExtra('trace', $error->getTraceAsString());
|
||||
$log->addExtra('detailedTrace', $error->getTrace());
|
||||
$log->addExtra('roles', Authorization::$roles);
|
||||
$log->addExtra('roles', Authorization::getRoles());
|
||||
|
||||
$action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD");
|
||||
$log->setAction($action);
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe
|
|||
const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls
|
||||
const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
|
||||
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
||||
const APP_CACHE_BUSTER = 503;
|
||||
const APP_VERSION_STABLE = '1.3.4';
|
||||
const APP_CACHE_BUSTER = 504;
|
||||
const APP_VERSION_STABLE = '1.3.5';
|
||||
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
||||
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
||||
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"appwrite/sdk-generator": "0.32.*",
|
||||
"appwrite/sdk-generator": "0.33.*",
|
||||
"ext-fileinfo": "*",
|
||||
"phpunit/phpunit": "9.5.20",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
|
|
|
|||
142
composer.lock
generated
142
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "169ab6e7dd540e45309d3c5093506fad",
|
||||
"content-hash": "3eadbfe5543aafdf8682ea0465159e3c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
|
@ -481,21 +481,21 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.5.1",
|
||||
"version": "7.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9"
|
||||
"reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9",
|
||||
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
|
||||
"reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.5",
|
||||
"guzzlehttp/promises": "^1.5.3 || ^2.0",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
|
|
@ -507,7 +507,8 @@
|
|||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.1",
|
||||
"ext-curl": "*",
|
||||
"php-http/client-integration-tests": "^3.0",
|
||||
"php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
|
||||
"php-http/message-factory": "^1.1",
|
||||
"phpunit/phpunit": "^8.5.29 || ^9.5.23",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
|
|
@ -521,9 +522,6 @@
|
|||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "7.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -589,7 +587,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.5.1"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.7.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -605,38 +603,37 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-17T16:30:08+00:00"
|
||||
"time": "2023-05-21T14:04:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "1.5.2",
|
||||
"version": "2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "b94b2807d85443f9719887892882d0329d1e2598"
|
||||
"reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
|
||||
"reference": "b94b2807d85443f9719887892882d0329d1e2598",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
|
||||
"reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5"
|
||||
"php": "^7.2.5 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^4.4 || ^5.1"
|
||||
"bamarni/composer-bin-plugin": "^1.8.1",
|
||||
"phpunit/phpunit": "^8.5.29 || ^9.5.23"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.5-dev"
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Promise\\": "src/"
|
||||
}
|
||||
|
|
@ -673,7 +670,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/1.5.2"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -689,7 +686,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-08-28T14:55:35+00:00"
|
||||
"time": "2023-05-21T13:50:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
|
|
@ -2221,23 +2218,24 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/framework",
|
||||
"version": "0.28.1",
|
||||
"version": "0.28.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/framework.git",
|
||||
"reference": "7f22c556fc5991e54e5811a68fb39809b21bda55"
|
||||
"reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/7f22c556fc5991e54e5811a68fb39809b21bda55",
|
||||
"reference": "7f22c556fc5991e54e5811a68fb39809b21bda55",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/bc0144ff3983afa6724c43f2ce578fdbceec21f9",
|
||||
"reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.0.0"
|
||||
"php": ">=8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.2",
|
||||
"phpstan/phpstan": "1.9.x-dev",
|
||||
"phpunit/phpunit": "^9.5.25",
|
||||
"vimeo/psalm": "4.27.0"
|
||||
},
|
||||
|
|
@ -2259,9 +2257,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/framework/issues",
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.28.1"
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.28.2"
|
||||
},
|
||||
"time": "2023-03-02T08:16:01+00:00"
|
||||
"time": "2023-05-30T06:47:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/image",
|
||||
|
|
@ -3034,16 +3032,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "0.32.3",
|
||||
"version": "0.33.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "4057e14a61335070034b1cbdce9e39bef94d997d"
|
||||
"reference": "551cdae31a68b19874f10ca321b1d08cfa06a13f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4057e14a61335070034b1cbdce9e39bef94d997d",
|
||||
"reference": "4057e14a61335070034b1cbdce9e39bef94d997d",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/551cdae31a68b19874f10ca321b1d08cfa06a13f",
|
||||
"reference": "551cdae31a68b19874f10ca321b1d08cfa06a13f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -3079,22 +3077,22 @@
|
|||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"support": {
|
||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.32.3"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.33.1"
|
||||
},
|
||||
"time": "2023-04-27T19:22:05+00:00"
|
||||
"time": "2023-05-16T04:37:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
"version": "v1.0.0",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/deprecations.git",
|
||||
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de"
|
||||
"reference": "8cffffb2218e01f3b370bf763e00e81697725259"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
|
||||
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
|
||||
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259",
|
||||
"reference": "8cffffb2218e01f3b370bf763e00e81697725259",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -3122,9 +3120,9 @@
|
|||
"homepage": "https://www.doctrine-project.org/",
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/deprecations/issues",
|
||||
"source": "https://github.com/doctrine/deprecations/tree/v1.0.0"
|
||||
"source": "https://github.com/doctrine/deprecations/tree/v1.1.0"
|
||||
},
|
||||
"time": "2022-05-02T15:47:09+00:00"
|
||||
"time": "2023-05-29T18:55:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
|
|
@ -3381,16 +3379,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.15.4",
|
||||
"version": "v4.15.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -3431,9 +3429,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
|
||||
},
|
||||
"time": "2023-03-05T19:49:14+00:00"
|
||||
"time": "2023-05-19T20:20:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
|
@ -3784,22 +3782,23 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "1.20.3",
|
||||
"version": "1.21.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "6c04009f6cae6eda2f040745b6b846080ef069c2"
|
||||
"reference": "b0c366dd2cea79407d635839d25423ba07c55dd6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6c04009f6cae6eda2f040745b6b846080ef069c2",
|
||||
"reference": "6c04009f6cae6eda2f040745b6b846080ef069c2",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b0c366dd2cea79407d635839d25423ba07c55dd6",
|
||||
"reference": "b0c366dd2cea79407d635839d25423ba07c55dd6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nikic/php-parser": "^4.15",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"phpstan/extension-installer": "^1.0",
|
||||
"phpstan/phpstan": "^1.5",
|
||||
|
|
@ -3823,9 +3822,9 @@
|
|||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.3"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.3"
|
||||
},
|
||||
"time": "2023-04-25T09:01:03+00:00"
|
||||
"time": "2023-05-29T19:31:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
|
@ -4548,16 +4547,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "4.0.4",
|
||||
"version": "4.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
|
||||
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
|
||||
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
|
||||
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -4602,7 +4601,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
||||
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
|
||||
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -4610,7 +4609,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-26T13:10:38+00:00"
|
||||
"time": "2023-05-07T05:35:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
|
|
@ -5577,16 +5576,16 @@
|
|||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v3.5.1",
|
||||
"version": "v3.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "a6e0510cc793912b451fd40ab983a1d28f611c15"
|
||||
"reference": "106c170d08e8415d78be2d16c3d057d0d108262b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a6e0510cc793912b451fd40ab983a1d28f611c15",
|
||||
"reference": "a6e0510cc793912b451fd40ab983a1d28f611c15",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b",
|
||||
"reference": "106c170d08e8415d78be2d16c3d057d0d108262b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -5595,15 +5594,10 @@
|
|||
"symfony/polyfill-mbstring": "^1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Twig\\": "src/"
|
||||
|
|
@ -5637,7 +5631,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/twigphp/Twig/issues",
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.5.1"
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -5649,7 +5643,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-08T07:49:20+00:00"
|
||||
"time": "2023-05-03T19:06:57+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.CreatePhoneVerification();
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.CreateRecovery(
|
||||
email: "email@example.com",
|
||||
url: "https://example.com");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.CreateVerification(
|
||||
url: "https://example.com");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
await account.DeleteSession(
|
||||
sessionId: "[SESSION_ID]");
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
await account.DeleteSessions();
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Preferences result = await account.GetPrefs();
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Session result = await account.GetSession(
|
||||
sessionId: "[SESSION_ID]");
|
||||
11
docs/examples/1.3.x/server-dotnet/examples/account/get.md
Normal file
11
docs/examples/1.3.x/server-dotnet/examples/account/get.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.Get();
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
LogList result = await account.ListLogs();
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
SessionList result = await account.ListSessions();
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdateEmail(
|
||||
email: "email@example.com",
|
||||
password: "password");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdateName(
|
||||
name: "[NAME]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdatePassword(
|
||||
password: "");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.UpdatePhoneVerification(
|
||||
userId: "[USER_ID]",
|
||||
secret: "[SECRET]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdatePhone(
|
||||
phone: "+12065550100",
|
||||
password: "password");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdatePrefs(
|
||||
prefs: [object]);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.UpdateRecovery(
|
||||
userId: "[USER_ID]",
|
||||
secret: "[SECRET]",
|
||||
password: "password",
|
||||
passwordAgain: "password");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Session result = await account.UpdateSession(
|
||||
sessionId: "[SESSION_ID]");
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
User result = await account.UpdateStatus();
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
|
||||
|
||||
var account = new Account(client);
|
||||
|
||||
Token result = await account.UpdateVerification(
|
||||
userId: "[USER_ID]",
|
||||
secret: "[SECRET]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetBrowser(
|
||||
code: "aa");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetCreditCard(
|
||||
code: "amex");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetFavicon(
|
||||
url: "https://example.com");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetFlag(
|
||||
code: "af");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetImage(
|
||||
url: "https://example.com");
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetInitials();
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var avatars = new Avatars(client);
|
||||
|
||||
byte[] result = await avatars.GetQR(
|
||||
text: "[TEXT]");
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeBoolean result = await databases.CreateBooleanAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Collection result = await databases.CreateCollection(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
name: "[NAME]");
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeDatetime result = await databases.CreateDatetimeAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Document result = await databases.CreateDocument(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]",
|
||||
data: [object]);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeEmail result = await databases.CreateEmailAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeEnum result = await databases.CreateEnumAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
elements: new List<string> {},
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeFloat result = await databases.CreateFloatAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Index result = await databases.CreateIndex(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
type: "key",
|
||||
attributes: new List<string> {});
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeInteger result = await databases.CreateIntegerAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeIp result = await databases.CreateIpAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeRelationship result = await databases.CreateRelationshipAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
relatedCollectionId: "[RELATED_COLLECTION_ID]",
|
||||
type: "oneToOne");
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeString result = await databases.CreateStringAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
size: 1,
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeUrl result = await databases.CreateUrlAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false);
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Database result = await databases.Create(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
name: "[NAME]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
await databases.DeleteAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
await databases.DeleteCollection(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
await databases.DeleteDocument(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
await databases.DeleteIndex(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
await databases.Delete(
|
||||
databaseId: "[DATABASE_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
result = await databases.GetAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Collection result = await databases.GetCollection(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Document result = await databases.GetDocument(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Index result = await databases.GetIndex(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "");
|
||||
12
docs/examples/1.3.x/server-dotnet/examples/databases/get.md
Normal file
12
docs/examples/1.3.x/server-dotnet/examples/databases/get.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Database result = await databases.Get(
|
||||
databaseId: "[DATABASE_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeList result = await databases.ListAttributes(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
CollectionList result = await databases.ListCollections(
|
||||
databaseId: "[DATABASE_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
DocumentList result = await databases.ListDocuments(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
IndexList result = await databases.ListIndexes(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]");
|
||||
11
docs/examples/1.3.x/server-dotnet/examples/databases/list.md
Normal file
11
docs/examples/1.3.x/server-dotnet/examples/databases/list.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
DatabaseList result = await databases.List();
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeBoolean result = await databases.UpdateBooleanAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: false);
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Collection result = await databases.UpdateCollection(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
name: "[NAME]");
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeDatetime result = await databases.UpdateDatetimeAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: "");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Document result = await databases.UpdateDocument(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]");
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeEmail result = await databases.UpdateEmailAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: "email@example.com");
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeEnum result = await databases.UpdateEnumAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
elements: new List<string> {},
|
||||
required: false,
|
||||
default: "[DEFAULT]");
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeFloat result = await databases.UpdateFloatAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 0,
|
||||
default: 0);
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeInteger result = await databases.UpdateIntegerAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 0,
|
||||
default: 0);
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeIp result = await databases.UpdateIpAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: "");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeRelationship result = await databases.UpdateRelationshipAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "");
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeString result = await databases.UpdateStringAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: "[DEFAULT]");
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
AttributeUrl result = await databases.UpdateUrlAttribute(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
key: "",
|
||||
required: false,
|
||||
default: "https://example.com");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var databases = new Databases(client);
|
||||
|
||||
Database result = await databases.Update(
|
||||
databaseId: "[DATABASE_ID]",
|
||||
name: "[NAME]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
result = await functions.CreateBuild(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
deploymentId: "[DEPLOYMENT_ID]",
|
||||
buildId: "[BUILD_ID]");
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Deployment result = await functions.CreateDeployment(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
entrypoint: "[ENTRYPOINT]",
|
||||
code: new File("./path-to-files/image.jpg"),
|
||||
activate: false);
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Execution result = await functions.CreateExecution(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Variable result = await functions.CreateVariable(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
key: "[KEY]",
|
||||
value: "[VALUE]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Function result = await functions.Create(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
name: "[NAME]",
|
||||
runtime: "node-14.5");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
await functions.DeleteDeployment(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
deploymentId: "[DEPLOYMENT_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
await functions.DeleteVariable(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
variableId: "[VARIABLE_ID]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
await functions.Delete(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Deployment result = await functions.GetDeployment(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
deploymentId: "[DEPLOYMENT_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Execution result = await functions.GetExecution(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
executionId: "[EXECUTION_ID]");
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Variable result = await functions.GetVariable(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
variableId: "[VARIABLE_ID]");
|
||||
12
docs/examples/1.3.x/server-dotnet/examples/functions/get.md
Normal file
12
docs/examples/1.3.x/server-dotnet/examples/functions/get.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Function result = await functions.Get(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
DeploymentList result = await functions.ListDeployments(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
ExecutionList result = await functions.ListExecutions(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
RuntimeList result = await functions.ListRuntimes();
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
VariableList result = await functions.ListVariables(
|
||||
functionId: "[FUNCTION_ID]");
|
||||
11
docs/examples/1.3.x/server-dotnet/examples/functions/list.md
Normal file
11
docs/examples/1.3.x/server-dotnet/examples/functions/list.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
FunctionList result = await functions.List();
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Function result = await functions.UpdateDeployment(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
deploymentId: "[DEPLOYMENT_ID]");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("5df5acd0d48c2") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
var functions = new Functions(client);
|
||||
|
||||
Variable result = await functions.UpdateVariable(
|
||||
functionId: "[FUNCTION_ID]",
|
||||
variableId: "[VARIABLE_ID]",
|
||||
key: "[KEY]");
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue