vkontakte-api
Advanced tools
Comparing version 1.18.0 to 1.18.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.18.1](https://github.com/wolframdeus/vk-api/compare/v1.18.0...v1.18.1) (2020-12-14) | ||
### Bug Fixes | ||
* **storage.get:** add better typings ([6912dac](https://github.com/wolframdeus/vk-api/commit/6912dac4852ace23db278586057fc86379f208cb)) | ||
## [1.18.0](https://github.com/wolframdeus/vk-api/compare/v1.17.0...v1.18.0) (2020-12-14) | ||
@@ -7,0 +14,0 @@ |
@@ -47,3 +47,3 @@ "use strict"; | ||
* @see https://vk.com/dev/storage.get | ||
* @type {(params: (({userId?: number} & {key: string} & RequestOptionalParams) | ({userId?: number} & {keys: string[]} & RequestOptionalParams))) => Promise<{key: string, value: string}[]>} | ||
* @type {<P extends IGetSingleKeyParams | IGetMultipleKeysParams>(params: P) => Promise<P extends IGetSingleKeyParams ? TGetSingleKeyResult : TGetMultipleKeysResult>} | ||
*/ | ||
@@ -50,0 +50,0 @@ _this.get = _this.r('get', function (params) { |
import { Repository } from '../Repository'; | ||
import { SendRequest } from '../../types'; | ||
import { IGetKeysParams, ISetParams, TGetKeysResult, TGetParams, TGetResult } from './types'; | ||
import { IGetKeysParams, IGetSingleKeyParams, ISetParams, TGetKeysResult, TGetMultipleKeysResult, TGetParams, TGetSingleKeyResult } from './types'; | ||
export declare class StorageRepository extends Repository { | ||
@@ -8,5 +8,5 @@ constructor(sendRequest: SendRequest); | ||
* @see https://vk.com/dev/storage.get | ||
* @type {(params: (({userId?: number} & {key: string} & RequestOptionalParams) | ({userId?: number} & {keys: string[]} & RequestOptionalParams))) => Promise<{key: string, value: string}[]>} | ||
* @type {<P extends IGetSingleKeyParams | IGetMultipleKeysParams>(params: P) => Promise<P extends IGetSingleKeyParams ? TGetSingleKeyResult : TGetMultipleKeysResult>} | ||
*/ | ||
get: import("../../types").RepositoryMethod<TGetParams, TGetResult>; | ||
get: <P extends TGetParams>(params: P) => Promise<P extends IGetSingleKeyParams ? string : TGetMultipleKeysResult>; | ||
/** | ||
@@ -13,0 +13,0 @@ * @see https://vk.com/dev/storage.getKeys |
/** | ||
* @see https://vk.com/dev/storage.get | ||
*/ | ||
export declare type TGetParams = { | ||
interface IGetSharedParams { | ||
userId?: number; | ||
} & ({ | ||
} | ||
export interface IGetSingleKeyParams extends IGetSharedParams { | ||
key: string; | ||
} | { | ||
} | ||
export interface IGetMultipleKeysParams extends IGetSharedParams { | ||
keys: string[]; | ||
}); | ||
export declare type TGetResult = { | ||
} | ||
export declare type TGetParams = IGetSingleKeyParams | IGetMultipleKeysParams; | ||
export declare type TGetSingleKeyResult = string; | ||
export declare type TGetMultipleKeysResult = { | ||
key: string; | ||
@@ -33,1 +37,2 @@ value: string; | ||
export declare type TSetResult = 1; | ||
export {}; |
{ | ||
"name": "vkontakte-api", | ||
"version": "1.18.0", | ||
"version": "1.18.1", | ||
"description": "TypeScript library to make requests performing to VK API simple", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/wolframdeus/vk-api", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258645
4616