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

@myinterview/global-api-sdk

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@myinterview/global-api-sdk

SDK to access myInterview Global API

  • 1.0.432
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

myInterview - GlobalAPI SDK

Write a project description

[![NPM Version][npm-image]][npm-url]

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

Install

npm i @myinterview/global-api-sdk

Usage

Basic configuration

import { GlobalApi } from '@myinterview/global-api-sdk';

GlobalApi.setConfig({
  secret: 'yoursecret',
  companyId: 'yourcompanyid',
  accessKey: 'youraccesskey',
});

To use the SDK you have to set the configuration with the keys provided by myinterview prior use of the classes.

Responses (Regular/Error)

Standard Response
interface IApiResponseObj<T = any> {
  statusCode: number;
  errorCode: number;
  statusReason: string;
  callId: string;
  data?: T;
  time: Date | number;
}

This is the response object you will receive from the SDK the content of data will change based on your request.

Standard Error Response
export interface IApiErrorObj {
  errorMessage: string | ValidationError[];
  errorDetails?: string;
  statusCode: number;
  errorCode: number;
  statusReason: string;
  callId?: string;
  time: Date | number;
}

This is the error response object you will receive from the SDK.

GACandidates

createBulkCandidates

import { GACandidates } from '@myinterview/global-api-sdk';

await GACandidates.createBulkCandidates(body: {
  job_id?: string;
  communication?: boolean;
  deadlineDate?: Date | string | number;
  timezoneForInvite?: string;
  candidates: {
    username?: string;
    email: string;
    phone?: string;
    status?: string;
    reminders?: {
      Content: string;
      companyName: string;
      greetings?: string;
      isSent: boolean;
      reminderDate: Date | string;
      timezone: string;
    }[];
    type?: string;
    candidate_id?: string;
    apiKey?: string;
    jobTitle?: string;
    urlStart?: string;
  }[];
})

This call will create one or more candidates and connect them to your Job.

updateCandidate

import { GACandidates } from '@myinterview/global-api-sdk';

await GACandidates.updateCandidate(body: {
  id: string; // You have to provide the id of the candidate
  status?: string;
  username?: string;
  deadline?: string | Date | number;
  timezoneForInvite?: string;
  location?: string;
})

Authors

  • Dvd1109

FAQs

Package last updated on 20 Oct 2021

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