
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@predictivehire/phchatbot
Advanced tools
PredictiveHire AI chatbot. You can contact PredictiveHire for more information. https://www.predictivehire.com
PredictiveHire AI chatbot. You can contact PredictiveHire for more information. https://www.predictivehire.com
In order to initiate the request correctly when developing locally, you need to add the host of app.localhost.com
Note: If you use vue-cli to create a new project, you might meet a
Invalid Host/Origin headererror when you open the page with app.localhost.com. This is because the new version of webpack-dev-server adds security verification. The hostname is checked by default. If the hostname is not in the configuration, the access will be interrupted.
Solution: Create the file vue.config.js in the root directory, and then fill in the following content:
module.exports = {
devServer: {
disableHostCheck: true,
}
}
create TestPage component
|-- TestPage
|---- TestPage.tsx
|---- style.css
// ----------------------------------- TestPage.tsx ----------------------------
import "./style.css"
import * as React from "react"
import { PHChatBot } from "@predictivehire/phchatbot"
export const TestPage = () => {
// for assessmentId you can contact PredictiveHire for more information, so do appId and region
const appId = "appId"
const assessmentId = "assessmentId"
const region = "region" // need to confirm with PredictiveHire
const env = "qa" // this one is used to decide which domain name to use to initiate an api request
const chatbotATS = new PHChatBot({
appId: appId,
region: region,
env: env,
assessmentId: assessmentId
})
// developers can add the event callback they want
chatbotATS.addCallbackHandler({
FI_ASSESSMENT_STARTED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ANSWER_SAVED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ENDED: assessmentId => {
console.info(assessmentId)
}
})
chatbotATS.setTheme({
theme: {
question: {
backgroundColor: "#ef8200",
fontColor: "#fff"
}
}
})
chatbotATS.attachTo({ selector: "#rootATS" })
return (
<div className="main">
<div className="chat-bot-box" id="rootATS" />
</div>
)
}
//-------------------------------------- style.css ----------------------------
.main {
position: relative;
text-align: center;
width: 500px;
height: 90vh;
margin: 5vh auto;
background-color: #fff;
}
.chat-bot-box {
position: relative;
z-index: 10;
width: 100%;
height: 100%;
margin: 0 auto;
background-color: #fff;
}
@media screen and (max-width: 980px) {
.chat-bot-box {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
transform: none;
}
}
<template>
<div class="main">
<div class="chat-bot-box" id="rootATS" />
</div>
</template>
<script>
import {PHChatBot} from "@predictivehire/phchatbot"
export default {
name: 'HelloWorld',
mounted: () => {
// for assessmentId you can contact PredictiveHire for more information, so do appId and region
const appId = "appId"
const assessmentId = "assessmentId"
const region = "region" // need to confirm with PredictiveHire
const env = "qa" // this one is used to decide which domain name to use to initiate an api request
const chatbotATS = new PHChatBot({
appId: appId,
region: region, // need to confirm with PredictiveHire
env: env, // this one is used to decide which domain name to use to initiate an api request
assessmentId: assessmentId
})
// developers can add the event callback they want
chatbotATS.addCallbackHandler({
FI_ASSESSMENT_STARTED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ANSWER_SAVED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ENDED: assessmentId => {
console.info(assessmentId)
}
})
chatbotATS.setTheme({
theme: {
question: {
backgroundColor: "#ef8200",
fontColor: "#fff"
}
}
})
chatbotATS.attachTo({ selector: "#rootATS" })
}
}
</script>
<style scoped>
.main {
position: relative;
text-align: center;
width: 500px;
height: 90vh;
margin: 5vh auto;
background-color: #fff;
}
.chat-bot-box {
position: relative;
z-index: 10;
width: 100%;
height: 100%;
margin: 0 auto;
background-color: #fff;
}
@media screen and (max-width: 980px) {
.chat-bot-box {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
transform: none;
}
}
</style>
<template>
<div class="main">
<div class="chat-bot-box" id="rootATS" />
</div>
</template>
<script>
let PHChatBot
if (typeof window !== 'undefined') {
// Ensure that the window object has been defined. Otherwise you will encounter window is not defined error
PHChatBot = require('@predictivehire/phchatbot')
}
export default {
name: 'HelloWorld',
mounted: () => {
// for assessmentId you can contact PredictiveHire for more information, so do appId and region
const appId = "appId"
const assessmentId = "assessmentId"
const region = "region" // need to confirm with PredictiveHire
const env = "qa" // this one is used to decide which domain name to use to initiate an api request
const chatbotATS = new PHChatBot.PHChatBot({
appId: appId,
region: region, // need to confirm with PredictiveHire
env: env, // this one is used to decide which domain name to use to initiate an api request
assessmentId: assessmentId
})
// developers can add the event callback they want
chatbotATS.addCallbackHandler({
FI_ASSESSMENT_STARTED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ANSWER_SAVED: payload => {
console.info(payload)
},
FI_ASSESSMENT_ENDED: assessmentId => {
console.info(assessmentId)
}
})
chatbotATS.setTheme({
theme: {
question: {
backgroundColor: "#ef8200",
fontColor: "#fff"
}
}
})
chatbotATS.attachTo({ selector: "#rootATS" })
}
}
</script>
<style scoped>
.main {
position: relative;
text-align: center;
width: 500px;
height: 90vh;
margin: 5vh auto;
background-color: #fff;
}
.chat-bot-box {
position: relative;
z-index: 10;
width: 100%;
height: 100%;
margin: 0 auto;
background-color: #fff;
}
@media screen and (max-width: 980px) {
.chat-bot-box {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
transform: none;
}
}
</style>
| param | desc |
|---|---|
| env | enum(local, qa, sandbox, product) For third-party developers, qa or sandbox will be good for development, and use product for online environments, different value of env will be call the apis with different domain |
| appId | string, used to retrieve cross-domain whitelist. Pls contact PredictiveHire for more information(https://www.predictivehire.com/) |
| region | string, PredictiveHire will provide API endpoint with different regions for different customers. Pls contact PredictiveHire for more information(https://www.predictivehire.com/) |
| assessmentId | This one is generate by PredictiveHire. Pls contact PredictiveHire for more information(https://www.predictivehire.com/) |
| API | definition | desc |
|---|---|---|
| attachTo | ({ selector, index }: { selector: string; index?: number; }) => void | This selector must be a valid CSS selector string. the default value of index is 0, which means when multiple qualified doms are matched, the index element in the domList should be selected |
| addCallbackHandler | (callbacks: PHChatBotCallback): => void | Developers can add the event callback they want. The callBack functions will be called in corresponding stage. You can check the PHChatBotCallback below |
| setTheme | ({ theme }: { theme: Theme; }) => void | You can use this api to customized theme color, the complete data structure is as follows |
{
hint: {
backgroundColor: string
fontColor: string
},
question: {
backgroundColor: string
fontColor: string
},
response: {
backgroundColor: string
fontColor: string
},
listItem: {
backgroundColor: string
fontColor: string
},
selectedItem: {
backgroundColor: string
fontColor: string
},
button: {
backgroundColor: string
fontColor: string
}
}
{
FI_ASSESSMENT_STARTED: (payload: {
assessmentId
chatLogs
branding
}) => void;
FI_ASSESSMENT_ANSWER_SAVED: (payload: {
assessmentId: string
question: string
answer: string
types: string[]
}) => void;
FI_ASSESSMENT_ENDED: (payload: { assessmentId: string }) => void;
}
FAQs
PredictiveHire AI chatbot. You can contact PredictiveHire for more information. https://www.predictivehire.com
The npm package @predictivehire/phchatbot receives a total of 13 weekly downloads. As such, @predictivehire/phchatbot popularity was classified as not popular.
We found that @predictivehire/phchatbot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.