sdk.affiliates on a Lomadee instance. Import types from @thelomadee/sdk/domains.
list
Parameters — AffiliateQuery
Returns
Promise<AffiliateListResponse> — { data: AffiliateListItem[]; count: number }.
Example
get
Returns
Promise<AffiliateResponse> — not wrapped in SdkResponse.
create
SignUpBody).
Parameters — SignUpBody
User profile for signup. See UserSignUpBody.
Postal address. See UserAddressBody.
Bank details. See UserBankBody.
Returns
Promise<SdkResponse<AffiliateResponse>> — { data: AffiliateResponse }.
update
Parameters — UpdateAffiliateBody
Optional partial user fields. See UpdateUserBody.
Optional address replacement. See UserAddressBody.
Optional bank details. See UserBankBody.
Returns
Promise<AffiliateResponse>.
DocumentType
Union type used in signup and user models:
'cpf' | 'cnpj' | 'rg' | 'international' | 'passport'
AffiliateInviteStatus
Union type for affiliate invite state (dashboard-api enum):
UserSignUpBody
UserAddressBody
Optional country. Comment in SDK source: default
brazil (default behavior is not enforced by the SDK type).UserBankBody
Brazilian bank account. See BrazilBankBody.
International bank account. See InternationalBankBody.
BrazilBankBody
InternationalBankBody
UpdateUserBody
All fields optional:
AffiliateResponse
User record. Address is nested on
user, not at the top level. See User.Optional invite status, or
null. See AffiliateInviteStatus.AffiliateListItem
Extends AffiliateResponse with cluster membership for list results.
Clusters the affiliate belongs to. See AffiliateCluster.
AffiliateListResponse
AffiliateCluster
User
Optional nested address, or
null. See Address.