Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modified campaigns types file #974

Merged
merged 2 commits into from
Aug 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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