From 84d13b56af1f333e2bcf21e703910f3f78582005 Mon Sep 17 00:00:00 2001 From: Vasily Komarov Date: Wed, 2 Oct 2024 12:34:09 +0300 Subject: [PATCH] MA-19777: add height_type & orientation fields --- packages/core/CHANGELOG.md | 6 ++++++ packages/core/src/types/data.ts | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index cb428a3..07ef834 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,3 +1,9 @@ +## v2.15.1 + +- Добавлены новые параметры вызова метода `VKWebAppShowBannerAd` +- `height_type` - позволяет указать высоту баннера +- `orientation` - горизонталный / вертикальный баннер + ## v2.15.0 - `bridge.supports` помечен как устаревший. Используйте вместо него `bridge.supportsAsync`. diff --git a/packages/core/src/types/data.ts b/packages/core/src/types/data.ts index 5829352..9c3d198 100644 --- a/packages/core/src/types/data.ts +++ b/packages/core/src/types/data.ts @@ -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; }; @@ -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;