diff --git a/package.json b/package.json index 25fb0ce..fdcc80b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-vk-sdk", - "version": "1.1.5", + "version": "1.2.0", "description": "", "main": "./distr/index.js", "types": "./distr/index.d.ts", diff --git a/src/api/BaseVKApi.ts b/src/api/BaseVKApi.ts index 71534f1..a619328 100644 --- a/src/api/BaseVKApi.ts +++ b/src/api/BaseVKApi.ts @@ -6,7 +6,7 @@ import {postRequest} from "./net"; const DEFAULT_REQUESTS_PER_SECOND = 3 const TIMEOUT = 5000 // 5 seconds const API_BASE_URL = 'https://api.vk.com/method/' -const API_VERSION = '5.116' +const API_VERSION = '5.124' export interface VKApiOptions { lang?: string | number, @@ -15,7 +15,8 @@ export interface VKApiOptions { token?: string, timeout?: number, requestsPerSecond?: number, - useQueue?: boolean + useQueue?: boolean, + version?: string } type GenericParams = { [key: string]: any } @@ -27,11 +28,13 @@ export class BaseVKApi { readonly queue?: AsyncQueue readonly token?: string readonly timeout: number + readonly version: string; constructor(options: VKApiOptions) { this.logger = options.logger this.token = options.token this.timeout = options.timeout || TIMEOUT + this.version = options.version || API_VERSION this.lang = options.lang this.testMode = options.testMode @@ -49,7 +52,7 @@ export class BaseVKApi { if (!params['testMode'] && !!this.testMode) params['testMode'] = this.testMode - params['v'] = API_VERSION + params['v'] = this.version params['access_token'] = params['access_token'] || this.token if (!params['access_token']) diff --git a/src/generated/MethodsProps.ts b/src/generated/MethodsProps.ts index b30c0b2..4bdac46 100644 --- a/src/generated/MethodsProps.ts +++ b/src/generated/MethodsProps.ts @@ -5214,6 +5214,10 @@ export interface MessagesEditParams { * undefined */ message_id?: number, + /** + * ID of the message in the conversation + */ + conversation_message_id?: number, /** * access token */ @@ -5861,6 +5865,10 @@ export interface MessagesSendParams { * undefined */ payload?: string, + /** + * Object that describes the source of user content for chat bots + */ + content_source?: string, /** * undefined */ diff --git a/src/generated/Models.ts b/src/generated/Models.ts index b21eb54..1128385 100644 --- a/src/generated/Models.ts +++ b/src/generated/Models.ts @@ -5671,8 +5671,9 @@ export interface MarketMarketItem { category: MarketMarketCategory, /** * Date when the item has been created in Unixtime + * Now it is returned only to the group administrator (since version 5.122) */ - date: number, + date?: number, /** * Item description */ @@ -5697,6 +5698,10 @@ export interface MarketMarketItem { * */ price: MarketPrice, + /** + * Dimensions and weight of the product. They are returned if they were specified when editing or saving the product + */ + dimensions?: MarketDimensions, /** * URL of the preview image */ @@ -5839,6 +5844,21 @@ export interface MarketPrice { text: string } +export interface MarketDimensions { + /** + * width in millimeters + */ + width: number, + /** + * height in millimeters + */ + height: number, + /** + * length in millimeters + */ + length: number +} + export interface MarketSection { /** * Section ID diff --git a/src/generated/Responses.ts b/src/generated/Responses.ts index 8ee7f53..71c5311 100644 --- a/src/generated/Responses.ts +++ b/src/generated/Responses.ts @@ -1854,11 +1854,7 @@ export interface StoriesGetPhotoUploadServerResponse { /** * Upload URL */ - upload_url: string, - /** - * Users ID who can to see story. - */ - user_ids: number[] + upload_url: string } export interface StoriesGetStatsV5200Response { /** @@ -1883,11 +1879,7 @@ export interface StoriesGetVideoUploadServerResponse { /** * Upload URL */ - upload_url: string, - /** - * Users ID who can to see story. - */ - user_ids: number[] + upload_url: string } export interface StoriesGetViewersExtendedV5115Response { /** diff --git a/src/vk-api-schema b/src/vk-api-schema index 0310700..f4bb779 160000 --- a/src/vk-api-schema +++ b/src/vk-api-schema @@ -1 +1 @@ -Subproject commit 0310700f404ebbaec056e3f8123a08bc9c2737d9 +Subproject commit f4bb779484379903edd19479a5a2bb1ae25b9463