Skip to content

Commit

Permalink
fix: modified campaigns types file (#974)
Browse files Browse the repository at this point in the history
* fix: modified campaigns types file

* fix: code formatting
  • Loading branch information
sravya-yelleti authored Aug 2, 2022
1 parent 287b0de commit 279d319
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/operations/campaigns/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
/**
Expand Down Expand Up @@ -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'),
}),
])
Expand Down

0 comments on commit 279d319

Please sign in to comment.