Skip to content

Commit

Permalink
MA-19777: add height_type & orientation fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasily Komarov committed Oct 3, 2024
1 parent dd6ed7e commit 84d13b5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.15.1

- Добавлены новые параметры вызова метода `VKWebAppShowBannerAd`
- `height_type` - позволяет указать высоту баннера
- `orientation` - горизонталный / вертикальный баннер

## v2.15.0

- `bridge.supports` помечен как устаревший. Используйте вместо него `bridge.supportsAsync`.
16 changes: 15 additions & 1 deletion packages/core/src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,22 @@ export enum BannerAdAlign {
CENTER = 'center',
}

export enum BannerAdHeightType {
COMPACT = 'compact',
REGULAR = 'regular',
}

export enum BannerAdOrientation {
HORIZONTAL = 'horizontal',
VERTICAL = 'vertical',
}

export type ShowBannerAdRequest = {
banner_location: BannerAdLocation;
banner_align?: BannerAdAlign;
layout_type?: BannerAdLayoutType;
height_type?: BannerAdHeightType;
orientation?: BannerAdOrientation;
can_close?: boolean;
};

Expand Down Expand Up @@ -1061,8 +1073,10 @@ export type VKWebAppShowBannerAdResponse = {
banner_width: number;
banner_height: number;
banner_location: BannerAdLocation;
banner_align: BannerAdAlign;
banner_align?: BannerAdAlign;
layout_type: BannerAdLayoutType;
height_type: BannerAdHeightType;
orientation?: BannerAdOrientation;
};

export type VKWebAppCheckBannerAdResponse = VKWebAppShowBannerAdResponse;
Expand Down

0 comments on commit 84d13b5

Please sign in to comment.