@qzsy/esho-category-mapping
v0.1.2
Published
Typed client for the category mapping service
Keywords
Readme
@qzsy/esho-category-mapping
Typed ESM/CommonJS SDK for the Eshop category mapping service. It targets Bun 1.4+ and Node.js 22+, has no runtime dependencies, and is generated from the service's checked OpenAPI contract.
import { createClient } from '@qzsy/esho-category-mapping';
const client = createClient({
baseUrl: process.env.CATEGORY_MAPPING_URL ?? 'https://category-mapping.apps.cl.qzsyzn.com',
token: () => process.env.CATEGORY_MAPPING_TOKEN,
});
const categories = await client.categories.list('ozon', { leaf: true, limit: 20 });
const first = categories.items[0];
if (first) {
const attributes = await client.categories.listAttributes('ozon', first.id, { limit: 100 });
const attribute = attributes.items[0];
if (attribute) console.log(await client.categories.listAttributeValues('ozon', first.id, attribute.id));
}The client exposes all 42 OpenAPI operations through system, health, platforms, categories, canonical, mappings, attributeMappings, conversion, tasks, history, knowledge, settings, and examples. Offset and cursor iterators are bounded and pin the service snapshot; tasks.wait only performs GET requests and never resubmits a task. conversion.convert returns the documented 422 business result. Mutations are never retried automatically; GET retries are opt-in.
Use ApiError for HTTP responses and TransportError for timeouts, aborts, invalid responses, or network failures. IDs are strings, including values larger than JavaScript's safe integer range. See the dashboard /#sdk page for copyable examples and /docs/ for the interactive OpenAPI viewer.
