Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ const result = await databases.createDocument({
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Comment on lines +21 to 23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix invalid permissions syntax (broken quotes) and prefer Permission/Role helpers.

The string ["read("any")"] is invalid JS. Use SDK helpers for clarity.

Apply:

-    permissions: ["read("any")"], // optional
+    permissions: [sdk.Permission.read(sdk.Role.any())], // optional
     transactionId: '<TRANSACTION_ID>' // optional
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
🤖 Prompt for AI Agents
In docs/examples/databases/create-document.md around lines 21 to 23, the
permissions line uses invalid JS syntax with nested quotes (`["read("any")"]`);
replace it with the SDK permission/role helper usage (for example use
Permission.read('any') or Role.any() inside the array) and ensure the helper is
imported or referenced correctly so the permissions array is valid JS.

3 changes: 2 additions & 1 deletion docs/examples/databases/create-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client);
const result = await databases.createDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: []
documents: [],
transactionId: '<TRANSACTION_ID>' // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await databases.createLineAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [[1, 2], [3, 4], [5, 6]] // optional
});
23 changes: 23 additions & 0 deletions docs/examples/databases/create-operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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.createOperations({
transactionId: '<TRANSACTION_ID>',
operations: [
{
"action": "create",
"databaseId": "<DATABASE_ID>",
"collectionId": "<COLLECTION_ID>",
"documentId": "<DOCUMENT_ID>",
"data": {
"name": "Walter O'Brien"
}
}
] // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await databases.createPointAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [1, 2] // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await databases.createPolygonAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
});
12 changes: 12 additions & 0 deletions docs/examples/databases/create-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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.createTransaction({
ttl: 60 // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/decrement-document-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ const result = await databases.decrementDocumentAttribute({
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
min: null // optional
min: null, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/delete-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client);
const result = await databases.deleteDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>'
documentId: '<DOCUMENT_ID>',
transactionId: '<TRANSACTION_ID>' // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/delete-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client);
const result = await databases.deleteDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/databases/delete-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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.deleteTransaction({
transactionId: '<TRANSACTION_ID>'
});
3 changes: 2 additions & 1 deletion docs/examples/databases/get-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ const result = await databases.getDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/databases/get-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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.getTransaction({
transactionId: '<TRANSACTION_ID>'
});
3 changes: 2 additions & 1 deletion docs/examples/databases/increment-document-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ const result = await databases.incrementDocumentAttribute({
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
max: null // optional
max: null, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/list-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client);
const result = await databases.listDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/databases/list-transactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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.listTransactions({
queries: [] // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ const result = await databases.updateDocument({
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {}, // optional
permissions: ["read("any")"] // optional
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
Comment on lines +15 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix invalid permissions syntax (broken quotes) and prefer Permission/Role helpers.

Use SDK helpers to avoid syntax errors and mirror recommended usage.

-    permissions: ["read("any")"], // optional
+    permissions: [sdk.Permission.read(sdk.Role.any())], // optional
     transactionId: '<TRANSACTION_ID>' // optional
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
🤖 Prompt for AI Agents
In docs/examples/databases/update-document.md around lines 15 to 16 the
permissions array uses invalid/broken inline quotes ("read("any")") and should
use the SDK Permission/Role helper functions instead; replace the string-based
permission with the SDK helper (e.g., Permission.read("any") or Role.any where
appropriate) so syntax is correct and follows recommended usage, and keep
transactionId as-is.

});
3 changes: 2 additions & 1 deletion docs/examples/databases/update-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ const result = await databases.updateDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
data: {}, // optional
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ const result = await databases.updateLineAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
default: [[1, 2], [3, 4], [5, 6]], // optional
newKey: '' // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ const result = await databases.updatePointAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
default: [1, 2], // optional
newKey: '' // optional
});
2 changes: 1 addition & 1 deletion docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ const result = await databases.updatePolygonAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
newKey: '' // optional
});
14 changes: 14 additions & 0 deletions docs/examples/databases/update-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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.updateTransaction({
transactionId: '<TRANSACTION_ID>',
commit: false, // optional
rollback: false // optional
});
3 changes: 2 additions & 1 deletion docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ const result = await databases.upsertDocument({
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"] // optional
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
Comment on lines +15 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix invalid permissions example.

"read("any")" is incorrectly quoted and will throw. In the Node SDK, we typically use helpers. Suggest:

-    permissions: ["read("any")"], // optional
+    permissions: [sdk.Permission.read(sdk.Role.any())], // optional

Alternatively, if showing raw strings, use single quotes inside: 'read("any")'.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
🤖 Prompt for AI Agents
In docs/examples/databases/upsert-document.md around lines 15 to 16, the
permissions example uses invalid quoting ("read("any")") which will throw;
update the example to use the SDK helper for read permissions (e.g., a
permissions helper function/object) or, if showing raw strings, escape/replace
the quotes correctly by using single quotes around the entire permission string
like 'read("any")' so the inner double quotes are preserved.

});
3 changes: 2 additions & 1 deletion docs/examples/databases/upsert-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client);
const result = await databases.upsertDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: []
documents: [],
transactionId: '<TRANSACTION_ID>' // optional
});
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const result = await messaging.createPush({
targets: [], // optional
data: {}, // optional
action: '<ACTION>', // optional
image: '[ID1:ID2]', // optional
image: '<ID1:ID2>', // optional
icon: '<ICON>', // optional
sound: '<SOUND>', // optional
color: '<COLOR>', // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const result = await messaging.updatePush({
body: '<BODY>', // optional
data: {}, // optional
action: '<ACTION>', // optional
image: '[ID1:ID2]', // optional
image: '<ID1:ID2>', // optional
icon: '<ICON>', // optional
sound: '<SOUND>', // optional
color: '<COLOR>', // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await tablesDB.createLineColumn({
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [[1, 2], [3, 4], [5, 6]] // optional
});
23 changes: 23 additions & 0 deletions docs/examples/tablesdb/create-operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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 tablesDB = new sdk.TablesDB(client);

const result = await tablesDB.createOperations({
transactionId: '<TRANSACTION_ID>',
operations: [
{
"action": "create",
"databaseId": "<DATABASE_ID>",
"tableId": "<TABLE_ID>",
"rowId": "<ROW_ID>",
"data": {
"name": "Walter O'Brien"
}
}
] // optional
});
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await tablesDB.createPointColumn({
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [1, 2] // optional
});
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const result = await tablesDB.createPolygonColumn({
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ const result = await tablesDB.createRow({
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
Comment on lines +21 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix invalid permissions string quoting; use Permission/Role helpers.

The current string literal is syntactically invalid in JS. Prefer the SDK helpers for clarity and type-safety.

Apply:

-    permissions: ["read("any")"], // optional
+    permissions: [sdk.Permission.read(sdk.Role.any())], // optional
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions: ["read("any")"], // optional
transactionId: '<TRANSACTION_ID>' // optional
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
🤖 Prompt for AI Agents
In docs/examples/tablesdb/create-row.md around lines 21–22, the permissions
entry uses an invalid JS string literal ("read("any")"); replace that string
with the SDK Permission/Role helper usage (call Permission.read with Role.any()
as the argument) and ensure Permission and Role are imported from the SDK; keep
transactionId as-is optional.

});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const tablesDB = new sdk.TablesDB(client);
const result = await tablesDB.createRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rows: []
rows: [],
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/tablesdb/create-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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 tablesDB = new sdk.TablesDB(client);

const result = await tablesDB.createTransaction({
ttl: 60 // optional
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/decrement-row-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ const result = await tablesDB.decrementRowColumn({
rowId: '<ROW_ID>',
column: '',
value: null, // optional
min: null // optional
min: null, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Comment on lines 15 to 18
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Don’t use null for numeric fields; omit or use a number.

value/min are number | undefined. null will be sent and likely rejected.

-    value: null, // optional
-    min: null, // optional
+    // value: 1, // optional
+    // min: 0, // optional

Optionally include them with real numbers as shown, or leave them out entirely.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
value: null, // optional
min: null // optional
min: null, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
// value: 1, // optional
// min: 0, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
🤖 Prompt for AI Agents
In docs/examples/tablesdb/decrement-row-column.md around lines 15 to 18, the
snippet uses null for numeric fields (value/min) which are typed number |
undefined and will be rejected; change the example to either omit these
properties entirely or provide numeric values (e.g., value: 1, min: 0) and keep
transactionId as optional, so remove nulls and show valid numbers or leave the
fields out.

3 changes: 2 additions & 1 deletion docs/examples/tablesdb/delete-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const tablesDB = new sdk.TablesDB(client);
const result = await tablesDB.deleteRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>'
rowId: '<ROW_ID>',
transactionId: '<TRANSACTION_ID>' // optional
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/delete-rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const tablesDB = new sdk.TablesDB(client);
const result = await tablesDB.deleteRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/tablesdb/delete-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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 tablesDB = new sdk.TablesDB(client);

const result = await tablesDB.deleteTransaction({
transactionId: '<TRANSACTION_ID>'
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/get-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ const result = await tablesDB.getRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
12 changes: 12 additions & 0 deletions docs/examples/tablesdb/get-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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 tablesDB = new sdk.TablesDB(client);

const result = await tablesDB.getTransaction({
transactionId: '<TRANSACTION_ID>'
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/increment-row-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ const result = await tablesDB.incrementRowColumn({
rowId: '<ROW_ID>',
column: '',
value: null, // optional
max: null // optional
max: null, // optional
transactionId: '<TRANSACTION_ID>' // optional
});
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/list-rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const tablesDB = new sdk.TablesDB(client);
const result = await tablesDB.listRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [] // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Loading