mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch 'main' into add-region-env
This commit is contained in:
@@ -10,6 +10,7 @@ use Appwrite\Event\StatsUsage;
|
||||
use Appwrite\Platform\Appwrite;
|
||||
use Appwrite\Runtimes\Runtimes;
|
||||
use Executor\Executor;
|
||||
use Swoole\Runtime;
|
||||
use Swoole\Timer;
|
||||
use Utopia\Cache\Adapter\Sharding;
|
||||
use Utopia\Cache\Cache;
|
||||
@@ -298,4 +299,6 @@ $cli
|
||||
|
||||
$cli->shutdown()->action(fn () => Timer::clearAll());
|
||||
|
||||
// Enable coroutines, but disable TCP hooks. These don't work until we use `\Utopia\Cache\Adapter\Pool` and `\Utopia\Database\Adapter\Pool`.
|
||||
Runtime::enableCoroutine(SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_TCP);
|
||||
run($cli->run(...));
|
||||
|
||||
@@ -4490,6 +4490,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -30695,7 +30695,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30716,7 +30716,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -21777,7 +21777,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -21798,7 +21798,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -4490,6 +4490,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -30695,7 +30695,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30716,7 +30716,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -21777,7 +21777,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -21798,7 +21798,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -4630,6 +4630,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -30922,7 +30922,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30939,7 +30939,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -22062,7 +22062,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -22079,7 +22079,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -4630,6 +4630,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -30922,7 +30922,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30939,7 +30939,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -22062,7 +22062,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -22079,7 +22079,7 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
|
||||
@@ -1351,4 +1351,23 @@ return [
|
||||
'providerVersion' => '0.3.*',
|
||||
'variables' => [],
|
||||
],
|
||||
[
|
||||
'key' => 'gallery-for-lynx',
|
||||
'name' => 'Lynx gallery',
|
||||
'tagline' => 'A Lynx website showcasing gallery with smooth animations.',
|
||||
'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible)
|
||||
'useCases' => [UseCases::STARTER],
|
||||
'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png',
|
||||
'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png',
|
||||
'frameworks' => [
|
||||
getFramework('LYNX', [
|
||||
'providerRootDirectory' => './lynx/gallery',
|
||||
]),
|
||||
],
|
||||
'vcsProvider' => 'github',
|
||||
'providerRepositoryId' => 'templates-for-sites',
|
||||
'providerOwner' => 'appwrite',
|
||||
'providerVersion' => '0.3.*',
|
||||
'variables' => []
|
||||
],
|
||||
];
|
||||
|
||||
@@ -177,7 +177,7 @@ $image = $this->getParam('image', '');
|
||||
appwrite-console:
|
||||
<<: *x-logging
|
||||
container_name: appwrite-console
|
||||
image: <?php echo $organization; ?>/console:6.0.1
|
||||
image: <?php echo $organization; ?>/console:6.0.8
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
Generated
+14
-14
@@ -3555,16 +3555,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/detector",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/detector.git",
|
||||
"reference": "895a4147463965b5f9cbc083b764b6476f547879"
|
||||
"reference": "b5d6ba51352485b524589bc0ee8d07a9efafe718"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/detector/zipball/895a4147463965b5f9cbc083b764b6476f547879",
|
||||
"reference": "895a4147463965b5f9cbc083b764b6476f547879",
|
||||
"url": "https://api.github.com/repos/utopia-php/detector/zipball/b5d6ba51352485b524589bc0ee8d07a9efafe718",
|
||||
"reference": "b5d6ba51352485b524589bc0ee8d07a9efafe718",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3594,9 +3594,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/detector/issues",
|
||||
"source": "https://github.com/utopia-php/detector/tree/0.1.4"
|
||||
"source": "https://github.com/utopia-php/detector/tree/0.1.5"
|
||||
},
|
||||
"time": "2025-04-09T11:50:45+00:00"
|
||||
"time": "2025-05-19T11:01:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
@@ -4105,16 +4105,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/platform",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/platform.git",
|
||||
"reference": "6bc7fbb43ec2b7f9ee5bdef5d4b5e4a81860950b"
|
||||
"reference": "8c43cd866148a7c4c495e3401268429e338004b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/6bc7fbb43ec2b7f9ee5bdef5d4b5e4a81860950b",
|
||||
"reference": "6bc7fbb43ec2b7f9ee5bdef5d4b5e4a81860950b",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/8c43cd866148a7c4c495e3401268429e338004b3",
|
||||
"reference": "8c43cd866148a7c4c495e3401268429e338004b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4149,9 +4149,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/platform/issues",
|
||||
"source": "https://github.com/utopia-php/platform/tree/0.7.6"
|
||||
"source": "https://github.com/utopia-php/platform/tree/0.7.7"
|
||||
},
|
||||
"time": "2025-05-18T20:31:24+00:00"
|
||||
"time": "2025-05-20T09:23:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/pools",
|
||||
@@ -8242,7 +8242,7 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
@@ -8266,5 +8266,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "8.3"
|
||||
},
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
||||
+2
-2
@@ -214,7 +214,7 @@ services:
|
||||
appwrite-console:
|
||||
<<: *x-logging
|
||||
container_name: appwrite-console
|
||||
image: appwrite/console:6.0.1
|
||||
image: appwrite/console:6.0.8
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
@@ -952,7 +952,7 @@ services:
|
||||
hostname: exc1
|
||||
<<: *x-logging
|
||||
stop_signal: SIGINT
|
||||
image: openruntimes/executor:0.7.14
|
||||
image: openruntimes/executor:0.7.16
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setKey(""); //
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.createDocuments(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
listOf(), // documents
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setKey("") //
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.createDocuments(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documents = listOf(),
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setKey("") //
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let documentList = try await databases.createDocuments(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documents: []
|
||||
)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setKey(''); //
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
DocumentList result = await databases.createDocuments(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documents: [],
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
mutation {
|
||||
databasesCreateDocuments(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documents: []
|
||||
) {
|
||||
total
|
||||
documents {
|
||||
_id
|
||||
_collectionId
|
||||
_databaseId
|
||||
_createdAt
|
||||
_updatedAt
|
||||
_permissions
|
||||
data
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Client, Databases } from "react-native-appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setKey(''); //
|
||||
|
||||
const databases = new Databases(client);
|
||||
|
||||
const result = await databases.createDocuments(
|
||||
'<DATABASE_ID>', // databaseId
|
||||
'<COLLECTION_ID>', // collectionId
|
||||
[] // documents
|
||||
);
|
||||
|
||||
console.log(result);
|
||||
@@ -0,0 +1,11 @@
|
||||
POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
|
||||
Host: cloud.appwrite.io
|
||||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.7.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"documents": []
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Client, Databases } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setKey(''); //
|
||||
|
||||
const databases = new Databases(client);
|
||||
|
||||
const result = await databases.createDocuments(
|
||||
'<DATABASE_ID>', // databaseId
|
||||
'<COLLECTION_ID>', // collectionId
|
||||
[] // documents
|
||||
);
|
||||
|
||||
console.log(result);
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account createAnonymousSession
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account createEmailPasswordSession \
|
||||
--email email@example.com \
|
||||
--password password
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite account createEmailToken \
|
||||
--userId <USER_ID> \
|
||||
--email email@example.com \
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account createJWT
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite account createMagicURLToken \
|
||||
--userId <USER_ID> \
|
||||
--email email@example.com \
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account createMfaAuthenticator \
|
||||
--type totp
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account createMfaChallenge \
|
||||
--factor email
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account createMfaRecoveryCodes
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite account createOAuth2Session \
|
||||
--provider amazon \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite account createOAuth2Token \
|
||||
--provider amazon \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account createPhoneToken \
|
||||
--userId <USER_ID> \
|
||||
--phone +12065550100
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account createPhoneVerification
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite account createPushTarget \
|
||||
--targetId <TARGET_ID> \
|
||||
--identifier <IDENTIFIER> \
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account createRecovery \
|
||||
--email email@example.com \
|
||||
--url https://example.com
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account createSession \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET>
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account createVerification \
|
||||
--url https://example.com
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite account create \
|
||||
--userId <USER_ID> \
|
||||
--email email@example.com \
|
||||
--password '' \
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account deleteIdentity \
|
||||
--identityId <IDENTITY_ID>
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account deleteMfaAuthenticator \
|
||||
--type totp
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account deletePushTarget \
|
||||
--targetId <TARGET_ID>
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account deleteSession \
|
||||
--sessionId <SESSION_ID>
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account deleteSessions
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account delete
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account getMfaRecoveryCodes
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account getPrefs
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account getSession \
|
||||
--sessionId <SESSION_ID>
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account get
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account listIdentities \
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account listLogs \
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account listMfaFactors
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account listSessions
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updateEmail \
|
||||
--email email@example.com \
|
||||
--password password
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account updateMFA \
|
||||
--mfa false
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updateMagicURLSession \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET>
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updateMfaAuthenticator \
|
||||
--type totp \
|
||||
--otp <OTP>
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updateMfaChallenge \
|
||||
--challengeId <CHALLENGE_ID> \
|
||||
--otp <OTP>
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account updateMfaRecoveryCodes
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account updateName \
|
||||
--name <NAME>
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updatePassword \
|
||||
--password '' \
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updatePhoneSession \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET>
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updatePhoneVerification \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET>
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updatePhone \
|
||||
--phone +12065550100 \
|
||||
--password password
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account updatePrefs \
|
||||
--prefs '{ "key": "value" }'
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updatePushTarget \
|
||||
--targetId <TARGET_ID> \
|
||||
--identifier <IDENTIFIER>
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite account updateRecovery \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET> \
|
||||
--password ''
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite account updateSession \
|
||||
--sessionId <SESSION_ID>
|
||||
@@ -0,0 +1 @@
|
||||
appwrite account updateStatus
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite account updateVerification \
|
||||
--userId <USER_ID> \
|
||||
--secret <SECRET>
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite assistant chat \
|
||||
--prompt <PROMPT>
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite avatars getBrowser \
|
||||
--code aa \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite avatars getCreditCard \
|
||||
--code amex \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
appwrite avatars getFavicon \
|
||||
--url https://example.com
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite avatars getFlag \
|
||||
--code af \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite avatars getImage \
|
||||
--url https://example.com \
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite avatars getInitials \
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
appwrite avatars getQR \
|
||||
--text <TEXT> \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite console getResource \
|
||||
--value <VALUE> \
|
||||
--type rules
|
||||
@@ -0,0 +1 @@
|
||||
appwrite console variables
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createBooleanAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createCollection \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--name <NAME> \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createDatetimeAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
appwrite databases createDocument \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--documentId <DOCUMENT_ID> \
|
||||
--data '{ "key": "value" }' \
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite databases createDocuments \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--documents one two three
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createEmailAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
appwrite databases createEnumAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--elements one two three \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
appwrite databases createFloatAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
appwrite databases createIndex \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--type key \
|
||||
--attributes one two three \
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
appwrite databases createIntegerAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createIpAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
appwrite databases createRelationshipAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--relatedCollectionId <RELATED_COLLECTION_ID> \
|
||||
--type oneToOne \
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
appwrite databases createStringAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--size 1 \
|
||||
--required false \
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
appwrite databases createUrlAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite databases create \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--name <NAME> \
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
appwrite databases deleteAttribute \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID> \
|
||||
--key ''
|
||||
@@ -0,0 +1,3 @@
|
||||
appwrite databases deleteCollection \
|
||||
--databaseId <DATABASE_ID> \
|
||||
--collectionId <COLLECTION_ID>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user