Skip to content

Commit

Permalink
Types for UpdateConfig are divided (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Mar 2, 2020
1 parent 76422c5 commit a06a9b2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit a06a9b2

Please sign in to comment.