mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-22 22:17:55 +00:00
250 lines
6.7 KiB
JSON
250 lines
6.7 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/operations.schema.json",
|
|
"title": "Appwrite datasource",
|
|
"description": "A schema defining Appwrite datasource",
|
|
"type": "api",
|
|
"defaults": {},
|
|
"properties": {
|
|
"operation": {
|
|
"label": "Operation",
|
|
"key": "operation",
|
|
"type": "dropdown-component-flip",
|
|
"description": "Single select dropdown for operation",
|
|
"list": [
|
|
{
|
|
"value": "list_docs",
|
|
"name": "List Documents"
|
|
},
|
|
{
|
|
"value": "get_document",
|
|
"name": "Get Document"
|
|
},
|
|
{
|
|
"value": "add_document",
|
|
"name": "Add Document to Collection"
|
|
},
|
|
{
|
|
"value": "update_document",
|
|
"name": "Update Document"
|
|
},
|
|
{
|
|
"value": "delete_document",
|
|
"name": "Delete Document"
|
|
}
|
|
]
|
|
},
|
|
"list_docs": {
|
|
"collectionId": {
|
|
"label": "Collection ID",
|
|
"key": "collectionId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter collection id",
|
|
"width": "320px",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter collection id"
|
|
},
|
|
"limit": {
|
|
"label": "Limit",
|
|
"key": "limit",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter limit",
|
|
"width": "320px",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins",
|
|
"placeholder": "Enter limit"
|
|
},
|
|
"order_fields": {
|
|
"label": "Order fields",
|
|
"key": "order_fields",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter field names",
|
|
"height": "100px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "{{[ 'name','age' ]}}"
|
|
},
|
|
"order_types": {
|
|
"label": "Order types",
|
|
"key": "order_types",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter respsctive order types",
|
|
"height": "100px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "{{[ 'DESC','ASC' ]}}"
|
|
},
|
|
"where_field": {
|
|
"label": "Field",
|
|
"key": "where_field",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter field",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-4",
|
|
"placeholder": "Enter field"
|
|
},
|
|
"where_operation": {
|
|
"label": "Operator",
|
|
"key": "where_operation",
|
|
"className": "col-4",
|
|
"type": "dropdown",
|
|
"description": "Single select dropdown for where operation",
|
|
"list": [
|
|
{
|
|
"value": "==",
|
|
"name": "=="
|
|
},
|
|
{
|
|
"value": "!=",
|
|
"name": "!="
|
|
},
|
|
{
|
|
"value": "<",
|
|
"name": "<"
|
|
},
|
|
{
|
|
"value": ">",
|
|
"name": ">"
|
|
},
|
|
{
|
|
"value": "<=",
|
|
"name": "<="
|
|
},
|
|
{
|
|
"value": ">=",
|
|
"name": ">="
|
|
},
|
|
{
|
|
"value": "is",
|
|
"name": "Is"
|
|
},
|
|
{
|
|
"value": "startsWith",
|
|
"name": "Starts With"
|
|
},
|
|
{
|
|
"value": "endsWith",
|
|
"name": "Ends With"
|
|
},
|
|
{
|
|
"value": "search",
|
|
"name": "Search"
|
|
},
|
|
{
|
|
"value": "",
|
|
"name": "None"
|
|
}
|
|
]
|
|
},
|
|
"where_value": {
|
|
"label": "Value",
|
|
"key": "where_value",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter value",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-4",
|
|
"placeholder": "Enter value"
|
|
}
|
|
},
|
|
"get_document": {
|
|
"collectionId": {
|
|
"label": "Collection ID",
|
|
"key": "collectionId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter collection id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter collection id"
|
|
},
|
|
"documentId": {
|
|
"label": "Document ID",
|
|
"key": "documentId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter document id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter document id"
|
|
}
|
|
},
|
|
"add_document": {
|
|
"collectionId": {
|
|
"label": "Collection ID",
|
|
"key": "collectionId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter collection id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter collection id"
|
|
},
|
|
"body": {
|
|
"label": "Body",
|
|
"key": "body",
|
|
"type": "codehinter",
|
|
"description": "Enter document body",
|
|
"height": "150px",
|
|
"editorType": "extendedSingleLine",
|
|
"placeholder": "{'name': 'John', 'age': 30}"
|
|
}
|
|
},
|
|
"update_document": {
|
|
"collectionId": {
|
|
"label": "Collection ID",
|
|
"key": "collectionId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter collection id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter collection id"
|
|
},
|
|
"documentId": {
|
|
"label": "Document ID",
|
|
"key": "documentId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter document id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter document id"
|
|
},
|
|
"body": {
|
|
"label": "Body",
|
|
"key": "body",
|
|
"type": "codehinter",
|
|
"description": "Enter document body",
|
|
"height": "150px",
|
|
"editorType": "extendedSingleLine",
|
|
"placeholder": "{'name': 'John', 'age': 30}"
|
|
}
|
|
},
|
|
"delete_document": {
|
|
"collectionId": {
|
|
"label": "Collection ID",
|
|
"key": "collectionId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter collection id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter collection id"
|
|
},
|
|
"documentId": {
|
|
"label": "Document ID",
|
|
"key": "documentId",
|
|
"type": "codehinter",
|
|
"lineNumbers": false,
|
|
"description": "Enter document id",
|
|
"height": "36px",
|
|
"className": "codehinter-plugins col-6",
|
|
"placeholder": "Enter document id"
|
|
}
|
|
}
|
|
}
|
|
}
|