@contractspec/example.learning-journey-crm-onboarding 1.46.1 → 1.47.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.
@@ -1,41 +1,45 @@
1
1
  $ tsdown
2
- ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
2
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
3
3
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-journey-crm-onboarding/tsdown.config.js
4
- ℹ entry: src/example.ts, src/index.ts, src/learning-journey-crm-onboarding.feature.ts, src/track.ts, src/docs/crm-onboarding.docblock.ts, src/docs/index.ts, src/operations/index.ts, src/handlers/demo.handlers.ts, src/presentations/index.ts
4
+ ℹ entry: src/example.ts, src/index.ts, src/learning-journey-crm-onboarding.feature.ts, src/track.ts, src/docs/crm-onboarding.docblock.ts, src/docs/index.ts, src/handlers/demo.handlers.ts, src/operations/index.ts, src/presentations/index.ts, src/tests/operations.test-spec.ts
5
5
  ℹ target: esnext
6
6
  ℹ tsconfig: tsconfig.json
7
7
  ℹ Build start
8
- ℹ Cleaning 35 files
8
+ ℹ Cleaning 40 files
9
9
  ℹ dist/operations/index.js 4.24 kB │ gzip: 1.08 kB
10
10
  ℹ dist/track.js 2.54 kB │ gzip: 0.81 kB
11
- ℹ dist/learning-journey-crm-onboarding.feature.js 1.58 kB │ gzip: 0.56 kB
11
+ ℹ dist/learning-journey-crm-onboarding.feature.js 1.80 kB │ gzip: 0.63 kB
12
12
  ℹ dist/docs/crm-onboarding.docblock.js 1.48 kB │ gzip: 0.75 kB
13
- ℹ dist/presentations/index.js 1.40 kB │ gzip: 0.55 kB
13
+ ℹ dist/presentations/index.js 1.46 kB │ gzip: 0.57 kB
14
14
  ℹ dist/index.js 1.01 kB │ gzip: 0.30 kB
15
- ℹ dist/example.js 0.91 kB │ gzip: 0.51 kB
15
+ ℹ dist/example.js 0.99 kB │ gzip: 0.54 kB
16
+ ℹ dist/tests/operations.test-spec.js 0.90 kB │ gzip: 0.42 kB
16
17
  ℹ dist/handlers/demo.handlers.js 0.77 kB │ gzip: 0.39 kB
17
18
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
18
19
  ℹ dist/operations/index.js.map 6.32 kB │ gzip: 1.60 kB
19
- ℹ dist/track.js.map 4.15 kB │ gzip: 1.13 kB
20
- ℹ dist/learning-journey-crm-onboarding.feature.js.map 2.91 kB │ gzip: 1.05 kB
21
- ℹ dist/presentations/index.js.map 2.40 kB │ gzip: 0.86 kB
20
+ ℹ dist/track.js.map 4.06 kB │ gzip: 1.12 kB
21
+ ℹ dist/learning-journey-crm-onboarding.feature.js.map 2.85 kB │ gzip: 1.04 kB
22
+ ℹ dist/presentations/index.js.map 2.14 kB │ gzip: 0.85 kB
22
23
  ℹ dist/docs/crm-onboarding.docblock.js.map 1.92 kB │ gzip: 0.92 kB
23
- ℹ dist/handlers/demo.handlers.js.map 1.62 kB │ gzip: 0.70 kB
24
- ℹ dist/example.js.map 1.43 kB │ gzip: 0.72 kB
24
+ ℹ dist/handlers/demo.handlers.js.map 1.59 kB │ gzip: 0.69 kB
25
+ ℹ dist/tests/operations.test-spec.js.map 1.45 kB │ gzip: 0.62 kB
26
+ ℹ dist/example.js.map 1.42 kB │ gzip: 0.73 kB
25
27
  ℹ dist/operations/index.d.ts.map 0.84 kB │ gzip: 0.32 kB
26
28
  ℹ dist/handlers/demo.handlers.d.ts.map 0.66 kB │ gzip: 0.35 kB
27
- ℹ dist/learning-journey-crm-onboarding.feature.d.ts.map 0.20 kB │ gzip: 0.14 kB
28
- ℹ dist/presentations/index.d.ts.map 0.19 kB │ gzip: 0.16 kB
29
+ ℹ dist/learning-journey-crm-onboarding.feature.d.ts.map 0.21 kB │ gzip: 0.16 kB
30
+ ℹ dist/presentations/index.d.ts.map 0.21 kB │ gzip: 0.16 kB
31
+ ℹ dist/tests/operations.test-spec.d.ts.map 0.17 kB │ gzip: 0.14 kB
32
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
29
33
  ℹ dist/track.d.ts.map 0.14 kB │ gzip: 0.13 kB
30
- ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
31
34
  ℹ dist/operations/index.d.ts 8.80 kB │ gzip: 0.93 kB
32
35
  ℹ dist/index.d.ts 0.97 kB │ gzip: 0.29 kB
33
36
  ℹ dist/handlers/demo.handlers.d.ts 0.95 kB │ gzip: 0.40 kB
34
- ℹ dist/learning-journey-crm-onboarding.feature.d.ts 0.46 kB │ gzip: 0.26 kB
35
- ℹ dist/presentations/index.d.ts 0.45 kB │ gzip: 0.20 kB
37
+ ℹ dist/presentations/index.d.ts 0.55 kB │ gzip: 0.22 kB
38
+ ℹ dist/learning-journey-crm-onboarding.feature.d.ts 0.50 kB │ gzip: 0.27 kB
36
39
  ℹ dist/track.d.ts 0.33 kB │ gzip: 0.20 kB
37
- ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
40
+ ℹ dist/tests/operations.test-spec.d.ts 0.28 kB │ gzip: 0.18 kB
41
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
38
42
  ℹ dist/docs/crm-onboarding.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
39
43
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
40
- ℹ 31 files, total: 49.05 kB
41
- ✔ Build complete in 11452ms
44
+ ℹ 35 files, total: 51.99 kB
45
+ ✔ Build complete in 9717ms
@@ -1,42 +1,46 @@
1
1
  $ bun build:types && bun build:bundle
2
2
  $ tsc --noEmit
3
3
  $ tsdown
4
- ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
4
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
5
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-journey-crm-onboarding/tsdown.config.js
6
- ℹ entry: src/example.ts, src/index.ts, src/learning-journey-crm-onboarding.feature.ts, src/track.ts, src/docs/crm-onboarding.docblock.ts, src/docs/index.ts, src/handlers/demo.handlers.ts, src/operations/index.ts, src/presentations/index.ts
6
+ ℹ entry: src/example.ts, src/index.ts, src/learning-journey-crm-onboarding.feature.ts, src/track.ts, src/docs/crm-onboarding.docblock.ts, src/docs/index.ts, src/handlers/demo.handlers.ts, src/operations/index.ts, src/presentations/index.ts, src/tests/operations.test-spec.ts
7
7
  ℹ target: esnext
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
10
  ℹ dist/operations/index.js 4.24 kB │ gzip: 1.08 kB
11
11
  ℹ dist/track.js 2.54 kB │ gzip: 0.81 kB
12
- ℹ dist/learning-journey-crm-onboarding.feature.js 1.58 kB │ gzip: 0.56 kB
12
+ ℹ dist/learning-journey-crm-onboarding.feature.js 1.80 kB │ gzip: 0.63 kB
13
13
  ℹ dist/docs/crm-onboarding.docblock.js 1.48 kB │ gzip: 0.75 kB
14
- ℹ dist/presentations/index.js 1.40 kB │ gzip: 0.55 kB
14
+ ℹ dist/presentations/index.js 1.46 kB │ gzip: 0.57 kB
15
15
  ℹ dist/index.js 1.01 kB │ gzip: 0.30 kB
16
- ℹ dist/example.js 0.91 kB │ gzip: 0.51 kB
16
+ ℹ dist/example.js 0.99 kB │ gzip: 0.54 kB
17
+ ℹ dist/tests/operations.test-spec.js 0.90 kB │ gzip: 0.42 kB
17
18
  ℹ dist/handlers/demo.handlers.js 0.77 kB │ gzip: 0.39 kB
18
19
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
19
20
  ℹ dist/operations/index.js.map 6.32 kB │ gzip: 1.60 kB
20
- ℹ dist/track.js.map 4.15 kB │ gzip: 1.13 kB
21
- ℹ dist/learning-journey-crm-onboarding.feature.js.map 2.91 kB │ gzip: 1.05 kB
22
- ℹ dist/presentations/index.js.map 2.40 kB │ gzip: 0.86 kB
21
+ ℹ dist/track.js.map 4.06 kB │ gzip: 1.12 kB
22
+ ℹ dist/learning-journey-crm-onboarding.feature.js.map 2.85 kB │ gzip: 1.04 kB
23
+ ℹ dist/presentations/index.js.map 2.14 kB │ gzip: 0.85 kB
23
24
  ℹ dist/docs/crm-onboarding.docblock.js.map 1.92 kB │ gzip: 0.92 kB
24
- ℹ dist/handlers/demo.handlers.js.map 1.62 kB │ gzip: 0.70 kB
25
- ℹ dist/example.js.map 1.43 kB │ gzip: 0.72 kB
25
+ ℹ dist/handlers/demo.handlers.js.map 1.59 kB │ gzip: 0.69 kB
26
+ ℹ dist/tests/operations.test-spec.js.map 1.45 kB │ gzip: 0.62 kB
27
+ ℹ dist/example.js.map 1.42 kB │ gzip: 0.73 kB
26
28
  ℹ dist/operations/index.d.ts.map 0.84 kB │ gzip: 0.32 kB
27
29
  ℹ dist/handlers/demo.handlers.d.ts.map 0.66 kB │ gzip: 0.35 kB
28
- ℹ dist/learning-journey-crm-onboarding.feature.d.ts.map 0.20 kB │ gzip: 0.14 kB
29
- ℹ dist/presentations/index.d.ts.map 0.19 kB │ gzip: 0.16 kB
30
+ ℹ dist/learning-journey-crm-onboarding.feature.d.ts.map 0.21 kB │ gzip: 0.16 kB
31
+ ℹ dist/presentations/index.d.ts.map 0.21 kB │ gzip: 0.16 kB
32
+ ℹ dist/tests/operations.test-spec.d.ts.map 0.17 kB │ gzip: 0.14 kB
33
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
30
34
  ℹ dist/track.d.ts.map 0.14 kB │ gzip: 0.13 kB
31
- ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
32
35
  ℹ dist/operations/index.d.ts 8.80 kB │ gzip: 0.93 kB
33
36
  ℹ dist/index.d.ts 0.97 kB │ gzip: 0.29 kB
34
37
  ℹ dist/handlers/demo.handlers.d.ts 0.95 kB │ gzip: 0.40 kB
35
- ℹ dist/learning-journey-crm-onboarding.feature.d.ts 0.46 kB │ gzip: 0.26 kB
36
- ℹ dist/presentations/index.d.ts 0.45 kB │ gzip: 0.20 kB
38
+ ℹ dist/presentations/index.d.ts 0.55 kB │ gzip: 0.22 kB
39
+ ℹ dist/learning-journey-crm-onboarding.feature.d.ts 0.50 kB │ gzip: 0.27 kB
37
40
  ℹ dist/track.d.ts 0.33 kB │ gzip: 0.20 kB
38
- ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
41
+ ℹ dist/tests/operations.test-spec.d.ts 0.28 kB │ gzip: 0.18 kB
42
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
39
43
  ℹ dist/docs/crm-onboarding.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
40
44
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
41
- ℹ 31 files, total: 49.05 kB
42
- ✔ Build complete in 16790ms
45
+ ℹ 35 files, total: 51.99 kB
46
+ ✔ Build complete in 5650ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @contractspec/example.learning-journey-crm-onboarding
2
2
 
3
+ ## 1.47.0
4
+
5
+ ### Minor Changes
6
+
7
+ - caf8701: feat: add cli vibe command to run workflow
8
+ - c69b849: feat: add api web services (mcp & website)
9
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
10
+ - fd38e85: feat: auto-fix contractspec issues
11
+
12
+ ### Patch Changes
13
+
14
+ - e7ded36: feat: improve stability (adding ts-morph)
15
+ - c231a8b: test: improve workspace stability
16
+ - Updated dependencies [e7ded36]
17
+ - Updated dependencies [caf8701]
18
+ - Updated dependencies [c69b849]
19
+ - Updated dependencies [c231a8b]
20
+ - Updated dependencies [42b8d78]
21
+ - Updated dependencies [fd38e85]
22
+ - @contractspec/module.learning-journey@1.47.0
23
+ - @contractspec/example.crm-pipeline@1.47.0
24
+ - @contractspec/lib.contracts@1.47.0
25
+ - @contractspec/lib.schema@1.47.0
26
+
27
+ ## 1.46.2
28
+
29
+ ### Patch Changes
30
+
31
+ - 7e21625: feat: library services (landing page & api)
32
+ - Updated dependencies [7e21625]
33
+ - @contractspec/module.learning-journey@1.46.2
34
+ - @contractspec/example.crm-pipeline@1.46.2
35
+ - @contractspec/lib.contracts@1.46.2
36
+ - @contractspec/lib.schema@1.46.2
37
+
3
38
  ## 1.46.1
4
39
 
5
40
  ### Patch Changes
package/dist/example.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ExampleSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/example.d.ts
4
- declare const example: ExampleSpec;
4
+ declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
5
  //#endregion
6
6
  export { example as default };
7
7
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAAS"}
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SA0BJ,4BAAA,CA1BW"}
package/dist/example.js CHANGED
@@ -1,5 +1,7 @@
1
+ import { defineExample } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/example.ts
2
- const example = {
4
+ const example = defineExample({
3
5
  meta: {
4
6
  key: "learning-journey-crm-onboarding",
5
7
  version: "1.0.0",
@@ -32,7 +34,7 @@ const example = {
32
34
  },
33
35
  mcp: { enabled: true }
34
36
  }
35
- };
37
+ });
36
38
  var example_default = example;
37
39
 
38
40
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":["example: ExampleSpec"],"sources":["../src/example.ts"],"sourcesContent":["import type { ExampleSpec } from '@contractspec/lib.contracts';\n\nconst example: ExampleSpec = {\n meta: {\n key: 'learning-journey-crm-onboarding',\n version: '1.0.0',\n title: 'Learning Journey — CRM First Win',\n description:\n 'Onboarding track for CRM Pipeline driving users from empty CRM to first closed-won deal.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['learning', 'crm', 'onboarding'],\n },\n docs: {\n rootDocId: 'docs.learning-journey.crm-onboarding',\n },\n entrypoints: {\n packageName: '@contractspec/example.learning-journey-crm-onboarding',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['playground', 'markdown'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n};\n\nexport default example;\n"],"mappings":";AAEA,MAAMA,UAAuB;CAC3B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAO;GAAa;EACxC;CACD,MAAM,EACJ,WAAW,wCACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,cAAc,WAAW;GAAE;EAC7D,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'learning-journey-crm-onboarding',\n version: '1.0.0',\n title: 'Learning Journey — CRM First Win',\n description:\n 'Onboarding track for CRM Pipeline driving users from empty CRM to first closed-won deal.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['learning', 'crm', 'onboarding'],\n },\n docs: {\n rootDocId: 'docs.learning-journey.crm-onboarding',\n },\n entrypoints: {\n packageName: '@contractspec/example.learning-journey-crm-onboarding',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['playground', 'markdown'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAO;GAAa;EACxC;CACD,MAAM,EACJ,WAAW,wCACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,cAAc,WAAW;GAAE;EAC7D,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"demo.handlers.d.ts","names":[],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":[],"mappings":";UAEU,UAAA;EAAA,SAAA,EAAA,MAAU;EAMV,UAAA,CAAA,EAJK,IAIL;EAQL,OAAA,CAAA,EAXO,MAWI,CAAA,MAAA,EAAA,OAAW,CAAA;AAE3B;AASA,UAnBU,oBAAA,CAmBqB;EAElB,SAAA,EAAA,MAAA;EACA,IAAA,EAAA,MAAA;EACX,UAAA,EApBY,IAoBZ;EAAA,OAAA,EAAA,MAAA;EAAA,OAAA,CAAA,EAlBU,MAkBV,CAAA,MAAA,EAAA,OAAA,CAAA;;KAfG,WAAA,GAgBM,CAAA,KAAA,EAhBgB,oBAgBhB,EAAA,GAAA,OAAA;AAAW,cAdT,mBAcS,EAAA,SAAA,CAAA,kBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,YAAA,EAAA,UAAA,EAAA,gBAAA,CAAA;AAYT,KAjBD,QAAA,GAiBC,CAAA,OAjBkB,mBAkBrB,CAAA,CAAA,MACC,CAAA;cAjBE,oCACA;;;;GACsC,qBACxC;cAYE,qCACH,qBACC"}
1
+ {"version":3,"file":"demo.handlers.d.ts","names":[],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":[],"mappings":";UAEU,UAAA;EAAA,SAAA,EAAA,MAAU;EAMV,UAAA,CAAA,EAJK,IAIL;EAQL,OAAA,CAAA,EAXO,MAWI,CAAA,MAAA,EAAW,OAAA,CAAA;AAE3B;AASA,UAnBU,oBAAA,CAmBqB;EAElB,SAAA,EAAA,MAAA;EACA,IAAA,EAAA,MAAA;EACX,UAAA,EApBY,IAoBZ;EAAA,OAAA,EAAA,MAAA;EAAA,OAAA,CAAA,EAlBU,MAkBV,CAAA,MAAA,EAAA,OAAA,CAAA;;KAfG,WAAA,GAgBM,CAAA,KAAA,EAhBgB,oBAgBhB,EAAA,GAAA,OAAA;AAAW,cAdT,mBAcS,EAAA,SAAA,CAAA,kBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,YAAA,EAAA,UAAA,EAAA,gBAAA,CAAA;AAYT,KAjBD,QAAA,GAiBC,CAAA,OAjBkB,mBAkBrB,CAAA,CAAA,MACC,CAAA;cAjBE,oCACA;;;;GACsC,qBACxC;cAYE,qCACH,qBACC"}
@@ -1 +1 @@
1
- {"version":3,"file":"demo.handlers.js","names":["event: LearningJourneyEvent"],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":["import { crmFirstWinTrack } from '../track';\n\ninterface EmitParams {\n learnerId: string;\n occurredAt?: Date;\n payload?: Record<string, unknown>;\n}\n\ninterface LearningJourneyEvent {\n learnerId: string;\n name: string;\n occurredAt: Date;\n trackId: string;\n payload?: Record<string, unknown>;\n}\n\ntype RecordEvent = (event: LearningJourneyEvent) => unknown;\n\nexport const crmOnboardingEvents = [\n 'pipeline.created',\n 'contact.created',\n 'deal.created',\n 'deal.moved',\n 'deal.won',\n 'task.completed',\n] as const;\n\nexport type CrmEvent = (typeof crmOnboardingEvents)[number];\n\nexport const emitCrmOnboardingEvent = (\n eventName: CrmEvent,\n { learnerId, occurredAt = new Date(), payload }: EmitParams,\n record?: RecordEvent\n) => {\n const event: LearningJourneyEvent = {\n learnerId,\n name: eventName,\n occurredAt,\n payload,\n trackId: crmFirstWinTrack.id,\n };\n return record ? record(event) : event;\n};\n\nexport const emitAllCrmOnboardingEvents = (\n params: EmitParams,\n record?: RecordEvent\n) =>\n crmOnboardingEvents.map((name) =>\n emitCrmOnboardingEvent(name, params, record)\n );\n"],"mappings":";;;AAkBA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACD;AAID,MAAa,0BACX,WACA,EAAE,WAAW,6BAAa,IAAI,MAAM,EAAE,WACtC,WACG;CACH,MAAMA,QAA8B;EAClC;EACA,MAAM;EACN;EACA;EACA,SAAS,iBAAiB;EAC3B;AACD,QAAO,SAAS,OAAO,MAAM,GAAG;;AAGlC,MAAa,8BACX,QACA,WAEA,oBAAoB,KAAK,SACvB,uBAAuB,MAAM,QAAQ,OAAO,CAC7C"}
1
+ {"version":3,"file":"demo.handlers.js","names":[],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":["import { crmFirstWinTrack } from '../track';\n\ninterface EmitParams {\n learnerId: string;\n occurredAt?: Date;\n payload?: Record<string, unknown>;\n}\n\ninterface LearningJourneyEvent {\n learnerId: string;\n name: string;\n occurredAt: Date;\n trackId: string;\n payload?: Record<string, unknown>;\n}\n\ntype RecordEvent = (event: LearningJourneyEvent) => unknown;\n\nexport const crmOnboardingEvents = [\n 'pipeline.created',\n 'contact.created',\n 'deal.created',\n 'deal.moved',\n 'deal.won',\n 'task.completed',\n] as const;\n\nexport type CrmEvent = (typeof crmOnboardingEvents)[number];\n\nexport const emitCrmOnboardingEvent = (\n eventName: CrmEvent,\n { learnerId, occurredAt = new Date(), payload }: EmitParams,\n record?: RecordEvent\n) => {\n const event: LearningJourneyEvent = {\n learnerId,\n name: eventName,\n occurredAt,\n payload,\n trackId: crmFirstWinTrack.id,\n };\n return record ? record(event) : event;\n};\n\nexport const emitAllCrmOnboardingEvents = (\n params: EmitParams,\n record?: RecordEvent\n) =>\n crmOnboardingEvents.map((name) =>\n emitCrmOnboardingEvent(name, params, record)\n );\n"],"mappings":";;;AAkBA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACD;AAID,MAAa,0BACX,WACA,EAAE,WAAW,6BAAa,IAAI,MAAM,EAAE,WACtC,WACG;CACH,MAAM,QAA8B;EAClC;EACA,MAAM;EACN;EACA;EACA,SAAS,iBAAiB;EAC3B;AACD,QAAO,SAAS,OAAO,MAAM,GAAG;;AAGlC,MAAa,8BACX,QACA,WAEA,oBAAoB,KAAK,SACvB,uBAAuB,MAAM,QAAQ,OAAO,CAC7C"}
@@ -1,4 +1,4 @@
1
- import { FeatureModuleSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts1 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/learning-journey-crm-onboarding.feature.d.ts
4
4
 
@@ -6,7 +6,7 @@ import { FeatureModuleSpec } from "@contractspec/lib.contracts";
6
6
  * Learning Journey CRM Onboarding feature module that bundles
7
7
  * CRM-specific onboarding track operations and presentations.
8
8
  */
9
- declare const LearningJourneyCrmOnboardingFeature: FeatureModuleSpec;
9
+ declare const LearningJourneyCrmOnboardingFeature: _contractspec_lib_contracts1.FeatureModuleSpec;
10
10
  //#endregion
11
11
  export { LearningJourneyCrmOnboardingFeature };
12
12
  //# sourceMappingURL=learning-journey-crm-onboarding.feature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"learning-journey-crm-onboarding.feature.d.ts","names":[],"sources":["../src/learning-journey-crm-onboarding.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,qCAAqC"}
1
+ {"version":3,"file":"learning-journey-crm-onboarding.feature.d.ts","names":[],"sources":["../src/learning-journey-crm-onboarding.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWA;cAAa,qCAsDX,4BAAA,CAtD8C"}
@@ -1,9 +1,16 @@
1
+ import { defineFeature } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/learning-journey-crm-onboarding.feature.ts
2
4
  /**
5
+ * Learning Journey CRM Onboarding Feature Module Specification
6
+ *
7
+ * Defines the feature module for CRM first-win onboarding journey.
8
+ */
9
+ /**
3
10
  * Learning Journey CRM Onboarding feature module that bundles
4
11
  * CRM-specific onboarding track operations and presentations.
5
12
  */
6
- const LearningJourneyCrmOnboardingFeature = {
13
+ const LearningJourneyCrmOnboardingFeature = defineFeature({
7
14
  meta: {
8
15
  key: "learning-journey-crm-onboarding",
9
16
  title: "Learning Journey: CRM Onboarding",
@@ -61,7 +68,7 @@ const LearningJourneyCrmOnboardingFeature = {
61
68
  key: "identity",
62
69
  version: "1.0.0"
63
70
  }] }
64
- };
71
+ });
65
72
 
66
73
  //#endregion
67
74
  export { LearningJourneyCrmOnboardingFeature };
@@ -1 +1 @@
1
- {"version":3,"file":"learning-journey-crm-onboarding.feature.js","names":["LearningJourneyCrmOnboardingFeature: FeatureModuleSpec"],"sources":["../src/learning-journey-crm-onboarding.feature.ts"],"sourcesContent":["/**\n * Learning Journey CRM Onboarding Feature Module Specification\n *\n * Defines the feature module for CRM first-win onboarding journey.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * Learning Journey CRM Onboarding feature module that bundles\n * CRM-specific onboarding track operations and presentations.\n */\nexport const LearningJourneyCrmOnboardingFeature: FeatureModuleSpec = {\n meta: {\n key: 'learning-journey-crm-onboarding',\n title: 'Learning Journey: CRM Onboarding',\n description:\n 'CRM first-win onboarding journey with step-by-step guidance for new CRM users',\n domain: 'learning-journey',\n owners: ['@examples.learning-journey.crm-onboarding'],\n tags: ['learning', 'crm', 'onboarding', 'journey'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n { key: 'learningJourney.crmOnboarding.recordEvent', version: '1.0.0' },\n { key: 'learningJourney.crmOnboarding.getTrack', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'learning.journey.crm.track', version: '1.0.0' },\n { key: 'learning.journey.crm.widget', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'learningJourney.crmOnboarding.getTrack', version: '1.0.0' },\n pres: { key: 'learning.journey.crm.track', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'learning.journey.crm.track',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'learning.journey.crm.widget',\n version: '1.0.0',\n targets: ['react'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [{ key: 'identity', version: '1.0.0' }],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,sCAAyD;CACpE,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,4CAA4C;EACrD,MAAM;GAAC;GAAY;GAAO;GAAc;GAAU;EAClD,WAAW;EACX,SAAS;EACV;CAGD,YAAY,CACV;EAAE,KAAK;EAA6C,SAAS;EAAS,EACtE;EAAE,KAAK;EAA0C,SAAS;EAAS,CACpE;CAGD,QAAQ,EAAE;CAGV,eAAe,CACb;EAAE,KAAK;EAA8B,SAAS;EAAS,EACvD;EAAE,KAAK;EAA+B,SAAS;EAAS,CACzD;CAGD,kBAAkB,CAChB;EACE,IAAI;GAAE,KAAK;GAA0C,SAAS;GAAS;EACvE,MAAM;GAAE,KAAK;GAA8B,SAAS;GAAS;EAC9D,CACF;CAGD,sBAAsB,CACpB;EACE,KAAK;EACL,SAAS;EACT,SAAS;GAAC;GAAS;GAAY;GAAmB;EACnD,EACD;EACE,KAAK;EACL,SAAS;EACT,SAAS,CAAC,QAAQ;EACnB,CACF;CAGD,cAAc,EACZ,UAAU,CAAC;EAAE,KAAK;EAAY,SAAS;EAAS,CAAC,EAClD;CACF"}
1
+ {"version":3,"file":"learning-journey-crm-onboarding.feature.js","names":[],"sources":["../src/learning-journey-crm-onboarding.feature.ts"],"sourcesContent":["/**\n * Learning Journey CRM Onboarding Feature Module Specification\n *\n * Defines the feature module for CRM first-win onboarding journey.\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n/**\n * Learning Journey CRM Onboarding feature module that bundles\n * CRM-specific onboarding track operations and presentations.\n */\nexport const LearningJourneyCrmOnboardingFeature = defineFeature({\n meta: {\n key: 'learning-journey-crm-onboarding',\n title: 'Learning Journey: CRM Onboarding',\n description:\n 'CRM first-win onboarding journey with step-by-step guidance for new CRM users',\n domain: 'learning-journey',\n owners: ['@examples.learning-journey.crm-onboarding'],\n tags: ['learning', 'crm', 'onboarding', 'journey'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n { key: 'learningJourney.crmOnboarding.recordEvent', version: '1.0.0' },\n { key: 'learningJourney.crmOnboarding.getTrack', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'learning.journey.crm.track', version: '1.0.0' },\n { key: 'learning.journey.crm.widget', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'learningJourney.crmOnboarding.getTrack', version: '1.0.0' },\n pres: { key: 'learning.journey.crm.track', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'learning.journey.crm.track',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'learning.journey.crm.widget',\n version: '1.0.0',\n targets: ['react'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [{ key: 'identity', version: '1.0.0' }],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,sCAAsC,cAAc;CAC/D,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,4CAA4C;EACrD,MAAM;GAAC;GAAY;GAAO;GAAc;GAAU;EAClD,WAAW;EACX,SAAS;EACV;CAGD,YAAY,CACV;EAAE,KAAK;EAA6C,SAAS;EAAS,EACtE;EAAE,KAAK;EAA0C,SAAS;EAAS,CACpE;CAGD,QAAQ,EAAE;CAGV,eAAe,CACb;EAAE,KAAK;EAA8B,SAAS;EAAS,EACvD;EAAE,KAAK;EAA+B,SAAS;EAAS,CACzD;CAGD,kBAAkB,CAChB;EACE,IAAI;GAAE,KAAK;GAA0C,SAAS;GAAS;EACvE,MAAM;GAAE,KAAK;GAA8B,SAAS;GAAS;EAC9D,CACF;CAGD,sBAAsB,CACpB;EACE,KAAK;EACL,SAAS;EACT,SAAS;GAAC;GAAS;GAAY;GAAmB;EACnD,EACD;EACE,KAAK;EACL,SAAS;EACT,SAAS,CAAC,QAAQ;EACnB,CACF;CAGD,cAAc,EACZ,UAAU,CAAC;EAAE,KAAK;EAAY,SAAS;EAAS,CAAC,EAClD;CACF,CAAC"}
@@ -1,5 +1,5 @@
1
+ import * as _contractspec_lib_contracts2 from "@contractspec/lib.contracts";
1
2
  import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
3
3
  import * as _contractspec_module_learning_journey_track_spec0 from "@contractspec/module.learning-journey/track-spec";
4
4
 
5
5
  //#region src/operations/index.d.ts
@@ -71,7 +71,7 @@ declare const CrmOnboardingTrackModel: _contractspec_lib_schema0.SchemaModel<{
71
71
  isOptional: false;
72
72
  };
73
73
  }>;
74
- declare const GetCrmOnboardingTrack: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
74
+ declare const GetCrmOnboardingTrack: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
75
75
  track: {
76
76
  type: _contractspec_lib_schema0.SchemaModel<{
77
77
  id: {
@@ -144,7 +144,7 @@ declare const GetCrmOnboardingTrack: _contractspec_lib_contracts0.OperationSpec<
144
144
  isOptional: false;
145
145
  };
146
146
  }>, undefined>;
147
- declare const RecordCrmOnboardingEvent: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
147
+ declare const RecordCrmOnboardingEvent: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
148
148
  learnerId: {
149
149
  type: _contractspec_lib_schema0.FieldType<string, string>;
150
150
  isOptional: false;
@@ -168,7 +168,7 @@ declare const RecordCrmOnboardingEvent: _contractspec_lib_contracts0.OperationSp
168
168
  };
169
169
  }>, undefined>;
170
170
  declare const crmOnboardingContracts: {
171
- GetCrmOnboardingTrack: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
171
+ GetCrmOnboardingTrack: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
172
172
  track: {
173
173
  type: _contractspec_lib_schema0.SchemaModel<{
174
174
  id: {
@@ -241,7 +241,7 @@ declare const crmOnboardingContracts: {
241
241
  isOptional: false;
242
242
  };
243
243
  }>, undefined>;
244
- RecordCrmOnboardingEvent: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
244
+ RecordCrmOnboardingEvent: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
245
245
  learnerId: {
246
246
  type: _contractspec_lib_schema0.FieldType<string, string>;
247
247
  isOptional: false;
@@ -1,6 +1,6 @@
1
1
  import { crmFirstWinTrack } from "../track.js";
2
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
2
  import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
3
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
4
4
 
5
5
  //#region src/operations/index.ts
6
6
  const OWNERS = ["examples.learning-journey.crm-onboarding"];
@@ -1,9 +1,9 @@
1
- import { PresentationSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/presentations/index.d.ts
4
- declare const CrmOnboardingTrackPresentation: PresentationSpec;
5
- declare const CrmOnboardingWidgetPresentation: PresentationSpec;
6
- declare const crmOnboardingPresentations: PresentationSpec[];
4
+ declare const CrmOnboardingTrackPresentation: _contractspec_lib_contracts6.PresentationSpec;
5
+ declare const CrmOnboardingWidgetPresentation: _contractspec_lib_contracts6.PresentationSpec;
6
+ declare const crmOnboardingPresentations: _contractspec_lib_contracts6.PresentationSpec[];
7
7
  //#endregion
8
8
  export { CrmOnboardingTrackPresentation, CrmOnboardingWidgetPresentation, crmOnboardingPresentations };
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;;cAoBa,gCAAgC;cAgBhC,iCAAiC;AAhBjC,cA+BA,0BAjBZ,EAiBsC,gBAjBtC,EAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;;cAgBa,gCAcX,4BAAA,CAdyC;cAgB9B,iCAaX,4BAAA,CAb0C;cAe/B,4BAGZ,4BAAA,CAHsC,gBAAA"}
@@ -1,5 +1,5 @@
1
1
  import { CrmOnboardingTrackModel } from "../operations/index.js";
2
- import { StabilityEnum } from "@contractspec/lib.contracts";
2
+ import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/presentations/index.ts
5
5
  const baseMeta = {
@@ -15,7 +15,7 @@ const baseMeta = {
15
15
  goal: "Guide CRM users through onboarding",
16
16
  context: "CRM onboarding journey"
17
17
  };
18
- const CrmOnboardingTrackPresentation = {
18
+ const CrmOnboardingTrackPresentation = definePresentation({
19
19
  meta: {
20
20
  key: "learning.journey.crm.track",
21
21
  version: "1.0.0",
@@ -33,8 +33,8 @@ const CrmOnboardingTrackPresentation = {
33
33
  "markdown",
34
34
  "application/json"
35
35
  ]
36
- };
37
- const CrmOnboardingWidgetPresentation = {
36
+ });
37
+ const CrmOnboardingWidgetPresentation = definePresentation({
38
38
  meta: {
39
39
  key: "learning.journey.crm.widget",
40
40
  version: "1.0.0",
@@ -47,7 +47,7 @@ const CrmOnboardingWidgetPresentation = {
47
47
  componentKey: "LearningTrackProgressWidget"
48
48
  },
49
49
  targets: ["react"]
50
- };
50
+ });
51
51
  const crmOnboardingPresentations = [CrmOnboardingTrackPresentation, CrmOnboardingWidgetPresentation];
52
52
 
53
53
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability' | 'goal' | 'context'\n>","CrmOnboardingTrackPresentation: PresentationSpec","CrmOnboardingWidgetPresentation: PresentationSpec"],"sources":["../../src/presentations/index.ts"],"sourcesContent":["import type {\n PresentationSpecMeta,\n PresentationSpec,\n} from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { CrmOnboardingTrackModel } from '../operations';\n\nconst baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability' | 'goal' | 'context'\n> = {\n domain: 'learning-journey',\n title: 'CRM Onboarding',\n owners: ['@examples.learning-journey.crm-onboarding'],\n tags: ['learning', 'crm', 'onboarding'],\n stability: StabilityEnum.Experimental,\n goal: 'Guide CRM users through onboarding',\n context: 'CRM onboarding journey',\n};\n\nexport const CrmOnboardingTrackPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.crm.track',\n version: '1.0.0',\n description: 'CRM first win track detail',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackDetail',\n props: CrmOnboardingTrackModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n};\n\nexport const CrmOnboardingWidgetPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.crm.widget',\n version: '1.0.0',\n description: 'Compact widget for CRM onboarding progress',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackProgressWidget',\n },\n targets: ['react'],\n};\n\nexport const crmOnboardingPresentations = [\n CrmOnboardingTrackPresentation,\n CrmOnboardingWidgetPresentation,\n];\n"],"mappings":";;;;AAOA,MAAMA,WAGF;CACF,QAAQ;CACR,OAAO;CACP,QAAQ,CAAC,4CAA4C;CACrD,MAAM;EAAC;EAAY;EAAO;EAAa;CACvC,WAAW,cAAc;CACzB,MAAM;CACN,SAAS;CACV;AAED,MAAaC,iCAAmD;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CACnD;AAED,MAAaC,kCAAoD;CAC/D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CACnB;AAED,MAAa,6BAA6B,CACxC,gCACA,gCACD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":["import { definePresentation, StabilityEnum, type PresentationSpecMeta } from '@contractspec/lib.contracts';\nimport { CrmOnboardingTrackModel } from '../operations';\n\nconst baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability' | 'goal' | 'context'\n> = {\n domain: 'learning-journey',\n title: 'CRM Onboarding',\n owners: ['@examples.learning-journey.crm-onboarding'],\n tags: ['learning', 'crm', 'onboarding'],\n stability: StabilityEnum.Experimental,\n goal: 'Guide CRM users through onboarding',\n context: 'CRM onboarding journey',\n};\n\nexport const CrmOnboardingTrackPresentation = definePresentation({\n meta: {\n key: 'learning.journey.crm.track',\n version: '1.0.0',\n description: 'CRM first win track detail',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackDetail',\n props: CrmOnboardingTrackModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n});\n\nexport const CrmOnboardingWidgetPresentation = definePresentation({\n meta: {\n key: 'learning.journey.crm.widget',\n version: '1.0.0',\n description: 'Compact widget for CRM onboarding progress',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackProgressWidget',\n },\n targets: ['react'],\n});\n\nexport const crmOnboardingPresentations = [\n CrmOnboardingTrackPresentation,\n CrmOnboardingWidgetPresentation,\n];\n"],"mappings":";;;;AAGA,MAAM,WAGF;CACF,QAAQ;CACR,OAAO;CACP,QAAQ,CAAC,4CAA4C;CACrD,MAAM;EAAC;EAAY;EAAO;EAAa;CACvC,WAAW,cAAc;CACzB,MAAM;CACN,SAAS;CACV;AAED,MAAa,iCAAiC,mBAAmB;CAC/D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CACnD,CAAC;AAEF,MAAa,kCAAkC,mBAAmB;CAChE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CACnB,CAAC;AAEF,MAAa,6BAA6B,CACxC,gCACA,gCACD"}
@@ -0,0 +1,7 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/tests/operations.test-spec.d.ts
4
+ declare const GetTrackTest: _contractspec_lib_contracts0.TestSpec;
5
+ //#endregion
6
+ export { GetTrackTest };
7
+ //# sourceMappingURL=operations.test-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,cA4BX,4BAAA,CA5BuB"}
@@ -0,0 +1,36 @@
1
+ import { defineTestSpec } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/tests/operations.test-spec.ts
4
+ const GetTrackTest = defineTestSpec({
5
+ meta: {
6
+ key: "learningJourney.crmOnboarding.getTrack.test",
7
+ version: "1.0.0",
8
+ stability: "experimental",
9
+ owners: ["@example.learning-journey-crm-onboarding"],
10
+ description: "Test for getting CRM onboarding track",
11
+ tags: ["test"]
12
+ },
13
+ target: {
14
+ type: "operation",
15
+ operation: {
16
+ key: "learningJourney.crmOnboarding.getTrack",
17
+ version: "1.0.0"
18
+ }
19
+ },
20
+ scenarios: [{
21
+ key: "success",
22
+ when: { operation: { key: "learningJourney.crmOnboarding.getTrack" } },
23
+ then: [{
24
+ type: "expectOutput",
25
+ match: {}
26
+ }]
27
+ }, {
28
+ key: "error",
29
+ when: { operation: { key: "learningJourney.crmOnboarding.getTrack" } },
30
+ then: [{ type: "expectError" }]
31
+ }]
32
+ });
33
+
34
+ //#endregion
35
+ export { GetTrackTest };
36
+ //# sourceMappingURL=operations.test-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.test-spec.js","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":["import { defineTestSpec } from '@contractspec/lib.contracts';\n\nexport const GetTrackTest = defineTestSpec({\n meta: {\n key: 'learningJourney.crmOnboarding.getTrack.test',\n version: '1.0.0',\n stability: 'experimental',\n owners: ['@example.learning-journey-crm-onboarding'],\n description: 'Test for getting CRM onboarding track',\n tags: ['test'],\n },\n target: {\n type: 'operation',\n operation: {\n key: 'learningJourney.crmOnboarding.getTrack',\n version: '1.0.0',\n },\n },\n scenarios: [\n {\n key: 'success',\n when: { operation: { key: 'learningJourney.crmOnboarding.getTrack' } },\n then: [{ type: 'expectOutput', match: {} }],\n },\n {\n key: 'error',\n when: { operation: { key: 'learningJourney.crmOnboarding.getTrack' } },\n then: [{ type: 'expectError' }],\n },\n ],\n});\n"],"mappings":";;;AAEA,MAAa,eAAe,eAAe;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,2CAA2C;EACpD,aAAa;EACb,MAAM,CAAC,OAAO;EACf;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GACT,KAAK;GACL,SAAS;GACV;EACF;CACD,WAAW,CACT;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,0CAA0C,EAAE;EACtE,MAAM,CAAC;GAAE,MAAM;GAAgB,OAAO,EAAE;GAAE,CAAC;EAC5C,EACD;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,0CAA0C,EAAE;EACtE,MAAM,CAAC,EAAE,MAAM,eAAe,CAAC;EAChC,CACF;CACF,CAAC"}
package/dist/track.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"track.js","names":["crmFirstWinTrack: LearningJourneyTrackSpec","crmLearningTracks: LearningJourneyTrackSpec[]"],"sources":["../src/track.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\n\nexport const crmFirstWinTrack: LearningJourneyTrackSpec = {\n id: 'crm_first_win',\n productId: 'crm-pipeline',\n name: 'CRM First Win',\n description:\n 'Guide a new CRM user from empty pipeline to first closed-won deal.',\n targetUserSegment: 'crm_adopter',\n targetRole: 'sales',\n totalXp: 135,\n streakRule: { hoursWindow: 72, bonusXp: 25 },\n completionRewards: { xpBonus: 25, badgeKey: 'crm_first_win' },\n steps: [\n {\n id: 'create_pipeline',\n title: 'Create pipeline & stages',\n description: 'Create a pipeline with baseline stages.',\n order: 1,\n completion: {\n eventName: 'pipeline.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 15,\n metadata: { surface: 'pipeline' },\n },\n {\n id: 'create_contact_and_company',\n title: 'Create contact and company',\n description: 'Add your first contact and associated company.',\n order: 2,\n completion: {\n eventName: 'contact.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'contacts' },\n },\n {\n id: 'create_first_deal',\n title: 'Log first deal',\n description: 'Create your first deal in the pipeline.',\n order: 3,\n completion: {\n eventName: 'deal.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'deals' },\n },\n {\n id: 'move_deal_in_pipeline',\n title: 'Move a deal across stages',\n description: 'Move a deal across at least three stages.',\n order: 4,\n completion: {\n eventName: 'deal.moved',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'deals' },\n },\n {\n id: 'close_deal_won',\n title: 'Close a deal as won',\n description: 'Close a deal as won to hit first revenue.',\n order: 5,\n completion: {\n eventName: 'deal.won',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 30,\n metadata: { surface: 'deals' },\n },\n {\n id: 'setup_follow_up',\n title: 'Create follow-up task',\n description:\n 'Create a follow-up task and notification for a contact or deal.',\n order: 6,\n completion: {\n eventName: 'task.completed',\n sourceModule: '@contractspec/example.crm-pipeline',\n payloadFilter: { type: 'follow_up' },\n },\n xpReward: 30,\n metadata: { surface: 'tasks' },\n },\n ],\n metadata: {\n surfacedIn: ['crm/dashboard', 'crm/pipeline'],\n },\n};\n\nexport const crmLearningTracks: LearningJourneyTrackSpec[] = [crmFirstWinTrack];\n"],"mappings":";AAEA,MAAaA,mBAA6C;CACxD,IAAI;CACJ,WAAW;CACX,MAAM;CACN,aACE;CACF,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,YAAY;EAAE,aAAa;EAAI,SAAS;EAAI;CAC5C,mBAAmB;EAAE,SAAS;EAAI,UAAU;EAAiB;CAC7D,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,YAAY;GAClC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,YAAY;GAClC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACd,eAAe,EAAE,MAAM,aAAa;IACrC;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACF;CACD,UAAU,EACR,YAAY,CAAC,iBAAiB,eAAe,EAC9C;CACF;AAED,MAAaC,oBAAgD,CAAC,iBAAiB"}
1
+ {"version":3,"file":"track.js","names":[],"sources":["../src/track.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\n\nexport const crmFirstWinTrack: LearningJourneyTrackSpec = {\n id: 'crm_first_win',\n productId: 'crm-pipeline',\n name: 'CRM First Win',\n description:\n 'Guide a new CRM user from empty pipeline to first closed-won deal.',\n targetUserSegment: 'crm_adopter',\n targetRole: 'sales',\n totalXp: 135,\n streakRule: { hoursWindow: 72, bonusXp: 25 },\n completionRewards: { xpBonus: 25, badgeKey: 'crm_first_win' },\n steps: [\n {\n id: 'create_pipeline',\n title: 'Create pipeline & stages',\n description: 'Create a pipeline with baseline stages.',\n order: 1,\n completion: {\n eventName: 'pipeline.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 15,\n metadata: { surface: 'pipeline' },\n },\n {\n id: 'create_contact_and_company',\n title: 'Create contact and company',\n description: 'Add your first contact and associated company.',\n order: 2,\n completion: {\n eventName: 'contact.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'contacts' },\n },\n {\n id: 'create_first_deal',\n title: 'Log first deal',\n description: 'Create your first deal in the pipeline.',\n order: 3,\n completion: {\n eventName: 'deal.created',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'deals' },\n },\n {\n id: 'move_deal_in_pipeline',\n title: 'Move a deal across stages',\n description: 'Move a deal across at least three stages.',\n order: 4,\n completion: {\n eventName: 'deal.moved',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 20,\n metadata: { surface: 'deals' },\n },\n {\n id: 'close_deal_won',\n title: 'Close a deal as won',\n description: 'Close a deal as won to hit first revenue.',\n order: 5,\n completion: {\n eventName: 'deal.won',\n sourceModule: '@contractspec/example.crm-pipeline',\n },\n xpReward: 30,\n metadata: { surface: 'deals' },\n },\n {\n id: 'setup_follow_up',\n title: 'Create follow-up task',\n description:\n 'Create a follow-up task and notification for a contact or deal.',\n order: 6,\n completion: {\n eventName: 'task.completed',\n sourceModule: '@contractspec/example.crm-pipeline',\n payloadFilter: { type: 'follow_up' },\n },\n xpReward: 30,\n metadata: { surface: 'tasks' },\n },\n ],\n metadata: {\n surfacedIn: ['crm/dashboard', 'crm/pipeline'],\n },\n};\n\nexport const crmLearningTracks: LearningJourneyTrackSpec[] = [crmFirstWinTrack];\n"],"mappings":";AAEA,MAAa,mBAA6C;CACxD,IAAI;CACJ,WAAW;CACX,MAAM;CACN,aACE;CACF,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,YAAY;EAAE,aAAa;EAAI,SAAS;EAAI;CAC5C,mBAAmB;EAAE,SAAS;EAAI,UAAU;EAAiB;CAC7D,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,YAAY;GAClC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,YAAY;GAClC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACD;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACd,eAAe,EAAE,MAAM,aAAa;IACrC;GACD,UAAU;GACV,UAAU,EAAE,SAAS,SAAS;GAC/B;EACF;CACD,UAAU,EACR,YAAY,CAAC,iBAAiB,eAAe,EAC9C;CACF;AAED,MAAa,oBAAgD,CAAC,iBAAiB"}
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@contractspec/example.learning-journey-crm-onboarding",
3
- "version": "1.46.1",
3
+ "version": "1.47.0",
4
4
  "description": "Learning journey track that onboards users to the CRM pipeline example.",
5
5
  "type": "module",
6
- "main": "./dist/index.js",
7
6
  "types": "./dist/index.d.ts",
8
7
  "exports": {
9
8
  ".": "./dist/index.js",
@@ -14,6 +13,7 @@
14
13
  "./learning-journey-crm-onboarding.feature": "./dist/learning-journey-crm-onboarding.feature.js",
15
14
  "./operations": "./dist/operations/index.js",
16
15
  "./presentations": "./dist/presentations/index.js",
16
+ "./tests/operations.test-spec": "./dist/tests/operations.test-spec.js",
17
17
  "./track": "./dist/track.js",
18
18
  "./*": "./*"
19
19
  },
@@ -30,18 +30,17 @@
30
30
  "lint:check": "eslint src"
31
31
  },
32
32
  "dependencies": {
33
- "@contractspec/lib.contracts": "1.46.1",
34
- "@contractspec/lib.schema": "1.46.1",
35
- "@contractspec/module.learning-journey": "1.46.1",
36
- "@contractspec/example.crm-pipeline": "1.46.1"
33
+ "@contractspec/lib.contracts": "1.47.0",
34
+ "@contractspec/lib.schema": "1.47.0",
35
+ "@contractspec/module.learning-journey": "1.47.0",
36
+ "@contractspec/example.crm-pipeline": "1.47.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@contractspec/tool.tsdown": "1.46.1",
40
- "@contractspec/tool.typescript": "1.46.1",
41
- "tsdown": "^0.18.3",
39
+ "@contractspec/tool.tsdown": "1.47.0",
40
+ "@contractspec/tool.typescript": "1.47.0",
41
+ "tsdown": "^0.19.0",
42
42
  "typescript": "^5.9.3"
43
43
  },
44
- "module": "./dist/index.js",
45
44
  "publishConfig": {
46
45
  "exports": {
47
46
  ".": "./dist/index.js",
package/src/example.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { ExampleSpec } from '@contractspec/lib.contracts';
1
+ import { defineExample } from '@contractspec/lib.contracts';
2
2
 
3
- const example: ExampleSpec = {
3
+ const example = defineExample({
4
4
  meta: {
5
5
  key: 'learning-journey-crm-onboarding',
6
6
  version: '1.0.0',
@@ -26,6 +26,6 @@ const example: ExampleSpec = {
26
26
  studio: { enabled: true, installable: true },
27
27
  mcp: { enabled: true },
28
28
  },
29
- };
29
+ });
30
30
 
31
31
  export default example;
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * Defines the feature module for CRM first-win onboarding journey.
5
5
  */
6
- import type { FeatureModuleSpec } from '@contractspec/lib.contracts';
6
+ import { defineFeature } from '@contractspec/lib.contracts';
7
7
 
8
8
  /**
9
9
  * Learning Journey CRM Onboarding feature module that bundles
10
10
  * CRM-specific onboarding track operations and presentations.
11
11
  */
12
- export const LearningJourneyCrmOnboardingFeature: FeatureModuleSpec = {
12
+ export const LearningJourneyCrmOnboardingFeature = defineFeature({
13
13
  meta: {
14
14
  key: 'learning-journey-crm-onboarding',
15
15
  title: 'Learning Journey: CRM Onboarding',
@@ -63,4 +63,4 @@ export const LearningJourneyCrmOnboardingFeature: FeatureModuleSpec = {
63
63
  capabilities: {
64
64
  requires: [{ key: 'identity', version: '1.0.0' }],
65
65
  },
66
- };
66
+ });