Merge branch '1.6.x' into bump-sdk

This commit is contained in:
Chirag Aggarwal 2025-03-13 11:01:14 +05:30 committed by GitHub
commit d81f2f8b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
91 changed files with 574 additions and 1527 deletions

View file

@ -72,7 +72,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.6.1
appwrite/appwrite:1.6.2
```
### Windows
@ -84,7 +84,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.6.1
appwrite/appwrite:1.6.2
```
#### PowerShell
@ -94,7 +94,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.6.1
appwrite/appwrite:1.6.2
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。

View file

@ -79,7 +79,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.6.1
appwrite/appwrite:1.6.2
```
### Windows
@ -91,7 +91,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.6.1
appwrite/appwrite:1.6.2
```
#### PowerShell
@ -101,7 +101,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.6.1
appwrite/appwrite:1.6.2
```
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.

View file

@ -3383,7 +3383,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@ -3404,7 +3404,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3423,7 +3424,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@ -4365,7 +4367,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",

View file

@ -3387,7 +3387,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@ -3408,7 +3408,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3427,7 +3428,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@ -6407,8 +6409,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -6644,8 +6644,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -7823,7 +7821,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@ -11585,7 +11583,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@ -11692,7 +11690,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@ -11718,54 +11716,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthStatus"
}
}
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@ -11788,7 +11738,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@ -11849,7 +11799,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@ -11910,7 +11860,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@ -11982,7 +11932,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@ -12081,8 +12031,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@ -12130,7 +12081,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@ -12191,7 +12142,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@ -12252,7 +12203,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@ -12313,7 +12264,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@ -12374,7 +12325,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@ -12413,14 +12364,14 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@ -12434,13 +12385,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -12474,10 +12425,71 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthQueue"
}
}
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 5000
},
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"tags": [
"health"
],
@ -12495,13 +12507,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -12557,7 +12569,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@ -12714,7 +12726,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
@ -17609,17 +17621,17 @@
},
"endpoint": {
"type": "string",
"description": "Source's Appwrite Endpoint",
"description": "Source Appwrite endpoint",
"x-example": "https:\/\/example.com"
},
"projectId": {
"type": "string",
"description": "Source's Project ID",
"description": "Source Project ID",
"x-example": "<PROJECT_ID>"
},
"apiKey": {
"type": "string",
"description": "Source's API Key",
"description": "Source API Key",
"x-example": "<API_KEY>"
}
},
@ -36052,6 +36064,20 @@
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "Aggregated number of files transformations per period.",
"items": {
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of files transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@ -36059,7 +36085,9 @@
"filesTotal",
"filesStorageTotal",
"files",
"storage"
"storage",
"imageTransformations",
"imageTransformationsTotal"
]
},
"usageFunctions": {
@ -36597,6 +36625,20 @@
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "An array of aggregated number of image transformations.",
"items": {
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of image transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@ -36628,7 +36670,9 @@
"authPhoneEstimate",
"authPhoneCountryBreakdown",
"databasesReads",
"databasesWrites"
"databasesWrites",
"imageTransformations",
"imageTransformationsTotal"
]
},
"headers": {

View file

@ -3077,7 +3077,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@ -3098,7 +3098,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3117,7 +3118,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@ -5951,8 +5953,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -6190,8 +6190,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -7381,7 +7379,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@ -10461,7 +10459,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@ -10570,7 +10568,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@ -10597,55 +10595,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthStatus"
}
}
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@ -10668,7 +10617,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@ -10730,7 +10679,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@ -10792,7 +10741,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@ -10865,7 +10814,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@ -10966,8 +10915,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@ -11015,7 +10965,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@ -11077,7 +11027,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@ -11139,7 +11089,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@ -11201,7 +11151,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@ -11263,7 +11213,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@ -11303,14 +11253,14 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@ -11324,13 +11274,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -11365,10 +11315,72 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthQueue"
}
}
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 5000
},
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"tags": [
"health"
],
@ -11386,13 +11398,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -11449,7 +11461,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@ -11609,7 +11621,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,

View file

@ -3557,7 +3557,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@ -3577,7 +3577,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3596,7 +3597,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@ -4547,7 +4549,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",

View file

@ -3577,7 +3577,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@ -3597,7 +3597,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3616,7 +3617,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@ -6607,8 +6609,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -6845,8 +6845,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -8012,7 +8010,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@ -11810,7 +11808,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@ -11919,7 +11917,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@ -11945,56 +11943,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"schema": {
"$ref": "#\/definitions\/healthStatus"
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@ -12019,7 +11967,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@ -12080,7 +12028,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@ -12141,7 +12089,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@ -12211,7 +12159,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@ -12309,8 +12257,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@ -12357,7 +12306,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@ -12418,7 +12367,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@ -12479,7 +12428,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@ -12540,7 +12489,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@ -12601,7 +12550,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@ -12638,10 +12587,10 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [
"application\/json"
],
@ -12651,7 +12600,7 @@
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@ -12661,13 +12610,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -12699,10 +12648,71 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"schema": {
"$ref": "#\/definitions\/healthQueue"
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 5000,
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"consumes": [
"application\/json"
],
@ -12722,13 +12732,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -12784,7 +12794,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@ -12945,7 +12955,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
@ -18070,19 +18080,19 @@
},
"endpoint": {
"type": "string",
"description": "Source's Appwrite Endpoint",
"description": "Source Appwrite endpoint",
"default": null,
"x-example": "https:\/\/example.com"
},
"projectId": {
"type": "string",
"description": "Source's Project ID",
"description": "Source Project ID",
"default": null,
"x-example": "<PROJECT_ID>"
},
"apiKey": {
"type": "string",
"description": "Source's API Key",
"description": "Source API Key",
"default": null,
"x-example": "<API_KEY>"
}
@ -36608,6 +36618,21 @@
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "Aggregated number of files transformations per period.",
"items": {
"type": "object",
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of files transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@ -36615,7 +36640,9 @@
"filesTotal",
"filesStorageTotal",
"files",
"storage"
"storage",
"imageTransformations",
"imageTransformationsTotal"
]
},
"usageFunctions": {
@ -37185,6 +37212,21 @@
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "An array of aggregated number of image transformations.",
"items": {
"type": "object",
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of image transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@ -37216,7 +37258,9 @@
"authPhoneEstimate",
"authPhoneCountryBreakdown",
"databasesReads",
"databasesWrites"
"databasesWrites",
"imageTransformations",
"imageTransformationsTotal"
]
},
"headers": {

View file

@ -3261,7 +3261,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@ -3281,7 +3281,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@ -3300,7 +3301,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@ -6133,8 +6135,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -6373,8 +6373,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@ -7552,7 +7550,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@ -10689,7 +10687,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@ -10800,7 +10798,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@ -10827,57 +10825,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"schema": {
"$ref": "#\/definitions\/healthStatus"
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@ -10902,7 +10849,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@ -10964,7 +10911,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@ -11026,7 +10973,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@ -11097,7 +11044,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@ -11197,8 +11144,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@ -11245,7 +11193,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@ -11307,7 +11255,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@ -11369,7 +11317,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@ -11431,7 +11379,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@ -11493,7 +11441,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@ -11531,10 +11479,10 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [
"application\/json"
],
@ -11544,7 +11492,7 @@
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@ -11554,13 +11502,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -11593,10 +11541,72 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"schema": {
"$ref": "#\/definitions\/healthQueue"
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 5000,
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"consumes": [
"application\/json"
],
@ -11616,13 +11626,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -11679,7 +11689,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@ -11843,7 +11853,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,

View file

@ -125,7 +125,7 @@ const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours
const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 4318;
const APP_VERSION_STABLE = '1.6.1';
const APP_VERSION_STABLE = '1.6.2';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';

View file

@ -1,23 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getDeploymentDownload(
"<FUNCTION_ID>", // functionId
"<DEPLOYMENT_ID>", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -1,22 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getTemplate(
"<TEMPLATE_ID>", // templateId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.listTemplates(
listOf(), // runtimes (optional)
listOf(), // useCases (optional)
1, // limit (optional)
0, // offset (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.getDeploymentDownload(
functionId = "<FUNCTION_ID>",
deploymentId = "<DEPLOYMENT_ID>",
)

View file

@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.getTemplate(
templateId = "<TEMPLATE_ID>",
)

View file

@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.listTemplates(
runtimes = listOf(), // (optional)
useCases = listOf(), // (optional)
limit = 1, // (optional)
offset = 0, // (optional)
)

View file

@ -1,13 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let bytes = try await functions.getDeploymentDownload(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
)

View file

@ -1,12 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunction = try await functions.getTemplate(
templateId: "<TEMPLATE_ID>"
)

View file

@ -1,15 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunctionList = try await functions.listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0 // optional
)

View file

@ -1,29 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
// Downloading file
UInt8List bytes = await functions.getDeploymentDownload(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>',
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: functions.getDeploymentDownload(
functionId:'<FUNCTION_ID>' ,
deploymentId:'<DEPLOYMENT_ID>' ,
), // Works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);

View file

@ -1,11 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunction result = await functions.getTemplate(
templateId: '<TEMPLATE_ID>',
);

View file

@ -1,14 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunctionList result = await functions.listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0, // optional
);

View file

@ -3,6 +3,34 @@ mutation {
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
) {
status
_id
_createdAt
_updatedAt
userId
expire
provider
providerUid
providerAccessToken
providerAccessTokenExpiry
providerRefreshToken
ip
osCode
osName
osVersion
clientType
clientCode
clientName
clientVersion
clientEngine
clientEngineVersion
deviceName
deviceBrand
deviceModel
countryCode
countryName
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -1,8 +0,0 @@
query {
functionsGetDeploymentDownload(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
) {
status
}
}

View file

@ -1,35 +0,0 @@
query {
functionsGetTemplate(
templateId: "<TEMPLATE_ID>"
) {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}

View file

@ -1,41 +0,0 @@
query {
functionsListTemplates(
runtimes: [],
useCases: [],
limit: 1,
offset: 0
) {
total
templates {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}
}

View file

@ -1,14 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.getDeploymentDownload(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);

View file

@ -1,13 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);
console.log(result);

View file

@ -1,16 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);
console.log(result);

View file

@ -1,8 +0,0 @@
GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Session:
X-Appwrite-JWT: <YOUR_JWT>

View file

@ -1,6 +0,0 @@
GET /v1/functions/templates/{templateId} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>

View file

@ -1,6 +0,0 @@
GET /v1/functions/templates HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>

View file

@ -1,14 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.getDeploymentDownload(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);

View file

@ -1,13 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);
console.log(result);

View file

@ -1,16 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);
console.log(result);

View file

@ -1,3 +0,0 @@
appwrite functions downloadDeployment \
--functionId <FUNCTION_ID> \
--deploymentId <DEPLOYMENT_ID>

View file

@ -1 +0,0 @@
appwrite functions getSpecifications

View file

@ -1,3 +0,0 @@
appwrite migrations createFirebaseOAuthMigration \
--resources one two three \
--projectId <PROJECT_ID>

View file

@ -1 +0,0 @@
appwrite migrations deleteFirebaseAuth

View file

@ -1,3 +0,0 @@
appwrite migrations getFirebaseReportOAuth \
--resources one two three \
--projectId <PROJECT_ID>

View file

@ -1 +0,0 @@
appwrite migrations listFirebaseProjects

View file

@ -1,14 +0,0 @@
import { Client, Functions } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.downloadDeployment(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);

View file

@ -1,11 +0,0 @@
import { Client, Functions } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getSpecifications();
console.log(result);

View file

@ -1,14 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.createFirebaseOAuthMigration(
[], // resources
'<PROJECT_ID>' // projectId
);
console.log(result);

View file

@ -1,11 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.deleteFirebaseAuth();
console.log(result);

View file

@ -1,14 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.getFirebaseReportOAuth(
[], // resources
'<PROJECT_ID>' // projectId
);
console.log(result);

View file

@ -1,11 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.listFirebaseProjects();
console.log(result);

View file

@ -1,13 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Functions functions = Functions(client);
UInt8List result = await functions.downloadDeployment(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>',
);

View file

@ -1,11 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunction result = await functions.getTemplate(
templateId: '<TEMPLATE_ID>',
);

View file

@ -1,14 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunctionList result = await functions.listTemplates(
runtimes: [], // (optional)
useCases: [], // (optional)
limit: 1, // (optional)
offset: 0, // (optional)
);

View file

@ -1,13 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const functions = new Functions(client);
const result = functions.downloadDeployment(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);

View file

@ -1,11 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const response = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);

View file

@ -1,14 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const response = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);

View file

@ -9,7 +9,7 @@ Client client = new Client()
Account account = new Account(client);
result = await account.UpdateMfaChallenge(
Session result = await account.UpdateMfaChallenge(
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
);

View file

@ -1,15 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Functions functions = new Functions(client);
byte[] result = await functions.DownloadDeployment(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
);

View file

@ -1,13 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
TemplateFunction result = await functions.GetTemplate(
templateId: "<TEMPLATE_ID>"
);

View file

@ -1,16 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
TemplateFunctionList result = await functions.ListTemplates(
runtimes: new List<string>(), // optional
useCases: new List<string>(), // optional
limit: 1, // optional
offset: 0 // optional
);

View file

@ -1,27 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("") // Your project ID
client.SetKey("") // Your secret API key
service := functions.NewFunctions(client)
response, error := service.DownloadDeployment(
"<FUNCTION_ID>",
"<DEPLOYMENT_ID>",
)
if error != nil {
panic(error)
}
fmt.Println(response)
}

View file

@ -1,25 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := functions.NewFunctions(client)
response, error := service.GetTemplate(
"<TEMPLATE_ID>",
)
if error != nil {
panic(error)
}
fmt.Println(response)
}

View file

@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := functions.NewFunctions(client)
response, error := service.ListTemplates(
functions.WithListTemplatesRuntimes([]interface{}{}),
functions.WithListTemplatesUseCases([]interface{}{}),
functions.WithListTemplatesLimit(1),
functions.WithListTemplatesOffset(0),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}

View file

@ -3,6 +3,34 @@ mutation {
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
) {
status
_id
_createdAt
_updatedAt
userId
expire
provider
providerUid
providerAccessToken
providerAccessTokenExpiry
providerRefreshToken
ip
osCode
osName
osVersion
clientType
clientCode
clientName
clientVersion
clientEngine
clientEngineVersion
deviceName
deviceBrand
deviceModel
countryCode
countryName
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -1,8 +0,0 @@
query {
functionsDownloadDeployment(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
) {
status
}
}

View file

@ -1,35 +0,0 @@
query {
functionsGetTemplate(
templateId: "<TEMPLATE_ID>"
) {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}

View file

@ -1,41 +0,0 @@
query {
functionsListTemplates(
runtimes: [],
useCases: [],
limit: 1,
offset: 0
) {
total
templates {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}
}

View file

@ -3,36 +3,6 @@ mutation {
userId: "<USER_ID>",
type: "totp"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
expired
}
accessedAt
}
}

View file

@ -1,24 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Functions functions = new Functions(client);
functions.downloadDeployment(
"<FUNCTION_ID>", // functionId
"<DEPLOYMENT_ID>", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);

View file

@ -1,22 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getTemplate(
"<TEMPLATE_ID>", // templateId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);

View file

@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.listTemplates(
listOf(), // runtimes (optional)
listOf(), // useCases (optional)
1, // limit (optional)
0, // offset (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);

View file

@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val functions = Functions(client)
val result = functions.downloadDeployment(
functionId = "<FUNCTION_ID>",
deploymentId = "<DEPLOYMENT_ID>"
)

View file

@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val response = functions.getTemplate(
templateId = "<TEMPLATE_ID>"
)

View file

@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val response = functions.listTemplates(
runtimes = listOf(), // optional
useCases = listOf(), // optional
limit = 1, // optional
offset = 0 // optional
)

View file

@ -1,13 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const functions = new sdk.Functions(client);
const result = await functions.downloadDeployment(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);

View file

@ -1,11 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new sdk.Functions(client);
const result = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);

View file

@ -1,14 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new sdk.Functions(client);
const result = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);

View file

@ -1,16 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Functions;
$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$functions = new Functions($client);
$result = $functions->downloadDeployment(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>'
);

View file

@ -1,14 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Functions;
$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
$functions = new Functions($client);
$result = $functions->getTemplate(
templateId: '<TEMPLATE_ID>'
);

View file

@ -1,17 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Functions;
$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
$functions = new Functions($client);
$result = $functions->listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0 // optional
);

View file

@ -1,13 +0,0 @@
from appwrite.client import Client
client = Client()
client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_key('<YOUR_API_KEY>') # Your secret API key
functions = Functions(client)
result = functions.download_deployment(
function_id = '<FUNCTION_ID>',
deployment_id = '<DEPLOYMENT_ID>'
)

View file

@ -1,11 +0,0 @@
from appwrite.client import Client
client = Client()
client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
functions = Functions(client)
result = functions.get_template(
template_id = '<TEMPLATE_ID>'
)

View file

@ -1,14 +0,0 @@
from appwrite.client import Client
client = Client()
client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
functions = Functions(client)
result = functions.list_templates(
runtimes = [], # optional
use_cases = [], # optional
limit = 1, # optional
offset = 0 # optional
)

View file

@ -1,7 +0,0 @@
GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <YOUR_API_KEY>

View file

@ -1,6 +0,0 @@
GET /v1/functions/templates/{templateId} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>

View file

@ -1,6 +0,0 @@
GET /v1/functions/templates HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>

View file

@ -1,15 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
functions = Functions.new(client)
result = functions.download_deployment(
function_id: '<FUNCTION_ID>',
deployment_id: '<DEPLOYMENT_ID>'
)

View file

@ -1,13 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
functions = Functions.new(client)
result = functions.get_template(
template_id: '<TEMPLATE_ID>'
)

View file

@ -1,16 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
functions = Functions.new(client)
result = functions.list_templates(
runtimes: [], # optional
use_cases: [], # optional
limit: 1, # optional
offset: 0 # optional
)

View file

@ -1,14 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
let functions = Functions(client)
let bytes = try await functions.downloadDeployment(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
)

View file

@ -1,12 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunction = try await functions.getTemplate(
templateId: "<TEMPLATE_ID>"
)

View file

@ -1,15 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunctionList = try await functions.listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0 // optional
)

View file

@ -7,7 +7,6 @@ use Exception;
use Throwable;
use Utopia\Audit\Audit;
use Utopia\CLI\Console;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Authorization;
use Utopia\Database\Exception\Structure;
@ -102,7 +101,7 @@ class Audits extends Action
'mode' => $mode,
'data' => $auditPayload,
],
'timestamp' => DateTime::formatTz(DateTime::now())
'timestamp' => date("Y-m-d H:i:s", $message->getTimestamp()),
];
if (isset($this->logs[$project->getInternalId()])) {

View file

@ -47,7 +47,7 @@ class Deletes extends Action
->inject('project')
->inject('dbForPlatform')
->inject('getProjectDB')
->inject('timelimit')
->inject('getLogsDB')
->inject('deviceForFiles')
->inject('deviceForFunctions')
->inject('deviceForBuilds')
@ -57,8 +57,8 @@ class Deletes extends Action
->inject('auditRetention')
->inject('log')
->callback(
fn ($message, Document $project, Database $dbForPlatform, callable $getProjectDB, callable $timelimit, Device $deviceForFiles, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, string $executionRetention, string $auditRetention, Log $log) =>
$this->action($message, $project, $dbForPlatform, $getProjectDB, $timelimit, $deviceForFiles, $deviceForFunctions, $deviceForBuilds, $deviceForCache, $certificates, $executionRetention, $auditRetention, $log)
fn ($message, Document $project, Database $dbForPlatform, callable $getProjectDB, callable $getLogsDB, Device $deviceForFiles, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, string $executionRetention, string $auditRetention, Log $log) =>
$this->action($message, $project, $dbForPlatform, $getProjectDB, $getLogsDB, $deviceForFiles, $deviceForFunctions, $deviceForBuilds, $deviceForCache, $certificates, $executionRetention, $auditRetention, $log)
);
}
@ -66,7 +66,7 @@ class Deletes extends Action
* @throws Exception
* @throws Throwable
*/
public function action(Message $message, Document $project, Database $dbForPlatform, callable $getProjectDB, callable $timelimit, Device $deviceForFiles, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, string $executionRetention, string $auditRetention, Log $log): void
public function action(Message $message, Document $project, Database $dbForPlatform, callable $getProjectDB, callable $getLogsDB, Device $deviceForFiles, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, string $executionRetention, string $auditRetention, Log $log): void
{
$payload = $message->getPayload() ?? [];
@ -131,7 +131,7 @@ class Deletes extends Action
$this->deleteExpiredSessions($project, $getProjectDB);
break;
case DELETE_TYPE_USAGE:
$this->deleteUsageStats($project, $getProjectDB, $hourlyUsageRetentionDatetime);
$this->deleteUsageStats($project, $getProjectDB, $getLogsDB, $hourlyUsageRetentionDatetime);
break;
case DELETE_TYPE_CACHE_BY_RESOURCE:
$this->deleteCacheByResource($project, $getProjectDB, $resource, $resourceType);
@ -158,7 +158,7 @@ class Deletes extends Action
$this->deleteExpiredTargets($project, $getProjectDB);
$this->deleteExecutionLogs($project, $getProjectDB, $executionRetention);
$this->deleteAuditLogs($project, $getProjectDB, $auditRetention);
$this->deleteUsageStats($project, $getProjectDB, $hourlyUsageRetentionDatetime);
$this->deleteUsageStats($project, $getProjectDB, $getLogsDB, $hourlyUsageRetentionDatetime);
$this->deleteExpiredSessions($project, $getProjectDB);
break;
default:
@ -412,14 +412,27 @@ class Deletes extends Action
* @return void
* @throws Exception
*/
private function deleteUsageStats(Document $project, callable $getProjectDB, string $hourlyUsageRetentionDatetime): void
private function deleteUsageStats(Document $project, callable $getProjectDB, callable $getLogsDB, string $hourlyUsageRetentionDatetime): void
{
/** @var \Utopia\Database\Database $dbForProject*/
$dbForProject = $getProjectDB($project);
// Delete Usage stats
// Delete Usage stats from projectDB
$this->deleteByGroup('stats', [
Query::lessThan('time', $hourlyUsageRetentionDatetime),
Query::equal('period', ['1h']),
], $dbForProject);
if ($project->getId() !== 'console') {
/** @var \Utopia\Database\Database $dbForLogs*/
$dbForLogs = call_user_func($getLogsDB, $project);
// Delete Usage stats from logsDB
$this->deleteByGroup('stats', [
Query::lessThan('time', $hourlyUsageRetentionDatetime),
Query::equal('period', ['1h']),
], $dbForLogs);
}
}
/**
@ -724,10 +737,12 @@ class Deletes extends Action
{
$projectId = $project->getId();
$dbForProject = $getProjectDB($project);
$audit = new Audit($dbForProject);
try {
$audit->cleanup($auditRetention);
$this->deleteByGroup(Audit::COLLECTION, [
Query::lessThan('time', $auditRetention),
Query::orderDesc('time'),
], $dbForProject);
} catch (DatabaseException $e) {
Console::error('Failed to delete audit logs for project ' . $projectId . ': ' . $e->getMessage());
}
@ -851,7 +866,7 @@ class Deletes extends Action
} else {
Console::error('Failed to delete deployment files: ' . $deploymentPath);
}
} catch (\Throwable $th) {
} catch (Throwable $th) {
Console::error('Failed to delete deployment files: ' . $deploymentPath);
Console::error('[Error] Type: ' . get_class($th));
Console::error('[Error] Message: ' . $th->getMessage());
@ -881,7 +896,7 @@ class Deletes extends Action
} else {
Console::error('Failed to delete build files: ' . $buildPath);
}
} catch (\Throwable $th) {
} catch (Throwable $th) {
Console::error('Failed to delete deployment files: ' . $buildPath);
Console::error('[Error] Type: ' . get_class($th));
Console::error('[Error] Message: ' . $th->getMessage());
@ -935,7 +950,7 @@ class Deletes extends Action
* @param Database $database
* @param ?callable $callback
* @return void
* @throws Exception
* @throws DatabaseException
*/
protected function deleteByGroup(
string $collection,
@ -947,7 +962,7 @@ class Deletes extends Action
try {
$documents = $database->deleteDocuments($collection, $queries);
} catch (\Throwable $th) {
} catch (Throwable $th) {
Console::error('Failed to delete documents for collection ' . $collection . ': ' . $th->getMessage());
return;
}

View file

@ -77,10 +77,13 @@ class StatsResources extends Action
// Reset documents for each job
$this->documents = [];
$startTime = microtime(true);
$this->countForProject($dbForPlatform, $getLogsDB, $getProjectDB, $project);
$endTime = microtime(true);
$executionTime = $endTime - $startTime;
Console::info('Project: ' . $project->getId() . '(' . $project->getInternalId() . ') aggregated in ' . $executionTime .' seconds');
}
protected function countForProject(Database $dbForPlatform, callable $getLogsDB, callable $getProjectDB, Document $project): void
{
Console::info('Begining count for: ' . $project->getId());