@contractspec/example.learning-journey-crm-onboarding 3.7.17 → 3.7.18
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/.turbo/turbo-build.log +33 -33
- package/CHANGELOG.md +13 -0
- package/dist/browser/docs/crm-onboarding.docblock.js +1 -37
- package/dist/browser/docs/index.js +1 -37
- package/dist/browser/example.js +1 -32
- package/dist/browser/handlers/demo.handlers.js +1 -117
- package/dist/browser/index.js +1 -401
- package/dist/browser/learning-journey-crm-onboarding.feature.js +1 -48
- package/dist/browser/operations/index.js +1 -209
- package/dist/browser/presentations/index.js +1 -256
- package/dist/browser/tests/operations.test-spec.js +1 -34
- package/dist/browser/track.js +1 -95
- package/dist/docs/crm-onboarding.docblock.js +1 -37
- package/dist/docs/index.js +1 -37
- package/dist/example.js +1 -32
- package/dist/handlers/demo.handlers.js +1 -117
- package/dist/index.js +1 -401
- package/dist/learning-journey-crm-onboarding.feature.js +1 -48
- package/dist/node/docs/crm-onboarding.docblock.js +1 -37
- package/dist/node/docs/index.js +1 -37
- package/dist/node/example.js +1 -32
- package/dist/node/handlers/demo.handlers.js +1 -117
- package/dist/node/index.js +1 -401
- package/dist/node/learning-journey-crm-onboarding.feature.js +1 -48
- package/dist/node/operations/index.js +1 -209
- package/dist/node/presentations/index.js +1 -256
- package/dist/node/tests/operations.test-spec.js +1 -34
- package/dist/node/track.js +1 -95
- package/dist/operations/index.js +1 -209
- package/dist/presentations/index.js +1 -256
- package/dist/tests/operations.test-spec.js +1 -34
- package/dist/track.js +1 -95
- package/package.json +7 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,45 +2,45 @@ $ contractspec-bun-build prebuild
|
|
|
2
2
|
$ bun run build:bundle && bun run build:types
|
|
3
3
|
$ contractspec-bun-build transpile
|
|
4
4
|
[contractspec-bun-build] transpile target=bun root=src entries=10 noBundle=false
|
|
5
|
-
Bundled 10 modules in
|
|
5
|
+
Bundled 10 modules in 47ms
|
|
6
6
|
|
|
7
|
-
docs/crm-onboarding.docblock.js 1.
|
|
8
|
-
tests/operations.test-spec.js 0.
|
|
9
|
-
./index.js
|
|
10
|
-
docs/index.js 1.
|
|
11
|
-
./example.js 0.
|
|
12
|
-
handlers/demo.handlers.js
|
|
13
|
-
./learning-journey-crm-onboarding.feature.js 1.
|
|
14
|
-
presentations/index.js
|
|
15
|
-
operations/index.js
|
|
16
|
-
./track.js
|
|
7
|
+
docs/crm-onboarding.docblock.js 1.34 KB (entry point)
|
|
8
|
+
tests/operations.test-spec.js 0.67 KB (entry point)
|
|
9
|
+
./index.js 9.25 KB (entry point)
|
|
10
|
+
docs/index.js 1.34 KB (entry point)
|
|
11
|
+
./example.js 0.73 KB (entry point)
|
|
12
|
+
handlers/demo.handlers.js 2.30 KB (entry point)
|
|
13
|
+
./learning-journey-crm-onboarding.feature.js 1.19 KB (entry point)
|
|
14
|
+
presentations/index.js 5.53 KB (entry point)
|
|
15
|
+
operations/index.js 4.72 KB (entry point)
|
|
16
|
+
./track.js 1.99 KB (entry point)
|
|
17
17
|
|
|
18
18
|
[contractspec-bun-build] transpile target=node root=src entries=10 noBundle=false
|
|
19
|
-
Bundled 10 modules in
|
|
19
|
+
Bundled 10 modules in 43ms
|
|
20
20
|
|
|
21
|
-
docs/crm-onboarding.docblock.js 1.
|
|
22
|
-
tests/operations.test-spec.js 0.
|
|
23
|
-
./index.js
|
|
24
|
-
docs/index.js 1.
|
|
25
|
-
./example.js 0.
|
|
26
|
-
handlers/demo.handlers.js
|
|
27
|
-
./learning-journey-crm-onboarding.feature.js 1.
|
|
28
|
-
presentations/index.js
|
|
29
|
-
operations/index.js
|
|
30
|
-
./track.js
|
|
21
|
+
docs/crm-onboarding.docblock.js 1.31 KB (entry point)
|
|
22
|
+
tests/operations.test-spec.js 0.66 KB (entry point)
|
|
23
|
+
./index.js 9.21 KB (entry point)
|
|
24
|
+
docs/index.js 1.31 KB (entry point)
|
|
25
|
+
./example.js 0.71 KB (entry point)
|
|
26
|
+
handlers/demo.handlers.js 2.29 KB (entry point)
|
|
27
|
+
./learning-journey-crm-onboarding.feature.js 1.18 KB (entry point)
|
|
28
|
+
presentations/index.js 5.52 KB (entry point)
|
|
29
|
+
operations/index.js 4.71 KB (entry point)
|
|
30
|
+
./track.js 1.99 KB (entry point)
|
|
31
31
|
|
|
32
32
|
[contractspec-bun-build] transpile target=browser root=src entries=10 noBundle=false
|
|
33
|
-
Bundled 10 modules in
|
|
33
|
+
Bundled 10 modules in 48ms
|
|
34
34
|
|
|
35
|
-
docs/crm-onboarding.docblock.js 1.
|
|
36
|
-
tests/operations.test-spec.js 0.
|
|
37
|
-
./index.js
|
|
38
|
-
docs/index.js 1.
|
|
39
|
-
./example.js 0.
|
|
40
|
-
handlers/demo.handlers.js
|
|
41
|
-
./learning-journey-crm-onboarding.feature.js 1.
|
|
42
|
-
presentations/index.js
|
|
43
|
-
operations/index.js
|
|
44
|
-
./track.js
|
|
35
|
+
docs/crm-onboarding.docblock.js 1.31 KB (entry point)
|
|
36
|
+
tests/operations.test-spec.js 0.66 KB (entry point)
|
|
37
|
+
./index.js 9.21 KB (entry point)
|
|
38
|
+
docs/index.js 1.31 KB (entry point)
|
|
39
|
+
./example.js 0.71 KB (entry point)
|
|
40
|
+
handlers/demo.handlers.js 2.29 KB (entry point)
|
|
41
|
+
./learning-journey-crm-onboarding.feature.js 1.18 KB (entry point)
|
|
42
|
+
presentations/index.js 5.52 KB (entry point)
|
|
43
|
+
operations/index.js 4.71 KB (entry point)
|
|
44
|
+
./track.js 1.99 KB (entry point)
|
|
45
45
|
|
|
46
46
|
$ contractspec-bun-build types
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @contractspec/example.learning-journey-crm-onboarding
|
|
2
2
|
|
|
3
|
+
## 3.7.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Introduce the Builder v3 control plane as a governed authoring layer over external execution providers.
|
|
10
|
+
- Updated dependencies because of Implement ContractSpec Connect as a first-class spec, runtime, and CLI workflow.
|
|
11
|
+
- @contractspec/example.crm-pipeline@3.7.18
|
|
12
|
+
- @contractspec/module.learning-journey@3.7.17
|
|
13
|
+
- @contractspec/lib.contracts-spec@5.2.0
|
|
14
|
+
- @contractspec/lib.schema@3.7.14
|
|
15
|
+
|
|
3
16
|
## 3.7.17
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var crmOnboardingDocBlocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.learning-journey.crm-onboarding",
|
|
6
|
-
title: "Learning Journey — CRM First Win",
|
|
7
|
-
summary: "Onboarding track for the CRM Pipeline example that drives users to first closed-won deal.",
|
|
8
|
-
kind: "reference",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/learning-journey/crm-onboarding",
|
|
11
|
-
tags: ["learning", "crm", "onboarding"],
|
|
12
|
-
body: `## Track
|
|
13
|
-
- **Key**: \`crm_first_win\`
|
|
14
|
-
- **Persona**: CRM adopter
|
|
15
|
-
- **Goal**: From empty CRM to first closed-won deal with follow-up
|
|
16
|
-
|
|
17
|
-
## Steps & Events
|
|
18
|
-
1) \`create_pipeline\` → \`pipeline.created\`
|
|
19
|
-
2) \`create_contact_and_company\` → \`contact.created\`
|
|
20
|
-
3) \`create_first_deal\` → \`deal.created\`
|
|
21
|
-
4) \`move_deal_in_pipeline\` → \`deal.moved\`
|
|
22
|
-
5) \`close_deal_won\` → \`deal.won\`
|
|
23
|
-
6) \`setup_follow_up\` → \`task.completed\` (type: follow_up)
|
|
24
|
-
|
|
25
|
-
XP: 15/20/20/20/30/30 with 25 bonus within 72h. Badge: \`crm_first_win\`.
|
|
26
|
-
|
|
27
|
-
## Wiring
|
|
28
|
-
- Depends on \`@contractspec/example.crm-pipeline\` events.
|
|
29
|
-
- Tracks export from \`@contractspec/example.learning-journey-crm-onboarding/track\`.
|
|
30
|
-
- Use onboarding API:
|
|
31
|
-
- \`learning.onboarding.listTracks\`
|
|
32
|
-
- \`learning.onboarding.getProgress\`
|
|
33
|
-
- \`learning.onboarding.recordEvent\` wired from CRM event bus handlers.
|
|
34
|
-
- Surface in CRM dashboard/pipeline UI to guide new users.`
|
|
35
|
-
}
|
|
36
|
-
];
|
|
37
|
-
registerDocBlocks(crmOnboardingDocBlocks);
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.learning-journey.crm-onboarding",title:"Learning Journey — CRM First Win",summary:"Onboarding track for the CRM Pipeline example that drives users to first closed-won deal.",kind:"reference",visibility:"public",route:"/docs/learning-journey/crm-onboarding",tags:["learning","crm","onboarding"],body:"## Track\n- **Key**: `crm_first_win`\n- **Persona**: CRM adopter\n- **Goal**: From empty CRM to first closed-won deal with follow-up\n\n## Steps & Events\n1) `create_pipeline` → `pipeline.created`\n2) `create_contact_and_company` → `contact.created`\n3) `create_first_deal` → `deal.created`\n4) `move_deal_in_pipeline` → `deal.moved`\n5) `close_deal_won` → `deal.won`\n6) `setup_follow_up` → `task.completed` (type: follow_up)\n\nXP: 15/20/20/20/30/30 with 25 bonus within 72h. Badge: `crm_first_win`.\n\n## Wiring\n- Depends on `@contractspec/example.crm-pipeline` events.\n- Tracks export from `@contractspec/example.learning-journey-crm-onboarding/track`.\n- Use onboarding API:\n - `learning.onboarding.listTracks`\n - `learning.onboarding.getProgress`\n - `learning.onboarding.recordEvent` wired from CRM event bus handlers.\n- Surface in CRM dashboard/pipeline UI to guide new users."}];f(h);
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var crmOnboardingDocBlocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.learning-journey.crm-onboarding",
|
|
6
|
-
title: "Learning Journey — CRM First Win",
|
|
7
|
-
summary: "Onboarding track for the CRM Pipeline example that drives users to first closed-won deal.",
|
|
8
|
-
kind: "reference",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/learning-journey/crm-onboarding",
|
|
11
|
-
tags: ["learning", "crm", "onboarding"],
|
|
12
|
-
body: `## Track
|
|
13
|
-
- **Key**: \`crm_first_win\`
|
|
14
|
-
- **Persona**: CRM adopter
|
|
15
|
-
- **Goal**: From empty CRM to first closed-won deal with follow-up
|
|
16
|
-
|
|
17
|
-
## Steps & Events
|
|
18
|
-
1) \`create_pipeline\` → \`pipeline.created\`
|
|
19
|
-
2) \`create_contact_and_company\` → \`contact.created\`
|
|
20
|
-
3) \`create_first_deal\` → \`deal.created\`
|
|
21
|
-
4) \`move_deal_in_pipeline\` → \`deal.moved\`
|
|
22
|
-
5) \`close_deal_won\` → \`deal.won\`
|
|
23
|
-
6) \`setup_follow_up\` → \`task.completed\` (type: follow_up)
|
|
24
|
-
|
|
25
|
-
XP: 15/20/20/20/30/30 with 25 bonus within 72h. Badge: \`crm_first_win\`.
|
|
26
|
-
|
|
27
|
-
## Wiring
|
|
28
|
-
- Depends on \`@contractspec/example.crm-pipeline\` events.
|
|
29
|
-
- Tracks export from \`@contractspec/example.learning-journey-crm-onboarding/track\`.
|
|
30
|
-
- Use onboarding API:
|
|
31
|
-
- \`learning.onboarding.listTracks\`
|
|
32
|
-
- \`learning.onboarding.getProgress\`
|
|
33
|
-
- \`learning.onboarding.recordEvent\` wired from CRM event bus handlers.
|
|
34
|
-
- Surface in CRM dashboard/pipeline UI to guide new users.`
|
|
35
|
-
}
|
|
36
|
-
];
|
|
37
|
-
registerDocBlocks(crmOnboardingDocBlocks);
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.learning-journey.crm-onboarding",title:"Learning Journey — CRM First Win",summary:"Onboarding track for the CRM Pipeline example that drives users to first closed-won deal.",kind:"reference",visibility:"public",route:"/docs/learning-journey/crm-onboarding",tags:["learning","crm","onboarding"],body:"## Track\n- **Key**: `crm_first_win`\n- **Persona**: CRM adopter\n- **Goal**: From empty CRM to first closed-won deal with follow-up\n\n## Steps & Events\n1) `create_pipeline` → `pipeline.created`\n2) `create_contact_and_company` → `contact.created`\n3) `create_first_deal` → `deal.created`\n4) `move_deal_in_pipeline` → `deal.moved`\n5) `close_deal_won` → `deal.won`\n6) `setup_follow_up` → `task.completed` (type: follow_up)\n\nXP: 15/20/20/20/30/30 with 25 bonus within 72h. Badge: `crm_first_win`.\n\n## Wiring\n- Depends on `@contractspec/example.crm-pipeline` events.\n- Tracks export from `@contractspec/example.learning-journey-crm-onboarding/track`.\n- Use onboarding API:\n - `learning.onboarding.listTracks`\n - `learning.onboarding.getProgress`\n - `learning.onboarding.recordEvent` wired from CRM event bus handlers.\n- Surface in CRM dashboard/pipeline UI to guide new users."}];f(h);
|
package/dist/browser/example.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineExample } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
var example = defineExample({
|
|
4
|
-
meta: {
|
|
5
|
-
key: "learning-journey-crm-onboarding",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
title: "Learning Journey — CRM First Win",
|
|
8
|
-
description: "Onboarding track for CRM Pipeline driving users from empty CRM to first closed-won deal.",
|
|
9
|
-
kind: "template",
|
|
10
|
-
visibility: "public",
|
|
11
|
-
stability: "experimental",
|
|
12
|
-
owners: ["@platform.core"],
|
|
13
|
-
tags: ["learning", "crm", "onboarding"]
|
|
14
|
-
},
|
|
15
|
-
docs: {
|
|
16
|
-
rootDocId: "docs.learning-journey.crm-onboarding"
|
|
17
|
-
},
|
|
18
|
-
entrypoints: {
|
|
19
|
-
packageName: "@contractspec/example.learning-journey-crm-onboarding",
|
|
20
|
-
docs: "./docs"
|
|
21
|
-
},
|
|
22
|
-
surfaces: {
|
|
23
|
-
templates: true,
|
|
24
|
-
sandbox: { enabled: true, modes: ["playground", "markdown"] },
|
|
25
|
-
studio: { enabled: true, installable: true },
|
|
26
|
-
mcp: { enabled: true }
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var example_default = example;
|
|
30
|
-
export {
|
|
31
|
-
example_default as default
|
|
32
|
-
};
|
|
1
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"learning-journey-crm-onboarding",version:"1.0.0",title:"Learning Journey — CRM First Win",description:"Onboarding track for CRM Pipeline driving users from empty CRM to first closed-won deal.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","crm","onboarding"]},docs:{rootDocId:"docs.learning-journey.crm-onboarding"},entrypoints:{packageName:"@contractspec/example.learning-journey-crm-onboarding",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
|
|
@@ -1,117 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var crmFirstWinTrack = {
|
|
3
|
-
id: "crm_first_win",
|
|
4
|
-
productId: "crm-pipeline",
|
|
5
|
-
name: "CRM First Win",
|
|
6
|
-
description: "Guide a new CRM user from empty pipeline to first closed-won deal.",
|
|
7
|
-
targetUserSegment: "crm_adopter",
|
|
8
|
-
targetRole: "sales",
|
|
9
|
-
totalXp: 135,
|
|
10
|
-
streakRule: { hoursWindow: 72, bonusXp: 25 },
|
|
11
|
-
completionRewards: { xpBonus: 25, badgeKey: "crm_first_win" },
|
|
12
|
-
steps: [
|
|
13
|
-
{
|
|
14
|
-
id: "create_pipeline",
|
|
15
|
-
title: "Create pipeline & stages",
|
|
16
|
-
description: "Create a pipeline with baseline stages.",
|
|
17
|
-
order: 1,
|
|
18
|
-
completion: {
|
|
19
|
-
eventName: "pipeline.created",
|
|
20
|
-
sourceModule: "@contractspec/example.crm-pipeline"
|
|
21
|
-
},
|
|
22
|
-
xpReward: 15,
|
|
23
|
-
metadata: { surface: "pipeline" }
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: "create_contact_and_company",
|
|
27
|
-
title: "Create contact and company",
|
|
28
|
-
description: "Add your first contact and associated company.",
|
|
29
|
-
order: 2,
|
|
30
|
-
completion: {
|
|
31
|
-
eventName: "contact.created",
|
|
32
|
-
sourceModule: "@contractspec/example.crm-pipeline"
|
|
33
|
-
},
|
|
34
|
-
xpReward: 20,
|
|
35
|
-
metadata: { surface: "contacts" }
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "create_first_deal",
|
|
39
|
-
title: "Log first deal",
|
|
40
|
-
description: "Create your first deal in the pipeline.",
|
|
41
|
-
order: 3,
|
|
42
|
-
completion: {
|
|
43
|
-
eventName: "deal.created",
|
|
44
|
-
sourceModule: "@contractspec/example.crm-pipeline"
|
|
45
|
-
},
|
|
46
|
-
xpReward: 20,
|
|
47
|
-
metadata: { surface: "deals" }
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: "move_deal_in_pipeline",
|
|
51
|
-
title: "Move a deal across stages",
|
|
52
|
-
description: "Move a deal across at least three stages.",
|
|
53
|
-
order: 4,
|
|
54
|
-
completion: {
|
|
55
|
-
eventName: "deal.moved",
|
|
56
|
-
sourceModule: "@contractspec/example.crm-pipeline"
|
|
57
|
-
},
|
|
58
|
-
xpReward: 20,
|
|
59
|
-
metadata: { surface: "deals" }
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "close_deal_won",
|
|
63
|
-
title: "Close a deal as won",
|
|
64
|
-
description: "Close a deal as won to hit first revenue.",
|
|
65
|
-
order: 5,
|
|
66
|
-
completion: {
|
|
67
|
-
eventName: "deal.won",
|
|
68
|
-
sourceModule: "@contractspec/example.crm-pipeline"
|
|
69
|
-
},
|
|
70
|
-
xpReward: 30,
|
|
71
|
-
metadata: { surface: "deals" }
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "setup_follow_up",
|
|
75
|
-
title: "Create follow-up task",
|
|
76
|
-
description: "Create a follow-up task and notification for a contact or deal.",
|
|
77
|
-
order: 6,
|
|
78
|
-
completion: {
|
|
79
|
-
eventName: "task.completed",
|
|
80
|
-
sourceModule: "@contractspec/example.crm-pipeline",
|
|
81
|
-
payloadFilter: { type: "follow_up" }
|
|
82
|
-
},
|
|
83
|
-
xpReward: 30,
|
|
84
|
-
metadata: { surface: "tasks" }
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
metadata: {
|
|
88
|
-
surfacedIn: ["crm/dashboard", "crm/pipeline"]
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
var crmLearningTracks = [crmFirstWinTrack];
|
|
92
|
-
|
|
93
|
-
// src/handlers/demo.handlers.ts
|
|
94
|
-
var crmOnboardingEvents = [
|
|
95
|
-
"pipeline.created",
|
|
96
|
-
"contact.created",
|
|
97
|
-
"deal.created",
|
|
98
|
-
"deal.moved",
|
|
99
|
-
"deal.won",
|
|
100
|
-
"task.completed"
|
|
101
|
-
];
|
|
102
|
-
var emitCrmOnboardingEvent = (eventName, { learnerId, occurredAt = new Date, payload }, record) => {
|
|
103
|
-
const event = {
|
|
104
|
-
learnerId,
|
|
105
|
-
name: eventName,
|
|
106
|
-
occurredAt,
|
|
107
|
-
payload,
|
|
108
|
-
trackId: crmFirstWinTrack.id
|
|
109
|
-
};
|
|
110
|
-
return record ? record(event) : event;
|
|
111
|
-
};
|
|
112
|
-
var emitAllCrmOnboardingEvents = (params, record) => crmOnboardingEvents.map((name) => emitCrmOnboardingEvent(name, params, record));
|
|
113
|
-
export {
|
|
114
|
-
emitCrmOnboardingEvent,
|
|
115
|
-
emitAllCrmOnboardingEvents,
|
|
116
|
-
crmOnboardingEvents
|
|
117
|
-
};
|
|
1
|
+
var r={id:"crm_first_win",productId:"crm-pipeline",name:"CRM First Win",description:"Guide a new CRM user from empty pipeline to first closed-won deal.",targetUserSegment:"crm_adopter",targetRole:"sales",totalXp:135,streakRule:{hoursWindow:72,bonusXp:25},completionRewards:{xpBonus:25,badgeKey:"crm_first_win"},steps:[{id:"create_pipeline",title:"Create pipeline & stages",description:"Create a pipeline with baseline stages.",order:1,completion:{eventName:"pipeline.created",sourceModule:"@contractspec/example.crm-pipeline"},xpReward:15,metadata:{surface:"pipeline"}},{id:"create_contact_and_company",title:"Create contact and company",description:"Add your first contact and associated company.",order:2,completion:{eventName:"contact.created",sourceModule:"@contractspec/example.crm-pipeline"},xpReward:20,metadata:{surface:"contacts"}},{id:"create_first_deal",title:"Log first deal",description:"Create your first deal in the pipeline.",order:3,completion:{eventName:"deal.created",sourceModule:"@contractspec/example.crm-pipeline"},xpReward:20,metadata:{surface:"deals"}},{id:"move_deal_in_pipeline",title:"Move a deal across stages",description:"Move a deal across at least three stages.",order:4,completion:{eventName:"deal.moved",sourceModule:"@contractspec/example.crm-pipeline"},xpReward:20,metadata:{surface:"deals"}},{id:"close_deal_won",title:"Close a deal as won",description:"Close a deal as won to hit first revenue.",order:5,completion:{eventName:"deal.won",sourceModule:"@contractspec/example.crm-pipeline"},xpReward:30,metadata:{surface:"deals"}},{id:"setup_follow_up",title:"Create follow-up task",description:"Create a follow-up task and notification for a contact or deal.",order:6,completion:{eventName:"task.completed",sourceModule:"@contractspec/example.crm-pipeline",payloadFilter:{type:"follow_up"}},xpReward:30,metadata:{surface:"tasks"}}],metadata:{surfacedIn:["crm/dashboard","crm/pipeline"]}},p=[r];var i=["pipeline.created","contact.created","deal.created","deal.moved","deal.won","task.completed"],d=(e,{learnerId:t,occurredAt:a=new Date,payload:c},n)=>{let o={learnerId:t,name:e,occurredAt:a,payload:c,trackId:r.id};return n?n(o):o},m=(e,t)=>i.map((a)=>d(a,e,t));export{d as emitCrmOnboardingEvent,m as emitAllCrmOnboardingEvents,i as crmOnboardingEvents};
|