From d03399f24f8a673dc8099572546f964730c27c87 Mon Sep 17 00:00:00 2001 From: balzack Date: Tue, 2 Jul 2024 19:33:20 -0700 Subject: [PATCH] linking sample bot to sdk --- app/client/bot/package.json | 1 + app/client/bot/src/index.ts | 10 +++++++++- app/client/bot/yarn.lock | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/client/bot/package.json b/app/client/bot/package.json index 9697e0e6..ba2ab0bd 100644 --- a/app/client/bot/package.json +++ b/app/client/bot/package.json @@ -31,6 +31,7 @@ "ts-node": "^10.9.2" }, "dependencies": { + "databag-client-sdk": "^0.0.14", "typescript": "^5.5.3" } } diff --git a/app/client/bot/src/index.ts b/app/client/bot/src/index.ts index 3e4b36d1..7b4f82ca 100644 --- a/app/client/bot/src/index.ts +++ b/app/client/bot/src/index.ts @@ -1 +1,9 @@ -console.log("Databag Bot") +import { DatabagSDK } from 'databag-client-sdk'; + +const run = async () => { + const sdk = new DatabagSDK(null); + const bot = await sdk.automate(); + console.log(bot); +} + +run(); diff --git a/app/client/bot/yarn.lock b/app/client/bot/yarn.lock index 873286b1..24a1ccd7 100644 --- a/app/client/bot/yarn.lock +++ b/app/client/bot/yarn.lock @@ -196,6 +196,11 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" +databag-client-sdk@^0.0.14: + version "0.0.14" + resolved "https://registry.yarnpkg.com/databag-client-sdk/-/databag-client-sdk-0.0.14.tgz#4c6520a4dc7695934c1426d363d3063de8449276" + integrity sha512-bG9hyN5FBG/vYhLBhIX/5G15X5KMNCs7aNVz7HHPfnzTsbqeC1Zin6+bZEIvWXlfkvScfzWQUouimSXeu1jm/A== + debug@^4: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" @@ -442,6 +447,7 @@ simple-update-notifier@^2.0.0: semver "^7.5.3" "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: + name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -460,6 +466,7 @@ string-width@^5.0.1, string-width@^5.1.2: strip-ansi "^7.0.1" "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + name strip-ansi-cjs version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==