From d9cb28e1e6d47fe9af676bd30abf4bed57b2161b Mon Sep 17 00:00:00 2001 From: sravya-yelleti Date: Tue, 2 Aug 2022 12:48:09 +0530 Subject: [PATCH 1/2] fix: modified campaigns types file --- src/operations/campaigns/types.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/operations/campaigns/types.ts b/src/operations/campaigns/types.ts index da36cab44..98e8636e0 100644 --- a/src/operations/campaigns/types.ts +++ b/src/operations/campaigns/types.ts @@ -380,16 +380,17 @@ export const SponsoredBrandsCampaign = t.intersection([ t.literal('running'), t.literal('scheduled'), t.literal('terminated'), + t.literal('portfolioEnded'), ]), ), /** * Landing page type is required. The presence of other fields depends on the landing page type. This property may not be modified after campaign creation. */ - landingPage: t.strict({ + landingPage: t.union([t.strict({ pageType: t.union([t.literal('store'), t.literal('detailPage')]), url: t.string, - }), + }), t.undefined]), }), t.partial({ /** @@ -603,7 +604,7 @@ export const SponsoredDisplayCampaign = t.intersection([ /** * The docs don't metion these fields */ - costType: t.literal('cpc'), + costType: t.union([t.literal('cpc'), t.literal('vcpm')]), deliveryProfile: t.literal('as_soon_as_possible'), }), ]) From d44359f13731968bf3ae65012ffc3a63e3f8bb40 Mon Sep 17 00:00:00 2001 From: sravya-yelleti Date: Tue, 2 Aug 2022 13:23:40 +0530 Subject: [PATCH 2/2] fix: code formatting --- src/operations/campaigns/types.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/operations/campaigns/types.ts b/src/operations/campaigns/types.ts index 98e8636e0..d0c1b5304 100644 --- a/src/operations/campaigns/types.ts +++ b/src/operations/campaigns/types.ts @@ -387,10 +387,13 @@ export const SponsoredBrandsCampaign = t.intersection([ /** * Landing page type is required. The presence of other fields depends on the landing page type. This property may not be modified after campaign creation. */ - landingPage: t.union([t.strict({ - pageType: t.union([t.literal('store'), t.literal('detailPage')]), - url: t.string, - }), t.undefined]), + landingPage: t.union([ + t.strict({ + pageType: t.union([t.literal('store'), t.literal('detailPage')]), + url: t.string, + }), + t.undefined, + ]), }), t.partial({ /**