{"id":18554324,"url":"https://github.com/oracle/bots-node-sdk","last_synced_at":"2025-04-10T02:25:31.132Z","repository":{"id":41902086,"uuid":"143974724","full_name":"oracle/bots-node-sdk","owner":"oracle","description":"Oracle Bots Node.js SDK","archived":false,"fork":false,"pushed_at":"2024-06-13T07:55:06.000Z","size":2786,"stargazers_count":54,"open_issues_count":15,"forks_count":54,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-03T00:06:05.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://oracle.github.io/bots-node-sdk/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-08T07:09:40.000Z","updated_at":"2024-11-14T06:44:29.000Z","dependencies_parsed_at":"2023-02-13T03:15:44.735Z","dependency_job_id":"6c466e32-214d-4f4c-8073-a4bc2e3b5953","html_url":"https://github.com/oracle/bots-node-sdk","commit_stats":{"total_commits":342,"total_committers":10,"mean_commits":34.2,"dds":0.2485380116959064,"last_synced_commit":"f07617ce9e79a08353252d2cb57cb9bca2a771ff"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fbots-node-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fbots-node-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fbots-node-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fbots-node-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/bots-node-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143633,"owners_count":21054810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T21:21:20.059Z","updated_at":"2025-04-10T02:25:31.096Z","avatar_url":"https://github.com/oracle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oracle Digital Assistant Node.js SDK\n\nThis SDK is the main developer resource for [Oracle Digital Asistant](https://docs.oracle.com/en/cloud/paas/digital-assistant/index.html) integrations in a Node.js express environment. It provides two primary solutions for custom implementations against the Digital Assistant platform: \n- Creating [Custom Component Services](https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/backend-integration1.html#GUID-3F827E58-BCB2-41F2-B752-82EF9DB602CE)\n- Creating [Webhooks](https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/webhooks.html#GUID-96CCA06D-0432-4F20-8CDD-E60161F46680)\n\n\n## SDK Installation\n\nTo install the SDK globally:\n\n```text\nnpm install -g @oracle/bots-node-sdk\n```\n\nTo install the SDK locally in your current directory:\n\n```text\nnpm install @oracle/bots-node-sdk\n```\n\nWhen installed locally, use `npx @oracle/bots-node-sdk` instead of just `bots-node-sdk` to run the command-line interface (CLI) commands described in the Getting Started section.\n\n## Getting Started \n\nThis section explains the basic CLI commands to get your component service up and running. See the [CLI documentation](https://github.com/oracle/bots-node-sdk/blob/master/bin/CLI.md) for a complete list of all the arguments and options that you can configure with each command.\n\n### Create a Component Service\n\nUse the `init` command to create a component service package. For example:\n\n```text\nbots-node-sdk init PizzaService --name pizza-service \n```\n\nThis example creates a component service named `pizza-service` in a directory named `PizzaService`.\nThe component service includes one sample custom component named `helloWorld`.\n\n### Add a Custom Component to Existing Service\n\nYou use the `init component \u003cname\u003e custom` command to add a component to an existing package. For example:\n\n```text\nbots-node-sdk init component myCustomComponent custom\n```\n\nThis example creates a component of type `custom` named `myCustomComponent`. Instead of typing `custom` for the component type argument, you can type `c` as a shortcut.\n\n### Add an Entity Event Handler to Existing Service\n\nYou use the `init component \u003cname\u003e entityEventHandler` command to add an event handler to an existing package. For example:\n\n```text\nbots-node-sdk init component myEventHandler entityEventHandler\n```\n\nThis example creates a handler of type `entityEventHandler` that is named `myEventHandler`. Instead of typing `entityEventHandler` for the component type argument, you can type `e` as a shortcut.\n\n### Add an SQL Query Event Handler to Existing Service\n\nYou use the `init component \u003cname\u003e sqlQueryEventHandler` command to add an event handler to an existing package. For example:\n\n```text\nbots-node-sdk init component myEventHandler sqlQueryEventHandler\n```\n\nThis example creates a handler of type `sqlQueryEventHandler` that is named `myEventHandler`. Instead of typing `sqlQueryEventHandler` for the component type argument, you can type `s` as a shortcut.\n\n### Add an LLM Transformation Handler to Existing Service\n\nYou use the `init component \u003cname\u003e llmTransformation` command to add an event handler to an existing package. For example:\n\n```text\nbots-node-sdk init component myEventHandler llmTransformation\n```\n\nThis example creates a handler of type `LlmTransformation` that is named `myEventHandler`. Instead of typing `llmTransformation` for the component type argument, you can type `t` as a shortcut.\n\n### Add an LLM Validation \u0026 Customization Handler to Existing Service\n\nYou use the `init component \u003cname\u003e llm` command to add the event handler to an existing package. For example:\n\n```text\nbots-node-sdk init component myEventHandler llm\n```\n\nThis example creates a handler of type `LlmComponent` that is named `myEventHandler`. Instead of typing `llm` for the component type argument, you can type `l` as a shortcut.\n\n### Create a Component Service Package\n\nTo package the components, use the `pack` command. For example:\n\n```text\nbots-node-sdk pack\n```\n\nThis creates a component service package .tgz file that can be hosted as an express service, uploaded to a skill's embedded container in Digital Assistant, or uploaded to Oracle Mobile Hub.\n\n### Deploy as an External Component Service\n\nTo start a service on a local node server and host the custom component package, use the `start` command.\n\n```text\nnpm start\n```\nThis example creates a component service running on a local node server. It uses the `@oracle/bots-node-sdk` dev dependency.\n\nAlternatively, you can use this bots-node-sdk command to start the service. This command uses the global bots-node-sdk installation.\n\n```text\nbots-node-sdk service\n```\n\nTo see the metadata for all deployed components, run this cURL command:\n\n```text\ncurl -X GET localhost:3000/components\n```\n\nTo deploy to a docker container, you can use the following commands:\n\n```text\nnpm run-script docker-build\ndocker-compose up\n```\n\n### Using TypeScript\n\nThe SDK has full support for TypeScript. If you want to use TypeScript to write your custom components and event handlers, all you need to do is specify the language option when you create the component service. For example:\n\n```text\nbots-node-sdk init MyComponentService --language typescript\n```\n\nor the shorter format:\n\n```text\nbots-node-sdk init MyComponentService  -l t\n```\nThis example creates a TypeScript project in the MyComponentService directory. \n\nIf you subsequently use the `init component` command to add a component to a TypeScript project, it creates a TypeScript component instead of a JavaScript component.\n\n When run on a TypeScript project, the `service` and `pack` commands transpile all files under the `src` directory into JavaScript files in the `build` directory.\n\nThe benefit of using TypeScript over JavaScript is that it is strongly typed, so, if you use an editor like Visual Code Studio, you'll get code completion features and compile-time type checking similar to Java.\n\nSee the README.md that's created in your scaffolded TypeScript project for more information.   \n\n## More Information\n\n\u003c!--[nodoc]--\u003e\n- [Using the CLI](https://github.com/oracle/bots-node-sdk/blob/master/bin/CLI.md) - Command line capabilities to facilitate writing custom components and entity event handlers.\n- [Writing Custom Components](https://github.com/oracle/bots-node-sdk/blob/master/CUSTOM_COMPONENT.md) - Guidelines and tips for writing custom components.\n- [Writing Entity Event Handlers](https://github.com/oracle/bots-node-sdk/blob/master/ENTITY_EVENT_HANDLER.md) - Guidelines and tips for writing entity event handlers.\n- [Writing SQL Query Event Handlers](https://github.com/oracle/bots-node-sdk/blob/master/DATA_QUERY_EVENT_HANDLER.md) - Guidelines and tips for writing data query event handlers.\n- [Writing LLM Transformation Handlers](https://github.com/oracle/bots-node-sdk/blob/master/LLM_TRANSFORMATION_HANDLER.md) - Guidelines and tips for writing LLM transformation handlers.\n- [Writing LLM Validation \u0026 Customization Handlers](https://github.com/oracle/bots-node-sdk/blob/master/LLM_COMPONENT_HANDLER.md) - Guidelines and tips for writing LLM validation \u0026 customization handlers.\n- [Conversation Messaging](https://github.com/oracle/bots-node-sdk/blob/master/MESSAGE_FACTORY.md) - Creating conversation messages from custom code.\n- [Writing Webhooks](https://github.com/oracle/bots-node-sdk/blob/master/WEBHOOK.md) - Integrate with custom messaging channels using incoming/outgoing webhook.\n- [Unit Testing](https://github.com/oracle/bots-node-sdk/blob/master/testing/TESTING.md) - Unit testing facilities.\n- [Documentation](https://oracle.github.io/bots-node-sdk) - Full SDK documentation.\n- [Release Notes](https://github.com/oracle/bots-node-sdk/blob/master/RELEASE_NOTES.md) - List of new features and fixed issues for each release.\n\u003c!--[/nodoc]--\u003e\n\n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process\n\n## License\n\nCopyright © 2018-2023, Oracle and/or its affiliates. All rights reserved.\n\nThe Universal Permissive License (UPL), Version 1.0\n\n\u003c!--[nodoc]--\u003e\n[![npm version](https://badge.fury.io/js/%40oracle%2Fbots-node-sdk.svg)](https://badge.fury.io/js/%40oracle%2Fbots-node-sdk)\n[![wercker status](https://app.wercker.com/status/39bb567cbcdc92b7dcbb3a78f144102d/s/master \"wercker status\")](https://app.wercker.com/project/byKey/39bb567cbcdc92b7dcbb3a78f144102d)\n\u003c!--[/nodoc]--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fbots-node-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fbots-node-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fbots-node-sdk/lists"}