@contractspec/example.crm-pipeline 0.0.0-canary-20260113173657 → 0.0.0-canary-20260119222405

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,108 +1,108 @@
1
1
  import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
2
- import * as _contractspec_lib_schema356 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_schema314 from "@contractspec/lib.schema";
3
3
 
4
4
  //#region src/events/deal.event.d.ts
5
- declare const DealCreatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
5
+ declare const DealCreatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema314.SchemaModel<{
6
6
  dealId: {
7
- type: _contractspec_lib_schema356.FieldType<string, string>;
7
+ type: _contractspec_lib_schema314.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  name: {
11
- type: _contractspec_lib_schema356.FieldType<string, string>;
11
+ type: _contractspec_lib_schema314.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  value: {
15
- type: _contractspec_lib_schema356.FieldType<number, number>;
15
+ type: _contractspec_lib_schema314.FieldType<number, number>;
16
16
  isOptional: false;
17
17
  };
18
18
  pipelineId: {
19
- type: _contractspec_lib_schema356.FieldType<string, string>;
19
+ type: _contractspec_lib_schema314.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  stageId: {
23
- type: _contractspec_lib_schema356.FieldType<string, string>;
23
+ type: _contractspec_lib_schema314.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  ownerId: {
27
- type: _contractspec_lib_schema356.FieldType<string, string>;
27
+ type: _contractspec_lib_schema314.FieldType<string, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  createdAt: {
31
- type: _contractspec_lib_schema356.FieldType<Date, string>;
31
+ type: _contractspec_lib_schema314.FieldType<Date, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  }>>;
35
- declare const DealMovedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
35
+ declare const DealMovedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema314.SchemaModel<{
36
36
  dealId: {
37
- type: _contractspec_lib_schema356.FieldType<string, string>;
37
+ type: _contractspec_lib_schema314.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  fromStageId: {
41
- type: _contractspec_lib_schema356.FieldType<string, string>;
41
+ type: _contractspec_lib_schema314.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  toStageId: {
45
- type: _contractspec_lib_schema356.FieldType<string, string>;
45
+ type: _contractspec_lib_schema314.FieldType<string, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  movedBy: {
49
- type: _contractspec_lib_schema356.FieldType<string, string>;
49
+ type: _contractspec_lib_schema314.FieldType<string, string>;
50
50
  isOptional: false;
51
51
  };
52
52
  movedAt: {
53
- type: _contractspec_lib_schema356.FieldType<Date, string>;
53
+ type: _contractspec_lib_schema314.FieldType<Date, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  }>>;
57
- declare const DealWonEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
57
+ declare const DealWonEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema314.SchemaModel<{
58
58
  dealId: {
59
- type: _contractspec_lib_schema356.FieldType<string, string>;
59
+ type: _contractspec_lib_schema314.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  value: {
63
- type: _contractspec_lib_schema356.FieldType<number, number>;
63
+ type: _contractspec_lib_schema314.FieldType<number, number>;
64
64
  isOptional: false;
65
65
  };
66
66
  currency: {
67
- type: _contractspec_lib_schema356.FieldType<string, string>;
67
+ type: _contractspec_lib_schema314.FieldType<string, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  contactId: {
71
- type: _contractspec_lib_schema356.FieldType<string, string>;
71
+ type: _contractspec_lib_schema314.FieldType<string, string>;
72
72
  isOptional: true;
73
73
  };
74
74
  companyId: {
75
- type: _contractspec_lib_schema356.FieldType<string, string>;
75
+ type: _contractspec_lib_schema314.FieldType<string, string>;
76
76
  isOptional: true;
77
77
  };
78
78
  ownerId: {
79
- type: _contractspec_lib_schema356.FieldType<string, string>;
79
+ type: _contractspec_lib_schema314.FieldType<string, string>;
80
80
  isOptional: false;
81
81
  };
82
82
  wonAt: {
83
- type: _contractspec_lib_schema356.FieldType<Date, string>;
83
+ type: _contractspec_lib_schema314.FieldType<Date, string>;
84
84
  isOptional: false;
85
85
  };
86
86
  }>>;
87
- declare const DealLostEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
87
+ declare const DealLostEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema314.SchemaModel<{
88
88
  dealId: {
89
- type: _contractspec_lib_schema356.FieldType<string, string>;
89
+ type: _contractspec_lib_schema314.FieldType<string, string>;
90
90
  isOptional: false;
91
91
  };
92
92
  value: {
93
- type: _contractspec_lib_schema356.FieldType<number, number>;
93
+ type: _contractspec_lib_schema314.FieldType<number, number>;
94
94
  isOptional: false;
95
95
  };
96
96
  reason: {
97
- type: _contractspec_lib_schema356.FieldType<string, string>;
97
+ type: _contractspec_lib_schema314.FieldType<string, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  ownerId: {
101
- type: _contractspec_lib_schema356.FieldType<string, string>;
101
+ type: _contractspec_lib_schema314.FieldType<string, string>;
102
102
  isOptional: false;
103
103
  };
104
104
  lostAt: {
105
- type: _contractspec_lib_schema356.FieldType<Date, string>;
105
+ type: _contractspec_lib_schema314.FieldType<Date, string>;
106
106
  isOptional: false;
107
107
  };
108
108
  }>>;
@@ -1,5 +1,5 @@
1
1
  import { Deal } from "./hooks/useDealList.js";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/CrmDealCard.d.ts
5
5
  interface CrmDealCardProps {
@@ -9,7 +9,7 @@ interface CrmDealCardProps {
9
9
  declare function CrmDealCard({
10
10
  deal,
11
11
  onClick
12
- }: CrmDealCardProps): react_jsx_runtime1.JSX.Element;
12
+ }: CrmDealCardProps): react_jsx_runtime0.JSX.Element;
13
13
  //#endregion
14
14
  export { CrmDealCard };
15
15
  //# sourceMappingURL=CrmDealCard.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Deal } from "./hooks/useDealList.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/CrmPipelineBoard.d.ts
5
5
  interface CrmPipelineBoardProps {
@@ -17,7 +17,7 @@ declare function CrmPipelineBoard({
17
17
  stages,
18
18
  onDealClick,
19
19
  onDealMove
20
- }: CrmPipelineBoardProps): react_jsx_runtime0.JSX.Element;
20
+ }: CrmPipelineBoardProps): react_jsx_runtime1.JSX.Element;
21
21
  //#endregion
22
22
  export { CrmPipelineBoard };
23
23
  //# sourceMappingURL=CrmPipelineBoard.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.crm-pipeline",
3
- "version": "0.0.0-canary-20260113173657",
3
+ "version": "0.0.0-canary-20260119222405",
4
4
  "description": "CRM Pipeline - Contacts, Companies, Deals, Tasks",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -65,21 +65,21 @@
65
65
  "test": "bun test"
66
66
  },
67
67
  "dependencies": {
68
- "@contractspec/lib.contracts": "0.0.0-canary-20260113173657",
69
- "@contractspec/lib.design-system": "0.0.0-canary-20260113173657",
70
- "@contractspec/lib.example-shared-ui": "0.0.0-canary-20260113173657",
71
- "@contractspec/lib.identity-rbac": "0.0.0-canary-20260113173657",
72
- "@contractspec/lib.runtime-sandbox": "0.0.0-canary-20260113173657",
73
- "@contractspec/lib.schema": "0.0.0-canary-20260113173657",
74
- "@contractspec/lib.ui-kit-web": "0.0.0-canary-20260113173657",
75
- "@contractspec/module.audit-trail": "0.0.0-canary-20260113173657",
76
- "@contractspec/module.notifications": "0.0.0-canary-20260113173657",
68
+ "@contractspec/lib.contracts": "0.0.0-canary-20260119222405",
69
+ "@contractspec/lib.design-system": "0.0.0-canary-20260119222405",
70
+ "@contractspec/lib.example-shared-ui": "0.0.0-canary-20260119222405",
71
+ "@contractspec/lib.identity-rbac": "0.0.0-canary-20260119222405",
72
+ "@contractspec/lib.runtime-sandbox": "0.3.0",
73
+ "@contractspec/lib.schema": "1.48.0",
74
+ "@contractspec/lib.ui-kit-web": "1.48.0",
75
+ "@contractspec/module.audit-trail": "0.0.0-canary-20260119222405",
76
+ "@contractspec/module.notifications": "0.0.0-canary-20260119222405",
77
77
  "react": "19.2.3",
78
78
  "react-dom": "19.2.3"
79
79
  },
80
80
  "devDependencies": {
81
- "@contractspec/tool.tsdown": "0.0.0-canary-20260113173657",
82
- "@contractspec/tool.typescript": "0.0.0-canary-20260113173657",
81
+ "@contractspec/tool.tsdown": "1.48.0",
82
+ "@contractspec/tool.typescript": "1.48.0",
83
83
  "tsdown": "^0.19.0",
84
84
  "typescript": "^5.9.3",
85
85
  "@types/react": "^19.2.8",
@@ -43,7 +43,27 @@ const crmPipelineDocBlocks: DocBlock[] = [
43
43
  ## Guardrails
44
44
  - Emit events for stage moves and task completions; log to Audit Trail.
45
45
  - Keep required fields enforced in contracts; avoid freeform state.
46
- - Redact contact PII in markdown/JSON outputs.`,
46
+ - Redact contact PII in markdown/JSON outputs.
47
+
48
+ ## Adoption narrative
49
+
50
+ ### Before
51
+ - A CRM app with hand-written data models and handler logic.
52
+ - Pipeline stage rules live in code and drift across UI/API/events.
53
+ - Regeneration is risky because specs and implementations are not aligned.
54
+
55
+ ### After
56
+ - Contracts define deals, stages, and tasks as the source of truth.
57
+ - Regeneration keeps UI/API/events in sync when stages change.
58
+ - Compliance surfaces (audits, notifications) stay consistent with specs.
59
+
60
+ ### Minimal adoption steps
61
+ 1) Add ContractSpec CLI and core libraries.
62
+ 2) Define one operation (for example, deal/create).
63
+ 3) Run contractspec build to generate handlers and types.
64
+ 4) Wire the generated handler into your existing router.
65
+ 5) Expand to events and presentations as you add surface areas.
66
+ `,
47
67
  },
48
68
  {
49
69
  id: 'docs.examples.crm-pipeline.reference',