61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
{
|
|
// Corresponds to CF_Campaign / Contentful_Campaign.ts
|
|
name: "campaign",
|
|
description: "Campaign with URL pattern and optional content",
|
|
tags: ["marketing", "config"],
|
|
category: "config",
|
|
fields: {
|
|
campaignName: {
|
|
type: "string",
|
|
required: true,
|
|
description: "Campaign name",
|
|
},
|
|
urlPattern: {
|
|
type: "string",
|
|
required: true,
|
|
description: "URL pattern (e.g. regex) for campaign usage",
|
|
},
|
|
selector: {
|
|
type: "string",
|
|
required: true,
|
|
description: "CSS selector where content is inserted",
|
|
},
|
|
insertHtml: {
|
|
type: "string",
|
|
required: true,
|
|
enum: [
|
|
"afterbegin",
|
|
"beforeend",
|
|
"afterend",
|
|
"beforebegin",
|
|
"replace"
|
|
],
|
|
default: "beforeend",
|
|
description: "Position relative to selector",
|
|
},
|
|
timeUntil: {
|
|
type: "datetime",
|
|
description: "Time limit (until when the campaign runs)",
|
|
},
|
|
javascript: {
|
|
type: "string",
|
|
description: "Optional JavaScript",
|
|
},
|
|
medias: {
|
|
type: "array",
|
|
items: {
|
|
type: "reference",
|
|
collection: "img",
|
|
},
|
|
description: "Media (images)",
|
|
},
|
|
html: {
|
|
type: "html",
|
|
description: "HTML content",
|
|
},
|
|
css: {
|
|
type: "string",
|
|
description: "Optional CSS",
|
|
},
|
|
},
|
|
} |