How loncadev/lonca works
Lonca is a TypeScript SDK suite for integrating with Turkish e-commerce marketplaces. The main workflow is an application creating a marketplace client, invoking a typed resource operation, and having that resource send an authenticated request through its transport to Trendyol or Hepsiburada. The SDKs also cover inbound webhook parsing and subscription management; shared core utilities provide request handling and common primitives. Resource coverage follows the README and source index, while some internal links are omitted where excerpts do not establish a call.
Main entry points: src/transport.ts Trendyol transport · src/transport.ts Hepsiburada transport · src/client.ts Hepsiburada client · src/client.ts Trendyol client
Components 20
Shared core
- Request engine
packages/core/src/transport.ts - Errors and retry
packages/core/src/errors.ts - Shared primitives
packages/core/src
Trendyol SDK
- Trendyol client
sdks/trendyol/src/client.ts - Marketplace resources
sdks/trendyol/src/resources - Order operations
sdks/trendyol/src/resources/orders.ts - Webhook subscriptions
sdks/trendyol/src/resources/webhooks.ts - Trendyol transport
sdks/trendyol/src/transport.ts
Hepsiburada SDK
- Hepsiburada client
sdks/hepsiburada/src/client.ts - Catalog and listings
sdks/hepsiburada/src/resources/catalog.ts - Order operations
sdks/hepsiburada/src/resources/orders.ts - Other resources
sdks/hepsiburada/src/resources - Domain types
sdks/hepsiburada/src/types - Hepsiburada transport
sdks/hepsiburada/src/transport.ts
Webhook handling
- Event parser
sdks/hepsiburada/src/parse-webhook-event.ts - Event payload types
sdks/trendyol/src/types/webhook-event.ts
Other components
- Integrating app
- Trendyol API
- Hepsiburada API
- Merchant webhook endpoint
Connections 22
- Integrating app → Trendyol client: creates client
- Integrating app → Hepsiburada client: creates client
- Trendyol client → Marketplace resources: instantiates resources
sdks/trendyol/src/client.ts - Trendyol client → Trendyol transport: configures transport
sdks/trendyol/src/client.ts - Marketplace resources → Trendyol transport: sends requests
sdks/trendyol/src/resources/webhooks.ts - Order operations → Trendyol transport: sends requests
sdks/trendyol/src/resources/orders.ts - Webhook subscriptions → Trendyol transport: sends requests
sdks/trendyol/src/resources/webhooks.ts - Trendyol transport → Trendyol API: calls API
- Hepsiburada client → Catalog and listings: instantiates resource
sdks/hepsiburada/src/client.ts - Hepsiburada client → Order operations: instantiates resource
sdks/hepsiburada/src/client.ts - Hepsiburada client → Other resources: instantiates resources
sdks/hepsiburada/src/client.ts - Hepsiburada client → Hepsiburada transport: configures transport
sdks/hepsiburada/src/client.ts - Catalog and listings → Hepsiburada transport: sends requests
sdks/hepsiburada/src/resources/catalog.ts - Order operations → Hepsiburada transport: sends requests
sdks/hepsiburada/src/resources/orders.ts - Other resources → Hepsiburada transport: sends requests
sdks/hepsiburada/src/resources/orders.ts - Hepsiburada transport → Hepsiburada API: calls API
- Trendyol transport → Request engine: uses request engine
- Hepsiburada transport → Request engine: uses request engine
sdks/hepsiburada/src/transport.ts - Request engine → Errors and retry: uses errors and retry
packages/core/src/transport.ts - Integrating app → Event parser: parses inbound event
sdks/hepsiburada/src/parse-webhook-event.ts - Merchant webhook endpoint → Event parser: provides event body
sdks/hepsiburada/src/parse-webhook-event.ts - Event payload types → Merchant webhook endpoint: types received payload