chore: regen

This commit is contained in:
Chirag Aggarwal
2025-07-23 20:56:20 +05:30
parent cd39bd6512
commit a53dcd8a23
126 changed files with 1219 additions and 170205 deletions
+3
View File
@@ -101,6 +101,9 @@ RUN if [ "$DEBUG" = "true" ]; then mkdir -p /tmp/xdebug; fi
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so; fi
RUN git config --global user.email "chiragaggarwal5k@gmail.com"
RUN apk add --update --no-cache openssh-client
EXPOSE 80
CMD [ "php", "app/http.php" ]
+1 -1
View File
@@ -11,7 +11,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '18.1.0',
'version' => '18.2.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
+14 -19
View File
@@ -8026,10 +8026,7 @@
{
"name": "createDocument",
"auth": {
"Admin": [],
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@@ -8050,13 +8047,17 @@
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"security": {
"Project": [],
"Key": [],
"JWT": []
}
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Key": []
"Project": []
},
"parameters": [
"databaseId",
@@ -8074,20 +8075,14 @@
"model": "#\/components\/schemas\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.",
"security": {
"Project": [],
"Key": []
}
}
],
"auth": {
"Project": []
}
]
},
"security": [
{
"Project": [],
"Key": [],
"JWT": []
}
],
"parameters": [
{
"name": "databaseId",
+16 -20
View File
@@ -7507,10 +7507,8 @@
{
"name": "createDocument",
"auth": {
"Admin": [],
"Session": [],
"Key": [],
"JWT": []
"Project": [],
"Session": []
},
"parameters": [
"databaseId",
@@ -7531,12 +7529,18 @@
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"security": {
"Project": [],
"Session": [],
"Key": [],
"JWT": []
}
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Project": [],
"Key": []
},
"parameters": [
@@ -7555,22 +7559,14 @@
"model": "#\/components\/schemas\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.",
"security": {
"Project": [],
"Key": []
}
}
],
"auth": {
"Project": [],
"Session": []
}
]
},
"security": [
{
"Project": [],
"Session": [],
"Key": [],
"JWT": []
}
],
"parameters": [
{
"name": "databaseId",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14 -19
View File
@@ -8146,10 +8146,7 @@
{
"name": "createDocument",
"auth": {
"Admin": [],
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@@ -8170,13 +8167,17 @@
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"security": {
"Project": [],
"Key": [],
"JWT": []
}
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Key": []
"Project": []
},
"parameters": [
"databaseId",
@@ -8194,20 +8195,14 @@
"model": "#\/definitions\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.",
"security": {
"Project": [],
"Key": []
}
}
],
"auth": {
"Project": []
}
]
},
"security": [
{
"Project": [],
"Key": [],
"JWT": []
}
],
"parameters": [
{
"name": "databaseId",
+16 -20
View File
@@ -7617,10 +7617,8 @@
{
"name": "createDocument",
"auth": {
"Admin": [],
"Session": [],
"Key": [],
"JWT": []
"Project": [],
"Session": []
},
"parameters": [
"databaseId",
@@ -7641,12 +7639,18 @@
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"security": {
"Project": [],
"Session": [],
"Key": [],
"JWT": []
}
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Project": [],
"Key": []
},
"parameters": [
@@ -7665,22 +7669,14 @@
"model": "#\/definitions\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.",
"security": {
"Project": [],
"Key": []
}
}
],
"auth": {
"Project": [],
"Session": []
}
]
},
"security": [
{
"Project": [],
"Session": [],
"Key": [],
"JWT": []
}
],
"parameters": [
{
"name": "databaseId",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Generated
+12 -12
View File
@@ -3942,16 +3942,16 @@
},
{
"name": "utopia-php/messaging",
"version": "0.18.1",
"version": "0.18.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/messaging.git",
"reference": "5d1245207a61d7ca065daddad7ac5f1d5640152f"
"reference": "0d364edacf4d4867964c7e17f653031dd39394bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/5d1245207a61d7ca065daddad7ac5f1d5640152f",
"reference": "5d1245207a61d7ca065daddad7ac5f1d5640152f",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/0d364edacf4d4867964c7e17f653031dd39394bf",
"reference": "0d364edacf4d4867964c7e17f653031dd39394bf",
"shasum": ""
},
"require": {
@@ -3987,9 +3987,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/messaging/issues",
"source": "https://github.com/utopia-php/messaging/tree/0.18.1"
"source": "https://github.com/utopia-php/messaging/tree/0.18.2"
},
"time": "2025-06-26T18:26:07+00:00"
"time": "2025-07-21T18:27:03+00:00"
},
{
"name": "utopia-php/migration",
@@ -4810,16 +4810,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.41.17",
"version": "0.41.19",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8"
"reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ef5e9d952032deecffee7f825a941c40ed4c84b8",
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ae6d44b373ae09f28d8b2dbb781ea3e2491b842d",
"reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d",
"shasum": ""
},
"require": {
@@ -4855,9 +4855,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.17"
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.19"
},
"time": "2025-07-18T08:18:48+00:00"
"time": "2025-07-23T06:33:44+00:00"
},
{
"name": "doctrine/annotations",
+1
View File
@@ -86,6 +86,7 @@ services:
- ./public:/usr/src/code/public
- ./src:/usr/src/code/src
- ./dev:/usr/src/code/dev
- ~/.ssh:/root/.ssh
depends_on:
- mariadb
- redis
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setSession("") // The user session to authenticate with
.setKey("") //
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
@@ -0,0 +1,27 @@
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
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.decrementDocumentAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
"", // attribute
0, // value (optional)
0, // min (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,27 @@
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
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.incrementDocumentAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
"", // attribute
0, // value (optional)
0, // max (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setSession("") // The user session to authenticate with
.setKey("") //
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
@@ -0,0 +1,18 @@
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
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val databases = Databases(client)
val result = databases.decrementDocumentAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
attribute = "",
value = 0, // (optional)
min = 0, // (optional)
)
@@ -0,0 +1,18 @@
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
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val databases = Databases(client)
val result = databases.incrementDocumentAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
attribute = "",
value = 0, // (optional)
max = 0, // (optional)
)
@@ -2,6 +2,7 @@ import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setSession("") // The user session to authenticate with
.setKey("") //
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
@@ -0,0 +1,17 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let databases = Databases(client)
let document = try await databases.decrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0, // optional
min: 0 // optional
)
@@ -0,0 +1,17 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let databases = Databases(client)
let document = try await databases.incrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0, // optional
max: 0 // optional
)
@@ -2,6 +2,7 @@ import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('') //
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -0,0 +1,16 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Databases databases = Databases(client);
Document result = await databases.decrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: 0, // optional
min: 0, // optional
);
@@ -0,0 +1,16 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Databases databases = Databases(client);
Document result = await databases.incrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: 0, // optional
max: 0, // optional
);
@@ -7,6 +7,7 @@ mutation {
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -0,0 +1,19 @@
mutation {
databasesDecrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0,
min: 0
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -0,0 +1,19 @@
mutation {
databasesIncrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0,
max: 0
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -7,6 +7,7 @@ mutation {
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -7,6 +7,7 @@ mutation {
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -2,6 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('') //
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -0,0 +1,18 @@
import { Client, Databases } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
console.log(result);
@@ -0,0 +1,18 @@
import { Client, Databases } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
console.log(result);
@@ -0,0 +1,12 @@
PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement 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>
{
"value": 0,
"min": 0
}
@@ -0,0 +1,12 @@
PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment 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>
{
"value": 0,
"max": 0
}
@@ -2,6 +2,7 @@ import { Client, Databases } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('') //
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -0,0 +1,18 @@
import { Client, Databases } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
console.log(result);
@@ -0,0 +1,18 @@
import { Client, Databases } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
console.log(result);
@@ -0,0 +1,7 @@
appwrite databases decrementDocumentAttribute \
--databaseId <DATABASE_ID> \
--collectionId <COLLECTION_ID> \
--documentId <DOCUMENT_ID> \
--attribute '' \
@@ -0,0 +1,7 @@
appwrite databases incrementDocumentAttribute \
--databaseId <DATABASE_ID> \
--collectionId <COLLECTION_ID> \
--documentId <DOCUMENT_ID> \
--attribute '' \
@@ -2,6 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') //
.setKey('<YOUR_API_KEY>') // Your secret API key
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -2,6 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
@@ -0,0 +1,18 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
console.log(result);
@@ -0,0 +1,18 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
console.log(result);
@@ -0,0 +1,17 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.upsertDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data
["read("any")"] // permissions (optional)
);
console.log(result);
@@ -9,7 +9,7 @@ const databases = new Databases(client);
const result = await databases.upsertDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents (optional)
[] // documents
);
console.log(result);
@@ -1,4 +1,4 @@
import { Client, Proxy, } from "@appwrite.io/console";
import { Client, Proxy, , ProxyResourceType } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -9,7 +9,9 @@ const proxy = new Proxy(client);
const result = await proxy.createRedirectRule(
'', // domain
'https://example.com', // url
.MovedPermanently301 // statusCode
.MovedPermanently301, // statusCode
'<RESOURCE_ID>', // resourceId
ProxyResourceType.Site // resourceType
);
console.log(result);
@@ -9,7 +9,8 @@ const vcs = new Vcs(client);
const result = await vcs.getRepositoryContents(
'<INSTALLATION_ID>', // installationId
'<PROVIDER_REPOSITORY_ID>', // providerRepositoryId
'<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
'<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
'<PROVIDER_REFERENCE>' // providerReference (optional)
);
console.log(result);
@@ -2,6 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('<YOUR_API_KEY>') // Your secret API key
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -2,6 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
@@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
Document result = await databases.decrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: 0, // (optional)
min: 0, // (optional)
);
@@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
Document result = await databases.incrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: 0, // (optional)
max: 0, // (optional)
);
@@ -2,6 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('<YOUR_API_KEY>') // Your secret API key
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -2,6 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
@@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
@@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
@@ -0,0 +1,16 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const databases = new Databases(client);
const response = await databases.upsertDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data
["read("any")"] // permissions (optional)
);
@@ -10,5 +10,5 @@ const databases = new Databases(client);
const response = await databases.upsertDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents (optional)
[] // documents
);
@@ -4,6 +4,7 @@ using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetAdmin("") //
.SetSession("") // The user session to authenticate with
.SetKey("<YOUR_API_KEY>") // Your secret API key
.SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token
@@ -4,6 +4,7 @@ using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetAdmin("") //
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
@@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
Document result = await databases.DecrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0, // optional
min: 0 // optional
);
@@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
Document result = await databases.IncrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0, // optional
max: 0 // optional
);
@@ -9,6 +9,7 @@ import (
func main() {
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithAdmin("") //
client.WithSession("") // The user session to authenticate with
client.WithKey("<YOUR_API_KEY>") // Your secret API key
client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token
@@ -9,6 +9,7 @@ import (
func main() {
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithAdmin("") //
client.WithKey("<YOUR_API_KEY>") // Your secret API key
)
@@ -0,0 +1,31 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithProject("<YOUR_PROJECT_ID>") // Your project ID
client.WithKey("<YOUR_API_KEY>") // Your secret API key
)
service := databases.New(client)
response, error := service.DecrementDocumentAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",
"<DOCUMENT_ID>",
"",
databases.WithDecrementDocumentAttributeValue(0),
databases.WithDecrementDocumentAttributeMin(0),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -0,0 +1,31 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithProject("<YOUR_PROJECT_ID>") // Your project ID
client.WithKey("<YOUR_API_KEY>") // Your secret API key
)
service := databases.New(client)
response, error := service.IncrementDocumentAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",
"<DOCUMENT_ID>",
"",
databases.WithIncrementDocumentAttributeValue(0),
databases.WithIncrementDocumentAttributeMax(0),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -17,7 +17,7 @@ func main() {
response, error := service.UpsertDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",
databases.WithUpsertDocumentsDocuments([]interface{}{}),
[]interface{}{},
)
if error != nil {
@@ -7,6 +7,7 @@ mutation {
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -7,6 +7,7 @@ mutation {
total
documents {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -19,5 +19,6 @@ mutation {
_updatedAt
size
default
encrypt
}
}
@@ -0,0 +1,19 @@
mutation {
databasesDecrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0,
min: 0
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -7,6 +7,7 @@ mutation {
total
documents {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -0,0 +1,19 @@
mutation {
databasesIncrementDocumentAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
attribute: "",
value: 0,
max: 0
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -7,6 +7,7 @@ mutation {
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -8,6 +8,7 @@ mutation {
total
documents {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -18,5 +18,6 @@ mutation {
_updatedAt
size
default
encrypt
}
}
@@ -0,0 +1,18 @@
mutation {
databasesUpsertDocument(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
data: "{}",
permissions: ["read("any")"]
) {
_id
_sequence
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -7,6 +7,7 @@ mutation {
total
documents {
_id
_sequence
_collectionId
_databaseId
_createdAt
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setSession("") // The user session to authenticate with
.setKey("<YOUR_API_KEY>") // Your secret API key
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
databases.decrementDocumentAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
"", // attribute
0, // value (optional)
0, // min (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
databases.incrementDocumentAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
"", // attribute
0, // value (optional)
0, // max (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -0,0 +1,27 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.upsertDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -12,7 +12,7 @@ Databases databases = new Databases(client);
databases.upsertDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // documents (optional)
listOf(), // documents
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setSession("") // The user session to authenticate with
.setKey("<YOUR_API_KEY>") // Your secret API key
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
@@ -4,6 +4,7 @@ import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setAdmin("") //
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
@@ -0,0 +1,19 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
val response = databases.decrementDocumentAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
attribute = "",
value = 0, // optional
min = 0 // optional
)
@@ -0,0 +1,19 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
val response = databases.incrementDocumentAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
attribute = "",
value = 0, // optional
max = 0 // optional
)
@@ -0,0 +1,18 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession("") // The user session to authenticate with
val databases = Databases(client)
val response = databases.upsertDocument(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
data = mapOf( "a" to "b" ),
permissions = listOf("read("any")") // optional
)
@@ -12,5 +12,5 @@ val databases = Databases(client)
val response = databases.upsertDocuments(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documents = listOf() // optional
documents = listOf()
)
@@ -2,6 +2,7 @@ const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setSession('') // The user session to authenticate with
.setKey('<YOUR_API_KEY>') // Your secret API key
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -2,6 +2,7 @@ const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setAdmin('') //
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
@@ -0,0 +1,17 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
const result = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
@@ -0,0 +1,17 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
const result = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
@@ -5,6 +5,7 @@ use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setAdmin('') //
->setSession('') // The user session to authenticate with
->setKey('<YOUR_API_KEY>') // Your secret API key
->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
@@ -5,6 +5,7 @@ use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setAdmin('') //
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
@@ -0,0 +1,20 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
$result = $databases->decrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
min: null // optional
);
@@ -0,0 +1,20 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
$result = $databases->incrementDocumentAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
max: null // optional
);
@@ -0,0 +1,19 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with
$databases = new Databases($client);
$result = $databases->upsertDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: [],
permissions: ["read("any")"] // optional
);

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