Socket
Book a DemoInstallSign in
Socket

@or-sdk/hitl

Package Overview
Dependencies
Maintainers
2
Versions
667
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@or-sdk/hitl

``` $ npm i @or-sdk/hitl ```

0.34.57-beta.3222.0
npmnpm
Version published
Maintainers
2
Created
Source

Installation:

$ npm i @or-sdk/hitl

Usage (except migrations API)

Example for flow

const HitlApi = require('@or-sdk/hitl').HITL;

// with direct api url
const hitlApi = new HitlApi({
  token: `FLOW ${this.config.flowToken}`,
  hitlUrl: this.config.env.HITL_API_URL,
});

// with service discovery(slower)
const hitlApi = new HitlApi({
  token: `FLOW ${this.config.flowToken}`,
  discoveryUrl: this.config.env.SERVICE_DISCOVERY_API_URL,
});

const contactRuleGroupsList = await hitlApi.contactRuleGroups.searchContactRuleGroups();

After when you initialize the HitL Api, various entities are available at your service with which you can work (all entities presented in api folder )

Examples

Basic usage

const HitlApi = require('@or-sdk/hitl').HITL;

const { agents, cannedMessages, filters, ... } = new HitlApi(...);
const agentsList = await agents.getAgents();
const cannedMessages = cannedMessages.getCannedMessages({ id });

Usage for HitL migrations API

Example for flow

const HitlMigrationsApi = require('@or-sdk/hitl').EKS;

// with direct api url
const hitlMigrationsApi = new HitlEksApi({
  token: `FLOW ${this.config.flowToken}`,
  hitlEksUrl: 'https://hitl.svc.<client-env>.api.onereach.ai',
});

// with service discovery(slower)
const hitlMigrationsApi = new HitlEksApi({
  token: `FLOW ${this.config.flowToken}`,
  discoveryUrl: this.config.env.SERVICE_DISCOVERY_API_URL,
});

await hitlMigrationsApi.migrations.runAllMigrations();
const status = await hitlMigrationsApi.migrations.getRunMigrationsStatus();

FAQs

Package last updated on 27 Dec 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.