Skip to main content
The root export of @thelomadee/sdk. Instantiate Lomadee once per server process (or scoped factory) and access resource clients through its properties.
Domain data types (CreateOrderBody, CommissionData, TermData, enums, etc.) are imported from @thelomadee/sdk/domains, not from the root package.

Constructor

Creates a client that shares one authenticated HTTP session (10 second timeout) across all resource properties. Authentication uses the partner authKey as the x-auth-key header on every request.

SdkParams

string
required
Partner credential provided during onboarding. Required.
Environment
Target deployment. Union: 'staging' | 'production'. Optional; defaults to 'production' when omitted.

Properties

terms.acceptances

Nested on terms, type TermAcceptance. Exposes create and list for term acceptance records. See Terms — acceptances.
Resource return types are defined per client. For example, transactions methods return Promise<unknown>; commissions.list returns CommissionListResponse; affiliates.list returns AffiliateListResponse; other methods may use SdkResponse<T> or concrete domain types. See each resource reference page.

Root exports

Advanced resource implementation classes are available through dedicated subpaths. Prefer the root client; use these imports only when you intentionally construct a resource class outside Lomadee: The recommended entry point remains new Lomadee(...) on @thelomadee/sdk.

Example