@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,40 +1,35 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/entities/company.entity.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Company size enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const CompanySizeEnum:
|
|
4
|
+
export declare const CompanySizeEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
8
5
|
/**
|
|
9
6
|
* Company entity - organization/account.
|
|
10
7
|
*/
|
|
11
|
-
declare const CompanyEntity:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
8
|
+
export declare const CompanyEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
9
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
10
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
11
|
+
domain: import("@contractspec/lib.schema").EntityScalarField;
|
|
12
|
+
website: import("@contractspec/lib.schema").EntityScalarField;
|
|
13
|
+
industry: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
size: import("@contractspec/lib.schema").EntityEnumField;
|
|
15
|
+
employeeCount: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
annualRevenue: import("@contractspec/lib.schema").EntityScalarField;
|
|
17
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
18
|
+
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
+
phone: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
email: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
address: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
city: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
+
state: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
country: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
postalCode: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
linkedInUrl: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
customFields: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
contacts: import("@contractspec/lib.schema").EntityRelationField;
|
|
33
|
+
deals: import("@contractspec/lib.schema").EntityRelationField;
|
|
37
34
|
}>;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { CompanyEntity, CompanySizeEnum };
|
|
40
35
|
//# sourceMappingURL=company.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.entity.d.ts","
|
|
1
|
+
{"version":3,"file":"company.entity.d.ts","sourceRoot":"","sources":["../../src/entities/company.entity.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,eAAe,kDAK1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDxB,CAAC"}
|
|
@@ -1,63 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"ENTERPRISE"
|
|
15
|
-
],
|
|
16
|
-
schema: "crm",
|
|
17
|
-
description: "Size category of a company."
|
|
1
|
+
// @bun
|
|
2
|
+
// src/entities/company.entity.ts
|
|
3
|
+
import {
|
|
4
|
+
defineEntity,
|
|
5
|
+
defineEntityEnum,
|
|
6
|
+
field,
|
|
7
|
+
index
|
|
8
|
+
} from "@contractspec/lib.schema";
|
|
9
|
+
var CompanySizeEnum = defineEntityEnum({
|
|
10
|
+
name: "CompanySize",
|
|
11
|
+
values: ["STARTUP", "SMALL", "MEDIUM", "LARGE", "ENTERPRISE"],
|
|
12
|
+
schema: "crm",
|
|
13
|
+
description: "Size category of a company."
|
|
18
14
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
updatedAt: field.updatedAt(),
|
|
54
|
-
contacts: field.hasMany("Contact"),
|
|
55
|
-
deals: field.hasMany("Deal")
|
|
56
|
-
},
|
|
57
|
-
indexes: [index.on(["organizationId", "ownerId"]), index.on(["domain"])],
|
|
58
|
-
enums: [CompanySizeEnum]
|
|
15
|
+
var CompanyEntity = defineEntity({
|
|
16
|
+
name: "Company",
|
|
17
|
+
description: "A company/organization in the CRM.",
|
|
18
|
+
schema: "crm",
|
|
19
|
+
map: "company",
|
|
20
|
+
fields: {
|
|
21
|
+
id: field.id({ description: "Unique company ID" }),
|
|
22
|
+
name: field.string({ description: "Company name" }),
|
|
23
|
+
domain: field.string({ isOptional: true, description: "Website domain" }),
|
|
24
|
+
website: field.url({ isOptional: true }),
|
|
25
|
+
industry: field.string({ isOptional: true }),
|
|
26
|
+
size: field.enum("CompanySize", { isOptional: true }),
|
|
27
|
+
employeeCount: field.int({ isOptional: true }),
|
|
28
|
+
annualRevenue: field.decimal({ isOptional: true }),
|
|
29
|
+
organizationId: field.foreignKey(),
|
|
30
|
+
ownerId: field.foreignKey({ description: "Account owner" }),
|
|
31
|
+
phone: field.string({ isOptional: true }),
|
|
32
|
+
email: field.email({ isOptional: true }),
|
|
33
|
+
address: field.string({ isOptional: true }),
|
|
34
|
+
city: field.string({ isOptional: true }),
|
|
35
|
+
state: field.string({ isOptional: true }),
|
|
36
|
+
country: field.string({ isOptional: true }),
|
|
37
|
+
postalCode: field.string({ isOptional: true }),
|
|
38
|
+
linkedInUrl: field.url({ isOptional: true }),
|
|
39
|
+
description: field.string({ isOptional: true }),
|
|
40
|
+
tags: field.string({ isArray: true }),
|
|
41
|
+
customFields: field.json({ isOptional: true }),
|
|
42
|
+
createdAt: field.createdAt(),
|
|
43
|
+
updatedAt: field.updatedAt(),
|
|
44
|
+
contacts: field.hasMany("Contact"),
|
|
45
|
+
deals: field.hasMany("Deal")
|
|
46
|
+
},
|
|
47
|
+
indexes: [index.on(["organizationId", "ownerId"]), index.on(["domain"])],
|
|
48
|
+
enums: [CompanySizeEnum]
|
|
59
49
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
export {
|
|
51
|
+
CompanySizeEnum,
|
|
52
|
+
CompanyEntity
|
|
53
|
+
};
|
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/entities/contact.entity.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Contact status enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const ContactStatusEnum:
|
|
4
|
+
export declare const ContactStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
8
5
|
/**
|
|
9
6
|
* Contact entity - individual person.
|
|
10
7
|
*/
|
|
11
|
-
declare const ContactEntity:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
8
|
+
export declare const ContactEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
9
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
10
|
+
firstName: import("@contractspec/lib.schema").EntityScalarField;
|
|
11
|
+
lastName: import("@contractspec/lib.schema").EntityScalarField;
|
|
12
|
+
email: import("@contractspec/lib.schema").EntityScalarField;
|
|
13
|
+
phone: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
companyId: import("@contractspec/lib.schema").EntityScalarField;
|
|
15
|
+
jobTitle: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
17
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
18
|
+
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
+
source: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
linkedInUrl: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
twitterHandle: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
address: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
+
city: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
state: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
country: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
postalCode: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
notes: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
customFields: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
lastContactedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
nextFollowUpAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
33
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
34
|
+
company: import("@contractspec/lib.schema").EntityRelationField;
|
|
35
|
+
deals: import("@contractspec/lib.schema").EntityRelationField;
|
|
36
|
+
tasks: import("@contractspec/lib.schema").EntityRelationField;
|
|
37
|
+
activities: import("@contractspec/lib.schema").EntityRelationField;
|
|
41
38
|
}>;
|
|
42
|
-
//#endregion
|
|
43
|
-
export { ContactEntity, ContactStatusEnum };
|
|
44
39
|
//# sourceMappingURL=contact.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.entity.d.ts","
|
|
1
|
+
{"version":3,"file":"contact.entity.d.ts","sourceRoot":"","sources":["../../src/entities/contact.entity.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,iBAAiB,kDAK5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwExB,CAAC"}
|
|
@@ -1,78 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"ARCHIVED"
|
|
15
|
-
],
|
|
16
|
-
schema: "crm",
|
|
17
|
-
description: "Status of a contact in the sales funnel."
|
|
1
|
+
// @bun
|
|
2
|
+
// src/entities/contact.entity.ts
|
|
3
|
+
import {
|
|
4
|
+
defineEntity,
|
|
5
|
+
defineEntityEnum,
|
|
6
|
+
field,
|
|
7
|
+
index
|
|
8
|
+
} from "@contractspec/lib.schema";
|
|
9
|
+
var ContactStatusEnum = defineEntityEnum({
|
|
10
|
+
name: "ContactStatus",
|
|
11
|
+
values: ["LEAD", "PROSPECT", "CUSTOMER", "CHURNED", "ARCHIVED"],
|
|
12
|
+
schema: "crm",
|
|
13
|
+
description: "Status of a contact in the sales funnel."
|
|
18
14
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
indexes: [
|
|
68
|
-
index.on(["organizationId", "status"]),
|
|
69
|
-
index.on(["organizationId", "ownerId"]),
|
|
70
|
-
index.on(["organizationId", "companyId"]),
|
|
71
|
-
index.on(["email"])
|
|
72
|
-
],
|
|
73
|
-
enums: [ContactStatusEnum]
|
|
15
|
+
var ContactEntity = defineEntity({
|
|
16
|
+
name: "Contact",
|
|
17
|
+
description: "An individual person in the CRM.",
|
|
18
|
+
schema: "crm",
|
|
19
|
+
map: "contact",
|
|
20
|
+
fields: {
|
|
21
|
+
id: field.id({ description: "Unique contact ID" }),
|
|
22
|
+
firstName: field.string({ description: "First name" }),
|
|
23
|
+
lastName: field.string({ description: "Last name" }),
|
|
24
|
+
email: field.email({ isOptional: true, isUnique: true }),
|
|
25
|
+
phone: field.string({ isOptional: true }),
|
|
26
|
+
companyId: field.string({
|
|
27
|
+
isOptional: true,
|
|
28
|
+
description: "Associated company"
|
|
29
|
+
}),
|
|
30
|
+
jobTitle: field.string({ isOptional: true }),
|
|
31
|
+
status: field.enum("ContactStatus", { default: "LEAD" }),
|
|
32
|
+
organizationId: field.foreignKey(),
|
|
33
|
+
ownerId: field.foreignKey({
|
|
34
|
+
description: "Sales rep who owns this contact"
|
|
35
|
+
}),
|
|
36
|
+
source: field.string({ isOptional: true, description: "Lead source" }),
|
|
37
|
+
linkedInUrl: field.url({ isOptional: true }),
|
|
38
|
+
twitterHandle: field.string({ isOptional: true }),
|
|
39
|
+
address: field.string({ isOptional: true }),
|
|
40
|
+
city: field.string({ isOptional: true }),
|
|
41
|
+
state: field.string({ isOptional: true }),
|
|
42
|
+
country: field.string({ isOptional: true }),
|
|
43
|
+
postalCode: field.string({ isOptional: true }),
|
|
44
|
+
notes: field.string({ isOptional: true }),
|
|
45
|
+
tags: field.string({ isArray: true }),
|
|
46
|
+
customFields: field.json({ isOptional: true }),
|
|
47
|
+
lastContactedAt: field.dateTime({ isOptional: true }),
|
|
48
|
+
nextFollowUpAt: field.dateTime({ isOptional: true }),
|
|
49
|
+
createdAt: field.createdAt(),
|
|
50
|
+
updatedAt: field.updatedAt(),
|
|
51
|
+
company: field.belongsTo("Company", ["companyId"], ["id"]),
|
|
52
|
+
deals: field.hasMany("Deal"),
|
|
53
|
+
tasks: field.hasMany("Task"),
|
|
54
|
+
activities: field.hasMany("Activity")
|
|
55
|
+
},
|
|
56
|
+
indexes: [
|
|
57
|
+
index.on(["organizationId", "status"]),
|
|
58
|
+
index.on(["organizationId", "ownerId"]),
|
|
59
|
+
index.on(["organizationId", "companyId"]),
|
|
60
|
+
index.on(["email"])
|
|
61
|
+
],
|
|
62
|
+
enums: [ContactStatusEnum]
|
|
74
63
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
export {
|
|
65
|
+
ContactStatusEnum,
|
|
66
|
+
ContactEntity
|
|
67
|
+
};
|
|
@@ -1,73 +1,68 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/entities/deal.entity.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Deal status enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const DealStatusEnum:
|
|
4
|
+
export declare const DealStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
8
5
|
/**
|
|
9
6
|
* Pipeline entity - sales pipeline definition.
|
|
10
7
|
*/
|
|
11
|
-
declare const PipelineEntity:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
export declare const PipelineEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
9
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
10
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
11
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
12
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
13
|
+
isDefault: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
15
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
stages: import("@contractspec/lib.schema").EntityRelationField;
|
|
17
|
+
deals: import("@contractspec/lib.schema").EntityRelationField;
|
|
21
18
|
}>;
|
|
22
19
|
/**
|
|
23
20
|
* Stage entity - pipeline stage.
|
|
24
21
|
*/
|
|
25
|
-
declare const StageEntity:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
export declare const StageEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
23
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
pipelineId: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
position: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
probability: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
isWonStage: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
isLostStage: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
color: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
33
|
+
pipeline: import("@contractspec/lib.schema").EntityRelationField;
|
|
34
|
+
deals: import("@contractspec/lib.schema").EntityRelationField;
|
|
38
35
|
}>;
|
|
39
36
|
/**
|
|
40
37
|
* Deal entity - sales opportunity.
|
|
41
38
|
*/
|
|
42
|
-
declare const DealEntity:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
export declare const DealEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
40
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
41
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
42
|
+
value: import("@contractspec/lib.schema").EntityScalarField;
|
|
43
|
+
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
44
|
+
pipelineId: import("@contractspec/lib.schema").EntityScalarField;
|
|
45
|
+
stageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
46
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
47
|
+
contactId: import("@contractspec/lib.schema").EntityScalarField;
|
|
48
|
+
companyId: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
50
|
+
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
51
|
+
expectedCloseDate: import("@contractspec/lib.schema").EntityScalarField;
|
|
52
|
+
closedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
53
|
+
lostReason: import("@contractspec/lib.schema").EntityScalarField;
|
|
54
|
+
wonSource: import("@contractspec/lib.schema").EntityScalarField;
|
|
55
|
+
notes: import("@contractspec/lib.schema").EntityScalarField;
|
|
56
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
57
|
+
customFields: import("@contractspec/lib.schema").EntityScalarField;
|
|
58
|
+
stagePosition: import("@contractspec/lib.schema").EntityScalarField;
|
|
59
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
60
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
61
|
+
pipeline: import("@contractspec/lib.schema").EntityRelationField;
|
|
62
|
+
stage: import("@contractspec/lib.schema").EntityRelationField;
|
|
63
|
+
contact: import("@contractspec/lib.schema").EntityRelationField;
|
|
64
|
+
company: import("@contractspec/lib.schema").EntityRelationField;
|
|
65
|
+
tasks: import("@contractspec/lib.schema").EntityRelationField;
|
|
66
|
+
activities: import("@contractspec/lib.schema").EntityRelationField;
|
|
70
67
|
}>;
|
|
71
|
-
//#endregion
|
|
72
|
-
export { DealEntity, DealStatusEnum, PipelineEntity, StageEntity };
|
|
73
68
|
//# sourceMappingURL=deal.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deal.entity.d.ts","
|
|
1
|
+
{"version":3,"file":"deal.entity.d.ts","sourceRoot":"","sources":["../../src/entities/deal.entity.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,cAAc,kDAKzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;EAwBzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;EAwCtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiErB,CAAC"}
|