@contractspec/example.crm-pipeline 1.44.1 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +25 -25
- package/.turbo/turbo-build.log +22 -22
- package/CHANGELOG.md +31 -0
- package/dist/crm-pipeline.feature.js +29 -29
- package/dist/crm-pipeline.feature.js.map +1 -1
- package/dist/deal/deal.enum.d.ts +3 -3
- package/dist/deal/deal.enum.d.ts.map +1 -1
- package/dist/deal/deal.operation.d.ts +132 -132
- package/dist/deal/deal.operation.d.ts.map +1 -1
- package/dist/deal/deal.operation.js +9 -9
- package/dist/deal/deal.operation.js.map +1 -1
- package/dist/deal/deal.schema.d.ts +71 -71
- package/dist/deal/deal.schema.d.ts.map +1 -1
- package/dist/entities/company.entity.d.ts +28 -28
- package/dist/entities/company.entity.d.ts.map +1 -1
- package/dist/entities/contact.entity.d.ts +32 -32
- package/dist/entities/contact.entity.d.ts.map +1 -1
- package/dist/entities/deal.entity.d.ts +53 -53
- package/dist/entities/task.entity.d.ts +43 -43
- package/dist/events/contact.event.d.ts +8 -8
- package/dist/events/contact.event.js +1 -1
- package/dist/events/contact.event.js.map +1 -1
- package/dist/events/deal.event.d.ts +30 -30
- package/dist/events/deal.event.js +4 -4
- package/dist/events/deal.event.js.map +1 -1
- package/dist/events/task.event.d.ts +8 -8
- package/dist/events/task.event.js +1 -1
- package/dist/events/task.event.js.map +1 -1
- package/dist/example.d.ts +3 -33
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/presentations/dashboard.presentation.js +2 -2
- package/dist/presentations/dashboard.presentation.js.map +1 -1
- package/dist/presentations/pipeline.presentation.js +4 -4
- package/dist/presentations/pipeline.presentation.js.map +1 -1
- package/package.json +10 -10
- package/src/crm-pipeline.feature.ts +33 -29
- package/src/deal/deal.operation.ts +9 -9
- package/src/events/contact.event.ts +1 -1
- package/src/events/deal.event.ts +4 -4
- package/src/events/task.event.ts +1 -1
- package/src/example.ts +16 -8
- package/src/presentations/dashboard.presentation.ts +2 -2
- package/src/presentations/pipeline.presentation.ts +4 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.event.js","names":[],"sources":["../../src/events/task.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n// ============ Task Event Payloads ============\n\nconst TaskCompletedPayload = defineSchemaModel({\n name: 'TaskCompletedPayload',\n description: 'Payload when a task is completed',\n fields: {\n taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n completedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const TaskCompletedEvent = defineEvent({\n meta: {\n key: 'task.completed',\n version: 1,\n description: 'A task has been completed.',\n stability: 'stable',\n owners: ['@crm-team'],\n tags: ['task', 'lifecycle'],\n },\n payload: TaskCompletedPayload,\n});\n"],"mappings":";;;;AAKA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,YAAY;EAC5B;CACD,SAAS;CACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"task.event.js","names":[],"sources":["../../src/events/task.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n// ============ Task Event Payloads ============\n\nconst TaskCompletedPayload = defineSchemaModel({\n name: 'TaskCompletedPayload',\n description: 'Payload when a task is completed',\n fields: {\n taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n completedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const TaskCompletedEvent = defineEvent({\n meta: {\n key: 'task.completed',\n version: '1.0.0',\n description: 'A task has been completed.',\n stability: 'stable',\n owners: ['@crm-team'],\n tags: ['task', 'lifecycle'],\n },\n payload: TaskCompletedPayload,\n});\n"],"mappings":";;;;AAKA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,YAAY;EAC5B;CACD,SAAS;CACV,CAAC"}
|
package/dist/example.d.ts
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
|
+
import { ExampleSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/example.d.ts
|
|
2
|
-
declare const example:
|
|
3
|
-
readonly id: "crm-pipeline";
|
|
4
|
-
readonly title: "CRM Pipeline";
|
|
5
|
-
readonly summary: "Sales CRM with contacts, companies, deals, pipelines, and tasks.";
|
|
6
|
-
readonly tags: readonly ["crm", "sales", "pipeline", "deals"];
|
|
7
|
-
readonly kind: "template";
|
|
8
|
-
readonly visibility: "public";
|
|
9
|
-
readonly docs: {
|
|
10
|
-
readonly rootDocId: "docs.examples.crm-pipeline";
|
|
11
|
-
};
|
|
12
|
-
readonly entrypoints: {
|
|
13
|
-
readonly packageName: "@contractspec/example.crm-pipeline";
|
|
14
|
-
readonly feature: "./feature";
|
|
15
|
-
readonly contracts: "./contracts";
|
|
16
|
-
readonly presentations: "./presentations";
|
|
17
|
-
readonly handlers: "./handlers";
|
|
18
|
-
readonly docs: "./docs";
|
|
19
|
-
};
|
|
20
|
-
readonly surfaces: {
|
|
21
|
-
readonly templates: true;
|
|
22
|
-
readonly sandbox: {
|
|
23
|
-
readonly enabled: true;
|
|
24
|
-
readonly modes: readonly ["playground", "specs", "builder", "markdown", "evolution"];
|
|
25
|
-
};
|
|
26
|
-
readonly studio: {
|
|
27
|
-
readonly enabled: true;
|
|
28
|
-
readonly installable: true;
|
|
29
|
-
};
|
|
30
|
-
readonly mcp: {
|
|
31
|
-
readonly enabled: true;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
4
|
+
declare const example: ExampleSpec;
|
|
35
5
|
//#endregion
|
|
36
6
|
export { example as default };
|
|
37
7
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAAS"}
|
package/dist/example.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
//#region src/example.ts
|
|
2
2
|
const example = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
meta: {
|
|
4
|
+
key: "crm-pipeline",
|
|
5
|
+
version: "1.0.0",
|
|
6
|
+
title: "CRM Pipeline",
|
|
7
|
+
description: "Sales CRM with contacts, companies, deals, pipelines, and tasks.",
|
|
8
|
+
kind: "template",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
stability: "experimental",
|
|
11
|
+
owners: ["@platform.core"],
|
|
12
|
+
tags: [
|
|
13
|
+
"crm",
|
|
14
|
+
"sales",
|
|
15
|
+
"pipeline",
|
|
16
|
+
"deals"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
14
19
|
docs: { rootDocId: "docs.examples.crm-pipeline" },
|
|
15
20
|
entrypoints: {
|
|
16
21
|
packageName: "@contractspec/example.crm-pipeline",
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["
|
|
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: 'crm-pipeline',\n version: '1.0.0',\n title: 'CRM Pipeline',\n description:\n 'Sales CRM with contacts, companies, deals, pipelines, and tasks.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['crm', 'sales', 'pipeline', 'deals'],\n },\n docs: {\n rootDocId: 'docs.examples.crm-pipeline',\n },\n entrypoints: {\n packageName: '@contractspec/example.crm-pipeline',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\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;GAAO;GAAS;GAAY;GAAQ;EAC5C;CACD,MAAM,EACJ,WAAW,8BACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,14 +18,14 @@ import "./operations/index.js";
|
|
|
18
18
|
import { CrmDashboardPresentation, PipelineMetricsPresentation } from "./presentations/dashboard.presentation.js";
|
|
19
19
|
import { DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation } from "./presentations/pipeline.presentation.js";
|
|
20
20
|
import "./presentations/index.js";
|
|
21
|
-
import * as
|
|
21
|
+
import * as _contractspec_lib_schema233 from "@contractspec/lib.schema";
|
|
22
22
|
|
|
23
23
|
//#region src/index.d.ts
|
|
24
24
|
/**
|
|
25
25
|
* Complete schema composition for CRM Pipeline.
|
|
26
26
|
*/
|
|
27
27
|
declare const schemaComposition: {
|
|
28
|
-
modules:
|
|
28
|
+
modules: _contractspec_lib_schema233.ModuleSchemaContribution[];
|
|
29
29
|
provider: "postgresql";
|
|
30
30
|
outputPath: string;
|
|
31
31
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAqBa;WASZ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAqBa;WASZ,2BAAA,CAAA,wBAAA"}
|
|
@@ -7,7 +7,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
|
7
7
|
const CrmDashboardPresentation = {
|
|
8
8
|
meta: {
|
|
9
9
|
key: "crm.dashboard",
|
|
10
|
-
version: 1,
|
|
10
|
+
version: "1.0.0",
|
|
11
11
|
title: "CRM Dashboard",
|
|
12
12
|
description: "Main CRM dashboard with pipeline overview, deal stats, and activities",
|
|
13
13
|
domain: "crm-pipeline",
|
|
@@ -31,7 +31,7 @@ const CrmDashboardPresentation = {
|
|
|
31
31
|
const PipelineMetricsPresentation = {
|
|
32
32
|
meta: {
|
|
33
33
|
key: "crm.pipeline.metrics",
|
|
34
|
-
version: 1,
|
|
34
|
+
version: "1.0.0",
|
|
35
35
|
title: "Pipeline Metrics",
|
|
36
36
|
description: "Pipeline metrics and forecasting view",
|
|
37
37
|
domain: "crm-pipeline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.presentation.js","names":["CrmDashboardPresentation: PresentationSpec","PipelineMetricsPresentation: PresentationSpec"],"sources":["../../src/presentations/dashboard.presentation.ts"],"sourcesContent":["/**\n * CRM Dashboard Presentation Descriptor\n */\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Main CRM dashboard presentation.\n */\nexport const CrmDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'crm.dashboard',\n version: 1,\n title: 'CRM Dashboard',\n description:\n 'Main CRM dashboard with pipeline overview, deal stats, and activities',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['dashboard', 'overview'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide a high-level overview of CRM performance and active deals.',\n context: 'The landing page for CRM users.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'CrmDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.enabled'],\n },\n};\n\n/**\n * Pipeline metrics presentation.\n */\nexport const PipelineMetricsPresentation: PresentationSpec = {\n meta: {\n key: 'crm.pipeline.metrics',\n version: 1,\n title: 'Pipeline Metrics',\n description: 'Pipeline metrics and forecasting view',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['pipeline', 'metrics', 'forecast'],\n stability: StabilityEnum.Experimental,\n goal: 'Track pipeline health and sales forecasts.',\n context: 'Data-intensive widget for sales managers.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PipelineMetricsView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.metrics.enabled'],\n },\n};\n"],"mappings":";;;;;;AASA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,aAAa,WAAW;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,cAAc,EACvB;CACF;;;;AAKD,MAAaC,8BAAgD;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAY;GAAW;GAAW;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF"}
|
|
1
|
+
{"version":3,"file":"dashboard.presentation.js","names":["CrmDashboardPresentation: PresentationSpec","PipelineMetricsPresentation: PresentationSpec"],"sources":["../../src/presentations/dashboard.presentation.ts"],"sourcesContent":["/**\n * CRM Dashboard Presentation Descriptor\n */\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Main CRM dashboard presentation.\n */\nexport const CrmDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'crm.dashboard',\n version: '1.0.0',\n title: 'CRM Dashboard',\n description:\n 'Main CRM dashboard with pipeline overview, deal stats, and activities',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['dashboard', 'overview'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide a high-level overview of CRM performance and active deals.',\n context: 'The landing page for CRM users.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'CrmDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.enabled'],\n },\n};\n\n/**\n * Pipeline metrics presentation.\n */\nexport const PipelineMetricsPresentation: PresentationSpec = {\n meta: {\n key: 'crm.pipeline.metrics',\n version: '1.0.0',\n title: 'Pipeline Metrics',\n description: 'Pipeline metrics and forecasting view',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['pipeline', 'metrics', 'forecast'],\n stability: StabilityEnum.Experimental,\n goal: 'Track pipeline health and sales forecasts.',\n context: 'Data-intensive widget for sales managers.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PipelineMetricsView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.metrics.enabled'],\n },\n};\n"],"mappings":";;;;;;AASA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,aAAa,WAAW;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,cAAc,EACvB;CACF;;;;AAKD,MAAaC,8BAAgD;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAY;GAAW;GAAW;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF"}
|
|
@@ -8,7 +8,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
|
8
8
|
const PipelineKanbanPresentation = {
|
|
9
9
|
meta: {
|
|
10
10
|
key: "crm.pipeline.kanban",
|
|
11
|
-
version: 1,
|
|
11
|
+
version: "1.0.0",
|
|
12
12
|
title: "Pipeline Kanban",
|
|
13
13
|
description: "Kanban board view of deals organized by stage",
|
|
14
14
|
domain: "crm-pipeline",
|
|
@@ -37,7 +37,7 @@ const PipelineKanbanPresentation = {
|
|
|
37
37
|
const DealListPresentation = {
|
|
38
38
|
meta: {
|
|
39
39
|
key: "crm.deal.list",
|
|
40
|
-
version: 1,
|
|
40
|
+
version: "1.0.0",
|
|
41
41
|
title: "Deal List",
|
|
42
42
|
description: "List view of deals with value, status, and owner info",
|
|
43
43
|
domain: "crm-pipeline",
|
|
@@ -66,7 +66,7 @@ const DealListPresentation = {
|
|
|
66
66
|
const DealDetailPresentation = {
|
|
67
67
|
meta: {
|
|
68
68
|
key: "crm.deal.detail",
|
|
69
|
-
version: 1,
|
|
69
|
+
version: "1.0.0",
|
|
70
70
|
title: "Deal Details",
|
|
71
71
|
description: "Detailed view of a deal with activities, contacts, and history",
|
|
72
72
|
domain: "crm-pipeline",
|
|
@@ -90,7 +90,7 @@ const DealDetailPresentation = {
|
|
|
90
90
|
const DealCardPresentation = {
|
|
91
91
|
meta: {
|
|
92
92
|
key: "crm.deal.card",
|
|
93
|
-
version: 1,
|
|
93
|
+
version: "1.0.0",
|
|
94
94
|
title: "Deal Card",
|
|
95
95
|
description: "Compact deal card for kanban board display",
|
|
96
96
|
domain: "crm-pipeline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.presentation.js","names":["PipelineKanbanPresentation: PresentationSpec","DealListPresentation: PresentationSpec","DealDetailPresentation: PresentationSpec","DealCardPresentation: PresentationSpec"],"sources":["../../src/presentations/pipeline.presentation.ts"],"sourcesContent":["/**\n * Pipeline Presentation Descriptors\n */\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { DealModel } from '../deal/deal.schema';\n\n/**\n * Kanban board presentation for the sales pipeline.\n */\nexport const PipelineKanbanPresentation: PresentationSpec = {\n meta: {\n key: 'crm.pipeline.kanban',\n version: 1,\n title: 'Pipeline Kanban',\n description: 'Kanban board view of deals organized by stage',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['pipeline', 'kanban', 'deals'],\n stability: StabilityEnum.Experimental,\n goal: 'Visualize the sales pipeline status and deal distribution across stages.',\n context: 'Used in the sales dashboard and management reports.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PipelineKanbanView',\n props: DealModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.pipeline.enabled'],\n },\n};\n\n/**\n * List view of deals with filtering.\n */\nexport const DealListPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.list',\n version: 1,\n title: 'Deal List',\n description: 'List view of deals with value, status, and owner info',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Search, filter, and review deal lists.',\n context: 'Standard view for deal management and bulk actions.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealListView',\n props: DealModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n\n/**\n * Deal detail presentation.\n */\nexport const DealDetailPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.detail',\n version: 1,\n title: 'Deal Details',\n description:\n 'Detailed view of a deal with activities, contacts, and history',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Deep dive into deal details and historical activities.',\n context: 'The main workspace for managing a single deal execution.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealDetailView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n\n/**\n * Deal card for kanban board.\n */\nexport const DealCardPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.card',\n version: 1,\n title: 'Deal Card',\n description: 'Compact deal card for kanban board display',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'card', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide a quick overview of deal status in the pipeline view.',\n context: 'Condensed representation used within the Pipeline Kanban board.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealCard',\n props: DealModel,\n },\n targets: ['react'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n"],"mappings":";;;;;;;AAUA,MAAaA,6BAA+C;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAY;GAAU;GAAQ;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;;;;AAKD,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,OAAO;EACtB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF;;;;AAKD,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF;;;;AAKD,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAQ;GAAQ;GAAS;EAChC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF"}
|
|
1
|
+
{"version":3,"file":"pipeline.presentation.js","names":["PipelineKanbanPresentation: PresentationSpec","DealListPresentation: PresentationSpec","DealDetailPresentation: PresentationSpec","DealCardPresentation: PresentationSpec"],"sources":["../../src/presentations/pipeline.presentation.ts"],"sourcesContent":["/**\n * Pipeline Presentation Descriptors\n */\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { DealModel } from '../deal/deal.schema';\n\n/**\n * Kanban board presentation for the sales pipeline.\n */\nexport const PipelineKanbanPresentation: PresentationSpec = {\n meta: {\n key: 'crm.pipeline.kanban',\n version: '1.0.0',\n title: 'Pipeline Kanban',\n description: 'Kanban board view of deals organized by stage',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['pipeline', 'kanban', 'deals'],\n stability: StabilityEnum.Experimental,\n goal: 'Visualize the sales pipeline status and deal distribution across stages.',\n context: 'Used in the sales dashboard and management reports.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PipelineKanbanView',\n props: DealModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.pipeline.enabled'],\n },\n};\n\n/**\n * List view of deals with filtering.\n */\nexport const DealListPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.list',\n version: '1.0.0',\n title: 'Deal List',\n description: 'List view of deals with value, status, and owner info',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Search, filter, and review deal lists.',\n context: 'Standard view for deal management and bulk actions.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealListView',\n props: DealModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n\n/**\n * Deal detail presentation.\n */\nexport const DealDetailPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.detail',\n version: '1.0.0',\n title: 'Deal Details',\n description:\n 'Detailed view of a deal with activities, contacts, and history',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Deep dive into deal details and historical activities.',\n context: 'The main workspace for managing a single deal execution.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealDetailView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n\n/**\n * Deal card for kanban board.\n */\nexport const DealCardPresentation: PresentationSpec = {\n meta: {\n key: 'crm.deal.card',\n version: '1.0.0',\n title: 'Deal Card',\n description: 'Compact deal card for kanban board display',\n domain: 'crm-pipeline',\n owners: ['@crm-team'],\n tags: ['deal', 'card', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide a quick overview of deal status in the pipeline view.',\n context: 'Condensed representation used within the Pipeline Kanban board.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DealCard',\n props: DealModel,\n },\n targets: ['react'],\n policy: {\n flags: ['crm.deals.enabled'],\n },\n};\n"],"mappings":";;;;;;;AAUA,MAAaA,6BAA+C;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAY;GAAU;GAAQ;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;;;;AAKD,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,OAAO;EACtB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF;;;;AAKD,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF;;;;AAKD,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAQ;GAAQ;GAAS;EAChC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,oBAAoB,EAC7B;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.crm-pipeline",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "CRM Pipeline - Contacts, Companies, Deals, Tasks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"test": "bun run"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@contractspec/lib.schema": "1.
|
|
51
|
-
"@contractspec/lib.contracts": "1.
|
|
52
|
-
"@contractspec/lib.bus": "1.
|
|
53
|
-
"@contractspec/lib.identity-rbac": "1.
|
|
54
|
-
"@contractspec/lib.jobs": "1.
|
|
55
|
-
"@contractspec/module.audit-trail": "1.
|
|
56
|
-
"@contractspec/module.notifications": "1.
|
|
50
|
+
"@contractspec/lib.schema": "1.45.0",
|
|
51
|
+
"@contractspec/lib.contracts": "1.45.0",
|
|
52
|
+
"@contractspec/lib.bus": "1.45.0",
|
|
53
|
+
"@contractspec/lib.identity-rbac": "1.45.0",
|
|
54
|
+
"@contractspec/lib.jobs": "1.45.0",
|
|
55
|
+
"@contractspec/module.audit-trail": "1.45.0",
|
|
56
|
+
"@contractspec/module.notifications": "1.45.0",
|
|
57
57
|
"zod": "^4.1.13"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@contractspec/tool.tsdown": "1.
|
|
61
|
-
"@contractspec/tool.typescript": "1.
|
|
60
|
+
"@contractspec/tool.tsdown": "1.45.0",
|
|
61
|
+
"@contractspec/tool.typescript": "1.45.0",
|
|
62
62
|
"tsdown": "^0.18.3",
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
@@ -19,68 +19,72 @@ export const CrmPipelineFeature: FeatureModuleSpec = {
|
|
|
19
19
|
owners: ['@crm-team'],
|
|
20
20
|
tags: ['crm', 'sales', 'pipeline', 'deals'],
|
|
21
21
|
stability: 'experimental',
|
|
22
|
-
version: 1,
|
|
22
|
+
version: '1.0.0',
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
// All contract operations included in this feature
|
|
26
26
|
operations: [
|
|
27
27
|
// Deal operations
|
|
28
|
-
{ key: 'crm.deal.create', version: 1 },
|
|
29
|
-
{ key: 'crm.deal.move', version: 1 },
|
|
30
|
-
{ key: 'crm.deal.win', version: 1 },
|
|
31
|
-
{ key: 'crm.deal.lose', version: 1 },
|
|
32
|
-
{ key: 'crm.deal.list', version: 1 },
|
|
28
|
+
{ key: 'crm.deal.create', version: '1.0.0' },
|
|
29
|
+
{ key: 'crm.deal.move', version: '1.0.0' },
|
|
30
|
+
{ key: 'crm.deal.win', version: '1.0.0' },
|
|
31
|
+
{ key: 'crm.deal.lose', version: '1.0.0' },
|
|
32
|
+
{ key: 'crm.deal.list', version: '1.0.0' },
|
|
33
33
|
],
|
|
34
34
|
|
|
35
35
|
// Events emitted by this feature
|
|
36
36
|
events: [
|
|
37
37
|
// Deal events
|
|
38
|
-
{ key: 'deal.created', version: 1 },
|
|
39
|
-
{ key: 'deal.moved', version: 1 },
|
|
40
|
-
{ key: 'deal.won', version: 1 },
|
|
41
|
-
{ key: 'deal.lost', version: 1 },
|
|
38
|
+
{ key: 'deal.created', version: '1.0.0' },
|
|
39
|
+
{ key: 'deal.moved', version: '1.0.0' },
|
|
40
|
+
{ key: 'deal.won', version: '1.0.0' },
|
|
41
|
+
{ key: 'deal.lost', version: '1.0.0' },
|
|
42
42
|
|
|
43
43
|
// Contact events
|
|
44
|
-
{ key: 'contact.created', version: 1 },
|
|
44
|
+
{ key: 'contact.created', version: '1.0.0' },
|
|
45
45
|
|
|
46
46
|
// Task events
|
|
47
|
-
{ key: 'task.completed', version: 1 },
|
|
47
|
+
{ key: 'task.completed', version: '1.0.0' },
|
|
48
48
|
],
|
|
49
49
|
|
|
50
50
|
// Presentations associated with this feature
|
|
51
51
|
presentations: [
|
|
52
|
-
{ key: 'crm.dashboard', version: 1 },
|
|
53
|
-
{ key: 'crm.pipeline.kanban', version: 1 },
|
|
54
|
-
{ key: 'crm.deal.list', version: 1 },
|
|
55
|
-
{ key: 'crm.deal.detail', version: 1 },
|
|
56
|
-
{ key: 'crm.deal.card', version: 1 },
|
|
57
|
-
{ key: 'crm.pipeline.metrics', version: 1 },
|
|
52
|
+
{ key: 'crm.dashboard', version: '1.0.0' },
|
|
53
|
+
{ key: 'crm.pipeline.kanban', version: '1.0.0' },
|
|
54
|
+
{ key: 'crm.deal.list', version: '1.0.0' },
|
|
55
|
+
{ key: 'crm.deal.detail', version: '1.0.0' },
|
|
56
|
+
{ key: 'crm.deal.card', version: '1.0.0' },
|
|
57
|
+
{ key: 'crm.pipeline.metrics', version: '1.0.0' },
|
|
58
58
|
],
|
|
59
59
|
|
|
60
60
|
// Link operations to their primary presentations
|
|
61
61
|
opToPresentation: [
|
|
62
62
|
{
|
|
63
|
-
op: { key: 'crm.deal.list', version: 1 },
|
|
64
|
-
pres: { key: 'crm.pipeline.kanban', version: 1 },
|
|
63
|
+
op: { key: 'crm.deal.list', version: '1.0.0' },
|
|
64
|
+
pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
op: { key: 'crm.deal.move', version: 1 },
|
|
68
|
-
pres: { key: 'crm.pipeline.kanban', version: 1 },
|
|
67
|
+
op: { key: 'crm.deal.move', version: '1.0.0' },
|
|
68
|
+
pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
|
|
69
69
|
},
|
|
70
70
|
],
|
|
71
71
|
|
|
72
72
|
// Target requirements for multi-surface rendering
|
|
73
73
|
presentationsTargets: [
|
|
74
|
-
{ key: 'crm.dashboard', version: 1, targets: ['react', 'markdown'] },
|
|
75
|
-
{
|
|
74
|
+
{ key: 'crm.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },
|
|
75
|
+
{
|
|
76
|
+
key: 'crm.pipeline.kanban',
|
|
77
|
+
version: '1.0.0',
|
|
78
|
+
targets: ['react', 'markdown'],
|
|
79
|
+
},
|
|
76
80
|
{
|
|
77
81
|
key: 'crm.deal.list',
|
|
78
|
-
version: 1,
|
|
82
|
+
version: '1.0.0',
|
|
79
83
|
targets: ['react', 'markdown', 'application/json'],
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
key: 'crm.pipeline.metrics',
|
|
83
|
-
version: 1,
|
|
87
|
+
version: '1.0.0',
|
|
84
88
|
targets: ['react', 'markdown'],
|
|
85
89
|
},
|
|
86
90
|
],
|
|
@@ -88,9 +92,9 @@ export const CrmPipelineFeature: FeatureModuleSpec = {
|
|
|
88
92
|
// Capability requirements
|
|
89
93
|
capabilities: {
|
|
90
94
|
requires: [
|
|
91
|
-
{ key: 'identity', version: 1 },
|
|
92
|
-
{ key: 'audit-trail', version: 1 },
|
|
93
|
-
{ key: 'notifications', version: 1 },
|
|
95
|
+
{ key: 'identity', version: '1.0.0' },
|
|
96
|
+
{ key: 'audit-trail', version: '1.0.0' },
|
|
97
|
+
{ key: 'notifications', version: '1.0.0' },
|
|
94
98
|
],
|
|
95
99
|
},
|
|
96
100
|
};
|
|
@@ -23,7 +23,7 @@ const OWNERS = ['@example.crm-pipeline'] as const;
|
|
|
23
23
|
export const CreateDealContract = defineCommand({
|
|
24
24
|
meta: {
|
|
25
25
|
key: 'crm.deal.create',
|
|
26
|
-
version: 1,
|
|
26
|
+
version: '1.0.0',
|
|
27
27
|
stability: 'stable',
|
|
28
28
|
owners: [...OWNERS],
|
|
29
29
|
tags: ['crm', 'deal', 'create'],
|
|
@@ -42,7 +42,7 @@ export const CreateDealContract = defineCommand({
|
|
|
42
42
|
emits: [
|
|
43
43
|
{
|
|
44
44
|
key: 'deal.created',
|
|
45
|
-
version: 1,
|
|
45
|
+
version: '1.0.0',
|
|
46
46
|
when: 'Deal is created',
|
|
47
47
|
payload: DealModel,
|
|
48
48
|
},
|
|
@@ -83,7 +83,7 @@ export const CreateDealContract = defineCommand({
|
|
|
83
83
|
export const MoveDealContract = defineCommand({
|
|
84
84
|
meta: {
|
|
85
85
|
key: 'crm.deal.move',
|
|
86
|
-
version: 1,
|
|
86
|
+
version: '1.0.0',
|
|
87
87
|
stability: 'stable',
|
|
88
88
|
owners: [...OWNERS],
|
|
89
89
|
tags: ['crm', 'deal', 'move', 'kanban'],
|
|
@@ -102,7 +102,7 @@ export const MoveDealContract = defineCommand({
|
|
|
102
102
|
emits: [
|
|
103
103
|
{
|
|
104
104
|
key: 'deal.moved',
|
|
105
|
-
version: 1,
|
|
105
|
+
version: '1.0.0',
|
|
106
106
|
when: 'Deal stage changed',
|
|
107
107
|
payload: DealMovedPayloadModel,
|
|
108
108
|
},
|
|
@@ -138,7 +138,7 @@ export const MoveDealContract = defineCommand({
|
|
|
138
138
|
export const WinDealContract = defineCommand({
|
|
139
139
|
meta: {
|
|
140
140
|
key: 'crm.deal.win',
|
|
141
|
-
version: 1,
|
|
141
|
+
version: '1.0.0',
|
|
142
142
|
stability: 'stable',
|
|
143
143
|
owners: [...OWNERS],
|
|
144
144
|
tags: ['crm', 'deal', 'won'],
|
|
@@ -157,7 +157,7 @@ export const WinDealContract = defineCommand({
|
|
|
157
157
|
emits: [
|
|
158
158
|
{
|
|
159
159
|
key: 'deal.won',
|
|
160
|
-
version: 1,
|
|
160
|
+
version: '1.0.0',
|
|
161
161
|
when: 'Deal is won',
|
|
162
162
|
payload: DealWonPayloadModel,
|
|
163
163
|
},
|
|
@@ -197,7 +197,7 @@ export const WinDealContract = defineCommand({
|
|
|
197
197
|
export const LoseDealContract = defineCommand({
|
|
198
198
|
meta: {
|
|
199
199
|
key: 'crm.deal.lose',
|
|
200
|
-
version: 1,
|
|
200
|
+
version: '1.0.0',
|
|
201
201
|
stability: 'stable',
|
|
202
202
|
owners: [...OWNERS],
|
|
203
203
|
tags: ['crm', 'deal', 'lost'],
|
|
@@ -216,7 +216,7 @@ export const LoseDealContract = defineCommand({
|
|
|
216
216
|
emits: [
|
|
217
217
|
{
|
|
218
218
|
key: 'deal.lost',
|
|
219
|
-
version: 1,
|
|
219
|
+
version: '1.0.0',
|
|
220
220
|
when: 'Deal is lost',
|
|
221
221
|
payload: DealLostPayloadModel,
|
|
222
222
|
},
|
|
@@ -256,7 +256,7 @@ export const LoseDealContract = defineCommand({
|
|
|
256
256
|
export const ListDealsContract = defineQuery({
|
|
257
257
|
meta: {
|
|
258
258
|
key: 'crm.deal.list',
|
|
259
|
-
version: 1,
|
|
259
|
+
version: '1.0.0',
|
|
260
260
|
stability: 'stable',
|
|
261
261
|
owners: [...OWNERS],
|
|
262
262
|
tags: ['crm', 'deal', 'list'],
|
|
@@ -21,7 +21,7 @@ const ContactCreatedPayload = defineSchemaModel({
|
|
|
21
21
|
export const ContactCreatedEvent = defineEvent({
|
|
22
22
|
meta: {
|
|
23
23
|
key: 'contact.created',
|
|
24
|
-
version: 1,
|
|
24
|
+
version: '1.0.0',
|
|
25
25
|
description: 'A new contact has been created.',
|
|
26
26
|
stability: 'stable',
|
|
27
27
|
owners: ['@crm-team'],
|
package/src/events/deal.event.ts
CHANGED
|
@@ -58,7 +58,7 @@ const DealLostPayload = defineSchemaModel({
|
|
|
58
58
|
export const DealCreatedEvent = defineEvent({
|
|
59
59
|
meta: {
|
|
60
60
|
key: 'deal.created',
|
|
61
|
-
version: 1,
|
|
61
|
+
version: '1.0.0',
|
|
62
62
|
description: 'A new deal has been created.',
|
|
63
63
|
stability: 'stable',
|
|
64
64
|
owners: ['@crm-team'],
|
|
@@ -70,7 +70,7 @@ export const DealCreatedEvent = defineEvent({
|
|
|
70
70
|
export const DealMovedEvent = defineEvent({
|
|
71
71
|
meta: {
|
|
72
72
|
key: 'deal.moved',
|
|
73
|
-
version: 1,
|
|
73
|
+
version: '1.0.0',
|
|
74
74
|
description: 'A deal has been moved to a different stage.',
|
|
75
75
|
stability: 'stable',
|
|
76
76
|
owners: ['@crm-team'],
|
|
@@ -82,7 +82,7 @@ export const DealMovedEvent = defineEvent({
|
|
|
82
82
|
export const DealWonEvent = defineEvent({
|
|
83
83
|
meta: {
|
|
84
84
|
key: 'deal.won',
|
|
85
|
-
version: 1,
|
|
85
|
+
version: '1.0.0',
|
|
86
86
|
description: 'A deal has been won.',
|
|
87
87
|
stability: 'stable',
|
|
88
88
|
owners: ['@crm-team'],
|
|
@@ -94,7 +94,7 @@ export const DealWonEvent = defineEvent({
|
|
|
94
94
|
export const DealLostEvent = defineEvent({
|
|
95
95
|
meta: {
|
|
96
96
|
key: 'deal.lost',
|
|
97
|
-
version: 1,
|
|
97
|
+
version: '1.0.0',
|
|
98
98
|
description: 'A deal has been lost.',
|
|
99
99
|
stability: 'stable',
|
|
100
100
|
owners: ['@crm-team'],
|
package/src/events/task.event.ts
CHANGED
|
@@ -18,7 +18,7 @@ const TaskCompletedPayload = defineSchemaModel({
|
|
|
18
18
|
export const TaskCompletedEvent = defineEvent({
|
|
19
19
|
meta: {
|
|
20
20
|
key: 'task.completed',
|
|
21
|
-
version: 1,
|
|
21
|
+
version: '1.0.0',
|
|
22
22
|
description: 'A task has been completed.',
|
|
23
23
|
stability: 'stable',
|
|
24
24
|
owners: ['@crm-team'],
|
package/src/example.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ExampleSpec } from '@contractspec/lib.contracts';
|
|
2
|
+
|
|
3
|
+
const example: ExampleSpec = {
|
|
4
|
+
meta: {
|
|
5
|
+
key: 'crm-pipeline',
|
|
6
|
+
version: '1.0.0',
|
|
7
|
+
title: 'CRM Pipeline',
|
|
8
|
+
description:
|
|
9
|
+
'Sales CRM with contacts, companies, deals, pipelines, and tasks.',
|
|
10
|
+
kind: 'template',
|
|
11
|
+
visibility: 'public',
|
|
12
|
+
stability: 'experimental',
|
|
13
|
+
owners: ['@platform.core'],
|
|
14
|
+
tags: ['crm', 'sales', 'pipeline', 'deals'],
|
|
15
|
+
},
|
|
8
16
|
docs: {
|
|
9
17
|
rootDocId: 'docs.examples.crm-pipeline',
|
|
10
18
|
},
|
|
@@ -25,6 +33,6 @@ const example = {
|
|
|
25
33
|
studio: { enabled: true, installable: true },
|
|
26
34
|
mcp: { enabled: true },
|
|
27
35
|
},
|
|
28
|
-
}
|
|
36
|
+
};
|
|
29
37
|
|
|
30
38
|
export default example;
|
|
@@ -10,7 +10,7 @@ import { StabilityEnum } from '@contractspec/lib.contracts';
|
|
|
10
10
|
export const CrmDashboardPresentation: PresentationSpec = {
|
|
11
11
|
meta: {
|
|
12
12
|
key: 'crm.dashboard',
|
|
13
|
-
version: 1,
|
|
13
|
+
version: '1.0.0',
|
|
14
14
|
title: 'CRM Dashboard',
|
|
15
15
|
description:
|
|
16
16
|
'Main CRM dashboard with pipeline overview, deal stats, and activities',
|
|
@@ -38,7 +38,7 @@ export const CrmDashboardPresentation: PresentationSpec = {
|
|
|
38
38
|
export const PipelineMetricsPresentation: PresentationSpec = {
|
|
39
39
|
meta: {
|
|
40
40
|
key: 'crm.pipeline.metrics',
|
|
41
|
-
version: 1,
|
|
41
|
+
version: '1.0.0',
|
|
42
42
|
title: 'Pipeline Metrics',
|
|
43
43
|
description: 'Pipeline metrics and forecasting view',
|
|
44
44
|
domain: 'crm-pipeline',
|
|
@@ -11,7 +11,7 @@ import { DealModel } from '../deal/deal.schema';
|
|
|
11
11
|
export const PipelineKanbanPresentation: PresentationSpec = {
|
|
12
12
|
meta: {
|
|
13
13
|
key: 'crm.pipeline.kanban',
|
|
14
|
-
version: 1,
|
|
14
|
+
version: '1.0.0',
|
|
15
15
|
title: 'Pipeline Kanban',
|
|
16
16
|
description: 'Kanban board view of deals organized by stage',
|
|
17
17
|
domain: 'crm-pipeline',
|
|
@@ -39,7 +39,7 @@ export const PipelineKanbanPresentation: PresentationSpec = {
|
|
|
39
39
|
export const DealListPresentation: PresentationSpec = {
|
|
40
40
|
meta: {
|
|
41
41
|
key: 'crm.deal.list',
|
|
42
|
-
version: 1,
|
|
42
|
+
version: '1.0.0',
|
|
43
43
|
title: 'Deal List',
|
|
44
44
|
description: 'List view of deals with value, status, and owner info',
|
|
45
45
|
domain: 'crm-pipeline',
|
|
@@ -67,7 +67,7 @@ export const DealListPresentation: PresentationSpec = {
|
|
|
67
67
|
export const DealDetailPresentation: PresentationSpec = {
|
|
68
68
|
meta: {
|
|
69
69
|
key: 'crm.deal.detail',
|
|
70
|
-
version: 1,
|
|
70
|
+
version: '1.0.0',
|
|
71
71
|
title: 'Deal Details',
|
|
72
72
|
description:
|
|
73
73
|
'Detailed view of a deal with activities, contacts, and history',
|
|
@@ -95,7 +95,7 @@ export const DealDetailPresentation: PresentationSpec = {
|
|
|
95
95
|
export const DealCardPresentation: PresentationSpec = {
|
|
96
96
|
meta: {
|
|
97
97
|
key: 'crm.deal.card',
|
|
98
|
-
version: 1,
|
|
98
|
+
version: '1.0.0',
|
|
99
99
|
title: 'Deal Card',
|
|
100
100
|
description: 'Compact deal card for kanban board display',
|
|
101
101
|
domain: 'crm-pipeline',
|