Socket
Book a DemoInstallSign in
Socket

@e2y/hac-client

Package Overview
Dependencies
Maintainers
6
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@e2y/hac-client

> TODO: description

1.0.2
latest
Source
npmnpm
Version published
Maintainers
6
Created
Source

hac-client

The hac-client is a utility to interact with the Hybris Administration Console (HAC) programmatically. It provides methods to authenticate, execute flexible search queries, and perform other administrative tasks.

Installing

Using npm:

$ npm install @e2y/hac-client

Usage

const { HACClient } = require('@e2y/hac-client');

const baseUrl = 'https://localhost:9002/hac';
const credentials = { username: 'admin', password: '1234' };

const hacClient = HACClient.create(baseUrl, credentials);

API

Creates a new instance of HACClient and authenticates with the provided credentials.

const hacClient = await HACClient.create(baseUrl, { username, password })

Executes a flexible search query and returns the results.

await hacClient.executeFlexibleSearch(query)

Example

import { FlexibleSearchResponse, HACClient } from '@e2y/hac-client';

const baseUrl: string = 'https://localhost:9002/hac';
const credentials = {username: 'admin', password: '1234'};

async function main() {
  const hacClient: HACClient = await HACClient.create(baseUrl, credentials);

  const query: string = 'SELECT * FROM Product';
  const response: FlexibleSearchResponse = await hacClient.executeFlexibleSearch(query);
  console.log('Flexible Search Response:', response);
  
}

Running cron jobs

const cronJobCode: string = 'testCronJob';
const response  = await hacClient.runCronJob(cronJobCode);

For local development fetch does not allow https insecure SSL certs or http connection to avoid issues set NODE_TLS_REJECT_UNAUTHORIZED=0in your env parameters

FAQs

Package last updated on 24 Mar 2025

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.