1
0
Fork 0
mirror of synced 2024-06-26 10:10:57 +12:00

Merge pull request #1479 from TorstenDittmann/release-0-9-4

prepare: release 0.9.4
This commit is contained in:
Torsten Dittmann 2021-08-10 13:28:36 +02:00 committed by GitHub
commit e9dd71d075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
134 changed files with 464 additions and 297 deletions

3
.gitignore vendored
View file

@ -6,4 +6,5 @@
.DS_Store
.php_cs.cache
debug/
app/sdks
app/sdks
dev/yasd_init.php

View file

@ -1,3 +1,31 @@
# Version 0.9.4
## Security
- Fixed security vulnerability that exposes project ID's from other admin users (#1453)
# Version 0.9.3
## Bugs
- Fixed Abuse Limit keys for JWT and E-Mail confirmation (#1434)
# Version 0.9.2
## Bugs
- Fixed JWT session validation (#1408)
- Fixed passing valid JWT session to Cloud Functions (#1421)
- Fixed race condition when uploading and extracting bigger Cloud Functions (#1419)
# Version 0.9.1
## Bugs
- Fixed PDO Connection timeout (#1385)
- Removed unnecessary `app` resource and replace with `utopia` (#1384)
- Fixed missing quote in Functions Worker logs (#1375)
# Version 0.9.0
## Features

View file

@ -123,6 +123,10 @@ Learn more at our [Technology Stack](## Technology Stack) section.
Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures, but our final goal, as we grow, is to be using only microservices.
---
![Appwrite](docs/specs/overview.drawio.svg)
---
### File Structure
```bash
@ -174,10 +178,6 @@ Appwrite's current structure is a combination of both [Monolithic](https://en.wi
└── unit
```
---
![Appwrite](docs/specs/overview.drawio.svg)
---
### The Monolithic Part
Appwrite's main API container is designed as a monolithic app. This is a decision we made to allow us to develop the project faster while still being a very small team.
@ -282,6 +282,30 @@ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
The Runtimes for all supported cloud functions (multicore builds) can be found at the [appwrite/php-runtimes](https://github.com/appwrite/php-runtimes) repository.
## Debug
Appwrite uses [yasd](https://github.com/swoole/yasd) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension or if you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection.
First, you need to create an init file. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php** and there change the IP address to your development machine's IP. Without the proper IP address debugger wont connect. And you also need to set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
### VS Code Launch Configuration
```json
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9005,
"pathMappings": {
"/usr/src/code": "${workspaceRoot}"
},
}
```
### PHPStorm Setup
In settings, go to **Languages & Frameworks** > **PHP** > **Debug**, there under **Xdebug** set the debug port to **9005** and enable **can accept external connections** checkbox.
## Tests
To run all tests manually, use the Appwrite Docker CLI from your terminal:

View file

@ -14,6 +14,9 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
FROM php:8.0-cli-alpine as step1
ARG DEBUG=false
ENV DEBUG=$DEBUG
ENV PHP_REDIS_VERSION=5.3.4 \
PHP_SWOOLE_VERSION=v4.6.7 \
PHP_IMAGICK_VERSION=3.5.0 \
@ -75,11 +78,25 @@ RUN \
make && make install && \
cd ../..
## Swoole Debugger setup
RUN if [ "$DEBUG" == "true" ]; then \
cd /tmp && \
apk add boost-dev && \
git clone --depth 1 https://github.com/swoole/yasd && \
cd yasd && \
phpize && \
./configure && \
make && make install && \
cd ..;\
fi
FROM php:8.0-cli-alpine as final
LABEL maintainer="team@appwrite.io"
ARG VERSION=dev
ARG DEBUG=false
ENV DEBUG=$DEBUG
ENV _APP_SERVER=swoole \
_APP_ENV=production \
@ -160,10 +177,15 @@ RUN \
&& apk del .deps \
&& rm -rf /var/cache/apk/*
RUN \
if [ "$DEBUG" == "true" ]; then \
apk add boost boost-dev; \
fi
WORKDIR /usr/src/code
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/yasd.so* /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/yaml.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
@ -218,7 +240,9 @@ RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini
RUN echo extension=imagick.so >> /usr/local/etc/php/conf.d/imagick.ini
RUN echo extension=yaml.so >> /usr/local/etc/php/conf.d/yaml.ini
RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.ini
RUN if [ "$DEBUG" == "true" ]; then printf "zend_extension=yasd \nyasd.debug_mode=remote \nyasd.init_file=/usr/local/dev/yasd_init.php \nyasd.remote_port=9005 \nyasd.log_level=-1" >> /usr/local/etc/php/conf.d/yasd.ini; fi
RUN if [ "$DEBUG" == "true" ]; then echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/appwrite.ini; fi
RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini
RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini
RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/appwrite.ini

View file

@ -1,6 +1,6 @@
<br />
<p align="center">
<a href="https://appwrite.io" target="_blank"><img width="260" height="39" src="https://appwrite.io/images/github-logo.png" alt="Appwrite Logo"></a>
<a href="https://appwrite.io" target="_blank"><img width="260" height="39" src="https://appwrite.io/images/appwrite.svg" alt="Appwrite Logo"></a>
<br />
<br />
<b>A complete backend solution for your [Flutter / Vue / Angular / React / iOS / Android / *ANY OTHER*] app</b>
@ -15,7 +15,7 @@
[![Build Status](https://img.shields.io/travis/com/appwrite/appwrite?style=flat-square)](https://travis-ci.com/appwrite/appwrite)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite_io?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite_io)
[**Appwrite 0.8 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-0-8-an-open-source-self-hosted-baas-kda)
[**Appwrite 0.9 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-0-9-the-open-source-firebase-alternative-53ho)
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.
@ -56,7 +56,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.8.0
appwrite/appwrite:0.9.4
```
### Windows
@ -68,7 +68,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.8.0
appwrite/appwrite:0.9.4
```
#### PowerShell
@ -78,7 +78,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.8.0
appwrite/appwrite:0.9.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.
@ -121,14 +121,16 @@ Below is a list of currently supported platforms and languages. If you wish to h
#### Client
* ✅ &nbsp; [Web](https://github.com/appwrite/sdk-for-web) (Maintained by the Appwrite Team)
* ✅ &nbsp; [Flutter](https://github.com/appwrite/sdk-for-flutter) (Maintained by the Appwrite Team)
* ✅ &nbsp; [Android](https://github.com/appwrite/sdk-for-android) (Maintained by the Appwrite Team)
#### Server
* ✅ &nbsp; [NodeJS](https://github.com/appwrite/sdk-for-node) (Maintained by the Appwrite Team)
* ✅ &nbsp; [PHP](https://github.com/appwrite/sdk-for-php) (Maintained by the Appwrite Team)
* ✅ &nbsp; [Dart](https://github.com/appwrite/sdk-for-dart) **Beta** (Maintained by the Appwrite Team)
* ✅ &nbsp; [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team)
* ✅ &nbsp; [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team)
* ✅ &nbsp; [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team)
* ✅ &nbsp; [Ruby](https://github.com/appwrite/sdk-for-ruby) (Maintained by the Appwrite Team)
* ✅ &nbsp; [Python](https://github.com/appwrite/sdk-for-python) (Maintained by the Appwrite Team)
* ✅ &nbsp; [Kotlin](https://github.com/appwrite/sdk-for-kotlin) - **Beta** (Maintained by the Appwrite Team)
* ✅ &nbsp; [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team)
Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!

View file

@ -113,7 +113,7 @@ return [
'name' => 'Android',
'version' => '0.0.1',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://repo1.maven.org/maven2/io/appwrite/sdk-for-android/',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
'beta' => true,
'dev' => false,
@ -355,7 +355,7 @@ return [
'name' => 'Kotlin',
'version' => '0.0.1',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://repo1.maven.org/maven2/io/appwrite/sdk-for-kotlin/',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
'beta' => true,
'dev' => false,

View file

@ -782,7 +782,7 @@ App::post('/v1/account/jwt')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_JWT)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},userId:{param-userId}')
->label('abuse-key', 'url:{url},userId:{userId}')
->inject('response')
->inject('user')
->action(function ($response, $user) {
@ -918,16 +918,16 @@ App::get('/v1/account/logs')
->inject('user')
->inject('locale')
->inject('geodb')
->inject('app')
->action(function ($response, $project, $user, $locale, $geodb, $app) {
->inject('utopia')
->action(function ($response, $project, $user, $locale, $geodb, $utopia) {
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Document $project */
/** @var Appwrite\Database\Document $user */
/** @var Utopia\Locale\Locale $locale */
/** @var MaxMind\Db\Reader $geodb */
/** @var Utopia\App $app */
/** @var Utopia\App $utopia */
$adapter = new AuditAdapter($app->getResource('db'));
$adapter = new AuditAdapter($utopia->getResource('db'));
$adapter->setNamespace('app_'.$project->getId());
$audit = new Audit($adapter);
@ -1668,7 +1668,7 @@ App::post('/v1/account/verification')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_TOKEN)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->label('abuse-key', 'url:{url},userId:{userId}')
->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add built-in confirm page
->inject('request')
->inject('response')

View file

@ -437,7 +437,7 @@ App::get('/v1/database/collections/:collectionId/documents')
}
$types = [];
foreach ($collection->getAttribute('rules') as $rule) {
foreach ($collection->getAttribute('rules', []) as $rule) {
/** @var Document $rule */
$types[$rule->getAttribute('key')] = $rule->getAttribute('type');
}
@ -630,4 +630,4 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId')
;
$response->noContent();
});
});

View file

@ -748,20 +748,20 @@ App::post('/v1/functions/:functionId/executions')
$jwt = ''; // initialize
if (!empty($user->getId())) { // If userId exists, generate a JWT for function
$tokens = $user->getAttribute('tokens', []);
$session = new Document();
$sessions = $user->getAttribute('sessions', []);
$current = new Document();
foreach ($tokens as $token) { /** @var Appwrite\Database\Document $token */
if ($token->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too
$session = $token;
foreach ($sessions as $session) { /** @var Appwrite\Database\Document $session */
if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too
$current = $session;
}
}
if(!$session->isEmpty()) {
if(!$current->isEmpty()) {
$jwtObj = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway.
$jwt = $jwtObj->encode([
'userId' => $user->getId(),
'sessionId' => $session->getId(),
'sessionId' => $current->getId(),
]);
}
}

View file

@ -42,11 +42,11 @@ App::get('/v1/health/db')
->label('sdk.method', 'getDB')
->label('sdk.description', '/docs/references/health/get-db.md')
->inject('response')
->inject('app')
->action(function ($response, $app) {
->inject('utopia')
->action(function ($response, $utopia) {
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\App $app */
$app->getResource('db');
/** @var Utopia\App $utopia */
$utopia->getResource('db');
$response->json(['status' => 'OK']);
});
@ -60,11 +60,11 @@ App::get('/v1/health/cache')
->label('sdk.method', 'getCache')
->label('sdk.description', '/docs/references/health/get-cache.md')
->inject('response')
->inject('app')
->action(function ($response, $app) {
->inject('utopia')
->action(function ($response, $utopia) {
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\App $register */
$app->getResource('cache');
/** @var Utopia\App $utopia */
$utopia->getResource('cache');
$response->json(['status' => 'OK']);
});

View file

@ -21,6 +21,14 @@ use Appwrite\Network\Validator\Domain as DomainValidator;
use Appwrite\Utopia\Response;
use Cron\CronExpression;
App::init(function ($project) {
/** @var Utopia\Database\Document $project */
if($project->getId() !== 'console') {
throw new Exception('Access to this API is forbidden.', 401);
}
}, ['project'], 'projects');
App::post('/v1/projects')
->desc('Create Project')
->groups(['api', 'projects'])

View file

@ -236,14 +236,14 @@ App::get('/v1/users/:userId/logs')
->inject('projectDB')
->inject('locale')
->inject('geodb')
->inject('app')
->action(function ($userId, $response, $project, $projectDB, $locale, $geodb, $app) {
->inject('utopia')
->action(function ($userId, $response, $project, $projectDB, $locale, $geodb, $utopia) {
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Document $project */
/** @var Appwrite\Database\Database $projectDB */
/** @var Utopia\Locale\Locale $locale */
/** @var MaxMind\Db\Reader $geodb */
/** @var Utopia\App $app */
/** @var Utopia\App $utopia */
$user = $projectDB->getDocument($userId);
@ -251,7 +251,7 @@ App::get('/v1/users/:userId/logs')
throw new Exception('User not found', 404);
}
$adapter = new AuditAdapter($app->getResource('db'));
$adapter = new AuditAdapter($utopia->getResource('db'));
$adapter->setNamespace('app_'.$project->getId());
$audit = new Audit($adapter);

View file

@ -304,6 +304,10 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) {
/** @var Utopia\View $layout */
/** @var Appwrite\Database\Document $project */
if ($error instanceof PDOException) {
throw $error;
}
$route = $utopia->match($request);
$template = ($route) ? $route->getLabel('error', null) : null;

View file

@ -87,10 +87,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
App::setResource('cache', function () use (&$redis) {
return $redis;
});
App::setResource('app', function() use (&$app) {
return $app;
});
try {
Authorization::cleanRoles();
@ -103,6 +99,13 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
Console::error('[Error] File: '.$th->getFile());
Console::error('[Error] Line: '.$th->getLine());
/**
* Reset Database connection if PDOException was thrown.
*/
if ($th instanceof PDOException) {
$db = null;
}
if(App::isDevelopment()) {
$swooleResponse->end('error: '.$th->getMessage());
}

View file

@ -47,8 +47,8 @@ const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_DEFAULT = 'default';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
const APP_CACHE_BUSTER = 149;
const APP_VERSION_STABLE = '0.9.0';
const APP_CACHE_BUSTER = 150;
const APP_VERSION_STABLE = '0.9.4';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
const APP_STORAGE_CACHE = '/storage/cache';
@ -164,12 +164,11 @@ $register->set('dbPool', function () { // Register DB connection
$pool = new PDOPool((new PDOConfig())
->withHost($dbHost)
->withPort($dbPort)
// ->withUnixSocket('/tmp/mysql.sock')
->withDbName($dbScheme)
->withCharset('utf8mb4')
->withUsername($dbUser)
->withPassword($dbPass)
);
, 16);
return $pool;
});
@ -189,7 +188,7 @@ $register->set('redisPool', function () {
->withPort($redisPort)
->withAuth($redisAuth)
->withDbIndex(0)
);
, 16);
return $pool;
});
@ -468,7 +467,7 @@ App::setResource('user', function($mode, $project, $console, $request, $response
$user = $projectDB->getDocument($jwtUserId);
}
if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('tokens')))) { // Match JWT to active token
if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('sessions')))) { // Match JWT to active token
$user = new Document(['$id' => '', '$collection' => Database::SYSTEM_COLLECTION_USERS]);
}
}

View file

@ -129,7 +129,7 @@ $cli
$httpsPort = Console::confirm('Choose your server HTTPS port: (default: '.$defaultHTTPSPort.')');
$httpsPort = ($httpsPort) ? $httpsPort : $defaultHTTPSPort;
}
$input = [];
foreach($vars as $key => $var) {
@ -196,7 +196,7 @@ $cli
foreach ($input as $key => $value) {
if($value) {
$env .= $key.'='.$value.' ';
$env .= $key.'='.\escapeshellarg($value).' ';
}
}

View file

@ -79,6 +79,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
<div
data-service="projects.getUsage"
data-event="load"
data-scope="console"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="30d">

View file

@ -342,7 +342,7 @@ services:
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
- MYSQL_USER=${_APP_DB_USER}
- MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync'
command: 'mysqld --innodb-flush-method=fsync --wait_timeout=86400'
redis:
image: redis:6.0-alpine3.12

View file

@ -337,7 +337,7 @@ class FunctionsV1 extends Worker
: null;
if(\is_null($runtime)) {
throw new Exception('Runtime "'.$function->getAttribute('runtime', '').' is not supported');
throw new Exception('Runtime "'.$function->getAttribute('runtime', '').'" is not supported');
}
$vars = \array_merge($function->getAttribute('vars', []), [
@ -425,15 +425,24 @@ class FunctionsV1 extends Worker
" --workdir /usr/local/src".
" ".\implode(" ", $vars).
" {$runtime['image']}".
" sh -c 'mv /tmp/code.tar.gz /usr/local/src/code.tar.gz && tar -zxf /usr/local/src/code.tar.gz --strip 1 && rm /usr/local/src/code.tar.gz && tail -f /dev/null'"
" tail -f /dev/null"
, '', $stdout, $stderr, 30);
$executionEnd = \microtime(true);
if($exitCode !== 0) {
throw new Exception('Failed to create function environment: '.$stderr);
}
$exitCodeUntar = Console::execute("docker exec ".
$container.
" sh -c 'mv /tmp/code.tar.gz /usr/local/src/code.tar.gz && tar -zxf /usr/local/src/code.tar.gz --strip 1 && rm /usr/local/src/code.tar.gz'"
, '', $stdout, $stderr, 60);
if($exitCodeUntar !== 0) {
throw new Exception('Failed to extract tar: '.$stderr);
}
$executionEnd = \microtime(true);
$list[$container] = [
'name' => $container,
'online' => true,

20
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": "7983e9fe8946a99fbf818b79ff202486",
"content-hash": "e24aacead283e33130051470bb4312e6",
"packages": [
{
"name": "adhocore/jwt",
@ -2403,16 +2403,16 @@
},
{
"name": "appwrite/sdk-generator",
"version": "dev-feat-kotlin-java-docs",
"version": "0.12.0",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "966d464728b41a8c449e99d7df4bd4ddca591a25"
"reference": "ca8e34f091b3a66f94a8972cb94b0b8e1161dada"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/966d464728b41a8c449e99d7df4bd4ddca591a25",
"reference": "966d464728b41a8c449e99d7df4bd4ddca591a25",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ca8e34f091b3a66f94a8972cb94b0b8e1161dada",
"reference": "ca8e34f091b3a66f94a8972cb94b0b8e1161dada",
"shasum": ""
},
"require": {
@ -2446,9 +2446,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/feat-kotlin-java-docs"
"source": "https://github.com/appwrite/sdk-generator/tree/0.12.0"
},
"time": "2021-07-06T09:26:45+00:00"
"time": "2021-07-06T16:20:51+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -6066,9 +6066,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"appwrite/sdk-generator": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
@ -6090,5 +6088,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

4
dev/yasd_init.php.stub Normal file
View file

@ -0,0 +1,4 @@
<?php
echo 'execute init_file success' . PHP_EOL;
Yasd\Api\setRemoteHost('127.0.0.1'); //Set your development machine's IP

View file

@ -39,6 +39,7 @@ services:
build:
context: .
args:
- DEBUG=false
- TESTING=true
- VERSION=dev
ports:
@ -67,11 +68,17 @@ services:
- ./public:/usr/src/code/public
- ./src:/usr/src/code/src
- ./debug:/tmp
- ./dev:/usr/local/dev
depends_on:
- mariadb
- redis
# - clamav
- influxdb
entrypoint:
- php
- -e
- app/http.php
- -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
environment:
- _APP_ENV
- _APP_LOCALE
@ -390,7 +397,7 @@ services:
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
- MYSQL_USER=${_APP_DB_USER}
- MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests
command: 'mysqld --innodb-flush-method=fsync --wait_timeout=86400' # add ' --query_cache_size=0' for DB tests
# command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu
# smtp:

View file

@ -9,9 +9,9 @@ public void main() {
Account account = new Account(client);
account.createRecovery(
email = "email@example.com",
url = "https://example.com"
new Continuation<Response>() {
"email@example.com",
"https://example.com"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.createVerification(
url = "https://example.com"
new Continuation<Response>() {
"https://example.com"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.deleteSession(
sessionId = "[SESSION_ID]"
new Continuation<Response>() {
"[SESSION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.deleteSessions(new Continuation<Response>() {
account.deleteSessions(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.delete(new Continuation<Response>() {
account.delete(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.getLogs(new Continuation<Response>() {
account.getLogs(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.getPrefs(new Continuation<Response>() {
account.getPrefs(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.getSession(
sessionId = "[SESSION_ID]"
new Continuation<Response>() {
"[SESSION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.getSessions(new Continuation<Response>() {
account.getSessions(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
Account account = new Account(client);
account.get(new Continuation<Response>() {
account.get(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Account account = new Account(client);
account.updateEmail(
email = "email@example.com",
password = "password"
new Continuation<Response>() {
"email@example.com",
"password"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.updateName(
name = "[NAME]"
new Continuation<Response>() {
"[NAME]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.updatePassword(
password = "password",
new Continuation<Response>() {
"password",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Account account = new Account(client);
account.updatePrefs(
prefs = mapOf( "a" to "b" )
new Continuation<Response>() {
mapOf( "a" to "b" )
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,11 +9,11 @@ public void main() {
Account account = new Account(client);
account.updateRecovery(
userId = "[USER_ID]",
secret = "[SECRET]",
password = "password",
passwordAgain = "password"
new Continuation<Response>() {
"[USER_ID]",
"[SECRET]",
"password",
"password"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Account account = new Account(client);
account.updateVerification(
userId = "[USER_ID]",
secret = "[SECRET]"
new Continuation<Response>() {
"[USER_ID]",
"[SECRET]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getBrowser(
code = "aa",
new Continuation<Response>() {
"aa",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
code = "amex",
new Continuation<Response>() {
"amex",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getFavicon(
url = "https://example.com"
new Continuation<Response>() {
"https://example.com"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getFlag(
code = "af",
new Continuation<Response>() {
"af",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getImage(
url = "https://example.com",
new Continuation<Response>() {
"https://example.com",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,7 +9,7 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getInitials(
new Continuation<Response>() {
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Avatars avatars = new Avatars(client);
avatars.getQR(
text = "[TEXT]",
new Continuation<Response>() {
"[TEXT]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,11 +9,11 @@ public void main() {
Database database = new Database(client);
database.createCollection(
name = "[NAME]",
read = listOf(),
write = listOf(),
rules = listOf()
new Continuation<Response>() {
"[NAME]",
listOf(),
listOf(),
listOf()
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Database database = new Database(client);
database.createDocument(
collectionId = "[COLLECTION_ID]",
data = mapOf( "a" to "b" ),
new Continuation<Response>() {
"[COLLECTION_ID]",
mapOf( "a" to "b" ),
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Database database = new Database(client);
database.deleteCollection(
collectionId = "[COLLECTION_ID]"
new Continuation<Response>() {
"[COLLECTION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Database database = new Database(client);
database.deleteDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]"
new Continuation<Response>() {
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Database database = new Database(client);
database.getCollection(
collectionId = "[COLLECTION_ID]"
new Continuation<Response>() {
"[COLLECTION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Database database = new Database(client);
database.getDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]"
new Continuation<Response>() {
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,7 +9,7 @@ public void main() {
Database database = new Database(client);
database.listCollections(
new Continuation<Response>() {
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Database database = new Database(client);
database.listDocuments(
collectionId = "[COLLECTION_ID]",
new Continuation<Response>() {
"[COLLECTION_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Database database = new Database(client);
database.updateCollection(
collectionId = "[COLLECTION_ID]",
name = "[NAME]",
new Continuation<Response>() {
"[COLLECTION_ID]",
"[NAME]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,10 +9,10 @@ public void main() {
Database database = new Database(client);
database.updateDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]",
data = mapOf( "a" to "b" ),
new Continuation<Response>() {
"[COLLECTION_ID]",
"[DOCUMENT_ID]",
mapOf( "a" to "b" ),
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Functions functions = new Functions(client);
functions.createExecution(
functionId = "[FUNCTION_ID]",
new Continuation<Response>() {
"[FUNCTION_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,10 +9,10 @@ public void main() {
Functions functions = new Functions(client);
functions.createTag(
functionId = "[FUNCTION_ID]",
command = "[COMMAND]",
code = File("./path-to-files/image.jpg")
new Continuation<Response>() {
"[FUNCTION_ID]",
"[COMMAND]",
File("./path-to-files/image.jpg")
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,10 +9,10 @@ public void main() {
Functions functions = new Functions(client);
functions.create(
name = "[NAME]",
execute = listOf(),
runtime = "java-11.0",
new Continuation<Response>() {
"[NAME]",
listOf(),
"java-11.0",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Functions functions = new Functions(client);
functions.deleteTag(
functionId = "[FUNCTION_ID]",
tagId = "[TAG_ID]"
new Continuation<Response>() {
"[FUNCTION_ID]",
"[TAG_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Functions functions = new Functions(client);
functions.delete(
functionId = "[FUNCTION_ID]"
new Continuation<Response>() {
"[FUNCTION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Functions functions = new Functions(client);
functions.getExecution(
functionId = "[FUNCTION_ID]",
executionId = "[EXECUTION_ID]"
new Continuation<Response>() {
"[FUNCTION_ID]",
"[EXECUTION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Functions functions = new Functions(client);
functions.getTag(
functionId = "[FUNCTION_ID]",
tagId = "[TAG_ID]"
new Continuation<Response>() {
"[FUNCTION_ID]",
"[TAG_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Functions functions = new Functions(client);
functions.get(
functionId = "[FUNCTION_ID]"
new Continuation<Response>() {
"[FUNCTION_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Functions functions = new Functions(client);
functions.listExecutions(
functionId = "[FUNCTION_ID]",
new Continuation<Response>() {
"[FUNCTION_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Functions functions = new Functions(client);
functions.listTags(
functionId = "[FUNCTION_ID]",
new Continuation<Response>() {
"[FUNCTION_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,7 +9,7 @@ public void main() {
Functions functions = new Functions(client);
functions.list(
new Continuation<Response>() {
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Functions functions = new Functions(client);
functions.updateTag(
functionId = "[FUNCTION_ID]",
tag = "[TAG]"
new Continuation<Response>() {
"[FUNCTION_ID]",
"[TAG]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,10 +9,10 @@ public void main() {
Functions functions = new Functions(client);
functions.update(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
execute = listOf(),
new Continuation<Response>() {
"[FUNCTION_ID]",
"[NAME]",
listOf(),
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getAntiVirus(new Continuation<Response>() {
health.getAntiVirus(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getCache(new Continuation<Response>() {
health.getCache(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getDB(new Continuation<Response>() {
health.getDB(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueCertificates(new Continuation<Response>() {
health.getQueueCertificates(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueFunctions(new Continuation<Response>() {
health.getQueueFunctions(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueLogs(new Continuation<Response>() {
health.getQueueLogs(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueTasks(new Continuation<Response>() {
health.getQueueTasks(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueUsage(new Continuation<Response>() {
health.getQueueUsage(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getQueueWebhooks(new Continuation<Response>() {
health.getQueueWebhooks(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getStorageLocal(new Continuation<Response>() {
health.getStorageLocal(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.getTime(new Continuation<Response>() {
health.getTime(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Health health = new Health(client);
health.get(new Continuation<Response>() {
health.get(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getContinents(new Continuation<Response>() {
locale.getContinents(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getCountriesEU(new Continuation<Response>() {
locale.getCountriesEU(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getCountriesPhones(new Continuation<Response>() {
locale.getCountriesPhones(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getCountries(new Continuation<Response>() {
locale.getCountries(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getCurrencies(new Continuation<Response>() {
locale.getCurrencies(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.getLanguages(new Continuation<Response>() {
locale.getLanguages(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -8,7 +8,7 @@ public void main() {
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
Locale locale = new Locale(client);
locale.get(new Continuation<Response>() {
locale.get(new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.createFile(
file = File("./path-to-files/image.jpg"),
new Continuation<Response>() {
File("./path-to-files/image.jpg"),
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.deleteFile(
fileId = "[FILE_ID]"
new Continuation<Response>() {
"[FILE_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.getFileDownload(
fileId = "[FILE_ID]"
new Continuation<Response>() {
"[FILE_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.getFilePreview(
fileId = "[FILE_ID]",
new Continuation<Response>() {
"[FILE_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.getFileView(
fileId = "[FILE_ID]"
new Continuation<Response>() {
"[FILE_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Storage storage = new Storage(client);
storage.getFile(
fileId = "[FILE_ID]"
new Continuation<Response>() {
"[FILE_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,7 +9,7 @@ public void main() {
Storage storage = new Storage(client);
storage.listFiles(
new Continuation<Response>() {
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,10 +9,10 @@ public void main() {
Storage storage = new Storage(client);
storage.updateFile(
fileId = "[FILE_ID]",
read = listOf(),
write = listOf()
new Continuation<Response>() {
"[FILE_ID]",
listOf(),
listOf()
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,11 +9,11 @@ public void main() {
Teams teams = new Teams(client);
teams.createMembership(
teamId = "[TEAM_ID]",
email = "email@example.com",
roles = listOf(),
url = "https://example.com",
new Continuation<Response>() {
"[TEAM_ID]",
"email@example.com",
listOf(),
"https://example.com",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Teams teams = new Teams(client);
teams.create(
name = "[NAME]",
new Continuation<Response>() {
"[NAME]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,9 +9,9 @@ public void main() {
Teams teams = new Teams(client);
teams.deleteMembership(
teamId = "[TEAM_ID]",
membershipId = "[MEMBERSHIP_ID]"
new Continuation<Response>() {
"[TEAM_ID]",
"[MEMBERSHIP_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Teams teams = new Teams(client);
teams.delete(
teamId = "[TEAM_ID]"
new Continuation<Response>() {
"[TEAM_ID]"
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

View file

@ -9,8 +9,8 @@ public void main() {
Teams teams = new Teams(client);
teams.getMemberships(
teamId = "[TEAM_ID]",
new Continuation<Response>() {
"[TEAM_ID]",
new Continuation<Object>() {
@NotNull
@Override
public CoroutineContext getContext() {

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