@hed-hog/contact 0.0.299 → 0.0.301
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/dist/contact.module.d.ts.map +1 -1
- package/dist/contact.module.js +2 -0
- package/dist/contact.module.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/person/person.service.js +350 -350
- package/dist/proposal/dto/proposal.dto.d.ts +152 -0
- package/dist/proposal/dto/proposal.dto.d.ts.map +1 -0
- package/dist/proposal/dto/proposal.dto.js +396 -0
- package/dist/proposal/dto/proposal.dto.js.map +1 -0
- package/dist/proposal/proposal-contract.subscriber.d.ts +11 -0
- package/dist/proposal/proposal-contract.subscriber.d.ts.map +1 -0
- package/dist/proposal/proposal-contract.subscriber.js +51 -0
- package/dist/proposal/proposal-contract.subscriber.js.map +1 -0
- package/dist/proposal/proposal-event.types.d.ts +122 -0
- package/dist/proposal/proposal-event.types.d.ts.map +1 -0
- package/dist/proposal/proposal-event.types.js +13 -0
- package/dist/proposal/proposal-event.types.js.map +1 -0
- package/dist/proposal/proposal.controller.d.ts +56 -0
- package/dist/proposal/proposal.controller.d.ts.map +1 -0
- package/dist/proposal/proposal.controller.js +191 -0
- package/dist/proposal/proposal.controller.js.map +1 -0
- package/dist/proposal/proposal.module.d.ts +3 -0
- package/dist/proposal/proposal.module.d.ts.map +1 -0
- package/dist/proposal/proposal.module.js +32 -0
- package/dist/proposal/proposal.module.js.map +1 -0
- package/dist/proposal/proposal.service.d.ts +95 -0
- package/dist/proposal/proposal.service.d.ts.map +1 -0
- package/dist/proposal/proposal.service.js +1914 -0
- package/dist/proposal/proposal.service.js.map +1 -0
- package/dist/proposal/proposal.service.spec.d.ts +2 -0
- package/dist/proposal/proposal.service.spec.d.ts.map +1 -0
- package/dist/proposal/proposal.service.spec.js +187 -0
- package/dist/proposal/proposal.service.spec.js.map +1 -0
- package/hedhog/data/dashboard.yaml +6 -0
- package/hedhog/data/dashboard_component.yaml +87 -0
- package/hedhog/data/dashboard_component_role.yaml +55 -0
- package/hedhog/data/dashboard_item.yaml +95 -0
- package/hedhog/data/dashboard_role.yaml +6 -0
- package/hedhog/data/route.yaml +112 -68
- package/hedhog/frontend/app/dashboard/_components/dashboard-widgets.tsx.ejs +508 -0
- package/hedhog/frontend/app/dashboard/_components/use-crm-dashboard-data.ts.ejs +104 -0
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +37 -431
- package/hedhog/frontend/app/pipeline/_components/lead-detail-sheet.tsx.ejs +252 -209
- package/hedhog/frontend/app/pipeline/_components/lead-proposals-tab.tsx.ejs +1584 -0
- package/hedhog/frontend/messages/en.json +136 -42
- package/hedhog/frontend/messages/pt.json +135 -41
- package/hedhog/frontend/widgets/next-actions.tsx.ejs +40 -0
- package/hedhog/frontend/widgets/overview-kpis.tsx.ejs +47 -0
- package/hedhog/frontend/widgets/owner-performance.tsx.ejs +42 -0
- package/hedhog/frontend/widgets/quick-access.tsx.ejs +29 -0
- package/hedhog/frontend/widgets/source-breakdown.tsx.ejs +40 -0
- package/hedhog/frontend/widgets/stage-distribution.tsx.ejs +40 -0
- package/hedhog/frontend/widgets/top-owners.tsx.ejs +42 -0
- package/hedhog/frontend/widgets/unattended.tsx.ejs +40 -0
- package/hedhog/table/crm_activity.yaml +68 -68
- package/hedhog/table/crm_stage_history.yaml +34 -34
- package/hedhog/table/person_company.yaml +27 -27
- package/hedhog/table/proposal.yaml +112 -0
- package/hedhog/table/proposal_approval.yaml +63 -0
- package/hedhog/table/proposal_document.yaml +77 -0
- package/hedhog/table/proposal_item.yaml +64 -0
- package/hedhog/table/proposal_revision.yaml +78 -0
- package/package.json +6 -5
- package/src/contact.module.ts +2 -0
- package/src/index.ts +3 -0
- package/src/person/dto/account.dto.ts +100 -100
- package/src/person/dto/activity.dto.ts +54 -54
- package/src/person/dto/dashboard-query.dto.ts +25 -25
- package/src/person/dto/followup-query.dto.ts +25 -25
- package/src/person/dto/reports-query.dto.ts +25 -25
- package/src/person/person.controller.ts +176 -176
- package/src/person/person.service.ts +4825 -4825
- package/src/proposal/dto/proposal.dto.ts +341 -0
- package/src/proposal/proposal-contract.subscriber.ts +43 -0
- package/src/proposal/proposal-event.types.ts +130 -0
- package/src/proposal/proposal.controller.ts +168 -0
- package/src/proposal/proposal.module.ts +19 -0
- package/src/proposal/proposal.service.ts +2525 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
export declare enum ProposalStatus {
|
|
2
|
+
DRAFT = "draft",
|
|
3
|
+
PENDING_APPROVAL = "pending_approval",
|
|
4
|
+
APPROVED = "approved",
|
|
5
|
+
REJECTED = "rejected",
|
|
6
|
+
CANCELLED = "cancelled",
|
|
7
|
+
EXPIRED = "expired",
|
|
8
|
+
CONTRACT_GENERATED = "contract_generated"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ProposalContractCategory {
|
|
11
|
+
EMPLOYEE = "employee",
|
|
12
|
+
CONTRACTOR = "contractor",
|
|
13
|
+
CLIENT = "client",
|
|
14
|
+
SUPPLIER = "supplier",
|
|
15
|
+
VENDOR = "vendor",
|
|
16
|
+
PARTNER = "partner",
|
|
17
|
+
INTERNAL = "internal",
|
|
18
|
+
OTHER = "other"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ProposalContractType {
|
|
21
|
+
CLT = "clt",
|
|
22
|
+
PJ = "pj",
|
|
23
|
+
FREELANCER_AGREEMENT = "freelancer_agreement",
|
|
24
|
+
SERVICE_AGREEMENT = "service_agreement",
|
|
25
|
+
FIXED_TERM = "fixed_term",
|
|
26
|
+
RECURRING_SERVICE = "recurring_service",
|
|
27
|
+
NDA = "nda",
|
|
28
|
+
AMENDMENT = "amendment",
|
|
29
|
+
ADDENDUM = "addendum",
|
|
30
|
+
OTHER = "other"
|
|
31
|
+
}
|
|
32
|
+
export declare enum ProposalBillingModel {
|
|
33
|
+
TIME_AND_MATERIAL = "time_and_material",
|
|
34
|
+
MONTHLY_RETAINER = "monthly_retainer",
|
|
35
|
+
FIXED_PRICE = "fixed_price"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ProposalGenerationMode {
|
|
38
|
+
MANUAL = "manual",
|
|
39
|
+
AI_ASSISTED = "ai_assisted",
|
|
40
|
+
DUPLICATED = "duplicated",
|
|
41
|
+
IMPORTED = "imported"
|
|
42
|
+
}
|
|
43
|
+
export declare enum ProposalItemType {
|
|
44
|
+
SERVICE = "service",
|
|
45
|
+
PRODUCT = "product",
|
|
46
|
+
FEE = "fee",
|
|
47
|
+
DISCOUNT = "discount",
|
|
48
|
+
NOTE = "note",
|
|
49
|
+
OTHER = "other"
|
|
50
|
+
}
|
|
51
|
+
export declare enum ProposalTermType {
|
|
52
|
+
VALUE = "value",
|
|
53
|
+
PAYMENT = "payment",
|
|
54
|
+
REVENUE = "revenue",
|
|
55
|
+
FINE = "fine",
|
|
56
|
+
OTHER = "other"
|
|
57
|
+
}
|
|
58
|
+
export declare enum ProposalRecurrence {
|
|
59
|
+
ONE_TIME = "one_time",
|
|
60
|
+
MONTHLY = "monthly",
|
|
61
|
+
QUARTERLY = "quarterly",
|
|
62
|
+
YEARLY = "yearly",
|
|
63
|
+
OTHER = "other"
|
|
64
|
+
}
|
|
65
|
+
export declare enum ProposalDocumentType {
|
|
66
|
+
SOURCE_UPLOAD = "source_upload",
|
|
67
|
+
GENERATED_PDF = "generated_pdf",
|
|
68
|
+
APPROVAL_ATTACHMENT = "approval_attachment",
|
|
69
|
+
SIGNED_COPY = "signed_copy",
|
|
70
|
+
ATTACHMENT = "attachment",
|
|
71
|
+
OTHER = "other"
|
|
72
|
+
}
|
|
73
|
+
export declare enum ProposalDocumentSourceKind {
|
|
74
|
+
MANUAL = "manual",
|
|
75
|
+
GENERATED = "generated",
|
|
76
|
+
IMPORTED = "imported",
|
|
77
|
+
AI_ASSISTED = "ai_assisted"
|
|
78
|
+
}
|
|
79
|
+
export declare enum ProposalDocumentExtractionStatus {
|
|
80
|
+
PENDING = "pending",
|
|
81
|
+
PROCESSING = "processing",
|
|
82
|
+
COMPLETED = "completed",
|
|
83
|
+
FAILED = "failed",
|
|
84
|
+
SKIPPED = "skipped"
|
|
85
|
+
}
|
|
86
|
+
export declare class ProposalItemDto {
|
|
87
|
+
item_type?: ProposalItemType;
|
|
88
|
+
term_type?: ProposalTermType;
|
|
89
|
+
name: string;
|
|
90
|
+
description?: string | null;
|
|
91
|
+
quantity?: number;
|
|
92
|
+
unit_amount_cents?: number;
|
|
93
|
+
total_amount_cents?: number;
|
|
94
|
+
recurrence?: ProposalRecurrence;
|
|
95
|
+
due_day?: number | null;
|
|
96
|
+
start_date?: string | null;
|
|
97
|
+
end_date?: string | null;
|
|
98
|
+
metadata_json?: Record<string, any> | null;
|
|
99
|
+
}
|
|
100
|
+
export declare class ProposalDocumentDto {
|
|
101
|
+
document_type?: ProposalDocumentType;
|
|
102
|
+
file_id?: number | null;
|
|
103
|
+
file_name: string;
|
|
104
|
+
mime_type: string;
|
|
105
|
+
file_content_base64?: string | null;
|
|
106
|
+
source_kind?: ProposalDocumentSourceKind;
|
|
107
|
+
extraction_status?: ProposalDocumentExtractionStatus;
|
|
108
|
+
extraction_summary?: string | null;
|
|
109
|
+
notes?: string | null;
|
|
110
|
+
}
|
|
111
|
+
export declare class CreateProposalDto {
|
|
112
|
+
person_id: number;
|
|
113
|
+
code?: string;
|
|
114
|
+
title: string;
|
|
115
|
+
status?: ProposalStatus;
|
|
116
|
+
contract_category?: ProposalContractCategory;
|
|
117
|
+
contract_type?: ProposalContractType;
|
|
118
|
+
billing_model?: ProposalBillingModel;
|
|
119
|
+
currency_code?: string;
|
|
120
|
+
valid_from?: string | null;
|
|
121
|
+
valid_until?: string | null;
|
|
122
|
+
subtotal_amount_cents?: number;
|
|
123
|
+
discount_amount_cents?: number;
|
|
124
|
+
tax_amount_cents?: number;
|
|
125
|
+
total_amount_cents?: number;
|
|
126
|
+
notes?: string | null;
|
|
127
|
+
owner_user_id?: number | null;
|
|
128
|
+
generation_mode?: ProposalGenerationMode;
|
|
129
|
+
summary?: string | null;
|
|
130
|
+
content_html?: string | null;
|
|
131
|
+
snapshot_json?: Record<string, any> | null;
|
|
132
|
+
items?: ProposalItemDto[];
|
|
133
|
+
documents?: ProposalDocumentDto[];
|
|
134
|
+
}
|
|
135
|
+
declare const UpdateProposalDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateProposalDto>>;
|
|
136
|
+
export declare class UpdateProposalDto extends UpdateProposalDto_base {
|
|
137
|
+
create_new_revision?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export declare class SubmitProposalDto {
|
|
140
|
+
approver_user_id?: number | null;
|
|
141
|
+
note?: string | null;
|
|
142
|
+
}
|
|
143
|
+
export declare class ProposalDecisionDto {
|
|
144
|
+
note?: string | null;
|
|
145
|
+
}
|
|
146
|
+
export declare class ProposalListQueryDto {
|
|
147
|
+
search?: string;
|
|
148
|
+
status?: ProposalStatus;
|
|
149
|
+
person_id?: number;
|
|
150
|
+
}
|
|
151
|
+
export {};
|
|
152
|
+
//# sourceMappingURL=proposal.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal.dto.d.ts","sourceRoot":"","sources":["../../../src/proposal/dto/proposal.dto.ts"],"names":[],"mappings":"AAmBA,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,gBAAgB,qBAAqB;IACrC,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,kBAAkB,uBAAuB;CAC1C;AAED,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,oBAAoB;IAC9B,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,oBAAoB,yBAAyB;IAC7C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AAI,CAAC;IAI5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAI/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAI/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAI1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAI5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAItB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI9B,eAAe,CAAC,EAAE,sBAAsB,CAAC;IAIzC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI7B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAM3C,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAM1B,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACnC;;AAED,qBAAa,iBAAkB,SAAQ,sBAA8B;IAGnE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,iBAAiB;IAG5B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,qBAAa,mBAAmB;IAG9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,qBAAa,oBAAoB;IAG/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,MAAM,CAAC,EAAE,cAAc,CAAC;IAKxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProposalListQueryDto = exports.ProposalDecisionDto = exports.SubmitProposalDto = exports.UpdateProposalDto = exports.CreateProposalDto = exports.ProposalDocumentDto = exports.ProposalItemDto = exports.ProposalDocumentExtractionStatus = exports.ProposalDocumentSourceKind = exports.ProposalDocumentType = exports.ProposalRecurrence = exports.ProposalTermType = exports.ProposalItemType = exports.ProposalGenerationMode = exports.ProposalBillingModel = exports.ProposalContractType = exports.ProposalContractCategory = exports.ProposalStatus = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
|
+
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
var ProposalStatus;
|
|
18
|
+
(function (ProposalStatus) {
|
|
19
|
+
ProposalStatus["DRAFT"] = "draft";
|
|
20
|
+
ProposalStatus["PENDING_APPROVAL"] = "pending_approval";
|
|
21
|
+
ProposalStatus["APPROVED"] = "approved";
|
|
22
|
+
ProposalStatus["REJECTED"] = "rejected";
|
|
23
|
+
ProposalStatus["CANCELLED"] = "cancelled";
|
|
24
|
+
ProposalStatus["EXPIRED"] = "expired";
|
|
25
|
+
ProposalStatus["CONTRACT_GENERATED"] = "contract_generated";
|
|
26
|
+
})(ProposalStatus || (exports.ProposalStatus = ProposalStatus = {}));
|
|
27
|
+
var ProposalContractCategory;
|
|
28
|
+
(function (ProposalContractCategory) {
|
|
29
|
+
ProposalContractCategory["EMPLOYEE"] = "employee";
|
|
30
|
+
ProposalContractCategory["CONTRACTOR"] = "contractor";
|
|
31
|
+
ProposalContractCategory["CLIENT"] = "client";
|
|
32
|
+
ProposalContractCategory["SUPPLIER"] = "supplier";
|
|
33
|
+
ProposalContractCategory["VENDOR"] = "vendor";
|
|
34
|
+
ProposalContractCategory["PARTNER"] = "partner";
|
|
35
|
+
ProposalContractCategory["INTERNAL"] = "internal";
|
|
36
|
+
ProposalContractCategory["OTHER"] = "other";
|
|
37
|
+
})(ProposalContractCategory || (exports.ProposalContractCategory = ProposalContractCategory = {}));
|
|
38
|
+
var ProposalContractType;
|
|
39
|
+
(function (ProposalContractType) {
|
|
40
|
+
ProposalContractType["CLT"] = "clt";
|
|
41
|
+
ProposalContractType["PJ"] = "pj";
|
|
42
|
+
ProposalContractType["FREELANCER_AGREEMENT"] = "freelancer_agreement";
|
|
43
|
+
ProposalContractType["SERVICE_AGREEMENT"] = "service_agreement";
|
|
44
|
+
ProposalContractType["FIXED_TERM"] = "fixed_term";
|
|
45
|
+
ProposalContractType["RECURRING_SERVICE"] = "recurring_service";
|
|
46
|
+
ProposalContractType["NDA"] = "nda";
|
|
47
|
+
ProposalContractType["AMENDMENT"] = "amendment";
|
|
48
|
+
ProposalContractType["ADDENDUM"] = "addendum";
|
|
49
|
+
ProposalContractType["OTHER"] = "other";
|
|
50
|
+
})(ProposalContractType || (exports.ProposalContractType = ProposalContractType = {}));
|
|
51
|
+
var ProposalBillingModel;
|
|
52
|
+
(function (ProposalBillingModel) {
|
|
53
|
+
ProposalBillingModel["TIME_AND_MATERIAL"] = "time_and_material";
|
|
54
|
+
ProposalBillingModel["MONTHLY_RETAINER"] = "monthly_retainer";
|
|
55
|
+
ProposalBillingModel["FIXED_PRICE"] = "fixed_price";
|
|
56
|
+
})(ProposalBillingModel || (exports.ProposalBillingModel = ProposalBillingModel = {}));
|
|
57
|
+
var ProposalGenerationMode;
|
|
58
|
+
(function (ProposalGenerationMode) {
|
|
59
|
+
ProposalGenerationMode["MANUAL"] = "manual";
|
|
60
|
+
ProposalGenerationMode["AI_ASSISTED"] = "ai_assisted";
|
|
61
|
+
ProposalGenerationMode["DUPLICATED"] = "duplicated";
|
|
62
|
+
ProposalGenerationMode["IMPORTED"] = "imported";
|
|
63
|
+
})(ProposalGenerationMode || (exports.ProposalGenerationMode = ProposalGenerationMode = {}));
|
|
64
|
+
var ProposalItemType;
|
|
65
|
+
(function (ProposalItemType) {
|
|
66
|
+
ProposalItemType["SERVICE"] = "service";
|
|
67
|
+
ProposalItemType["PRODUCT"] = "product";
|
|
68
|
+
ProposalItemType["FEE"] = "fee";
|
|
69
|
+
ProposalItemType["DISCOUNT"] = "discount";
|
|
70
|
+
ProposalItemType["NOTE"] = "note";
|
|
71
|
+
ProposalItemType["OTHER"] = "other";
|
|
72
|
+
})(ProposalItemType || (exports.ProposalItemType = ProposalItemType = {}));
|
|
73
|
+
var ProposalTermType;
|
|
74
|
+
(function (ProposalTermType) {
|
|
75
|
+
ProposalTermType["VALUE"] = "value";
|
|
76
|
+
ProposalTermType["PAYMENT"] = "payment";
|
|
77
|
+
ProposalTermType["REVENUE"] = "revenue";
|
|
78
|
+
ProposalTermType["FINE"] = "fine";
|
|
79
|
+
ProposalTermType["OTHER"] = "other";
|
|
80
|
+
})(ProposalTermType || (exports.ProposalTermType = ProposalTermType = {}));
|
|
81
|
+
var ProposalRecurrence;
|
|
82
|
+
(function (ProposalRecurrence) {
|
|
83
|
+
ProposalRecurrence["ONE_TIME"] = "one_time";
|
|
84
|
+
ProposalRecurrence["MONTHLY"] = "monthly";
|
|
85
|
+
ProposalRecurrence["QUARTERLY"] = "quarterly";
|
|
86
|
+
ProposalRecurrence["YEARLY"] = "yearly";
|
|
87
|
+
ProposalRecurrence["OTHER"] = "other";
|
|
88
|
+
})(ProposalRecurrence || (exports.ProposalRecurrence = ProposalRecurrence = {}));
|
|
89
|
+
var ProposalDocumentType;
|
|
90
|
+
(function (ProposalDocumentType) {
|
|
91
|
+
ProposalDocumentType["SOURCE_UPLOAD"] = "source_upload";
|
|
92
|
+
ProposalDocumentType["GENERATED_PDF"] = "generated_pdf";
|
|
93
|
+
ProposalDocumentType["APPROVAL_ATTACHMENT"] = "approval_attachment";
|
|
94
|
+
ProposalDocumentType["SIGNED_COPY"] = "signed_copy";
|
|
95
|
+
ProposalDocumentType["ATTACHMENT"] = "attachment";
|
|
96
|
+
ProposalDocumentType["OTHER"] = "other";
|
|
97
|
+
})(ProposalDocumentType || (exports.ProposalDocumentType = ProposalDocumentType = {}));
|
|
98
|
+
var ProposalDocumentSourceKind;
|
|
99
|
+
(function (ProposalDocumentSourceKind) {
|
|
100
|
+
ProposalDocumentSourceKind["MANUAL"] = "manual";
|
|
101
|
+
ProposalDocumentSourceKind["GENERATED"] = "generated";
|
|
102
|
+
ProposalDocumentSourceKind["IMPORTED"] = "imported";
|
|
103
|
+
ProposalDocumentSourceKind["AI_ASSISTED"] = "ai_assisted";
|
|
104
|
+
})(ProposalDocumentSourceKind || (exports.ProposalDocumentSourceKind = ProposalDocumentSourceKind = {}));
|
|
105
|
+
var ProposalDocumentExtractionStatus;
|
|
106
|
+
(function (ProposalDocumentExtractionStatus) {
|
|
107
|
+
ProposalDocumentExtractionStatus["PENDING"] = "pending";
|
|
108
|
+
ProposalDocumentExtractionStatus["PROCESSING"] = "processing";
|
|
109
|
+
ProposalDocumentExtractionStatus["COMPLETED"] = "completed";
|
|
110
|
+
ProposalDocumentExtractionStatus["FAILED"] = "failed";
|
|
111
|
+
ProposalDocumentExtractionStatus["SKIPPED"] = "skipped";
|
|
112
|
+
})(ProposalDocumentExtractionStatus || (exports.ProposalDocumentExtractionStatus = ProposalDocumentExtractionStatus = {}));
|
|
113
|
+
class ProposalItemDto {
|
|
114
|
+
}
|
|
115
|
+
exports.ProposalItemDto = ProposalItemDto;
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsOptional)(),
|
|
118
|
+
(0, class_validator_1.IsEnum)(ProposalItemType),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], ProposalItemDto.prototype, "item_type", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_validator_1.IsOptional)(),
|
|
123
|
+
(0, class_validator_1.IsEnum)(ProposalTermType),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], ProposalItemDto.prototype, "term_type", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
129
|
+
(0, class_validator_1.MaxLength)(180),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], ProposalItemDto.prototype, "name", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
(0, class_validator_1.IsString)(),
|
|
135
|
+
__metadata("design:type", String)
|
|
136
|
+
], ProposalItemDto.prototype, "description", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsOptional)(),
|
|
139
|
+
(0, class_validator_1.IsNumber)(),
|
|
140
|
+
__metadata("design:type", Number)
|
|
141
|
+
], ProposalItemDto.prototype, "quantity", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_validator_1.IsOptional)(),
|
|
144
|
+
(0, class_validator_1.IsInt)(),
|
|
145
|
+
__metadata("design:type", Number)
|
|
146
|
+
], ProposalItemDto.prototype, "unit_amount_cents", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.IsInt)(),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], ProposalItemDto.prototype, "total_amount_cents", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
(0, class_validator_1.IsEnum)(ProposalRecurrence),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], ProposalItemDto.prototype, "recurrence", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
(0, class_validator_1.IsInt)(),
|
|
160
|
+
(0, class_validator_1.Min)(1),
|
|
161
|
+
__metadata("design:type", Number)
|
|
162
|
+
], ProposalItemDto.prototype, "due_day", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
(0, class_validator_1.IsDateString)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], ProposalItemDto.prototype, "start_date", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_validator_1.IsOptional)(),
|
|
170
|
+
(0, class_validator_1.IsDateString)(),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], ProposalItemDto.prototype, "end_date", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_validator_1.IsOptional)(),
|
|
175
|
+
(0, class_validator_1.IsObject)(),
|
|
176
|
+
__metadata("design:type", Object)
|
|
177
|
+
], ProposalItemDto.prototype, "metadata_json", void 0);
|
|
178
|
+
class ProposalDocumentDto {
|
|
179
|
+
}
|
|
180
|
+
exports.ProposalDocumentDto = ProposalDocumentDto;
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, class_validator_1.IsOptional)(),
|
|
183
|
+
(0, class_validator_1.IsEnum)(ProposalDocumentType),
|
|
184
|
+
__metadata("design:type", String)
|
|
185
|
+
], ProposalDocumentDto.prototype, "document_type", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, class_validator_1.IsOptional)(),
|
|
188
|
+
(0, class_validator_1.IsInt)(),
|
|
189
|
+
__metadata("design:type", Number)
|
|
190
|
+
], ProposalDocumentDto.prototype, "file_id", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, class_validator_1.IsString)(),
|
|
193
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
194
|
+
(0, class_validator_1.MaxLength)(200),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], ProposalDocumentDto.prototype, "file_name", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, class_validator_1.IsString)(),
|
|
199
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
200
|
+
(0, class_validator_1.MaxLength)(120),
|
|
201
|
+
__metadata("design:type", String)
|
|
202
|
+
], ProposalDocumentDto.prototype, "mime_type", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, class_validator_1.IsOptional)(),
|
|
205
|
+
(0, class_validator_1.IsString)(),
|
|
206
|
+
__metadata("design:type", String)
|
|
207
|
+
], ProposalDocumentDto.prototype, "file_content_base64", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, class_validator_1.IsOptional)(),
|
|
210
|
+
(0, class_validator_1.IsEnum)(ProposalDocumentSourceKind),
|
|
211
|
+
__metadata("design:type", String)
|
|
212
|
+
], ProposalDocumentDto.prototype, "source_kind", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, class_validator_1.IsOptional)(),
|
|
215
|
+
(0, class_validator_1.IsEnum)(ProposalDocumentExtractionStatus),
|
|
216
|
+
__metadata("design:type", String)
|
|
217
|
+
], ProposalDocumentDto.prototype, "extraction_status", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, class_validator_1.IsOptional)(),
|
|
220
|
+
(0, class_validator_1.IsString)(),
|
|
221
|
+
__metadata("design:type", String)
|
|
222
|
+
], ProposalDocumentDto.prototype, "extraction_summary", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, class_validator_1.IsOptional)(),
|
|
225
|
+
(0, class_validator_1.IsString)(),
|
|
226
|
+
__metadata("design:type", String)
|
|
227
|
+
], ProposalDocumentDto.prototype, "notes", void 0);
|
|
228
|
+
class CreateProposalDto {
|
|
229
|
+
}
|
|
230
|
+
exports.CreateProposalDto = CreateProposalDto;
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, class_validator_1.IsInt)({
|
|
233
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.personIdMustBeNumber', args.value),
|
|
234
|
+
}),
|
|
235
|
+
__metadata("design:type", Number)
|
|
236
|
+
], CreateProposalDto.prototype, "person_id", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
(0, class_validator_1.IsOptional)(),
|
|
239
|
+
(0, class_validator_1.IsString)(),
|
|
240
|
+
(0, class_validator_1.MaxLength)(40),
|
|
241
|
+
__metadata("design:type", String)
|
|
242
|
+
], CreateProposalDto.prototype, "code", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, class_validator_1.IsString)(),
|
|
245
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
246
|
+
(0, class_validator_1.MaxLength)(180),
|
|
247
|
+
__metadata("design:type", String)
|
|
248
|
+
], CreateProposalDto.prototype, "title", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, class_validator_1.IsOptional)(),
|
|
251
|
+
(0, class_validator_1.IsEnum)(ProposalStatus),
|
|
252
|
+
__metadata("design:type", String)
|
|
253
|
+
], CreateProposalDto.prototype, "status", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, class_validator_1.IsOptional)(),
|
|
256
|
+
(0, class_validator_1.IsEnum)(ProposalContractCategory),
|
|
257
|
+
__metadata("design:type", String)
|
|
258
|
+
], CreateProposalDto.prototype, "contract_category", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, class_validator_1.IsOptional)(),
|
|
261
|
+
(0, class_validator_1.IsEnum)(ProposalContractType),
|
|
262
|
+
__metadata("design:type", String)
|
|
263
|
+
], CreateProposalDto.prototype, "contract_type", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, class_validator_1.IsOptional)(),
|
|
266
|
+
(0, class_validator_1.IsEnum)(ProposalBillingModel),
|
|
267
|
+
__metadata("design:type", String)
|
|
268
|
+
], CreateProposalDto.prototype, "billing_model", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
(0, class_validator_1.IsOptional)(),
|
|
271
|
+
(0, class_validator_1.IsString)(),
|
|
272
|
+
__metadata("design:type", String)
|
|
273
|
+
], CreateProposalDto.prototype, "currency_code", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
(0, class_validator_1.IsOptional)(),
|
|
276
|
+
(0, class_validator_1.IsDateString)(),
|
|
277
|
+
__metadata("design:type", String)
|
|
278
|
+
], CreateProposalDto.prototype, "valid_from", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
(0, class_validator_1.IsOptional)(),
|
|
281
|
+
(0, class_validator_1.IsDateString)(),
|
|
282
|
+
__metadata("design:type", String)
|
|
283
|
+
], CreateProposalDto.prototype, "valid_until", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, class_validator_1.IsOptional)(),
|
|
286
|
+
(0, class_validator_1.IsInt)(),
|
|
287
|
+
__metadata("design:type", Number)
|
|
288
|
+
], CreateProposalDto.prototype, "subtotal_amount_cents", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
(0, class_validator_1.IsOptional)(),
|
|
291
|
+
(0, class_validator_1.IsInt)(),
|
|
292
|
+
__metadata("design:type", Number)
|
|
293
|
+
], CreateProposalDto.prototype, "discount_amount_cents", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
(0, class_validator_1.IsOptional)(),
|
|
296
|
+
(0, class_validator_1.IsInt)(),
|
|
297
|
+
__metadata("design:type", Number)
|
|
298
|
+
], CreateProposalDto.prototype, "tax_amount_cents", void 0);
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, class_validator_1.IsOptional)(),
|
|
301
|
+
(0, class_validator_1.IsInt)(),
|
|
302
|
+
__metadata("design:type", Number)
|
|
303
|
+
], CreateProposalDto.prototype, "total_amount_cents", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
(0, class_validator_1.IsOptional)(),
|
|
306
|
+
(0, class_validator_1.IsString)(),
|
|
307
|
+
__metadata("design:type", String)
|
|
308
|
+
], CreateProposalDto.prototype, "notes", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
(0, class_validator_1.IsOptional)(),
|
|
311
|
+
(0, class_validator_1.IsInt)(),
|
|
312
|
+
__metadata("design:type", Number)
|
|
313
|
+
], CreateProposalDto.prototype, "owner_user_id", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
(0, class_validator_1.IsOptional)(),
|
|
316
|
+
(0, class_validator_1.IsEnum)(ProposalGenerationMode),
|
|
317
|
+
__metadata("design:type", String)
|
|
318
|
+
], CreateProposalDto.prototype, "generation_mode", void 0);
|
|
319
|
+
__decorate([
|
|
320
|
+
(0, class_validator_1.IsOptional)(),
|
|
321
|
+
(0, class_validator_1.IsString)(),
|
|
322
|
+
__metadata("design:type", String)
|
|
323
|
+
], CreateProposalDto.prototype, "summary", void 0);
|
|
324
|
+
__decorate([
|
|
325
|
+
(0, class_validator_1.IsOptional)(),
|
|
326
|
+
(0, class_validator_1.IsString)(),
|
|
327
|
+
__metadata("design:type", String)
|
|
328
|
+
], CreateProposalDto.prototype, "content_html", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
(0, class_validator_1.IsOptional)(),
|
|
331
|
+
(0, class_validator_1.IsObject)(),
|
|
332
|
+
__metadata("design:type", Object)
|
|
333
|
+
], CreateProposalDto.prototype, "snapshot_json", void 0);
|
|
334
|
+
__decorate([
|
|
335
|
+
(0, class_validator_1.IsOptional)(),
|
|
336
|
+
(0, class_validator_1.IsArray)(),
|
|
337
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
338
|
+
(0, class_transformer_1.Type)(() => ProposalItemDto),
|
|
339
|
+
__metadata("design:type", Array)
|
|
340
|
+
], CreateProposalDto.prototype, "items", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
(0, class_validator_1.IsOptional)(),
|
|
343
|
+
(0, class_validator_1.IsArray)(),
|
|
344
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
345
|
+
(0, class_transformer_1.Type)(() => ProposalDocumentDto),
|
|
346
|
+
__metadata("design:type", Array)
|
|
347
|
+
], CreateProposalDto.prototype, "documents", void 0);
|
|
348
|
+
class UpdateProposalDto extends (0, mapped_types_1.PartialType)(CreateProposalDto) {
|
|
349
|
+
}
|
|
350
|
+
exports.UpdateProposalDto = UpdateProposalDto;
|
|
351
|
+
__decorate([
|
|
352
|
+
(0, class_validator_1.IsOptional)(),
|
|
353
|
+
(0, class_validator_1.IsBoolean)(),
|
|
354
|
+
__metadata("design:type", Boolean)
|
|
355
|
+
], UpdateProposalDto.prototype, "create_new_revision", void 0);
|
|
356
|
+
class SubmitProposalDto {
|
|
357
|
+
}
|
|
358
|
+
exports.SubmitProposalDto = SubmitProposalDto;
|
|
359
|
+
__decorate([
|
|
360
|
+
(0, class_validator_1.IsOptional)(),
|
|
361
|
+
(0, class_validator_1.IsInt)(),
|
|
362
|
+
__metadata("design:type", Number)
|
|
363
|
+
], SubmitProposalDto.prototype, "approver_user_id", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
(0, class_validator_1.IsOptional)(),
|
|
366
|
+
(0, class_validator_1.IsString)(),
|
|
367
|
+
__metadata("design:type", String)
|
|
368
|
+
], SubmitProposalDto.prototype, "note", void 0);
|
|
369
|
+
class ProposalDecisionDto {
|
|
370
|
+
}
|
|
371
|
+
exports.ProposalDecisionDto = ProposalDecisionDto;
|
|
372
|
+
__decorate([
|
|
373
|
+
(0, class_validator_1.IsOptional)(),
|
|
374
|
+
(0, class_validator_1.IsString)(),
|
|
375
|
+
__metadata("design:type", String)
|
|
376
|
+
], ProposalDecisionDto.prototype, "note", void 0);
|
|
377
|
+
class ProposalListQueryDto {
|
|
378
|
+
}
|
|
379
|
+
exports.ProposalListQueryDto = ProposalListQueryDto;
|
|
380
|
+
__decorate([
|
|
381
|
+
(0, class_validator_1.IsOptional)(),
|
|
382
|
+
(0, class_validator_1.IsString)(),
|
|
383
|
+
__metadata("design:type", String)
|
|
384
|
+
], ProposalListQueryDto.prototype, "search", void 0);
|
|
385
|
+
__decorate([
|
|
386
|
+
(0, class_validator_1.IsOptional)(),
|
|
387
|
+
(0, class_validator_1.IsEnum)(ProposalStatus),
|
|
388
|
+
__metadata("design:type", String)
|
|
389
|
+
], ProposalListQueryDto.prototype, "status", void 0);
|
|
390
|
+
__decorate([
|
|
391
|
+
(0, class_validator_1.IsOptional)(),
|
|
392
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
393
|
+
(0, class_validator_1.IsInt)(),
|
|
394
|
+
__metadata("design:type", Number)
|
|
395
|
+
], ProposalListQueryDto.prototype, "person_id", void 0);
|
|
396
|
+
//# sourceMappingURL=proposal.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal.dto.js","sourceRoot":"","sources":["../../../src/proposal/dto/proposal.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,uDAAmD;AACnD,yDAAyC;AACzC,qDAcyB;AAEzB,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,uDAAqC,CAAA;IACrC,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,2DAAyC,CAAA;AAC3C,CAAC,EARW,cAAc,8BAAd,cAAc,QAQzB;AAED,IAAY,wBASX;AATD,WAAY,wBAAwB;IAClC,iDAAqB,CAAA;IACrB,qDAAyB,CAAA;IACzB,6CAAiB,CAAA;IACjB,iDAAqB,CAAA;IACrB,6CAAiB,CAAA;IACjB,+CAAmB,CAAA;IACnB,iDAAqB,CAAA;IACrB,2CAAe,CAAA;AACjB,CAAC,EATW,wBAAwB,wCAAxB,wBAAwB,QASnC;AAED,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,mCAAW,CAAA;IACX,iCAAS,CAAA;IACT,qEAA6C,CAAA;IAC7C,+DAAuC,CAAA;IACvC,iDAAyB,CAAA;IACzB,+DAAuC,CAAA;IACvC,mCAAW,CAAA;IACX,+CAAuB,CA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IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAe,CAAC;;gDACF;AAM1B;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC;;oDACE;AAGpC,MAAa,iBAAkB,SAAQ,IAAA,0BAAW,EAAC,iBAAiB,CAAC;CAIpE;AAJD,8CAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;8DACkB;AAGhC,MAAa,iBAAiB;CAQ7B;AARD,8CAQC;AALC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;2DACyB;AAIjC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACU;AAGvB,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACU;AAGvB,MAAa,oBAAoB;CAahC;AAbD,oDAaC;AAVC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,cAAc,CAAC;;oDACC;AAKxB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;;uDACW"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IntegrationDeveloperApiService } from '@hed-hog/core';
|
|
2
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
3
|
+
import { ProposalService } from './proposal.service';
|
|
4
|
+
export declare class ProposalContractSubscriber implements OnModuleInit {
|
|
5
|
+
private readonly integrationApi;
|
|
6
|
+
private readonly proposalService;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
constructor(integrationApi: IntegrationDeveloperApiService, proposalService: ProposalService);
|
|
9
|
+
onModuleInit(): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=proposal-contract.subscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal-contract.subscriber.d.ts","sourceRoot":"","sources":["../../src/proposal/proposal-contract.subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAsB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBACa,0BAA2B,YAAW,YAAY;IAI3D,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAJlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;gBAGnD,cAAc,EAAE,8BAA8B,EAC9C,eAAe,EAAE,eAAe;IAGnD,YAAY,IAAI,IAAI;CA6BrB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var ProposalContractSubscriber_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProposalContractSubscriber = void 0;
|
|
14
|
+
const core_1 = require("@hed-hog/core");
|
|
15
|
+
const common_1 = require("@nestjs/common");
|
|
16
|
+
const proposal_service_1 = require("./proposal.service");
|
|
17
|
+
let ProposalContractSubscriber = ProposalContractSubscriber_1 = class ProposalContractSubscriber {
|
|
18
|
+
constructor(integrationApi, proposalService) {
|
|
19
|
+
this.integrationApi = integrationApi;
|
|
20
|
+
this.proposalService = proposalService;
|
|
21
|
+
this.logger = new common_1.Logger(ProposalContractSubscriber_1.name);
|
|
22
|
+
}
|
|
23
|
+
onModuleInit() {
|
|
24
|
+
this.integrationApi.subscribe({
|
|
25
|
+
eventName: 'operations.contract.created',
|
|
26
|
+
consumerName: 'contact.proposal-conversion-tracker',
|
|
27
|
+
priority: 10,
|
|
28
|
+
handler: async (event) => {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
const payload = (event.payload || {});
|
|
31
|
+
const proposalId = Number(payload.proposalId || ((_a = payload.contract) === null || _a === void 0 ? void 0 : _a.originId) || 0);
|
|
32
|
+
if (!Number.isInteger(proposalId) || proposalId <= 0) {
|
|
33
|
+
this.logger.warn(`Ignoring ${event.eventName} because no proposalId was provided.`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (String(((_b = payload.contract) === null || _b === void 0 ? void 0 : _b.originType) || '') !== 'crm_proposal') {
|
|
37
|
+
this.logger.debug(`Ignoring ${event.eventName} for proposal ${proposalId} because originType is ${((_c = payload.contract) === null || _c === void 0 ? void 0 : _c.originType) || 'unknown'}.`);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
await this.proposalService.markConvertedFromIntegration(payload);
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.ProposalContractSubscriber = ProposalContractSubscriber;
|
|
46
|
+
exports.ProposalContractSubscriber = ProposalContractSubscriber = ProposalContractSubscriber_1 = __decorate([
|
|
47
|
+
(0, common_1.Injectable)(),
|
|
48
|
+
__metadata("design:paramtypes", [core_1.IntegrationDeveloperApiService,
|
|
49
|
+
proposal_service_1.ProposalService])
|
|
50
|
+
], ProposalContractSubscriber);
|
|
51
|
+
//# sourceMappingURL=proposal-contract.subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal-contract.subscriber.js","sourceRoot":"","sources":["../../src/proposal/proposal-contract.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wCAA+D;AAC/D,2CAAkE;AAClE,yDAAqD;AAG9C,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAGrC,YACmB,cAA8C,EAC9C,eAAgC;QADhC,mBAAc,GAAd,cAAc,CAAgC;QAC9C,oBAAe,GAAf,eAAe,CAAiB;QAJlC,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAKnE,CAAC;IAEJ,YAAY;QACV,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;YAC5B,SAAS,EAAE,6BAA6B;YACxC,YAAY,EAAE,qCAAqC;YACnD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;;gBACvB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAQ,CAAC;gBAC7C,MAAM,UAAU,GAAG,MAAM,CACvB,OAAO,CAAC,UAAU,KAAI,MAAA,OAAO,CAAC,QAAQ,0CAAE,QAAQ,CAAA,IAAI,CAAC,CACtD,CAAC;gBAEF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;oBACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,YAAY,KAAK,CAAC,SAAS,s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