@quillsql/node 0.3.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,49 @@
1
1
  // Write a simple node server to test the SDK
2
2
 
3
3
  import express from "express";
4
- import Quill from "../../src/index";
5
4
  import cors from "cors";
6
5
 
7
6
  const app = express();
8
- const port = 3000;
7
+ const port = 3001;
9
8
 
10
- const quill = new Quill(
11
- process.env.QUILL_PRIVATE_KEY as string,
12
- process.env.DB_URL as string,
13
- {}
14
- );
9
+ // postgresqlConfigExample {
10
+ // connectionString: process.env.DB_URL,
11
+ // ssl: {
12
+ // rejectUnauthorized: false,
13
+ // },
14
+ // };
15
+
16
+ // bigqueryConfigExample {
17
+ // projectId: process.env.PROJECT_ID,
18
+ // credentials: serviceAccount // You need to make the serviceAccount JSON
19
+ // }
20
+
21
+ // snowflakeConfigExample {
22
+ // account: process.env.ACCOUNT,
23
+ // username: process.env.USERNAME,
24
+ // password: process.env.PASSWORD,
25
+ // warehouse: process.env.WAREHOUSE,
26
+ // database: process.env.DATABASE,
27
+ // }
28
+
29
+ // mysqlConfigExample {
30
+ // host: process.env.HOST,
31
+ // user: process.env.USER,
32
+ // password: process.env.PASSWORD,
33
+ // database: process.env.DATABASE,
34
+ // }
35
+
36
+ const quill = require("../../src/index")({
37
+ privateKey: process.env.PRIVATE_KEY,
38
+ databaseConnectionString: process.env.DB_URL,
39
+ // databaseConfig: {
40
+ // connectionString: process.env.DB_URL,
41
+ // ssl: {
42
+ // rejectUnauthorized: false,
43
+ // },
44
+ // },
45
+ databaseType: process.env.DB_TYPE,
46
+ });
15
47
 
16
48
  app.use(cors());
17
49
  app.use(express.json());
@@ -21,10 +53,9 @@ app.get("/", (req, res) => {
21
53
  });
22
54
 
23
55
  app.post("/quill", async (req, res) => {
24
- const organizationId = req.body.orgId;
25
56
  const { metadata } = req.body;
26
57
  const result = await quill.query({
27
- orgId: organizationId,
58
+ orgId: metadata.orgId,
28
59
  metadata,
29
60
  });
30
61
  res.send(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/node",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "description": "Quill's client SDK for node backends.",
5
5
  "main": "dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -18,6 +18,7 @@
18
18
  "@types/jest": "^29.5.11",
19
19
  "@types/node": "^20.10.7",
20
20
  "@types/pg": "^8.10.9",
21
+ "@types/snowflake-sdk": "^1.6.20",
21
22
  "cors": "^2.8.5",
22
23
  "express": "^4.18.2",
23
24
  "jest": "^29.7.0",
@@ -26,10 +27,13 @@
26
27
  "typescript": "^5.3.3"
27
28
  },
28
29
  "dependencies": {
30
+ "@google-cloud/bigquery": "^7.4.0",
29
31
  "axios": "^1.6.5",
30
32
  "dotenv": "^16.3.1",
33
+ "mysql2": "^3.9.1",
31
34
  "pg": "^8.11.3",
32
35
  "redis": "^4.6.12",
36
+ "snowflake-sdk": "^1.9.3",
33
37
  "ts-jest": "^29.1.1"
34
38
  }
35
- }
39
+ }