UNPKG

gomarketme-react-native

Version:

Affiliate Marketing for React Native and Expo iOS and Android apps.

69 lines (68 loc) 2.5 kB
export type InitializeResponse = { initialized: boolean; platform: 'ios' | 'android'; source: 'app_store' | 'google_play' | string; affiliateMarketingData?: Record<string, unknown> | null; }; export type SyncAllTransactionsResponse = { fetchedCount: number; sentCount: number; failedCount: number; success: boolean; }; export declare class GoMarketMeAffiliateMarketingData { campaign: Campaign; affiliate: Affiliate; saleDistribution: SaleDistribution; affiliateCampaignCode: string; deviceId: string; offerCode?: string; constructor(campaign: Campaign, affiliate: Affiliate, saleDistribution: SaleDistribution, affiliateCampaignCode: string, deviceId: string, offerCode?: string); static fromJson(json?: Record<string, unknown> | null): GoMarketMeAffiliateMarketingData | null; toJson(): Record<string, unknown>; } export declare class Campaign { id: string; name: string; status: string; type: string; publicLinkUrl?: string; constructor(id: string, name: string, status: string, type: string, publicLinkUrl?: string); static fromJson(json: Record<string, unknown>): Campaign; toJson(): Record<string, unknown>; } export declare class Affiliate { id: string; firstName: string; lastName: string; countryCode: string; instagramAccount: string; tiktokAccount: string; xAccount: string; constructor(id: string, firstName: string, lastName: string, countryCode: string, instagramAccount: string, tiktokAccount: string, xAccount: string); static fromJson(json: Record<string, unknown>): Affiliate; toJson(): Record<string, unknown>; } export declare class SaleDistribution { platformPercentage: string; affiliatePercentage: string; constructor(platformPercentage: string, affiliatePercentage: string); static fromJson(json: Record<string, unknown>): SaleDistribution; toJson(): Record<string, unknown>; } declare class GoMarketMe { private static instance; private readonly sdkType; private readonly sdkVersion; private isInitializing; private isInitialized; affiliateMarketingData?: GoMarketMeAffiliateMarketingData | null; private constructor(); static getInstance(): GoMarketMe; get initialized(): boolean; initialize(apiKey: string): Promise<void>; syncAllTransactions(): Promise<SyncAllTransactionsResponse>; stop(): void; } declare const _default: GoMarketMe; export default _default;