1.0.2 • Published 7 months ago

@e2y/hac-client v1.0.2

Weekly downloads
50
License
MIT
Repository
github
Last release
7 months ago

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

1.0.2

7 months ago

1.0.1

7 months ago

0.0.12

2 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.1

5 years ago

0.0.2

5 years ago

0.0.1-alpha.7

6 years ago

0.0.1-alpha.6

6 years ago

0.0.1-alpha.5

6 years ago

0.0.1-alpha.0

6 years ago

0.0.1-alpha.1

6 years ago

0.1.0-alpha.12

6 years ago

0.1.0-alpha.27

6 years ago

0.1.0-alpha.25

6 years ago

0.0.1-alpha.4

6 years ago

0.1.0-alpha.24

6 years ago

0.1.0-alpha.15

6 years ago

0.1.0-alpha.11

6 years ago

0.0.1-alpha.3

5 years ago

0.0.1-alpha.2

6 years ago