@contractspec/example.crm-pipeline 1.46.1 → 1.48.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.
Files changed (140) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +110 -35
  2. package/.turbo/turbo-build.log +110 -35
  3. package/CHANGELOG.md +63 -0
  4. package/dist/crm-pipeline.feature.d.ts +2 -2
  5. package/dist/crm-pipeline.feature.d.ts.map +1 -1
  6. package/dist/crm-pipeline.feature.js +9 -2
  7. package/dist/crm-pipeline.feature.js.map +1 -1
  8. package/dist/deal/deal.enum.d.ts +3 -3
  9. package/dist/deal/deal.enum.d.ts.map +1 -1
  10. package/dist/deal/deal.operation.d.ts +128 -128
  11. package/dist/deal/deal.operation.d.ts.map +1 -1
  12. package/dist/deal/deal.schema.d.ts +71 -71
  13. package/dist/deal/deal.test-spec.d.ts +8 -0
  14. package/dist/deal/deal.test-spec.d.ts.map +1 -0
  15. package/dist/deal/deal.test-spec.js +65 -0
  16. package/dist/deal/deal.test-spec.js.map +1 -0
  17. package/dist/entities/company.entity.d.ts +28 -28
  18. package/dist/entities/contact.entity.d.ts +32 -32
  19. package/dist/entities/contact.entity.d.ts.map +1 -1
  20. package/dist/entities/deal.entity.d.ts +53 -53
  21. package/dist/entities/deal.entity.d.ts.map +1 -1
  22. package/dist/entities/index.js.map +1 -1
  23. package/dist/entities/task.entity.d.ts +43 -43
  24. package/dist/entities/task.entity.d.ts.map +1 -1
  25. package/dist/events/contact.event.d.ts +8 -8
  26. package/dist/events/contact.event.js +1 -1
  27. package/dist/events/deal.event.d.ts +30 -30
  28. package/dist/events/deal.event.js +1 -1
  29. package/dist/events/task.event.d.ts +8 -8
  30. package/dist/events/task.event.d.ts.map +1 -1
  31. package/dist/events/task.event.js +1 -1
  32. package/dist/example.d.ts +2 -2
  33. package/dist/example.d.ts.map +1 -1
  34. package/dist/example.js +4 -2
  35. package/dist/example.js.map +1 -1
  36. package/dist/handlers/crm.handlers.d.ts +89 -0
  37. package/dist/handlers/crm.handlers.d.ts.map +1 -0
  38. package/dist/handlers/crm.handlers.js +172 -0
  39. package/dist/handlers/crm.handlers.js.map +1 -0
  40. package/dist/handlers/deal.handlers.js.map +1 -1
  41. package/dist/handlers/index.d.ts +2 -1
  42. package/dist/handlers/index.js +2 -1
  43. package/dist/handlers/mock-data.js.map +1 -1
  44. package/dist/index.d.ts +16 -3
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +14 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/presentations/dashboard.presentation.d.ts +3 -4
  49. package/dist/presentations/dashboard.presentation.d.ts.map +1 -1
  50. package/dist/presentations/dashboard.presentation.js +8 -5
  51. package/dist/presentations/dashboard.presentation.js.map +1 -1
  52. package/dist/presentations/pipeline.presentation.d.ts +5 -6
  53. package/dist/presentations/pipeline.presentation.d.ts.map +1 -1
  54. package/dist/presentations/pipeline.presentation.js +12 -9
  55. package/dist/presentations/pipeline.presentation.js.map +1 -1
  56. package/dist/seeders/index.d.ts +10 -0
  57. package/dist/seeders/index.d.ts.map +1 -0
  58. package/dist/seeders/index.js +47 -0
  59. package/dist/seeders/index.js.map +1 -0
  60. package/dist/shared/overlay-types.d.ts +34 -0
  61. package/dist/shared/overlay-types.d.ts.map +1 -0
  62. package/dist/shared/overlay-types.js +0 -0
  63. package/dist/ui/CrmDashboard.d.ts +7 -0
  64. package/dist/ui/CrmDashboard.d.ts.map +1 -0
  65. package/dist/ui/CrmDashboard.js +304 -0
  66. package/dist/ui/CrmDashboard.js.map +1 -0
  67. package/dist/ui/CrmDealCard.d.ts +15 -0
  68. package/dist/ui/CrmDealCard.d.ts.map +1 -0
  69. package/dist/ui/CrmDealCard.js +49 -0
  70. package/dist/ui/CrmDealCard.js.map +1 -0
  71. package/dist/ui/CrmPipelineBoard.d.ts +23 -0
  72. package/dist/ui/CrmPipelineBoard.d.ts.map +1 -0
  73. package/dist/ui/CrmPipelineBoard.js +98 -0
  74. package/dist/ui/CrmPipelineBoard.js.map +1 -0
  75. package/dist/ui/hooks/index.d.ts +3 -0
  76. package/dist/ui/hooks/index.js +6 -0
  77. package/dist/ui/hooks/useDealList.d.ts +35 -0
  78. package/dist/ui/hooks/useDealList.d.ts.map +1 -0
  79. package/dist/ui/hooks/useDealList.js +94 -0
  80. package/dist/ui/hooks/useDealList.js.map +1 -0
  81. package/dist/ui/hooks/useDealMutations.d.ts +26 -0
  82. package/dist/ui/hooks/useDealMutations.d.ts.map +1 -0
  83. package/dist/ui/hooks/useDealMutations.js +159 -0
  84. package/dist/ui/hooks/useDealMutations.js.map +1 -0
  85. package/dist/ui/index.d.ts +14 -0
  86. package/dist/ui/index.js +15 -0
  87. package/dist/ui/modals/CreateDealModal.d.ts +33 -0
  88. package/dist/ui/modals/CreateDealModal.d.ts.map +1 -0
  89. package/dist/ui/modals/CreateDealModal.js +183 -0
  90. package/dist/ui/modals/CreateDealModal.js.map +1 -0
  91. package/dist/ui/modals/DealActionsModal.d.ts +51 -0
  92. package/dist/ui/modals/DealActionsModal.d.ts.map +1 -0
  93. package/dist/ui/modals/DealActionsModal.js +372 -0
  94. package/dist/ui/modals/DealActionsModal.js.map +1 -0
  95. package/dist/ui/modals/index.d.ts +3 -0
  96. package/dist/ui/modals/index.js +4 -0
  97. package/dist/ui/overlays/demo-overlays.d.ts +19 -0
  98. package/dist/ui/overlays/demo-overlays.d.ts.map +1 -0
  99. package/dist/ui/overlays/demo-overlays.js +68 -0
  100. package/dist/ui/overlays/demo-overlays.js.map +1 -0
  101. package/dist/ui/overlays/index.d.ts +2 -0
  102. package/dist/ui/overlays/index.js +3 -0
  103. package/dist/ui/renderers/index.d.ts +3 -0
  104. package/dist/ui/renderers/index.js +4 -0
  105. package/dist/ui/renderers/pipeline.markdown.d.ts +23 -0
  106. package/dist/ui/renderers/pipeline.markdown.d.ts.map +1 -0
  107. package/dist/ui/renderers/pipeline.markdown.js +118 -0
  108. package/dist/ui/renderers/pipeline.markdown.js.map +1 -0
  109. package/dist/ui/renderers/pipeline.renderer.d.ts +9 -0
  110. package/dist/ui/renderers/pipeline.renderer.d.ts.map +1 -0
  111. package/dist/ui/renderers/pipeline.renderer.js +28 -0
  112. package/dist/ui/renderers/pipeline.renderer.js.map +1 -0
  113. package/package.json +38 -13
  114. package/src/crm-pipeline.feature.ts +3 -3
  115. package/src/deal/deal.test-spec.ts +55 -0
  116. package/src/example.ts +3 -3
  117. package/src/handlers/crm.handlers.ts +415 -0
  118. package/src/handlers/index.ts +3 -0
  119. package/src/index.ts +1 -0
  120. package/src/presentations/dashboard.presentation.ts +5 -6
  121. package/src/presentations/pipeline.presentation.ts +9 -10
  122. package/src/seeders/index.ts +35 -0
  123. package/src/shared/overlay-types.ts +39 -0
  124. package/src/ui/CrmDashboard.tsx +311 -0
  125. package/src/ui/CrmDealCard.tsx +83 -0
  126. package/src/ui/CrmPipelineBoard.tsx +136 -0
  127. package/src/ui/hooks/index.ts +10 -0
  128. package/src/ui/hooks/useDealList.ts +113 -0
  129. package/src/ui/hooks/useDealMutations.ts +174 -0
  130. package/src/ui/index.ts +18 -0
  131. package/src/ui/modals/CreateDealModal.tsx +239 -0
  132. package/src/ui/modals/DealActionsModal.tsx +424 -0
  133. package/src/ui/modals/index.ts +2 -0
  134. package/src/ui/overlays/demo-overlays.ts +68 -0
  135. package/src/ui/overlays/index.ts +1 -0
  136. package/src/ui/renderers/index.ts +6 -0
  137. package/src/ui/renderers/pipeline.markdown.ts +198 -0
  138. package/src/ui/renderers/pipeline.renderer.tsx +35 -0
  139. package/tsconfig.json +1 -1
  140. package/tsconfig.tsbuildinfo +1 -1
@@ -1,72 +1,72 @@
1
- import * as _contractspec_lib_schema198 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema30 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/entities/deal.entity.d.ts
4
4
  /**
5
5
  * Deal status enum.
6
6
  */
7
- declare const DealStatusEnum: _contractspec_lib_schema198.EntityEnumDef;
7
+ declare const DealStatusEnum: _contractspec_lib_schema30.EntityEnumDef;
8
8
  /**
9
9
  * Pipeline entity - sales pipeline definition.
10
10
  */
11
- declare const PipelineEntity: _contractspec_lib_schema198.EntitySpec<{
12
- id: _contractspec_lib_schema198.EntityScalarField;
13
- name: _contractspec_lib_schema198.EntityScalarField;
14
- description: _contractspec_lib_schema198.EntityScalarField;
15
- organizationId: _contractspec_lib_schema198.EntityScalarField;
16
- isDefault: _contractspec_lib_schema198.EntityScalarField;
17
- createdAt: _contractspec_lib_schema198.EntityScalarField;
18
- updatedAt: _contractspec_lib_schema198.EntityScalarField;
19
- stages: _contractspec_lib_schema198.EntityRelationField;
20
- deals: _contractspec_lib_schema198.EntityRelationField;
11
+ declare const PipelineEntity: _contractspec_lib_schema30.EntitySpec<{
12
+ id: _contractspec_lib_schema30.EntityScalarField;
13
+ name: _contractspec_lib_schema30.EntityScalarField;
14
+ description: _contractspec_lib_schema30.EntityScalarField;
15
+ organizationId: _contractspec_lib_schema30.EntityScalarField;
16
+ isDefault: _contractspec_lib_schema30.EntityScalarField;
17
+ createdAt: _contractspec_lib_schema30.EntityScalarField;
18
+ updatedAt: _contractspec_lib_schema30.EntityScalarField;
19
+ stages: _contractspec_lib_schema30.EntityRelationField;
20
+ deals: _contractspec_lib_schema30.EntityRelationField;
21
21
  }>;
22
22
  /**
23
23
  * Stage entity - pipeline stage.
24
24
  */
25
- declare const StageEntity: _contractspec_lib_schema198.EntitySpec<{
26
- id: _contractspec_lib_schema198.EntityScalarField;
27
- name: _contractspec_lib_schema198.EntityScalarField;
28
- pipelineId: _contractspec_lib_schema198.EntityScalarField;
29
- position: _contractspec_lib_schema198.EntityScalarField;
30
- probability: _contractspec_lib_schema198.EntityScalarField;
31
- isWonStage: _contractspec_lib_schema198.EntityScalarField;
32
- isLostStage: _contractspec_lib_schema198.EntityScalarField;
33
- color: _contractspec_lib_schema198.EntityScalarField;
34
- createdAt: _contractspec_lib_schema198.EntityScalarField;
35
- updatedAt: _contractspec_lib_schema198.EntityScalarField;
36
- pipeline: _contractspec_lib_schema198.EntityRelationField;
37
- deals: _contractspec_lib_schema198.EntityRelationField;
25
+ declare const StageEntity: _contractspec_lib_schema30.EntitySpec<{
26
+ id: _contractspec_lib_schema30.EntityScalarField;
27
+ name: _contractspec_lib_schema30.EntityScalarField;
28
+ pipelineId: _contractspec_lib_schema30.EntityScalarField;
29
+ position: _contractspec_lib_schema30.EntityScalarField;
30
+ probability: _contractspec_lib_schema30.EntityScalarField;
31
+ isWonStage: _contractspec_lib_schema30.EntityScalarField;
32
+ isLostStage: _contractspec_lib_schema30.EntityScalarField;
33
+ color: _contractspec_lib_schema30.EntityScalarField;
34
+ createdAt: _contractspec_lib_schema30.EntityScalarField;
35
+ updatedAt: _contractspec_lib_schema30.EntityScalarField;
36
+ pipeline: _contractspec_lib_schema30.EntityRelationField;
37
+ deals: _contractspec_lib_schema30.EntityRelationField;
38
38
  }>;
39
39
  /**
40
40
  * Deal entity - sales opportunity.
41
41
  */
42
- declare const DealEntity: _contractspec_lib_schema198.EntitySpec<{
43
- id: _contractspec_lib_schema198.EntityScalarField;
44
- name: _contractspec_lib_schema198.EntityScalarField;
45
- value: _contractspec_lib_schema198.EntityScalarField;
46
- currency: _contractspec_lib_schema198.EntityScalarField;
47
- pipelineId: _contractspec_lib_schema198.EntityScalarField;
48
- stageId: _contractspec_lib_schema198.EntityScalarField;
49
- status: _contractspec_lib_schema198.EntityEnumField;
50
- contactId: _contractspec_lib_schema198.EntityScalarField;
51
- companyId: _contractspec_lib_schema198.EntityScalarField;
52
- organizationId: _contractspec_lib_schema198.EntityScalarField;
53
- ownerId: _contractspec_lib_schema198.EntityScalarField;
54
- expectedCloseDate: _contractspec_lib_schema198.EntityScalarField;
55
- closedAt: _contractspec_lib_schema198.EntityScalarField;
56
- lostReason: _contractspec_lib_schema198.EntityScalarField;
57
- wonSource: _contractspec_lib_schema198.EntityScalarField;
58
- notes: _contractspec_lib_schema198.EntityScalarField;
59
- tags: _contractspec_lib_schema198.EntityScalarField;
60
- customFields: _contractspec_lib_schema198.EntityScalarField;
61
- stagePosition: _contractspec_lib_schema198.EntityScalarField;
62
- createdAt: _contractspec_lib_schema198.EntityScalarField;
63
- updatedAt: _contractspec_lib_schema198.EntityScalarField;
64
- pipeline: _contractspec_lib_schema198.EntityRelationField;
65
- stage: _contractspec_lib_schema198.EntityRelationField;
66
- contact: _contractspec_lib_schema198.EntityRelationField;
67
- company: _contractspec_lib_schema198.EntityRelationField;
68
- tasks: _contractspec_lib_schema198.EntityRelationField;
69
- activities: _contractspec_lib_schema198.EntityRelationField;
42
+ declare const DealEntity: _contractspec_lib_schema30.EntitySpec<{
43
+ id: _contractspec_lib_schema30.EntityScalarField;
44
+ name: _contractspec_lib_schema30.EntityScalarField;
45
+ value: _contractspec_lib_schema30.EntityScalarField;
46
+ currency: _contractspec_lib_schema30.EntityScalarField;
47
+ pipelineId: _contractspec_lib_schema30.EntityScalarField;
48
+ stageId: _contractspec_lib_schema30.EntityScalarField;
49
+ status: _contractspec_lib_schema30.EntityEnumField;
50
+ contactId: _contractspec_lib_schema30.EntityScalarField;
51
+ companyId: _contractspec_lib_schema30.EntityScalarField;
52
+ organizationId: _contractspec_lib_schema30.EntityScalarField;
53
+ ownerId: _contractspec_lib_schema30.EntityScalarField;
54
+ expectedCloseDate: _contractspec_lib_schema30.EntityScalarField;
55
+ closedAt: _contractspec_lib_schema30.EntityScalarField;
56
+ lostReason: _contractspec_lib_schema30.EntityScalarField;
57
+ wonSource: _contractspec_lib_schema30.EntityScalarField;
58
+ notes: _contractspec_lib_schema30.EntityScalarField;
59
+ tags: _contractspec_lib_schema30.EntityScalarField;
60
+ customFields: _contractspec_lib_schema30.EntityScalarField;
61
+ stagePosition: _contractspec_lib_schema30.EntityScalarField;
62
+ createdAt: _contractspec_lib_schema30.EntityScalarField;
63
+ updatedAt: _contractspec_lib_schema30.EntityScalarField;
64
+ pipeline: _contractspec_lib_schema30.EntityRelationField;
65
+ stage: _contractspec_lib_schema30.EntityRelationField;
66
+ contact: _contractspec_lib_schema30.EntityRelationField;
67
+ company: _contractspec_lib_schema30.EntityRelationField;
68
+ tasks: _contractspec_lib_schema30.EntityRelationField;
69
+ activities: _contractspec_lib_schema30.EntityRelationField;
70
70
  }>;
71
71
  //#endregion
72
72
  export { DealEntity, DealStatusEnum, PipelineEntity, StageEntity };
@@ -1 +1 @@
1
- {"version":3,"file":"deal.entity.d.ts","names":[],"sources":["../../src/entities/deal.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,cAKX,EAAA,2BAAA,CALyB,aAKzB;AAKF;;;cAAa,4CAAc;MAwBzB,2BAAA,CAAA;;;;;;0DAxByB;EAAA,MAAA,iDAAA;EA6Bd,KAAA,iDAwCX;CAAA,CAAA;;;;cAxCW,yCAAW;MAwCtB,2BAAA,CAAA;;;;;;;sDAxCsB;EAAA,SAAA,+CAAA;EA6CX,SAAA,+CAiEX;EAAA,QAAA,iDAAA;;;;;;cAjEW,wCAAU;MAiErB,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;0DAjEqB;EAAA,QAAA,iDAAA"}
1
+ {"version":3,"file":"deal.entity.d.ts","names":[],"sources":["../../src/entities/deal.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,cAKX,EAAA,0BAAA,CALyB,aAKzB;AAKF;;;cAAa,2CAAc;MAwBzB,0BAAA,CAAA;;;;;;yDAxByB;EAAA,MAAA,gDAAA;EA6Bd,KAAA,gDAwCX;CAAA,CAAA;;;;cAxCW,wCAAW;MAwCtB,0BAAA,CAAA;;;;;;;qDAxCsB;EAAA,SAAA,8CAAA;EA6CX,SAAA,8CAiEX;EAAA,QAAA,gDAAA;;;;;;cAjEW,uCAAU;MAiErB,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;yDAjEqB;EAAA,QAAA,gDAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["crmPipelineSchemaContribution: ModuleSchemaContribution"],"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,MAAaA,gCAA0D;CACrE,UAAU;CACV,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACD;CACF"}
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 _contractspec_lib_schema250 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema85 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: _contractspec_lib_schema250.EntityEnumDef;
7
+ declare const TaskTypeEnum: _contractspec_lib_schema85.EntityEnumDef;
8
8
  /**
9
9
  * Task priority enum.
10
10
  */
11
- declare const TaskPriorityEnum: _contractspec_lib_schema250.EntityEnumDef;
11
+ declare const TaskPriorityEnum: _contractspec_lib_schema85.EntityEnumDef;
12
12
  /**
13
13
  * Task status enum.
14
14
  */
15
- declare const TaskStatusEnum: _contractspec_lib_schema250.EntityEnumDef;
15
+ declare const TaskStatusEnum: _contractspec_lib_schema85.EntityEnumDef;
16
16
  /**
17
17
  * Task entity - follow-up activities.
18
18
  */
19
- declare const TaskEntity: _contractspec_lib_schema250.EntitySpec<{
20
- id: _contractspec_lib_schema250.EntityScalarField;
21
- title: _contractspec_lib_schema250.EntityScalarField;
22
- description: _contractspec_lib_schema250.EntityScalarField;
23
- type: _contractspec_lib_schema250.EntityEnumField;
24
- priority: _contractspec_lib_schema250.EntityEnumField;
25
- status: _contractspec_lib_schema250.EntityEnumField;
26
- dueDate: _contractspec_lib_schema250.EntityScalarField;
27
- reminderAt: _contractspec_lib_schema250.EntityScalarField;
28
- contactId: _contractspec_lib_schema250.EntityScalarField;
29
- dealId: _contractspec_lib_schema250.EntityScalarField;
30
- companyId: _contractspec_lib_schema250.EntityScalarField;
31
- organizationId: _contractspec_lib_schema250.EntityScalarField;
32
- assignedTo: _contractspec_lib_schema250.EntityScalarField;
33
- createdBy: _contractspec_lib_schema250.EntityScalarField;
34
- completedAt: _contractspec_lib_schema250.EntityScalarField;
35
- completedBy: _contractspec_lib_schema250.EntityScalarField;
36
- createdAt: _contractspec_lib_schema250.EntityScalarField;
37
- updatedAt: _contractspec_lib_schema250.EntityScalarField;
38
- contact: _contractspec_lib_schema250.EntityRelationField;
39
- deal: _contractspec_lib_schema250.EntityRelationField;
40
- company: _contractspec_lib_schema250.EntityRelationField;
19
+ declare const TaskEntity: _contractspec_lib_schema85.EntitySpec<{
20
+ id: _contractspec_lib_schema85.EntityScalarField;
21
+ title: _contractspec_lib_schema85.EntityScalarField;
22
+ description: _contractspec_lib_schema85.EntityScalarField;
23
+ type: _contractspec_lib_schema85.EntityEnumField;
24
+ priority: _contractspec_lib_schema85.EntityEnumField;
25
+ status: _contractspec_lib_schema85.EntityEnumField;
26
+ dueDate: _contractspec_lib_schema85.EntityScalarField;
27
+ reminderAt: _contractspec_lib_schema85.EntityScalarField;
28
+ contactId: _contractspec_lib_schema85.EntityScalarField;
29
+ dealId: _contractspec_lib_schema85.EntityScalarField;
30
+ companyId: _contractspec_lib_schema85.EntityScalarField;
31
+ organizationId: _contractspec_lib_schema85.EntityScalarField;
32
+ assignedTo: _contractspec_lib_schema85.EntityScalarField;
33
+ createdBy: _contractspec_lib_schema85.EntityScalarField;
34
+ completedAt: _contractspec_lib_schema85.EntityScalarField;
35
+ completedBy: _contractspec_lib_schema85.EntityScalarField;
36
+ createdAt: _contractspec_lib_schema85.EntityScalarField;
37
+ updatedAt: _contractspec_lib_schema85.EntityScalarField;
38
+ contact: _contractspec_lib_schema85.EntityRelationField;
39
+ deal: _contractspec_lib_schema85.EntityRelationField;
40
+ company: _contractspec_lib_schema85.EntityRelationField;
41
41
  }>;
42
42
  /**
43
43
  * Activity entity - interaction history.
44
44
  */
45
- declare const ActivityEntity: _contractspec_lib_schema250.EntitySpec<{
46
- id: _contractspec_lib_schema250.EntityScalarField;
47
- type: _contractspec_lib_schema250.EntityEnumField;
48
- subject: _contractspec_lib_schema250.EntityScalarField;
49
- description: _contractspec_lib_schema250.EntityScalarField;
50
- contactId: _contractspec_lib_schema250.EntityScalarField;
51
- dealId: _contractspec_lib_schema250.EntityScalarField;
52
- companyId: _contractspec_lib_schema250.EntityScalarField;
53
- organizationId: _contractspec_lib_schema250.EntityScalarField;
54
- performedBy: _contractspec_lib_schema250.EntityScalarField;
55
- outcome: _contractspec_lib_schema250.EntityScalarField;
56
- occurredAt: _contractspec_lib_schema250.EntityScalarField;
57
- duration: _contractspec_lib_schema250.EntityScalarField;
58
- createdAt: _contractspec_lib_schema250.EntityScalarField;
59
- contact: _contractspec_lib_schema250.EntityRelationField;
60
- deal: _contractspec_lib_schema250.EntityRelationField;
61
- company: _contractspec_lib_schema250.EntityRelationField;
45
+ declare const ActivityEntity: _contractspec_lib_schema85.EntitySpec<{
46
+ id: _contractspec_lib_schema85.EntityScalarField;
47
+ type: _contractspec_lib_schema85.EntityEnumField;
48
+ subject: _contractspec_lib_schema85.EntityScalarField;
49
+ description: _contractspec_lib_schema85.EntityScalarField;
50
+ contactId: _contractspec_lib_schema85.EntityScalarField;
51
+ dealId: _contractspec_lib_schema85.EntityScalarField;
52
+ companyId: _contractspec_lib_schema85.EntityScalarField;
53
+ organizationId: _contractspec_lib_schema85.EntityScalarField;
54
+ performedBy: _contractspec_lib_schema85.EntityScalarField;
55
+ outcome: _contractspec_lib_schema85.EntityScalarField;
56
+ occurredAt: _contractspec_lib_schema85.EntityScalarField;
57
+ duration: _contractspec_lib_schema85.EntityScalarField;
58
+ createdAt: _contractspec_lib_schema85.EntityScalarField;
59
+ contact: _contractspec_lib_schema85.EntityRelationField;
60
+ deal: _contractspec_lib_schema85.EntityRelationField;
61
+ company: _contractspec_lib_schema85.EntityRelationField;
62
62
  }>;
63
63
  //#endregion
64
64
  export { ActivityEntity, TaskEntity, TaskPriorityEnum, TaskStatusEnum, TaskTypeEnum };
@@ -1 +1 @@
1
- {"version":3,"file":"task.entity.d.ts","names":[],"sources":["../../src/entities/task.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,YAKX,EAAA,2BAAA,CALuB,aAKvB;AAKF;AAUA;AAUA;AAiDE,cArEW,gBAqEX,EAhEA,2BAAA,CAL2B,aAqE3B;;;;cA3DW,gBAKX,2BAAA,CALyB;;;;cAUd,wCAAU;MAiDrB,2BAAA,CAAA;;;;;;;;;;;;2DAjDqB;EAAA,SAAA,+CAAA;EAsDV,WAAA,+CA0CX;EAAA,WAAA,+CAAA;;;;;;;;;;cA1CW,4CAAc;MA0CzB,2BAAA,CAAA;;;;;uDA1CyB;EAAA,SAAA,+CAAA"}
1
+ {"version":3,"file":"task.entity.d.ts","names":[],"sources":["../../src/entities/task.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,YAKX,EAAA,0BAAA,CALuB,aAKvB;AAKF;AAUA;AAUA;AAiDE,cArEW,gBAqEX,EAhEA,0BAAA,CAL2B,aAqE3B;;;;cA3DW,gBAKX,0BAAA,CALyB;;;;cAUd,uCAAU;MAiDrB,0BAAA,CAAA;;;;;;;;;;;;0DAjDqB;EAAA,SAAA,8CAAA;EAsDV,WAAA,8CA0CX;EAAA,WAAA,8CAAA;;;;;;;;;;cA1CW,2CAAc;MA0CzB,0BAAA,CAAA;;;;;sDA1CyB;EAAA,SAAA,8CAAA"}
@@ -1,26 +1,26 @@
1
- import * as _contractspec_lib_schema319 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts4 from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema253 from "@contractspec/lib.schema";
3
3
 
4
4
  //#region src/events/contact.event.d.ts
5
- declare const ContactCreatedEvent: _contractspec_lib_contracts4.EventSpec<_contractspec_lib_schema319.SchemaModel<{
5
+ declare const ContactCreatedEvent: _contractspec_lib_contracts6.EventSpec<_contractspec_lib_schema253.SchemaModel<{
6
6
  contactId: {
7
- type: _contractspec_lib_schema319.FieldType<string, string>;
7
+ type: _contractspec_lib_schema253.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  email: {
11
- type: _contractspec_lib_schema319.FieldType<string, string>;
11
+ type: _contractspec_lib_schema253.FieldType<string, string>;
12
12
  isOptional: true;
13
13
  };
14
14
  organizationId: {
15
- type: _contractspec_lib_schema319.FieldType<string, string>;
15
+ type: _contractspec_lib_schema253.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  ownerId: {
19
- type: _contractspec_lib_schema319.FieldType<string, string>;
19
+ type: _contractspec_lib_schema253.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  createdAt: {
23
- type: _contractspec_lib_schema319.FieldType<Date, string>;
23
+ type: _contractspec_lib_schema253.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,108 +1,108 @@
1
- import * as _contractspec_lib_schema356 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts5 from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts7 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema329 from "@contractspec/lib.schema";
3
3
 
4
4
  //#region src/events/deal.event.d.ts
5
- declare const DealCreatedEvent: _contractspec_lib_contracts5.EventSpec<_contractspec_lib_schema356.SchemaModel<{
5
+ declare const DealCreatedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema329.SchemaModel<{
6
6
  dealId: {
7
- type: _contractspec_lib_schema356.FieldType<string, string>;
7
+ type: _contractspec_lib_schema329.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  name: {
11
- type: _contractspec_lib_schema356.FieldType<string, string>;
11
+ type: _contractspec_lib_schema329.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  value: {
15
- type: _contractspec_lib_schema356.FieldType<number, number>;
15
+ type: _contractspec_lib_schema329.FieldType<number, number>;
16
16
  isOptional: false;
17
17
  };
18
18
  pipelineId: {
19
- type: _contractspec_lib_schema356.FieldType<string, string>;
19
+ type: _contractspec_lib_schema329.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  stageId: {
23
- type: _contractspec_lib_schema356.FieldType<string, string>;
23
+ type: _contractspec_lib_schema329.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  ownerId: {
27
- type: _contractspec_lib_schema356.FieldType<string, string>;
27
+ type: _contractspec_lib_schema329.FieldType<string, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  createdAt: {
31
- type: _contractspec_lib_schema356.FieldType<Date, string>;
31
+ type: _contractspec_lib_schema329.FieldType<Date, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  }>>;
35
- declare const DealMovedEvent: _contractspec_lib_contracts5.EventSpec<_contractspec_lib_schema356.SchemaModel<{
35
+ declare const DealMovedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema329.SchemaModel<{
36
36
  dealId: {
37
- type: _contractspec_lib_schema356.FieldType<string, string>;
37
+ type: _contractspec_lib_schema329.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  fromStageId: {
41
- type: _contractspec_lib_schema356.FieldType<string, string>;
41
+ type: _contractspec_lib_schema329.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  toStageId: {
45
- type: _contractspec_lib_schema356.FieldType<string, string>;
45
+ type: _contractspec_lib_schema329.FieldType<string, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  movedBy: {
49
- type: _contractspec_lib_schema356.FieldType<string, string>;
49
+ type: _contractspec_lib_schema329.FieldType<string, string>;
50
50
  isOptional: false;
51
51
  };
52
52
  movedAt: {
53
- type: _contractspec_lib_schema356.FieldType<Date, string>;
53
+ type: _contractspec_lib_schema329.FieldType<Date, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  }>>;
57
- declare const DealWonEvent: _contractspec_lib_contracts5.EventSpec<_contractspec_lib_schema356.SchemaModel<{
57
+ declare const DealWonEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema329.SchemaModel<{
58
58
  dealId: {
59
- type: _contractspec_lib_schema356.FieldType<string, string>;
59
+ type: _contractspec_lib_schema329.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  value: {
63
- type: _contractspec_lib_schema356.FieldType<number, number>;
63
+ type: _contractspec_lib_schema329.FieldType<number, number>;
64
64
  isOptional: false;
65
65
  };
66
66
  currency: {
67
- type: _contractspec_lib_schema356.FieldType<string, string>;
67
+ type: _contractspec_lib_schema329.FieldType<string, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  contactId: {
71
- type: _contractspec_lib_schema356.FieldType<string, string>;
71
+ type: _contractspec_lib_schema329.FieldType<string, string>;
72
72
  isOptional: true;
73
73
  };
74
74
  companyId: {
75
- type: _contractspec_lib_schema356.FieldType<string, string>;
75
+ type: _contractspec_lib_schema329.FieldType<string, string>;
76
76
  isOptional: true;
77
77
  };
78
78
  ownerId: {
79
- type: _contractspec_lib_schema356.FieldType<string, string>;
79
+ type: _contractspec_lib_schema329.FieldType<string, string>;
80
80
  isOptional: false;
81
81
  };
82
82
  wonAt: {
83
- type: _contractspec_lib_schema356.FieldType<Date, string>;
83
+ type: _contractspec_lib_schema329.FieldType<Date, string>;
84
84
  isOptional: false;
85
85
  };
86
86
  }>>;
87
- declare const DealLostEvent: _contractspec_lib_contracts5.EventSpec<_contractspec_lib_schema356.SchemaModel<{
87
+ declare const DealLostEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema329.SchemaModel<{
88
88
  dealId: {
89
- type: _contractspec_lib_schema356.FieldType<string, string>;
89
+ type: _contractspec_lib_schema329.FieldType<string, string>;
90
90
  isOptional: false;
91
91
  };
92
92
  value: {
93
- type: _contractspec_lib_schema356.FieldType<number, number>;
93
+ type: _contractspec_lib_schema329.FieldType<number, number>;
94
94
  isOptional: false;
95
95
  };
96
96
  reason: {
97
- type: _contractspec_lib_schema356.FieldType<string, string>;
97
+ type: _contractspec_lib_schema329.FieldType<string, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  ownerId: {
101
- type: _contractspec_lib_schema356.FieldType<string, string>;
101
+ type: _contractspec_lib_schema329.FieldType<string, string>;
102
102
  isOptional: false;
103
103
  };
104
104
  lostAt: {
105
- type: _contractspec_lib_schema356.FieldType<Date, string>;
105
+ type: _contractspec_lib_schema329.FieldType<Date, string>;
106
106
  isOptional: false;
107
107
  };
108
108
  }>>;
@@ -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,26 +1,26 @@
1
- import * as _contractspec_lib_schema384 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts13 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema357 from "@contractspec/lib.schema";
3
3
 
4
4
  //#region src/events/task.event.d.ts
5
- declare const TaskCompletedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema384.SchemaModel<{
5
+ declare const TaskCompletedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema357.SchemaModel<{
6
6
  taskId: {
7
- type: _contractspec_lib_schema384.FieldType<string, string>;
7
+ type: _contractspec_lib_schema357.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  type: {
11
- type: _contractspec_lib_schema384.FieldType<string, string>;
11
+ type: _contractspec_lib_schema357.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  assignedTo: {
15
- type: _contractspec_lib_schema384.FieldType<string, string>;
15
+ type: _contractspec_lib_schema357.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  completedBy: {
19
- type: _contractspec_lib_schema384.FieldType<string, string>;
19
+ type: _contractspec_lib_schema357.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  completedAt: {
23
- type: _contractspec_lib_schema384.FieldType<Date, string>;
23
+ type: _contractspec_lib_schema357.FieldType<Date, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"task.event.d.ts","names":[],"sources":["../../src/events/task.event.ts"],"sourcesContent":[],"mappings":";;;;cAiBa,oBAAkB,4BAAA,CAAA,sCAAA;;UAU7B,2BAAA,CAAA;;EAVW,CAAA;EAUX,IAAA,EAAA;;;;;;;EAV6B,CAAA;EAAA,WAAA,EAAA"}
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 { 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,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
@@ -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: '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"}
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"}
@@ -0,0 +1,89 @@
1
+ import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
2
+
3
+ //#region src/handlers/crm.handlers.d.ts
4
+
5
+ interface Deal {
6
+ id: string;
7
+ projectId: string;
8
+ name: string;
9
+ value: number;
10
+ currency: string;
11
+ pipelineId: string;
12
+ stageId: string;
13
+ status: 'OPEN' | 'WON' | 'LOST' | 'STALE';
14
+ contactId?: string;
15
+ companyId?: string;
16
+ ownerId: string;
17
+ expectedCloseDate?: Date;
18
+ wonSource?: string;
19
+ lostReason?: string;
20
+ notes?: string;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ }
24
+ interface Stage {
25
+ id: string;
26
+ pipelineId: string;
27
+ name: string;
28
+ position: number;
29
+ }
30
+ interface CreateDealInput {
31
+ name: string;
32
+ value: number;
33
+ currency?: string;
34
+ pipelineId: string;
35
+ stageId: string;
36
+ contactId?: string;
37
+ companyId?: string;
38
+ expectedCloseDate?: Date;
39
+ }
40
+ interface MoveDealInput {
41
+ dealId: string;
42
+ stageId: string;
43
+ }
44
+ interface WinDealInput {
45
+ dealId: string;
46
+ wonSource?: string;
47
+ notes?: string;
48
+ }
49
+ interface LoseDealInput {
50
+ dealId: string;
51
+ lostReason: string;
52
+ notes?: string;
53
+ }
54
+ interface ListDealsInput {
55
+ projectId: string;
56
+ pipelineId?: string;
57
+ stageId?: string;
58
+ status?: 'OPEN' | 'WON' | 'LOST' | 'all';
59
+ ownerId?: string;
60
+ search?: string;
61
+ limit?: number;
62
+ offset?: number;
63
+ }
64
+ interface ListDealsOutput {
65
+ deals: Deal[];
66
+ total: number;
67
+ totalValue: number;
68
+ }
69
+ declare function createCrmHandlers(db: DatabasePort): {
70
+ listDeals: (input: ListDealsInput) => Promise<ListDealsOutput>;
71
+ createDeal: (input: CreateDealInput, context: {
72
+ projectId: string;
73
+ ownerId: string;
74
+ }) => Promise<Deal>;
75
+ moveDeal: (input: MoveDealInput) => Promise<Deal>;
76
+ winDeal: (input: WinDealInput) => Promise<Deal>;
77
+ loseDeal: (input: LoseDealInput) => Promise<Deal>;
78
+ getDealsByStage: (input: {
79
+ projectId: string;
80
+ pipelineId: string;
81
+ }) => Promise<Record<string, Deal[]>>;
82
+ getPipelineStages: (input: {
83
+ pipelineId: string;
84
+ }) => Promise<Stage[]>;
85
+ };
86
+ type CrmHandlers = ReturnType<typeof createCrmHandlers>;
87
+ //#endregion
88
+ export { CreateDealInput, CrmHandlers, Deal, ListDealsInput, ListDealsOutput, LoseDealInput, MoveDealInput, Stage, WinDealInput, createCrmHandlers };
89
+ //# sourceMappingURL=crm.handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crm.handlers.d.ts","names":[],"sources":["../../src/handlers/crm.handlers.ts"],"sourcesContent":[],"mappings":";;;;AA8BiB,UAjBA,IAAA,CAiBA;EAGA,EAAA,EAAA,MAAK;EAOL,SAAA,EAAA,MAAA;EAWA,IAAA,EAAA,MAAA;EAKA,KAAA,EAAA,MAAA;EAMA,QAAA,EAAA,MAAa;EAMb,UAAA,EAAA,MAAc;EAWd,OAAA,EAAA,MAAA;EAgED,MAAA,EAAA,MAAA,GAAA,KAAiB,GAAA,MAAA,GAAA,OAAA;EAAK,SAAA,CAAA,EAAA,MAAA;EAIJ,SAAA,CAAA,EAAA,MAAA;EAAyB,OAAA,EAAA,MAAA;EAAR,iBAAA,CAAA,EA1H7B,IA0H6B;EA6ExC,SAAA,CAAA,EAAA,MAAA;EAEE,UAAA,CAAA,EAAA,MAAA;EAAR,KAAA,CAAA,EAAA,MAAA;EAsC4B,SAAA,EA3OpB,IA2OoB;EAAwB,SAAA,EA1O5C,IA0O4C;;AAoCzB,UA3Qf,KAAA,CA2Qe;EAAuB,EAAA,EAAA,MAAA;EAAR,UAAA,EAAA,MAAA;EA2Bd,IAAA,EAAA,MAAA;EAAwB,QAAA,EAAA,MAAA;;AA8B5B,UA7TZ,eAAA,CA6TY;EAAf,IAAA,EAAA,MAAA;EAAR,KAAA,EAAA,MAAA;EA8BQ,QAAA,CAAA,EAAA,MAAA;EAAR,UAAA,EAAA,MAAA;EAAO,OAAA,EAAA,MAAA;EA2BD,SAAA,CAAA,EAAA,MAAW;;sBA9WD;;UAGL,aAAA;;;;UAKA,YAAA;;;;;UAMA,aAAA;;;;;UAMA,cAAA;;;;;;;;;;UAWA,eAAA;SACR;;;;iBA+DO,iBAAA,KAAsB;qBAIJ,mBAAiB,QAAQ;sBA6EhD;;;QAEN,QAAQ;oBAsCoB,kBAAgB,QAAQ;mBAoCzB,iBAAe,QAAQ;oBA2BtB,kBAAgB,QAAQ;;;;QA8BnD,QAAQ,eAAe;;;QA8BvB,QAAQ;;KA2BF,WAAA,GAAc,kBAAkB"}