@contractspec/example.crm-pipeline 1.57.0 → 1.59.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.log +148 -164
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +39 -0
- package/dist/browser/crm-pipeline.feature.js +75 -0
- package/dist/browser/deal/deal.enum.js +18 -0
- package/dist/browser/deal/deal.operation.js +396 -0
- package/dist/browser/deal/deal.schema.js +141 -0
- package/dist/browser/deal/deal.test-spec.js +58 -0
- package/dist/browser/deal/index.js +408 -0
- package/dist/browser/docs/crm-pipeline.docblock.js +113 -0
- package/dist/browser/docs/index.js +113 -0
- package/dist/browser/entities/company.entity.js +52 -0
- package/dist/browser/entities/contact.entity.js +66 -0
- package/dist/browser/entities/deal.entity.js +107 -0
- package/dist/browser/entities/index.js +343 -0
- package/dist/browser/entities/task.entity.js +99 -0
- package/dist/browser/events/contact.event.js +31 -0
- package/dist/browser/events/deal.event.js +101 -0
- package/dist/browser/events/index.js +158 -0
- package/dist/browser/events/task.event.js +28 -0
- package/dist/browser/example.js +39 -0
- package/dist/browser/handlers/crm.handlers.js +160 -0
- package/dist/browser/handlers/deal.handlers.js +293 -0
- package/dist/browser/handlers/index.js +456 -0
- package/dist/browser/handlers/mock-data.js +165 -0
- package/dist/browser/index.js +3279 -0
- package/dist/browser/operations/index.js +407 -0
- package/dist/browser/presentations/dashboard.presentation.js +52 -0
- package/dist/browser/presentations/index.js +284 -0
- package/dist/browser/presentations/pipeline.presentation.js +233 -0
- package/dist/browser/seeders/index.js +22 -0
- package/dist/browser/shared/overlay-types.js +0 -0
- package/dist/browser/ui/CrmDashboard.js +1325 -0
- package/dist/browser/ui/CrmDealCard.js +50 -0
- package/dist/browser/ui/CrmPipelineBoard.js +160 -0
- package/dist/browser/ui/hooks/index.js +186 -0
- package/dist/browser/ui/hooks/useDealList.js +84 -0
- package/dist/browser/ui/hooks/useDealMutations.js +100 -0
- package/dist/browser/ui/index.js +1972 -0
- package/dist/browser/ui/modals/CreateDealModal.js +211 -0
- package/dist/browser/ui/modals/DealActionsModal.js +428 -0
- package/dist/browser/ui/modals/index.js +638 -0
- package/dist/browser/ui/overlays/demo-overlays.js +55 -0
- package/dist/browser/ui/overlays/index.js +55 -0
- package/dist/browser/ui/renderers/index.js +827 -0
- package/dist/browser/ui/renderers/pipeline.markdown.js +564 -0
- package/dist/browser/ui/renderers/pipeline.renderer.js +264 -0
- package/dist/crm-pipeline.feature.d.ts +1 -6
- package/dist/crm-pipeline.feature.d.ts.map +1 -1
- package/dist/crm-pipeline.feature.js +74 -164
- package/dist/deal/deal.enum.d.ts +2 -7
- package/dist/deal/deal.enum.d.ts.map +1 -1
- package/dist/deal/deal.enum.js +16 -22
- package/dist/deal/deal.operation.d.ts +444 -450
- package/dist/deal/deal.operation.d.ts.map +1 -1
- package/dist/deal/deal.operation.js +390 -263
- package/dist/deal/deal.schema.d.ts +251 -256
- package/dist/deal/deal.schema.d.ts.map +1 -1
- package/dist/deal/deal.schema.js +131 -275
- package/dist/deal/deal.test-spec.d.ts +2 -7
- package/dist/deal/deal.test-spec.d.ts.map +1 -1
- package/dist/deal/deal.test-spec.js +56 -62
- package/dist/deal/index.d.ts +7 -4
- package/dist/deal/index.d.ts.map +1 -0
- package/dist/deal/index.js +408 -4
- package/dist/docs/crm-pipeline.docblock.d.ts +2 -1
- package/dist/docs/crm-pipeline.docblock.d.ts.map +1 -0
- package/dist/docs/crm-pipeline.docblock.js +45 -51
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +114 -1
- package/dist/entities/company.entity.d.ts +27 -32
- package/dist/entities/company.entity.d.ts.map +1 -1
- package/dist/entities/company.entity.js +51 -61
- package/dist/entities/contact.entity.d.ts +31 -36
- package/dist/entities/contact.entity.d.ts.map +1 -1
- package/dist/entities/contact.entity.js +65 -76
- package/dist/entities/deal.entity.d.ts +52 -57
- package/dist/entities/deal.entity.d.ts.map +1 -1
- package/dist/entities/deal.entity.js +104 -116
- package/dist/entities/index.d.ts +6 -10
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +342 -31
- package/dist/entities/task.entity.d.ts +42 -47
- package/dist/entities/task.entity.d.ts.map +1 -1
- package/dist/entities/task.entity.js +95 -124
- package/dist/events/contact.event.d.ts +21 -27
- package/dist/events/contact.event.d.ts.map +1 -1
- package/dist/events/contact.event.js +29 -42
- package/dist/events/deal.event.d.ts +100 -106
- package/dist/events/deal.event.d.ts.map +1 -1
- package/dist/events/deal.event.js +93 -163
- package/dist/events/index.d.ts +4 -4
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +158 -4
- package/dist/events/task.event.d.ts +21 -27
- package/dist/events/task.event.d.ts.map +1 -1
- package/dist/events/task.event.js +26 -42
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +38 -50
- package/dist/handlers/crm.handlers.d.ts +80 -78
- package/dist/handlers/crm.handlers.d.ts.map +1 -1
- package/dist/handlers/crm.handlers.js +155 -166
- package/dist/handlers/deal.handlers.d.ts +58 -63
- package/dist/handlers/deal.handlers.d.ts.map +1 -1
- package/dist/handlers/deal.handlers.js +279 -105
- package/dist/handlers/index.d.ts +10 -4
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +456 -4
- package/dist/handlers/mock-data.d.ts +38 -41
- package/dist/handlers/mock-data.d.ts.map +1 -1
- package/dist/handlers/mock-data.js +162 -184
- package/dist/index.d.ts +13 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3277 -53
- package/dist/node/crm-pipeline.feature.js +75 -0
- package/dist/node/deal/deal.enum.js +18 -0
- package/dist/node/deal/deal.operation.js +396 -0
- package/dist/node/deal/deal.schema.js +141 -0
- package/dist/node/deal/deal.test-spec.js +58 -0
- package/dist/node/deal/index.js +408 -0
- package/dist/node/docs/crm-pipeline.docblock.js +113 -0
- package/dist/node/docs/index.js +113 -0
- package/dist/node/entities/company.entity.js +52 -0
- package/dist/node/entities/contact.entity.js +66 -0
- package/dist/node/entities/deal.entity.js +107 -0
- package/dist/node/entities/index.js +343 -0
- package/dist/node/entities/task.entity.js +99 -0
- package/dist/node/events/contact.event.js +31 -0
- package/dist/node/events/deal.event.js +101 -0
- package/dist/node/events/index.js +158 -0
- package/dist/node/events/task.event.js +28 -0
- package/dist/node/example.js +39 -0
- package/dist/node/handlers/crm.handlers.js +160 -0
- package/dist/node/handlers/deal.handlers.js +293 -0
- package/dist/node/handlers/index.js +456 -0
- package/dist/node/handlers/mock-data.js +165 -0
- package/dist/node/index.js +3279 -0
- package/dist/node/operations/index.js +407 -0
- package/dist/node/presentations/dashboard.presentation.js +52 -0
- package/dist/node/presentations/index.js +284 -0
- package/dist/node/presentations/pipeline.presentation.js +233 -0
- package/dist/node/seeders/index.js +22 -0
- package/dist/node/shared/overlay-types.js +0 -0
- package/dist/node/ui/CrmDashboard.js +1325 -0
- package/dist/node/ui/CrmDealCard.js +50 -0
- package/dist/node/ui/CrmPipelineBoard.js +160 -0
- package/dist/node/ui/hooks/index.js +186 -0
- package/dist/node/ui/hooks/useDealList.js +84 -0
- package/dist/node/ui/hooks/useDealMutations.js +100 -0
- package/dist/node/ui/index.js +1972 -0
- package/dist/node/ui/modals/CreateDealModal.js +211 -0
- package/dist/node/ui/modals/DealActionsModal.js +428 -0
- package/dist/node/ui/modals/index.js +638 -0
- package/dist/node/ui/overlays/demo-overlays.js +55 -0
- package/dist/node/ui/overlays/index.js +55 -0
- package/dist/node/ui/renderers/index.js +827 -0
- package/dist/node/ui/renderers/pipeline.markdown.js +564 -0
- package/dist/node/ui/renderers/pipeline.renderer.js +264 -0
- package/dist/operations/index.d.ts +2 -5
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +407 -5
- package/dist/presentations/dashboard.presentation.d.ts +2 -7
- package/dist/presentations/dashboard.presentation.d.ts.map +1 -1
- package/dist/presentations/dashboard.presentation.js +51 -60
- package/dist/presentations/index.d.ts +3 -3
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +284 -3
- package/dist/presentations/pipeline.presentation.d.ts +4 -9
- package/dist/presentations/pipeline.presentation.d.ts.map +1 -1
- package/dist/presentations/pipeline.presentation.js +228 -116
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +21 -45
- package/dist/shared/overlay-types.d.ts +25 -28
- package/dist/shared/overlay-types.d.ts.map +1 -1
- package/dist/shared/overlay-types.js +1 -0
- package/dist/ui/CrmDashboard.d.ts +1 -6
- package/dist/ui/CrmDashboard.d.ts.map +1 -1
- package/dist/ui/CrmDashboard.js +1318 -296
- package/dist/ui/CrmDealCard.d.ts +8 -12
- package/dist/ui/CrmDealCard.d.ts.map +1 -1
- package/dist/ui/CrmDealCard.js +47 -45
- package/dist/ui/CrmPipelineBoard.d.ts +11 -20
- package/dist/ui/CrmPipelineBoard.d.ts.map +1 -1
- package/dist/ui/CrmPipelineBoard.js +157 -94
- package/dist/ui/hooks/index.d.ts +3 -3
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +185 -4
- package/dist/ui/hooks/useDealList.d.ts +28 -32
- package/dist/ui/hooks/useDealList.d.ts.map +1 -1
- package/dist/ui/hooks/useDealList.js +81 -90
- package/dist/ui/hooks/useDealMutations.d.ts +18 -22
- package/dist/ui/hooks/useDealMutations.d.ts.map +1 -1
- package/dist/ui/hooks/useDealMutations.js +97 -155
- package/dist/ui/index.d.ts +8 -14
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1973 -15
- package/dist/ui/modals/CreateDealModal.d.ts +19 -29
- package/dist/ui/modals/CreateDealModal.d.ts.map +1 -1
- package/dist/ui/modals/CreateDealModal.js +209 -180
- package/dist/ui/modals/DealActionsModal.d.ts +31 -44
- package/dist/ui/modals/DealActionsModal.d.ts.map +1 -1
- package/dist/ui/modals/DealActionsModal.js +424 -367
- package/dist/ui/modals/index.d.ts +3 -3
- package/dist/ui/modals/index.d.ts.map +1 -0
- package/dist/ui/modals/index.js +638 -3
- package/dist/ui/overlays/demo-overlays.d.ts +10 -8
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
- package/dist/ui/overlays/demo-overlays.js +54 -66
- package/dist/ui/overlays/index.d.ts +2 -2
- package/dist/ui/overlays/index.d.ts.map +1 -0
- package/dist/ui/overlays/index.js +56 -3
- package/dist/ui/renderers/index.d.ts +3 -3
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +827 -3
- package/dist/ui/renderers/pipeline.markdown.d.ts +12 -11
- package/dist/ui/renderers/pipeline.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/pipeline.markdown.js +560 -114
- package/dist/ui/renderers/pipeline.renderer.d.ts +9 -7
- package/dist/ui/renderers/pipeline.renderer.d.ts.map +1 -1
- package/dist/ui/renderers/pipeline.renderer.js +261 -24
- package/package.json +476 -90
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -164
- package/dist/crm-pipeline.feature.js.map +0 -1
- package/dist/deal/deal.enum.js.map +0 -1
- package/dist/deal/deal.operation.js.map +0 -1
- package/dist/deal/deal.schema.js.map +0 -1
- package/dist/deal/deal.test-spec.js.map +0 -1
- package/dist/docs/crm-pipeline.docblock.js.map +0 -1
- package/dist/entities/company.entity.js.map +0 -1
- package/dist/entities/contact.entity.js.map +0 -1
- package/dist/entities/deal.entity.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/entities/task.entity.js.map +0 -1
- package/dist/events/contact.event.js.map +0 -1
- package/dist/events/deal.event.js.map +0 -1
- package/dist/events/task.event.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/crm.handlers.js.map +0 -1
- package/dist/handlers/deal.handlers.js.map +0 -1
- package/dist/handlers/mock-data.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/presentations/dashboard.presentation.js.map +0 -1
- package/dist/presentations/pipeline.presentation.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/ui/CrmDashboard.js.map +0 -1
- package/dist/ui/CrmDealCard.js.map +0 -1
- package/dist/ui/CrmPipelineBoard.js.map +0 -1
- package/dist/ui/hooks/useDealList.js.map +0 -1
- package/dist/ui/hooks/useDealMutations.js.map +0 -1
- package/dist/ui/modals/CreateDealModal.js.map +0 -1
- package/dist/ui/modals/DealActionsModal.js.map +0 -1
- package/dist/ui/overlays/demo-overlays.js.map +0 -1
- package/dist/ui/renderers/pipeline.markdown.js.map +0 -1
- package/dist/ui/renderers/pipeline.renderer.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,111 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
createdAt: {
|
|
31
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
32
|
-
isOptional: false;
|
|
33
|
-
};
|
|
1
|
+
export declare const DealCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
2
|
+
dealId: {
|
|
3
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
4
|
+
isOptional: false;
|
|
5
|
+
};
|
|
6
|
+
name: {
|
|
7
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
value: {
|
|
11
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
12
|
+
isOptional: false;
|
|
13
|
+
};
|
|
14
|
+
pipelineId: {
|
|
15
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
16
|
+
isOptional: false;
|
|
17
|
+
};
|
|
18
|
+
stageId: {
|
|
19
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
20
|
+
isOptional: false;
|
|
21
|
+
};
|
|
22
|
+
ownerId: {
|
|
23
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
24
|
+
isOptional: false;
|
|
25
|
+
};
|
|
26
|
+
createdAt: {
|
|
27
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
34
30
|
}>>;
|
|
35
|
-
declare const DealMovedEvent:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
export declare const DealMovedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
32
|
+
dealId: {
|
|
33
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
fromStageId: {
|
|
37
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
toStageId: {
|
|
41
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
movedBy: {
|
|
45
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
46
|
+
isOptional: false;
|
|
47
|
+
};
|
|
48
|
+
movedAt: {
|
|
49
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
50
|
+
isOptional: false;
|
|
51
|
+
};
|
|
56
52
|
}>>;
|
|
57
|
-
declare const DealWonEvent:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
53
|
+
export declare const DealWonEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
54
|
+
dealId: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
value: {
|
|
59
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
currency: {
|
|
63
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
64
|
+
isOptional: false;
|
|
65
|
+
};
|
|
66
|
+
contactId: {
|
|
67
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
68
|
+
isOptional: true;
|
|
69
|
+
};
|
|
70
|
+
companyId: {
|
|
71
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
72
|
+
isOptional: true;
|
|
73
|
+
};
|
|
74
|
+
ownerId: {
|
|
75
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
76
|
+
isOptional: false;
|
|
77
|
+
};
|
|
78
|
+
wonAt: {
|
|
79
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
80
|
+
isOptional: false;
|
|
81
|
+
};
|
|
86
82
|
}>>;
|
|
87
|
-
declare const DealLostEvent:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
83
|
+
export declare const DealLostEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
84
|
+
dealId: {
|
|
85
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
86
|
+
isOptional: false;
|
|
87
|
+
};
|
|
88
|
+
value: {
|
|
89
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
90
|
+
isOptional: false;
|
|
91
|
+
};
|
|
92
|
+
reason: {
|
|
93
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
94
|
+
isOptional: false;
|
|
95
|
+
};
|
|
96
|
+
ownerId: {
|
|
97
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
98
|
+
isOptional: false;
|
|
99
|
+
};
|
|
100
|
+
lostAt: {
|
|
101
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
108
104
|
}>>;
|
|
109
|
-
//#endregion
|
|
110
|
-
export { DealCreatedEvent, DealLostEvent, DealMovedEvent, DealWonEvent };
|
|
111
105
|
//# sourceMappingURL=deal.event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deal.event.d.ts","
|
|
1
|
+
{"version":3,"file":"deal.event.d.ts","sourceRoot":"","sources":["../../src/events/deal.event.ts"],"names":[],"mappings":"AAyDA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAU3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;GAUzB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;GAUxB,CAAC"}
|
|
@@ -1,172 +1,102 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/events/deal.event.ts
|
|
2
3
|
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
value: {
|
|
18
|
-
type: ScalarTypeEnum.Float_unsecure(),
|
|
19
|
-
isOptional: false
|
|
20
|
-
},
|
|
21
|
-
pipelineId: {
|
|
22
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
-
isOptional: false
|
|
24
|
-
},
|
|
25
|
-
stageId: {
|
|
26
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
-
isOptional: false
|
|
28
|
-
},
|
|
29
|
-
ownerId: {
|
|
30
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
-
isOptional: false
|
|
32
|
-
},
|
|
33
|
-
createdAt: {
|
|
34
|
-
type: ScalarTypeEnum.DateTime(),
|
|
35
|
-
isOptional: false
|
|
36
|
-
}
|
|
37
|
-
}
|
|
4
|
+
import { defineEvent } from "@contractspec/lib.contracts";
|
|
5
|
+
var DealCreatedPayload = defineSchemaModel({
|
|
6
|
+
name: "DealCreatedPayload",
|
|
7
|
+
description: "Payload when a deal is created",
|
|
8
|
+
fields: {
|
|
9
|
+
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
12
|
+
pipelineId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
14
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
15
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
16
|
+
}
|
|
38
17
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
isOptional: false
|
|
50
|
-
},
|
|
51
|
-
toStageId: {
|
|
52
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
53
|
-
isOptional: false
|
|
54
|
-
},
|
|
55
|
-
movedBy: {
|
|
56
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
57
|
-
isOptional: false
|
|
58
|
-
},
|
|
59
|
-
movedAt: {
|
|
60
|
-
type: ScalarTypeEnum.DateTime(),
|
|
61
|
-
isOptional: false
|
|
62
|
-
}
|
|
63
|
-
}
|
|
18
|
+
var DealMovedPayload = defineSchemaModel({
|
|
19
|
+
name: "DealMovedEventPayload",
|
|
20
|
+
description: "Payload when a deal is moved to another stage",
|
|
21
|
+
fields: {
|
|
22
|
+
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
fromStageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
toStageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
25
|
+
movedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
26
|
+
movedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
27
|
+
}
|
|
64
28
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
currency: {
|
|
78
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
-
isOptional: false
|
|
80
|
-
},
|
|
81
|
-
contactId: {
|
|
82
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
83
|
-
isOptional: true
|
|
84
|
-
},
|
|
85
|
-
companyId: {
|
|
86
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
87
|
-
isOptional: true
|
|
88
|
-
},
|
|
89
|
-
ownerId: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isOptional: false
|
|
92
|
-
},
|
|
93
|
-
wonAt: {
|
|
94
|
-
type: ScalarTypeEnum.DateTime(),
|
|
95
|
-
isOptional: false
|
|
96
|
-
}
|
|
97
|
-
}
|
|
29
|
+
var DealWonPayload = defineSchemaModel({
|
|
30
|
+
name: "DealWonEventPayload",
|
|
31
|
+
description: "Payload when a deal is won",
|
|
32
|
+
fields: {
|
|
33
|
+
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
34
|
+
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
35
|
+
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
36
|
+
contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
37
|
+
companyId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
38
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
39
|
+
wonAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
40
|
+
}
|
|
98
41
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
isOptional: false
|
|
110
|
-
},
|
|
111
|
-
reason: {
|
|
112
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
113
|
-
isOptional: false
|
|
114
|
-
},
|
|
115
|
-
ownerId: {
|
|
116
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
117
|
-
isOptional: false
|
|
118
|
-
},
|
|
119
|
-
lostAt: {
|
|
120
|
-
type: ScalarTypeEnum.DateTime(),
|
|
121
|
-
isOptional: false
|
|
122
|
-
}
|
|
123
|
-
}
|
|
42
|
+
var DealLostPayload = defineSchemaModel({
|
|
43
|
+
name: "DealLostEventPayload",
|
|
44
|
+
description: "Payload when a deal is lost",
|
|
45
|
+
fields: {
|
|
46
|
+
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
+
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
48
|
+
reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
49
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
50
|
+
lostAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
51
|
+
}
|
|
124
52
|
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
53
|
+
var DealCreatedEvent = defineEvent({
|
|
54
|
+
meta: {
|
|
55
|
+
key: "deal.created",
|
|
56
|
+
version: "1.0.0",
|
|
57
|
+
description: "A new deal has been created.",
|
|
58
|
+
stability: "stable",
|
|
59
|
+
owners: ["@crm-team"],
|
|
60
|
+
tags: ["deal", "created"]
|
|
61
|
+
},
|
|
62
|
+
payload: DealCreatedPayload
|
|
135
63
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
64
|
+
var DealMovedEvent = defineEvent({
|
|
65
|
+
meta: {
|
|
66
|
+
key: "deal.moved",
|
|
67
|
+
version: "1.0.0",
|
|
68
|
+
description: "A deal has been moved to a different stage.",
|
|
69
|
+
stability: "stable",
|
|
70
|
+
owners: ["@crm-team"],
|
|
71
|
+
tags: ["deal", "moved"]
|
|
72
|
+
},
|
|
73
|
+
payload: DealMovedPayload
|
|
146
74
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
75
|
+
var DealWonEvent = defineEvent({
|
|
76
|
+
meta: {
|
|
77
|
+
key: "deal.won",
|
|
78
|
+
version: "1.0.0",
|
|
79
|
+
description: "A deal has been won.",
|
|
80
|
+
stability: "stable",
|
|
81
|
+
owners: ["@crm-team"],
|
|
82
|
+
tags: ["deal", "won"]
|
|
83
|
+
},
|
|
84
|
+
payload: DealWonPayload
|
|
157
85
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
86
|
+
var DealLostEvent = defineEvent({
|
|
87
|
+
meta: {
|
|
88
|
+
key: "deal.lost",
|
|
89
|
+
version: "1.0.0",
|
|
90
|
+
description: "A deal has been lost.",
|
|
91
|
+
stability: "stable",
|
|
92
|
+
owners: ["@crm-team"],
|
|
93
|
+
tags: ["deal", "lost"]
|
|
94
|
+
},
|
|
95
|
+
payload: DealLostPayload
|
|
168
96
|
});
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
97
|
+
export {
|
|
98
|
+
DealWonEvent,
|
|
99
|
+
DealMovedEvent,
|
|
100
|
+
DealLostEvent,
|
|
101
|
+
DealCreatedEvent
|
|
102
|
+
};
|
package/dist/events/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export * from './contact.event';
|
|
2
|
+
export * from './deal.event';
|
|
3
|
+
export * from './task.event';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
package/dist/events/index.js
CHANGED
|
@@ -1,5 +1,159 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
// @bun
|
|
2
|
+
// src/events/contact.event.ts
|
|
3
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
4
|
+
import { defineEvent } from "@contractspec/lib.contracts";
|
|
5
|
+
var ContactCreatedPayload = defineSchemaModel({
|
|
6
|
+
name: "ContactCreatedPayload",
|
|
7
|
+
description: "Payload when a contact is created",
|
|
8
|
+
fields: {
|
|
9
|
+
contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
email: { type: ScalarTypeEnum.EmailAddress(), isOptional: true },
|
|
11
|
+
organizationId: {
|
|
12
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
13
|
+
isOptional: false
|
|
14
|
+
},
|
|
15
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
16
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var ContactCreatedEvent = defineEvent({
|
|
20
|
+
meta: {
|
|
21
|
+
key: "contact.created",
|
|
22
|
+
version: "1.0.0",
|
|
23
|
+
description: "A new contact has been created.",
|
|
24
|
+
stability: "stable",
|
|
25
|
+
owners: ["@crm-team"],
|
|
26
|
+
tags: ["contact", "created"]
|
|
27
|
+
},
|
|
28
|
+
payload: ContactCreatedPayload
|
|
29
|
+
});
|
|
4
30
|
|
|
5
|
-
|
|
31
|
+
// src/events/deal.event.ts
|
|
32
|
+
import { ScalarTypeEnum as ScalarTypeEnum2, defineSchemaModel as defineSchemaModel2 } from "@contractspec/lib.schema";
|
|
33
|
+
import { defineEvent as defineEvent2 } from "@contractspec/lib.contracts";
|
|
34
|
+
var DealCreatedPayload = defineSchemaModel2({
|
|
35
|
+
name: "DealCreatedPayload",
|
|
36
|
+
description: "Payload when a deal is created",
|
|
37
|
+
fields: {
|
|
38
|
+
dealId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
39
|
+
name: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
40
|
+
value: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
|
|
41
|
+
pipelineId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
42
|
+
stageId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
43
|
+
ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
44
|
+
createdAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var DealMovedPayload = defineSchemaModel2({
|
|
48
|
+
name: "DealMovedEventPayload",
|
|
49
|
+
description: "Payload when a deal is moved to another stage",
|
|
50
|
+
fields: {
|
|
51
|
+
dealId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
52
|
+
fromStageId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
53
|
+
toStageId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
54
|
+
movedBy: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
55
|
+
movedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
var DealWonPayload = defineSchemaModel2({
|
|
59
|
+
name: "DealWonEventPayload",
|
|
60
|
+
description: "Payload when a deal is won",
|
|
61
|
+
fields: {
|
|
62
|
+
dealId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
63
|
+
value: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
|
|
64
|
+
currency: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
65
|
+
contactId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
66
|
+
companyId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
67
|
+
ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
68
|
+
wonAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var DealLostPayload = defineSchemaModel2({
|
|
72
|
+
name: "DealLostEventPayload",
|
|
73
|
+
description: "Payload when a deal is lost",
|
|
74
|
+
fields: {
|
|
75
|
+
dealId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
76
|
+
value: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
|
|
77
|
+
reason: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
78
|
+
ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
79
|
+
lostAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var DealCreatedEvent = defineEvent2({
|
|
83
|
+
meta: {
|
|
84
|
+
key: "deal.created",
|
|
85
|
+
version: "1.0.0",
|
|
86
|
+
description: "A new deal has been created.",
|
|
87
|
+
stability: "stable",
|
|
88
|
+
owners: ["@crm-team"],
|
|
89
|
+
tags: ["deal", "created"]
|
|
90
|
+
},
|
|
91
|
+
payload: DealCreatedPayload
|
|
92
|
+
});
|
|
93
|
+
var DealMovedEvent = defineEvent2({
|
|
94
|
+
meta: {
|
|
95
|
+
key: "deal.moved",
|
|
96
|
+
version: "1.0.0",
|
|
97
|
+
description: "A deal has been moved to a different stage.",
|
|
98
|
+
stability: "stable",
|
|
99
|
+
owners: ["@crm-team"],
|
|
100
|
+
tags: ["deal", "moved"]
|
|
101
|
+
},
|
|
102
|
+
payload: DealMovedPayload
|
|
103
|
+
});
|
|
104
|
+
var DealWonEvent = defineEvent2({
|
|
105
|
+
meta: {
|
|
106
|
+
key: "deal.won",
|
|
107
|
+
version: "1.0.0",
|
|
108
|
+
description: "A deal has been won.",
|
|
109
|
+
stability: "stable",
|
|
110
|
+
owners: ["@crm-team"],
|
|
111
|
+
tags: ["deal", "won"]
|
|
112
|
+
},
|
|
113
|
+
payload: DealWonPayload
|
|
114
|
+
});
|
|
115
|
+
var DealLostEvent = defineEvent2({
|
|
116
|
+
meta: {
|
|
117
|
+
key: "deal.lost",
|
|
118
|
+
version: "1.0.0",
|
|
119
|
+
description: "A deal has been lost.",
|
|
120
|
+
stability: "stable",
|
|
121
|
+
owners: ["@crm-team"],
|
|
122
|
+
tags: ["deal", "lost"]
|
|
123
|
+
},
|
|
124
|
+
payload: DealLostPayload
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// src/events/task.event.ts
|
|
128
|
+
import { ScalarTypeEnum as ScalarTypeEnum3, defineSchemaModel as defineSchemaModel3 } from "@contractspec/lib.schema";
|
|
129
|
+
import { defineEvent as defineEvent3 } from "@contractspec/lib.contracts";
|
|
130
|
+
var TaskCompletedPayload = defineSchemaModel3({
|
|
131
|
+
name: "TaskCompletedPayload",
|
|
132
|
+
description: "Payload when a task is completed",
|
|
133
|
+
fields: {
|
|
134
|
+
taskId: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
135
|
+
type: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
136
|
+
assignedTo: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
137
|
+
completedBy: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
138
|
+
completedAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false }
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
var TaskCompletedEvent = defineEvent3({
|
|
142
|
+
meta: {
|
|
143
|
+
key: "task.completed",
|
|
144
|
+
version: "1.0.0",
|
|
145
|
+
description: "A task has been completed.",
|
|
146
|
+
stability: "stable",
|
|
147
|
+
owners: ["@crm-team"],
|
|
148
|
+
tags: ["task", "lifecycle"]
|
|
149
|
+
},
|
|
150
|
+
payload: TaskCompletedPayload
|
|
151
|
+
});
|
|
152
|
+
export {
|
|
153
|
+
TaskCompletedEvent,
|
|
154
|
+
DealWonEvent,
|
|
155
|
+
DealMovedEvent,
|
|
156
|
+
DealLostEvent,
|
|
157
|
+
DealCreatedEvent,
|
|
158
|
+
ContactCreatedEvent
|
|
159
|
+
};
|