mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
chore: update format
This commit is contained in:
1 parent
9c413fd020
commit
85250ba7bb
56 files changed
+815
-639
No files matched your search
+1
-1
@@ -53,7 +53,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createBooleanColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateBooleanColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createDatetimeColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateDatetimeColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Delete extends Action
|
||||
],
|
||||
contentType: ContentType::NONE,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.deleteColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createEmailColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateEmailColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createEnumColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateEnumColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createFloatColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateFloatColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ class Get extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.getColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createIpColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateIpColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createIntegerColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateIntegerColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createRelationshipColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateRelationshipColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createStringColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateStringColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Create extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createUrlColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateUrlColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class XList extends Action
|
||||
)
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.listColumns',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -63,7 +63,7 @@ class Create extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createTable',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -53,7 +53,7 @@ class Delete extends Action
|
||||
],
|
||||
contentType: ContentType::NONE,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.deleteTable',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ class Decrement extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.decrementColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ class Increment extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.incrementColumn',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ class Delete extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.deleteRows',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateRows',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ class Upsert extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.upsertRows',
|
||||
],
|
||||
)
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ class Create extends Action
|
||||
new Parameter('permissions', optional: true),
|
||||
],
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createRow',
|
||||
],
|
||||
),
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ class Delete extends Action
|
||||
],
|
||||
contentType: ContentType::NONE,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.deleteRow',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class Get extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.getRow',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ class XList extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.listLogs',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateRow',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ class Upsert extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.upsertRow',
|
||||
],
|
||||
),
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class XList extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.listRows',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -48,7 +48,7 @@ class Get extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.getTable',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ class Create extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.createColumnIndex',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ class Delete extends Action
|
||||
],
|
||||
contentType: ContentType::NONE,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.deleteColumnIndex',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.getColumnIndex',
|
||||
],
|
||||
))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class XList extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.listColumnIndexes',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -60,7 +60,7 @@ class XList extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.listTableLogs',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -56,7 +56,7 @@ class Update extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.updateTable',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -53,7 +53,7 @@ class Get extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.getTableUsage',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -55,7 +55,7 @@ class XList extends Action
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
deprecated: [
|
||||
'version' => '1.8.0',
|
||||
'since' => '1.8.0',
|
||||
'replaceWith' => 'tables.list',
|
||||
],
|
||||
))
|
||||
|
||||
@@ -23,7 +23,7 @@ class Method
|
||||
* @param array<SDKResponse> $responses
|
||||
* @param ContentType $contentType
|
||||
* @param MethodType|null $type
|
||||
* @param ?array $deprecated
|
||||
* @param bool|array $deprecated
|
||||
* @param array|bool $hide
|
||||
* @param bool $packaging
|
||||
* @param ContentType $requestType
|
||||
@@ -39,7 +39,7 @@ class Method
|
||||
protected array $responses,
|
||||
protected ContentType $contentType = ContentType::JSON,
|
||||
protected ?MethodType $type = null,
|
||||
protected ?array $deprecated = null,
|
||||
protected bool|array $deprecated = false,
|
||||
protected array|bool $hide = false,
|
||||
protected bool $packaging = false,
|
||||
protected ContentType $requestType = ContentType::JSON,
|
||||
@@ -175,19 +175,9 @@ class Method
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function isDeprecated(): bool
|
||||
public function getDeprecated(): bool|array
|
||||
{
|
||||
return $this->deprecated !== null && \is_array($this->deprecated);
|
||||
}
|
||||
|
||||
public function getDeprecationVersion(): ?string
|
||||
{
|
||||
return $this->deprecated['version'] ?? '';
|
||||
}
|
||||
|
||||
public function getDeprecationReplacement(): ?string
|
||||
{
|
||||
return $this->deprecated['replaceWith'] ?? '';
|
||||
return $this->deprecated;
|
||||
}
|
||||
|
||||
public function isHidden(): bool|array
|
||||
@@ -268,7 +258,7 @@ class Method
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDeprecated(array $deprecated): self
|
||||
public function setDeprecated(bool|array $deprecated): self
|
||||
{
|
||||
$this->deprecated = $deprecated;
|
||||
return $this;
|
||||
|
||||
@@ -158,9 +158,7 @@ class OpenAPI3 extends Format
|
||||
'weight' => $route->getOrder(),
|
||||
'cookies' => $route->getLabel('sdk.cookies', false),
|
||||
'type' => $sdk->getType()->value ?? '',
|
||||
'deprecated' => $sdk->isDeprecated(),
|
||||
...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []),
|
||||
...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []),
|
||||
'deprecated' => $sdk->getDeprecated(),
|
||||
'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md',
|
||||
'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '',
|
||||
'rate-limit' => $route->getLabel('abuse-limit', 0),
|
||||
|
||||
@@ -160,9 +160,7 @@ class Swagger2 extends Format
|
||||
'weight' => $route->getOrder(),
|
||||
'cookies' => $route->getLabel('sdk.cookies', false),
|
||||
'type' => $sdk->getType()->value ?? '',
|
||||
'deprecated' => $sdk->isDeprecated(),
|
||||
...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []),
|
||||
...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []),
|
||||
'deprecated' => $sdk->getDeprecated(),
|
||||
'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md',
|
||||
'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '',
|
||||
'rate-limit' => $route->getLabel('abuse-limit', 0),
|
||||
|
||||
Reference in new issue
Block a user