Appwrite integration (#2589)

* Started working on appwrite plugin
    - Initialized appwrite plugin
    - Added appwrite npm module
    - Implemented appwrite authentication
    - Working on operations

* Implemented some operations
- Only query collection left

* added query collection operation

* Added appwrite logo

* Edited docs of appwrite

* Edited some fields descriptions and placeholder texts

* Made some code changes
- Replaced JSON with JSON5
- Removed unwanted list option

* Fixed integer conversion bug
- Refactored some code

* Removed unrelated dependencies
This commit is contained in:
Muhsin Shah C P 2022-03-29 19:52:26 +05:30 committed by GitHub
parent 7c6f8dae74
commit 9706de80cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 944 additions and 0 deletions

View file

@ -0,0 +1,40 @@
---
sidebar_position: 4
---
# Appwrite Database
## Supported operations
1. List documents
2. Get document
3. Create document
4. Update document
5. Delete document
6. Bulk update using document id
## Connection
ToolJet connects to your Appwrite app using :
- Host (API endpoint)
- Project ID
- Secret key
To generate a new secret key and get another credentials, go to your perticular project settings page
You should also set scopes for access perticular resources.
[Read More about API keys and scopes](https://appwrite.io/docs/keys).
Once the credentails are available, click on `+` button of data sources panel at the left-bottom corner of the app editor. Select Appwrite from the modal that pops up. Provide credentails. Click on 'Test connection' button to verify if the service account can access Appwrite from ToolJet server. Click on 'Save' button to save the datasource.
<img class="screenshot-full" src="/img/datasource-reference/appwrite/appwrite-init.gif" alt="ToolJet - Data source - Appwrite" height="420" />
## Querying Appwrite
Click on `+` button of the query manager at the bottom panel of the editor and select the database added in the previous step as the data source.
<img class="screenshot-full" src="/img/datasource-reference/appwrite/appwrite-query.gif" alt="ToolJet - Appwrite Query" height="420"/>
Select the operation that you want to perform on Appwrite database and click 'Save' to save the query.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
:::

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

View file

@ -9,6 +9,7 @@
"version": "0.0.1",
"dependencies": {
"@tooljet-plugins/airtable": "file:packages/airtable",
"@tooljet-plugins/appwrite": "file:packages/appwrite",
"@tooljet-plugins/bigquery": "file:packages/bigquery",
"@tooljet-plugins/common": "file:packages/common",
"@tooljet-plugins/couchdb": "file:packages/couchdb",
@ -4494,6 +4495,10 @@
"resolved": "packages/airtable",
"link": true
},
"node_modules/@tooljet-plugins/appwrite": {
"resolved": "packages/appwrite",
"link": true
},
"node_modules/@tooljet-plugins/bigquery": {
"resolved": "packages/bigquery",
"link": true
@ -12196,6 +12201,36 @@
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==",
"optional": true
},
"node_modules/node-appwrite": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/node-appwrite/-/node-appwrite-5.0.0.tgz",
"integrity": "sha512-VJ9e5+ra+ycQS17C0aJMbVXK4Gcja6at+f2EzlRlsjxAzTMetb79QJBOO6ktMtmVrUkAieMnaMZcV1hPppERmg==",
"dependencies": {
"axios": "^0.25.0",
"form-data": "^4.0.0"
}
},
"node_modules/node-appwrite/node_modules/axios": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
"dependencies": {
"follow-redirects": "^1.14.7"
}
},
"node_modules/node-appwrite/node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/node-fetch": {
"version": "2.6.7",
"license": "MIT",
@ -16449,6 +16484,14 @@
"rimraf": "^3.0.2"
}
},
"packages/appwrite": {
"version": "1.0.0",
"dependencies": {
"@tooljet-plugins/common": "file:../common",
"node-appwrite": "^5.0.0",
"react": "^17.0.2"
}
},
"packages/bigquery": {
"name": "@tooljet-plugins/bigquery",
"version": "1.0.0",
@ -20210,6 +20253,14 @@
"rimraf": "^3.0.2"
}
},
"@tooljet-plugins/appwrite": {
"version": "file:packages/appwrite",
"requires": {
"@tooljet-plugins/common": "file:../common",
"node-appwrite": "^5.0.0",
"react": "^17.0.2"
}
},
"@tooljet-plugins/bigquery": {
"version": "file:packages/bigquery",
"requires": {
@ -25670,6 +25721,35 @@
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==",
"optional": true
},
"node-appwrite": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/node-appwrite/-/node-appwrite-5.0.0.tgz",
"integrity": "sha512-VJ9e5+ra+ycQS17C0aJMbVXK4Gcja6at+f2EzlRlsjxAzTMetb79QJBOO6ktMtmVrUkAieMnaMZcV1hPppERmg==",
"requires": {
"axios": "^0.25.0",
"form-data": "^4.0.0"
},
"dependencies": {
"axios": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
"requires": {
"follow-redirects": "^1.14.7"
}
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"node-fetch": {
"version": "2.6.7",
"requires": {

View file

@ -19,6 +19,7 @@
},
"dependencies": {
"@tooljet-plugins/airtable": "file:packages/airtable",
"@tooljet-plugins/appwrite": "file:packages/appwrite",
"@tooljet-plugins/bigquery": "file:packages/bigquery",
"@tooljet-plugins/common": "file:packages/common",
"@tooljet-plugins/couchdb": "file:packages/couchdb",

4
plugins/packages/appwrite/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
node_modules
lib/*.d.*
lib/*.js
lib/*.js.map

View file

@ -0,0 +1,4 @@
# Appwrite
Documentation on: https://docs.tooljet.com/docs/data-sources/appwrite

View file

@ -0,0 +1,7 @@
'use strict';
const appwrite = require('../lib');
describe('appwrite', () => {
it.todo('needs tests');
});

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,91 @@
import { QueryError, QueryResult, QueryService, ConnectionTestResult } from '@tooljet-plugins/common';
import { SourceOptions, QueryOptions } from './types';
import sdk from 'node-appwrite';
import { bulkUpdate, createDocument, deleteDocument, getDocument, queryCollection, updateDocument } from './operations';
const JSON5 = require('json5');
export default class Appwrite implements QueryService {
async run(sourceOptions: SourceOptions, queryOptions: QueryOptions, dataSourceId: string): Promise<QueryResult> {
const database = await this.getConnection(sourceOptions);
const operation = queryOptions.operation;
const body = this.returnObject(queryOptions.body);
let result = {};
try {
switch (operation) {
case 'list_docs':
result = await queryCollection(
database,
queryOptions.collectionId,
queryOptions.limit,
queryOptions.order_fields,
queryOptions.order_types,
queryOptions.where_field,
queryOptions.where_operation,
queryOptions.where_value
);
break;
case 'get_document':
result = await getDocument(database, queryOptions.collectionId, queryOptions.documentId);
break;
case 'add_document':
result = await createDocument(database, queryOptions.collectionId, body);
break;
case 'update_document':
result = await updateDocument(database, queryOptions.collectionId, queryOptions.documentId, body);
break;
case 'delete_document':
result = await deleteDocument(database, queryOptions.collectionId, queryOptions.documentId);
break;
case 'bulk_update':
result = await bulkUpdate(
database,
queryOptions.collectionId,
this.returnObject(queryOptions.records),
queryOptions['document_id_key']
);
break;
}
} catch (error) {
throw new QueryError('Query could not be completed', error.message, {});
}
return {
status: 'ok',
data: result,
};
}
private returnObject(data: any) {
if (!data) {
return {};
}
return typeof data === 'string' ? JSON5.parse(data) : data;
}
async getConnection(sourceOptions: SourceOptions, _options?: object): Promise<sdk.Database> {
const { host, secret_key, project_id } = sourceOptions;
const client = new sdk.Client();
client
.setEndpoint(host) // Your API Endpoint
.setProject(project_id) // Your project ID
.setKey(secret_key); // Your secret API key;
return new sdk.Database(client);
}
async testConnection(sourceOptions: SourceOptions): Promise<ConnectionTestResult> {
const databaseClient = await this.getConnection(sourceOptions);
if (!databaseClient) {
throw new Error('Invalid credentials');
}
await databaseClient.listCollections();
return {
status: 'ok',
};
}
}

View file

@ -0,0 +1,44 @@
{
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
"title": "Appwrite datasource",
"description": "A schema defining Appwrite datasource",
"type": "api",
"source": {
"name": "Appwrite",
"kind": "appwrite",
"exposedVariables": {
"isLoading": false,
"data": {},
"rawData": {}
},
"options": {
"secret_key":{
"encrypted":true
}
}
},
"defaults": {},
"properties": {
"host": {
"label": "Host",
"key": "host",
"type": "text",
"description": "Appwrite database host/endpoint"
},
"project_id": {
"label": "Project ID",
"key": "project_id",
"type": "text",
"description": "Appwrite project id"
},
"secret_key": {
"label": "Secret Key",
"key": "secret_key",
"type": "textarea",
"encrypted": true,
"description": "Enter api key secret for appwrite account"
}
},
"required": ["host","secret_key","project_id"]
}

View file

@ -0,0 +1,267 @@
{
"$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": "bulk_update",
"name": "Bulk update using document id"
},
{
"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": "",
"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"
}
},
"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"
}
},
"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"
}
},
"bulk_update": {
"collectionId": {
"label": "Collection ID",
"key": "collectionId",
"type": "codehinter",
"lineNumbers": false,
"description": "Enter collection id",
"width": "320px",
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Enter collection id"
},
"document_id_key": {
"label": "Key for document Id",
"key": "document_id_key",
"type": "codehinter",
"lineNumbers": false,
"description": "Enter key for document Id",
"width": "320px",
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Enter key for document Id"
},
"records": {
"label": "Records",
"key": "records",
"type": "codehinter",
"mode": "javascript",
"description": "Enter records",
"height": "150px"
}
}
}
}

View file

@ -0,0 +1,88 @@
import { Database, Query } from 'node-appwrite';
function computeValue(value: string) {
const numConverted = Number.parseInt(value);
return isNaN(numConverted) ? value : numConverted;
}
export async function queryCollection(
db: Database,
collection: string,
limit: number,
order_fields: string[],
order_types: string[],
where_field: string,
where_operation: string,
where_value: any
): Promise<object> {
const limitProvided = isNaN(limit) !== true;
let queryString: string;
where_value = computeValue(where_value);
switch (where_operation) {
case '==':
queryString = Query.equal(where_field, where_value);
break;
case '!=':
queryString = Query.notEqual(where_field, where_value);
break;
case '<':
queryString = Query.lesser(where_field, where_value);
break;
case '>':
queryString = Query.greater(where_field, where_value);
break;
case '>=':
queryString = Query.greaterEqual(where_field, where_value);
break;
case '<=':
queryString = Query.lesserEqual(where_field, where_value);
break;
}
return await db.listDocuments(
collection,
queryString ? [queryString] : [],
limitProvided ? limit : 25,
0,
null,
null,
order_fields,
order_types
);
}
export async function getDocument(db: Database, collectionId: string, documentId: string): Promise<object> {
return await db.getDocument(collectionId, documentId);
}
export async function createDocument(db: Database, collectionId: string, body: object): Promise<object> {
return await db.createDocument(collectionId, 'unique()', body);
}
export async function updateDocument(
db: Database,
collectionId: string,
documentId: string,
body: object
): Promise<object> {
return await db.updateDocument(collectionId, documentId, body);
}
export async function deleteDocument(db: Database, collectionId: string, documentId: string): Promise<object> {
return await db.deleteDocument(collectionId, documentId);
}
export async function bulkUpdate(
db: Database,
collectionId: string,
records: Array<object>,
documentIdKey: string
): Promise<object> {
for (const record of records) {
const documentId = record[documentIdKey];
await db.updateDocument(collectionId, documentId, record);
}
return { message: 'Docs are being updated' };
}

View file

@ -0,0 +1,19 @@
export type SourceOptions = {
host: string;
project_id: string;
secret_key: string;
};
export type QueryOptions = {
operation: string;
collectionId: string;
limit: number;
documentId: string;
body: any;
document_id_key: string;
records: Array<object>;
order_fields: string[];
order_types: string[];
where_field: string;
where_operation: string;
where_value: string;
};

View file

@ -0,0 +1,255 @@
{
"name": "@tooljet-plugins/appwrite",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@tooljet-plugins/appwrite",
"version": "1.0.0",
"dependencies": {
"@tooljet-plugins/common": "file:../common",
"node-appwrite": "^5.0.0",
"react": "^17.0.2"
}
},
"../common": {
"version": "1.0.0",
"dependencies": {
"react": "^17.0.2",
"rimraf": "^3.0.2"
}
},
"node_modules/@tooljet-plugins/common": {
"resolved": "../common",
"link": true
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/axios": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
"dependencies": {
"follow-redirects": "^1.14.7"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
"bin": {
"loose-envify": "cli.js"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-appwrite": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/node-appwrite/-/node-appwrite-5.0.0.tgz",
"integrity": "sha512-VJ9e5+ra+ycQS17C0aJMbVXK4Gcja6at+f2EzlRlsjxAzTMetb79QJBOO6ktMtmVrUkAieMnaMZcV1hPppERmg==",
"dependencies": {
"axios": "^0.25.0",
"form-data": "^4.0.0"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/react": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
},
"engines": {
"node": ">=0.10.0"
}
}
},
"dependencies": {
"@tooljet-plugins/common": {
"version": "file:../common",
"requires": {
"react": "^17.0.2",
"rimraf": "^3.0.2"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"axios": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
"requires": {
"follow-redirects": "^1.14.7"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
},
"node-appwrite": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/node-appwrite/-/node-appwrite-5.0.0.tgz",
"integrity": "sha512-VJ9e5+ra+ycQS17C0aJMbVXK4Gcja6at+f2EzlRlsjxAzTMetb79QJBOO6ktMtmVrUkAieMnaMZcV1hPppERmg==",
"requires": {
"axios": "^0.25.0",
"form-data": "^4.0.0"
}
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"react": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
}
}
}

View file

@ -0,0 +1,24 @@
{
"name": "@tooljet-plugins/appwrite",
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1",
"build": "tsc -b",
"clean": "rimraf ./dist && rimraf tsconfig.tsbuildinfo"
},
"homepage": "https://github.com/tooljet/tooljet#readme",
"dependencies": {
"@tooljet-plugins/common": "file:../common",
"node-appwrite": "^5.0.0",
"react": "^17.0.2"
}
}

View file

@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "lib"
},
"exclude": [
"node_modules",
"dist"
]
}