This commit is contained in:
Jake Barnby
2025-08-20 19:22:48 +12:00
parent 50d61679bf
commit 920ffefd0c
1920 changed files with 20085 additions and 5926 deletions
Generated
+6 -6
View File
@@ -4930,16 +4930,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "1.0.0",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "8f16ba871856b379c3b33c72ebb175011437e724"
"reference": "e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8f16ba871856b379c3b33c72ebb175011437e724",
"reference": "8f16ba871856b379c3b33c72ebb175011437e724",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88",
"reference": "e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88",
"shasum": ""
},
"require": {
@@ -4975,9 +4975,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/1.0.0"
"source": "https://github.com/appwrite/sdk-generator/tree/1.1.0"
},
"time": "2025-08-20T05:54:57+00:00"
"time": "2025-08-20T07:11:14+00:00"
},
{
"name": "doctrine/annotations",
@@ -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());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.createRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
mapOf( "a" to "b" ), // data
listOf("read("any")"), // permissions (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.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.decrementRowColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
"", // column
0, // value (optional)
0, // min (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.deleteRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.getRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
listOf(), // queries (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.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.incrementRowColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
"", // column
0, // value (optional)
0, // max (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.listRows(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.updateRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
mapOf( "a" to "b" ), // data (optional)
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
tablesDb.upsertRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
mapOf( "a" to "b" ), // data (optional)
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -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)
)
@@ -0,0 +1,17 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.createRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
data = mapOf( "a" to "b" ),
permissions = listOf("read("any")"), // (optional)
)
@@ -0,0 +1,18 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.decrementRowColumn(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
column = "",
value = 0, // (optional)
min = 0, // (optional)
)
@@ -0,0 +1,15 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.deleteRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
)
@@ -0,0 +1,16 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.getRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
queries = listOf(), // (optional)
)
@@ -0,0 +1,18 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.incrementRowColumn(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
column = "",
value = 0, // (optional)
max = 0, // (optional)
)
@@ -0,0 +1,15 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.listRows(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
queries = listOf(), // (optional)
)
@@ -0,0 +1,17 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.updateRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
data = mapOf( "a" to "b" ), // (optional)
permissions = listOf("read("any")"), // (optional)
)
@@ -0,0 +1,17 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.TablesDb
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val result = tablesDb.upsertRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
data = mapOf( "a" to "b" ), // (optional)
permissions = listOf("read("any")"), // (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.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
)
@@ -0,0 +1,16 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let row = try await tablesDb.createRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: [:],
permissions: ["read("any")"] // 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 tablesDb = TablesDb(client)
let row = try await tablesDb.decrementRowColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
column: "",
value: 0, // optional
min: 0 // optional
)
@@ -0,0 +1,14 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let result = try await tablesDb.deleteRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>"
)
@@ -0,0 +1,15 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let row = try await tablesDb.getRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
queries: [] // 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 tablesDb = TablesDb(client)
let row = try await tablesDb.incrementRowColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
column: "",
value: 0, // optional
max: 0 // optional
)
@@ -0,0 +1,14 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let rowList = try await tablesDb.listRows(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
queries: [] // optional
)
@@ -0,0 +1,16 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let row = try await tablesDb.updateRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: [:], // optional
permissions: ["read("any")"] // optional
)
@@ -0,0 +1,16 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let tablesDb = TablesDb(client)
let row = try await tablesDb.upsertRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: [:], // optional
permissions: ["read("any")"] // 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.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
);
@@ -0,0 +1,15 @@
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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.createRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
permissions: ["read("any")"], // 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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.decrementRowColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '',
value: 0, // optional
min: 0, // optional
);
@@ -0,0 +1,13 @@
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
TablesDb tablesDb = TablesDb(client);
await tablesDb.deleteRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
);
@@ -0,0 +1,14 @@
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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.getRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
queries: [], // 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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.incrementRowColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '',
value: 0, // optional
max: 0, // optional
);
@@ -0,0 +1,13 @@
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
TablesDb tablesDb = TablesDb(client);
RowList result = await tablesDb.listRows(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
);
@@ -0,0 +1,15 @@
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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.updateRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {}, // optional
permissions: ["read("any")"], // optional
);
@@ -0,0 +1,15 @@
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
TablesDb tablesDb = TablesDb(client);
Row result = await tablesDb.upsertRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {}, // optional
permissions: ["read("any")"], // optional
);
@@ -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
}
}
@@ -0,0 +1,18 @@
mutation {
tablesDbCreateRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
permissions: ["read("any")"]
) {
_id
_sequence
_tableId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -0,0 +1,19 @@
mutation {
tablesDbDecrementRowColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
column: "",
value: 0,
min: 0
) {
_id
_sequence
_tableId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -0,0 +1,9 @@
mutation {
tablesDbDeleteRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>"
) {
status
}
}
@@ -0,0 +1,19 @@
mutation {
tablesDbIncrementRowColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
column: "",
value: 0,
max: 0
) {
_id
_sequence
_tableId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -0,0 +1,18 @@
mutation {
tablesDbUpdateRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
permissions: ["read("any")"]
) {
_id
_sequence
_tableId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -0,0 +1,18 @@
mutation {
tablesDbUpsertRow(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
permissions: ["read("any")"]
) {
_id
_sequence
_tableId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.createEmailPasswordSession(
'email@example.com', // email
'password' // password
);
const result = await account.createEmailPasswordSession({
email: 'email@example.com',
password: 'password'
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const account = new Account(client);
const result = await account.createEmailToken(
'<USER_ID>', // userId
'email@example.com', // email
false // phrase (optional)
);
const result = await account.createEmailToken({
userId: '<USER_ID>',
email: 'email@example.com',
phrase: false
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const account = new Account(client);
const result = await account.createMagicURLToken(
'<USER_ID>', // userId
'email@example.com', // email
'https://example.com', // url (optional)
false // phrase (optional)
);
const result = await account.createMagicURLToken({
userId: '<USER_ID>',
email: 'email@example.com',
url: 'https://example.com',
phrase: false
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.createMfaAuthenticator(
AuthenticatorType.Totp // type
);
const result = await account.createMfaAuthenticator({
type: AuthenticatorType.Totp
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.createMfaChallenge(
AuthenticationFactor.Email // factor
);
const result = await account.createMfaChallenge({
factor: AuthenticationFactor.Email
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const account = new Account(client);
account.createOAuth2Session(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
[] // scopes (optional)
);
account.createOAuth2Session({
provider: OAuthProvider.Amazon,
success: 'https://example.com',
failure: 'https://example.com',
scopes: []
});
@@ -6,10 +6,10 @@ const client = new Client()
const account = new Account(client);
account.createOAuth2Token(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
[] // scopes (optional)
);
account.createOAuth2Token({
provider: OAuthProvider.Amazon,
success: 'https://example.com',
failure: 'https://example.com',
scopes: []
});
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.createPhoneToken(
'<USER_ID>', // userId
'+12065550100' // phone
);
const result = await account.createPhoneToken({
userId: '<USER_ID>',
phone: '+12065550100'
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const account = new Account(client);
const result = await account.createPushTarget(
'<TARGET_ID>', // targetId
'<IDENTIFIER>', // identifier
'<PROVIDER_ID>' // providerId (optional)
);
const result = await account.createPushTarget({
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
providerId: '<PROVIDER_ID>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.createRecovery(
'email@example.com', // email
'https://example.com' // url
);
const result = await account.createRecovery({
email: 'email@example.com',
url: 'https://example.com'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.createSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
const result = await account.createSession({
userId: '<USER_ID>',
secret: '<SECRET>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.createVerification(
'https://example.com' // url
);
const result = await account.createVerification({
url: 'https://example.com'
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const account = new Account(client);
const result = await account.create(
'<USER_ID>', // userId
'email@example.com', // email
'', // password
'<NAME>' // name (optional)
);
const result = await account.create({
userId: '<USER_ID>',
email: 'email@example.com',
password: '',
name: '<NAME>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.deleteIdentity(
'<IDENTITY_ID>' // identityId
);
const result = await account.deleteIdentity({
identityId: '<IDENTITY_ID>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.deleteMfaAuthenticator(
AuthenticatorType.Totp // type
);
const result = await account.deleteMfaAuthenticator({
type: AuthenticatorType.Totp
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.deletePushTarget(
'<TARGET_ID>' // targetId
);
const result = await account.deletePushTarget({
targetId: '<TARGET_ID>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.deleteSession(
'<SESSION_ID>' // sessionId
);
const result = await account.deleteSession({
sessionId: '<SESSION_ID>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.getSession(
'<SESSION_ID>' // sessionId
);
const result = await account.getSession({
sessionId: '<SESSION_ID>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.listIdentities(
[] // queries (optional)
);
const result = await account.listIdentities({
queries: []
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.listLogs(
[] // queries (optional)
);
const result = await account.listLogs({
queries: []
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateEmail(
'email@example.com', // email
'password' // password
);
const result = await account.updateEmail({
email: 'email@example.com',
password: 'password'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateMFA(
false // mfa
);
const result = await account.updateMFA({
mfa: false
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateMagicURLSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
const result = await account.updateMagicURLSession({
userId: '<USER_ID>',
secret: '<SECRET>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateMfaAuthenticator(
AuthenticatorType.Totp, // type
'<OTP>' // otp
);
const result = await account.updateMfaAuthenticator({
type: AuthenticatorType.Totp,
otp: '<OTP>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateMfaChallenge(
'<CHALLENGE_ID>', // challengeId
'<OTP>' // otp
);
const result = await account.updateMfaChallenge({
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateName(
'<NAME>' // name
);
const result = await account.updateName({
name: '<NAME>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePassword(
'', // password
'password' // oldPassword (optional)
);
const result = await account.updatePassword({
password: '',
oldPassword: 'password'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePhoneSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
const result = await account.updatePhoneSession({
userId: '<USER_ID>',
secret: '<SECRET>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePhoneVerification(
'<USER_ID>', // userId
'<SECRET>' // secret
);
const result = await account.updatePhoneVerification({
userId: '<USER_ID>',
secret: '<SECRET>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePhone(
'+12065550100', // phone
'password' // password
);
const result = await account.updatePhone({
phone: '+12065550100',
password: 'password'
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePrefs(
{} // prefs
);
const result = await account.updatePrefs({
prefs: {}
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePushTarget(
'<TARGET_ID>', // targetId
'<IDENTIFIER>' // identifier
);
const result = await account.updatePushTarget({
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>'
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateRecovery(
'<USER_ID>', // userId
'<SECRET>', // secret
'' // password
);
const result = await account.updateRecovery({
userId: '<USER_ID>',
secret: '<SECRET>',
password: ''
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateSession(
'<SESSION_ID>' // sessionId
);
const result = await account.updateSession({
sessionId: '<SESSION_ID>'
});
console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
const account = new Account(client);
const result = await account.updateVerification(
'<USER_ID>', // userId
'<SECRET>' // secret
);
const result = await account.updateVerification({
userId: '<USER_ID>',
secret: '<SECRET>'
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getBrowser(
Browser.AvantBrowser, // code
0, // width (optional)
0, // height (optional)
-1 // quality (optional)
);
const result = avatars.getBrowser({
code: Browser.AvantBrowser,
width: 0,
height: 0,
quality: -1
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getCreditCard(
CreditCard.AmericanExpress, // code
0, // width (optional)
0, // height (optional)
-1 // quality (optional)
);
const result = avatars.getCreditCard({
code: CreditCard.AmericanExpress,
width: 0,
height: 0,
quality: -1
});
console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getFavicon(
'https://example.com' // url
);
const result = avatars.getFavicon({
url: 'https://example.com'
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getFlag(
Flag.Afghanistan, // code
0, // width (optional)
0, // height (optional)
-1 // quality (optional)
);
const result = avatars.getFlag({
code: Flag.Afghanistan,
width: 0,
height: 0,
quality: -1
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getImage(
'https://example.com', // url
0, // width (optional)
0 // height (optional)
);
const result = avatars.getImage({
url: 'https://example.com',
width: 0,
height: 0
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getInitials(
'<NAME>', // name (optional)
0, // width (optional)
0, // height (optional)
'' // background (optional)
);
const result = avatars.getInitials({
name: '<NAME>',
width: 0,
height: 0,
background: ''
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const avatars = new Avatars(client);
const result = avatars.getQR(
'<TEXT>', // text
1, // size (optional)
0, // margin (optional)
false // download (optional)
);
const result = avatars.getQR({
text: '<TEXT>',
size: 1,
margin: 0,
download: false
});
console.log(result);
@@ -6,12 +6,12 @@ const client = new Client()
const databases = new Databases(client);
const result = await databases.createDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data
["read("any")"] // permissions (optional)
);
const result = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"]
});
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.decrementDocumentAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null,
min: null
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const databases = new Databases(client);
const result = await databases.deleteDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>' // documentId
);
const result = await databases.deleteDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>'
});
console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
const databases = new Databases(client);
const result = await databases.getDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
[] // queries (optional)
);
const result = await databases.getDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
queries: []
});
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({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null,
max: null
});
console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
const databases = new Databases(client);
const result = await databases.listDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // queries (optional)
);
const result = await databases.listDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: []
});
console.log(result);
@@ -6,12 +6,12 @@ const client = new Client()
const databases = new Databases(client);
const result = await databases.updateDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data (optional)
["read("any")"] // permissions (optional)
);
const result = await databases.updateDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"]
});
console.log(result);

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