@lssm/example.crm-pipeline 0.0.0-canary-20251215220103 → 0.0.0-canary-20251215231653
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 +25 -26
- package/CHANGELOG.md +8 -8
- package/dist/entities/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/presentations/index.js +1 -1
- package/package.json +16 -16
- package/src/entities/index.ts +23 -41
- package/src/index.ts +1 -1
- package/src/presentations/index.ts +2 -38
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/events.js +0 -1
- package/src/events.ts +0 -142
- /package/dist/{feature.js → crm-pipeline.feature.js} +0 -0
- /package/dist/entities/{company.js → company.entity.js} +0 -0
- /package/dist/entities/{contact.js → contact.entity.js} +0 -0
- /package/dist/entities/{deal.js → deal.entity.js} +0 -0
- /package/dist/entities/{task.js → task.entity.js} +0 -0
- /package/dist/presentations/{dashboard.js → dashboard.presentation.js} +0 -0
- /package/dist/presentations/{pipeline.js → pipeline.presentation.js} +0 -0
- /package/src/{feature.ts → crm-pipeline.feature.ts} +0 -0
- /package/src/entities/{company.ts → company.entity.ts} +0 -0
- /package/src/entities/{contact.ts → contact.entity.ts} +0 -0
- /package/src/entities/{deal.ts → deal.entity.ts} +0 -0
- /package/src/entities/{task.ts → task.entity.ts} +0 -0
- /package/src/presentations/{dashboard.ts → dashboard.presentation.ts} +0 -0
- /package/src/presentations/{pipeline.ts → pipeline.presentation.ts} +0 -0
package/dist/events.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=t({name:`ContactCreatedPayload`,description:`Payload when a contact is created`,fields:{contactId:{type:e.String_unsecure(),isOptional:!1},email:{type:e.EmailAddress(),isOptional:!0},organizationId:{type:e.String_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`DealCreatedPayload`,description:`Payload when a deal is created`,fields:{dealId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},value:{type:e.Float_unsecure(),isOptional:!1},pipelineId:{type:e.String_unsecure(),isOptional:!1},stageId:{type:e.String_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),a=t({name:`DealMovedEventPayload`,description:`Payload when a deal is moved to another stage`,fields:{dealId:{type:e.String_unsecure(),isOptional:!1},fromStageId:{type:e.String_unsecure(),isOptional:!1},toStageId:{type:e.String_unsecure(),isOptional:!1},movedBy:{type:e.String_unsecure(),isOptional:!1},movedAt:{type:e.DateTime(),isOptional:!1}}}),o=t({name:`DealWonEventPayload`,description:`Payload when a deal is won`,fields:{dealId:{type:e.String_unsecure(),isOptional:!1},value:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1},contactId:{type:e.String_unsecure(),isOptional:!0},companyId:{type:e.String_unsecure(),isOptional:!0},ownerId:{type:e.String_unsecure(),isOptional:!1},wonAt:{type:e.DateTime(),isOptional:!1}}}),s=t({name:`DealLostEventPayload`,description:`Payload when a deal is lost`,fields:{dealId:{type:e.String_unsecure(),isOptional:!1},value:{type:e.Float_unsecure(),isOptional:!1},reason:{type:e.String_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},lostAt:{type:e.DateTime(),isOptional:!1}}}),c=t({name:`TaskCompletedPayload`,description:`Payload when a task is completed`,fields:{taskId:{type:e.String_unsecure(),isOptional:!1},type:{type:e.String_unsecure(),isOptional:!1},assignedTo:{type:e.String_unsecure(),isOptional:!1},completedBy:{type:e.String_unsecure(),isOptional:!1},completedAt:{type:e.DateTime(),isOptional:!1}}}),l=n({name:`contact.created`,version:1,description:`A new contact has been created.`,payload:r}),u=n({name:`deal.created`,version:1,description:`A new deal has been created.`,payload:i}),d=n({name:`deal.moved`,version:1,description:`A deal has been moved to a different stage.`,payload:a}),f=n({name:`deal.won`,version:1,description:`A deal has been won.`,payload:o}),p=n({name:`deal.lost`,version:1,description:`A deal has been lost.`,payload:s}),m=n({name:`task.completed`,version:1,description:`A task has been completed.`,payload:c}),h={ContactCreatedEvent:l,DealCreatedEvent:u,DealMovedEvent:d,DealWonEvent:f,DealLostEvent:p,TaskCompletedEvent:m};export{l as ContactCreatedEvent,h as CrmPipelineEvents,u as DealCreatedEvent,p as DealLostEvent,d as DealMovedEvent,f as DealWonEvent,m as TaskCompletedEvent};
|
package/src/events.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { ScalarTypeEnum, defineSchemaModel } from '@lssm/lib.schema';
|
|
2
|
-
import { defineEvent } from '@lssm/lib.contracts';
|
|
3
|
-
|
|
4
|
-
// ============ Contact Event Payloads ============
|
|
5
|
-
|
|
6
|
-
const ContactCreatedPayload = defineSchemaModel({
|
|
7
|
-
name: 'ContactCreatedPayload',
|
|
8
|
-
description: 'Payload when a contact is created',
|
|
9
|
-
fields: {
|
|
10
|
-
contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
-
email: { type: ScalarTypeEnum.EmailAddress(), isOptional: true },
|
|
12
|
-
organizationId: {
|
|
13
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
-
isOptional: false,
|
|
15
|
-
},
|
|
16
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// ============ Deal Event Payloads ============
|
|
22
|
-
|
|
23
|
-
const DealCreatedPayload = defineSchemaModel({
|
|
24
|
-
name: 'DealCreatedPayload',
|
|
25
|
-
description: 'Payload when a deal is created',
|
|
26
|
-
fields: {
|
|
27
|
-
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
28
|
-
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
29
|
-
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
30
|
-
pipelineId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
31
|
-
stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
32
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
33
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const DealMovedPayload = defineSchemaModel({
|
|
38
|
-
name: 'DealMovedEventPayload',
|
|
39
|
-
description: 'Payload when a deal is moved to another stage',
|
|
40
|
-
fields: {
|
|
41
|
-
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
42
|
-
fromStageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
43
|
-
toStageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
44
|
-
movedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
45
|
-
movedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const DealWonPayload = defineSchemaModel({
|
|
50
|
-
name: 'DealWonEventPayload',
|
|
51
|
-
description: 'Payload when a deal is won',
|
|
52
|
-
fields: {
|
|
53
|
-
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
54
|
-
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
55
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
56
|
-
contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
57
|
-
companyId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
58
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
59
|
-
wonAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const DealLostPayload = defineSchemaModel({
|
|
64
|
-
name: 'DealLostEventPayload',
|
|
65
|
-
description: 'Payload when a deal is lost',
|
|
66
|
-
fields: {
|
|
67
|
-
dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
68
|
-
value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
69
|
-
reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
70
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
71
|
-
lostAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// ============ Task Event Payloads ============
|
|
76
|
-
|
|
77
|
-
const TaskCompletedPayload = defineSchemaModel({
|
|
78
|
-
name: 'TaskCompletedPayload',
|
|
79
|
-
description: 'Payload when a task is completed',
|
|
80
|
-
fields: {
|
|
81
|
-
taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
82
|
-
type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
83
|
-
assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
84
|
-
completedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
85
|
-
completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// ============ Events ============
|
|
90
|
-
|
|
91
|
-
export const ContactCreatedEvent = defineEvent({
|
|
92
|
-
name: 'contact.created',
|
|
93
|
-
version: 1,
|
|
94
|
-
description: 'A new contact has been created.',
|
|
95
|
-
payload: ContactCreatedPayload,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export const DealCreatedEvent = defineEvent({
|
|
99
|
-
name: 'deal.created',
|
|
100
|
-
version: 1,
|
|
101
|
-
description: 'A new deal has been created.',
|
|
102
|
-
payload: DealCreatedPayload,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
export const DealMovedEvent = defineEvent({
|
|
106
|
-
name: 'deal.moved',
|
|
107
|
-
version: 1,
|
|
108
|
-
description: 'A deal has been moved to a different stage.',
|
|
109
|
-
payload: DealMovedPayload,
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
export const DealWonEvent = defineEvent({
|
|
113
|
-
name: 'deal.won',
|
|
114
|
-
version: 1,
|
|
115
|
-
description: 'A deal has been won.',
|
|
116
|
-
payload: DealWonPayload,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
export const DealLostEvent = defineEvent({
|
|
120
|
-
name: 'deal.lost',
|
|
121
|
-
version: 1,
|
|
122
|
-
description: 'A deal has been lost.',
|
|
123
|
-
payload: DealLostPayload,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
export const TaskCompletedEvent = defineEvent({
|
|
127
|
-
name: 'task.completed',
|
|
128
|
-
version: 1,
|
|
129
|
-
description: 'A task has been completed.',
|
|
130
|
-
payload: TaskCompletedPayload,
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
// ============ All Events ============
|
|
134
|
-
|
|
135
|
-
export const CrmPipelineEvents = {
|
|
136
|
-
ContactCreatedEvent,
|
|
137
|
-
DealCreatedEvent,
|
|
138
|
-
DealMovedEvent,
|
|
139
|
-
DealWonEvent,
|
|
140
|
-
DealLostEvent,
|
|
141
|
-
TaskCompletedEvent,
|
|
142
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|