easywork-common-lib 1.0.1348 → 1.0.1351
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/common/enums/drive.enum.d.ts +3 -1
- package/dist/common/enums/drive.enum.js +2 -0
- package/dist/common/enums/drive.enum.js.map +1 -1
- package/dist/entities/policy/version-comment.entity.d.ts +2 -0
- package/dist/entities/policy/version-comment.entity.js +1 -0
- package/dist/entities/policy/version-comment.entity.js.map +1 -1
- package/dist/entities/sales/agent-comment.entity.d.ts +2 -0
- package/dist/entities/sales/agent-comment.entity.js +1 -0
- package/dist/entities/sales/agent-comment.entity.js.map +1 -1
- package/dist/entities/sales/receipt-comment.entity.d.ts +2 -0
- package/dist/entities/sales/receipt-comment.entity.js +1 -0
- package/dist/entities/sales/receipt-comment.entity.js.map +1 -1
- package/package.json +1 -1
- package/dist/entities/thirdparty/wati/index.d.ts +0 -7
- package/dist/entities/thirdparty/wati/index.js +0 -24
- package/dist/entities/thirdparty/wati/index.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-chat.entity.d.ts +0 -27
- package/dist/entities/thirdparty/wati/wati-chat.entity.js +0 -207
- package/dist/entities/thirdparty/wati/wati-chat.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-configuration.entity.d.ts +0 -22
- package/dist/entities/thirdparty/wati/wati-configuration.entity.js +0 -149
- package/dist/entities/thirdparty/wati/wati-configuration.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-events.entity.d.ts +0 -9
- package/dist/entities/thirdparty/wati/wati-events.entity.js +0 -63
- package/dist/entities/thirdparty/wati/wati-events.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-message.entity.d.ts +0 -30
- package/dist/entities/thirdparty/wati/wati-message.entity.js +0 -280
- package/dist/entities/thirdparty/wati/wati-message.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-user-access-log.entity.d.ts +0 -71
- package/dist/entities/thirdparty/wati/wati-user-access-log.entity.js +0 -216
- package/dist/entities/thirdparty/wati/wati-user-access-log.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati-user-access.entity.d.ts +0 -31
- package/dist/entities/thirdparty/wati/wati-user-access.entity.js +0 -193
- package/dist/entities/thirdparty/wati/wati-user-access.entity.js.map +0 -1
- package/dist/entities/thirdparty/wati/wati.enum.d.ts +0 -69
- package/dist/entities/thirdparty/wati/wati.enum.js +0 -83
- package/dist/entities/thirdparty/wati/wati.enum.js.map +0 -1
|
@@ -28,5 +28,7 @@ export declare enum AttachEntityType {
|
|
|
28
28
|
CLAIM_COMMENT = "claim_comment",
|
|
29
29
|
SCHEDULING_COMMENT = "scheduling_comment",
|
|
30
30
|
FUND_RECOVERY_COMMENT = "fund_recovery_comment",
|
|
31
|
-
EVENT_COMMENT = "event_comment"
|
|
31
|
+
EVENT_COMMENT = "event_comment",
|
|
32
|
+
AGENT_COMMENT = "agent_comment",
|
|
33
|
+
POLICY_VERSION_COMMENT = "policy_version_comment"
|
|
32
34
|
}
|
|
@@ -34,5 +34,7 @@ var AttachEntityType;
|
|
|
34
34
|
AttachEntityType["SCHEDULING_COMMENT"] = "scheduling_comment";
|
|
35
35
|
AttachEntityType["FUND_RECOVERY_COMMENT"] = "fund_recovery_comment";
|
|
36
36
|
AttachEntityType["EVENT_COMMENT"] = "event_comment";
|
|
37
|
+
AttachEntityType["AGENT_COMMENT"] = "agent_comment";
|
|
38
|
+
AttachEntityType["POLICY_VERSION_COMMENT"] = "policy_version_comment";
|
|
37
39
|
})(AttachEntityType || (exports.AttachEntityType = AttachEntityType = {}));
|
|
38
40
|
//# sourceMappingURL=drive.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.enum.js","sourceRoot":"","sources":["../../../src/common/enums/drive.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;AACzB,CAAC,EAVW,YAAY,4BAAZ,YAAY,QAUvB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"drive.enum.js","sourceRoot":"","sources":["../../../src/common/enums/drive.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;AACzB,CAAC,EAVW,YAAY,4BAAZ,YAAY,QAUvB;AAED,IAAY,gBAuBX;AAvBD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,iDAA6B,CAAA;IAC7B,uDAAmC,CAAA;IACnC,qDAAiC,CAAA;IACjC,uDAAmC,CAAA;IACnC,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IAEnB,uDAAmC,CAAA;IACnC,mEAA+C,CAAA;IAC/C,mDAA+B,CAAA;IAC/B,6DAAyC,CAAA;IACzC,mEAA+C,CAAA;IAC/C,mDAA+B,CAAA;IAC/B,mDAA+B,CAAA;IAC/B,qEAAiD,CAAA;AACnD,CAAC,EAvBW,gBAAgB,gCAAhB,gBAAgB,QAuB3B"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { PolicyVersion } from "./policy-version.entity";
|
|
2
2
|
import { CommentBase } from "../../common";
|
|
3
|
+
import { AttachedObjectInterface } from "../drive";
|
|
3
4
|
export declare class PolicyVersionComment extends CommentBase {
|
|
4
5
|
policyVersion: PolicyVersion;
|
|
6
|
+
attachedObjects?: AttachedObjectInterface[];
|
|
5
7
|
}
|
|
@@ -16,6 +16,7 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
16
16
|
const common_1 = require("../../common");
|
|
17
17
|
let PolicyVersionComment = class PolicyVersionComment extends common_1.CommentBase {
|
|
18
18
|
policyVersion;
|
|
19
|
+
attachedObjects;
|
|
19
20
|
};
|
|
20
21
|
exports.PolicyVersionComment = PolicyVersionComment;
|
|
21
22
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/policy/version-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,mEAAwD;AACxD,6CAA8C;AAC9C,yCAA2C;
|
|
1
|
+
{"version":3,"file":"version-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/policy/version-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,mEAAwD;AACxD,6CAA8C;AAC9C,yCAA2C;AAIpC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,oBAAW;IASnD,aAAa,CAAgB;IAK7B,eAAe,CAA6B;CAC7C,CAAA;AAfY,oDAAoB;AAS/B;IARC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,qCAAa;QACzB,WAAW,EAAE,4CAA4C;KAC1D,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE;QAC9B,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACa,qCAAa;2DAAC;+BATlB,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CAehC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/agent-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,iDAAuC;AACvC,6CAA8C;AAC9C,yCAA2C;
|
|
1
|
+
{"version":3,"file":"agent-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/agent-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,iDAAuC;AACvC,6CAA8C;AAC9C,yCAA2C;AAIpC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,oBAAW;IAS3C,KAAK,CAAQ;IAKb,eAAe,CAA6B;CAC7C,CAAA;AAfY,oCAAY;AASvB;IARC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAK;QACjB,WAAW,EAAE,mCAAmC;KACjD,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE;QACtB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACK,oBAAK;2CAAC;uBATF,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAexB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Receipt } from "./receipt.entity";
|
|
2
2
|
import { CommentBase } from "../../common";
|
|
3
|
+
import { AttachedObjectInterface } from "../drive";
|
|
3
4
|
export declare class ReceiptComment extends CommentBase {
|
|
4
5
|
receipt: Receipt;
|
|
6
|
+
attachedObjects?: AttachedObjectInterface[];
|
|
5
7
|
}
|
|
@@ -16,6 +16,7 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
16
16
|
const common_1 = require("../../common");
|
|
17
17
|
let ReceiptComment = class ReceiptComment extends common_1.CommentBase {
|
|
18
18
|
receipt;
|
|
19
|
+
attachedObjects;
|
|
19
20
|
};
|
|
20
21
|
exports.ReceiptComment = ReceiptComment;
|
|
21
22
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/receipt-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,qDAA2C;AAC3C,6CAA8C;AAC9C,yCAA2C;
|
|
1
|
+
{"version":3,"file":"receipt-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/receipt-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAC5C,qDAA2C;AAC3C,6CAA8C;AAC9C,yCAA2C;AAIpC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,oBAAW;IAM3C,OAAO,CAAU;IAKjB,eAAe,CAA6B;CAC/C,CAAA;AAZY,wCAAc;AAMvB;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAO,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACxF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE;QACtB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;8BACO,wBAAO;+CAAC;yBANR,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CAY1B"}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./wati-chat.entity";
|
|
2
|
-
export * from "./wati-configuration.entity";
|
|
3
|
-
export * from "./wati-events.entity";
|
|
4
|
-
export * from "./wati-message.entity";
|
|
5
|
-
export * from "./wati-user-access.entity";
|
|
6
|
-
export * from "./wati-user-access-log.entity";
|
|
7
|
-
export * from "./wati.enum";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./wati-chat.entity"), exports);
|
|
18
|
-
__exportStar(require("./wati-configuration.entity"), exports);
|
|
19
|
-
__exportStar(require("./wati-events.entity"), exports);
|
|
20
|
-
__exportStar(require("./wati-message.entity"), exports);
|
|
21
|
-
__exportStar(require("./wati-user-access.entity"), exports);
|
|
22
|
-
__exportStar(require("./wati-user-access-log.entity"), exports);
|
|
23
|
-
__exportStar(require("./wati.enum"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/thirdparty/wati/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,8DAA4C;AAC5C,uDAAqC;AACrC,wDAAsC;AACtC,4DAA0C;AAC1C,gEAA8C;AAC9C,8CAA4B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Lead } from "../../sales/lead.entity";
|
|
2
|
-
import { Contact } from "../../sales/contact.entity";
|
|
3
|
-
import { BaseEntityOnlyEssential } from "../../../common";
|
|
4
|
-
import { WatiMessage } from "../wati/wati-message.entity";
|
|
5
|
-
import { WatiConfiguration } from "../wati/wati-configuration.entity";
|
|
6
|
-
import { User } from "../../user.entity";
|
|
7
|
-
import { WhatsAppConversationStatusEnum } from "../wati/wati.enum";
|
|
8
|
-
export declare class WatiChat extends BaseEntityOnlyEssential {
|
|
9
|
-
watiConfigurationId: string;
|
|
10
|
-
watiConfiguration: WatiConfiguration;
|
|
11
|
-
watiConversationId: string;
|
|
12
|
-
phoneNumber: string;
|
|
13
|
-
fullName?: string;
|
|
14
|
-
sessionActive: boolean;
|
|
15
|
-
sessionExpiresAt?: Date;
|
|
16
|
-
watiCustomAttributes?: object;
|
|
17
|
-
lastMessageTimestamp?: Date;
|
|
18
|
-
status: WhatsAppConversationStatusEnum;
|
|
19
|
-
unreadCountForAgent: number;
|
|
20
|
-
assignedToUserId?: string;
|
|
21
|
-
assignedToUser?: User;
|
|
22
|
-
crmLeadId?: string;
|
|
23
|
-
crmLead?: Lead;
|
|
24
|
-
crmContactId?: string;
|
|
25
|
-
crmContact?: Contact;
|
|
26
|
-
messages: WatiMessage[];
|
|
27
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
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.WatiChat = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const lead_entity_1 = require("../../sales/lead.entity");
|
|
17
|
-
const contact_entity_1 = require("../../sales/contact.entity");
|
|
18
|
-
const common_1 = require("../../../common");
|
|
19
|
-
const wati_message_entity_1 = require("../wati/wati-message.entity");
|
|
20
|
-
const wati_configuration_entity_1 = require("../wati/wati-configuration.entity");
|
|
21
|
-
const user_entity_1 = require("../../user.entity");
|
|
22
|
-
const wati_enum_1 = require("../wati/wati.enum");
|
|
23
|
-
let WatiChat = class WatiChat extends common_1.BaseEntityOnlyEssential {
|
|
24
|
-
watiConfigurationId;
|
|
25
|
-
watiConfiguration;
|
|
26
|
-
watiConversationId;
|
|
27
|
-
phoneNumber;
|
|
28
|
-
fullName;
|
|
29
|
-
sessionActive;
|
|
30
|
-
sessionExpiresAt;
|
|
31
|
-
watiCustomAttributes;
|
|
32
|
-
lastMessageTimestamp;
|
|
33
|
-
status;
|
|
34
|
-
unreadCountForAgent;
|
|
35
|
-
assignedToUserId;
|
|
36
|
-
assignedToUser;
|
|
37
|
-
crmLeadId;
|
|
38
|
-
crmLead;
|
|
39
|
-
crmContactId;
|
|
40
|
-
crmContact;
|
|
41
|
-
messages;
|
|
42
|
-
};
|
|
43
|
-
exports.WatiChat = WatiChat;
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, swagger_1.ApiProperty)({ description: "ID de la WatiConfiguration asociada" }),
|
|
46
|
-
(0, class_validator_1.IsString)(),
|
|
47
|
-
(0, typeorm_1.Index)(),
|
|
48
|
-
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], WatiChat.prototype, "watiConfigurationId", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.ManyToOne)(() => wati_configuration_entity_1.WatiConfiguration, (config) => config.chats),
|
|
53
|
-
(0, typeorm_1.JoinColumn)({ name: "watiConfigurationId" }),
|
|
54
|
-
__metadata("design:type", wati_configuration_entity_1.WatiConfiguration)
|
|
55
|
-
], WatiChat.prototype, "watiConfiguration", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, swagger_1.ApiProperty)({
|
|
58
|
-
description: "ID único de la conversación en Wati (puede ser el número de teléfono del contacto)",
|
|
59
|
-
}),
|
|
60
|
-
(0, class_validator_1.IsString)(),
|
|
61
|
-
(0, class_validator_1.MaxLength)(255),
|
|
62
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], WatiChat.prototype, "watiConversationId", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, swagger_1.ApiProperty)({
|
|
67
|
-
description: "Número de teléfono del contacto externo (cliente/prospecto)",
|
|
68
|
-
}),
|
|
69
|
-
(0, class_validator_1.IsString)(),
|
|
70
|
-
(0, class_validator_1.MaxLength)(50),
|
|
71
|
-
(0, typeorm_1.Index)(),
|
|
72
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 50 }),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], WatiChat.prototype, "phoneNumber", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, swagger_1.ApiProperty)({
|
|
77
|
-
description: "Nombre del contacto tal como aparece en Wati",
|
|
78
|
-
required: false,
|
|
79
|
-
}),
|
|
80
|
-
(0, class_validator_1.IsString)(),
|
|
81
|
-
(0, class_validator_1.MaxLength)(255),
|
|
82
|
-
(0, class_validator_1.IsOptional)(),
|
|
83
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], WatiChat.prototype, "fullName", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, swagger_1.ApiProperty)({
|
|
88
|
-
description: "Indica si hay una sesión de WhatsApp activa con este contacto",
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: false,
|
|
91
|
-
}),
|
|
92
|
-
(0, class_validator_1.IsBoolean)(),
|
|
93
|
-
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
94
|
-
__metadata("design:type", Boolean)
|
|
95
|
-
], WatiChat.prototype, "sessionActive", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, swagger_1.ApiProperty)({
|
|
98
|
-
description: "Fecha y hora de expiración de la sesión activa de WhatsApp",
|
|
99
|
-
required: false,
|
|
100
|
-
}),
|
|
101
|
-
(0, class_validator_1.IsDate)(),
|
|
102
|
-
(0, class_validator_1.IsOptional)(),
|
|
103
|
-
(0, typeorm_1.Column)({ type: "timestamp with time zone", nullable: true }),
|
|
104
|
-
__metadata("design:type", Date)
|
|
105
|
-
], WatiChat.prototype, "sessionExpiresAt", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, swagger_1.ApiProperty)({
|
|
108
|
-
description: "Atributos personalizados de Wati asociados al chat",
|
|
109
|
-
type: "object",
|
|
110
|
-
required: false,
|
|
111
|
-
}),
|
|
112
|
-
(0, class_validator_1.IsJSON)(),
|
|
113
|
-
(0, class_validator_1.IsOptional)(),
|
|
114
|
-
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
115
|
-
__metadata("design:type", Object)
|
|
116
|
-
], WatiChat.prototype, "watiCustomAttributes", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, swagger_1.ApiProperty)({
|
|
119
|
-
description: "Timestamp del último mensaje en esta conversación",
|
|
120
|
-
required: false,
|
|
121
|
-
}),
|
|
122
|
-
(0, class_validator_1.IsDate)(),
|
|
123
|
-
(0, class_validator_1.IsOptional)(),
|
|
124
|
-
(0, typeorm_1.Index)(),
|
|
125
|
-
(0, typeorm_1.Column)({ type: "timestamp with time zone", nullable: true }),
|
|
126
|
-
__metadata("design:type", Date)
|
|
127
|
-
], WatiChat.prototype, "lastMessageTimestamp", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, swagger_1.ApiProperty)({
|
|
130
|
-
enum: wati_enum_1.WhatsAppConversationStatusEnum,
|
|
131
|
-
description: "Estado de la conversación en Easywork",
|
|
132
|
-
}),
|
|
133
|
-
(0, class_validator_1.IsEnum)(wati_enum_1.WhatsAppConversationStatusEnum),
|
|
134
|
-
(0, typeorm_1.Column)({
|
|
135
|
-
type: "enum",
|
|
136
|
-
enum: wati_enum_1.WhatsAppConversationStatusEnum,
|
|
137
|
-
default: wati_enum_1.WhatsAppConversationStatusEnum.OPEN,
|
|
138
|
-
}),
|
|
139
|
-
__metadata("design:type", String)
|
|
140
|
-
], WatiChat.prototype, "status", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, swagger_1.ApiProperty)({
|
|
143
|
-
description: "Número de mensajes no leídos para el agente",
|
|
144
|
-
default: 0,
|
|
145
|
-
}),
|
|
146
|
-
(0, class_validator_1.IsInt)(),
|
|
147
|
-
(0, class_validator_1.Min)(0),
|
|
148
|
-
(0, typeorm_1.Column)({ type: "integer", default: 0 }),
|
|
149
|
-
__metadata("design:type", Number)
|
|
150
|
-
], WatiChat.prototype, "unreadCountForAgent", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
(0, swagger_1.ApiProperty)({
|
|
153
|
-
description: "ID del usuario del CRM asignado a este chat",
|
|
154
|
-
required: false,
|
|
155
|
-
}),
|
|
156
|
-
(0, class_validator_1.IsString)(),
|
|
157
|
-
(0, class_validator_1.IsOptional)(),
|
|
158
|
-
(0, typeorm_1.Index)(),
|
|
159
|
-
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], WatiChat.prototype, "assignedToUserId", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: "SET NULL", nullable: true }),
|
|
164
|
-
(0, typeorm_1.JoinColumn)({ name: "assignedToUserId" }),
|
|
165
|
-
__metadata("design:type", user_entity_1.User)
|
|
166
|
-
], WatiChat.prototype, "assignedToUser", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
(0, swagger_1.ApiProperty)({
|
|
169
|
-
description: "ID del Lead en el CRM asociado a este chat",
|
|
170
|
-
required: false,
|
|
171
|
-
}),
|
|
172
|
-
(0, class_validator_1.IsString)(),
|
|
173
|
-
(0, class_validator_1.IsOptional)(),
|
|
174
|
-
(0, typeorm_1.Index)(),
|
|
175
|
-
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
176
|
-
__metadata("design:type", String)
|
|
177
|
-
], WatiChat.prototype, "crmLeadId", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
(0, typeorm_1.ManyToOne)(() => lead_entity_1.Lead, { onDelete: "SET NULL", nullable: true }),
|
|
180
|
-
(0, typeorm_1.JoinColumn)({ name: "crmLeadId" }),
|
|
181
|
-
__metadata("design:type", lead_entity_1.Lead)
|
|
182
|
-
], WatiChat.prototype, "crmLead", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
(0, swagger_1.ApiProperty)({
|
|
185
|
-
description: "ID del Contact en el CRM asociado a este chat",
|
|
186
|
-
required: false,
|
|
187
|
-
}),
|
|
188
|
-
(0, class_validator_1.IsString)(),
|
|
189
|
-
(0, class_validator_1.IsOptional)(),
|
|
190
|
-
(0, typeorm_1.Index)(),
|
|
191
|
-
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
192
|
-
__metadata("design:type", String)
|
|
193
|
-
], WatiChat.prototype, "crmContactId", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
(0, typeorm_1.ManyToOne)(() => contact_entity_1.Contact, { onDelete: "SET NULL", nullable: true }),
|
|
196
|
-
(0, typeorm_1.JoinColumn)({ name: "crmContactId" }),
|
|
197
|
-
__metadata("design:type", contact_entity_1.Contact)
|
|
198
|
-
], WatiChat.prototype, "crmContact", void 0);
|
|
199
|
-
__decorate([
|
|
200
|
-
(0, typeorm_1.OneToMany)(() => wati_message_entity_1.WatiMessage, (message) => message.watiChat),
|
|
201
|
-
__metadata("design:type", Array)
|
|
202
|
-
], WatiChat.prototype, "messages", void 0);
|
|
203
|
-
exports.WatiChat = WatiChat = __decorate([
|
|
204
|
-
(0, typeorm_1.Entity)("wati_chat"),
|
|
205
|
-
(0, typeorm_1.Index)(["watiConfigurationId", "watiConversationId"], { unique: true })
|
|
206
|
-
], WatiChat);
|
|
207
|
-
//# sourceMappingURL=wati-chat.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wati-chat.entity.js","sourceRoot":"","sources":["../../../../src/entities/thirdparty/wati/wati-chat.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAkF;AAClF,6CAA8C;AAC9C,qDAAiH;AACjH,yDAA+C;AAC/C,+DAAqD;AACrD,4CAA0D;AAC1D,qEAA0D;AAC1D,iFAAsE;AACtE,mDAAyC;AACzC,iDAAmE;AAI5D,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,gCAAuB;IAKnD,mBAAmB,CAAS;IAI5B,iBAAiB,CAAoB;IAQrC,kBAAkB,CAAS;IAS3B,WAAW,CAAS;IAUpB,QAAQ,CAAU;IASlB,aAAa,CAAU;IASvB,gBAAgB,CAAQ;IAUxB,oBAAoB,CAAU;IAU9B,oBAAoB,CAAQ;IAY5B,MAAM,CAAiC;IASvC,mBAAmB,CAAS;IAU5B,gBAAgB,CAAU;IAI1B,cAAc,CAAQ;IAUtB,SAAS,CAAU;IAInB,OAAO,CAAQ;IAUf,YAAY,CAAU;IAItB,UAAU,CAAW;IAGrB,QAAQ,CAAgB;CACzB,CAAA;AA7IY,4BAAQ;AAKnB;IAJC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACnE,IAAA,0BAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACG;AAI5B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;IAC5D,I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IAAI,EAAE,CAAC;IAClE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;8BACxB,wBAAO;4CAAC;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;0CACpC;mBA5Ib,QAAQ;IAFpB,IAAA,gBAAM,EAAC,WAAW,CAAC;IACnB,IAAA,eAAK,EAAC,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC1D,QAAQ,CA6IpB"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Group } from "../../group.entity";
|
|
2
|
-
import { EntityBase } from "../../../common";
|
|
3
|
-
import { WatiChat } from "./wati-chat.entity";
|
|
4
|
-
import { WatiIntegrationStatusEnum, WatiPlanType } from "./wati.enum";
|
|
5
|
-
export declare class WatiConfiguration extends EntityBase {
|
|
6
|
-
baseWebhookUrl: string;
|
|
7
|
-
generatedWebhookSecret: string;
|
|
8
|
-
apiEndpoint: string;
|
|
9
|
-
apiToken: string;
|
|
10
|
-
watiClientID: string;
|
|
11
|
-
associatedPhoneNumber: string;
|
|
12
|
-
status: WatiIntegrationStatusEnum;
|
|
13
|
-
lastErrorDetails?: string;
|
|
14
|
-
lastSuccessfulConnectionAt?: Date;
|
|
15
|
-
groupId: string;
|
|
16
|
-
group: Group;
|
|
17
|
-
watiSubscription?: {
|
|
18
|
-
planType: WatiPlanType;
|
|
19
|
-
features?: string[];
|
|
20
|
-
};
|
|
21
|
-
chats: WatiChat[];
|
|
22
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
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.WatiConfiguration = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const group_entity_1 = require("../../group.entity");
|
|
17
|
-
const common_1 = require("../../../common");
|
|
18
|
-
const wati_chat_entity_1 = require("./wati-chat.entity");
|
|
19
|
-
const wati_enum_1 = require("./wati.enum");
|
|
20
|
-
let WatiConfiguration = class WatiConfiguration extends common_1.EntityBase {
|
|
21
|
-
baseWebhookUrl;
|
|
22
|
-
generatedWebhookSecret;
|
|
23
|
-
apiEndpoint;
|
|
24
|
-
apiToken;
|
|
25
|
-
watiClientID;
|
|
26
|
-
associatedPhoneNumber;
|
|
27
|
-
status;
|
|
28
|
-
lastErrorDetails;
|
|
29
|
-
lastSuccessfulConnectionAt;
|
|
30
|
-
groupId;
|
|
31
|
-
group;
|
|
32
|
-
watiSubscription;
|
|
33
|
-
chats;
|
|
34
|
-
};
|
|
35
|
-
exports.WatiConfiguration = WatiConfiguration;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, swagger_1.ApiProperty)({
|
|
38
|
-
description: "URL base del endpoint de webhooks de Easywork para esta integración. La URL completa se construye con identificadores y el secreto.",
|
|
39
|
-
}),
|
|
40
|
-
(0, class_validator_1.IsUrl)(),
|
|
41
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 512 }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], WatiConfiguration.prototype, "baseWebhookUrl", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, swagger_1.ApiProperty)({
|
|
46
|
-
description: "Secreto generado por Easywork para validar los webhooks de Wati. Este secreto se añade a la URL que el usuario configura en Wati.",
|
|
47
|
-
}),
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, select: false }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], WatiConfiguration.prototype, "generatedWebhookSecret", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, swagger_1.ApiProperty)({ description: "URL base de la API de Wati" }),
|
|
54
|
-
(0, class_validator_1.IsUrl)(),
|
|
55
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], WatiConfiguration.prototype, "apiEndpoint", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, swagger_1.ApiProperty)({ description: "Token de acceso para la API de Wati" }),
|
|
60
|
-
(0, class_validator_1.IsString)(),
|
|
61
|
-
(0, typeorm_1.Column)({ type: "text", select: false }),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], WatiConfiguration.prototype, "apiToken", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, swagger_1.ApiProperty)({
|
|
66
|
-
description: "ID de cliente de Wati, identificador único de la cuenta de Wati",
|
|
67
|
-
example: "513892",
|
|
68
|
-
}),
|
|
69
|
-
(0, class_validator_1.IsString)(),
|
|
70
|
-
(0, typeorm_1.Index)(),
|
|
71
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], WatiConfiguration.prototype, "watiClientID", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, swagger_1.ApiProperty)({
|
|
76
|
-
description: "Número de WhatsApp asociado a esta configuración de Wati",
|
|
77
|
-
}),
|
|
78
|
-
(0, class_validator_1.IsString)(),
|
|
79
|
-
(0, typeorm_1.Index)(),
|
|
80
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 50 }),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], WatiConfiguration.prototype, "associatedPhoneNumber", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, swagger_1.ApiProperty)({
|
|
85
|
-
enum: wati_enum_1.WatiIntegrationStatusEnum,
|
|
86
|
-
description: "Estado actual de la integración con Wati",
|
|
87
|
-
default: wati_enum_1.WatiIntegrationStatusEnum.PENDING_SETUP,
|
|
88
|
-
}),
|
|
89
|
-
(0, class_validator_1.IsEnum)(wati_enum_1.WatiIntegrationStatusEnum),
|
|
90
|
-
(0, typeorm_1.Column)({
|
|
91
|
-
type: "enum",
|
|
92
|
-
enum: wati_enum_1.WatiIntegrationStatusEnum,
|
|
93
|
-
default: wati_enum_1.WatiIntegrationStatusEnum.PENDING_SETUP,
|
|
94
|
-
}),
|
|
95
|
-
__metadata("design:type", String)
|
|
96
|
-
], WatiConfiguration.prototype, "status", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
(0, swagger_1.ApiProperty)({
|
|
99
|
-
description: "Detalles del último error de configuración/conexión",
|
|
100
|
-
required: false,
|
|
101
|
-
}),
|
|
102
|
-
(0, class_validator_1.IsString)(),
|
|
103
|
-
(0, class_validator_1.IsOptional)(),
|
|
104
|
-
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
105
|
-
__metadata("design:type", String)
|
|
106
|
-
], WatiConfiguration.prototype, "lastErrorDetails", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, swagger_1.ApiProperty)({
|
|
109
|
-
description: "Fecha del último intento de conexión exitoso",
|
|
110
|
-
required: false,
|
|
111
|
-
}),
|
|
112
|
-
(0, class_validator_1.IsDate)(),
|
|
113
|
-
(0, class_validator_1.IsOptional)(),
|
|
114
|
-
(0, typeorm_1.Column)({ type: "timestamp with time zone", nullable: true }),
|
|
115
|
-
__metadata("design:type", Date)
|
|
116
|
-
], WatiConfiguration.prototype, "lastSuccessfulConnectionAt", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, swagger_1.ApiProperty)({
|
|
119
|
-
description: "ID del Group (tenant) al que pertenece esta configuración",
|
|
120
|
-
}),
|
|
121
|
-
(0, class_validator_1.IsString)(),
|
|
122
|
-
(0, typeorm_1.Index)(),
|
|
123
|
-
(0, typeorm_1.Column)({ type: "uuid", unique: true }),
|
|
124
|
-
__metadata("design:type", String)
|
|
125
|
-
], WatiConfiguration.prototype, "groupId", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { onDelete: "CASCADE" }),
|
|
128
|
-
(0, typeorm_1.JoinColumn)({ name: "groupId" }),
|
|
129
|
-
__metadata("design:type", group_entity_1.Group)
|
|
130
|
-
], WatiConfiguration.prototype, "group", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, swagger_1.ApiProperty)({
|
|
133
|
-
description: "Información de la suscripción de Wati",
|
|
134
|
-
type: "object",
|
|
135
|
-
required: false,
|
|
136
|
-
}),
|
|
137
|
-
(0, class_validator_1.IsJSON)(),
|
|
138
|
-
(0, class_validator_1.IsOptional)(),
|
|
139
|
-
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
140
|
-
__metadata("design:type", Object)
|
|
141
|
-
], WatiConfiguration.prototype, "watiSubscription", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, typeorm_1.OneToMany)(() => wati_chat_entity_1.WatiChat, (chat) => chat.watiConfiguration),
|
|
144
|
-
__metadata("design:type", Array)
|
|
145
|
-
], WatiConfiguration.prototype, "chats", void 0);
|
|
146
|
-
exports.WatiConfiguration = WatiConfiguration = __decorate([
|
|
147
|
-
(0, typeorm_1.Entity)("wati_configurations")
|
|
148
|
-
], WatiConfiguration);
|
|
149
|
-
//# sourceMappingURL=wati-configuration.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wati-configuration.entity.js","sourceRoot":"","sources":["../../../../src/entities/thirdparty/wati/wati-configuration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAkF;AAClF,6CAA8C;AAC9C,qDAAsF;AACtF,qDAA2C;AAC3C,4CAA6C;AAC7C,yDAA8C;AAC9C,2CAAsE;AAG/D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,mBAAU;IAO/C,cAAc,CAAS;IAQvB,sBAAsB,CAAS;IAK/B,WAAW,CAAS;IAKpB,QAAQ,CAAS;IASjB,YAAY,CAAS;IAQrB,qBAAqB,CAAS;IAa9B,MAAM,CAA4B;IASlC,gBAAgB,CAAU;IAS1B,0BAA0B,CAAQ;IAQlC,OAAO,CAAS;IAIhB,KAAK,CAAQ;IAUb,gBAAgB,CAGd;IAGF,KAAK,CAAa;CACnB,CAAA;AAtGY,8CAAiB;AAO5B;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,qIAAqI;KACxI,CAAC;IACD,IAAA,uBAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;yDAClB;AAQvB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,mIAAmI;KACtI,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;iEACzB;AAK/B;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IAC1D,IAAA,uBAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EA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ACX,WAAW,EAAE,8CAA8C;QAC3D,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChC,IAAI;qEAAC;AAQlC;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2DAA2D;KACzE,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kDACvB;AAIhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC/C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BACzB,oBAAK;gDAAC;AAUb;IARC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAIxC;AAGF;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;;gDAC1C;4BArGP,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,qBAAqB,CAAC;GACjB,iBAAiB,CAsG7B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseEntityOnlyEssential } from "../../../common";
|
|
2
|
-
import { WatiEventType } from "./wati.enum";
|
|
3
|
-
import { WatiConfiguration } from "./wati-configuration.entity";
|
|
4
|
-
export declare class WatiEvents extends BaseEntityOnlyEssential {
|
|
5
|
-
watiConfigurationId: string;
|
|
6
|
-
watiConfiguration: WatiConfiguration;
|
|
7
|
-
watiEventType: WatiEventType;
|
|
8
|
-
rawPayload?: object;
|
|
9
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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.WatiEvents = void 0;
|
|
13
|
-
const common_1 = require("../../../common");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const wati_enum_1 = require("./wati.enum");
|
|
16
|
-
const typeorm_1 = require("typeorm");
|
|
17
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
-
const wati_configuration_entity_1 = require("./wati-configuration.entity");
|
|
19
|
-
let WatiEvents = class WatiEvents extends common_1.BaseEntityOnlyEssential {
|
|
20
|
-
watiConfigurationId;
|
|
21
|
-
watiConfiguration;
|
|
22
|
-
watiEventType;
|
|
23
|
-
rawPayload;
|
|
24
|
-
};
|
|
25
|
-
exports.WatiEvents = WatiEvents;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, swagger_1.ApiProperty)({
|
|
28
|
-
description: "ID de la WatiConfiguration que originó este evento",
|
|
29
|
-
}),
|
|
30
|
-
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, typeorm_1.Index)(),
|
|
32
|
-
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], WatiEvents.prototype, "watiConfigurationId", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.ManyToOne)(() => wati_configuration_entity_1.WatiConfiguration, { onDelete: "CASCADE" }),
|
|
37
|
-
(0, typeorm_1.JoinColumn)({ name: "watiConfigurationId" }),
|
|
38
|
-
__metadata("design:type", wati_configuration_entity_1.WatiConfiguration)
|
|
39
|
-
], WatiEvents.prototype, "watiConfiguration", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, swagger_1.ApiProperty)({
|
|
42
|
-
enum: wati_enum_1.WatiEventType,
|
|
43
|
-
description: "Tipo de evento de Wati",
|
|
44
|
-
}),
|
|
45
|
-
(0, class_validator_1.IsEnum)(wati_enum_1.WatiEventType),
|
|
46
|
-
(0, typeorm_1.Column)({ type: "enum", enum: wati_enum_1.WatiEventType, nullable: false }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], WatiEvents.prototype, "watiEventType", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, swagger_1.ApiProperty)({
|
|
51
|
-
description: "Payload crudo del evento de Wati",
|
|
52
|
-
type: "object",
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
(0, class_validator_1.IsJSON)(),
|
|
56
|
-
(0, class_validator_1.IsOptional)(),
|
|
57
|
-
(0, typeorm_1.Column)({ type: "jsonb", nullable: true, select: false }),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], WatiEvents.prototype, "rawPayload", void 0);
|
|
60
|
-
exports.WatiEvents = WatiEvents = __decorate([
|
|
61
|
-
(0, typeorm_1.Entity)("wati_events")
|
|
62
|
-
], WatiEvents);
|
|
63
|
-
//# sourceMappingURL=wati-events.entity.js.map
|