Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Соответствие версии апи вк 5.124 #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 6 additions & 3 deletions src/api/BaseVKApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -15,7 +15,8 @@ export interface VKApiOptions {
token?: string,
timeout?: number,
requestsPerSecond?: number,
useQueue?: boolean
useQueue?: boolean,
version?: string
}

type GenericParams = { [key: string]: any }
Expand All @@ -27,11 +28,13 @@ export class BaseVKApi {
readonly queue?: AsyncQueue<any>
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

Expand All @@ -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'])
Expand Down
8 changes: 8 additions & 0 deletions src/generated/MethodsProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5214,6 +5214,10 @@ export interface MessagesEditParams {
* undefined
*/
message_id?: number,
/**
* ID of the message in the conversation
*/
conversation_message_id?: number,
/**
* access token
*/
Expand Down Expand Up @@ -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
*/
Expand Down
22 changes: 21 additions & 1 deletion src/generated/Models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down
12 changes: 2 additions & 10 deletions src/generated/Responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand All @@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/vk-api-schema
Submodule vk-api-schema updated 8 files
+5 −4 README.md
+815 −0 errors.json
+2,185 −1,541 methods.json
+1,420 −275 objects.json
+3 −2 package.json
+2,138 −448 responses.json
+140 −44 schema.json
+1 −1 tasks/release.sh