/// import { Stream } from 'stream'; import { CampaignBidList } from './models/campaign_bids'; import { AudienceListMeta, AudienceListData } from './models/audience_list'; import { BaseAPI } from './base_api'; import { Creative } from './models/creative'; export declare namespace AppPromotionEnums { enum Metrics { Impressions = "impressions", Clicks = "clicks", Completions = "completions", Installs = "installs", Spend = "spend", StoreOpens = "storeOpens" } enum AdUnits { RewardedVideo = "rewardedVideo", Interstitial = "interstitial", Banner = "banner", Offerwall = "offerWall" } enum Breakdowns { Day = "day", Campaign = "campaign", Title = "title", Application = "application", Country = "country", OS = "os", DeviceType = "deviceType", Creatives = "creative", AdUnit = "adUnit" } enum PLATFORM { iOS = "ios", Android = "android" } enum CreativeType { VIDEO_CAROUSEL = "videoAndCarousel", VIDEO_FULLSCREEN = "videoAndFullScreen", PLAYABLE = "playable", VIDEO_INTERACTIVE_ENDCARD = "videoAndInteractiveEndCard", INTERACTIVE_VIDEO = "interactiveVideo" } enum UsageType { VIDEO = "video", LEFT = "left", MIDDLE = "middle", RIGHT = "right", INTERACTIVE_ENDCARD = "interactiveEndCard", PHONE_PORTRAIT = "phonePortrait", PHONE_LANDSCAPE = "phoneLandscape", TABLET_PORTRAIT = "tabletPortrait", TABLET_LANDSCAPE = "tabletLandscape" } } export declare namespace AppPromotionAPI { class API extends BaseAPI { /** * * @param {string} startDate - report start date in the following format YYYY-MM-DD * @param {string} endDate -report end date in the following format YYYY-MM-DD * @param {AppPromotionMetrics.Metrics} metrics - list of report metrics. * @param {object} reportingOptions - Optional additional parameters. * @param {AppPromotionBreakdowns} reportingOptions.breakdowns - list of breakdowns. * @param {string} reportingOptions.format - report format type 'csv' or 'json' only * @param {number} reportingOptions.count - maximum number of records in the report * @param {[number]} reportingOptions.campaignId - list of campaign ids * @param {[string]} reportingOptions.bundleId - list of bundle ids * @param {[number]} reportingOptions.creativeId - list of creative ids. * @param {[string]} reportingOptions.country - list of country code in 2 letter country code, as per [ISO 3166-1 Alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) * @param {string} reportingOptions.os - either 'ios' or 'android'. * @param {string} reportingOptions.device_type - either 'phone' or 'tablet' * @param {AppPromotionEnums.AdUnits} reportingOptions.adUnit - Ad Unit from [[AdUnits]] * @param {AppPromotionEnums.Breakdowns | AppPromotionEnums.Metrics} reportingOptions.order - order report according to a specific Breakdown or Metric * @param {string} reportingOptions.direction - either 'asc' or 'desc' * * @returns {Stream} - Readable Stream with results - in case of when format is json each chunk will be a json list. */ getAdvertiserStatistics(startDate: string, endDate: string, metrics: AppPromotionEnums.Metrics[], reportingOptions?: { breakdowns?: AppPromotionEnums.Breakdowns[]; format?: 'csv' | 'json'; count?: number; campaignId?: number[]; bundleId?: string[]; creativeId?: number[]; country?: string[]; os?: 'ios' | 'android'; deviceType?: 'phone' | 'tablet'; adUnit?: AppPromotionEnums.AdUnits; order?: AppPromotionEnums.Breakdowns | AppPromotionEnums.Metrics; direction: 'asc' | 'desc'; }): Stream; /** * * @param {number} campaignId - campaign id to get bids for * @param {number} maxRecords - (optional) max number of records - default 10000 * @returns {Stream} - ReadableStream that will contain the result */ getBidsForCampaign(campaignId: number, maxRecords?: 10000 | number): Stream; /** * * @param {[CampaignBidList]} campaignBids List of [[CampaignBids]] to update * @returns {Array} - Array with API results. */ updateBids(campaignBids: CampaignBidList[]): Promise; /** * * @param {[CampaignBidList]} campaignBids list of [[CampaignBids]] to delete. * @returns {Array} - Arry with API results. */ deleteBids(campaignBids: CampaignBidList[]): Promise; /** * @returns {string} in json format of the audience list * @example - ```{ "count": 1, "audiences": [ { "id": 1, "type": "targeting", "name": "batz", "description": "batz", "bundleId": "com.adsd.sdf", "platform": "android", "lastModified": "2017-01-31T20:00:00.000Z", "hasActiveCampaigns": true } ] }``` */ getAudienceLists(): Promise; /** * * @param {AudienceListMeta} audienceListMeta - [[AudienceListMeta]] meta data of the audience list to create */ createAudienceList(audienceListMeta: AudienceListMeta): Promise; /** * * @param {string} audienceListId - Audience List ID to delete */ deleteAudienceList(audienceListId: string): Promise; /** * * @param {AudienceListData} audienceListData - [[AudienceListData]] Audience List data to update */ updateAudienceList(audienceListData: AudienceListData): Promise; /** * * @param options Optional Params * @param {string} options.os - 'android' or 'ios' * @param {string} options.searchTerm - Filter by the name or partial name of the title. * @param {string} options.requestId - For paginated requests pass the requestId from the response. * @param {number} options.resultsBulkSize - For paginated requests pass the amount of titles to return, default 100. * @param {number} options.pageNumber - For paginated requests pass the next page of the request. * @returns {string} in json format of the audience list * @example - ```{ "titles": [ { "id": 113366, "bundleId": "com.yourcompany.MiniGame", "os": "android", "name": "Gaming mania" }, { "id": 225566, "bundleId": "com.yourcompany.BestGame", "os": "ios", "name": "The Best Game" } ], "totalResultsCount": 5, "requestId": "MzUzMjIuODI5OTk5OS41LjI5" }``` */ getTitles(options?: { os?: string; searchTerm?: string; requestId?: string; resultsBulkSize?: number; pageNumber?: number; }): Promise; /** * * @param options Optional parameters * @param {string} options.type - Asset type ('video', 'html', 'html_iec') * @param {number} options.titleId - ID of the title of which the assets belongs to. * @param {number[]} options.ids - List of assets ids. * @param {string} options.requestId - For paginated requests pass the requestId from the response. * @param {number} options.resultsBulkSize - For paginated requests pass the amount of titles to return, default 100. * @param {number} options.pageNumber - For paginated requests pass the next page of the request. * @returns {string} in json format of the audience list * @example - ```{ "assets": [ { "id": 200303, "type": "html_iec", "titleId": 501567, "orientation": "all", "source": "playworks", "duration": null }, { "id": 200302, "type": "video", "titleId": 501567, "orientation": "all", "source": "none", "duration": 17 } ], "totalResultsCount": 6, "requestId": "MjA1MzUzLjIwMDMwMy40LjM1OTY=" } ``` */ getAssets(options?: { type?: string; titleId?: number; ids?: number[]; requestId?: string; resultsBulkSize?: number; pageNumber?: number; }): Promise; createAsset(titleId: number, type: string, filePath: string, fileName?: string): Promise; getCreatives(options?: { type?: AppPromotionEnums.CreativeType; titleId?: number; requestId?: string; pageNumber?: string; resultsBulkSize?: number; }): Promise; createCreative(titleId: number, creatives: Creative[]): Promise; /** * * @param {string} startDate - report start date in the following format YYYY-MM-DD * @param {string} endDate -report end date in the following format YYYY-MM-DD * @param {AppPromotionMetrics.Metrics} metrics - list of report metrics. * @param {object} reportingOptions - Optional additional parameters. * @param {AppPromotionBreakdowns} reportingOptions.breakdowns - list of breakdowns. * @param {string} reportingOptions.format - report format type 'csv' or 'json' only * @param {number} reportingOptions.count - maximum number of records in the report * @param {[number]} reportingOptions.campaignId - list of campaign ids * @param {[string]} reportingOptions.bundleId - list of bundle ids * @param {AppPromotionEnums.Breakdowns | AppPromotionEnums.Metrics} reportingOptions.order - order report according to a specific Breakdown or Metric * @param {string} reportingOptions.direction - either 'asc' or 'desc' * * @returns {Stream} - Readable Stream with results - in case of when format is json each chunk will be a json list. */ getSkanReporting(startDate: string, endDate: string, metrics: AppPromotionEnums.Metrics[], reportingOptions?: { breakdowns?: AppPromotionEnums.Breakdowns[]; format?: 'csv' | 'json'; count?: number; campaignId?: number[]; bundleId?: string[]; creativeId?: number[]; country?: string[]; os?: 'ios' | 'android'; deviceType?: 'phone' | 'tablet'; adUnit?: AppPromotionEnums.AdUnits; order?: AppPromotionEnums.Breakdowns | AppPromotionEnums.Metrics; direction?: 'asc' | 'desc'; }): Stream; /** * returns a copy of the raw winning postbacks data from every network, directly from Apple. * @param date report date * @returns json with list of urls of the report * @example * { "urls": [ "https://postback-hub.s3.amazonaws.com/athena/raw_data_rtm_postback_hub_csv_file/outputs/athena/cf23fe03-cf05-4189-adda-d1cc009a9b59/3/output/companyid%123456/partition_date%3D2021-10-10/compaction_id%3D1/2021_10_11_00_00_output.csv?AWSAccessKeyId=ASIAQO6NX2IJOKSSQ34R&Expires=1633937977&Signature=um69g30FsSp%2BWENsxABotPnk0q8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEG4aCWV1LXdlc3QtMSJHMEUCIQDLBLHPC84Xb6rXqooco4iY%2BsBJWs4BlPS1H0b27SrKgQIgHNu1on2rw8%2BktL5lEoP3RYbalryBm3bbmHTjHZbIOw8qgwQI5v%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgwwMzIxMDY4NjEwNzQiDML7Dvs9adyo9dIx8yrXA5AtmSqdYTQnV0jgMywFD89FyN5Zgp72KCyvQVQr%2FqFcdkWovagJEICg%2BWAcLVAfU%2FNhgvcNV2h%2FIkdFt70rGGeTfyKr7viPo4wq9icnyc%2F12%2B5VYjrCEt8oPkdU6gmotTQ3qYChC2hlmhy1I5U6Jf%2FCSyZyFTIHSgvYH3OiepjOpIXuVxCTxBx6Snrq37w6ZScOZIZ5Emvf7Nl%2BzcNrr73cl5XOu%2FD7OmLrLMcIU%2FOLlndI2%2FbxS8r0EReV7ol1iq2QYsk%2FweiQa2BwHANl2GsZLogPNZ4GnJNS56TcUeAnZzHaHlAQ6wejyJ4VdPrE7OhIbJ6lj69zUIHJ8xFqqjFpAGdM39nxdWhcPAYkVI%2Bi8INCpcuwm7ceGFCtf6qMvN%2F%2F6MpRFkNYNMTez8843Lp2wp9lPuIcutliB6qF5tFUzohHRNuY4vNyOYX4Y5SNJ3JcHeqQxHR0svHTM8QZbfL7jDrNfGEzWsBmvyWcyy98FeKwTYvNkB55WngrNSSmAZs7u5%2Ba58EchbfMNtqEpT8TWhhHUn2hS%2FkVJ4m1SFHZTES6QspA2by3ubv1AWcB0nIASivErSe%2FjhZAF2xt5fXOybhjmhh2PsIFc49bzYv6UF3FybutkDC3j4%2BLBjqlAQqgV7JtYzWSt78TvnViUf%2Fn6Z8lHHhVTHzKekiFYj%2FMmp3nIpc2da5Z%2BYOv1HJg2NXzx%2BbtTTKH0WtU9qgJM%2Bj7Z%2F1w5WHIw4nTfIGhilvaXX0nRokJPjnQV8btnmQnWXmp9S6kfT13IoLqaxJQEw8kkY%2B7Isa6F%2BZeGqHtBausH4mlv5UPgfvUV15WVXG8YhAHA5OeKITkP4O9KrDePhX3Fd8SKg%3D%3D" ], "expiration": "2021-10-11 07:39:37" } */ getUniversalSkanReport(date: string): Promise; private reportingAPIImpl; } }