Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vkontakte-api

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vkontakte-api - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

## [1.13.0](https://github.com/wolframdeus/vk-api/compare/v1.11.5...v1.13.0) (2020-08-22)
### Features
* **statevents:** add addMiniApps method ([0cf9801](https://github.com/wolframdeus/vk-api/commit/0cf980140999377a5245f1ee8dac146f36485b68))
* **users:** add new methods ([8469c13](https://github.com/wolframdeus/vk-api/commit/8469c139a41f56eafe13fc45a1613211a28ed4e4))
* **users:** add users.search method ([cbafaf5](https://github.com/wolframdeus/vk-api/commit/cbafaf5c524cf29345b2b6a4bbb74649b02d2e00))
## [1.12.0](https://github.com/wolframdeus/vk-api/compare/v1.11.5...v1.12.0) (2020-08-22)

@@ -7,0 +16,0 @@

14

dist/repositories/UsersRepository/types.d.ts

@@ -1,2 +0,2 @@

import { Pager, User } from '../../types';
import { BooleanType, Pager, RelationsStatusEnum, SexEnum, User } from '../../types';
export declare type NameCaseType = 'nom' | 'gen' | 'dat' | 'acc' | 'ins' | 'abl';

@@ -29,3 +29,3 @@ export declare type UserFieldType = 'about' | 'activities' | 'bdate' | 'blacklisted' | 'books' | 'can_post' | 'can_see_all_posts' | 'can_see_audio' | 'can_send_friend_request' | 'can_write_private_message' | 'career' | 'city' | 'common_count' | 'connections' | 'contacts' | 'counters' | 'country' | 'crop_photo' | 'domain' | 'education' | 'first_name_nom' | 'first_name_gen' | 'first_name_dat' | 'first_name_acc' | 'first_name_ins' | 'first_name_abl' | 'followers_count' | 'friend_status' | 'games' | 'has_mobile' | 'has_photo' | 'home_town' | 'interests' | 'is_favorite' | 'is_friend' | 'is_hidden_from_feed' | 'last_name_nom' | 'last_name_gen' | 'last_name_dat' | 'last_name_acc' | 'last_name_ins' | 'last_name_abl' | 'last_seen' | 'lists' | 'maiden_name' | 'military' | 'movies' | 'music' | 'nickname' | 'occupation' | 'online' | 'personal' | 'photo_50' | 'photo_100' | 'photo_200_orig' | 'photo_200' | 'photo_400_orig' | 'photo_id' | 'photo_max' | 'photo_max_orig' | 'quotes' | 'relatives' | 'relation' | 'schools' | 'screen_name' | 'sex' | 'site' | 'status' | 'timezone' | 'trending' | 'tv' | 'universities' | 'verified' | 'wall_default';

userId?: number;
extended?: boolean;
extended?: BooleanType;
offset?: number;

@@ -51,3 +51,3 @@ count?: number;

q?: string;
sort?: 0 | 1;
sort?: 0 | 1 | 'popularity' | 'registration-date';
offset?: number;

@@ -63,4 +63,4 @@ count?: number;

universityChair?: number;
sex?: 0 | 1 | 2;
status?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
sex?: SexEnum;
status?: RelationsStatusEnum;
ageFrom?: number;

@@ -71,4 +71,4 @@ ageTo?: number;

birthYear?: number;
online?: 0 | 1;
hasPhoto?: 0 | 1;
online?: BooleanType;
hasPhoto?: BooleanType;
schoolCountry?: number;

@@ -75,0 +75,0 @@ schoolCity?: number;

import { Repository } from '../Repository';
import { SendRequest } from '../../types';
import { GetFollowersParams, GetFollowersResult, GetParams, GetResult, GetSubscriptionsParams, GetSubscriptionsResult, ReportParams } from './types';
import { GetFollowersParams, GetFollowersResult, GetParams, GetResult, GetSubscriptionsParams, GetSubscriptionsResult, ReportParams, SearchParams, SearchResult } from './types';
export declare class UsersRepository extends Repository {

@@ -22,2 +22,3 @@ constructor(sendRequest: SendRequest);

report: import("../../types").RepositoryMethod<ReportParams, 1>;
search: import("../../types").RepositoryMethod<SearchParams, SearchResult>;
}

@@ -1,1 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function s(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(s.prototype=e.prototype,new s)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var r,e=1,s=arguments.length;e<s;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},__rest=this&&this.__rest||function(t,r){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)r.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(e[s[o]]=t[s[o]])}return e};Object.defineProperty(exports,"__esModule",{value:!0});var Repository_1=require("../Repository"),utils_1=require("../../utils"),UsersRepository=function(t){function r(r){var e=t.call(this,"users",r)||this;return e.get=e.r("get",function(t){var r=t.userIds,e=t.fields,s=__rest(t,["userIds","fields"]);return __assign(__assign({},s),{userIds:utils_1.formatOptionalArray(r),fields:utils_1.formatOptionalArray(e)})}),e.getFollowers=e.r("getFollowers",function(t){var r=t.fields,e=__rest(t,["fields"]);return __assign(__assign({},e),{fields:utils_1.formatOptionalArray(r)})}),e.getSubscriptions=e.r("getSubscriptions",function(t){var r=t.fields,e=t.extended,s=__rest(t,["fields","extended"]);return __assign(__assign({},s),{extended:utils_1.formatOptionalBoolean(e),fields:utils_1.formatOptionalArray(r)})}),e.report=e.r("getSubscriptions"),e}return __extends(r,t),r}(Repository_1.Repository);exports.UsersRepository=UsersRepository;
"use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var r,e=1,o=arguments.length;e<o;e++)for(var s in r=arguments[e])Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s]);return t}).apply(this,arguments)},__rest=this&&this.__rest||function(t,r){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(t);s<o.length;s++)r.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(t,o[s])&&(e[o[s]]=t[o[s]])}return e};Object.defineProperty(exports,"__esModule",{value:!0});var Repository_1=require("../Repository"),utils_1=require("../../utils"),UsersRepository=function(t){function r(r){var e=t.call(this,"users",r)||this;return e.get=e.r("get",function(t){var r=t.userIds,e=t.fields,o=__rest(t,["userIds","fields"]);return __assign(__assign({},o),{userIds:utils_1.formatOptionalArray(r),fields:utils_1.formatOptionalArray(e)})}),e.getFollowers=e.r("getFollowers",function(t){var r=t.fields,e=__rest(t,["fields"]);return __assign(__assign({},e),{fields:utils_1.formatOptionalArray(r)})}),e.getSubscriptions=e.r("getSubscriptions",function(t){var r=t.fields,e=t.extended,o=__rest(t,["fields","extended"]);return __assign(__assign({},o),{extended:utils_1.formatOptionalBoolean(e),fields:utils_1.formatOptionalArray(r)})}),e.report=e.r("getSubscriptions"),e.search=e.r("search",function(t){var r=t.sort,e=t.online,o=t.hasPhoto,s=__rest(t,["sort","online","hasPhoto"]);return __assign({sort:void 0===r?void 0:"number"==typeof r?r:utils_1.toPseudoBoolean("popularity"===r),online:utils_1.formatOptionalBoolean(e),hasPhoto:utils_1.formatOptionalBoolean(o)},s)}),e}return __extends(r,t),r}(Repository_1.Repository);exports.UsersRepository=UsersRepository;

@@ -66,3 +66,3 @@ import { PseudoBooleanType } from '../shared';

}
export declare enum RelationEnum {
export declare enum RelationsStatusEnum {
Unknown = 0,

@@ -255,3 +255,3 @@ NotMarried = 1,

}>;
relation?: RelationEnum;
relation?: RelationsStatusEnum;
relationPartner?: {

@@ -258,0 +258,0 @@ id?: number;

@@ -1,1 +0,1 @@

"use strict";var FriendStatusEnum,PlatformEnum,PoliticalEnum,PeopleMainEnum,LifeMainEnum,SmokingEnum,AlcoholEnum,RelationEnum,SchoolTypeEnum,SexEnum;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.NotFriend=0]="NotFriend",e[e.RequestSent=1]="RequestSent",e[e.IsSubscribed=2]="IsSubscribed",e[e.IsFriend=3]="IsFriend"}(FriendStatusEnum=exports.FriendStatusEnum||(exports.FriendStatusEnum={})),function(e){e[e.Mobile=1]="Mobile",e[e.IPhone=2]="IPhone",e[e.IPad=3]="IPad",e[e.Android=4]="Android",e[e.WindowsPhone=5]="WindowsPhone",e[e.Windows10=6]="Windows10",e[e.Desktop=7]="Desktop"}(PlatformEnum=exports.PlatformEnum||(exports.PlatformEnum={})),function(e){e[e.Communist=1]="Communist",e[e.Socialist=2]="Socialist",e[e.Moderate=3]="Moderate",e[e.Liberal=4]="Liberal",e[e.Conservative=5]="Conservative",e[e.Monarchical=6]="Monarchical",e[e.Ultraconservative=7]="Ultraconservative",e[e.Indifferent=8]="Indifferent",e[e.Libertarian=9]="Libertarian"}(PoliticalEnum=exports.PoliticalEnum||(exports.PoliticalEnum={})),function(e){e[e.SmartAndCreative=1]="SmartAndCreative",e[e.KindnessAndHonesty=2]="KindnessAndHonesty",e[e.BeautyAndHealth=3]="BeautyAndHealth",e[e.PowerAndWealth=4]="PowerAndWealth",e[e.CourageAndPerseverance=5]="CourageAndPerseverance",e[e.HumorAndLoveForLife=6]="HumorAndLoveForLife"}(PeopleMainEnum=exports.PeopleMainEnum||(exports.PeopleMainEnum={})),function(e){e[e.FamilyAndChildren=1]="FamilyAndChildren",e[e.CareerAndMoney=2]="CareerAndMoney",e[e.EntertainmentAndRecreation=3]="EntertainmentAndRecreation",e[e.ScienceAndResearch=4]="ScienceAndResearch",e[e.ImprovingTheWorld=5]="ImprovingTheWorld",e[e.SelfDevelopment=6]="SelfDevelopment",e[e.BeautyAndArt=7]="BeautyAndArt",e[e.FameAndInfluence=8]="FameAndInfluence"}(LifeMainEnum=exports.LifeMainEnum||(exports.LifeMainEnum={})),function(e){e[e.SharplyNegative=1]="SharplyNegative",e[e.Negative=2]="Negative",e[e.Compromise=3]="Compromise",e[e.Neutral=4]="Neutral",e[e.Positive=5]="Positive"}(SmokingEnum=exports.SmokingEnum||(exports.SmokingEnum={})),function(e){e[e.SharplyNegative=1]="SharplyNegative",e[e.Negative=2]="Negative",e[e.Compromise=3]="Compromise",e[e.Neutral=4]="Neutral",e[e.Positive=5]="Positive"}(AlcoholEnum=exports.AlcoholEnum||(exports.AlcoholEnum={})),function(e){e[e.Unknown=0]="Unknown",e[e.NotMarried=1]="NotMarried",e[e.HasFriend=2]="HasFriend",e[e.Betrothed=3]="Betrothed",e[e.Married=4]="Married",e[e.Complicated=5]="Complicated",e[e.ActiveSearch=6]="ActiveSearch",e[e.InLove=7]="InLove",e[e.CivilMarried=8]="CivilMarried"}(RelationEnum=exports.RelationEnum||(exports.RelationEnum={})),function(e){e[e.School=0]="School",e[e.Gymnasium=1]="Gymnasium",e[e.Lyceum=2]="Lyceum",e[e.BoardingSchool=3]="BoardingSchool",e[e.EveningSchool=4]="EveningSchool",e[e.MusicSchool=5]="MusicSchool",e[e.SportsSchool=6]="SportsSchool",e[e.ArtSchool=7]="ArtSchool",e[e.College=8]="College",e[e.ProfessionalLyceum=9]="ProfessionalLyceum",e[e.TechnicalSchool=10]="TechnicalSchool",e[e.PTU=11]="PTU",e[e.Institute=12]="Institute",e[e.ArtisticSchool=12]="ArtisticSchool"}(SchoolTypeEnum=exports.SchoolTypeEnum||(exports.SchoolTypeEnum={})),function(e){e[e.Unknown=0]="Unknown",e[e.Female=1]="Female",e[e.Male=2]="Male"}(SexEnum=exports.SexEnum||(exports.SexEnum={}));
"use strict";var FriendStatusEnum,PlatformEnum,PoliticalEnum,PeopleMainEnum,LifeMainEnum,SmokingEnum,AlcoholEnum,RelationsStatusEnum,SchoolTypeEnum,SexEnum;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.NotFriend=0]="NotFriend",e[e.RequestSent=1]="RequestSent",e[e.IsSubscribed=2]="IsSubscribed",e[e.IsFriend=3]="IsFriend"}(FriendStatusEnum=exports.FriendStatusEnum||(exports.FriendStatusEnum={})),function(e){e[e.Mobile=1]="Mobile",e[e.IPhone=2]="IPhone",e[e.IPad=3]="IPad",e[e.Android=4]="Android",e[e.WindowsPhone=5]="WindowsPhone",e[e.Windows10=6]="Windows10",e[e.Desktop=7]="Desktop"}(PlatformEnum=exports.PlatformEnum||(exports.PlatformEnum={})),function(e){e[e.Communist=1]="Communist",e[e.Socialist=2]="Socialist",e[e.Moderate=3]="Moderate",e[e.Liberal=4]="Liberal",e[e.Conservative=5]="Conservative",e[e.Monarchical=6]="Monarchical",e[e.Ultraconservative=7]="Ultraconservative",e[e.Indifferent=8]="Indifferent",e[e.Libertarian=9]="Libertarian"}(PoliticalEnum=exports.PoliticalEnum||(exports.PoliticalEnum={})),function(e){e[e.SmartAndCreative=1]="SmartAndCreative",e[e.KindnessAndHonesty=2]="KindnessAndHonesty",e[e.BeautyAndHealth=3]="BeautyAndHealth",e[e.PowerAndWealth=4]="PowerAndWealth",e[e.CourageAndPerseverance=5]="CourageAndPerseverance",e[e.HumorAndLoveForLife=6]="HumorAndLoveForLife"}(PeopleMainEnum=exports.PeopleMainEnum||(exports.PeopleMainEnum={})),function(e){e[e.FamilyAndChildren=1]="FamilyAndChildren",e[e.CareerAndMoney=2]="CareerAndMoney",e[e.EntertainmentAndRecreation=3]="EntertainmentAndRecreation",e[e.ScienceAndResearch=4]="ScienceAndResearch",e[e.ImprovingTheWorld=5]="ImprovingTheWorld",e[e.SelfDevelopment=6]="SelfDevelopment",e[e.BeautyAndArt=7]="BeautyAndArt",e[e.FameAndInfluence=8]="FameAndInfluence"}(LifeMainEnum=exports.LifeMainEnum||(exports.LifeMainEnum={})),function(e){e[e.SharplyNegative=1]="SharplyNegative",e[e.Negative=2]="Negative",e[e.Compromise=3]="Compromise",e[e.Neutral=4]="Neutral",e[e.Positive=5]="Positive"}(SmokingEnum=exports.SmokingEnum||(exports.SmokingEnum={})),function(e){e[e.SharplyNegative=1]="SharplyNegative",e[e.Negative=2]="Negative",e[e.Compromise=3]="Compromise",e[e.Neutral=4]="Neutral",e[e.Positive=5]="Positive"}(AlcoholEnum=exports.AlcoholEnum||(exports.AlcoholEnum={})),function(e){e[e.Unknown=0]="Unknown",e[e.NotMarried=1]="NotMarried",e[e.HasFriend=2]="HasFriend",e[e.Betrothed=3]="Betrothed",e[e.Married=4]="Married",e[e.Complicated=5]="Complicated",e[e.ActiveSearch=6]="ActiveSearch",e[e.InLove=7]="InLove",e[e.CivilMarried=8]="CivilMarried"}(RelationsStatusEnum=exports.RelationsStatusEnum||(exports.RelationsStatusEnum={})),function(e){e[e.School=0]="School",e[e.Gymnasium=1]="Gymnasium",e[e.Lyceum=2]="Lyceum",e[e.BoardingSchool=3]="BoardingSchool",e[e.EveningSchool=4]="EveningSchool",e[e.MusicSchool=5]="MusicSchool",e[e.SportsSchool=6]="SportsSchool",e[e.ArtSchool=7]="ArtSchool",e[e.College=8]="College",e[e.ProfessionalLyceum=9]="ProfessionalLyceum",e[e.TechnicalSchool=10]="TechnicalSchool",e[e.PTU=11]="PTU",e[e.Institute=12]="Institute",e[e.ArtisticSchool=12]="ArtisticSchool"}(SchoolTypeEnum=exports.SchoolTypeEnum||(exports.SchoolTypeEnum={})),function(e){e[e.Unknown=0]="Unknown",e[e.Female=1]="Female",e[e.Male=2]="Male"}(SexEnum=exports.SexEnum||(exports.SexEnum={}));

@@ -24,2 +24,6 @@ /**

/**
* All boolean types which could be accepted by lib
*/
export declare type BooleanType = boolean | PseudoBooleanType;
/**
* Object with fields id and title

@@ -26,0 +30,0 @@ */

@@ -1,2 +0,2 @@

import { PseudoBooleanType } from './types';
import { BooleanType, PseudoBooleanType } from './types';
/**

@@ -27,3 +27,3 @@ * Converts text to snake case

*/
export declare function formatOptionalBoolean(value: boolean | undefined): PseudoBooleanType | undefined;
export declare function formatOptionalBoolean(value: BooleanType | undefined): PseudoBooleanType | undefined;
/**

@@ -30,0 +30,0 @@ * Converts optional array of strings or numbers to string or undefined

@@ -1,1 +0,1 @@

"use strict";function createRecursiveKeysFormatter(e){var o=function(t){return null===t?null:Array.isArray(t)?t.map(o):"object"==typeof t?Object.keys(t).reduce(function(r,a){return r[e(a)]=o(t[a]),r},{}):t};return o}function toSnakeCase(e){return e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}function toCamelCase(e){return e.replace(/_./g,function(e){return e.slice(1).toUpperCase()})}function toPseudoBoolean(e){return e?1:0}function formatOptionalBoolean(e){return void 0===e?e:toPseudoBoolean(e)}function formatOptionalArray(e){return void 0===e?e:e.join(",")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.toSnakeCase=toSnakeCase,exports.recursiveToSnakeCase=createRecursiveKeysFormatter(toSnakeCase),exports.toCamelCase=toCamelCase,exports.recursiveToCamelCase=createRecursiveKeysFormatter(toCamelCase),exports.toPseudoBoolean=toPseudoBoolean,exports.formatOptionalBoolean=formatOptionalBoolean,exports.formatOptionalArray=formatOptionalArray;
"use strict";function createRecursiveKeysFormatter(e){var o=function(t){return null===t?null:Array.isArray(t)?t.map(o):"object"==typeof t?Object.keys(t).reduce(function(r,a){return r[e(a)]=o(t[a]),r},{}):t};return o}function toSnakeCase(e){return e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}function toCamelCase(e){return e.replace(/_./g,function(e){return e.slice(1).toUpperCase()})}function toPseudoBoolean(e){return e?1:0}function formatOptionalBoolean(e){return void 0===e?void 0:"boolean"==typeof e?toPseudoBoolean(e):e}function formatOptionalArray(e){return void 0===e?e:e.join(",")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.toSnakeCase=toSnakeCase,exports.recursiveToSnakeCase=createRecursiveKeysFormatter(toSnakeCase),exports.toCamelCase=toCamelCase,exports.recursiveToCamelCase=createRecursiveKeysFormatter(toCamelCase),exports.toPseudoBoolean=toPseudoBoolean,exports.formatOptionalBoolean=formatOptionalBoolean,exports.formatOptionalArray=formatOptionalArray;
{
"name": "vkontakte-api",
"version": "1.12.0",
"version": "1.13.0",
"description": "TypeScript library to make requests performing to VK API simple",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/wolframdeus/vk-api",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc