From a06a9b27a21f912d6b7f758202b79ac8a6739494 Mon Sep 17 00:00:00 2001 From: wolframdeus <34907325+wolframdeus@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:45:40 +0500 Subject: [PATCH] Types for UpdateConfig are divided (#62) --- src/types/data.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/types/data.ts b/src/types/data.ts index 327499d..ed9ab34 100644 --- a/src/types/data.ts +++ b/src/types/data.ts @@ -251,9 +251,18 @@ export type Insets = { }; /** - * Update config data + * Update config data for mvk (mobile browser). + */ +export type MobileUpdateConfigData = { + viewport_width: number; + viewport_height: number; + scheme: AppearanceSchemeType; +}; + +/** + * Update config data for native applications. */ -export type UpdateConfigData = { +export type NativeUpdateConfigData = { app: 'vkclient' | 'vkme'; app_id: string; appearance: AppearanceType; @@ -262,6 +271,11 @@ export type UpdateConfigData = { start_time: number; }; +/** + * Update config data + */ +export type UpdateConfigData = NativeUpdateConfigData | MobileUpdateConfigData; + export type WidgetPreviewRequestOptions = { /** Widget type */ type: WidgetType;