@tyrads.com/tyrads-sdk-iframe
Version:
Official TyrAds SDK for NodeJS
38 lines (37 loc) • 1.31 kB
TypeScript
/**
* AuthenticationRequest type represents a request for user authentication.
* It includes user details such as age, gender, and other optional parameters.
*/
export type AuthenticationRequest = {
publisherUserId: string;
age?: number;
gender?: number;
email?: string;
phoneNumber?: string;
sub1?: string | null;
sub2?: string | null;
sub3?: string | null;
sub4?: string | null;
sub5?: string | null;
userGroup?: string | Record<string, any> | null;
mediaSourceName?: string | null;
mediaSourceId?: string | null;
mediaSubSourceId?: string | null;
incentivized?: boolean | null;
mediaAdsetName?: string | null;
mediaAdsetId?: string | null;
mediaCreativeName?: string | null;
mediaCreativeId?: string | null;
mediaCampaignName?: string | null;
engagementId?: number | null;
};
/**
* Validates an AuthenticationRequest object.
* Throws an error if validation fails.
*/
export declare function validateAuthenticationRequest(request: AuthenticationRequest): void;
/**
* Returns a parsed data object containing the authentication request data.
* Only includes fields that are defined and non-empty.
*/
export declare function getParsedAuthenticationRequestData(request: AuthenticationRequest): Record<string, any>;