babblebots-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.85 • Public • Published

babblebots-react

Utility React components for Babblebots integration

NPM JavaScript Style Guide

Installation

Install the package via npm:

npm install babblebots-react --save

Usage

Interview Designer Component

The InterviewDesignerDialog component allows you to create and edit interview requests, configure settings, and publish interviews.

Props Overview

  • apiKey (string): Your organization's integration key provided by the Babblebots team. Required for authenticating API requests.
  • jdUrl (string): Public URL of the job description. This will be embedded in the interview request sent via WhatsApp.
  • jdText (string): Parsed text of the job description, highlighting relevant skills for the interview.
  • onPublish (function): Callback function triggered after successfully creating an interview. It receives the interview data as an argument.
  • interviewid (string, optional): The ID of the interview if you are editing an existing one.
  • isOpen (boolean): Controls whether the Interview Designer dialog is initially open.
  • setisOpen (function): Callback function to update the open/closed state of the Interview Designer dialog.
  • subcompanyid (string): ID of the sub-company (if applicable).

Example Usage

import React, { useState } from 'react'
import { Button, Stack } from '@mui/material'
import { InterviewDesignerDialog } from 'babblebots-react'
import 'babblebots-react/dist/index.css'

const App = () => {
  const [isOpen, setIsOpen] = useState(false)
  const [interviewId, setInterviewId] = useState('2584')

  return (
    <Stack
      sx={{ width: '100vw', height: '100vh' }}
      alignItems='center'
      justifyContent='center'
    >
      <Button variant='contained' onClick={() => setIsOpen(true)}>
        Create Interview
      </Button>

      <InterviewDesignerDialog
        apiKey="your_api_key"
        jdUrl="https://example.com/job-description"
        jd="<BLOB>"
        jdText="Job Description Details"
        onPublish={(data) => {
          console.log('Interview Data:', data)
          setInterviewId(data.interview_type)
        }}
        isOpen={isOpen}
        setisOpen={setIsOpen}
        interviewid={interviewId}
        subcompanyid="1234"
      />
    </Stack>
  )
}

export default App

Example Data Returned by onPublish Callback

{
  "role_name": "Technical Lead - Fullstack .NET",
  "interview_type": 580,
  // Other relevant interview data...
}

Interview Settings Component

The UpdateInterviewSettings component allows you to modify the settings of an existing interview.

Props Overview

  • apiKey (string): Integration key for authenticating API requests, provided by the Babblebots team.
  • interviewId (string): The ID of the interview, required to update its settings.
  • interviewsettingsopen (boolean): Controls whether the Interview Settings dialog is initially open.
  • setInterviewSettingsOpen (function): Callback function to toggle the open/closed state of the Interview Settings dialog.

Example Usage

import React, { useState } from 'react'
import { UpdateInterviewSettings } from 'babblebots-react'
import 'babblebots-react/dist/index.css'

const App = () => {
  const [interviewSettingsOpen, setInterviewSettingsOpen] = useState(true)

  return (
    <InterviewSettings
      apiKey="your_api_key"
      interviewId="1324"
      interviewsettingsopen={interviewSettingsOpen}
      setInterviewSettingsOpen={setInterviewSettingsOpen}
    />
  )
}

export default App

License

This project is licensed under the MIT License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.8572latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.8572
1.0.8458
1.0.8315
1.0.824
1.0.814
1.0.8015
1.0.793
1.0.783
1.0.774
1.0.764
1.0.753
1.0.743
1.0.733
1.0.723
1.0.713
1.0.703
1.0.693
1.0.683
1.0.673
1.0.663
1.0.653
1.0.643
1.0.633
1.0.623
1.0.613
1.0.603
1.0.593
1.0.583
1.0.570
1.0.560
1.0.550
1.0.540
1.0.530
1.0.520
1.0.510
1.0.500
1.0.490
1.0.480
1.0.470
1.0.460
1.0.450
1.0.440
1.0.430
1.0.420
1.0.410
1.0.400
1.0.390
1.0.380
1.0.370
1.0.360
1.0.350
1.0.340
1.0.330
1.0.320
1.0.310
1.0.300
1.0.290
1.0.280
1.0.270
1.0.260
1.0.250
1.0.240
1.0.230
1.0.220
1.0.210
1.0.200
1.0.191
1.0.180
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.100
1.0.90
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i babblebots-react

Weekly Downloads

229

Version

1.0.85

License

MIT

Unpacked Size

2.23 MB

Total Files

76

Last publish

Collaborators

  • jagjeets
  • pulkitg2002