From 279d31952f36cb2cf4d5da1e6c31e6d23858b6eb Mon Sep 17 00:00:00 2001 From: sravya-yelleti <75785120+sravya-yelleti@users.noreply.github.com> Date: Tue, 2 Aug 2022 22:16:19 +0530 Subject: [PATCH] fix: modified campaigns types file (#974) * fix: modified campaigns types file * fix: code formatting --- src/operations/campaigns/types.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/operations/campaigns/types.ts b/src/operations/campaigns/types.ts index da36cab44..d0c1b5304 100644 --- a/src/operations/campaigns/types.ts +++ b/src/operations/campaigns/types.ts @@ -380,16 +380,20 @@ 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({ - pageType: t.union([t.literal('store'), t.literal('detailPage')]), - url: t.string, - }), + landingPage: t.union([ + t.strict({ + pageType: t.union([t.literal('store'), t.literal('detailPage')]), + url: t.string, + }), + t.undefined, + ]), }), t.partial({ /** @@ -603,7 +607,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'), }), ])