From dbf951ad28f47441c7f858f43262de4553261214 Mon Sep 17 00:00:00 2001 From: Victor Algaze Date: Mon, 29 Jan 2024 19:33:26 -0800 Subject: [PATCH] Add send-a-card, typo fixes --- .gitignore | 2 +- docs/.vitepress/cache/deps/_metadata.json | 18 +-- docs/.vitepress/config.mts | 4 + docs/.vitepress/util/samples.ts | 10 +- docs/new.md | 30 ++-- docs/send-a-card.md | 162 ++++++++++++++++++++++ docs/speedycard.md | 1 - test/middleware.test.ts | 1 - 8 files changed, 203 insertions(+), 25 deletions(-) create mode 100644 docs/send-a-card.md diff --git a/.gitignore b/.gitignore index b1ec694..441d052 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ dist/ .env abc.ts .vitepress/cache -docs/.vitepress/cache/ +docs/.vitepress/cache/* coverage/ todo.md trickyoperation.ts \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json index cc3c5bc..3241c7b 100644 --- a/docs/.vitepress/cache/deps/_metadata.json +++ b/docs/.vitepress/cache/deps/_metadata.json @@ -5,55 +5,55 @@ "vue": { "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "5b5f91d7", + "fileHash": "ed6cb684", "needsInterop": false }, "vitepress > @vue/devtools-api": { "src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js", "file": "vitepress___@vue_devtools-api.js", - "fileHash": "2937291a", + "fileHash": "61356a80", "needsInterop": false }, "adaptivecards": { "src": "../../../../node_modules/adaptivecards/lib/adaptivecards.js", "file": "adaptivecards.js", - "fileHash": "3b8a82eb", + "fileHash": "9014f111", "needsInterop": true }, "element-plus": { "src": "../../../../node_modules/element-plus/es/index.mjs", "file": "element-plus.js", - "fileHash": "1764f8d9", + "fileHash": "dfe8a7e2", "needsInterop": false }, "vitepress > @vueuse/integrations/useFocusTrap": { "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs", "file": "vitepress___@vueuse_integrations_useFocusTrap.js", - "fileHash": "38ac76f9", + "fileHash": "73569296", "needsInterop": false }, "vitepress > mark.js/src/vanilla.js": { "src": "../../../../node_modules/mark.js/src/vanilla.js", "file": "vitepress___mark__js_src_vanilla__js.js", - "fileHash": "6b6e2012", + "fileHash": "7e415ee5", "needsInterop": false }, "vitepress > minisearch": { "src": "../../../../node_modules/minisearch/dist/es/index.js", "file": "vitepress___minisearch.js", - "fileHash": "e9985c6c", + "fileHash": "99b9ce67", "needsInterop": false }, "@element-plus/icons-vue": { "src": "../../../../node_modules/@element-plus/icons-vue/dist/index.js", "file": "@element-plus_icons-vue.js", - "fileHash": "f612aa88", + "fileHash": "c01f7292", "needsInterop": false }, "monaco-editor": { "src": "../../../../node_modules/monaco-editor/esm/vs/editor/editor.main.js", "file": "monaco-editor.js", - "fileHash": "20679472", + "fileHash": "1de3c3af", "needsInterop": false } }, diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index b6a5042..207c3c4 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -113,6 +113,10 @@ export default defineConfig({ text: `💻 Secure Webhooks with a "secret"`, link: "webhooks.html#securing-webhooks", }, + { + text: "✉️ Send a SpeedyCard", + link: "/send-a-card", + }, { text: "📚 API Docs", link: "/../api-docs/modules", diff --git a/docs/.vitepress/util/samples.ts b/docs/.vitepress/util/samples.ts index 3fba4df..809df50 100644 --- a/docs/.vitepress/util/samples.ts +++ b/docs/.vitepress/util/samples.ts @@ -204,11 +204,11 @@ const card = Bot.card() name: "yellow-warning", value: `const Bot = new SpeedyBot(); const card = Bot.card() -.addTitle("⚠️ You're about to do it! ⚠️") -.addText("Whatever you're about to do, give it a think") -.setBackgroundImage( - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAmCAYAAACsyDmTAAAMbWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkJDQAghICb0jUgNICaEFkF4EGyEJJJQYE4KKvSwquHYRxYquiii2lWY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gAwAEAAAAAQAAACYAAAAAQVNDSUkAAABTY3JlZW5zaG90JS99ZAAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAdRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+Mzg8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MzY8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KFcjjjAAAABxpRE9UAAAAAgAAAAAAAAATAAAAKAAAABMAAAATAAAAcerJp6AAAAA9SURBVFgJ7NKxFQAABANR9raicdSMcK3itGm8n+R0bTy69CFoQyEACoUUIgHK3ZBCJEC5G1KIBCh3QyR0AAAA//++LyCxAAAAOklEQVTt0rEVAAAEA1H2tqJx1IxwreK0abyf5HRtPLr0IWhDIQAKhRQiAcrdkEIkQLkbUogEKHdDJHT6I3s1kBzd4gAAAABJRU5ErkJggg==' -)`, + .addTitle("⚠️ You're about to do it! ⚠️") + .addText("Whatever you're about to do, give it a think") + .setBackgroundImage( + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAA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kJggg==' + )`, }, { label: "Green Success ✅", diff --git a/docs/new.md b/docs/new.md index 1cacbd6..69f02c2 100644 --- a/docs/new.md +++ b/docs/new.md @@ -1,4 +1,4 @@ -# "I'm new here" 🐣 +# Send a SpeedyCard tl;dr: SpeedyBot helps you efficiently design, deploy, and secure rich conversation systems-- especially in enterprises and large teams with complex requirements @@ -58,7 +58,7 @@ SpeedyBot does **NOT** log/persist or do anything (except what you tell it to do ## Step II: Send a Test Message with Your Access Token -- Let's test out your bot access token by sending a **[SpeedyCard](#im-new-here-🐣)** to you as a direct message (tap the 🎲 to shuffle through some examples as inspiration or write your own) +- Let's test out your bot access token by sending a **[SpeedyCard](./speedycard.md)** to you as a direct message (tap the 🎲 to shuffle through some examples as inspiration or write your own) @@ -99,7 +99,7 @@ Copy the commands below to get up and running ::: code-group ```sh-vue [🥺 New (recommended)] -npm init speedybot setup {{ store.state.tokenValid ? `--token ${store.state.token} ` : '' }}--project default +npx speedybot setup {{ store.state.tokenValid ? `--token ${store.state.token} ` : '' }}--project default ``` ```sh-vue [👹 Experienced] @@ -114,13 +114,15 @@ npm run bot:setup {{ store.state.tokenValid ? store.state.token : '__ACCESS__TOK ::: details Getting errors? -If you see an error like `npm: command not found` you probably need to install node or compatible runtime (like **[bun](https://bun.sh)** or **[deno](https://deno.com)**) onto your system. +If you see an error like `npm: command not found` you probably need to install node or a compatible runtime onto your system. There are many ways to do this, but two easy ways: -Option 1. Download + install Node from the official site: **[https://nodejs.org/en/download](https://nodejs.org/en/download)** +**Option 1** Download + install Node from the official site: **[https://nodejs.org/en/download](https://nodejs.org/en/download)** -Option 2. Download with **[Volta](https://docs.volta.sh/guide/)** in the terminal +or + +**Option 2** Download with **[Volta](https://docs.volta.sh/guide/)** in the terminal ```sh curl https://get.volta.sh | bash @@ -128,7 +130,19 @@ curl https://get.volta.sh | bash volta install node ``` -However you set up your system, make sure to run `node -v` in your terminal to verify node is correctly installed and you can take advantage of its rich ecoysten +However you set up your system, make sure to run `node -v` in your terminal to verify node is correctly installed and you can get up and running with `npx speedybot setup --project default`: + + ::: @@ -150,7 +164,7 @@ You can now customize this bot however you want by editing the file **[settings/ -You can turn off your bot by press **CTRL-C** +You can turn off your bot by holding down **CTRL-C** on your keyboard or exiting the terminal Whether you're just starting out on your conversation design journey or a seasoned pro, SpeedyBot has you covered for crafting bots that can do it all-- securely integrate w/ LLMs + content management systems, **[process file-uploads](./patterns.md#handle-file-uploads)**, **[segment content based on user data + behavior](./patterns.md#restrict-access-pattern)**, create + manage **[SpeedyCards](./speedycard.md)**, ask for a user's location in a privacy-respecting way, and much more. diff --git a/docs/send-a-card.md b/docs/send-a-card.md new file mode 100644 index 0000000..76a9673 --- /dev/null +++ b/docs/send-a-card.md @@ -0,0 +1,162 @@ +--- +# layout: home +outline: deep +--- + +# 🌟 Send a SpeedyCard + +SpeedyCards make it speedy and easy for your WebEx bots to send beautifully formatted **[Adaptive Cards](https://developer.webex.com/docs/buttons-and-cards)** without having to wrangle with JSON + +But did you know that there's a nifty way to send a SpeedyCard using your own account instead of your bot's? It's easy-as-pie 🥧 and you can do it right from this page + + + +## Step I: Grab Your Personal Access Token + +Login and copy your personal access token here: **[https://developer.webex.com/docs/getting-your-personal-access-token](https://developer.webex.com/docs/getting-your-personal-access-token)** + +Heads up-- unlike a **[bot token](https://developer.webex.com/my-apps/new/bot)**, a personal access token will automatically self-destruct after 12 hours + +## Step II: Validate Your Token + +Once you've got your token, pop it into the box below to validate it & review your bot's details + + + +## Step III: Send a SpeedyCard! 🚀 + + + + + +{{ showJSON ? 'Hide JSON Output' : 'Show JSON Output' }} + +The box above is "live" & has typing hints so you can dive in and get started writing SpeedyCards. If you need some inspiration, press the dice 🎲 button button to cycle through some sample SpeedyCards. You can send the card to a specific person or a room + + + + + + +```json-vue +{{ typeof jsonData === 'object' ? JSON.stringify(jsonData, null, 2) : jsonData }} +``` + + + + + + + + + + + + +## (optional) Step IV: Make a Bot to Collect Data from your Cards + + + +- You may have noticed that if you tried to submit any data back from a card-- nothing happens + +- In fact, any user interaction with a card sent from {{ store.state.userData?.emails[0] ?? 'your account'}} right now results in icy radio silence, the data doesn't "go" anywhere + +- If you want to collect the data from a SpeedyCard, you'll need a SpeedyBot for that. You can set one up in about 20 seconds (really) by **[clicking here](./new.md)** + + + + diff --git a/docs/speedycard.md b/docs/speedycard.md index d8bbb09..5d3e734 100644 --- a/docs/speedycard.md +++ b/docs/speedycard.md @@ -103,7 +103,6 @@ const initParent = (editor) => { } pageReady.value = true - console.log("##pageReady.value", pageReady.value) } const handleSelected = (codeSnippet) => { if (editorRef) { diff --git a/test/middleware.test.ts b/test/middleware.test.ts index 0acdb84..ee76e72 100644 --- a/test/middleware.test.ts +++ b/test/middleware.test.ts @@ -10,7 +10,6 @@ describe("Various Messages", () => { // text passes through inst.addStep(async ($) => { - console.log("beer"); expect($.text).toBe("beer"); return $.next; });