Skip to content

Commit

Permalink
Merge pull request #572 from VKCOM/vasiliykomarov/task/add-banner-pro…
Browse files Browse the repository at this point in the history
…perties/MA-19777

MA-19777: add height_type & orientation fields
  • Loading branch information
povarok authored Oct 3, 2024
2 parents dd6ed7e + fd82230 commit cf1bd18
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
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`.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vkontakte/vk-bridge",
"version": "2.15.0",
"version": "2.15.1",
"description": "Connects a Mini App with VK client",
"license": "MIT",
"main": "dist/index.js",
Expand Down
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 cf1bd18

Please sign in to comment.