@synap-core/workspace-templates 0.65.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/capabilities/design.capability.json +322 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/campaign-channel-platforms.template.test.ts +35 -0
- package/src/content-os.yaml +14 -1
- package/src/crm.yaml +14 -1
- package/src/marketing.yaml +14 -1
- package/src/templates.ts +15 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synap-core/workspace-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A campaign's `campaign-channel` names a platform (founder, 24 Nov 2026, "Add platforms").
|
|
3
|
+
*
|
|
4
|
+
* Content Studio narrows its format picker and "Goes out on" to the campaign's channel, matching the value to the
|
|
5
|
+
* networks a format declares and to a text's place (site, website, newsletter) without case. So the platforms are
|
|
6
|
+
* option values of the kind, kept identical in every template that carries the `campaign` kind. Enums only grow.
|
|
7
|
+
*/
|
|
8
|
+
import { describe, expect, it } from "vitest";
|
|
9
|
+
import { getWorkspaceTemplate } from "./templates.js";
|
|
10
|
+
|
|
11
|
+
const PLATFORMS = ["linkedin", "instagram", "website", "newsletter"];
|
|
12
|
+
const ORIGINAL = ["email", "social", "event", "content", "partnership", "paid", "organic", "other"];
|
|
13
|
+
const TEMPLATES = ["content-os", "crm", "marketing-campaign"];
|
|
14
|
+
|
|
15
|
+
const channelOptions = (slug: string) => {
|
|
16
|
+
const template = getWorkspaceTemplate(slug);
|
|
17
|
+
if (!template) throw new Error(`${slug} template is not registered`);
|
|
18
|
+
const campaign = template.profiles.find((p) => p.slug === "campaign");
|
|
19
|
+
const prop = campaign?.properties?.find((p) => p.slug === "campaign-channel");
|
|
20
|
+
return prop?.enumValues;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
describe("campaign-channel names a platform", () => {
|
|
24
|
+
for (const slug of TEMPLATES) {
|
|
25
|
+
it(`${slug}: linkedin, instagram, website and newsletter are options, the original ones stay`, () => {
|
|
26
|
+
const options = channelOptions(slug);
|
|
27
|
+
expect(options).toEqual(expect.arrayContaining([...ORIGINAL, ...PLATFORMS]));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
it("every template that carries the campaign kind offers the same options", () => {
|
|
32
|
+
const [first, ...rest] = TEMPLATES.map(channelOptions);
|
|
33
|
+
for (const options of rest) expect(options).toEqual(first);
|
|
34
|
+
});
|
|
35
|
+
});
|
package/src/content-os.yaml
CHANGED
|
@@ -1039,7 +1039,20 @@ profiles:
|
|
|
1039
1039
|
valueType: string
|
|
1040
1040
|
inputType: select
|
|
1041
1041
|
enumValues:
|
|
1042
|
-
[
|
|
1042
|
+
[
|
|
1043
|
+
email,
|
|
1044
|
+
social,
|
|
1045
|
+
event,
|
|
1046
|
+
content,
|
|
1047
|
+
partnership,
|
|
1048
|
+
paid,
|
|
1049
|
+
organic,
|
|
1050
|
+
other,
|
|
1051
|
+
linkedin,
|
|
1052
|
+
instagram,
|
|
1053
|
+
website,
|
|
1054
|
+
newsletter,
|
|
1055
|
+
]
|
|
1043
1056
|
- slug: campaign-goal
|
|
1044
1057
|
label: Goal
|
|
1045
1058
|
valueType: string
|
package/src/crm.yaml
CHANGED
|
@@ -574,7 +574,20 @@ profiles:
|
|
|
574
574
|
valueType: string
|
|
575
575
|
inputType: select
|
|
576
576
|
enumValues:
|
|
577
|
-
[
|
|
577
|
+
[
|
|
578
|
+
email,
|
|
579
|
+
social,
|
|
580
|
+
event,
|
|
581
|
+
content,
|
|
582
|
+
partnership,
|
|
583
|
+
paid,
|
|
584
|
+
organic,
|
|
585
|
+
other,
|
|
586
|
+
linkedin,
|
|
587
|
+
instagram,
|
|
588
|
+
website,
|
|
589
|
+
newsletter,
|
|
590
|
+
]
|
|
578
591
|
- slug: campaign-goal
|
|
579
592
|
label: Goal
|
|
580
593
|
valueType: string
|
package/src/marketing.yaml
CHANGED
|
@@ -75,7 +75,20 @@ profiles:
|
|
|
75
75
|
valueType: string
|
|
76
76
|
inputType: select
|
|
77
77
|
enumValues:
|
|
78
|
-
[
|
|
78
|
+
[
|
|
79
|
+
email,
|
|
80
|
+
social,
|
|
81
|
+
event,
|
|
82
|
+
content,
|
|
83
|
+
partnership,
|
|
84
|
+
paid,
|
|
85
|
+
organic,
|
|
86
|
+
other,
|
|
87
|
+
linkedin,
|
|
88
|
+
instagram,
|
|
89
|
+
website,
|
|
90
|
+
newsletter,
|
|
91
|
+
]
|
|
79
92
|
- slug: campaign-goal
|
|
80
93
|
label: Goal
|
|
81
94
|
valueType: string
|
package/src/templates.ts
CHANGED
|
@@ -11247,7 +11247,11 @@ const DATA = {
|
|
|
11247
11247
|
"partnership",
|
|
11248
11248
|
"paid",
|
|
11249
11249
|
"organic",
|
|
11250
|
-
"other"
|
|
11250
|
+
"other",
|
|
11251
|
+
"linkedin",
|
|
11252
|
+
"instagram",
|
|
11253
|
+
"website",
|
|
11254
|
+
"newsletter"
|
|
11251
11255
|
]
|
|
11252
11256
|
},
|
|
11253
11257
|
{
|
|
@@ -14750,7 +14754,11 @@ const DATA = {
|
|
|
14750
14754
|
"partnership",
|
|
14751
14755
|
"paid",
|
|
14752
14756
|
"organic",
|
|
14753
|
-
"other"
|
|
14757
|
+
"other",
|
|
14758
|
+
"linkedin",
|
|
14759
|
+
"instagram",
|
|
14760
|
+
"website",
|
|
14761
|
+
"newsletter"
|
|
14754
14762
|
]
|
|
14755
14763
|
},
|
|
14756
14764
|
{
|
|
@@ -27344,7 +27352,11 @@ const DATA = {
|
|
|
27344
27352
|
"partnership",
|
|
27345
27353
|
"paid",
|
|
27346
27354
|
"organic",
|
|
27347
|
-
"other"
|
|
27355
|
+
"other",
|
|
27356
|
+
"linkedin",
|
|
27357
|
+
"instagram",
|
|
27358
|
+
"website",
|
|
27359
|
+
"newsletter"
|
|
27348
27360
|
]
|
|
27349
27361
|
},
|
|
27350
27362
|
{
|