Merge branch '0.6' of github.com:appwrite/appwrite into functions
This commit is contained in:
commit
c667c88efa
299 changed files with 670 additions and 623 deletions
|
@ -1,60 +1,45 @@
|
|||
<?php
|
||||
|
||||
const APP_PLATFORM_WEB = 'web';
|
||||
const APP_PLATFORM_IOS = 'ios';
|
||||
const APP_PLATFORM_ANDROID = 'android';
|
||||
const APP_PLATFORM_UNITY = 'unity';
|
||||
const APP_PLATFORM_FLUTTER = 'flutter';
|
||||
|
||||
const APP_PLATFORM_SERVER = 'server';
|
||||
const APP_PLATFORM_CLIENT = 'client';
|
||||
const APP_PLATFORM_CONSOLE = 'console';
|
||||
|
||||
return [
|
||||
APP_PLATFORM_WEB => [
|
||||
'key' => APP_PLATFORM_WEB,
|
||||
'name' => 'Web',
|
||||
'description' => 'Client libraries for integrating with '.APP_NAME.' to build web-based applications and websites. Read the [getting started for web](/docs/getting-started-for-web) tutorial to start building your first web application.',
|
||||
APP_PLATFORM_CLIENT => [
|
||||
'key' => APP_PLATFORM_CLIENT,
|
||||
'name' => 'Client',
|
||||
'description' => 'Client libraries for integrating with '.APP_NAME.' to build client-based applications and websites. Read the [getting started for web](/docs/getting-started-for-web) or [getting started for Flutter](/docs/getting-started-for-flutter) tutorials to start building your first application.',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'languages' => [
|
||||
'languages' => [ // TODO change key to 'sdks'
|
||||
[
|
||||
'key' => 'javascript',
|
||||
'name' => 'JavaScript',
|
||||
'key' => 'web',
|
||||
'name' => 'Web',
|
||||
'version' => '1.0.29',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-js',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'family' => APP_PLATFORM_CLIENT,
|
||||
'prism' => 'javascript',
|
||||
'source' => realpath(__DIR__ . '/../sdks/web-javascript'),
|
||||
'source' => realpath(__DIR__ . '/../sdks/client-web'),
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-js.git',
|
||||
'gitRepoName' => 'sdk-for-js',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
[
|
||||
'key' => 'typescript',
|
||||
'name' => 'TypeScript',
|
||||
'url' => '',
|
||||
'enabled' => false,
|
||||
'key' => 'flutter',
|
||||
'name' => 'Flutter',
|
||||
'version' => '0.2.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||
'enabled' => true,
|
||||
'beta' => true,
|
||||
'family' => APP_PLATFORM_CLIENT,
|
||||
'prism' => 'typescript',
|
||||
'source' => false,
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-typescript.git',
|
||||
'gitRepoName' => 'sdk-for-typescript',
|
||||
'prism' => 'dart',
|
||||
'source' => realpath(__DIR__ . '/../sdks/client-flutter'),
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-flutter.git',
|
||||
'gitRepoName' => 'sdk-for-flutter',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
APP_PLATFORM_IOS => [
|
||||
'key' => APP_PLATFORM_IOS,
|
||||
'name' => 'iOS',
|
||||
'description' => 'Client libraries for integrating with '.APP_NAME.' to build iOS applications. Read the [getting started for iOS](/docs/getting-started-for-ios) tutorial to start building your first iOS application.',
|
||||
'enabled' => false,
|
||||
'beta' => false,
|
||||
'languages' => [
|
||||
[
|
||||
'key' => 'swift',
|
||||
'name' => 'Swift',
|
||||
|
@ -68,29 +53,19 @@ return [
|
|||
'gitRepoName' => 'sdk-for-swift',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
[
|
||||
'key' => 'objective-c',
|
||||
'name' => 'Objective C',
|
||||
'url' => '',
|
||||
'enabled' => false,
|
||||
'beta' => false,
|
||||
'family' => APP_PLATFORM_CLIENT,
|
||||
'prism' => '',
|
||||
'source' => false,
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-objective-c.git',
|
||||
'gitRepoName' => 'sdk-for-objective-c',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
APP_PLATFORM_ANDROID => [
|
||||
'key' => APP_PLATFORM_ANDROID,
|
||||
'name' => 'Android',
|
||||
'description' => 'Client libraries for integrating with '.APP_NAME.' to build Android applications. Read the [getting started for Android](/docs/getting-started-for-android) tutorial to start building your first Android application.',
|
||||
'enabled' => false,
|
||||
'beta' => false,
|
||||
'languages' => [
|
||||
// [
|
||||
// 'key' => 'objective-c',
|
||||
// 'name' => 'Objective C',
|
||||
// 'url' => '',
|
||||
// 'enabled' => false,
|
||||
// 'beta' => false,
|
||||
// 'family' => APP_PLATFORM_CLIENT,
|
||||
// 'prism' => '',
|
||||
// 'source' => false,
|
||||
// 'gitUrl' => 'git@github.com:appwrite/sdk-for-objective-c.git',
|
||||
// 'gitRepoName' => 'sdk-for-objective-c',
|
||||
// 'gitUserName' => 'appwrite',
|
||||
// ],
|
||||
[
|
||||
'key' => 'kotlin',
|
||||
'name' => 'Kotlin',
|
||||
|
@ -104,62 +79,38 @@ return [
|
|||
'gitRepoName' => 'sdk-for-kotlin',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
[
|
||||
'key' => 'java',
|
||||
'name' => 'Java',
|
||||
'url' => '',
|
||||
'enabled' => false,
|
||||
'beta' => false,
|
||||
'family' => APP_PLATFORM_CLIENT,
|
||||
'prism' => 'java',
|
||||
'source' => false,
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-java.git',
|
||||
'gitRepoName' => 'sdk-for-java',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
// [
|
||||
// 'key' => 'java',
|
||||
// 'name' => 'Java',
|
||||
// 'url' => '',
|
||||
// 'enabled' => false,
|
||||
// 'beta' => false,
|
||||
// 'family' => APP_PLATFORM_CLIENT,
|
||||
// 'prism' => 'java',
|
||||
// 'source' => false,
|
||||
// 'gitUrl' => 'git@github.com:appwrite/sdk-for-java.git',
|
||||
// 'gitRepoName' => 'sdk-for-java',
|
||||
// 'gitUserName' => 'appwrite',
|
||||
// ],
|
||||
],
|
||||
],
|
||||
|
||||
APP_PLATFORM_FLUTTER => [
|
||||
'key' => APP_PLATFORM_FLUTTER,
|
||||
'name' => 'Flutter',
|
||||
'description' => 'Client libraries for integrating with '.APP_NAME.' to build cross-platform Flutter applications. Read the [getting started for Flutter](/docs/getting-started-for-flutter) tutorial to start building your first Flutter application.',
|
||||
'enabled' => true,
|
||||
'beta' => true,
|
||||
'languages' => [
|
||||
[
|
||||
'key' => 'dart',
|
||||
'name' => 'Dart',
|
||||
'version' => '0.1.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dart',
|
||||
'enabled' => true,
|
||||
'beta' => true,
|
||||
'family' => APP_PLATFORM_CLIENT,
|
||||
'prism' => 'dart',
|
||||
'source' => realpath(__DIR__ . '/../sdks/flutter-dart'),
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git',
|
||||
'gitRepoName' => 'sdk-for-dart',
|
||||
'gitUserName' => 'appwrite',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
APP_PLATFORM_CONSOLE => [
|
||||
'key' => APP_PLATFORM_CONSOLE,
|
||||
'name' => 'Console',
|
||||
'enabled' => false,
|
||||
'beta' => false,
|
||||
'languages' => [
|
||||
'languages' => [ // TODO change key to 'sdks'
|
||||
[
|
||||
'key' => 'javascript',
|
||||
'name' => 'JS',
|
||||
'key' => 'web',
|
||||
'name' => 'Console',
|
||||
'version' => '1.0.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-console',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'family' => APP_PLATFORM_CONSOLE,
|
||||
'prism' => 'console',
|
||||
'source' => realpath(__DIR__ . '/../sdks/console-javascript'),
|
||||
'source' => realpath(__DIR__ . '/../sdks/console-web'),
|
||||
'gitUrl' => null,
|
||||
'gitRepoName' => 'sdk-for-console',
|
||||
'gitUserName' => 'appwrite',
|
||||
|
@ -173,7 +124,7 @@ return [
|
|||
'description' => 'Libraries for integrating with '.APP_NAME.' to build server side integrations. Read the [getting started for server](/docs/getting-started-for-server) tutorial to start building your first server integration.',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'languages' => [
|
||||
'languages' => [ // TODO change key to 'sdks'
|
||||
[
|
||||
'key' => 'nodejs',
|
||||
'name' => 'Node.js',
|
||||
|
@ -235,7 +186,7 @@ return [
|
|||
'name' => 'Go',
|
||||
'version' => '0.0.6',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-go',
|
||||
'enabled' => true,
|
||||
'enabled' => false,
|
||||
'beta' => true,
|
||||
'family' => APP_PLATFORM_SERVER,
|
||||
'prism' => 'go',
|
||||
|
@ -249,7 +200,7 @@ return [
|
|||
'name' => 'Java',
|
||||
'version' => '0.0.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-java',
|
||||
'enabled' => true,
|
||||
'enabled' => false,
|
||||
'beta' => true,
|
||||
'family' => APP_PLATFORM_SERVER,
|
||||
'prism' => 'java',
|
||||
|
@ -260,5 +211,4 @@ return [
|
|||
],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
@ -24,4 +24,5 @@ return [ // List of publicly visible scopes
|
|||
// 'webhooks.write',
|
||||
'locale.read',
|
||||
'avatars.read',
|
||||
'health.read',
|
||||
];;
|
|
@ -483,6 +483,7 @@ $utopia->get('/v1/account/sessions/oauth2/:provider/redirect')
|
|||
if($state['success'] === $oauthDefaultSuccess) { // Add keys for non-web platforms
|
||||
$state['success'] = URLParser::parse($state['success']);
|
||||
$query = URLParser::parseQuery($state['success']['query']);
|
||||
$query['project'] = $project->getId();
|
||||
$query['domain'] = COOKIE_DOMAIN;
|
||||
$query['key'] = Auth::$cookieName;
|
||||
$query['secret'] = Auth::encodeSession($user->getId(), $secret);
|
||||
|
|
|
@ -409,15 +409,6 @@ $utopia->get('/open-api-2.json')
|
|||
if ($extensions) {
|
||||
$platformList = $route->getLabel('sdk.platform', []);
|
||||
|
||||
if(in_array(APP_PLATFORM_CLIENT, $platformList)) {
|
||||
$platformList = array_merge($platformList, [
|
||||
APP_PLATFORM_WEB,
|
||||
APP_PLATFORM_IOS,
|
||||
APP_PLATFORM_ANDROID,
|
||||
APP_PLATFORM_FLUTTER,
|
||||
]);
|
||||
}
|
||||
|
||||
$temp['extensions'] = [
|
||||
'weight' => $route->getOrder(),
|
||||
'cookies' => $route->getLabel('sdk.cookies', false),
|
||||
|
|
|
@ -46,6 +46,7 @@ const APP_SOCIAL_LINKEDIN = 'https://www.linkedin.com/company/appwrite';
|
|||
const APP_SOCIAL_INSTAGRAM = 'https://www.instagram.com/appwrite.io';
|
||||
const APP_SOCIAL_GITHUB = 'https://github.com/appwrite';
|
||||
const APP_SOCIAL_DISCORD = 'https://discord.gg/GSeTUeA';
|
||||
const APP_SOCIAL_DEV = 'https://dev.to/appwrite';
|
||||
|
||||
$register = new Registry();
|
||||
$request = new Request();
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
## 0.2.0
|
||||
|
||||
- Updated flutter_web_auth plugin to version 0.2.4
|
||||
- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- Updated flutter_web_auth version
|
|
@ -1,13 +1,13 @@
|
|||
# Appwrite SDK for Dart
|
||||
# Appwrite Flutter SDK
|
||||
|
||||
[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite)
|
||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1)
|
||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1)
|
||||
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
||||
Use the Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
|
|||
|
||||
```yml
|
||||
dependencies:
|
||||
appwrite: ^0.1.1
|
||||
appwrite: ^0.2.0
|
||||
```
|
||||
|
||||
You can install packages from the command line:
|
|
@ -30,7 +30,7 @@ class Client {
|
|||
|
||||
this.headers = {
|
||||
'content-type': 'application/json',
|
||||
'x-sdk-version': 'appwrite:dart:0.1.1',
|
||||
'x-sdk-version': 'appwrite:dart:0.2.0',
|
||||
};
|
||||
|
||||
this.config = {};
|
|
@ -305,7 +305,11 @@ class Account extends Service {
|
|||
/// first. Use the success and failure arguments to provide a redirect URL's
|
||||
/// back to your app when login is completed.
|
||||
///
|
||||
<<<<<<< HEAD:app/sdks/flutter-dart/lib/services/account.dart
|
||||
Future createOAuth2Session({@required String provider, String success = 'https://localhost/auth/oauth2/success', String failure = 'https://localhost/auth/oauth2/failure'}) {
|
||||
=======
|
||||
Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) {
|
||||
>>>>>>> 1d96911000c2322cd8c363449837bc103f427c44:app/sdks/client-flutter/lib/services/account.dart
|
||||
final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider);
|
||||
|
||||
final Map<String, dynamic> params = {
|
||||
|
@ -324,7 +328,7 @@ class Account extends Service {
|
|||
|
||||
return FlutterWebAuth.authenticate(
|
||||
url: url.toString(),
|
||||
callbackUrlScheme: "appwrite-callback"
|
||||
callbackUrlScheme: "appwrite-callback" + client.config['project']
|
||||
).then((value) {
|
||||
Uri url = Uri.parse(value);
|
||||
List<Cookie> cookies = [new Cookie(url.queryParameters['key'], url.queryParameters['secret'])];
|
|
@ -1,8 +1,8 @@
|
|||
name: appwrite
|
||||
version: 0.1.1
|
||||
version: 0.2.0
|
||||
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
|
||||
homepage: https://appwrite.io
|
||||
repository: https://github.com/appwrite/sdk-for-dart
|
||||
repository: https://github.com/appwrite/sdk-for-flutter
|
||||
issue_tracker: https://github.com/appwrite/sdk-generator/issues
|
||||
documentation: https://appwrite.io/support
|
||||
environment:
|
||||
|
@ -14,7 +14,7 @@ dependencies:
|
|||
dio: ^3.0.0
|
||||
cookie_jar: ^1.0.0
|
||||
dio_cookie_manager: ^1.0.0
|
||||
flutter_web_auth: ^0.2.0
|
||||
flutter_web_auth: ^0.2.4
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# Appwrite SDK for JavaScript
|
||||
# Appwrite SDK
|
||||
|
||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
|
||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
|
||||
|
||||
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
||||
Use the JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||
|
||||
![Appwrite](https://appwrite.io/images/github.png)
|
||||
|
@ -33,21 +33,6 @@ To install with a CDN (content delivery network) add the following scripts to th
|
|||
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.29"></script>
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Initialise the Appwrite SDK in your code, and setup your API credentials:
|
||||
|
||||
```js
|
||||
|
||||
// Init your JS SDK
|
||||
var appwrite = new Appwrite();
|
||||
|
||||
appwrite
|
||||
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
|
||||
.setProject('455x34dfkj') // Your Appwrite Project UID
|
||||
;
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Contribution
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue