node-vk-sdk
Version:
VK API SDK for Node.js
1,605 lines • 323 kB
JavaScript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.VKApi = void 0;
const BaseVKApi_1 = require("../api/BaseVKApi");
class VKApi extends BaseVKApi_1.BaseVKApi {
/**
* undefined
*
* @param {{
* owner_id: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountBan(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.ban", params);
});
}
/**
* Changes a user password after access is successfully restored with the [vk.com/dev/auth.restore|auth.restore] method.
*
* @param {{
* restore_sid: (string|undefined),
* change_password_hash: (string|undefined),
* old_password: (string|undefined),
* new_password: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountChangePasswordResponse>}
*/
accountChangePassword(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.changePassword", params);
});
}
/**
* Returns a list of active ads (offers) which executed by the user will bring him/her respective number of votes to his balance in the application.
*
* @param {{
* offset: (number|undefined),
* count: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetActiveOffersResponse>}
*/
accountGetActiveOffers(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getActiveOffers", params);
});
}
/**
* Gets settings of the user in this application.
*
* @param {{
* user_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetAppPermissionsResponse>}
*/
accountGetAppPermissions(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getAppPermissions", params);
});
}
/**
* Returns a user's blacklist.
*
* @param {{
* offset: (number|undefined),
* count: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetBannedResponse>}
*/
accountGetBanned(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getBanned", params);
});
}
/**
* Returns non-null values of user counters.
*
* @param {{
* filter: (string[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetCountersResponse>}
*/
accountGetCounters(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getCounters", params);
});
}
/**
* Returns current account info.
*
* @param {{
* fields: (string[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetInfoResponse>}
*/
accountGetInfo(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getInfo", params);
});
}
/**
* Returns the current account info.
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetProfileInfoResponse>}
*/
accountGetProfileInfo(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getProfileInfo", params);
});
}
/**
* Gets settings of push notifications.
*
* @param {{
* device_id: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountGetPushSettingsResponse>}
*/
accountGetPushSettings(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.getPushSettings", params);
});
}
/**
* Subscribes an iOS/Android/Windows Phone-based device to receive push notifications
*
* @param {{
* token: (string),
* device_model: (string|undefined),
* device_year: (number|undefined),
* device_id: (string),
* system_version: (string|undefined),
* settings: (string|undefined),
* sandbox: (boolean|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountRegisterDevice(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.registerDevice", params);
});
}
/**
* Edits current profile info.
*
* @param {{
* first_name: (string|undefined),
* last_name: (string|undefined),
* maiden_name: (string|undefined),
* screen_name: (string|undefined),
* cancel_request_id: (number|undefined),
* sex: (number|undefined),
* relation: (number|undefined),
* relation_partner_id: (number|undefined),
* bdate: (string|undefined),
* bdate_visibility: (number|undefined),
* home_town: (string|undefined),
* country_id: (number|undefined),
* city_id: (number|undefined),
* status: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AccountSaveProfileInfoResponse>}
*/
accountSaveProfileInfo(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.saveProfileInfo", params);
});
}
/**
* Allows to edit the current account info.
*
* @param {{
* name: (string|undefined),
* value: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetInfo(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setInfo", params);
});
}
/**
* Sets an application screen name (up to 17 characters), that is shown to the user in the left menu.
*
* @param {{
* user_id: (number),
* name: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetNameInMenu(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setNameInMenu", params);
});
}
/**
* Marks a current user as offline.
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetOffline(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setOffline", params);
});
}
/**
* Marks the current user as online for 15 minutes.
*
* @param {{
* voip: (boolean|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetOnline(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setOnline", params);
});
}
/**
* Change push settings.
*
* @param {{
* device_id: (string),
* settings: (string|undefined),
* key: (string|undefined),
* value: (string[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetPushSettings(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setPushSettings", params);
});
}
/**
* Mutes push notifications for the set period of time.
*
* @param {{
* device_id: (string|undefined),
* time: (number|undefined),
* peer_id: (number|undefined),
* sound: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountSetSilenceMode(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.setSilenceMode", params);
});
}
/**
* undefined
*
* @param {{
* owner_id: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountUnban(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.unban", params);
});
}
/**
* Unsubscribes a device from push notifications.
*
* @param {{
* device_id: (string|undefined),
* sandbox: (boolean|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
accountUnregisterDevice(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "account.unregisterDevice", params);
});
}
/**
* Adds managers and/or supervisors to advertising account.
*
* @param {{
* account_id: (number),
* data: (Models.AdsUserSpecificationCutted[]),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsAddOfficeUsersResponse>}
*/
adsAddOfficeUsers(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.addOfficeUsers", params);
});
}
/**
* Allows to check the ad link.
*
* @param {{
* account_id: (number),
* link_type: (string),
* link_url: (string),
* campaign_id: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsCheckLinkResponse>}
*/
adsCheckLink(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.checkLink", params);
});
}
/**
* Creates ads.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsCreateAdsResponse>}
*/
adsCreateAds(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.createAds", params);
});
}
/**
* Creates advertising campaigns.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsCreateCampaignsResponse>}
*/
adsCreateCampaigns(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.createCampaigns", params);
});
}
/**
* Creates clients of an advertising agency.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsCreateClientsResponse>}
*/
adsCreateClients(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.createClients", params);
});
}
/**
* Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* name: (string),
* lifetime: (number),
* target_pixel_id: (number|undefined),
* target_pixel_rules: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsCreateTargetGroupResponse>}
*/
adsCreateTargetGroup(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.createTargetGroup", params);
});
}
/**
* Archives ads.
*
* @param {{
* account_id: (number),
* ids: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsDeleteAdsResponse>}
*/
adsDeleteAds(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.deleteAds", params);
});
}
/**
* Archives advertising campaigns.
*
* @param {{
* account_id: (number),
* ids: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsDeleteCampaignsResponse>}
*/
adsDeleteCampaigns(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.deleteCampaigns", params);
});
}
/**
* Archives clients of an advertising agency.
*
* @param {{
* account_id: (number),
* ids: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsDeleteClientsResponse>}
*/
adsDeleteClients(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.deleteClients", params);
});
}
/**
* Deletes a retarget group.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* target_group_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
adsDeleteTargetGroup(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.deleteTargetGroup", params);
});
}
/**
* Returns a list of advertising accounts.
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetAccountsResponse>}
*/
adsGetAccounts(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getAccounts", params);
});
}
/**
* Returns number of ads.
*
* @param {{
* account_id: (number),
* ad_ids: (string|undefined),
* campaign_ids: (string|undefined),
* client_id: (number|undefined),
* include_deleted: (boolean|undefined),
* only_deleted: (boolean|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetAdsResponse>}
*/
adsGetAds(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getAds", params);
});
}
/**
* Returns descriptions of ad layouts.
*
* @param {{
* account_id: (number),
* ad_ids: (string|undefined),
* campaign_ids: (string|undefined),
* client_id: (number|undefined),
* include_deleted: (boolean|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetAdsLayoutResponse>}
*/
adsGetAdsLayout(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getAdsLayout", params);
});
}
/**
* Returns ad targeting parameters.
*
* @param {{
* account_id: (number),
* ad_ids: (string|undefined),
* campaign_ids: (string|undefined),
* client_id: (number|undefined),
* include_deleted: (boolean|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetAdsTargetingResponse>}
*/
adsGetAdsTargeting(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getAdsTargeting", params);
});
}
/**
* Returns current budget of the advertising account.
*
* @param {{
* account_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetBudgetResponse>}
*/
adsGetBudget(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getBudget", params);
});
}
/**
* Returns a list of campaigns in an advertising account.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* include_deleted: (boolean|undefined),
* campaign_ids: (string|undefined),
* fields: (string[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetCampaignsResponse>}
*/
adsGetCampaigns(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getCampaigns", params);
});
}
/**
* Returns a list of possible ad categories.
*
* @param {{
* lang: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetCategoriesResponse>}
*/
adsGetCategories(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getCategories", params);
});
}
/**
* Returns a list of advertising agency's clients.
*
* @param {{
* account_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetClientsResponse>}
*/
adsGetClients(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getClients", params);
});
}
/**
* Returns demographics for ads or campaigns.
*
* @param {{
* account_id: (number),
* ids_type: (string),
* ids: (string),
* period: (string),
* date_from: (string),
* date_to: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetDemographicsResponse>}
*/
adsGetDemographics(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getDemographics", params);
});
}
/**
* Returns information about current state of a counter — number of remaining runs of methods and time to the next counter nulling in seconds.
*
* @param {{
* account_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetFloodStatsResponse>}
*/
adsGetFloodStats(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getFloodStats", params);
});
}
/**
* undefined
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* requests_ids: (string|undefined),
* offset: (number|undefined),
* limit: (number|undefined),
* sort_by: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetLookalikeRequestsResponse>}
*/
adsGetLookalikeRequests(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getLookalikeRequests", params);
});
}
/**
* undefined
*
* @param {{
* artist_name: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetMusiciansResponse>}
*/
adsGetMusicians(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getMusicians", params);
});
}
/**
* Returns a list of managers and supervisors of advertising account.
*
* @param {{
* account_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetOfficeUsersResponse>}
*/
adsGetOfficeUsers(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getOfficeUsers", params);
});
}
/**
* Returns detailed statistics of promoted posts reach from campaigns and ads.
*
* @param {{
* account_id: (number),
* ids_type: (string),
* ids: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetPostsReachResponse>}
*/
adsGetPostsReach(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getPostsReach", params);
});
}
/**
* Returns a reason of ad rejection for pre-moderation.
*
* @param {{
* account_id: (number),
* ad_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetRejectionReasonResponse>}
*/
adsGetRejectionReason(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getRejectionReason", params);
});
}
/**
* Returns statistics of performance indicators for ads, campaigns, clients or the whole account.
*
* @param {{
* account_id: (number),
* ids_type: (string),
* ids: (string),
* period: (string),
* date_from: (string),
* date_to: (string),
* stats_fields: (string[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetStatisticsResponse>}
*/
adsGetStatistics(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getStatistics", params);
});
}
/**
* Returns a set of auto-suggestions for various targeting parameters.
*
* @param {{
* section: (string),
* ids: (string|undefined),
* q: (string|undefined),
* country: (number|undefined),
* cities: (string|undefined),
* lang: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetSuggestionsResponse>}
*/
adsGetSuggestions(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getSuggestions", params);
});
}
/**
* Returns a list of target groups.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* extended: (boolean|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetTargetGroupsResponse>}
*/
adsGetTargetGroups(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getTargetGroups", params);
});
}
/**
* Returns the size of targeting audience, and also recommended values for CPC and CPM.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* criteria: (string|undefined),
* ad_id: (number|undefined),
* ad_format: (number|undefined),
* ad_platform: (string|undefined),
* ad_platform_no_wall: (string|undefined),
* ad_platform_no_ad_network: (string|undefined),
* link_url: (string),
* link_domain: (string|undefined),
* need_precise: (boolean|undefined),
* impressions_limit_period: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetTargetingStatsResponse>}
*/
adsGetTargetingStats(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getTargetingStats", params);
});
}
/**
* Returns URL to upload an ad photo to.
*
* @param {{
* ad_format: (number),
* icon: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetUploadURLResponse>}
*/
adsGetUploadURL(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getUploadURL", params);
});
}
/**
* Returns URL to upload an ad video to.
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsGetVideoUploadURLResponse>}
*/
adsGetVideoUploadURL(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.getVideoUploadURL", params);
});
}
/**
* Imports a list of advertiser's contacts to count VK registered users against the target group.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* target_group_id: (number),
* contacts: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsImportTargetContactsResponse>}
*/
adsImportTargetContacts(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.importTargetContacts", params);
});
}
/**
* Removes managers and/or supervisors from advertising account.
*
* @param {{
* account_id: (number),
* ids: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsRemoveOfficeUsersResponse>}
*/
adsRemoveOfficeUsers(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.removeOfficeUsers", params);
});
}
/**
* Edits ads.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsUpdateAdsResponse>}
*/
adsUpdateAds(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.updateAds", params);
});
}
/**
* Edits advertising campaigns.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsUpdateCampaignsResponse>}
*/
adsUpdateCampaigns(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.updateCampaigns", params);
});
}
/**
* Edits clients of an advertising agency.
*
* @param {{
* account_id: (number),
* data: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsUpdateClientsResponse>}
*/
adsUpdateClients(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.updateClients", params);
});
}
/**
* Adds managers and/or supervisors to advertising account.
*
* @param {{
* account_id: (number),
* data: (Models.AdsUserSpecification[]),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdsUpdateOfficeUsersResponse>}
*/
adsUpdateOfficeUsers(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.updateOfficeUsers", params);
});
}
/**
* Edits a retarget group.
*
* @param {{
* account_id: (number),
* client_id: (number|undefined),
* target_group_id: (number),
* name: (string),
* domain: (string|undefined),
* lifetime: (number),
* target_pixel_id: (number|undefined),
* target_pixel_rules: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
adsUpdateTargetGroup(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "ads.updateTargetGroup", params);
});
}
/**
* undefined
*
* @param {{
* office_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetAdCategoriesResponse>}
*/
adswebGetAdCategories(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getAdCategories", params);
});
}
/**
* undefined
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetAdUnitCodeResponse>}
*/
adswebGetAdUnitCode(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getAdUnitCode", params);
});
}
/**
* undefined
*
* @param {{
* office_id: (number),
* sites_ids: (string|undefined),
* ad_units_ids: (string|undefined),
* fields: (string|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetAdUnitsResponse>}
*/
adswebGetAdUnits(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getAdUnits", params);
});
}
/**
* undefined
*
* @param {{
* office_id: (number),
* sites_ids: (string|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetFraudHistoryResponse>}
*/
adswebGetFraudHistory(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getFraudHistory", params);
});
}
/**
* undefined
*
* @param {{
* office_id: (number),
* sites_ids: (string|undefined),
* fields: (string|undefined),
* limit: (number|undefined),
* offset: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetSitesResponse>}
*/
adswebGetSites(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getSites", params);
});
}
/**
* undefined
*
* @param {{
* office_id: (number),
* ids_type: (string),
* ids: (string),
* period: (string),
* date_from: (string),
* date_to: (string),
* fields: (string|undefined),
* limit: (number|undefined),
* page_id: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AdswebGetStatisticsResponse>}
*/
adswebGetStatistics(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "adsweb.getStatistics", params);
});
}
/**
* Returns a URL for uploading a photo to the community collection for community app widgets
*
* @param {{
* image_type: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsGetAppImageUploadServerResponse>}
*/
appWidgetsGetAppImageUploadServer(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.getAppImageUploadServer", params);
});
}
/**
* Returns an app collection of images for community app widgets
*
* @param {{
* offset: (number|undefined),
* count: (number|undefined),
* image_type: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsGetAppImagesResponse>}
*/
appWidgetsGetAppImages(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.getAppImages", params);
});
}
/**
* Returns a URL for uploading a photo to the community collection for community app widgets
*
* @param {{
* image_type: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsGetGroupImageUploadServerResponse>}
*/
appWidgetsGetGroupImageUploadServer(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.getGroupImageUploadServer", params);
});
}
/**
* Returns a community collection of images for community app widgets
*
* @param {{
* offset: (number|undefined),
* count: (number|undefined),
* image_type: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsGetGroupImagesResponse>}
*/
appWidgetsGetGroupImages(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.getGroupImages", params);
});
}
/**
* Returns an image for community app widgets by its ID
*
* @param {{
* images: (string[]),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsGetImagesByIdResponse>}
*/
appWidgetsGetImagesById(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.getImagesById", params);
});
}
/**
* Allows to save image into app collection for community app widgets
*
* @param {{
* hash: (string),
* image: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsSaveAppImageResponse>}
*/
appWidgetsSaveAppImage(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.saveAppImage", params);
});
}
/**
* Allows to save image into community collection for community app widgets
*
* @param {{
* hash: (string),
* image: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppWidgetsSaveGroupImageResponse>}
*/
appWidgetsSaveGroupImage(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.saveGroupImage", params);
});
}
/**
* Allows to update community app widget
*
* @param {{
* code: (string),
* type: (string),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
appWidgetsUpdate(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "appWidgets.update", params);
});
}
/**
* Deletes all request notifications from the current app.
*
* @param {{
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseOkResponse>}
*/
appsDeleteAppRequests(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.deleteAppRequests", params);
});
}
/**
* Returns applications data.
*
* @param {{
* app_id: (number|undefined),
* app_ids: (string[]|undefined),
* platform: (string|undefined),
* extended: (boolean|undefined),
* return_friends: (boolean|undefined),
* fields: (Models.UsersFields[]|undefined),
* name_case: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetResponse>}
*/
appsGet(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.get", params);
});
}
/**
* Returns a list of applications (apps) available to users in the App Catalog.
*
* @param {{
* sort: (string|undefined),
* offset: (number|undefined),
* count: (number),
* platform: (string|undefined),
* extended: (boolean|undefined),
* return_friends: (boolean|undefined),
* fields: (Models.UsersFields[]|undefined),
* name_case: (string|undefined),
* q: (string|undefined),
* genre_id: (number|undefined),
* filter: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetCatalogResponse>}
*/
appsGetCatalog(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.getCatalog", params);
});
}
/**
* Creates friends list for requests and invites in current app.
*
* @param {{
* extended: (boolean|undefined),
* count: (number|undefined),
* offset: (number|undefined),
* type: (string|undefined),
* fields: (Models.UsersFields[]|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetFriendsListResponse>}
*/
appsGetFriendsList(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.getFriendsList", params);
});
}
/**
* Returns players rating in the game.
*
* @param {{
* type: (string),
* global: (boolean|undefined),
* extended: (boolean|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetLeaderboardResponse>}
*/
appsGetLeaderboard(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.getLeaderboard", params);
});
}
/**
* Returns scopes for auth
*
* @param {{
* type: (string|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetScopesResponse>}
*/
appsGetScopes(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.getScopes", params);
});
}
/**
* Returns user score in app
*
* @param {{
* user_id: (number),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.AppsGetScoreResponse>}
*/
appsGetScore(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.getScore", params);
});
}
/**
* undefined
*
* @param {{
* promo_id: (number),
* user_id: (number|undefined),
* access_token: (string|undefined)
* }} params
*
* @returns {Promise<Responses.BaseBoolResponse>}
*/
appsPromoHasActiveGift(params) {
const _super = Object.create(null, {
call: { get: () => super.call }
});
return __awaiter(this, void 0, void 0, function* () {
return _super.call.call(this, "apps.promoHasActiveGift", params);
});