
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@dotdev/harmony-sdk
Advanced tools
Harmony SDK is a TypeScript library for interacting with the Harmony API. It provides a set of modules to perform various operations such as authentication, stock lookup, stock level lookup, point of sale operations, carrier management, diary management, and gift voucher handling.
To install the Harmony SDK, use the following command:
npm install @dotdev/harmony-sdk
or if you're using pnpm:
pnpm add @dotdev/harmony-sdk
Here's a basic example of how to use the Harmony SDK:
import { HarmonyAPI, AuthenticationToken } from "@dotdev/harmony-sdk";
const api = new HarmonyAPI("https://your-harmony-api-url.com");
async function main() {
const authToken: AuthenticationToken = {
// Fill in your authentication details
};
try {
const sessionId = await api.authenticate(authToken);
console.log("Authenticated successfully. Session ID:", sessionId);
// Example: Perform a stock lookup
const stockLookupParams = {
// Fill in your stock lookup parameters
};
const stockResults = await api.stockLookup(stockLookupParams, sessionId);
console.log("Stock lookup results:", stockResults);
// Use other methods as needed...
} catch (error) {
console.error("Error:", error);
}
}
main();
To set up the development environment:
Clone the repository:
git clone git@bitbucket.org:dotcollectiveanz/harmony-sdk.git
cd harmony-sdk
Install dependencies:
pnpm install
Build the project:
pnpm run build
Run tests:
pnpm test
To watch for changes during development:
pnpm run watch
The Harmony SDK implements the following endpoints:
Authentication
authenticate(authToken: AuthenticationToken): Promise<string>Stock Lookup Module
stockLookup(params: StockLookupRequestParams, sessionId: string): Promise<Stock[]>stockCategoryLookup(sessionId: string): Promise<StockCategory[]>stockBarcodeLookup(params: StockLookupRequestParams, sessionId: string): Promise<StockBarcode[]>stockColorLookup(sessionId: string): Promise<StockColor[]>sizeGridLookup(sessionId: string): Promise<SizeGrid[]>stockClassificationLookup(sessionId: string, searchType?: StockClassificationType): Promise<StockClassification[]>Stock Level Lookup Module
warehouseLookup(sessionId: string): Promise<Warehouse[]>stockLevelLookup(params: StockLevelLookupQueryParams, sessionId: string): Promise<StockLevel[]>stockLevelLookupByWarehouseQuickView(params: StockLevelLookupQueryParams, sessionId: string): Promise<StockLevel[]>Point of Sale Module
processSalesOrder(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>Carrier Module
getCarrier(sessionId: string): Promise<Carrier[]>getCarrierShipmentByOrderNo(orderNo: string, sessionId: string): Promise<CarrierShipment[]>getCarrierBySysTime(params: GetCarrierShipmentByTimeQueryParams, sessionId: string): Promise<CarrierShipment[]>Diary Module
getDiaryBy(params: GetDiaryQueryParams, sessionId: string): Promise<Diary[]>createDiary(params: CreateDiaryQueryParams, sessionId: string): Promise<boolean>Gift Voucher Module
giftVoucherLookup(params: GiftVoucherLookupQueryParams, sessionId: string): Promise<GiftVoucher[]>giftVoucherVerificationKey(params: GiftVoucherVerificationKeyQueryParams, sessionId: string): Promise<string>giftVoucherReservation(params: GiftVoucherReservationQueryParams, sessionId: string): Promise<string>giftVoucherUsed(params: GiftVoucherUsedQueryParams, sessionId: string): Promise<number>For detailed information on each endpoint and its parameters, please refer to the source code and type definitions.
FAQs
Harmony API SDK
The npm package @dotdev/harmony-sdk receives a total of 66 weekly downloads. As such, @dotdev/harmony-sdk popularity was classified as not popular.
We found that @dotdev/harmony-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.