From 2e9981bd37044f96ce99ea4995e6995719382177 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 22 Oct 2024 17:41:11 -0300 Subject: [PATCH 01/11] feat: add SponsoredBanner and AdvertisementBanner types --- graphql/types/SponsoredBanner.graphql | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 graphql/types/SponsoredBanner.graphql diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql new file mode 100644 index 0000000..239ac89 --- /dev/null +++ b/graphql/types/SponsoredBanner.graphql @@ -0,0 +1,33 @@ +type SponsoredBanner { + """ + ID of the sponsored banner. + """ + bannerId: ID + """ + Sponsored campaign related information should be added here. + """ + advertisement: AdvertisementBanner +} + +type AdvertisementBanner { + """ + URL of the image to be displayed in the ad. + """ + imageUrl: String + """ + ID of the campaign owner of the ad item. + """ + campaignId: ID + """ + Cost of the goal action. E.g: CPC, cost per click. + """ + actionCost: Float + """ + Ad Request ID. + """ + adRequestId: ID + """ + Ad Response ID. + """ + adResponseId: ID +} From 97d9dfe5d8276a2160fd6303ca631c111e8ec6bf Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 22 Oct 2024 17:41:25 -0300 Subject: [PATCH 02/11] feat: add sponsoredBanners query with placement input --- graphql/schema.graphql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graphql/schema.graphql b/graphql/schema.graphql index e100a9d..2c60453 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -71,4 +71,10 @@ type Query { """ sponsoredCount: Int ): [SponsoredProduct] @cacheControl(scope: PUBLIC, maxAge: SHORT) + sponsoredBanners( + """ + Placement of the banner. Used for analytics purposes. + """ + placement: String +): [SponsoredBanner] @cacheControl(scope: PUBLIC, maxAge: SHORT) } From 5c92f18cf92b005e47d0e801b8babb212d0161a3 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 22 Oct 2024 17:45:35 -0300 Subject: [PATCH 03/11] feat: add adUnit field to AdvertisementBanner type --- graphql/types/SponsoredBanner.graphql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql index 239ac89..3c7dace 100644 --- a/graphql/types/SponsoredBanner.graphql +++ b/graphql/types/SponsoredBanner.graphql @@ -15,6 +15,10 @@ type AdvertisementBanner { """ imageUrl: String """ + Banner dimensions. + """ + adUnit: String + """ ID of the campaign owner of the ad item. """ campaignId: ID From 0d9456eff3a355b3126b819c68a008d849748a93 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 22 Oct 2024 18:13:22 -0300 Subject: [PATCH 04/11] feat: add adUnit and channel inputs to sponsoredBanners query --- graphql/schema.graphql | 14 +++++++++++++- graphql/types/SponsoredBanner.graphql | 4 ---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/graphql/schema.graphql b/graphql/schema.graphql index 2c60453..18b0b61 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -72,9 +72,21 @@ type Query { sponsoredCount: Int ): [SponsoredProduct] @cacheControl(scope: PUBLIC, maxAge: SHORT) sponsoredBanners( + """ + Identifier for users, logged in or not. Used for A/B tests. + """ + anonymousId: String """ Placement of the banner. Used for analytics purposes. """ placement: String -): [SponsoredBanner] @cacheControl(scope: PUBLIC, maxAge: SHORT) + """ + Banner dimensions. + """ + adUnit: String + """ + Channel where the banner is being shown. Used for analytics purposes. + """ + channel: String + ): [SponsoredBanner] @cacheControl(scope: PUBLIC, maxAge: SHORT) } diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql index 3c7dace..239ac89 100644 --- a/graphql/types/SponsoredBanner.graphql +++ b/graphql/types/SponsoredBanner.graphql @@ -15,10 +15,6 @@ type AdvertisementBanner { """ imageUrl: String """ - Banner dimensions. - """ - adUnit: String - """ ID of the campaign owner of the ad item. """ campaignId: ID From 188232449d752b2a191834cfbec7f7438018e4b4 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Thu, 24 Oct 2024 14:01:01 -0300 Subject: [PATCH 05/11] feat: add targetUrl field to AdvertisementBanner type --- graphql/types/SponsoredBanner.graphql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql index 239ac89..09f042c 100644 --- a/graphql/types/SponsoredBanner.graphql +++ b/graphql/types/SponsoredBanner.graphql @@ -15,6 +15,10 @@ type AdvertisementBanner { """ imageUrl: String """ + URL to be redirected to when the ad is clicked. + """ + targetUrl: String + """ ID of the campaign owner of the ad item. """ campaignId: ID From a643db4f50a14eee2e8cf9dde66c75401fa7e871 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Mon, 28 Oct 2024 19:43:44 -0300 Subject: [PATCH 06/11] feat: update AdvertisementBanner type with bannerImageId, width, and height fields --- graphql/types/SponsoredBanner.graphql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql index 09f042c..79bc1d7 100644 --- a/graphql/types/SponsoredBanner.graphql +++ b/graphql/types/SponsoredBanner.graphql @@ -19,19 +19,19 @@ type AdvertisementBanner { """ targetUrl: String """ - ID of the campaign owner of the ad item. + Ad Response ID. """ - campaignId: ID + adResponseId: ID """ - Cost of the goal action. E.g: CPC, cost per click. + Banner Image ID. """ - actionCost: Float + bannerImageId: ID """ - Ad Request ID. + Width of the banner in pixels. """ - adRequestId: ID + width: Int """ - Ad Response ID. + Height of the banner in pixels. """ - adResponseId: ID + height: Int } From 5598c8494170bf92a5ca03bb3632d8c90ef6f865 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Mon, 28 Oct 2024 19:57:54 -0300 Subject: [PATCH 07/11] feat: update SponsoredBanner type with adResponseId and bannerImageId fields --- graphql/types/SponsoredBanner.graphql | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/graphql/types/SponsoredBanner.graphql b/graphql/types/SponsoredBanner.graphql index 79bc1d7..ca2fa23 100644 --- a/graphql/types/SponsoredBanner.graphql +++ b/graphql/types/SponsoredBanner.graphql @@ -2,7 +2,7 @@ type SponsoredBanner { """ ID of the sponsored banner. """ - bannerId: ID + adResponseId: ID """ Sponsored campaign related information should be added here. """ @@ -10,6 +10,10 @@ type SponsoredBanner { } type AdvertisementBanner { + """ + Banner Image ID. + """ + bannerImageId: ID """ URL of the image to be displayed in the ad. """ @@ -19,14 +23,6 @@ type AdvertisementBanner { """ targetUrl: String """ - Ad Response ID. - """ - adResponseId: ID - """ - Banner Image ID. - """ - bannerImageId: ID - """ Width of the banner in pixels. """ width: Int From 2a1544e107d82ed7ba271cf71ac1b0f39c2d2c1e Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 29 Oct 2024 16:40:32 -0300 Subject: [PATCH 08/11] chore: update changelog and version --- CHANGELOG.md | 8 ++++++++ manifest.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf549e..e776d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.3.1] - 2024-10-29 + +### Added + +- `sponsoredBanners` query. +- `SponsoredBanner` type. +- `AdvertisementBanner` type. + ## [0.3.0] - 2024-07-08 ### Added diff --git a/manifest.json b/manifest.json index 0c02462..8a601d0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "vendor": "vtex", "name": "adserver-graphql", - "version": "0.3.0", + "version": "0.3.1", "title": "Adserver Graphql", "description": "Adserver Graphql", "credentialType": "absolute", From 40a09726e33a3b5749d530b1458b158c9b12474c Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Tue, 29 Oct 2024 16:43:12 -0300 Subject: [PATCH 09/11] chore: remove manual release --- CHANGELOG.md | 2 -- manifest.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e776d6a..54580f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## [0.3.1] - 2024-10-29 - ### Added - `sponsoredBanners` query. diff --git a/manifest.json b/manifest.json index 8a601d0..0c02462 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "vendor": "vtex", "name": "adserver-graphql", - "version": "0.3.1", + "version": "0.3.0", "title": "Adserver Graphql", "description": "Adserver Graphql", "credentialType": "absolute", From 939c2ce2fa04a49062284da8227ed33cc077f2fa Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Wed, 30 Oct 2024 11:02:40 -0300 Subject: [PATCH 10/11] feat: Update sponsoredBanners query with sponsoredCount input --- graphql/schema.graphql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/graphql/schema.graphql b/graphql/schema.graphql index 18b0b61..a820d07 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -73,9 +73,9 @@ type Query { ): [SponsoredProduct] @cacheControl(scope: PUBLIC, maxAge: SHORT) sponsoredBanners( """ - Identifier for users, logged in or not. Used for A/B tests. + Maximum number of sponsored banners that should be returned. """ - anonymousId: String + sponsoredCount: Int """ Placement of the banner. Used for analytics purposes. """ @@ -88,5 +88,9 @@ type Query { Channel where the banner is being shown. Used for analytics purposes. """ channel: String + """ + Identifier for users, logged in or not. Used for A/B tests. + """ + anonymousId: String ): [SponsoredBanner] @cacheControl(scope: PUBLIC, maxAge: SHORT) } From 459d859491056f1b72eb70012d9947c45c1b20f8 Mon Sep 17 00:00:00 2001 From: Luara Kerlen dos Santos Rangel Date: Thu, 31 Oct 2024 14:38:54 -0300 Subject: [PATCH 11/11] feat: Add enums for adUnit, channel, and placement types --- graphql/schema.graphql | 6 +++--- graphql/types/AdUnit.graphql | 14 ++++++++++++++ graphql/types/Channel.graphql | 7 +++++++ graphql/types/Placement.graphql | 10 ++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 graphql/types/AdUnit.graphql create mode 100644 graphql/types/Channel.graphql create mode 100644 graphql/types/Placement.graphql diff --git a/graphql/schema.graphql b/graphql/schema.graphql index a820d07..25ea78b 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -79,15 +79,15 @@ type Query { """ Placement of the banner. Used for analytics purposes. """ - placement: String + placement: Placement """ Banner dimensions. """ - adUnit: String + adUnit: AdUnit """ Channel where the banner is being shown. Used for analytics purposes. """ - channel: String + channel: Channel """ Identifier for users, logged in or not. Used for A/B tests. """ diff --git a/graphql/types/AdUnit.graphql b/graphql/types/AdUnit.graphql new file mode 100644 index 0000000..5808bb0 --- /dev/null +++ b/graphql/types/AdUnit.graphql @@ -0,0 +1,14 @@ +enum AdUnit { + billboard + smartphonebanner + leaderboard + superleaderboard + portrait + skyscraper + mediumrectangle + button120x60 + mobilephoneinterstitial + featurephonesmallbanner + featurephonemediumbanner + featurephonelargebanner +} diff --git a/graphql/types/Channel.graphql b/graphql/types/Channel.graphql new file mode 100644 index 0000000..d6e6e82 --- /dev/null +++ b/graphql/types/Channel.graphql @@ -0,0 +1,7 @@ +enum Channel { + website + android + ios + msite + whatsapp +} diff --git a/graphql/types/Placement.graphql b/graphql/types/Placement.graphql new file mode 100644 index 0000000..5ba1110 --- /dev/null +++ b/graphql/types/Placement.graphql @@ -0,0 +1,10 @@ +enum Placement { + top_search + middle_search + home_shelfpdp_shelf + search_shelf + cart_shelf + plp_shelf + autocomplete + homepage +}