Merge branch 'master' into feat-https-redirect-exception

This commit is contained in:
Matej Bačo 2022-04-20 08:53:09 +00:00
commit 369d438bc9
248 changed files with 2247 additions and 2834 deletions

4
.env
View file

@ -45,6 +45,7 @@ _APP_SMTP_SECURE=
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
_APP_FUNCTIONS_TIMEOUT=900
_APP_FUNCTIONS_BUILD_TIMEOUT=900
@ -53,8 +54,9 @@ _APP_FUNCTIONS_CPUS=0
_APP_FUNCTIONS_MEMORY=0
_APP_FUNCTIONS_MEMORY_SWAP=0
_APP_FUNCTIONS_INACTIVE_THRESHOLD=60
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes
OPEN_RUNTIMES_NETWORK=appwrite_runtimes
_APP_EXECUTOR_SECRET=your-secret-key
_APP_EXECUTOR_HOST=http://appwrite-executor/v1
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
_APP_MAINTENANCE_RETENTION_ABUSE=86400

View file

@ -1,3 +1,22 @@
# Unreleased Version
- Renamed `providers` to `authProviders` in project collection **Breaking Change**
# Version 0.13.4
## Features
- Added `detailedTrace` to Logger events
- Added new `_APP_STORAGE_PREVIEW_LIMIT` environment variable to configure maximum preview file size
## Bugs
- Fixed missing volume mount in Docker Compose
- Fixed upload with Bucket File permission
- Fixed custom ID validation in Console
- Fixed file preview with no `output` passed
- Fixed GitHub issue URL in Console
- Fixed double PDOException logging
- Fixed functions cleanup when container is already initialized
- Fixed float input precision in Console
# Version 0.13.3
## Bugs
- Fixed search for terms that inlcude `@` characters

View file

@ -24,7 +24,7 @@ COPY public /usr/local/src/public
RUN npm ci
RUN npm run build
FROM php:8.0.14-cli-alpine3.15 as compile
FROM php:8.0.18-cli-alpine3.15 as compile
ARG DEBUG=false
ENV DEBUG=$DEBUG
@ -123,7 +123,7 @@ RUN \
./configure && \
make && make install
FROM php:8.0.14-cli-alpine3.15 as final
FROM php:8.0.18-cli-alpine3.15 as final
LABEL maintainer="team@appwrite.io"
@ -185,6 +185,7 @@ ENV _APP_SERVER=swoole \
_APP_FUNCTIONS_MEMORY=128 \
_APP_FUNCTIONS_MEMORY_SWAP=128 \
_APP_EXECUTOR_SECRET=a-random-secret \
_APP_EXECUTOR_HOST=http://appwrite-executor/v1 \
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \
_APP_SETUP=self-hosted \
_APP_VERSION=$VERSION \

View file

@ -20,7 +20,7 @@
Appwrite是一个基于Docker的端到端开发者平台其容器化的微服务库可应用于网页端移动端以及后端。Appwrite 通过视觉化界面极简了从零编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。
Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存, 图像处理,云函数计算,[等多种服务]https/ /appwrite.io/docs
Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存,图像处理,云函数计算,[等多种服务](https://appwrite.io/docs).
![Appwrite](public/images/github.png)
@ -34,13 +34,13 @@ Appwrite 可以提供给开发者用户验证,外部授权,用户数据读
- [CMD](#cmd)
- [PowerShell](#powershell)
- [从旧版本升级](#从旧版本升级)
- [快速入门](#入门)
- [入门](#入门)
- [软件服务](#软件服务)
- [开发套件](#开发套件)
- [客户端](#客户端)
- [服务器](#服务器)
- [开发者社区](#开发者社区)
- [软件架构]](#软件架构)
- [软件架构](#软件架构)
- [贡献代码](#贡献代码)
- [安全](#安全)
- [订阅我们](#订阅我们)
@ -59,7 +59,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:0.13.3
appwrite/appwrite:0.13.4
```
### Windows
@ -71,7 +71,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:0.13.3
appwrite/appwrite:0.13.4
```
#### PowerShell
@ -81,7 +81,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:0.13.3
appwrite/appwrite:0.13.4
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
@ -118,7 +118,7 @@ docker run -it --rm ,
### 开发套件
以下是当前支持的平台和语言列表。如果您想帮助我们为您选择的平台添加支持,您可以访问我们的 [SDK 生成器](https://github.com/appwrite/sdk-generator) 项目并查看我们的 [贡献指南]( https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md
以下是当前支持的平台和语言列表。如果您想帮助我们为您选择的平台添加支持,您可以访问我们的 [SDK 生成器](https://github.com/appwrite/sdk-generator) 项目并查看我们的 [贡献指南](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md)
#### 客户端
* ✅   [Web](https://github.com/appwrite/sdk-for-web) (由 Appwrite 团队维护)
@ -168,4 +168,4 @@ Appwrite API 界面层利用后台缓存和任务委派来提供极速的响应
## 版权说明
版权详情,访问 [BSD 3-Clause License](./LICENSE)。
版权详情,访问 [BSD 3-Clause License](./LICENSE)。

View file

@ -19,7 +19,7 @@
English | [简体中文](README-CN.md)
[**Appwrite 0.13 has been released! Learn what's new!**](https://dev.to/appwrite/its-here-announcing-the-release-of-appwrite-012-5c8b)
[**Appwrite 0.13 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-013-with-major-upgrades-to-storage-and-functions-3hpf)
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker<nobr> microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.
@ -62,7 +62,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:0.13.3
appwrite/appwrite:0.13.4
```
### Windows
@ -74,7 +74,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:0.13.3
appwrite/appwrite:0.13.4
```
#### PowerShell
@ -84,7 +84,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:0.13.3
appwrite/appwrite:0.13.4
```
Once the Docker installation completes, 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 installation completes.

View file

@ -512,7 +512,7 @@ $collections = [
'filters' => ['json'],
],
[
'$id' => 'providers',
'$id' => 'authProviders',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,

View file

@ -63,7 +63,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '4.0.1',
'version' => '4.0.2',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@ -81,7 +81,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '0.3.0',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@ -116,7 +116,7 @@ return [
[
'key' => 'android',
'name' => 'Android',
'version' => '0.4.0',
'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@ -180,7 +180,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '0.15.0',
'version' => '0.16.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@ -208,7 +208,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '5.0.0',
'version' => '5.1.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@ -226,7 +226,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '3.0.0',
'version' => '3.1.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@ -244,7 +244,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '4.0.0',
'version' => '4.1.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@ -262,7 +262,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '0.7.0',
'version' => '0.8.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@ -280,7 +280,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '4.0.0',
'version' => '4.1.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@ -352,7 +352,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '4.0.1',
'version' => '4.0.2',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@ -370,7 +370,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '0.3.0',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@ -392,7 +392,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '0.3.0',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,

View file

@ -231,6 +231,16 @@ return [ // Ordered by ABC.
'beta' => false,
'mock' => false,
],
'zoom' => [
'name' => 'Zoom',
'developers' => 'https://marketplace.zoom.us/docs/guides/auth/oauth/',
'icon' => 'icon-zoom',
'enabled' => true,
'sandbox' => false,
'form' => false,
'beta' => false,
'mock' => false,
],
'yahoo' => [
'name' => 'Yahoo',
'developers' => 'https://developer.yahoo.com/oauth2/guide/flows_authcode/',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -904,7 +904,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.",
"required": true,
"type": "string",
"x-example": "amazon",
@ -1656,7 +1656,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -1904,7 +1904,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -1934,7 +1934,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -918,7 +918,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.",
"required": true,
"type": "string",
"x-example": "amazon",
@ -2788,7 +2788,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -3036,7 +3036,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -3066,7 +3066,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",
@ -3723,7 +3723,7 @@
},
"/functions/runtimes": {
"get": {
"summary": "List the currently active function runtimes.",
"summary": "List runtimes",
"operationId": "functionsListRuntimes",
"consumes": ["application/json"],
"produces": ["application/json"],
@ -10212,12 +10212,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "count"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "integer"
},
"status": {
"type": "string",
@ -10266,12 +10266,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "percentageCompleted"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "double"
},
"status": {
"type": "string",
@ -10320,12 +10320,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "isEnabled"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "boolean"
},
"status": {
"type": "string",
@ -10359,7 +10359,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "userEmail"
},
"type": {
"type": "string",
@ -10403,7 +10403,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "status"
},
"type": {
"type": "string",
@ -10453,7 +10453,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "ipAddress"
},
"type": {
"type": "string",
@ -10497,7 +10497,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "githubUrl"
},
"type": {
"type": "string",
@ -11924,6 +11924,16 @@
"description": "VK OAuth secret ID.",
"x-example": "djsgudsdsewe43434343dd34..."
},
"providerZoomAppid": {
"type": "string",
"description": "Zoom OAuth app ID.",
"x-example": "123247283472834787438"
},
"providerZoomSecret": {
"type": "string",
"description": "Zoom OAuth secret ID.",
"x-example": "djsgudsdsewe43434343dd34..."
},
"providerYahooAppid": {
"type": "string",
"description": "Yahoo OAuth app ID.",
@ -12124,6 +12134,8 @@
"providerTwitchSecret",
"providerVkAppid",
"providerVkSecret",
"providerZoomAppid",
"providerZoomSecret",
"providerYahooAppid",
"providerYahooSecret",
"providerYammerAppid",

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -2414,7 +2414,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -2662,7 +2662,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -2692,7 +2692,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",
@ -3123,7 +3123,7 @@
},
"/functions/runtimes": {
"get": {
"summary": "List the currently active function runtimes.",
"summary": "List runtimes",
"operationId": "functionsListRuntimes",
"consumes": ["application/json"],
"produces": ["application/json"],
@ -7461,12 +7461,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "count"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "integer"
},
"status": {
"type": "string",
@ -7515,12 +7515,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "percentageCompleted"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "double"
},
"status": {
"type": "string",
@ -7569,12 +7569,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "isEnabled"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "boolean"
},
"status": {
"type": "string",
@ -7608,7 +7608,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "userEmail"
},
"type": {
"type": "string",
@ -7652,7 +7652,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "status"
},
"type": {
"type": "string",
@ -7702,7 +7702,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "ipAddress"
},
"type": {
"type": "string",
@ -7746,7 +7746,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "githubUrl"
},
"type": {
"type": "string",

View file

@ -402,6 +402,15 @@ return [
'question' => '',
'filter' => ''
],
[
'name' => '_APP_STORAGE_PREVIEW_LIMIT',
'description' => 'Maximum file size allowed for file image preview. The default value is 20MB. You should pass your size limit value in bytes.',
'introduction' => '0.13.4',
'default' => '20000000',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_STORAGE_ANTIVIRUS',
'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'disabled\' by default, to enable the scans set the value to \'enabled\'. Before enabling, you must add the ClamAV service and depend on it on main Appwrite service.',
@ -588,9 +597,18 @@ return [
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EXECUTOR_HOST',
'description' => 'The host used by Appwrite to communicate with the function executor!',
'introduction' => '0.13.0',
'default' => 'http://appwrite-executor/v1',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EXECUTOR_RUNTIME_NETWORK',
'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.',
'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead!',
'introduction' => '0.13.0',
'default' => 'appwrite_runtimes',
'required' => false,
@ -642,48 +660,57 @@ return [
'question' => '',
'filter' => ''
],
],
[
'category' => 'Maintenance',
'description' => '',
'variables' => [
[
'name' => '_APP_MAINTENANCE_INTERVAL',
'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).',
'introduction' => '0.7.0',
'default' => '86400',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION',
'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).',
'introduction' => '0.7.0',
'default' => '1209600',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_AUDIT',
'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).',
'introduction' => '0.7.0',
'default' => '1209600',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_ABUSE',
'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).',
'introduction' => '0.7.0',
'default' => '86400',
'required' => false,
'question' => '',
'filter' => ''
]
[
'name' => 'OPEN_RUNTIMES_NETWORK',
'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.',
'introduction' => '0.13.0',
'default' => 'appwrite_runtimes',
'required' => false,
'question' => '',
'filter' => ''
],
],
],
[
'category' => 'Maintenance',
'description' => '',
'variables' => [
[
'name' => '_APP_MAINTENANCE_INTERVAL',
'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).',
'introduction' => '0.7.0',
'default' => '86400',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION',
'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).',
'introduction' => '0.7.0',
'default' => '1209600',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_AUDIT',
'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).',
'introduction' => '0.7.0',
'default' => '1209600',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_ABUSE',
'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).',
'introduction' => '0.7.0',
'default' => '86400',
'required' => false,
'question' => '',
'filter' => ''
]
],
],
];

View file

@ -274,8 +274,8 @@ App::get('/v1/account/sessions/oauth2/:provider')
$protocol = $request->getProtocol();
$callback = $protocol.'://'.$request->getHostname().'/v1/account/sessions/oauth2/callback/'.$provider.'/'.$project->getId();
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
if (!empty($appSecret) && isset($appSecret['version'])) {
$key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']);
@ -396,8 +396,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$callback = $protocol . '://' . $request->getHostname() . '/v1/account/sessions/oauth2/callback/' . $provider . '/' . $project->getId();
$defaultState = ['success' => $project->getAttribute('url', ''), 'failure' => ''];
$validateURL = new URL();
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
if (!empty($appSecret) && isset($appSecret['version'])) {
$key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']);
@ -675,7 +675,7 @@ App::post('/v1/account/sessions/magic-url')
'emailVerification' => false,
'status' => true,
'password' => null,
'passwordUpdate' => \time(),
'passwordUpdate' => 0,
'registration' => \time(),
'reset' => false,
'prefs' => new \stdClass(),
@ -946,7 +946,7 @@ App::post('/v1/account/sessions/anonymous')
'emailVerification' => false,
'status' => true,
'password' => null,
'passwordUpdate' => \time(),
'passwordUpdate' => 0,
'registration' => \time(),
'reset' => false,
'name' => null,
@ -1710,8 +1710,8 @@ App::patch('/v1/account/sessions/:sessionId')
$provider = $session->getAttribute('provider');
$refreshToken = $session->getAttribute('providerRefreshToken');
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
$className = 'Appwrite\\Auth\\OAuth2\\'.\ucfirst($provider);

View file

@ -938,7 +938,7 @@ App::post('/v1/functions/:functionId/executions')
]);
/** Execute function */
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$executionResponse = [];
try {
$executionResponse = $executor->createExecution(

View file

@ -95,7 +95,7 @@ App::post('/v1/projects')
'legalTaxId' => $legalTaxId,
'services' => new stdClass(),
'platforms' => null,
'providers' => [],
'authProviders' => [],
'webhooks' => null,
'keys' => null,
'domains' => null,
@ -130,6 +130,8 @@ App::post('/v1/projects')
'signed' => $attribute['signed'],
'array' => $attribute['array'],
'filters' => $attribute['filters'],
'default' => $attribute['default'] ?? null,
'format' => $attribute['format'] ?? ''
]);
}
@ -445,11 +447,11 @@ App::patch('/v1/projects/:projectId/oauth2')
throw new Exception('Project not found', 404, Exception::PROJECT_NOT_FOUND);
}
$providers = $project->getAttribute('providers', []);
$providers = $project->getAttribute('authProviders', []);
$providers[$provider . 'Appid'] = $appId;
$providers[$provider . 'Secret'] = $secret;
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('providers', $providers));
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('authProviders', $providers));
$response->dynamic($project, Response::MODEL_PROJECT);
});

View file

@ -86,6 +86,8 @@ App::post('/v1/storage/buckets')
'signed' => $attribute['signed'],
'array' => $attribute['array'],
'filters' => $attribute['filters'],
'default' => $attribute['default'] ?? null,
'format' => $attribute['format'] ?? ''
]);
}
@ -376,7 +378,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
/** @var Utopia\Storage\Device $deviceLocal */
/** @var string $mode */
$bucket = $dbForProject->getDocument('buckets', $bucketId);
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
if ($bucket->isEmpty()
|| (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) {
@ -918,7 +920,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$cipher = $file->getAttribute('openSSLCipher');
$mime = $file->getAttribute('mimeType');
if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > APP_LIMIT_PREVIEW) {
if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) App::getEnv('_APP_STORAGE_PREVIEW_LIMIT', 20000000)) {
if(!\in_array($mime, $inputs)) {
$path = (\array_key_exists($mime, $fileLogos)) ? $fileLogos[$mime] : $fileLogos['default'];
} else {
@ -944,9 +946,13 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$cache = new Cache(new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId() . DIRECTORY_SEPARATOR . $bucketId . DIRECTORY_SEPARATOR . $fileId)); // Limit file number or size
$data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */);
if ($data) {
$output = (empty($output)) ? $type : $output;
if(empty($output)) {
// when file extension is not provided and the mime type is not one of our supported outputs
// we fallback to `jpg` output format
$output = empty($type) ? (array_search($mime, $outputs) ?? 'jpg') : $type;
}
if ($data) {
return $response
->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg'])
->addHeader('Expires', $date)
@ -996,8 +1002,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$image->setRotation(($rotation + 360) % 360);
}
$output = (empty($output)) ? $type : $output;
$data = $image->output($output, $quality);
$cache->save($key, $data);
@ -1008,7 +1012,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
;
$response
->setContentType($outputs[$output])
->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg'])
->addHeader('Expires', $date)
->addHeader('X-Appwrite-Cache', 'miss')
->send($data)

View file

@ -325,6 +325,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->match($request);
/** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */
if ($error instanceof PDOException) {
throw $error;
}

View file

@ -141,7 +141,6 @@ App::post('/v1/runtimes')
->param('vars', [], new Assoc(), 'Environment Variables required for the build')
->param('commands', [], new ArrayList(new Text(0)), 'Commands required to build the container')
->param('runtime', '', new Text(128), 'Runtime for the cloud function')
->param('network', '', new Text(128), 'Network to attach the container to')
->param('baseImage', '', new Text(128), 'Base image name of the runtime')
->param('entrypoint', '', new Text(256), 'Entrypoint of the code file', true)
->param('remove', false, new Boolean(), 'Remove a runtime after execution')
@ -149,8 +148,7 @@ App::post('/v1/runtimes')
->inject('orchestrationPool')
->inject('activeRuntimes')
->inject('response')
->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $network, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) {
->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) {
if ($activeRuntimes->exists($runtimeId)) {
throw new Exception('Runtime already exists.', 409);
}
@ -235,9 +233,7 @@ App::post('/v1/runtimes')
throw new Exception('Failed to create build container', 500);
}
if (!empty($network)) {
$orchestration->networkConnect($runtimeId, $network);
}
$orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite_runtimes'));
/**
* Execute any commands if they were provided
@ -307,9 +303,24 @@ App::post('/v1/runtimes')
Console::error('Build failed: ' . $th->getMessage() . $stdout);
throw new Exception($th->getMessage() . $stdout, 500);
} finally {
if (!empty($containerId) && $remove) {
$orchestration->remove($containerId, true);
// Container cleanup
if($remove) {
if (!empty($containerId)) {
// If container properly created
$orchestration->remove($containerId, true);
} else {
// If whole creation failed, but container might have been initialized
try {
// Try to remove with contaier name instead of ID
$orchestration->remove($runtimeId, true);
} catch (Throwable $th) {
// If fails, means initialization also failed.
// Contianer is not there, no need to remove
}
}
}
// Release orchestration back to pool, we are done with it
$orchestrationPool->put($orchestration);
}

View file

@ -132,6 +132,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
'signed' => $attribute['signed'],
'array' => $attribute['array'],
'filters' => $attribute['filters'],
'default' => $attribute['default'] ?? null,
'format' => $attribute['format'] ?? ''
]);
}
@ -187,6 +189,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
'signed' => $attribute['signed'],
'array' => $attribute['array'],
'filters' => $attribute['filters'],
'default' => $attribute['default'] ?? null,
'format' => $attribute['format'] ?? ''
]);
}

View file

@ -69,9 +69,8 @@ const APP_LIMIT_USERS = 10000;
const APP_LIMIT_ANTIVIRUS = 20000000; //20MB
const APP_LIMIT_ENCRYPTION = 20000000; //20MB
const APP_LIMIT_COMPRESSION = 20000000; //20MB
const APP_LIMIT_PREVIEW = 20000000; //20MB file size limit for preview endpoint
const APP_CACHE_BUSTER = 303;
const APP_VERSION_STABLE = '0.13.3';
const APP_CACHE_BUSTER = 304;
const APP_VERSION_STABLE = '0.13.4';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';

View file

@ -565,13 +565,13 @@ $cli
foreach ($parents as $parent) {
foreach ($subCollections as $subCollection => $subOptions) { // Sub collection counts, like database.collections.collectionId.documents.count
$dbForProject->setNamespace("_{$projectId}");
$count = $dbForProject->count(($subOptions['collectionPrefix'] ?? '') . $parent->getId());
$count = $dbForProject->count(($subOptions['collectionPrefix'] ?? '') . $parent->getInternalId());
$subCollectionCounts[$subCollection] = ($subCollectionCounts[$subCollection] ?? 0) + $count; // Project level counts for sub collections like database.documents.count
$dbForProject->setNamespace("_{$projectId}");
$metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.count" : "{$metricPrefix}.{$collection}.{$parent->getId()}.{$subCollection}.count";
$metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.count" : "{$metricPrefix}.{$collection}.{$parent->getInternalId()}.{$subCollection}.count";
$time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes
$id = \md5($time . '_30m_' . $metric); //Construct unique id for each metric using time, period and metric
$document = $dbForProject->getDocument('stats', $id);
@ -619,13 +619,13 @@ $cli
}
$dbForProject->setNamespace("_{$projectId}");
$total = (int) $dbForProject->sum(($subOptions['collectionPrefix'] ?? '') . $parent->getId(), $total['field']);
$total = (int) $dbForProject->sum(($subOptions['collectionPrefix'] ?? '') . $parent->getInternalId(), $total['field']);
$subCollectionTotals[$subCollection] = ($ssubCollectionTotals[$subCollection] ?? 0) + $total; // Project level sum for sub collections like storage.total
$dbForProject->setNamespace("_{$projectId}");
$metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.total" : "{$metricPrefix}.{$collection}.{$parent->getId()}.{$subCollection}.total";
$metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.total" : "{$metricPrefix}.{$collection}.{$parent->getInternalId()}.{$subCollection}.total";
$time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes
$id = \md5($time . '_30m_' . $metric); //Construct unique id for each metric using time, period and metric
$document = $dbForProject->getDocument('stats', $id);

View file

@ -26,7 +26,7 @@ $version = $this->getParam('version', '') . '.' . APP_CACHE_BUSTER;
data-analytics-event="click"
data-analytics-category="console/footer"
data-analytics-label="New GitHub Issue"
href="https://github.com/appwrite/appwrite/issues/new?body=%0A%0A%0A---%0AAppwrite Version:%20<?php echo $version; ?>" target="_blank" rel="noopener">Open an Issue</a>
href="https://github.com/appwrite/appwrite/issues/new?assignees=&labels=bug&template=bug.yaml&title=[<?php echo $version; ?>]%20%F0%9F%90%9B+Bug+Report%3A+" target="_blank" rel="noopener">Open an Issue</a>
</li>
<li>
<a class="link-animation-enabled"

View file

@ -211,7 +211,7 @@
required
maxlength="36"
class=""
pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
name="projectId" />
<label>Name</label>

View file

@ -627,7 +627,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="string-key">Attribute ID</label>
<input id="string-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="string-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<label for="string-length">Size</label>
@ -683,7 +683,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="integer-key">Attribute ID</label>
<input id="integer-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="integer-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -748,7 +748,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="float-key">Attribute ID</label>
<input id="float-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="float-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -813,7 +813,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="email-key">Attribute ID</label>
<input id="email-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="128" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="email-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="128" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -866,7 +866,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="boolean-key">Attribute ID</label>
<input id="boolean-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="boolean-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -923,7 +923,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="ip-key">Attribute ID</label>
<input id="ip-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="ip-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -976,7 +976,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="url-key">Attribute ID</label>
<input id="url-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="url-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<div class="margin-bottom">
@ -1029,7 +1029,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="enum-key">Attribute ID</label>
<input id="enum-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="enum-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<label>Elements</label>
@ -1107,7 +1107,7 @@ $logs = $this->getParam('logs', null);
<input type="hidden" name="collectionId" data-ls-bind="{{router.params.id}}" />
<label for="index-key">Index Key</label>
<input id="index-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
<input id="index-key" type="text" class="full-width" name="key" required autocomplete="off" maxlength="36" pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot</div>
<label for="index-type">Type</label>

View file

@ -83,7 +83,7 @@ $logs = $this->getParam('logs', null);
name="documentId"
id="documentId"
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" />
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
<?php endif; ?>
<fieldset name="data" data-cast-to="object" data-ls-attrs="x-init=doc = {{project-document}}" x-data="{doc: {}}">

View file

@ -102,7 +102,7 @@
data-validator="database.getCollection"
required
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
name="collectionId" />
<label for="collection-name">Name</label>

View file

@ -113,7 +113,7 @@ $runtimes = $this->getParam('runtimes', []);
data-validator="functions.get"
required
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
name="functionId" />
<label for="name">Name</label>

View file

@ -101,7 +101,7 @@
data-validator="storage.getBucket"
required
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
name="bucketId"
id="bucketId" />

View file

@ -165,7 +165,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false);
data-validator="users.get"
required
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
id="userId"
name="userId" />
@ -313,7 +313,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false);
data-validator="teams.get"
required
maxlength="36"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$"
pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$"
id="teamId"
name="teamId" />

View file

@ -1,3 +1,10 @@
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: 5
max-size: 10m
<?php
$httpPort = $this->getParam('httpPort', '');
@ -36,6 +43,7 @@ services:
appwrite:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
container_name: appwrite
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -98,6 +106,7 @@ services:
- _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT
- _APP_STORAGE_LIMIT
- _APP_STORAGE_PREVIEW_LIMIT
- _APP_STORAGE_ANTIVIRUS
- _APP_STORAGE_ANTIVIRUS_HOST
- _APP_STORAGE_ANTIVIRUS_PORT
@ -119,6 +128,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_RUNTIMES
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STATSD_HOST
@ -132,6 +142,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: realtime
container_name: appwrite-realtime
<<: *x-logging
restart: unless-stopped
labels:
- "traefik.enable=true"
@ -172,6 +183,7 @@ services:
appwrite-worker-audits:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-audits
<<: *x-logging
container_name: appwrite-worker-audits
restart: unless-stopped
networks:
@ -197,6 +209,7 @@ services:
appwrite-worker-webhooks:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-webhooks
<<: *x-logging
container_name: appwrite-worker-webhooks
restart: unless-stopped
networks:
@ -218,6 +231,7 @@ services:
appwrite-worker-deletes:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-deletes
<<: *x-logging
container_name: appwrite-worker-deletes
restart: unless-stopped
networks:
@ -255,10 +269,12 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
appwrite-worker-database:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-database
<<: *x-logging
container_name: appwrite-worker-database
restart: unless-stopped
networks:
@ -284,6 +300,7 @@ services:
appwrite-worker-builds:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-builds
<<: *x-logging
container_name: appwrite-worker-builds
restart: unless-stopped
networks:
@ -295,6 +312,7 @@ services:
- _APP_ENV
- _APP_OPENSSL_KEY_V1
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@ -310,6 +328,7 @@ services:
appwrite-worker-certificates:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-certificates
<<: *x-logging
container_name: appwrite-worker-certificates
restart: unless-stopped
networks:
@ -340,6 +359,7 @@ services:
appwrite-worker-functions:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-functions
<<: *x-logging
container_name: appwrite-worker-functions
restart: unless-stopped
networks:
@ -362,6 +382,7 @@ services:
- _APP_DB_PASS
- _APP_FUNCTIONS_TIMEOUT
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_USAGE_STATS
- DOCKERHUB_PULL_USERNAME
- DOCKERHUB_PULL_PASSWORD
@ -369,6 +390,7 @@ services:
appwrite-executor:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: executor
<<: *x-logging
container_name: appwrite-executor
restart: unless-stopped
stop_signal: SIGINT
@ -396,7 +418,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_INACTIVE_THRESHOLD
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_RUNTIME_NETWORK
- OPEN_RUNTIMES_NETWORK
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STORAGE_DEVICE
@ -414,6 +436,7 @@ services:
appwrite-worker-mails:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-mails
<<: *x-logging
container_name: appwrite-worker-mails
restart: unless-stopped
networks:
@ -440,6 +463,7 @@ services:
appwrite-maintenance:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
restart: unless-stopped
networks:
@ -462,6 +486,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: usage
container_name: appwrite-usage
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -488,6 +513,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: schedule
container_name: appwrite-schedule
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -503,6 +529,7 @@ services:
mariadb:
image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -518,6 +545,7 @@ services:
redis:
image: redis:6.2-alpine
container_name: appwrite-redis
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -536,6 +564,7 @@ services:
influxdb:
image: appwrite/influxdb:1.5.0
container_name: appwrite-influxdb
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -545,6 +574,7 @@ services:
telegraf:
image: appwrite/telegraf:1.4.0
container_name: appwrite-telegraf
<<: *x-logging
restart: unless-stopped
networks:
- appwrite

View file

@ -33,7 +33,7 @@ class BuildsV1 extends Worker
}
public function init(): void {
$this->executor = new Executor();
$this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
}
public function run(): void

View file

@ -368,7 +368,7 @@ class DeletesV1 extends Worker
* Request executor to delete all deployment containers
*/
Console::info("Requesting executor to delete all deployment containers for function " . $functionId);
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
foreach ($deploymentIds as $deploymentId) {
try {
$executor->deleteRuntime($projectId, $deploymentId);
@ -420,7 +420,7 @@ class DeletesV1 extends Worker
*/
Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId);
try {
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$executor->deleteRuntime($projectId, $deploymentId);
} catch (Throwable $th) {
Console::error($th->getMessage());

View file

@ -37,7 +37,7 @@ class FunctionsV1 extends Worker
public function init(): void
{
$this->executor = new Executor();
$this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
}
public function run(): void

View file

@ -42,7 +42,7 @@
"utopia-php/abuse": "0.7.*",
"utopia-php/analytics": "0.2.*",
"utopia-php/audit": "0.8.*",
"utopia-php/cache": "0.4.*",
"utopia-php/cache": "0.6.*",
"utopia-php/cli": "0.12.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.15.*",
@ -71,7 +71,7 @@
}
],
"require-dev": {
"appwrite/sdk-generator": "0.18.1",
"appwrite/sdk-generator": "0.18.3",
"phpunit/phpunit": "9.5.10",
"swoole/ide-helper": "4.8.5",
"textalk/websocket": "1.5.5",

170
composer.lock generated
View file

@ -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": "3ef20ad6919a1844f207e06719ad8929",
"content-hash": "e0de8d0bba618a46646cf3da1e06a652",
"packages": [
{
"name": "adhocore/jwt",
@ -300,20 +300,23 @@
},
{
"name": "colinmollenhour/credis",
"version": "v1.12.1",
"version": "v1.13.0",
"source": {
"type": "git",
"url": "https://github.com/colinmollenhour/credis.git",
"reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb"
"reference": "afec8e58ec93d2291c127fa19709a048f28641e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/colinmollenhour/credis/zipball/c27faa11724229986335c23f4b6d0f1d8d6547fb",
"reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb",
"url": "https://api.github.com/repos/colinmollenhour/credis/zipball/afec8e58ec93d2291c127fa19709a048f28641e5",
"reference": "afec8e58ec93d2291c127fa19709a048f28641e5",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
"php": ">=5.6.0"
},
"suggest": {
"ext-redis": "Improved performance for communicating with redis"
},
"type": "library",
"autoload": {
@ -338,9 +341,9 @@
"homepage": "https://github.com/colinmollenhour/credis",
"support": {
"issues": "https://github.com/colinmollenhour/credis/issues",
"source": "https://github.com/colinmollenhour/credis/tree/v1.12.1"
"source": "https://github.com/colinmollenhour/credis/tree/v1.13.0"
},
"time": "2020-11-06T16:09:14+00:00"
"time": "2022-04-07T14:57:22+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -1580,16 +1583,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.0.0",
"version": "v3.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced"
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
"reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"shasum": ""
},
"require": {
@ -1627,7 +1630,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1"
},
"funding": [
{
@ -1643,7 +1646,7 @@
"type": "tidelift"
}
],
"time": "2021-11-01T23:48:49+00:00"
"time": "2022-01-02T09:55:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -1973,22 +1976,22 @@
},
{
"name": "utopia-php/cache",
"version": "0.4.2",
"version": "0.6.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
"reference": "7334c5b182c6ccf66b21ca61808d7c6c899e2bcb"
"reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/7334c5b182c6ccf66b21ca61808d7c6c899e2bcb",
"reference": "7334c5b182c6ccf66b21ca61808d7c6c899e2bcb",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/8ea1353a4bbab617e23c865a7c97b60d8074aee3",
"reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-redis": "*",
"php": ">=7.4"
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
@ -2020,9 +2023,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/0.4.2"
"source": "https://github.com/utopia-php/cache/tree/0.6.0"
},
"time": "2021-11-25T16:41:35+00:00"
"time": "2022-04-04T12:30:05+00:00"
},
{
"name": "utopia-php/cli",
@ -2130,16 +2133,16 @@
},
{
"name": "utopia-php/database",
"version": "0.15.4",
"version": "0.15.5",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "166365d9c39c4d70b1267af4562f4327e8930f79"
"reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/166365d9c39c4d70b1267af4562f4327e8930f79",
"reference": "166365d9c39c4d70b1267af4562f4327e8930f79",
"url": "https://api.github.com/repos/utopia-php/database/zipball/6507b58ef3e22703b9df68d3dbd5e822d5bb023f",
"reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f",
"shasum": ""
},
"require": {
@ -2148,7 +2151,7 @@
"ext-redis": "*",
"mongodb/mongodb": "1.8.0",
"php": ">=8.0",
"utopia-php/cache": "0.4.*",
"utopia-php/cache": "0.6.*",
"utopia-php/framework": "0.*.*"
},
"require-dev": {
@ -2187,9 +2190,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.15.4"
"source": "https://github.com/utopia-php/database/tree/0.15.5"
},
"time": "2022-03-15T17:20:14+00:00"
"time": "2022-04-04T13:42:00+00:00"
},
{
"name": "utopia-php/domains",
@ -2247,16 +2250,16 @@
},
{
"name": "utopia-php/framework",
"version": "0.19.7",
"version": "0.19.8",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
"reference": "f17afe77a21873b9be18ebc05283813468b4283a"
"reference": "8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/f17afe77a21873b9be18ebc05283813468b4283a",
"reference": "f17afe77a21873b9be18ebc05283813468b4283a",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d",
"reference": "8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d",
"shasum": ""
},
"require": {
@ -2290,9 +2293,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/framework/issues",
"source": "https://github.com/utopia-php/framework/tree/0.19.7"
"source": "https://github.com/utopia-php/framework/tree/0.19.8"
},
"time": "2022-02-18T00:04:49+00:00"
"time": "2022-04-12T00:28:15+00:00"
},
{
"name": "utopia-php/image",
@ -3072,16 +3075,16 @@
},
{
"name": "appwrite/sdk-generator",
"version": "0.18.1",
"version": "0.18.3",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa"
"reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa",
"reference": "1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/96e2c9b0f350d4fa43ddff6334ef44908716c944",
"reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944",
"shasum": ""
},
"require": {
@ -3093,6 +3096,7 @@
"twig/twig": "^3.3"
},
"require-dev": {
"brianium/paratest": "^6.4",
"phpunit/phpunit": "^9.5.13"
},
"type": "library",
@ -3115,9 +3119,9 @@
"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.18.1"
"source": "https://github.com/appwrite/sdk-generator/tree/0.18.3"
},
"time": "2022-03-03T09:45:38+00:00"
"time": "2022-04-13T04:00:59+00:00"
},
{
"name": "composer/pcre",
@ -3192,16 +3196,16 @@
},
{
"name": "composer/semver",
"version": "3.3.1",
"version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "5d8e574bb0e69188786b8ef77d43341222a41a71"
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71",
"reference": "5d8e574bb0e69188786b8ef77d43341222a41a71",
"url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
"shasum": ""
},
"require": {
@ -3253,7 +3257,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.3.1"
"source": "https://github.com/composer/semver/tree/3.3.2"
},
"funding": [
{
@ -3269,7 +3273,7 @@
"type": "tidelift"
}
],
"time": "2022-03-16T11:22:07+00:00"
"time": "2022-04-01T19:23:25+00:00"
},
{
"name": "composer/xdebug-handler",
@ -3491,16 +3495,16 @@
},
{
"name": "felixfbecker/language-server-protocol",
"version": "1.5.1",
"version": "v1.5.2",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-language-server-protocol.git",
"reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730"
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
"reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842",
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842",
"shasum": ""
},
"require": {
@ -3541,9 +3545,9 @@
],
"support": {
"issues": "https://github.com/felixfbecker/php-language-server-protocol/issues",
"source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1"
"source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2"
},
"time": "2021-02-22T14:02:09+00:00"
"time": "2022-03-02T22:36:06+00:00"
},
{
"name": "matthiasmullie/minify",
@ -4118,16 +4122,16 @@
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.6.0",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
"reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
"reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
@ -4162,9 +4166,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
},
"time": "2022-01-04T19:58:01+00:00"
"time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
@ -5073,16 +5077,16 @@
},
{
"name": "sebastian/environment",
"version": "5.1.3",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
@ -5124,7 +5128,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
@ -5132,7 +5136,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:52:38+00:00"
"time": "2022-04-03T09:37:03+00:00"
},
{
"name": "sebastian/exporter",
@ -5715,16 +5719,16 @@
},
{
"name": "symfony/console",
"version": "v6.0.5",
"version": "v6.0.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1"
"reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1",
"reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1",
"url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e",
"reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e",
"shasum": ""
},
"require": {
@ -5790,7 +5794,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.0.5"
"source": "https://github.com/symfony/console/tree/v6.0.7"
},
"funding": [
{
@ -5806,7 +5810,7 @@
"type": "tidelift"
}
],
"time": "2022-02-25T10:48:52+00:00"
"time": "2022-03-31T17:18:25+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
@ -6058,16 +6062,16 @@
},
{
"name": "symfony/service-contracts",
"version": "v3.0.0",
"version": "v3.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603"
"reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603",
"reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c",
"reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c",
"shasum": ""
},
"require": {
@ -6120,7 +6124,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.0.0"
"source": "https://github.com/symfony/service-contracts/tree/v3.0.1"
},
"funding": [
{
@ -6136,7 +6140,7 @@
"type": "tidelift"
}
],
"time": "2021-11-04T17:53:12+00:00"
"time": "2022-03-13T20:10:05+00:00"
},
{
"name": "symfony/string",
@ -6324,16 +6328,16 @@
},
{
"name": "twig/twig",
"version": "v3.3.8",
"version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "972d8604a92b7054828b539f2febb0211dd5945c"
"reference": "8442df056c51b706793adf80a9fd363406dd3674"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
"reference": "972d8604a92b7054828b539f2febb0211dd5945c",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674",
"reference": "8442df056c51b706793adf80a9fd363406dd3674",
"shasum": ""
},
"require": {
@ -6384,7 +6388,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.3.8"
"source": "https://github.com/twigphp/Twig/tree/v3.3.10"
},
"funding": [
{
@ -6396,7 +6400,7 @@
"type": "tidelift"
}
],
"time": "2022-02-04T06:59:48+00:00"
"time": "2022-04-06T06:47:41+00:00"
},
{
"name": "vimeo/psalm",
@ -6580,5 +6584,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.3.0"
}

View file

@ -3,11 +3,19 @@
# Avoid using this file in your production environment.
# We're exposing here sensitive ports and mounting code volumes for rapid development and debugging of the server stack.
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: '5'
max-size: '10m'
version: '3'
services:
traefik:
image: traefik:2.5
<<: *x-logging
container_name: appwrite-traefik
command:
- --log.level=DEBUG
@ -37,6 +45,7 @@ services:
appwrite:
container_name: appwrite
<<: *x-logging
build:
context: .
args:
@ -141,6 +150,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_RUNTIMES
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STATSD_HOST
@ -152,6 +162,7 @@ services:
appwrite-realtime:
entrypoint: realtime
<<: *x-logging
container_name: appwrite-realtime
build:
context: .
@ -200,6 +211,7 @@ services:
appwrite-worker-audits:
entrypoint: worker-audits
<<: *x-logging
container_name: appwrite-worker-audits
build:
context: .
@ -228,6 +240,7 @@ services:
appwrite-worker-webhooks:
entrypoint: worker-webhooks
<<: *x-logging
container_name: appwrite-worker-webhooks
build:
context: .
@ -253,6 +266,7 @@ services:
appwrite-worker-deletes:
entrypoint: worker-deletes
<<: *x-logging
container_name: appwrite-worker-deletes
build:
context: .
@ -293,9 +307,11 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
appwrite-worker-database:
entrypoint: worker-database
<<: *x-logging
container_name: appwrite-worker-database
build:
context: .
@ -325,6 +341,7 @@ services:
appwrite-worker-builds:
entrypoint: worker-builds
<<: *x-logging
container_name: appwrite-worker-builds
build:
context: .
@ -340,6 +357,7 @@ services:
- _APP_ENV
- _APP_OPENSSL_KEY_V1
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@ -354,6 +372,7 @@ services:
appwrite-worker-certificates:
entrypoint: worker-certificates
<<: *x-logging
container_name: appwrite-worker-certificates
build:
context: .
@ -386,6 +405,7 @@ services:
appwrite-worker-functions:
entrypoint: worker-functions
<<: *x-logging
container_name: appwrite-worker-functions
build:
context: .
@ -412,12 +432,14 @@ services:
- _APP_DB_PASS
- _APP_FUNCTIONS_TIMEOUT
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_USAGE_STATS
- DOCKERHUB_PULL_USERNAME
- DOCKERHUB_PULL_PASSWORD
appwrite-executor:
container_name: appwrite-executor
<<: *x-logging
entrypoint: executor
stop_signal: SIGINT
build:
@ -454,7 +476,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_INACTIVE_THRESHOLD
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_RUNTIME_NETWORK
- OPEN_RUNTIMES_NETWORK
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STORAGE_DEVICE
@ -471,6 +493,7 @@ services:
appwrite-worker-mails:
entrypoint: worker-mails
<<: *x-logging
container_name: appwrite-worker-mails
build:
context: .
@ -502,6 +525,7 @@ services:
appwrite-maintenance:
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
build:
context: .
@ -526,6 +550,7 @@ services:
appwrite-usage:
entrypoint: usage
<<: *x-logging
container_name: appwrite-usage
build:
context: .
@ -558,6 +583,7 @@ services:
appwrite-schedule:
entrypoint: schedule
<<: *x-logging
container_name: appwrite-schedule
build:
context: .
@ -578,6 +604,7 @@ services:
mariadb:
image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb
<<: *x-logging
networks:
- appwrite
volumes:
@ -606,6 +633,7 @@ services:
redis:
image: redis:6.2-alpine
<<: *x-logging
container_name: appwrite-redis
ports:
- "6379:6379"
@ -625,6 +653,7 @@ services:
influxdb:
image: appwrite/influxdb:1.5.0
container_name: appwrite-influxdb
<<: *x-logging
networks:
- appwrite
volumes:
@ -633,6 +662,7 @@ services:
telegraf:
image: appwrite/telegraf:1.4.0
container_name: appwrite-telegraf
<<: *x-logging
networks:
- appwrite
environment:
@ -655,6 +685,7 @@ services:
maildev: # used mainly for dev tests
image: appwrite/mailcatcher:1.0.0
container_name: appwrite-mailcatcher
<<: *x-logging
ports:
- '9503:1080'
networks:
@ -663,6 +694,7 @@ services:
request-catcher: # used mainly for dev tests
image: appwrite/requestcatcher:1.0.0
container_name: appwrite-requestcatcher
<<: *x-logging
ports:
- '9504:5000'
networks:
@ -671,6 +703,7 @@ services:
adminer:
image: adminer
container_name: appwrite-adminer
<<: *x-logging
restart: always
ports:
- 9506:8080

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createAnonymousSession() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let session):
print(String(describing: session)
}
}
let session = try await account.createAnonymousSession()
print(String(describing: session)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createJWT() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let jwt):
print(String(describing: jwt)
}
}
let jwt = try await account.createJWT()
print(String(describing: jwt)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createMagicURLSession(
let token = try await account.createMagicURLSession(
userId: "[USER_ID]",
email: "email@example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let token):
print(String(describing: token)
}
}
)
print(String(describing: token)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createOAuth2Session(
let success = try await account.createOAuth2Session(
provider: "amazon"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let success):
print(String(describing: success)
}
}
)
print(String(describing: success)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createRecovery(
let token = try await account.createRecovery(
email: "email@example.com",
url: "https://example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let token):
print(String(describing: token)
}
}
)
print(String(describing: token)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createSession(
let session = try await account.createSession(
email: "email@example.com",
password: "password"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let session):
print(String(describing: session)
}
}
)
print(String(describing: session)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.createVerification(
let token = try await account.createVerification(
url: "https://example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let token):
print(String(describing: token)
}
}
)
print(String(describing: token)
}

View file

@ -1,21 +1,15 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.create(
let user = try await account.create(
userId: "[USER_ID]",
email: "email@example.com",
password: "password"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
)
print(String(describing: user)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.deleteSession(
let result = try await account.deleteSession(
sessionId: "[SESSION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.deleteSessions() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
let result = try await account.deleteSessions()
print(String(describing: result)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.delete() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
let result = try await account.delete()
print(String(describing: result)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.getLogs() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let logList):
print(String(describing: logList)
}
}
let logList = try await account.getLogs()
print(String(describing: logList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.getPrefs() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let preferences):
print(String(describing: preferences)
}
}
let preferences = try await account.getPrefs()
print(String(describing: preferences)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.getSession(
let session = try await account.getSession(
sessionId: "[SESSION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let session):
print(String(describing: session)
}
}
)
print(String(describing: session)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.getSessions() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let sessionList):
print(String(describing: sessionList)
}
}
let sessionList = try await account.getSessions()
print(String(describing: sessionList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.get() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
let user = try await account.get()
print(String(describing: user)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateEmail(
let user = try await account.updateEmail(
email: "email@example.com",
password: "password"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
)
print(String(describing: user)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateMagicURLSession(
let session = try await account.updateMagicURLSession(
userId: "[USER_ID]",
secret: "[SECRET]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let session):
print(String(describing: session)
}
}
)
print(String(describing: session)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateName(
let user = try await account.updateName(
name: "[NAME]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
)
print(String(describing: user)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updatePassword(
let user = try await account.updatePassword(
password: "password"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
)
print(String(describing: user)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updatePrefs(
let user = try await account.updatePrefs(
prefs:
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let user):
print(String(describing: user)
}
}
)
print(String(describing: user)
}

View file

@ -1,22 +1,16 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateRecovery(
let token = try await account.updateRecovery(
userId: "[USER_ID]",
secret: "[SECRET]",
password: "password",
passwordAgain: "password"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let token):
print(String(describing: token)
}
}
)
print(String(describing: token)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateSession(
let session = try await account.updateSession(
sessionId: "[SESSION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let session):
print(String(describing: session)
}
}
)
print(String(describing: session)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
account.updateVerification(
let token = try await account.updateVerification(
userId: "[USER_ID]",
secret: "[SECRET]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let token):
print(String(describing: token)
}
}
)
print(String(describing: token)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getBrowser(
let byteBuffer = try await avatars.getBrowser(
code: "aa"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getCreditCard(
let byteBuffer = try await avatars.getCreditCard(
code: "amex"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getFavicon(
let byteBuffer = try await avatars.getFavicon(
url: "https://example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getFlag(
let byteBuffer = try await avatars.getFlag(
code: "af"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getImage(
let byteBuffer = try await avatars.getImage(
url: "https://example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getInitials() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
let byteBuffer = try await avatars.getInitials()
print(String(describing: byteBuffer)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let avatars = Avatars(client)
avatars.getQR(
let byteBuffer = try await avatars.getQR(
text: "[TEXT]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,21 +1,15 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let database = Database(client)
database.createDocument(
let document = try await database.createDocument(
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]",
data:
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let document):
print(String(describing: document)
}
}
)
print(String(describing: document)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let database = Database(client)
database.deleteDocument(
let result = try await database.deleteDocument(
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let database = Database(client)
database.getDocument(
let document = try await database.getDocument(
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let document):
print(String(describing: document)
}
}
)
print(String(describing: document)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let database = Database(client)
database.listDocuments(
let documentList = try await database.listDocuments(
collectionId: "[COLLECTION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let documentList):
print(String(describing: documentList)
}
}
)
print(String(describing: documentList)
}

View file

@ -1,21 +1,15 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let database = Database(client)
database.updateDocument(
let document = try await database.updateDocument(
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]",
data:
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let document):
print(String(describing: document)
}
}
)
print(String(describing: document)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let functions = Functions(client)
functions.createExecution(
let execution = try await functions.createExecution(
functionId: "[FUNCTION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let execution):
print(String(describing: execution)
}
}
)
print(String(describing: execution)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let functions = Functions(client)
functions.getExecution(
let execution = try await functions.getExecution(
functionId: "[FUNCTION_ID]",
executionId: "[EXECUTION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let execution):
print(String(describing: execution)
}
}
)
print(String(describing: execution)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let functions = Functions(client)
functions.listExecutions(
let executionList = try await functions.listExecutions(
functionId: "[FUNCTION_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let executionList):
print(String(describing: executionList)
}
}
)
print(String(describing: executionList)
}

View file

@ -1,21 +1,15 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let functions = Functions(client)
functions.retryBuild(
let result = try await functions.retryBuild(
functionId: "[FUNCTION_ID]",
deploymentId: "[DEPLOYMENT_ID]",
buildId: "[BUILD_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getContinents() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let continentList):
print(String(describing: continentList)
}
}
let continentList = try await locale.getContinents()
print(String(describing: continentList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getCountriesEU() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let countryList):
print(String(describing: countryList)
}
}
let countryList = try await locale.getCountriesEU()
print(String(describing: countryList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getCountriesPhones() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let phoneList):
print(String(describing: phoneList)
}
}
let phoneList = try await locale.getCountriesPhones()
print(String(describing: phoneList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getCountries() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let countryList):
print(String(describing: countryList)
}
}
let countryList = try await locale.getCountries()
print(String(describing: countryList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getCurrencies() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let currencyList):
print(String(describing: currencyList)
}
}
let currencyList = try await locale.getCurrencies()
print(String(describing: currencyList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.getLanguages() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let languageList):
print(String(describing: languageList)
}
}
let languageList = try await locale.getLanguages()
print(String(describing: languageList)
}

View file

@ -1,17 +1,11 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let locale = Locale(client)
locale.get() { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let locale):
print(String(describing: locale)
}
}
let locale = try await locale.get()
print(String(describing: locale)
}

View file

@ -1,21 +1,15 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.createFile(
let file = try await storage.createFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]",
file: File(name: "image.jpg", buffer: yourByteBuffer)
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let file):
print(String(describing: file)
}
}
)
print(String(describing: file)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.deleteFile(
let result = try await storage.deleteFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.getFileDownload(
let byteBuffer = try await storage.getFileDownload(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.getFilePreview(
let byteBuffer = try await storage.getFilePreview(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.getFileView(
let byteBuffer = try await storage.getFileView(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let byteBuffer):
print(String(describing: byteBuffer)
}
}
)
print(String(describing: byteBuffer)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.getFile(
let file = try await storage.getFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let file):
print(String(describing: file)
}
}
)
print(String(describing: file)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.listFiles(
let fileList = try await storage.listFiles(
bucketId: "[BUCKET_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let fileList):
print(String(describing: fileList)
}
}
)
print(String(describing: fileList)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let storage = Storage(client)
storage.updateFile(
let file = try await storage.updateFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let file):
print(String(describing: file)
}
}
)
print(String(describing: file)
}

View file

@ -1,22 +1,16 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.createMembership(
let membership = try await teams.createMembership(
teamId: "[TEAM_ID]",
email: "email@example.com",
roles: [],
url: "https://example.com"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let membership):
print(String(describing: membership)
}
}
)
print(String(describing: membership)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.create(
let team = try await teams.create(
teamId: "[TEAM_ID]",
name: "[NAME]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let team):
print(String(describing: team)
}
}
)
print(String(describing: team)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.deleteMembership(
let result = try await teams.deleteMembership(
teamId: "[TEAM_ID]",
membershipId: "[MEMBERSHIP_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.delete(
let result = try await teams.delete(
teamId: "[TEAM_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let ):
print(String(describing: )
}
}
)
print(String(describing: result)
}

View file

@ -1,20 +1,14 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.getMembership(
let membershipList = try await teams.getMembership(
teamId: "[TEAM_ID]",
membershipId: "[MEMBERSHIP_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let membershipList):
print(String(describing: membershipList)
}
}
)
print(String(describing: membershipList)
}

View file

@ -1,19 +1,13 @@
import Appwrite
func main() {
func main() async throws {
let client = Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let teams = Teams(client)
teams.getMemberships(
let membershipList = try await teams.getMemberships(
teamId: "[TEAM_ID]"
) { result in
switch result {
case .failure(let error):
print(error.message)
case .success(let membershipList):
print(String(describing: membershipList)
}
}
)
print(String(describing: membershipList)
}

Some files were not shown because too many files have changed in this diff Show more