@contractspec/example.learning-journey-crm-onboarding 3.7.17 → 3.7.19

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.
Files changed (33) hide show
  1. package/.turbo/turbo-build.log +33 -33
  2. package/CHANGELOG.md +22 -0
  3. package/dist/browser/docs/crm-onboarding.docblock.js +1 -37
  4. package/dist/browser/docs/index.js +1 -37
  5. package/dist/browser/example.js +1 -32
  6. package/dist/browser/handlers/demo.handlers.js +1 -117
  7. package/dist/browser/index.js +1 -401
  8. package/dist/browser/learning-journey-crm-onboarding.feature.js +1 -48
  9. package/dist/browser/operations/index.js +1 -209
  10. package/dist/browser/presentations/index.js +1 -256
  11. package/dist/browser/tests/operations.test-spec.js +1 -34
  12. package/dist/browser/track.js +1 -95
  13. package/dist/docs/crm-onboarding.docblock.js +1 -37
  14. package/dist/docs/index.js +1 -37
  15. package/dist/example.js +1 -32
  16. package/dist/handlers/demo.handlers.js +1 -117
  17. package/dist/index.js +1 -401
  18. package/dist/learning-journey-crm-onboarding.feature.js +1 -48
  19. package/dist/node/docs/crm-onboarding.docblock.js +1 -37
  20. package/dist/node/docs/index.js +1 -37
  21. package/dist/node/example.js +1 -32
  22. package/dist/node/handlers/demo.handlers.js +1 -117
  23. package/dist/node/index.js +1 -401
  24. package/dist/node/learning-journey-crm-onboarding.feature.js +1 -48
  25. package/dist/node/operations/index.js +1 -209
  26. package/dist/node/presentations/index.js +1 -256
  27. package/dist/node/tests/operations.test-spec.js +1 -34
  28. package/dist/node/track.js +1 -95
  29. package/dist/operations/index.js +1 -209
  30. package/dist/presentations/index.js +1 -256
  31. package/dist/tests/operations.test-spec.js +1 -34
  32. package/dist/track.js +1 -95
  33. package/package.json +7 -7
@@ -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 44ms
5
+ Bundled 10 modules in 47ms
6
6
 
7
- docs/crm-onboarding.docblock.js 1.51 KB (entry point)
8
- tests/operations.test-spec.js 0.91 KB (entry point)
9
- ./index.js 12.84 KB (entry point)
10
- docs/index.js 1.51 KB (entry point)
11
- ./example.js 0.96 KB (entry point)
12
- handlers/demo.handlers.js 3.33 KB (entry point)
13
- ./learning-journey-crm-onboarding.feature.js 1.55 KB (entry point)
14
- presentations/index.js 8.1 KB (entry point)
15
- operations/index.js 6.80 KB (entry point)
16
- ./track.js 2.72 KB (entry point)
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 22ms
19
+ Bundled 10 modules in 48ms
20
20
 
21
- docs/crm-onboarding.docblock.js 1.48 KB (entry point)
22
- tests/operations.test-spec.js 0.91 KB (entry point)
23
- ./index.js 12.81 KB (entry point)
24
- docs/index.js 1.48 KB (entry point)
25
- ./example.js 0.95 KB (entry point)
26
- handlers/demo.handlers.js 3.33 KB (entry point)
27
- ./learning-journey-crm-onboarding.feature.js 1.54 KB (entry point)
28
- presentations/index.js 8.1 KB (entry point)
29
- operations/index.js 6.79 KB (entry point)
30
- ./track.js 2.71 KB (entry point)
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 39ms
33
+ Bundled 10 modules in 49ms
34
34
 
35
- docs/crm-onboarding.docblock.js 1.48 KB (entry point)
36
- tests/operations.test-spec.js 0.91 KB (entry point)
37
- ./index.js 12.81 KB (entry point)
38
- docs/index.js 1.48 KB (entry point)
39
- ./example.js 0.95 KB (entry point)
40
- handlers/demo.handlers.js 3.33 KB (entry point)
41
- ./learning-journey-crm-onboarding.feature.js 1.54 KB (entry point)
42
- presentations/index.js 8.1 KB (entry point)
43
- operations/index.js 6.79 KB (entry point)
44
- ./track.js 2.71 KB (entry point)
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,27 @@
1
1
  # @contractspec/example.learning-journey-crm-onboarding
2
2
 
3
+ ## 3.7.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies because of Expand ContractSpec authoring with preset-driven workspace setup, shell completion, packaged workspace schema artifacts, and richer form and UI surfaces across the CLI, editors, and shared runtimes.
8
+ - @contractspec/lib.contracts-spec@5.3.0
9
+ - @contractspec/example.crm-pipeline@3.7.19
10
+ - @contractspec/module.learning-journey@3.7.18
11
+
12
+ ## 3.7.18
13
+
14
+ ### Patch Changes
15
+
16
+ - chore: auto-bump internal dependents
17
+ - Updated dependencies because of chore: auto-bump internal dependents
18
+ - Updated dependencies because of Introduce the Builder v3 control plane as a governed authoring layer over external execution providers.
19
+ - Updated dependencies because of Implement ContractSpec Connect as a first-class spec, runtime, and CLI workflow.
20
+ - @contractspec/example.crm-pipeline@3.7.18
21
+ - @contractspec/module.learning-journey@3.7.17
22
+ - @contractspec/lib.contracts-spec@5.2.0
23
+ - @contractspec/lib.schema@3.7.14
24
+
3
25
  ## 3.7.17
4
26
 
5
27
  ### Patch Changes
@@ -1,37 +1 @@
1
- // src/docs/crm-onboarding.docblock.ts
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
- // src/docs/crm-onboarding.docblock.ts
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,32 +1 @@
1
- // src/example.ts
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
- // src/track.ts
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};