Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smart-moov/plugin

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smart-moov/plugin

Base for Smart Moov plugins, available in the Smart Moov Marketplace

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@smart-moov/plugin

License: MIT

Base ES6 classes to create Smart Moov plugins, to let you connect your product to our candidates.

A Smart Moov plugin let you to create custom chatbot steps, and synchronize applications with your APIs.

🚀 Getting started

Create your repository, with public access, with a index.js file who exports an ES6 class extending our Plugin class.

import { Plugin } from '@smart-moov/plugin'

export default class MyPlugin extends Plugin {}

✅ Features

You can enable features for your plugin :

export default class MyPlugin extends Plugin {
  getFeatures () {
    return ['chatbot', 'applications']
  }
}
  • chatbot: Let the plugin add chatbot steps, to directly interact with the candidate.
  • applications: Your plugin will be called whenever we receive an application from a candidate. This will let you send the application to an external API, etc

🤖 Chatbot integration

Add custom steps to the editor

export default class MyPlugin extends Plugin {
  getChatbotStepConfiguration () {
    return {
      id: 'talk',
      name: {
        fr: 'Parler avec Dean',
        en: 'Talk with Dean'
      },
      category: 'messages',
      icon: 'comment-alt',
      configuration: {
        message: {
          type: 'text',
          i18n: true
        }
      }
    }
  }
}

More details soon.

Handle chatbot steps

export default class MyPlugin extends Plugin {
  getChatbotPublicPlugin () {
    return async ctx => {
      const name = await ctx.askText('Question ?', {
        minLength: 10
      })

      const ret = await ctx.callPrivatePlugin({
        name
      })

      console.log(ret.saved)
    }
  }

  async executeChatbotPrivatePlugin ({ name }, ctx) {
    // Save name in other tools

    return {
      saved: true
    }
  }
}

More details soon.

🪝 Hooks

You can run methods on specific events :

export default class MyPlugin extends Plugin {
  /**
   * Called when the plugin is installed on an organization.
   */
  onInstall (ctx) {
    return undefined
  }

  /**
   * Called when the plugin is uninstalled from an organization.
   */
  onUninstall (ctx) {
    return undefined
  }

  /**
   * Called when the plugin configuration is saved.
   */
  onSave (ctx) {
    return undefined
  }
}

More details soon.

FAQs

Package last updated on 04 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc