Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Bot creation utilies to @medplum/core #2799

Open
rahul1 opened this issue Sep 8, 2023 · 1 comment
Open

Move Bot creation utilies to @medplum/core #2799

rahul1 opened this issue Sep 8, 2023 · 1 comment
Labels
bots Features and fixes related to bots and automation

Comments

@rahul1
Copy link
Member

rahul1 commented Sep 8, 2023

User Driven: https://medplum.slack.com/archives/C05C5KXTPJA/p1694180812426259

Use Case

In a B2B2B use case, our medplum user is spinning up a new project for each of their customers. As part the project setup process, they would like to populate the project with a set of standard Bots.

To do this, their backend service will call the Medplum API with both the source and compiled contents of the Bot.

Proposal

Move the following functions from the CLI bot utils code into @medplum/core:

  • createBot
  • saveBot
  • deployBot

with appropriate changes to the argument. This would allow any TS backend service to programatically create Bots.

@rahul1 rahul1 added the bots Features and fixes related to bots and automation label Sep 8, 2023
@codyebberson
Copy link
Member

We should discuss this.

The utility methods referenced have dependencies on Node.js file system operations (readFileSync, etc), which gets messy in the context of @medplum/core.

I also have mixed feelings about finding the right threshold of abstraction for what we include in @medplum/core. @medplum/core is already big, and we should be judicious about when we choose to include things.

To be clear, everything in those methods is possible today. The discussion here is about what level of convenience should be included in @medplum/core.

@rahul1 rahul1 added this to the Milestone Quality milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bots Features and fixes related to bots and automation
Projects
Status: No status
Development

No branches or pull requests

2 participants