@contractspec/example.crm-pipeline 1.44.1 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +25 -25
- package/.turbo/turbo-build.log +22 -22
- package/CHANGELOG.md +31 -0
- package/dist/crm-pipeline.feature.js +29 -29
- package/dist/crm-pipeline.feature.js.map +1 -1
- package/dist/deal/deal.enum.d.ts +3 -3
- package/dist/deal/deal.enum.d.ts.map +1 -1
- package/dist/deal/deal.operation.d.ts +132 -132
- package/dist/deal/deal.operation.d.ts.map +1 -1
- package/dist/deal/deal.operation.js +9 -9
- package/dist/deal/deal.operation.js.map +1 -1
- package/dist/deal/deal.schema.d.ts +71 -71
- package/dist/deal/deal.schema.d.ts.map +1 -1
- package/dist/entities/company.entity.d.ts +28 -28
- package/dist/entities/company.entity.d.ts.map +1 -1
- package/dist/entities/contact.entity.d.ts +32 -32
- package/dist/entities/contact.entity.d.ts.map +1 -1
- package/dist/entities/deal.entity.d.ts +53 -53
- package/dist/entities/task.entity.d.ts +43 -43
- package/dist/events/contact.event.d.ts +8 -8
- package/dist/events/contact.event.js +1 -1
- package/dist/events/contact.event.js.map +1 -1
- package/dist/events/deal.event.d.ts +30 -30
- package/dist/events/deal.event.js +4 -4
- package/dist/events/deal.event.js.map +1 -1
- package/dist/events/task.event.d.ts +8 -8
- package/dist/events/task.event.js +1 -1
- package/dist/events/task.event.js.map +1 -1
- package/dist/example.d.ts +3 -33
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/presentations/dashboard.presentation.js +2 -2
- package/dist/presentations/dashboard.presentation.js.map +1 -1
- package/dist/presentations/pipeline.presentation.js +4 -4
- package/dist/presentations/pipeline.presentation.js.map +1 -1
- package/package.json +10 -10
- package/src/crm-pipeline.feature.ts +33 -29
- package/src/deal/deal.operation.ts +9 -9
- package/src/events/contact.event.ts +1 -1
- package/src/events/deal.event.ts +4 -4
- package/src/events/task.event.ts +1 -1
- package/src/example.ts +16 -8
- package/src/presentations/dashboard.presentation.ts +2 -2
- package/src/presentations/pipeline.presentation.ts +4 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -9,7 +9,7 @@ const OWNERS = ["@example.crm-pipeline"];
|
|
|
9
9
|
const CreateDealContract = defineCommand({
|
|
10
10
|
meta: {
|
|
11
11
|
key: "crm.deal.create",
|
|
12
|
-
version: 1,
|
|
12
|
+
version: "1.0.0",
|
|
13
13
|
stability: "stable",
|
|
14
14
|
owners: [...OWNERS],
|
|
15
15
|
tags: [
|
|
@@ -29,7 +29,7 @@ const CreateDealContract = defineCommand({
|
|
|
29
29
|
sideEffects: {
|
|
30
30
|
emits: [{
|
|
31
31
|
key: "deal.created",
|
|
32
|
-
version: 1,
|
|
32
|
+
version: "1.0.0",
|
|
33
33
|
when: "Deal is created",
|
|
34
34
|
payload: DealModel
|
|
35
35
|
}],
|
|
@@ -64,7 +64,7 @@ const CreateDealContract = defineCommand({
|
|
|
64
64
|
const MoveDealContract = defineCommand({
|
|
65
65
|
meta: {
|
|
66
66
|
key: "crm.deal.move",
|
|
67
|
-
version: 1,
|
|
67
|
+
version: "1.0.0",
|
|
68
68
|
stability: "stable",
|
|
69
69
|
owners: [...OWNERS],
|
|
70
70
|
tags: [
|
|
@@ -85,7 +85,7 @@ const MoveDealContract = defineCommand({
|
|
|
85
85
|
sideEffects: {
|
|
86
86
|
emits: [{
|
|
87
87
|
key: "deal.moved",
|
|
88
|
-
version: 1,
|
|
88
|
+
version: "1.0.0",
|
|
89
89
|
when: "Deal stage changed",
|
|
90
90
|
payload: DealMovedPayloadModel
|
|
91
91
|
}],
|
|
@@ -118,7 +118,7 @@ const MoveDealContract = defineCommand({
|
|
|
118
118
|
const WinDealContract = defineCommand({
|
|
119
119
|
meta: {
|
|
120
120
|
key: "crm.deal.win",
|
|
121
|
-
version: 1,
|
|
121
|
+
version: "1.0.0",
|
|
122
122
|
stability: "stable",
|
|
123
123
|
owners: [...OWNERS],
|
|
124
124
|
tags: [
|
|
@@ -138,7 +138,7 @@ const WinDealContract = defineCommand({
|
|
|
138
138
|
sideEffects: {
|
|
139
139
|
emits: [{
|
|
140
140
|
key: "deal.won",
|
|
141
|
-
version: 1,
|
|
141
|
+
version: "1.0.0",
|
|
142
142
|
when: "Deal is won",
|
|
143
143
|
payload: DealWonPayloadModel
|
|
144
144
|
}],
|
|
@@ -172,7 +172,7 @@ const WinDealContract = defineCommand({
|
|
|
172
172
|
const LoseDealContract = defineCommand({
|
|
173
173
|
meta: {
|
|
174
174
|
key: "crm.deal.lose",
|
|
175
|
-
version: 1,
|
|
175
|
+
version: "1.0.0",
|
|
176
176
|
stability: "stable",
|
|
177
177
|
owners: [...OWNERS],
|
|
178
178
|
tags: [
|
|
@@ -192,7 +192,7 @@ const LoseDealContract = defineCommand({
|
|
|
192
192
|
sideEffects: {
|
|
193
193
|
emits: [{
|
|
194
194
|
key: "deal.lost",
|
|
195
|
-
version: 1,
|
|
195
|
+
version: "1.0.0",
|
|
196
196
|
when: "Deal is lost",
|
|
197
197
|
payload: DealLostPayloadModel
|
|
198
198
|
}],
|
|
@@ -226,7 +226,7 @@ const LoseDealContract = defineCommand({
|
|
|
226
226
|
const ListDealsContract = defineQuery({
|
|
227
227
|
meta: {
|
|
228
228
|
key: "crm.deal.list",
|
|
229
|
-
version: 1,
|
|
229
|
+
version: "1.0.0",
|
|
230
230
|
stability: "stable",
|
|
231
231
|
owners: [...OWNERS],
|
|
232
232
|
tags: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deal.operation.js","names":[],"sources":["../../src/deal/deal.operation.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n DealModel,\n CreateDealInputModel,\n MoveDealInputModel,\n DealMovedPayloadModel,\n WinDealInputModel,\n DealWonPayloadModel,\n LoseDealInputModel,\n DealLostPayloadModel,\n ListDealsInputModel,\n ListDealsOutputModel,\n} from './deal.schema';\n\nconst OWNERS = ['@example.crm-pipeline'] as const;\n\n/**\n * Create a new deal.\n */\nexport const CreateDealContract = defineCommand({\n meta: {\n key: 'crm.deal.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'create'],\n description: 'Create a new deal in the pipeline.',\n goal: 'Allow sales reps to create new opportunities.',\n context: 'Deal creation UI, quick add.',\n },\n io: {\n input: CreateDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.created',\n version: 1,\n when: 'Deal is created',\n payload: DealModel,\n },\n ],\n audit: ['deal.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-deal-happy-path',\n given: ['User is authenticated'],\n when: ['User creates a deal with valid data'],\n then: ['Deal is created', 'DealCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-basic-deal',\n input: {\n title: 'Big Corp Q3 License',\n stageId: 'stage-lead',\n value: 50000,\n companyId: 'comp-123',\n },\n output: {\n id: 'deal-789',\n title: 'Big Corp Q3 License',\n status: 'open',\n },\n },\n ],\n },\n});\n\n/**\n * Move deal to a different stage.\n */\nexport const MoveDealContract = defineCommand({\n meta: {\n key: 'crm.deal.move',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'move', 'kanban'],\n description: 'Move a deal to a different stage.',\n goal: 'Allow drag-and-drop stage movement in Kanban.',\n context: 'Pipeline Kanban view.',\n },\n io: {\n input: MoveDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.moved',\n version: 1,\n when: 'Deal stage changed',\n payload: DealMovedPayloadModel,\n },\n ],\n audit: ['deal.moved'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'move-deal-happy-path',\n given: ['Deal exists in stage A'],\n when: ['User moves deal to stage B'],\n then: ['Deal stage is updated', 'DealMoved event is emitted'],\n },\n ],\n examples: [\n {\n key: 'move-to-negotiation',\n input: { dealId: 'deal-789', targetStageId: 'stage-negotiation' },\n output: {\n id: 'deal-789',\n stageId: 'stage-negotiation',\n movedAt: '2025-01-15T10:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Mark deal as won.\n */\nexport const WinDealContract = defineCommand({\n meta: {\n key: 'crm.deal.win',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'won'],\n description: 'Mark a deal as won.',\n goal: 'Close a deal as successful.',\n context: 'Deal closing flow.',\n },\n io: {\n input: WinDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.won',\n version: 1,\n when: 'Deal is won',\n payload: DealWonPayloadModel,\n },\n ],\n audit: ['deal.won'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'win-deal-happy-path',\n given: ['Deal is open'],\n when: ['User marks deal as won'],\n then: ['Deal status becomes WON', 'DealWon event is emitted'],\n },\n ],\n examples: [\n {\n key: 'mark-won',\n input: {\n dealId: 'deal-789',\n actualValue: 52000,\n note: 'Signed contract attached',\n },\n output: {\n id: 'deal-789',\n status: 'won',\n closedAt: '2025-01-20T14:30:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Mark deal as lost.\n */\nexport const LoseDealContract = defineCommand({\n meta: {\n key: 'crm.deal.lose',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'lost'],\n description: 'Mark a deal as lost.',\n goal: 'Close a deal as unsuccessful.',\n context: 'Deal closing flow.',\n },\n io: {\n input: LoseDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.lost',\n version: 1,\n when: 'Deal is lost',\n payload: DealLostPayloadModel,\n },\n ],\n audit: ['deal.lost'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'lose-deal-happy-path',\n given: ['Deal is open'],\n when: ['User marks deal as lost'],\n then: ['Deal status becomes LOST', 'DealLost event is emitted'],\n },\n ],\n examples: [\n {\n key: 'mark-lost',\n input: {\n dealId: 'deal-789',\n reason: 'competitor',\n note: 'Went with cheaper option',\n },\n output: {\n id: 'deal-789',\n status: 'lost',\n closedAt: '2025-01-21T09:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * List deals in pipeline.\n */\nexport const ListDealsContract = defineQuery({\n meta: {\n key: 'crm.deal.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'list'],\n description: 'List deals with filters.',\n goal: 'Show pipeline, deal lists, dashboards.',\n context: 'Pipeline view, deal list.',\n },\n io: {\n input: ListDealsInputModel,\n output: ListDealsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'list-deals-happy-path',\n given: ['User has access to deals'],\n when: ['User lists deals'],\n then: ['List of deals is returned'],\n },\n ],\n examples: [\n {\n key: 'list-filter-stage',\n input: { stageId: 'stage-lead', limit: 20 },\n output: { items: [], total: 5, hasMore: false },\n },\n ],\n },\n});\n"],"mappings":";;;;AAiBA,MAAM,SAAS,CAAC,wBAAwB;;;;AAKxC,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAO;GAAQ;GAAS;EAC/B,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,eAAe;EACxB;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,wBAAwB;GAChC,MAAM,CAAC,sCAAsC;GAC7C,MAAM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AC,mBAAmB;GAC1B,MAAM,CAAC,4BAA4B;GACpC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAc,OAAO;IAAI;GAC3C,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAG,SAAS;IAAO;GAChD,CACF;EACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"deal.operation.js","names":[],"sources":["../../src/deal/deal.operation.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n DealModel,\n CreateDealInputModel,\n MoveDealInputModel,\n DealMovedPayloadModel,\n WinDealInputModel,\n DealWonPayloadModel,\n LoseDealInputModel,\n DealLostPayloadModel,\n ListDealsInputModel,\n ListDealsOutputModel,\n} from './deal.schema';\n\nconst OWNERS = ['@example.crm-pipeline'] as const;\n\n/**\n * Create a new deal.\n */\nexport const CreateDealContract = defineCommand({\n meta: {\n key: 'crm.deal.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'create'],\n description: 'Create a new deal in the pipeline.',\n goal: 'Allow sales reps to create new opportunities.',\n context: 'Deal creation UI, quick add.',\n },\n io: {\n input: CreateDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.created',\n version: '1.0.0',\n when: 'Deal is created',\n payload: DealModel,\n },\n ],\n audit: ['deal.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-deal-happy-path',\n given: ['User is authenticated'],\n when: ['User creates a deal with valid data'],\n then: ['Deal is created', 'DealCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-basic-deal',\n input: {\n title: 'Big Corp Q3 License',\n stageId: 'stage-lead',\n value: 50000,\n companyId: 'comp-123',\n },\n output: {\n id: 'deal-789',\n title: 'Big Corp Q3 License',\n status: 'open',\n },\n },\n ],\n },\n});\n\n/**\n * Move deal to a different stage.\n */\nexport const MoveDealContract = defineCommand({\n meta: {\n key: 'crm.deal.move',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'move', 'kanban'],\n description: 'Move a deal to a different stage.',\n goal: 'Allow drag-and-drop stage movement in Kanban.',\n context: 'Pipeline Kanban view.',\n },\n io: {\n input: MoveDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.moved',\n version: '1.0.0',\n when: 'Deal stage changed',\n payload: DealMovedPayloadModel,\n },\n ],\n audit: ['deal.moved'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'move-deal-happy-path',\n given: ['Deal exists in stage A'],\n when: ['User moves deal to stage B'],\n then: ['Deal stage is updated', 'DealMoved event is emitted'],\n },\n ],\n examples: [\n {\n key: 'move-to-negotiation',\n input: { dealId: 'deal-789', targetStageId: 'stage-negotiation' },\n output: {\n id: 'deal-789',\n stageId: 'stage-negotiation',\n movedAt: '2025-01-15T10:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Mark deal as won.\n */\nexport const WinDealContract = defineCommand({\n meta: {\n key: 'crm.deal.win',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'won'],\n description: 'Mark a deal as won.',\n goal: 'Close a deal as successful.',\n context: 'Deal closing flow.',\n },\n io: {\n input: WinDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.won',\n version: '1.0.0',\n when: 'Deal is won',\n payload: DealWonPayloadModel,\n },\n ],\n audit: ['deal.won'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'win-deal-happy-path',\n given: ['Deal is open'],\n when: ['User marks deal as won'],\n then: ['Deal status becomes WON', 'DealWon event is emitted'],\n },\n ],\n examples: [\n {\n key: 'mark-won',\n input: {\n dealId: 'deal-789',\n actualValue: 52000,\n note: 'Signed contract attached',\n },\n output: {\n id: 'deal-789',\n status: 'won',\n closedAt: '2025-01-20T14:30:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Mark deal as lost.\n */\nexport const LoseDealContract = defineCommand({\n meta: {\n key: 'crm.deal.lose',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'lost'],\n description: 'Mark a deal as lost.',\n goal: 'Close a deal as unsuccessful.',\n context: 'Deal closing flow.',\n },\n io: {\n input: LoseDealInputModel,\n output: DealModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'deal.lost',\n version: '1.0.0',\n when: 'Deal is lost',\n payload: DealLostPayloadModel,\n },\n ],\n audit: ['deal.lost'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'lose-deal-happy-path',\n given: ['Deal is open'],\n when: ['User marks deal as lost'],\n then: ['Deal status becomes LOST', 'DealLost event is emitted'],\n },\n ],\n examples: [\n {\n key: 'mark-lost',\n input: {\n dealId: 'deal-789',\n reason: 'competitor',\n note: 'Went with cheaper option',\n },\n output: {\n id: 'deal-789',\n status: 'lost',\n closedAt: '2025-01-21T09:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * List deals in pipeline.\n */\nexport const ListDealsContract = defineQuery({\n meta: {\n key: 'crm.deal.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['crm', 'deal', 'list'],\n description: 'List deals with filters.',\n goal: 'Show pipeline, deal lists, dashboards.',\n context: 'Pipeline view, deal list.',\n },\n io: {\n input: ListDealsInputModel,\n output: ListDealsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'list-deals-happy-path',\n given: ['User has access to deals'],\n when: ['User lists deals'],\n then: ['List of deals is returned'],\n },\n ],\n examples: [\n {\n key: 'list-filter-stage',\n input: { stageId: 'stage-lead', limit: 20 },\n output: { items: [], total: 5, hasMore: false },\n },\n ],\n },\n});\n"],"mappings":";;;;AAiBA,MAAM,SAAS,CAAC,wBAAwB;;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AAK;GACL,OAAO;IACL,QAAQ;IACR,QAAQ;IACR,MAAM;IACP;GACD,QAAQ;IACN,IAAI;IACJ,QAAQ;IACR,UAAU;IACX;GACF,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAO;GAAQ;GAAO;EAC7B,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,2BAA2B;GACnC,MAAM,CAAC,mBAAmB;GAC1B,MAAM,CAAC,4BAA4B;GACpC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAc,OAAO;IAAI;GAC3C,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAG,SAAS;IAAO;GAChD,CACF;EACF;CACF,CAAC"}
|
|
@@ -1,225 +1,225 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/deal/deal.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A deal in the CRM pipeline.
|
|
6
6
|
*/
|
|
7
|
-
declare const DealModel:
|
|
7
|
+
declare const DealModel: _contractspec_lib_schema0.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
name: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
value: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
currency: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
pipelineId: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
stageId: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
status: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
contactId: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
38
38
|
isOptional: true;
|
|
39
39
|
};
|
|
40
40
|
companyId: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
42
42
|
isOptional: true;
|
|
43
43
|
};
|
|
44
44
|
ownerId: {
|
|
45
|
-
type:
|
|
45
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
46
46
|
isOptional: false;
|
|
47
47
|
};
|
|
48
48
|
expectedCloseDate: {
|
|
49
|
-
type:
|
|
49
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
50
50
|
isOptional: true;
|
|
51
51
|
};
|
|
52
52
|
createdAt: {
|
|
53
|
-
type:
|
|
53
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
54
54
|
isOptional: false;
|
|
55
55
|
};
|
|
56
56
|
updatedAt: {
|
|
57
|
-
type:
|
|
57
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
58
58
|
isOptional: false;
|
|
59
59
|
};
|
|
60
60
|
}>;
|
|
61
61
|
/**
|
|
62
62
|
* Input for creating a deal.
|
|
63
63
|
*/
|
|
64
|
-
declare const CreateDealInputModel:
|
|
64
|
+
declare const CreateDealInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
65
65
|
name: {
|
|
66
|
-
type:
|
|
66
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
67
67
|
isOptional: false;
|
|
68
68
|
};
|
|
69
69
|
value: {
|
|
70
|
-
type:
|
|
70
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
71
71
|
isOptional: false;
|
|
72
72
|
};
|
|
73
73
|
currency: {
|
|
74
|
-
type:
|
|
74
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
75
75
|
isOptional: true;
|
|
76
76
|
};
|
|
77
77
|
pipelineId: {
|
|
78
|
-
type:
|
|
78
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
79
79
|
isOptional: false;
|
|
80
80
|
};
|
|
81
81
|
stageId: {
|
|
82
|
-
type:
|
|
82
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
83
83
|
isOptional: false;
|
|
84
84
|
};
|
|
85
85
|
contactId: {
|
|
86
|
-
type:
|
|
86
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
87
87
|
isOptional: true;
|
|
88
88
|
};
|
|
89
89
|
companyId: {
|
|
90
|
-
type:
|
|
90
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
91
91
|
isOptional: true;
|
|
92
92
|
};
|
|
93
93
|
expectedCloseDate: {
|
|
94
|
-
type:
|
|
94
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
95
95
|
isOptional: true;
|
|
96
96
|
};
|
|
97
97
|
}>;
|
|
98
98
|
/**
|
|
99
99
|
* Input for moving a deal to another stage.
|
|
100
100
|
*/
|
|
101
|
-
declare const MoveDealInputModel:
|
|
101
|
+
declare const MoveDealInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
102
102
|
dealId: {
|
|
103
|
-
type:
|
|
103
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
104
104
|
isOptional: false;
|
|
105
105
|
};
|
|
106
106
|
stageId: {
|
|
107
|
-
type:
|
|
107
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
108
108
|
isOptional: false;
|
|
109
109
|
};
|
|
110
110
|
position: {
|
|
111
|
-
type:
|
|
111
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
112
112
|
isOptional: true;
|
|
113
113
|
};
|
|
114
114
|
}>;
|
|
115
115
|
/**
|
|
116
116
|
* Payload for deal moved event.
|
|
117
117
|
*/
|
|
118
|
-
declare const DealMovedPayloadModel:
|
|
118
|
+
declare const DealMovedPayloadModel: _contractspec_lib_schema0.SchemaModel<{
|
|
119
119
|
dealId: {
|
|
120
|
-
type:
|
|
120
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
121
121
|
isOptional: false;
|
|
122
122
|
};
|
|
123
123
|
fromStage: {
|
|
124
|
-
type:
|
|
124
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
125
125
|
isOptional: false;
|
|
126
126
|
};
|
|
127
127
|
toStage: {
|
|
128
|
-
type:
|
|
128
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
129
129
|
isOptional: false;
|
|
130
130
|
};
|
|
131
131
|
}>;
|
|
132
132
|
/**
|
|
133
133
|
* Input for marking a deal as won.
|
|
134
134
|
*/
|
|
135
|
-
declare const WinDealInputModel:
|
|
135
|
+
declare const WinDealInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
136
136
|
dealId: {
|
|
137
|
-
type:
|
|
137
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
138
138
|
isOptional: false;
|
|
139
139
|
};
|
|
140
140
|
wonSource: {
|
|
141
|
-
type:
|
|
141
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
142
142
|
isOptional: true;
|
|
143
143
|
};
|
|
144
144
|
notes: {
|
|
145
|
-
type:
|
|
145
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
146
146
|
isOptional: true;
|
|
147
147
|
};
|
|
148
148
|
}>;
|
|
149
149
|
/**
|
|
150
150
|
* Payload for deal won event.
|
|
151
151
|
*/
|
|
152
|
-
declare const DealWonPayloadModel:
|
|
152
|
+
declare const DealWonPayloadModel: _contractspec_lib_schema0.SchemaModel<{
|
|
153
153
|
dealId: {
|
|
154
|
-
type:
|
|
154
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
155
155
|
isOptional: false;
|
|
156
156
|
};
|
|
157
157
|
value: {
|
|
158
|
-
type:
|
|
158
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
159
159
|
isOptional: false;
|
|
160
160
|
};
|
|
161
161
|
}>;
|
|
162
162
|
/**
|
|
163
163
|
* Input for marking a deal as lost.
|
|
164
164
|
*/
|
|
165
|
-
declare const LoseDealInputModel:
|
|
165
|
+
declare const LoseDealInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
166
166
|
dealId: {
|
|
167
|
-
type:
|
|
167
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
168
168
|
isOptional: false;
|
|
169
169
|
};
|
|
170
170
|
lostReason: {
|
|
171
|
-
type:
|
|
171
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
172
172
|
isOptional: false;
|
|
173
173
|
};
|
|
174
174
|
notes: {
|
|
175
|
-
type:
|
|
175
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
176
176
|
isOptional: true;
|
|
177
177
|
};
|
|
178
178
|
}>;
|
|
179
179
|
/**
|
|
180
180
|
* Payload for deal lost event.
|
|
181
181
|
*/
|
|
182
|
-
declare const DealLostPayloadModel:
|
|
182
|
+
declare const DealLostPayloadModel: _contractspec_lib_schema0.SchemaModel<{
|
|
183
183
|
dealId: {
|
|
184
|
-
type:
|
|
184
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
185
185
|
isOptional: false;
|
|
186
186
|
};
|
|
187
187
|
reason: {
|
|
188
|
-
type:
|
|
188
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
189
189
|
isOptional: false;
|
|
190
190
|
};
|
|
191
191
|
}>;
|
|
192
192
|
/**
|
|
193
193
|
* Input for listing deals.
|
|
194
194
|
*/
|
|
195
|
-
declare const ListDealsInputModel:
|
|
195
|
+
declare const ListDealsInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
196
196
|
pipelineId: {
|
|
197
|
-
type:
|
|
197
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
198
198
|
isOptional: true;
|
|
199
199
|
};
|
|
200
200
|
stageId: {
|
|
201
|
-
type:
|
|
201
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
202
202
|
isOptional: true;
|
|
203
203
|
};
|
|
204
204
|
status: {
|
|
205
|
-
type:
|
|
205
|
+
type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
|
|
206
206
|
isOptional: true;
|
|
207
207
|
};
|
|
208
208
|
ownerId: {
|
|
209
|
-
type:
|
|
209
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
210
210
|
isOptional: true;
|
|
211
211
|
};
|
|
212
212
|
search: {
|
|
213
|
-
type:
|
|
213
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
214
214
|
isOptional: true;
|
|
215
215
|
};
|
|
216
216
|
limit: {
|
|
217
|
-
type:
|
|
217
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
218
218
|
isOptional: true;
|
|
219
219
|
defaultValue: number;
|
|
220
220
|
};
|
|
221
221
|
offset: {
|
|
222
|
-
type:
|
|
222
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
223
223
|
isOptional: true;
|
|
224
224
|
defaultValue: number;
|
|
225
225
|
};
|
|
@@ -227,59 +227,59 @@ declare const ListDealsInputModel: _contractspec_lib_schema128.SchemaModel<{
|
|
|
227
227
|
/**
|
|
228
228
|
* Output for listing deals.
|
|
229
229
|
*/
|
|
230
|
-
declare const ListDealsOutputModel:
|
|
230
|
+
declare const ListDealsOutputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
231
231
|
deals: {
|
|
232
|
-
type:
|
|
232
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
233
233
|
id: {
|
|
234
|
-
type:
|
|
234
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
235
235
|
isOptional: false;
|
|
236
236
|
};
|
|
237
237
|
name: {
|
|
238
|
-
type:
|
|
238
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
239
239
|
isOptional: false;
|
|
240
240
|
};
|
|
241
241
|
value: {
|
|
242
|
-
type:
|
|
242
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
243
243
|
isOptional: false;
|
|
244
244
|
};
|
|
245
245
|
currency: {
|
|
246
|
-
type:
|
|
246
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
247
247
|
isOptional: false;
|
|
248
248
|
};
|
|
249
249
|
pipelineId: {
|
|
250
|
-
type:
|
|
250
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
251
251
|
isOptional: false;
|
|
252
252
|
};
|
|
253
253
|
stageId: {
|
|
254
|
-
type:
|
|
254
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
255
255
|
isOptional: false;
|
|
256
256
|
};
|
|
257
257
|
status: {
|
|
258
|
-
type:
|
|
258
|
+
type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
|
|
259
259
|
isOptional: false;
|
|
260
260
|
};
|
|
261
261
|
contactId: {
|
|
262
|
-
type:
|
|
262
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
263
263
|
isOptional: true;
|
|
264
264
|
};
|
|
265
265
|
companyId: {
|
|
266
|
-
type:
|
|
266
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
267
267
|
isOptional: true;
|
|
268
268
|
};
|
|
269
269
|
ownerId: {
|
|
270
|
-
type:
|
|
270
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
271
271
|
isOptional: false;
|
|
272
272
|
};
|
|
273
273
|
expectedCloseDate: {
|
|
274
|
-
type:
|
|
274
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
275
275
|
isOptional: true;
|
|
276
276
|
};
|
|
277
277
|
createdAt: {
|
|
278
|
-
type:
|
|
278
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
279
279
|
isOptional: false;
|
|
280
280
|
};
|
|
281
281
|
updatedAt: {
|
|
282
|
-
type:
|
|
282
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
283
283
|
isOptional: false;
|
|
284
284
|
};
|
|
285
285
|
}>;
|
|
@@ -287,11 +287,11 @@ declare const ListDealsOutputModel: _contractspec_lib_schema128.SchemaModel<{
|
|
|
287
287
|
isOptional: false;
|
|
288
288
|
};
|
|
289
289
|
total: {
|
|
290
|
-
type:
|
|
290
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
291
291
|
isOptional: false;
|
|
292
292
|
};
|
|
293
293
|
totalValue: {
|
|
294
|
-
type:
|
|
294
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
295
295
|
isOptional: false;
|
|
296
296
|
};
|
|
297
297
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deal.schema.d.ts","names":[],"sources":["../../src/deal/deal.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,SAkBX,
|
|
1
|
+
{"version":3,"file":"deal.schema.d.ts","names":[],"sources":["../../src/deal/deal.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,SAkBX,4BAlBoB,WAkBpB,CAAA;EAAA,EAAA,EAAA;UAAA,yBAAA,CAAA;;;;;;;;;;;;;;;;IAlBoB,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAuBT,UAAA,EAAA,KAAA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1,39 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema69 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_schema69.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_schema69.EntitySpec<{
|
|
12
|
+
id: _contractspec_lib_schema69.EntityScalarField;
|
|
13
|
+
name: _contractspec_lib_schema69.EntityScalarField;
|
|
14
|
+
domain: _contractspec_lib_schema69.EntityScalarField;
|
|
15
|
+
website: _contractspec_lib_schema69.EntityScalarField;
|
|
16
|
+
industry: _contractspec_lib_schema69.EntityScalarField;
|
|
17
|
+
size: _contractspec_lib_schema69.EntityEnumField;
|
|
18
|
+
employeeCount: _contractspec_lib_schema69.EntityScalarField;
|
|
19
|
+
annualRevenue: _contractspec_lib_schema69.EntityScalarField;
|
|
20
|
+
organizationId: _contractspec_lib_schema69.EntityScalarField;
|
|
21
|
+
ownerId: _contractspec_lib_schema69.EntityScalarField;
|
|
22
|
+
phone: _contractspec_lib_schema69.EntityScalarField;
|
|
23
|
+
email: _contractspec_lib_schema69.EntityScalarField;
|
|
24
|
+
address: _contractspec_lib_schema69.EntityScalarField;
|
|
25
|
+
city: _contractspec_lib_schema69.EntityScalarField;
|
|
26
|
+
state: _contractspec_lib_schema69.EntityScalarField;
|
|
27
|
+
country: _contractspec_lib_schema69.EntityScalarField;
|
|
28
|
+
postalCode: _contractspec_lib_schema69.EntityScalarField;
|
|
29
|
+
linkedInUrl: _contractspec_lib_schema69.EntityScalarField;
|
|
30
|
+
description: _contractspec_lib_schema69.EntityScalarField;
|
|
31
|
+
tags: _contractspec_lib_schema69.EntityScalarField;
|
|
32
|
+
customFields: _contractspec_lib_schema69.EntityScalarField;
|
|
33
|
+
createdAt: _contractspec_lib_schema69.EntityScalarField;
|
|
34
|
+
updatedAt: _contractspec_lib_schema69.EntityScalarField;
|
|
35
|
+
contacts: _contractspec_lib_schema69.EntityRelationField;
|
|
36
|
+
deals: _contractspec_lib_schema69.EntityRelationField;
|
|
37
37
|
}>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { CompanyEntity, CompanySizeEnum };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.entity.d.ts","names":[],"sources":["../../src/entities/company.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,eAKX,EAAA,
|
|
1
|
+
{"version":3,"file":"company.entity.d.ts","names":[],"sources":["../../src/entities/company.entity.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,eAKX,EAAA,0BAAA,CAL0B,aAK1B;AAKF;;;cAAa,0CAAa;MAwDxB,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;yDAxDwB;EAAA,QAAA,gDAAA"}
|