@contractspec/example.crm-pipeline 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.
- package/.turbo/turbo-build$colon$bundle.log +106 -31
- package/.turbo/turbo-build.log +109 -34
- package/CHANGELOG.md +44 -0
- package/dist/crm-pipeline.feature.d.ts +2 -2
- package/dist/crm-pipeline.feature.d.ts.map +1 -1
- package/dist/crm-pipeline.feature.js +9 -2
- package/dist/crm-pipeline.feature.js.map +1 -1
- package/dist/deal/deal.operation.d.ts +6 -6
- package/dist/deal/deal.test-spec.d.ts +8 -0
- package/dist/deal/deal.test-spec.d.ts.map +1 -0
- package/dist/deal/deal.test-spec.js +65 -0
- package/dist/deal/deal.test-spec.js.map +1 -0
- package/dist/entities/company.entity.d.ts +28 -28
- package/dist/entities/contact.entity.d.ts +32 -32
- package/dist/entities/index.js.map +1 -1
- 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/deal.event.d.ts +5 -5
- package/dist/events/deal.event.js +1 -1
- package/dist/events/task.event.d.ts +2 -2
- package/dist/events/task.event.d.ts.map +1 -1
- package/dist/events/task.event.js +1 -1
- package/dist/example.d.ts +2 -2
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +4 -2
- package/dist/example.js.map +1 -1
- package/dist/handlers/crm.handlers.d.ts +89 -0
- package/dist/handlers/crm.handlers.d.ts.map +1 -0
- package/dist/handlers/crm.handlers.js +172 -0
- package/dist/handlers/crm.handlers.js.map +1 -0
- package/dist/handlers/deal.handlers.js.map +1 -1
- package/dist/handlers/index.d.ts +2 -1
- package/dist/handlers/index.js +2 -1
- package/dist/handlers/mock-data.js.map +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/presentations/dashboard.presentation.d.ts +3 -4
- package/dist/presentations/dashboard.presentation.d.ts.map +1 -1
- package/dist/presentations/dashboard.presentation.js +8 -5
- package/dist/presentations/dashboard.presentation.js.map +1 -1
- package/dist/presentations/pipeline.presentation.d.ts +5 -6
- package/dist/presentations/pipeline.presentation.d.ts.map +1 -1
- package/dist/presentations/pipeline.presentation.js +12 -9
- package/dist/presentations/pipeline.presentation.js.map +1 -1
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +47 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/shared/overlay-types.d.ts +34 -0
- package/dist/shared/overlay-types.d.ts.map +1 -0
- package/dist/shared/overlay-types.js +0 -0
- package/dist/ui/CrmDashboard.d.ts +7 -0
- package/dist/ui/CrmDashboard.d.ts.map +1 -0
- package/dist/ui/CrmDashboard.js +304 -0
- package/dist/ui/CrmDashboard.js.map +1 -0
- package/dist/ui/CrmDealCard.d.ts +15 -0
- package/dist/ui/CrmDealCard.d.ts.map +1 -0
- package/dist/ui/CrmDealCard.js +49 -0
- package/dist/ui/CrmDealCard.js.map +1 -0
- package/dist/ui/CrmPipelineBoard.d.ts +23 -0
- package/dist/ui/CrmPipelineBoard.d.ts.map +1 -0
- package/dist/ui/CrmPipelineBoard.js +98 -0
- package/dist/ui/CrmPipelineBoard.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +3 -0
- package/dist/ui/hooks/index.js +6 -0
- package/dist/ui/hooks/useDealList.d.ts +35 -0
- package/dist/ui/hooks/useDealList.d.ts.map +1 -0
- package/dist/ui/hooks/useDealList.js +94 -0
- package/dist/ui/hooks/useDealList.js.map +1 -0
- package/dist/ui/hooks/useDealMutations.d.ts +26 -0
- package/dist/ui/hooks/useDealMutations.d.ts.map +1 -0
- package/dist/ui/hooks/useDealMutations.js +159 -0
- package/dist/ui/hooks/useDealMutations.js.map +1 -0
- package/dist/ui/index.d.ts +14 -0
- package/dist/ui/index.js +15 -0
- package/dist/ui/modals/CreateDealModal.d.ts +33 -0
- package/dist/ui/modals/CreateDealModal.d.ts.map +1 -0
- package/dist/ui/modals/CreateDealModal.js +183 -0
- package/dist/ui/modals/CreateDealModal.js.map +1 -0
- package/dist/ui/modals/DealActionsModal.d.ts +51 -0
- package/dist/ui/modals/DealActionsModal.d.ts.map +1 -0
- package/dist/ui/modals/DealActionsModal.js +372 -0
- package/dist/ui/modals/DealActionsModal.js.map +1 -0
- package/dist/ui/modals/index.d.ts +3 -0
- package/dist/ui/modals/index.js +4 -0
- package/dist/ui/overlays/demo-overlays.d.ts +19 -0
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -0
- package/dist/ui/overlays/demo-overlays.js +68 -0
- package/dist/ui/overlays/demo-overlays.js.map +1 -0
- package/dist/ui/overlays/index.d.ts +2 -0
- package/dist/ui/overlays/index.js +3 -0
- package/dist/ui/renderers/index.d.ts +3 -0
- package/dist/ui/renderers/index.js +4 -0
- package/dist/ui/renderers/pipeline.markdown.d.ts +23 -0
- package/dist/ui/renderers/pipeline.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/pipeline.markdown.js +118 -0
- package/dist/ui/renderers/pipeline.markdown.js.map +1 -0
- package/dist/ui/renderers/pipeline.renderer.d.ts +9 -0
- package/dist/ui/renderers/pipeline.renderer.d.ts.map +1 -0
- package/dist/ui/renderers/pipeline.renderer.js +28 -0
- package/dist/ui/renderers/pipeline.renderer.js.map +1 -0
- package/package.json +38 -13
- package/src/crm-pipeline.feature.ts +3 -3
- package/src/deal/deal.test-spec.ts +55 -0
- package/src/example.ts +3 -3
- package/src/handlers/crm.handlers.ts +415 -0
- package/src/handlers/index.ts +3 -0
- package/src/index.ts +1 -0
- package/src/presentations/dashboard.presentation.ts +5 -6
- package/src/presentations/pipeline.presentation.ts +9 -10
- package/src/seeders/index.ts +35 -0
- package/src/shared/overlay-types.ts +39 -0
- package/src/ui/CrmDashboard.tsx +311 -0
- package/src/ui/CrmDealCard.tsx +83 -0
- package/src/ui/CrmPipelineBoard.tsx +136 -0
- package/src/ui/hooks/index.ts +10 -0
- package/src/ui/hooks/useDealList.ts +113 -0
- package/src/ui/hooks/useDealMutations.ts +174 -0
- package/src/ui/index.ts +18 -0
- package/src/ui/modals/CreateDealModal.tsx +239 -0
- package/src/ui/modals/DealActionsModal.tsx +424 -0
- package/src/ui/modals/index.ts +2 -0
- package/src/ui/overlays/demo-overlays.ts +68 -0
- package/src/ui/overlays/index.ts +1 -0
- package/src/ui/renderers/index.ts +6 -0
- package/src/ui/renderers/pipeline.markdown.ts +198 -0
- package/src/ui/renderers/pipeline.renderer.tsx +35 -0
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts1 from "@contractspec/lib.contracts";
|
|
1
2
|
import * as _contractspec_lib_schema2 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/deal/deal.operation.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a new deal.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateDealContract:
|
|
8
|
+
declare const CreateDealContract: _contractspec_lib_contracts1.OperationSpec<_contractspec_lib_schema2.SchemaModel<{
|
|
9
9
|
name: {
|
|
10
10
|
type: _contractspec_lib_schema2.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
@@ -153,7 +153,7 @@ declare const CreateDealContract: _contractspec_lib_contracts0.OperationSpec<_co
|
|
|
153
153
|
/**
|
|
154
154
|
* Move deal to a different stage.
|
|
155
155
|
*/
|
|
156
|
-
declare const MoveDealContract:
|
|
156
|
+
declare const MoveDealContract: _contractspec_lib_contracts1.OperationSpec<_contractspec_lib_schema2.SchemaModel<{
|
|
157
157
|
dealId: {
|
|
158
158
|
type: _contractspec_lib_schema2.FieldType<string, string>;
|
|
159
159
|
isOptional: false;
|
|
@@ -241,7 +241,7 @@ declare const MoveDealContract: _contractspec_lib_contracts0.OperationSpec<_cont
|
|
|
241
241
|
/**
|
|
242
242
|
* Mark deal as won.
|
|
243
243
|
*/
|
|
244
|
-
declare const WinDealContract:
|
|
244
|
+
declare const WinDealContract: _contractspec_lib_contracts1.OperationSpec<_contractspec_lib_schema2.SchemaModel<{
|
|
245
245
|
dealId: {
|
|
246
246
|
type: _contractspec_lib_schema2.FieldType<string, string>;
|
|
247
247
|
isOptional: false;
|
|
@@ -325,7 +325,7 @@ declare const WinDealContract: _contractspec_lib_contracts0.OperationSpec<_contr
|
|
|
325
325
|
/**
|
|
326
326
|
* Mark deal as lost.
|
|
327
327
|
*/
|
|
328
|
-
declare const LoseDealContract:
|
|
328
|
+
declare const LoseDealContract: _contractspec_lib_contracts1.OperationSpec<_contractspec_lib_schema2.SchemaModel<{
|
|
329
329
|
dealId: {
|
|
330
330
|
type: _contractspec_lib_schema2.FieldType<string, string>;
|
|
331
331
|
isOptional: false;
|
|
@@ -409,7 +409,7 @@ declare const LoseDealContract: _contractspec_lib_contracts0.OperationSpec<_cont
|
|
|
409
409
|
/**
|
|
410
410
|
* List deals in pipeline.
|
|
411
411
|
*/
|
|
412
|
-
declare const ListDealsContract:
|
|
412
|
+
declare const ListDealsContract: _contractspec_lib_contracts1.OperationSpec<_contractspec_lib_schema2.SchemaModel<{
|
|
413
413
|
pipelineId: {
|
|
414
414
|
type: _contractspec_lib_schema2.FieldType<string, string>;
|
|
415
415
|
isOptional: true;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/deal/deal.test-spec.d.ts
|
|
4
|
+
declare const dealListTest: _contractspec_lib_contracts6.TestSpec;
|
|
5
|
+
declare const dealMoveTest: _contractspec_lib_contracts6.TestSpec;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { dealListTest, dealMoveTest };
|
|
8
|
+
//# sourceMappingURL=deal.test-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deal.test-spec.d.ts","names":[],"sources":["../../src/deal/deal.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,cAyBX,4BAAA,CAzBuB;cA2BZ,cAyBX,4BAAA,CAzBuB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineTestSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/deal/deal.test-spec.ts
|
|
4
|
+
const dealListTest = defineTestSpec({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "test.crm.deal.list",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
owners: ["@example.crm-pipeline"],
|
|
9
|
+
description: "Test for listing deals",
|
|
10
|
+
stability: "stable",
|
|
11
|
+
tags: ["test"]
|
|
12
|
+
},
|
|
13
|
+
target: {
|
|
14
|
+
type: "operation",
|
|
15
|
+
operation: {
|
|
16
|
+
key: "crm.deal.list",
|
|
17
|
+
version: "1.0.0"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
scenarios: [{
|
|
21
|
+
key: "success",
|
|
22
|
+
when: { operation: { key: "crm.deal.list" } },
|
|
23
|
+
then: [{
|
|
24
|
+
type: "expectOutput",
|
|
25
|
+
match: {}
|
|
26
|
+
}]
|
|
27
|
+
}, {
|
|
28
|
+
key: "error",
|
|
29
|
+
when: { operation: { key: "crm.deal.list" } },
|
|
30
|
+
then: [{ type: "expectError" }]
|
|
31
|
+
}]
|
|
32
|
+
});
|
|
33
|
+
const dealMoveTest = defineTestSpec({
|
|
34
|
+
meta: {
|
|
35
|
+
key: "test.crm.deal.move",
|
|
36
|
+
version: "1.0.0",
|
|
37
|
+
owners: ["@example.crm-pipeline"],
|
|
38
|
+
description: "Test for moving deal",
|
|
39
|
+
stability: "stable",
|
|
40
|
+
tags: ["test"]
|
|
41
|
+
},
|
|
42
|
+
target: {
|
|
43
|
+
type: "operation",
|
|
44
|
+
operation: {
|
|
45
|
+
key: "crm.deal.move",
|
|
46
|
+
version: "1.0.0"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
scenarios: [{
|
|
50
|
+
key: "success",
|
|
51
|
+
when: { operation: { key: "crm.deal.move" } },
|
|
52
|
+
then: [{
|
|
53
|
+
type: "expectOutput",
|
|
54
|
+
match: {}
|
|
55
|
+
}]
|
|
56
|
+
}, {
|
|
57
|
+
key: "error",
|
|
58
|
+
when: { operation: { key: "crm.deal.move" } },
|
|
59
|
+
then: [{ type: "expectError" }]
|
|
60
|
+
}]
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { dealListTest, dealMoveTest };
|
|
65
|
+
//# sourceMappingURL=deal.test-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deal.test-spec.js","names":[],"sources":["../../src/deal/deal.test-spec.ts"],"sourcesContent":["import { defineTestSpec } from '@contractspec/lib.contracts';\n\nexport const dealListTest = defineTestSpec({\n meta: {\n key: 'test.crm.deal.list',\n version: '1.0.0',\n owners: ['@example.crm-pipeline'],\n description: 'Test for listing deals',\n stability: 'stable',\n tags: ['test'],\n },\n target: {\n type: 'operation',\n operation: { key: 'crm.deal.list', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n when: { operation: { key: 'crm.deal.list' } },\n then: [{ type: 'expectOutput', match: {} }],\n },\n {\n key: 'error',\n when: { operation: { key: 'crm.deal.list' } },\n then: [{ type: 'expectError' }],\n },\n ],\n});\n\nexport const dealMoveTest = defineTestSpec({\n meta: {\n key: 'test.crm.deal.move',\n version: '1.0.0',\n owners: ['@example.crm-pipeline'],\n description: 'Test for moving deal',\n stability: 'stable',\n tags: ['test'],\n },\n target: {\n type: 'operation',\n operation: { key: 'crm.deal.move', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n when: { operation: { key: 'crm.deal.move' } },\n then: [{ type: 'expectOutput', match: {} }],\n },\n {\n key: 'error',\n when: { operation: { key: 'crm.deal.move' } },\n then: [{ type: 'expectError' }],\n },\n ],\n});\n"],"mappings":";;;AAEA,MAAa,eAAe,eAAe;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,aAAa;EACb,WAAW;EACX,MAAM,CAAC,OAAO;EACf;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAAiB,SAAS;GAAS;EACtD;CACD,WAAW,CACT;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE;EAC7C,MAAM,CAAC;GAAE,MAAM;GAAgB,OAAO,EAAE;GAAE,CAAC;EAC5C,EACD;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE;EAC7C,MAAM,CAAC,EAAE,MAAM,eAAe,CAAC;EAChC,CACF;CACF,CAAC;AAEF,MAAa,eAAe,eAAe;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,aAAa;EACb,WAAW;EACX,MAAM,CAAC,OAAO;EACf;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAAiB,SAAS;GAAS;EACtD;CACD,WAAW,CACT;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE;EAC7C,MAAM,CAAC;GAAE,MAAM;GAAgB,OAAO,EAAE;GAAE,CAAC;EAC5C,EACD;EACE,KAAK;EACL,MAAM,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE;EAC7C,MAAM,CAAC,EAAE,MAAM,eAAe,CAAC;EAChC,CACF;CACF,CAAC"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema250 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/company.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Company size enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const CompanySizeEnum:
|
|
7
|
+
declare const CompanySizeEnum: _contractspec_lib_schema250.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Company entity - organization/account.
|
|
10
10
|
*/
|
|
11
|
-
declare const CompanyEntity:
|
|
12
|
-
id:
|
|
13
|
-
name:
|
|
14
|
-
domain:
|
|
15
|
-
website:
|
|
16
|
-
industry:
|
|
17
|
-
size:
|
|
18
|
-
employeeCount:
|
|
19
|
-
annualRevenue:
|
|
20
|
-
organizationId:
|
|
21
|
-
ownerId:
|
|
22
|
-
phone:
|
|
23
|
-
email:
|
|
24
|
-
address:
|
|
25
|
-
city:
|
|
26
|
-
state:
|
|
27
|
-
country:
|
|
28
|
-
postalCode:
|
|
29
|
-
linkedInUrl:
|
|
30
|
-
description:
|
|
31
|
-
tags:
|
|
32
|
-
customFields:
|
|
33
|
-
createdAt:
|
|
34
|
-
updatedAt:
|
|
35
|
-
contacts:
|
|
36
|
-
deals:
|
|
11
|
+
declare const CompanyEntity: _contractspec_lib_schema250.EntitySpec<{
|
|
12
|
+
id: _contractspec_lib_schema250.EntityScalarField;
|
|
13
|
+
name: _contractspec_lib_schema250.EntityScalarField;
|
|
14
|
+
domain: _contractspec_lib_schema250.EntityScalarField;
|
|
15
|
+
website: _contractspec_lib_schema250.EntityScalarField;
|
|
16
|
+
industry: _contractspec_lib_schema250.EntityScalarField;
|
|
17
|
+
size: _contractspec_lib_schema250.EntityEnumField;
|
|
18
|
+
employeeCount: _contractspec_lib_schema250.EntityScalarField;
|
|
19
|
+
annualRevenue: _contractspec_lib_schema250.EntityScalarField;
|
|
20
|
+
organizationId: _contractspec_lib_schema250.EntityScalarField;
|
|
21
|
+
ownerId: _contractspec_lib_schema250.EntityScalarField;
|
|
22
|
+
phone: _contractspec_lib_schema250.EntityScalarField;
|
|
23
|
+
email: _contractspec_lib_schema250.EntityScalarField;
|
|
24
|
+
address: _contractspec_lib_schema250.EntityScalarField;
|
|
25
|
+
city: _contractspec_lib_schema250.EntityScalarField;
|
|
26
|
+
state: _contractspec_lib_schema250.EntityScalarField;
|
|
27
|
+
country: _contractspec_lib_schema250.EntityScalarField;
|
|
28
|
+
postalCode: _contractspec_lib_schema250.EntityScalarField;
|
|
29
|
+
linkedInUrl: _contractspec_lib_schema250.EntityScalarField;
|
|
30
|
+
description: _contractspec_lib_schema250.EntityScalarField;
|
|
31
|
+
tags: _contractspec_lib_schema250.EntityScalarField;
|
|
32
|
+
customFields: _contractspec_lib_schema250.EntityScalarField;
|
|
33
|
+
createdAt: _contractspec_lib_schema250.EntityScalarField;
|
|
34
|
+
updatedAt: _contractspec_lib_schema250.EntityScalarField;
|
|
35
|
+
contacts: _contractspec_lib_schema250.EntityRelationField;
|
|
36
|
+
deals: _contractspec_lib_schema250.EntityRelationField;
|
|
37
37
|
}>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { CompanyEntity, CompanySizeEnum };
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema277 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/contact.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Contact status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const ContactStatusEnum:
|
|
7
|
+
declare const ContactStatusEnum: _contractspec_lib_schema277.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Contact entity - individual person.
|
|
10
10
|
*/
|
|
11
|
-
declare const ContactEntity:
|
|
12
|
-
id:
|
|
13
|
-
firstName:
|
|
14
|
-
lastName:
|
|
15
|
-
email:
|
|
16
|
-
phone:
|
|
17
|
-
companyId:
|
|
18
|
-
jobTitle:
|
|
19
|
-
status:
|
|
20
|
-
organizationId:
|
|
21
|
-
ownerId:
|
|
22
|
-
source:
|
|
23
|
-
linkedInUrl:
|
|
24
|
-
twitterHandle:
|
|
25
|
-
address:
|
|
26
|
-
city:
|
|
27
|
-
state:
|
|
28
|
-
country:
|
|
29
|
-
postalCode:
|
|
30
|
-
notes:
|
|
31
|
-
tags:
|
|
32
|
-
customFields:
|
|
33
|
-
lastContactedAt:
|
|
34
|
-
nextFollowUpAt:
|
|
35
|
-
createdAt:
|
|
36
|
-
updatedAt:
|
|
37
|
-
company:
|
|
38
|
-
deals:
|
|
39
|
-
tasks:
|
|
40
|
-
activities:
|
|
11
|
+
declare const ContactEntity: _contractspec_lib_schema277.EntitySpec<{
|
|
12
|
+
id: _contractspec_lib_schema277.EntityScalarField;
|
|
13
|
+
firstName: _contractspec_lib_schema277.EntityScalarField;
|
|
14
|
+
lastName: _contractspec_lib_schema277.EntityScalarField;
|
|
15
|
+
email: _contractspec_lib_schema277.EntityScalarField;
|
|
16
|
+
phone: _contractspec_lib_schema277.EntityScalarField;
|
|
17
|
+
companyId: _contractspec_lib_schema277.EntityScalarField;
|
|
18
|
+
jobTitle: _contractspec_lib_schema277.EntityScalarField;
|
|
19
|
+
status: _contractspec_lib_schema277.EntityEnumField;
|
|
20
|
+
organizationId: _contractspec_lib_schema277.EntityScalarField;
|
|
21
|
+
ownerId: _contractspec_lib_schema277.EntityScalarField;
|
|
22
|
+
source: _contractspec_lib_schema277.EntityScalarField;
|
|
23
|
+
linkedInUrl: _contractspec_lib_schema277.EntityScalarField;
|
|
24
|
+
twitterHandle: _contractspec_lib_schema277.EntityScalarField;
|
|
25
|
+
address: _contractspec_lib_schema277.EntityScalarField;
|
|
26
|
+
city: _contractspec_lib_schema277.EntityScalarField;
|
|
27
|
+
state: _contractspec_lib_schema277.EntityScalarField;
|
|
28
|
+
country: _contractspec_lib_schema277.EntityScalarField;
|
|
29
|
+
postalCode: _contractspec_lib_schema277.EntityScalarField;
|
|
30
|
+
notes: _contractspec_lib_schema277.EntityScalarField;
|
|
31
|
+
tags: _contractspec_lib_schema277.EntityScalarField;
|
|
32
|
+
customFields: _contractspec_lib_schema277.EntityScalarField;
|
|
33
|
+
lastContactedAt: _contractspec_lib_schema277.EntityScalarField;
|
|
34
|
+
nextFollowUpAt: _contractspec_lib_schema277.EntityScalarField;
|
|
35
|
+
createdAt: _contractspec_lib_schema277.EntityScalarField;
|
|
36
|
+
updatedAt: _contractspec_lib_schema277.EntityScalarField;
|
|
37
|
+
company: _contractspec_lib_schema277.EntityRelationField;
|
|
38
|
+
deals: _contractspec_lib_schema277.EntityRelationField;
|
|
39
|
+
tasks: _contractspec_lib_schema277.EntityRelationField;
|
|
40
|
+
activities: _contractspec_lib_schema277.EntityRelationField;
|
|
41
41
|
}>;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { ContactEntity, ContactStatusEnum };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":["export * from './company.entity';\nexport * from './contact.entity';\nexport * from './deal.entity';\nexport * from './task.entity';\n\nimport type { ModuleSchemaContribution } from '@contractspec/lib.schema';\nimport { CompanyEntity, CompanySizeEnum } from './company.entity';\nimport { ContactEntity, ContactStatusEnum } from './contact.entity';\nimport {\n DealEntity,\n PipelineEntity,\n StageEntity,\n DealStatusEnum,\n} from './deal.entity';\nimport {\n TaskEntity,\n ActivityEntity,\n TaskTypeEnum,\n TaskPriorityEnum,\n TaskStatusEnum,\n} from './task.entity';\n\n/**\n * CRM Pipeline schema contribution.\n */\nexport const crmPipelineSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@contractspec/example.crm-pipeline',\n entities: [\n CompanyEntity,\n ContactEntity,\n DealEntity,\n PipelineEntity,\n StageEntity,\n TaskEntity,\n ActivityEntity,\n ],\n enums: [\n CompanySizeEnum,\n ContactStatusEnum,\n DealStatusEnum,\n TaskTypeEnum,\n TaskPriorityEnum,\n TaskStatusEnum,\n ],\n};\n"],"mappings":";;;;;;;;;AAyBA,MAAa,gCAA0D;CACrE,UAAU;CACV,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACD;CACF"}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema308 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/task.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Task type enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const TaskTypeEnum:
|
|
7
|
+
declare const TaskTypeEnum: _contractspec_lib_schema308.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Task priority enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const TaskPriorityEnum:
|
|
11
|
+
declare const TaskPriorityEnum: _contractspec_lib_schema308.EntityEnumDef;
|
|
12
12
|
/**
|
|
13
13
|
* Task status enum.
|
|
14
14
|
*/
|
|
15
|
-
declare const TaskStatusEnum:
|
|
15
|
+
declare const TaskStatusEnum: _contractspec_lib_schema308.EntityEnumDef;
|
|
16
16
|
/**
|
|
17
17
|
* Task entity - follow-up activities.
|
|
18
18
|
*/
|
|
19
|
-
declare const TaskEntity:
|
|
20
|
-
id:
|
|
21
|
-
title:
|
|
22
|
-
description:
|
|
23
|
-
type:
|
|
24
|
-
priority:
|
|
25
|
-
status:
|
|
26
|
-
dueDate:
|
|
27
|
-
reminderAt:
|
|
28
|
-
contactId:
|
|
29
|
-
dealId:
|
|
30
|
-
companyId:
|
|
31
|
-
organizationId:
|
|
32
|
-
assignedTo:
|
|
33
|
-
createdBy:
|
|
34
|
-
completedAt:
|
|
35
|
-
completedBy:
|
|
36
|
-
createdAt:
|
|
37
|
-
updatedAt:
|
|
38
|
-
contact:
|
|
39
|
-
deal:
|
|
40
|
-
company:
|
|
19
|
+
declare const TaskEntity: _contractspec_lib_schema308.EntitySpec<{
|
|
20
|
+
id: _contractspec_lib_schema308.EntityScalarField;
|
|
21
|
+
title: _contractspec_lib_schema308.EntityScalarField;
|
|
22
|
+
description: _contractspec_lib_schema308.EntityScalarField;
|
|
23
|
+
type: _contractspec_lib_schema308.EntityEnumField;
|
|
24
|
+
priority: _contractspec_lib_schema308.EntityEnumField;
|
|
25
|
+
status: _contractspec_lib_schema308.EntityEnumField;
|
|
26
|
+
dueDate: _contractspec_lib_schema308.EntityScalarField;
|
|
27
|
+
reminderAt: _contractspec_lib_schema308.EntityScalarField;
|
|
28
|
+
contactId: _contractspec_lib_schema308.EntityScalarField;
|
|
29
|
+
dealId: _contractspec_lib_schema308.EntityScalarField;
|
|
30
|
+
companyId: _contractspec_lib_schema308.EntityScalarField;
|
|
31
|
+
organizationId: _contractspec_lib_schema308.EntityScalarField;
|
|
32
|
+
assignedTo: _contractspec_lib_schema308.EntityScalarField;
|
|
33
|
+
createdBy: _contractspec_lib_schema308.EntityScalarField;
|
|
34
|
+
completedAt: _contractspec_lib_schema308.EntityScalarField;
|
|
35
|
+
completedBy: _contractspec_lib_schema308.EntityScalarField;
|
|
36
|
+
createdAt: _contractspec_lib_schema308.EntityScalarField;
|
|
37
|
+
updatedAt: _contractspec_lib_schema308.EntityScalarField;
|
|
38
|
+
contact: _contractspec_lib_schema308.EntityRelationField;
|
|
39
|
+
deal: _contractspec_lib_schema308.EntityRelationField;
|
|
40
|
+
company: _contractspec_lib_schema308.EntityRelationField;
|
|
41
41
|
}>;
|
|
42
42
|
/**
|
|
43
43
|
* Activity entity - interaction history.
|
|
44
44
|
*/
|
|
45
|
-
declare const ActivityEntity:
|
|
46
|
-
id:
|
|
47
|
-
type:
|
|
48
|
-
subject:
|
|
49
|
-
description:
|
|
50
|
-
contactId:
|
|
51
|
-
dealId:
|
|
52
|
-
companyId:
|
|
53
|
-
organizationId:
|
|
54
|
-
performedBy:
|
|
55
|
-
outcome:
|
|
56
|
-
occurredAt:
|
|
57
|
-
duration:
|
|
58
|
-
createdAt:
|
|
59
|
-
contact:
|
|
60
|
-
deal:
|
|
61
|
-
company:
|
|
45
|
+
declare const ActivityEntity: _contractspec_lib_schema308.EntitySpec<{
|
|
46
|
+
id: _contractspec_lib_schema308.EntityScalarField;
|
|
47
|
+
type: _contractspec_lib_schema308.EntityEnumField;
|
|
48
|
+
subject: _contractspec_lib_schema308.EntityScalarField;
|
|
49
|
+
description: _contractspec_lib_schema308.EntityScalarField;
|
|
50
|
+
contactId: _contractspec_lib_schema308.EntityScalarField;
|
|
51
|
+
dealId: _contractspec_lib_schema308.EntityScalarField;
|
|
52
|
+
companyId: _contractspec_lib_schema308.EntityScalarField;
|
|
53
|
+
organizationId: _contractspec_lib_schema308.EntityScalarField;
|
|
54
|
+
performedBy: _contractspec_lib_schema308.EntityScalarField;
|
|
55
|
+
outcome: _contractspec_lib_schema308.EntityScalarField;
|
|
56
|
+
occurredAt: _contractspec_lib_schema308.EntityScalarField;
|
|
57
|
+
duration: _contractspec_lib_schema308.EntityScalarField;
|
|
58
|
+
createdAt: _contractspec_lib_schema308.EntityScalarField;
|
|
59
|
+
contact: _contractspec_lib_schema308.EntityRelationField;
|
|
60
|
+
deal: _contractspec_lib_schema308.EntityRelationField;
|
|
61
|
+
company: _contractspec_lib_schema308.EntityRelationField;
|
|
62
62
|
}>;
|
|
63
63
|
//#endregion
|
|
64
64
|
export { ActivityEntity, TaskEntity, TaskPriorityEnum, TaskStatusEnum, TaskTypeEnum };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_contracts8 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema350 from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events/contact.event.d.ts
|
|
5
|
-
declare const ContactCreatedEvent:
|
|
5
|
+
declare const ContactCreatedEvent: _contractspec_lib_contracts8.EventSpec<_contractspec_lib_schema350.SchemaModel<{
|
|
6
6
|
contactId: {
|
|
7
|
-
type:
|
|
7
|
+
type: _contractspec_lib_schema350.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
9
9
|
};
|
|
10
10
|
email: {
|
|
11
|
-
type:
|
|
11
|
+
type: _contractspec_lib_schema350.FieldType<string, string>;
|
|
12
12
|
isOptional: true;
|
|
13
13
|
};
|
|
14
14
|
organizationId: {
|
|
15
|
-
type:
|
|
15
|
+
type: _contractspec_lib_schema350.FieldType<string, string>;
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
ownerId: {
|
|
19
|
-
type:
|
|
19
|
+
type: _contractspec_lib_schema350.FieldType<string, string>;
|
|
20
20
|
isOptional: false;
|
|
21
21
|
};
|
|
22
22
|
createdAt: {
|
|
23
|
-
type:
|
|
23
|
+
type: _contractspec_lib_schema350.FieldType<Date, string>;
|
|
24
24
|
isOptional: false;
|
|
25
25
|
};
|
|
26
26
|
}>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
1
|
import { defineEvent } from "@contractspec/lib.contracts";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events/contact.event.ts
|
|
5
5
|
const ContactCreatedPayload = defineSchemaModel({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
|
|
1
2
|
import * as _contractspec_lib_schema356 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts5 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/events/deal.event.d.ts
|
|
5
|
-
declare const DealCreatedEvent:
|
|
5
|
+
declare const DealCreatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
|
|
6
6
|
dealId: {
|
|
7
7
|
type: _contractspec_lib_schema356.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
@@ -32,7 +32,7 @@ declare const DealCreatedEvent: _contractspec_lib_contracts5.EventSpec<_contract
|
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
}>>;
|
|
35
|
-
declare const DealMovedEvent:
|
|
35
|
+
declare const DealMovedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
|
|
36
36
|
dealId: {
|
|
37
37
|
type: _contractspec_lib_schema356.FieldType<string, string>;
|
|
38
38
|
isOptional: false;
|
|
@@ -54,7 +54,7 @@ declare const DealMovedEvent: _contractspec_lib_contracts5.EventSpec<_contractsp
|
|
|
54
54
|
isOptional: false;
|
|
55
55
|
};
|
|
56
56
|
}>>;
|
|
57
|
-
declare const DealWonEvent:
|
|
57
|
+
declare const DealWonEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
|
|
58
58
|
dealId: {
|
|
59
59
|
type: _contractspec_lib_schema356.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
@@ -84,7 +84,7 @@ declare const DealWonEvent: _contractspec_lib_contracts5.EventSpec<_contractspec
|
|
|
84
84
|
isOptional: false;
|
|
85
85
|
};
|
|
86
86
|
}>>;
|
|
87
|
-
declare const DealLostEvent:
|
|
87
|
+
declare const DealLostEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema356.SchemaModel<{
|
|
88
88
|
dealId: {
|
|
89
89
|
type: _contractspec_lib_schema356.FieldType<string, string>;
|
|
90
90
|
isOptional: false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
1
|
import { defineEvent } from "@contractspec/lib.contracts";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events/deal.event.ts
|
|
5
5
|
const DealCreatedPayload = defineSchemaModel({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts13 from "@contractspec/lib.contracts";
|
|
1
2
|
import * as _contractspec_lib_schema384 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/events/task.event.d.ts
|
|
5
|
-
declare const TaskCompletedEvent:
|
|
5
|
+
declare const TaskCompletedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema384.SchemaModel<{
|
|
6
6
|
taskId: {
|
|
7
7
|
type: _contractspec_lib_schema384.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.event.d.ts","names":[],"sources":["../../src/events/task.event.ts"],"sourcesContent":[],"mappings":";;;;cAiBa,oBAAkB,
|
|
1
|
+
{"version":3,"file":"task.event.d.ts","names":[],"sources":["../../src/events/task.event.ts"],"sourcesContent":[],"mappings":";;;;cAiBa,oBAAkB,6BAAA,CAAA,sCAAA;;UAU7B,2BAAA,CAAA;;EAVW,CAAA;EAUX,IAAA,EAAA;;;;;;;EAV6B,CAAA;EAAA,WAAA,EAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
1
|
import { defineEvent } from "@contractspec/lib.contracts";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events/task.event.ts
|
|
5
5
|
const TaskCompletedPayload = defineSchemaModel({
|
package/dist/example.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
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
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAiCJ,4BAAA,CAjCW"}
|
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: "crm-pipeline",
|
|
5
7
|
version: "1.0.0",
|
|
@@ -43,7 +45,7 @@ const example = {
|
|
|
43
45
|
},
|
|
44
46
|
mcp: { enabled: true }
|
|
45
47
|
}
|
|
46
|
-
};
|
|
48
|
+
});
|
|
47
49
|
var example_default = example;
|
|
48
50
|
|
|
49
51
|
//#endregion
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[
|
|
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: '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,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;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,CAAC;AAEF,sBAAe"}
|