GithubHelp home page GithubHelp logo

bagelbotdev / api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 211 KB

Central API managing access to DB and handling bagelbot slack slash commands

Home Page: https://bagelbot.erwijet.com

Dockerfile 0.19% TypeScript 99.81%

api's People

Contributors

dependabot[bot] avatar erwijet avatar mstrodl avatar

Forkers

mstrodl erwijet

api's Issues

Add Cart-Resolver Gateway Page

Route: /cart-resolver/:cartGuid.

This page should provide the cartGuid as metadata and show a page directing the user to install bagelbotdev/cart-resolver.

If installed, the extension will watch for this page and redirect the user to toasttab. Otherwise, they will simply see the page prompting them to install the extension.

Add Public API Routes

Route: /v1/*

The bagelbot api should expose non-sensitive analytic data from the database over a public, REST-based api.

The following routes are proposed:

/v1/users: return all registered users: (fist name, last name, and their slack ids)
/v1/tabs: return all previous tabs where the opener mongo oid is swapped with the first_name and last_name joined with a space.
/v1/coin: return all users along with their current bryxcoin balances.

Prompt user for order confirmation before adding to tab

Currently:

Users will run /order <keywords>, and their order will be immediately added to the open tab.

Desired:

Users will run /order <keywords>, be prompted to confirm that what was pulled was correct, and then by clicking a "confirm" button, their order will be added to the open tab.

Add a clear cache command for clearing the menu-item cache

Currently:

Calls to the bagelbot.menuitems collection is cached. However, if the menu were to be updated without the deployment being restarted, the actual new items would not be updated.

Desired:

Someone with an admin slack user id will run /bbadmin clear-cache menu, which would clear the cache of the method that grabs the menu items from the database.

Add a route for menuitem database insertion

Currently:

To add a new menuitem to the database, you must either use the build-menu script, or manually connect with monosh.

Desired:

an endpoint, such as /db/insert/menuitem, would accept a token of the format <username>:<password encoded in base64. These tokens would be user specific, and they would have to contact a DB admin to get a token created for them. The endpoint would also take the menuitem spec and insert it into the database.

This would mostly be used by the menubuilder project for automatic menuitem insertion.

Add support for ordering ahead

Some people are not morning people, but still love bagels. Since the order time is usually 45+ min, it would be nice to place the order the day before and select a time to have the order ready the next day.

Bug: `yarn rollout` does not work on Apple Silicon machines

Attempts to run yarn rollout appears to work fine, but when the newly built image is ran, the container runtime throws an error about an invalid exec.

General online research has found that this issue is common among users of M1/M2 chipsets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.